diff --git a/scroll/index.html b/scroll/index.html new file mode 100644 index 0000000..ec442d3 --- /dev/null +++ b/scroll/index.html @@ -0,0 +1,32 @@ + + + + + + Scroll + + + + + +
+ +
+

Scroll

+
+
+

Hello World

+
+ + + + + + \ No newline at end of file diff --git a/scroll/scroll.css b/scroll/scroll.css new file mode 100644 index 0000000..5745450 --- /dev/null +++ b/scroll/scroll.css @@ -0,0 +1,118 @@ +/* +* ConductorCalc - scroll.css +* +* Created by Janis Hutz 01/17/2024, Licensed under a proprietary License +* https://janishutz.com, development@janishutz.com +* +* +*/ + +#scroll-indicator { + position: fixed; + right: 5%; + z-index: 7; + width: 90%; + bottom: -200px; +} + +#scroll-indicator.show-scroll { + animation: pop-in 0.5s; + bottom: 5%; +} + +#scroll-indicator.hide-scroll { + animation: pop-out 0.5s; + bottom: -200px; +} + +@keyframes pop-in { + 0% { + bottom: -200px; + } + + 70% { + bottom: 6.5%; + } + + 80% { + bottom: 6%; + } + + 100% { + bottom: 5%; + } +} + +@keyframes pop-out { + 0% { + bottom: 5%; + } + + 25% { + bottom: 6.5% + } + + 35% { + bottom: 6%; + } + + 100% { + bottom: -200px; + } +} + +.content { + scroll-snap-type: y mandatory; +} + +.snap { + scroll-snap-align: top; +} + + +.scroll-wrapper { + color: rgb(221, 221, 221); + font-size: 80%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + width: 100%; + user-select: none; +} + +.scroll-container { + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + cursor: pointer; + padding: 15px; + background-color: rgba( 0, 0, 0, 0.2 ); + border-radius: 30px; +} + +.scroll-symbol { + font-size: 180%; + animation: scroll-animation infinite 4s ease-in-out; +} + +@keyframes scroll-animation { + 0% { + opacity: 0; + transform: translateY(0); + } + 10% { + opacity: 1; + } + 65% { + opacity: 0.8; + } + 75% { + opacity: 0; + transform: translateY(25px); + } + 100% { + opacity: 0; + } +} \ No newline at end of file diff --git a/scroll/scroll.js b/scroll/scroll.js new file mode 100644 index 0000000..4d399c8 --- /dev/null +++ b/scroll/scroll.js @@ -0,0 +1,97 @@ +window.scrollHint = ( maxScroll ) => { + let isShowing = false; + const el = document.getElementById( 'scroll-indicator' ); + if ( !el ) { + throw new Error( 'There is no element with ID "scroll-indicator" present on DOM' ); + } + el.innerHTML = ` +
+
+ Scroll to discover more + keyboard_double_arrow_down +
+
`; + + el.onclick = () => { + if ( window.scrollY === 0 ) { + window.scrollTo( { 'top': window.innerHeight, 'behavior': 'smooth' } ); + } else if ( window.scrollY % window.innerHeight === 0 ) { + window.scrollTo( { 'top': ( Math.ceil( window.scrollY / window.innerHeight ) + 1 ) * window.innerHeight, 'behavior': 'smooth' } ); + } else { + window.scrollTo( { 'top': Math.ceil( window.scrollY / window.innerHeight ) * window.innerHeight, 'behavior': 'smooth' } ); + } + el.classList.remove( 'show-scroll' ); + el.classList.add( 'hide-scroll' ); + try { + clearTimeout( scrollCorrectionTimeout ); + } catch ( _err ) {}; + isShowing = false; + timeout = setTimeout( () => { showHint() }, 2500 ); + } + + let lastScrollTimeStamp = new Date().getTime(); + let scrollInterval = 0; + document.onscroll = () => { + try { + clearTimeout( timeout ); + } catch ( _e ) {} + try { + clearTimeout( scrollCorrectionTimeout ); + } catch ( _err ) {}; + if ( isShowing ) { + isShowing = false; + el.classList.remove( 'show-scroll' ); + el.classList.add( 'hide-scroll' ); + } + + if ( scrollInterval === 0 ) { + scrollInterval = setInterval( () => { + if ( lastScrollTimeStamp < new Date().getTime() + 500 ) { + scrollCorrectionTimeout = setTimeout( () => { + scrollCorrection(); + }, 1000 ); + timeout = setTimeout( () => { + showHint(); + }, 2500 ); + try { + clearInterval( scrollInterval ); + scrollInterval = 0; + } catch ( e ) { /* empty */ } + } + }, 250 ); + } + + lastScrollTimeStamp = new Date().getTime(); + }; + + window.onresize = () => { + scrollCorrection(); + showHint(); + } + + let timeout = setTimeout( () => { + showHint(); + }, 2500 ); + + let scrollCorrectionTimeout = 0; + + const showHint = () => { + if ( Math.round( window.scrollY / window.innerHeight ) < maxScroll && maxScroll > 0 ) { + el.classList.remove( 'hide-scroll' ); + el.classList.add( 'show-scroll' ); + isShowing = true; + } else { + el.classList.remove( 'show-scroll' ); + el.classList.add( 'hide-scroll' ); + isShowing = false; + } + } + + const scrollCorrection = () => { + if ( Math.round( window.scrollY / window.innerHeight ) <= maxScroll && maxScroll > 0 && Math.floor( window.scrollY / window.innerHeight ) < maxScroll ) { + window.scrollTo( { top: Math.round( window.scrollY / window.innerHeight ) * window.innerHeight, behavior: 'smooth' } ); + } + } + + scrollCorrection(); +} \ No newline at end of file diff --git a/slider/eslint.config.mjs b/slider/eslint.config.mjs new file mode 100644 index 0000000..7c511cc --- /dev/null +++ b/slider/eslint.config.mjs @@ -0,0 +1,704 @@ +import vue from 'eslint-plugin-vue'; +import eslint from '@eslint/js'; +import globals from 'globals'; +import typescript from '@typescript-eslint/eslint-plugin'; +import stylistic from '@stylistic/eslint-plugin'; +import tseslint from 'typescript-eslint'; + +const style = { + 'plugins': { + '@stylistic': stylistic, + '@stylistic/js': stylistic, + '@stylistic/ts': stylistic, + }, + 'files': [ + '**/*.ts', + '**/*.js', + '**/*.mjs', + '**/*.cjs', + '**/*.tsx', + '**/*.jsx' + ], + 'rules': { + // Formatting + '@stylistic/array-bracket-newline': [ + 'error', + { + 'multiline': true, + 'minItems': 2 + } + ], + '@stylistic/array-bracket-spacing': [ + 'error', + 'always' + ], + '@stylistic/array-element-newline': [ + 'error', + { + 'multiline': true, + 'minItems': 2 + } + ], + '@stylistic/arrow-parens': [ + 'error', + 'as-needed' + ], + '@stylistic/arrow-spacing': [ + 'error', + { + 'before': true, + 'after': true + } + ], + '@stylistic/block-spacing': [ + 'error', + 'always' + ], + '@stylistic/brace-style': [ + 'error', + '1tbs' + ], + '@stylistic/comma-spacing': [ + 'error', + { + 'before': false, + 'after': true + } + ], + '@stylistic/comma-style': [ + 'error', + 'last' + ], + '@stylistic/dot-location': [ + 'error', + 'property' + ], + '@stylistic/eol-last': [ + 'error', + 'always' + ], + '@stylistic/function-call-spacing': [ + 'error', + 'never' + ], + '@stylistic/function-paren-newline': [ + 'error', + { + 'minItems': 3 + } + ], + '@stylistic/function-call-argument-newline': [ + 'error', + 'consistent' + ], + '@stylistic/implicit-arrow-linebreak': [ + 'error', + 'beside' + ], + '@stylistic/indent': [ + 'error', + 4 + ], + '@stylistic/key-spacing': [ + 'error', + { + 'beforeColon': false, + 'afterColon': true + } + ], + '@stylistic/keyword-spacing': [ + 'error', + { + 'before': true, + 'after': true + } + ], + '@stylistic/lines-between-class-members': [ + 'error', + 'always' + ], + '@stylistic/max-len': [ + 'warn', + { + 'code': 120, + 'comments': 140, + 'ignoreComments': false, + 'ignoreUrls': true, + 'ignoreStrings': false + } + ], + '@stylistic/new-parens': [ + 'error', + 'always' + ], + '@stylistic/newline-per-chained-call': [ 'error' ], + '@stylistic/no-extra-parens': [ + 'error', + 'all', + { + 'nestedBinaryExpressions': false, + 'ternaryOperandBinaryExpressions': false, + 'ignoreJSX': 'multi-line', + 'nestedConditionalExpressions': false + } + ], + '@stylistic/no-extra-semi': 'error', + '@stylistic/no-floating-decimal': 'error', + '@stylistic/no-mixed-operators': 'error', + '@stylistic/no-mixed-spaces-and-tabs': 'error', + '@stylistic/no-multi-spaces': 'error', + '@stylistic/no-multiple-empty-lines': [ + 'error', + { + 'max': 3, + 'maxEOF': 2 + } + ], + '@stylistic/no-tabs': 'error', + '@stylistic/no-trailing-spaces': 'error', + '@stylistic/no-whitespace-before-property': 'error', + '@stylistic/object-curly-newline': [ + 'error', + { + 'multiline': true, + 'minProperties': 1 + } + ], + '@stylistic/object-curly-spacing': [ + 'error', + 'always' + ], + '@stylistic/object-property-newline': 'error', + '@stylistic/operator-linebreak': [ + 'error', + 'before' + ], + '@stylistic/one-var-declaration-per-line': 'error', + '@stylistic/padded-blocks': [ + 'error', + { + 'blocks': 'never', + 'classes': 'always', + 'switches': 'never', + } + ], + + // Padding lines. The most in-depth part of this config + '@stylistic/padding-line-between-statements': [ + 'error', + // Variables, Constants + { + 'blankLine': 'never', + 'prev': 'var', + 'next': 'var' + }, + { + 'blankLine': 'never', + 'prev': 'let', + 'next': 'let' + }, + { + 'blankLine': 'never', + 'prev': 'const', + 'next': 'const' + }, + { + 'blankLine': 'always', + 'prev': 'var', + 'next': [ + 'block', + 'block-like', + 'break', + 'cjs-export', + 'cjs-import', + 'class', + 'const', + 'continue', + 'debugger', + 'directive', + 'do', + 'empty', + 'export', + 'expression', + 'for', + 'function', + 'if', + 'iife', + 'import', + 'let', + 'return', + 'switch', + 'throw', + 'try', + 'var', + 'with' + ] + }, + { + 'blankLine': 'always', + 'prev': 'let', + 'next': [ + 'block', + 'block-like', + 'break', + 'cjs-export', + 'cjs-import', + 'class', + 'const', + 'continue', + 'debugger', + 'directive', + 'do', + 'empty', + 'export', + 'expression', + 'for', + 'function', + 'if', + 'iife', + 'import', + 'return', + 'switch', + 'throw', + 'try', + 'var', + 'while', + 'with' + ] + }, + { + 'blankLine': 'always', + 'prev': 'const', + 'next': [ + 'block', + 'block-like', + 'break', + 'cjs-export', + 'cjs-import', + 'class', + 'continue', + 'debugger', + 'directive', + 'do', + 'empty', + 'export', + 'expression', + 'for', + 'function', + 'if', + 'iife', + 'import', + 'let', + 'return', + 'switch', + 'throw', + 'try', + 'var', + 'while', + 'with' + ] + }, + // Import + { + 'blankLine': 'never', + 'prev': 'import', + 'next': 'import' + }, + { + 'blankLine': 'never', + 'prev': 'cjs-import', + 'next': 'cjs-import' + }, + { + 'blankLine': 'always', + 'prev': [ + 'block', + 'block-like', + 'break', + 'cjs-export', + 'class', + 'const', + 'continue', + 'debugger', + 'directive', + 'do', + 'empty', + 'export', + 'expression', + 'for', + 'function', + 'if', + 'iife', + 'let', + 'return', + 'switch', + 'throw', + 'try', + 'var', + 'while', + 'with' + ], + 'next': 'cjs-import' + }, + { + 'blankLine': 'always', + 'prev': 'cjs-import', + 'next': [ + 'block', + 'block-like', + 'break', + 'cjs-export', + 'class', + 'const', + 'continue', + 'debugger', + 'directive', + 'do', + 'empty', + 'export', + 'expression', + 'for', + 'function', + 'if', + 'iife', + 'let', + 'return', + 'switch', + 'throw', + 'try', + 'var', + 'while', + 'with' + ] + }, + { + 'blankLine': 'always', + 'prev': [ + 'block', + 'block-like', + 'break', + 'cjs-export', + 'class', + 'const', + 'continue', + 'debugger', + 'directive', + 'do', + 'empty', + 'export', + 'expression', + 'for', + 'function', + 'if', + 'iife', + 'let', + 'return', + 'switch', + 'throw', + 'try', + 'var', + 'while', + 'with' + ], + 'next': 'import' + }, + { + 'blankLine': 'always', + 'prev': 'import', + 'next': [ + 'block', + 'block-like', + 'break', + 'cjs-export', + 'class', + 'const', + 'continue', + 'debugger', + 'directive', + 'do', + 'empty', + 'export', + 'expression', + 'for', + 'function', + 'if', + 'iife', + 'let', + 'return', + 'switch', + 'throw', + 'try', + 'var', + 'while', + 'with' + ] + }, + // If + { + 'blankLine': 'always', + 'prev': '*', + 'next': 'if' + }, + { + 'blankLine': 'always', + 'prev': 'if', + 'next': '*' + }, + // For + { + 'blankLine': 'always', + 'prev': '*', + 'next': 'for' + }, + { + 'blankLine': 'always', + 'prev': 'for', + 'next': '*' + }, + // While + { + 'blankLine': 'always', + 'prev': '*', + 'next': 'while' + }, + { + 'blankLine': 'always', + 'prev': 'while', + 'next': '*' + }, + // Functions + { + 'blankLine': 'always', + 'prev': '*', + 'next': 'function' + }, + { + 'blankLine': 'always', + 'prev': 'function', + 'next': '*' + }, + // Block Statements + { + 'blankLine': 'always', + 'prev': '*', + 'next': 'block-like' + }, + { + 'blankLine': 'always', + 'prev': 'block-like', + 'next': '*' + }, + // Switch + { + 'blankLine': 'always', + 'prev': '*', + 'next': 'switch' + }, + { + 'blankLine': 'always', + 'prev': 'switch', + 'next': '*' + }, + // Try-Catch + { + 'blankLine': 'always', + 'prev': '*', + 'next': 'try' + }, + { + 'blankLine': 'always', + 'prev': 'try', + 'next': '*' + }, + // Throw + { + 'blankLine': 'always', + 'prev': '*', + 'next': 'throw' + }, + { + 'blankLine': 'always', + 'prev': 'throw', + 'next': '*' + }, + // Return + { + 'blankLine': 'never', + 'prev': 'return', + 'next': '*' + }, + { + 'blankLine': 'always', + 'prev': '*', + 'next': 'return' + }, + // Export + { + 'blankLine': 'always', + 'prev': '*', + 'next': 'export' + }, + { + 'blankLine': 'always', + 'prev': 'export', + 'next': '*' + }, + { + 'blankLine': 'always', + 'prev': '*', + 'next': 'cjs-export' + }, + { + 'blankLine': 'always', + 'prev': 'cjs-export', + 'next': '*' + }, + // Classes + { + 'blankLine': 'always', + 'prev': '*', + 'next': 'class' + }, + { + 'blankLine': 'always', + 'prev': 'class', + 'next': '*' + }, + ], + '@stylistic/quote-props': [ + 'error', + 'always' + ], + '@stylistic/quotes': [ + 'error', + 'single' + ], + '@stylistic/rest-spread-spacing': [ + 'error', + 'never' + ], + '@stylistic/semi': [ + 'error', + 'always' + ], + '@stylistic/semi-spacing': [ + 'error', + { + 'before': false, + 'after': true + } + ], + '@stylistic/semi-style': [ + 'error', + 'last' + ], + '@stylistic/space-before-blocks': [ + 'error', + 'always' + ], + '@stylistic/space-before-function-paren': [ + 'error', + 'always' + ], + '@stylistic/space-in-parens': [ + 'error', + 'always' + ], + '@stylistic/space-infix-ops': [ + 'error', + { + 'int32Hint': false + } + ], + '@stylistic/space-unary-ops': 'error', + '@stylistic/spaced-comment': [ + 'error', + 'always' + ], + '@stylistic/template-curly-spacing': [ + 'error', + 'always' + ], + '@stylistic/switch-colon-spacing': 'error', + '@stylistic/wrap-iife': [ + 'error', + 'inside' + ], + '@stylistic/wrap-regex': 'error', + '@stylistic/ts/type-annotation-spacing': 'error', + } +}; + +/** @type {import('eslint').Linter.Config} */ +export default tseslint.config( + // Base JavaScript rules + eslint.configs.recommended, + tseslint.configs.recommended, + style, + + // Vue support (including TS and JSX inside SFCs) + { + 'files': [ '**/*.vue' ], + 'languageOptions': { + 'sourceType': 'module', + 'ecmaVersion': 'latest', + 'globals': globals.browser, + 'parserOptions': { + 'parser': tseslint.parser, + }, + }, + 'plugins': { + 'vue': vue, + '@stylistic': stylistic, + '@stylistic/js': stylistic, + '@stylistic/ts': stylistic, + '@typescript-eslint': typescript, + }, + 'extends': [ + eslint.configs.recommended, + ...vue.configs['flat/recommended'] + ], + 'rules': { + ...typescript.configs.recommended.rules, + ...style.rules, + + // Vue specific rules + '@stylistic/indent': 'off', + 'vue/html-indent': [ + 'error', + 4 + ], + 'vue/html-comment-indent': [ + 'error', + 4 + ], + 'vue/script-indent': [ + 'error', + 4, + { + 'baseIndent': 1, + 'switchCase': 1 + } + ], + 'vue/html-self-closing': [ + 'error', + { + 'html': { + 'void': 'never', + 'normal': 'never', + 'component': 'always' + }, + 'svg': 'always', + 'math': 'never' + } + ], + 'vue/max-attributes-per-line': [ + 'error', + { + 'singleline': 3, + 'multiline': 1, + } + ], + }, + }, +); diff --git a/slider/index.html b/slider/index.html new file mode 100644 index 0000000..265c5a3 --- /dev/null +++ b/slider/index.html @@ -0,0 +1,34 @@ + + + + + + Slider + + + + +

Sliders

+ +
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/slider/js/slider.js b/slider/js/slider.js new file mode 100644 index 0000000..443b814 --- /dev/null +++ b/slider/js/slider.js @@ -0,0 +1,173 @@ +/* eslint-disable no-var */ +const fetchedElements = document.getElementsByClassName('slider-element'); +const sliderElements = []; +let okToMove = true; +let currentSlideIndex = 0; +const sliderContainer = document.getElementsByClassName('slider-container')[0]; +function sliderGoToIndex(index) { + if (okToMove) { + if (index < sliderElements.length && index >= 0) { + okToMove = false; + // Determine next and previous elements + let previousElement = 0; + let nextElement = 0; + let beforePreviousElement = 0; + if (index < sliderElements.length - 1) { + nextElement = index + 1; + } + else { + nextElement = 0; + } + if (index === 0) { + previousElement = sliderElements.length - 1; + } + else { + previousElement = index - 1; + } + if (index === 0) { + beforePreviousElement = sliderElements.length - 2; + } + else if (index === 1) { + beforePreviousElement = sliderElements.length - 1; + } + else { + beforePreviousElement = index - 2; + } + // Determine move direction: + // true = next, false = previous + let moveDirection = true; + if ((index < currentSlideIndex || (index === sliderElements.length - 1 && currentSlideIndex === 0)) + && !(index === 0 && currentSlideIndex === sliderElements.length - 1)) { + moveDirection = false; + } + /* + Add correct classes to all elements + */ + // New current element + sliderElements[index].classList.add('current'); + sliderElements[index].classList.remove('next'); + sliderElements[index].classList.remove('last'); + sliderElements[index].classList.remove('past'); + // New next element + if (moveDirection) { + sliderElements[nextElement].classList.add('future'); + } + else { + sliderElements[nextElement].classList.add('next'); + } + sliderElements[nextElement].classList.remove('current'); + sliderElements[nextElement].classList.remove('past'); + sliderElements[nextElement].classList.remove('last'); + // new past element + sliderElements[previousElement].classList.add('last'); + sliderElements[previousElement].classList.remove('current'); + sliderElements[previousElement].classList.remove('past'); + sliderElements[previousElement].classList.remove('next'); + sliderElements[beforePreviousElement].classList.add('past'); + sliderElements[beforePreviousElement].classList.remove('last'); + sliderElements[beforePreviousElement].classList.remove('next'); + sliderElements[beforePreviousElement].classList.remove('current'); + // Glitch fixes + setTimeout(() => { + if (moveDirection) { + sliderElements[nextElement].classList.add('next'); + sliderElements[nextElement].classList.remove('future'); + } + currentSlideIndex = index; + setTimeout(() => { + okToMove = true; + }, 500); + }, 1000); + } + else if (index < 0) { + sliderGoToIndex(sliderElements.length - 1); + } + else { + sliderGoToIndex(0); + } + } +} +// eslint-disable-next-line @typescript-eslint/no-unused-vars +var sliderControl = (action) => { + if (action === 'next') { + sliderGoToIndex(currentSlideIndex + 1); + } + else if (action === 'previous') { + sliderGoToIndex(currentSlideIndex - 1); + } + sliderAutoAdvance(); +}; +let sliderAutoAdvanceInterval = 0; +let sliderInterval = 0; +/** + * Set up the slider and give it an interval for auto advancing + * @param interval - The interval at which to auto advance + * @param name - The name of the platform (like desktop, used to load different images) + */ +// eslint-disable-next-line @typescript-eslint/no-unused-vars +var activateSlider = (interval, name) => { + sliderAutoAdvanceInterval = interval; + sliderContainer.addEventListener('mouseenter', () => { + stopSliderAutoAdvance(); + }); + sliderContainer.addEventListener('mouseleave', () => { + sliderAutoAdvance(); + }); + document.addEventListener('blur', () => { + stopSliderAutoAdvance(); + }); + window.addEventListener('focus', () => { + sliderAutoAdvance(); + }); + sliderAutoAdvance(); + loadImageType(name); +}; +const sliderAutoAdvance = () => { + if (sliderAutoAdvanceInterval > 0) { + stopSliderAutoAdvance(); + sliderInterval = setInterval(() => { + sliderGoToIndex(currentSlideIndex + 1); + }, sliderAutoAdvanceInterval); + } +}; +const stopSliderAutoAdvance = () => { + try { + clearInterval(sliderInterval); + } + catch (e) { + console.debug(e); + } +}; +const allowedExtensions = [ + 'webp', + 'jpg', + 'jpeg', + 'svg', + 'png' +]; +/** + * Load type of image, can be used to load images for different platforms (i.e. mobile optimization) + * @param name - The name appended to the image filename + */ +var loadImageType = (name) => { + sliderElements.forEach(el => { + const baseURL = el.dataset.imageBaseURL; + const filetype = el.dataset.filetype; + // TODO: Verification (i.e. baseURL cannot contain .something in the end, filetype may only be jpg, jpeg, webp, svg or png) + if (allowedExtensions.indexOf(filetype) === -1) { + console.warn('[ SLIDER ] Invalid filetype ' + filetype + ' for image element with id ' + el.id); + return; + } + if (baseURL.lastIndexOf('.') > baseURL.lastIndexOf('/')) { + console.warn('[ SLIDER ] ImageBaseURL incorrect for image element with id ' + el.id); + return; + } + el.style.setProperty('background-image', baseURL + name + filetype); + }); +}; +for (const el in fetchedElements) { + if (fetchedElements[el].className) { + sliderElements.push(fetchedElements[el]); + } +} +sliderGoToIndex(0); diff --git a/slider/node_modules/.bin/acorn b/slider/node_modules/.bin/acorn new file mode 120000 index 0000000..d2e62b1 --- /dev/null +++ b/slider/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/slider/node_modules/.bin/cssesc b/slider/node_modules/.bin/cssesc new file mode 120000 index 0000000..c88b1b1 --- /dev/null +++ b/slider/node_modules/.bin/cssesc @@ -0,0 +1 @@ +../cssesc/bin/cssesc \ No newline at end of file diff --git a/slider/node_modules/.bin/eslint b/slider/node_modules/.bin/eslint new file mode 120000 index 0000000..7802727 --- /dev/null +++ b/slider/node_modules/.bin/eslint @@ -0,0 +1 @@ +../eslint/bin/eslint.js \ No newline at end of file diff --git a/slider/node_modules/.bin/js-yaml b/slider/node_modules/.bin/js-yaml new file mode 120000 index 0000000..4eced6c --- /dev/null +++ b/slider/node_modules/.bin/js-yaml @@ -0,0 +1 @@ +../js-yaml/bin/js-yaml.js \ No newline at end of file diff --git a/slider/node_modules/.bin/node-which b/slider/node_modules/.bin/node-which new file mode 120000 index 0000000..fc120cb --- /dev/null +++ b/slider/node_modules/.bin/node-which @@ -0,0 +1 @@ +../which/bin/node-which \ No newline at end of file diff --git a/slider/node_modules/.bin/semver b/slider/node_modules/.bin/semver new file mode 120000 index 0000000..b3c9fa7 --- /dev/null +++ b/slider/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/slider/node_modules/.bin/tsc b/slider/node_modules/.bin/tsc new file mode 120000 index 0000000..43e75c1 --- /dev/null +++ b/slider/node_modules/.bin/tsc @@ -0,0 +1 @@ +../typescript/bin/tsc \ No newline at end of file diff --git a/slider/node_modules/.bin/tsserver b/slider/node_modules/.bin/tsserver new file mode 120000 index 0000000..27fcd4a --- /dev/null +++ b/slider/node_modules/.bin/tsserver @@ -0,0 +1 @@ +../typescript/bin/tsserver \ No newline at end of file diff --git a/slider/node_modules/.package-lock.json b/slider/node_modules/.package-lock.json new file mode 100644 index 0000000..52ae2c7 --- /dev/null +++ b/slider/node_modules/.package-lock.json @@ -0,0 +1,1837 @@ +{ + "name": "slider", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", + "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "9.36.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.36.0.tgz", + "integrity": "sha512-uhCbYtYynH30iZErszX78U+nR3pJU3RHGQ57NXy5QupD4SBVwDeU8TNBy+MjMngc1UyIW9noKqsRqfjQTBU2dw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@stylistic/eslint-plugin": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.4.0.tgz", + "integrity": "sha512-UG8hdElzuBDzIbjG1QDwnYH0MQ73YLXDFHgZzB4Zh/YJfnw8XNsloVtytqzx0I2Qky9THSdpTmi8Vjn/pf/Lew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.0", + "@typescript-eslint/types": "^8.44.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "estraverse": "^5.3.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=9.0.0" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.44.1.tgz", + "integrity": "sha512-molgphGqOBT7t4YKCSkbasmu1tb1MgrZ2szGzHbclF7PNmOkSTQVHy+2jXOSnxvR3+Xe1yySHFZoqMpz3TfQsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.44.1", + "@typescript-eslint/type-utils": "8.44.1", + "@typescript-eslint/utils": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.44.1", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.44.1.tgz", + "integrity": "sha512-EHrrEsyhOhxYt8MTg4zTF+DJMuNBzWwgvvOYNj/zm1vnaD/IC5zCXFehZv94Piqa2cRFfXrTFxIvO95L7Qc/cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.44.1", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.44.1.tgz", + "integrity": "sha512-ycSa60eGg8GWAkVsKV4E6Nz33h+HjTXbsDT4FILyL8Obk5/mx4tbvCNsLf9zret3ipSumAOG89UcCs/KRaKYrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.44.1", + "@typescript-eslint/types": "^8.44.1", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.44.1.tgz", + "integrity": "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.44.1.tgz", + "integrity": "sha512-B5OyACouEjuIvof3o86lRMvyDsFwZm+4fBOqFHccIctYgBjqR3qT39FBYGN87khcgf0ExpdCBeGKpKRhSFTjKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.44.1.tgz", + "integrity": "sha512-KdEerZqHWXsRNKjF9NYswNISnFzXfXNDfPxoTh7tqohU/PRIbwTmsjGK6V9/RTYWau7NZvfo52lgVk+sJh0K3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/utils": "8.44.1", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.1.tgz", + "integrity": "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.44.1.tgz", + "integrity": "sha512-qnQJ+mVa7szevdEyvfItbO5Vo+GfZ4/GZWWDRRLjrxYPkhM+6zYB2vRYwCsoJLzqFCdZT4mEqyJoyzkunsZ96A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.44.1", + "@typescript-eslint/tsconfig-utils": "8.44.1", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.44.1.tgz", + "integrity": "sha512-DpX5Fp6edTlocMCwA+mHY8Mra+pPjRZ0TfHkXI8QFelIKcbADQz1LUPNtzOFUriBB2UYqw4Pi9+xV4w9ZczHFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.44.1", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.1.tgz", + "integrity": "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.44.1", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0", + "peer": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true, + "license": "ISC" + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.36.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.36.0.tgz", + "integrity": "sha512-hB4FIzXovouYzwzECDcUkJ4OcfOEkXTv2zRY6B9bkwjx/cprAq0uvm1nl7zvQ0/TsUk0zQiN4uPfJpB9m+rPMQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.1", + "@eslint/core": "^0.15.2", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.36.0", + "@eslint/plugin-kit": "^0.3.5", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-vue": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-10.5.0.tgz", + "integrity": "sha512-7BZHsG3kC2vei8F2W8hnfDi9RK+cv5eKPMvzBdrl8Vuc0hR5odGQRli8VVzUkrmUHkxFEm4Iio1r5HOKslO0Aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "natural-compare": "^1.4.0", + "nth-check": "^2.1.1", + "postcss-selector-parser": "^6.0.15", + "semver": "^7.6.3", + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "@stylistic/eslint-plugin": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0", + "@typescript-eslint/parser": "^7.0.0 || ^8.0.0", + "eslint": "^8.57.0 || ^9.0.0", + "vue-eslint-parser": "^10.0.0" + }, + "peerDependenciesMeta": { + "@stylistic/eslint-plugin": { + "optional": true + }, + "@typescript-eslint/parser": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.44.1.tgz", + "integrity": "sha512-0ws8uWGrUVTjEeN2OM4K1pLKHK/4NiNP/vz6ns+LjT/6sqpaYzIVFajZb1fj/IDwpsrrHb3Jy0Qm5u9CPcKaeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.44.1", + "@typescript-eslint/parser": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/utils": "8.44.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/vue-eslint-parser": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-10.2.0.tgz", + "integrity": "sha512-CydUvFOQKD928UzZhTp4pr2vWz1L+H99t7Pkln2QSPdvmURT0MoC4wUccfCnuEaihNsu9aYYyk+bep8rlfkUXw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "debug": "^4.4.0", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.6.0", + "semver": "^7.6.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/xml-name-validator": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/slider/node_modules/@eslint-community/eslint-utils/LICENSE b/slider/node_modules/@eslint-community/eslint-utils/LICENSE new file mode 100644 index 0000000..d77398f --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@eslint-community/eslint-utils/README.md b/slider/node_modules/@eslint-community/eslint-utils/README.md new file mode 100644 index 0000000..53e146a --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/README.md @@ -0,0 +1,37 @@ +# @eslint-community/eslint-utils + +[![npm version](https://img.shields.io/npm/v/@eslint-community/eslint-utils.svg)](https://www.npmjs.com/package/@eslint-community/eslint-utils) +[![Downloads/month](https://img.shields.io/npm/dm/@eslint-community/eslint-utils.svg)](http://www.npmtrends.com/@eslint-community/eslint-utils) +[![Build Status](https://github.com/eslint-community/eslint-utils/workflows/CI/badge.svg)](https://github.com/eslint-community/eslint-utils/actions) +[![Coverage Status](https://codecov.io/gh/eslint-community/eslint-utils/branch/main/graph/badge.svg)](https://codecov.io/gh/eslint-community/eslint-utils) + +## 🏁 Goal + +This package provides utility functions and classes for make ESLint custom rules. + +For examples: + +- [`getStaticValue`](https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstaticvalue) evaluates static value on AST. +- [`ReferenceTracker`](https://eslint-community.github.io/eslint-utils/api/scope-utils.html#referencetracker-class) checks the members of modules/globals as handling assignments and destructuring. + +## 📖 Usage + +See [documentation](https://eslint-community.github.io/eslint-utils). + +## 📰 Changelog + +See [releases](https://github.com/eslint-community/eslint-utils/releases). + +## ❤️ Contributing + +Welcome contributing! + +Please use GitHub's Issues/PRs. + +### Development Tools + +- `npm run test-coverage` runs tests and measures coverage. +- `npm run clean` removes the coverage result of `npm run test-coverage` command. +- `npm run coverage` shows the coverage result of the last `npm run test-coverage` command. +- `npm run lint` runs ESLint. +- `npm run watch` runs tests on each file change. diff --git a/slider/node_modules/@eslint-community/eslint-utils/index.d.mts b/slider/node_modules/@eslint-community/eslint-utils/index.d.mts new file mode 100644 index 0000000..700f72b --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/index.d.mts @@ -0,0 +1,217 @@ +import * as eslint from 'eslint'; +import { Rule, AST } from 'eslint'; +import * as estree from 'estree'; + +declare const READ: unique symbol; +declare const CALL: unique symbol; +declare const CONSTRUCT: unique symbol; +declare const ESM: unique symbol; +declare class ReferenceTracker { + constructor(globalScope: Scope$2, options?: { + mode?: "legacy" | "strict" | undefined; + globalObjectNames?: string[] | undefined; + } | undefined); + private variableStack; + private globalScope; + private mode; + private globalObjectNames; + iterateGlobalReferences(traceMap: TraceMap$2): IterableIterator>; + iterateCjsReferences(traceMap: TraceMap$2): IterableIterator>; + iterateEsmReferences(traceMap: TraceMap$2): IterableIterator>; + iteratePropertyReferences(node: Expression, traceMap: TraceMap$2): IterableIterator>; + private _iterateVariableReferences; + private _iteratePropertyReferences; + private _iterateLhsReferences; + private _iterateImportReferences; +} +declare namespace ReferenceTracker { + export { READ }; + export { CALL }; + export { CONSTRUCT }; + export { ESM }; +} +type Scope$2 = eslint.Scope.Scope; +type Expression = estree.Expression; +type TraceMap$2 = TraceMap$1; +type TrackedReferences$2 = TrackedReferences$1; + +type StaticValue$2 = StaticValueProvided$1 | StaticValueOptional$1; +type StaticValueProvided$1 = { + optional?: undefined; + value: unknown; +}; +type StaticValueOptional$1 = { + optional?: true; + value: undefined; +}; +type ReferenceTrackerOptions$1 = { + globalObjectNames?: string[]; + mode?: "legacy" | "strict"; +}; +type TraceMap$1 = { + [i: string]: TraceMapObject; +}; +type TraceMapObject = { + [i: string]: TraceMapObject; + [CALL]?: T; + [CONSTRUCT]?: T; + [READ]?: T; + [ESM]?: boolean; +}; +type TrackedReferences$1 = { + info: T; + node: Rule.Node; + path: string[]; + type: typeof CALL | typeof CONSTRUCT | typeof READ; +}; +type HasSideEffectOptions$1 = { + considerGetters?: boolean; + considerImplicitTypeConversion?: boolean; +}; +type PunctuatorToken = AST.Token & { + type: "Punctuator"; + value: Value; +}; +type ArrowToken$1 = PunctuatorToken<"=>">; +type CommaToken$1 = PunctuatorToken<",">; +type SemicolonToken$1 = PunctuatorToken<";">; +type ColonToken$1 = PunctuatorToken<":">; +type OpeningParenToken$1 = PunctuatorToken<"(">; +type ClosingParenToken$1 = PunctuatorToken<")">; +type OpeningBracketToken$1 = PunctuatorToken<"[">; +type ClosingBracketToken$1 = PunctuatorToken<"]">; +type OpeningBraceToken$1 = PunctuatorToken<"{">; +type ClosingBraceToken$1 = PunctuatorToken<"}">; + +declare function findVariable(initialScope: Scope$1, nameOrNode: string | Identifier): Variable | null; +type Scope$1 = eslint.Scope.Scope; +type Variable = eslint.Scope.Variable; +type Identifier = estree.Identifier; + +declare function getFunctionHeadLocation(node: FunctionNode$1, sourceCode: SourceCode$2): SourceLocation | null; +type SourceCode$2 = eslint.SourceCode; +type FunctionNode$1 = estree.Function; +type SourceLocation = estree.SourceLocation; + +declare function getFunctionNameWithKind(node: FunctionNode, sourceCode?: eslint.SourceCode | undefined): string; +type FunctionNode = estree.Function; + +declare function getInnermostScope(initialScope: Scope, node: Node$4): Scope; +type Scope = eslint.Scope.Scope; +type Node$4 = estree.Node; + +declare function getPropertyName(node: MemberExpression | MethodDefinition | Property | PropertyDefinition, initialScope?: eslint.Scope.Scope | undefined): string | null | undefined; +type MemberExpression = estree.MemberExpression; +type MethodDefinition = estree.MethodDefinition; +type Property = estree.Property; +type PropertyDefinition = estree.PropertyDefinition; + +declare function getStaticValue(node: Node$3, initialScope?: eslint.Scope.Scope | null | undefined): StaticValue$1 | null; +type StaticValue$1 = StaticValue$2; +type Node$3 = estree.Node; + +declare function getStringIfConstant(node: Node$2, initialScope?: eslint.Scope.Scope | null | undefined): string | null; +type Node$2 = estree.Node; + +declare function hasSideEffect(node: Node$1, sourceCode: SourceCode$1, options?: HasSideEffectOptions$1 | undefined): boolean; +type Node$1 = estree.Node; +type SourceCode$1 = eslint.SourceCode; + +declare function isArrowToken(token: CommentOrToken): token is ArrowToken$1; +declare function isCommaToken(token: CommentOrToken): token is CommaToken$1; +declare function isSemicolonToken(token: CommentOrToken): token is SemicolonToken$1; +declare function isColonToken(token: CommentOrToken): token is ColonToken$1; +declare function isOpeningParenToken(token: CommentOrToken): token is OpeningParenToken$1; +declare function isClosingParenToken(token: CommentOrToken): token is ClosingParenToken$1; +declare function isOpeningBracketToken(token: CommentOrToken): token is OpeningBracketToken$1; +declare function isClosingBracketToken(token: CommentOrToken): token is ClosingBracketToken$1; +declare function isOpeningBraceToken(token: CommentOrToken): token is OpeningBraceToken$1; +declare function isClosingBraceToken(token: CommentOrToken): token is ClosingBraceToken$1; +declare function isCommentToken(token: CommentOrToken): token is estree.Comment; +declare function isNotArrowToken(arg0: CommentOrToken): boolean; +declare function isNotCommaToken(arg0: CommentOrToken): boolean; +declare function isNotSemicolonToken(arg0: CommentOrToken): boolean; +declare function isNotColonToken(arg0: CommentOrToken): boolean; +declare function isNotOpeningParenToken(arg0: CommentOrToken): boolean; +declare function isNotClosingParenToken(arg0: CommentOrToken): boolean; +declare function isNotOpeningBracketToken(arg0: CommentOrToken): boolean; +declare function isNotClosingBracketToken(arg0: CommentOrToken): boolean; +declare function isNotOpeningBraceToken(arg0: CommentOrToken): boolean; +declare function isNotClosingBraceToken(arg0: CommentOrToken): boolean; +declare function isNotCommentToken(arg0: CommentOrToken): boolean; +type Token = eslint.AST.Token; +type Comment = estree.Comment; +type CommentOrToken = Comment | Token; + +declare function isParenthesized(timesOrNode: Node | number, nodeOrSourceCode: Node | SourceCode, optionalSourceCode?: eslint.SourceCode | undefined): boolean; +type Node = estree.Node; +type SourceCode = eslint.SourceCode; + +declare class PatternMatcher { + constructor(pattern: RegExp, options?: { + escaped?: boolean | undefined; + } | undefined); + execAll(str: string): IterableIterator; + test(str: string): boolean; + [Symbol.replace](str: string, replacer: string | ((...strs: string[]) => string)): string; +} + +declare namespace _default { + export { CALL }; + export { CONSTRUCT }; + export { ESM }; + export { findVariable }; + export { getFunctionHeadLocation }; + export { getFunctionNameWithKind }; + export { getInnermostScope }; + export { getPropertyName }; + export { getStaticValue }; + export { getStringIfConstant }; + export { hasSideEffect }; + export { isArrowToken }; + export { isClosingBraceToken }; + export { isClosingBracketToken }; + export { isClosingParenToken }; + export { isColonToken }; + export { isCommaToken }; + export { isCommentToken }; + export { isNotArrowToken }; + export { isNotClosingBraceToken }; + export { isNotClosingBracketToken }; + export { isNotClosingParenToken }; + export { isNotColonToken }; + export { isNotCommaToken }; + export { isNotCommentToken }; + export { isNotOpeningBraceToken }; + export { isNotOpeningBracketToken }; + export { isNotOpeningParenToken }; + export { isNotSemicolonToken }; + export { isOpeningBraceToken }; + export { isOpeningBracketToken }; + export { isOpeningParenToken }; + export { isParenthesized }; + export { isSemicolonToken }; + export { PatternMatcher }; + export { READ }; + export { ReferenceTracker }; +} + +type StaticValue = StaticValue$2; +type StaticValueOptional = StaticValueOptional$1; +type StaticValueProvided = StaticValueProvided$1; +type ReferenceTrackerOptions = ReferenceTrackerOptions$1; +type TraceMap = TraceMap$1; +type TrackedReferences = TrackedReferences$1; +type HasSideEffectOptions = HasSideEffectOptions$1; +type ArrowToken = ArrowToken$1; +type CommaToken = CommaToken$1; +type SemicolonToken = SemicolonToken$1; +type ColonToken = ColonToken$1; +type OpeningParenToken = OpeningParenToken$1; +type ClosingParenToken = ClosingParenToken$1; +type OpeningBracketToken = OpeningBracketToken$1; +type ClosingBracketToken = ClosingBracketToken$1; +type OpeningBraceToken = OpeningBraceToken$1; +type ClosingBraceToken = ClosingBraceToken$1; + +export { ArrowToken, CALL, CONSTRUCT, ClosingBraceToken, ClosingBracketToken, ClosingParenToken, ColonToken, CommaToken, ESM, HasSideEffectOptions, OpeningBraceToken, OpeningBracketToken, OpeningParenToken, PatternMatcher, READ, ReferenceTracker, ReferenceTrackerOptions, SemicolonToken, StaticValue, StaticValueOptional, StaticValueProvided, TraceMap, TrackedReferences, _default as default, findVariable, getFunctionHeadLocation, getFunctionNameWithKind, getInnermostScope, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isParenthesized, isSemicolonToken }; diff --git a/slider/node_modules/@eslint-community/eslint-utils/index.d.ts b/slider/node_modules/@eslint-community/eslint-utils/index.d.ts new file mode 100644 index 0000000..700f72b --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/index.d.ts @@ -0,0 +1,217 @@ +import * as eslint from 'eslint'; +import { Rule, AST } from 'eslint'; +import * as estree from 'estree'; + +declare const READ: unique symbol; +declare const CALL: unique symbol; +declare const CONSTRUCT: unique symbol; +declare const ESM: unique symbol; +declare class ReferenceTracker { + constructor(globalScope: Scope$2, options?: { + mode?: "legacy" | "strict" | undefined; + globalObjectNames?: string[] | undefined; + } | undefined); + private variableStack; + private globalScope; + private mode; + private globalObjectNames; + iterateGlobalReferences(traceMap: TraceMap$2): IterableIterator>; + iterateCjsReferences(traceMap: TraceMap$2): IterableIterator>; + iterateEsmReferences(traceMap: TraceMap$2): IterableIterator>; + iteratePropertyReferences(node: Expression, traceMap: TraceMap$2): IterableIterator>; + private _iterateVariableReferences; + private _iteratePropertyReferences; + private _iterateLhsReferences; + private _iterateImportReferences; +} +declare namespace ReferenceTracker { + export { READ }; + export { CALL }; + export { CONSTRUCT }; + export { ESM }; +} +type Scope$2 = eslint.Scope.Scope; +type Expression = estree.Expression; +type TraceMap$2 = TraceMap$1; +type TrackedReferences$2 = TrackedReferences$1; + +type StaticValue$2 = StaticValueProvided$1 | StaticValueOptional$1; +type StaticValueProvided$1 = { + optional?: undefined; + value: unknown; +}; +type StaticValueOptional$1 = { + optional?: true; + value: undefined; +}; +type ReferenceTrackerOptions$1 = { + globalObjectNames?: string[]; + mode?: "legacy" | "strict"; +}; +type TraceMap$1 = { + [i: string]: TraceMapObject; +}; +type TraceMapObject = { + [i: string]: TraceMapObject; + [CALL]?: T; + [CONSTRUCT]?: T; + [READ]?: T; + [ESM]?: boolean; +}; +type TrackedReferences$1 = { + info: T; + node: Rule.Node; + path: string[]; + type: typeof CALL | typeof CONSTRUCT | typeof READ; +}; +type HasSideEffectOptions$1 = { + considerGetters?: boolean; + considerImplicitTypeConversion?: boolean; +}; +type PunctuatorToken = AST.Token & { + type: "Punctuator"; + value: Value; +}; +type ArrowToken$1 = PunctuatorToken<"=>">; +type CommaToken$1 = PunctuatorToken<",">; +type SemicolonToken$1 = PunctuatorToken<";">; +type ColonToken$1 = PunctuatorToken<":">; +type OpeningParenToken$1 = PunctuatorToken<"(">; +type ClosingParenToken$1 = PunctuatorToken<")">; +type OpeningBracketToken$1 = PunctuatorToken<"[">; +type ClosingBracketToken$1 = PunctuatorToken<"]">; +type OpeningBraceToken$1 = PunctuatorToken<"{">; +type ClosingBraceToken$1 = PunctuatorToken<"}">; + +declare function findVariable(initialScope: Scope$1, nameOrNode: string | Identifier): Variable | null; +type Scope$1 = eslint.Scope.Scope; +type Variable = eslint.Scope.Variable; +type Identifier = estree.Identifier; + +declare function getFunctionHeadLocation(node: FunctionNode$1, sourceCode: SourceCode$2): SourceLocation | null; +type SourceCode$2 = eslint.SourceCode; +type FunctionNode$1 = estree.Function; +type SourceLocation = estree.SourceLocation; + +declare function getFunctionNameWithKind(node: FunctionNode, sourceCode?: eslint.SourceCode | undefined): string; +type FunctionNode = estree.Function; + +declare function getInnermostScope(initialScope: Scope, node: Node$4): Scope; +type Scope = eslint.Scope.Scope; +type Node$4 = estree.Node; + +declare function getPropertyName(node: MemberExpression | MethodDefinition | Property | PropertyDefinition, initialScope?: eslint.Scope.Scope | undefined): string | null | undefined; +type MemberExpression = estree.MemberExpression; +type MethodDefinition = estree.MethodDefinition; +type Property = estree.Property; +type PropertyDefinition = estree.PropertyDefinition; + +declare function getStaticValue(node: Node$3, initialScope?: eslint.Scope.Scope | null | undefined): StaticValue$1 | null; +type StaticValue$1 = StaticValue$2; +type Node$3 = estree.Node; + +declare function getStringIfConstant(node: Node$2, initialScope?: eslint.Scope.Scope | null | undefined): string | null; +type Node$2 = estree.Node; + +declare function hasSideEffect(node: Node$1, sourceCode: SourceCode$1, options?: HasSideEffectOptions$1 | undefined): boolean; +type Node$1 = estree.Node; +type SourceCode$1 = eslint.SourceCode; + +declare function isArrowToken(token: CommentOrToken): token is ArrowToken$1; +declare function isCommaToken(token: CommentOrToken): token is CommaToken$1; +declare function isSemicolonToken(token: CommentOrToken): token is SemicolonToken$1; +declare function isColonToken(token: CommentOrToken): token is ColonToken$1; +declare function isOpeningParenToken(token: CommentOrToken): token is OpeningParenToken$1; +declare function isClosingParenToken(token: CommentOrToken): token is ClosingParenToken$1; +declare function isOpeningBracketToken(token: CommentOrToken): token is OpeningBracketToken$1; +declare function isClosingBracketToken(token: CommentOrToken): token is ClosingBracketToken$1; +declare function isOpeningBraceToken(token: CommentOrToken): token is OpeningBraceToken$1; +declare function isClosingBraceToken(token: CommentOrToken): token is ClosingBraceToken$1; +declare function isCommentToken(token: CommentOrToken): token is estree.Comment; +declare function isNotArrowToken(arg0: CommentOrToken): boolean; +declare function isNotCommaToken(arg0: CommentOrToken): boolean; +declare function isNotSemicolonToken(arg0: CommentOrToken): boolean; +declare function isNotColonToken(arg0: CommentOrToken): boolean; +declare function isNotOpeningParenToken(arg0: CommentOrToken): boolean; +declare function isNotClosingParenToken(arg0: CommentOrToken): boolean; +declare function isNotOpeningBracketToken(arg0: CommentOrToken): boolean; +declare function isNotClosingBracketToken(arg0: CommentOrToken): boolean; +declare function isNotOpeningBraceToken(arg0: CommentOrToken): boolean; +declare function isNotClosingBraceToken(arg0: CommentOrToken): boolean; +declare function isNotCommentToken(arg0: CommentOrToken): boolean; +type Token = eslint.AST.Token; +type Comment = estree.Comment; +type CommentOrToken = Comment | Token; + +declare function isParenthesized(timesOrNode: Node | number, nodeOrSourceCode: Node | SourceCode, optionalSourceCode?: eslint.SourceCode | undefined): boolean; +type Node = estree.Node; +type SourceCode = eslint.SourceCode; + +declare class PatternMatcher { + constructor(pattern: RegExp, options?: { + escaped?: boolean | undefined; + } | undefined); + execAll(str: string): IterableIterator; + test(str: string): boolean; + [Symbol.replace](str: string, replacer: string | ((...strs: string[]) => string)): string; +} + +declare namespace _default { + export { CALL }; + export { CONSTRUCT }; + export { ESM }; + export { findVariable }; + export { getFunctionHeadLocation }; + export { getFunctionNameWithKind }; + export { getInnermostScope }; + export { getPropertyName }; + export { getStaticValue }; + export { getStringIfConstant }; + export { hasSideEffect }; + export { isArrowToken }; + export { isClosingBraceToken }; + export { isClosingBracketToken }; + export { isClosingParenToken }; + export { isColonToken }; + export { isCommaToken }; + export { isCommentToken }; + export { isNotArrowToken }; + export { isNotClosingBraceToken }; + export { isNotClosingBracketToken }; + export { isNotClosingParenToken }; + export { isNotColonToken }; + export { isNotCommaToken }; + export { isNotCommentToken }; + export { isNotOpeningBraceToken }; + export { isNotOpeningBracketToken }; + export { isNotOpeningParenToken }; + export { isNotSemicolonToken }; + export { isOpeningBraceToken }; + export { isOpeningBracketToken }; + export { isOpeningParenToken }; + export { isParenthesized }; + export { isSemicolonToken }; + export { PatternMatcher }; + export { READ }; + export { ReferenceTracker }; +} + +type StaticValue = StaticValue$2; +type StaticValueOptional = StaticValueOptional$1; +type StaticValueProvided = StaticValueProvided$1; +type ReferenceTrackerOptions = ReferenceTrackerOptions$1; +type TraceMap = TraceMap$1; +type TrackedReferences = TrackedReferences$1; +type HasSideEffectOptions = HasSideEffectOptions$1; +type ArrowToken = ArrowToken$1; +type CommaToken = CommaToken$1; +type SemicolonToken = SemicolonToken$1; +type ColonToken = ColonToken$1; +type OpeningParenToken = OpeningParenToken$1; +type ClosingParenToken = ClosingParenToken$1; +type OpeningBracketToken = OpeningBracketToken$1; +type ClosingBracketToken = ClosingBracketToken$1; +type OpeningBraceToken = OpeningBraceToken$1; +type ClosingBraceToken = ClosingBraceToken$1; + +export { ArrowToken, CALL, CONSTRUCT, ClosingBraceToken, ClosingBracketToken, ClosingParenToken, ColonToken, CommaToken, ESM, HasSideEffectOptions, OpeningBraceToken, OpeningBracketToken, OpeningParenToken, PatternMatcher, READ, ReferenceTracker, ReferenceTrackerOptions, SemicolonToken, StaticValue, StaticValueOptional, StaticValueProvided, TraceMap, TrackedReferences, _default as default, findVariable, getFunctionHeadLocation, getFunctionNameWithKind, getInnermostScope, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isParenthesized, isSemicolonToken }; diff --git a/slider/node_modules/@eslint-community/eslint-utils/index.js b/slider/node_modules/@eslint-community/eslint-utils/index.js new file mode 100644 index 0000000..f8e27af --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/index.js @@ -0,0 +1,2607 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var eslintVisitorKeys = require('eslint-visitor-keys'); + +/** @typedef {import("eslint").Scope.Scope} Scope */ +/** @typedef {import("estree").Node} Node */ + +/** + * Get the innermost scope which contains a given location. + * @param {Scope} initialScope The initial scope to search. + * @param {Node} node The location to search. + * @returns {Scope} The innermost scope. + */ +function getInnermostScope(initialScope, node) { + const location = /** @type {[number, number]} */ (node.range)[0]; + + let scope = initialScope; + let found = false; + do { + found = false; + for (const childScope of scope.childScopes) { + const range = /** @type {[number, number]} */ ( + childScope.block.range + ); + + if (range[0] <= location && location < range[1]) { + scope = childScope; + found = true; + break + } + } + } while (found) + + return scope +} + +/** @typedef {import("eslint").Scope.Scope} Scope */ +/** @typedef {import("eslint").Scope.Variable} Variable */ +/** @typedef {import("estree").Identifier} Identifier */ + +/** + * Find the variable of a given name. + * @param {Scope} initialScope The scope to start finding. + * @param {string|Identifier} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node. + * @returns {Variable|null} The found variable or null. + */ +function findVariable(initialScope, nameOrNode) { + let name = ""; + /** @type {Scope|null} */ + let scope = initialScope; + + if (typeof nameOrNode === "string") { + name = nameOrNode; + } else { + name = nameOrNode.name; + scope = getInnermostScope(scope, nameOrNode); + } + + while (scope != null) { + const variable = scope.set.get(name); + if (variable != null) { + return variable + } + scope = scope.upper; + } + + return null +} + +/** @typedef {import("eslint").AST.Token} Token */ +/** @typedef {import("estree").Comment} Comment */ +/** @typedef {import("./types.mjs").ArrowToken} ArrowToken */ +/** @typedef {import("./types.mjs").CommaToken} CommaToken */ +/** @typedef {import("./types.mjs").SemicolonToken} SemicolonToken */ +/** @typedef {import("./types.mjs").ColonToken} ColonToken */ +/** @typedef {import("./types.mjs").OpeningParenToken} OpeningParenToken */ +/** @typedef {import("./types.mjs").ClosingParenToken} ClosingParenToken */ +/** @typedef {import("./types.mjs").OpeningBracketToken} OpeningBracketToken */ +/** @typedef {import("./types.mjs").ClosingBracketToken} ClosingBracketToken */ +/** @typedef {import("./types.mjs").OpeningBraceToken} OpeningBraceToken */ +/** @typedef {import("./types.mjs").ClosingBraceToken} ClosingBraceToken */ +/** + * @template {string} Value + * @typedef {import("./types.mjs").PunctuatorToken} PunctuatorToken + */ + +/** @typedef {Comment | Token} CommentOrToken */ + +/** + * Creates the negate function of the given function. + * @param {function(CommentOrToken):boolean} f - The function to negate. + * @returns {function(CommentOrToken):boolean} Negated function. + */ +function negate(f) { + return (token) => !f(token) +} + +/** + * Checks if the given token is a PunctuatorToken with the given value + * @template {string} Value + * @param {CommentOrToken} token - The token to check. + * @param {Value} value - The value to check. + * @returns {token is PunctuatorToken} `true` if the token is a PunctuatorToken with the given value. + */ +function isPunctuatorTokenWithValue(token, value) { + return token.type === "Punctuator" && token.value === value +} + +/** + * Checks if the given token is an arrow token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is ArrowToken} `true` if the token is an arrow token. + */ +function isArrowToken(token) { + return isPunctuatorTokenWithValue(token, "=>") +} + +/** + * Checks if the given token is a comma token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is CommaToken} `true` if the token is a comma token. + */ +function isCommaToken(token) { + return isPunctuatorTokenWithValue(token, ",") +} + +/** + * Checks if the given token is a semicolon token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is SemicolonToken} `true` if the token is a semicolon token. + */ +function isSemicolonToken(token) { + return isPunctuatorTokenWithValue(token, ";") +} + +/** + * Checks if the given token is a colon token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is ColonToken} `true` if the token is a colon token. + */ +function isColonToken(token) { + return isPunctuatorTokenWithValue(token, ":") +} + +/** + * Checks if the given token is an opening parenthesis token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is OpeningParenToken} `true` if the token is an opening parenthesis token. + */ +function isOpeningParenToken(token) { + return isPunctuatorTokenWithValue(token, "(") +} + +/** + * Checks if the given token is a closing parenthesis token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is ClosingParenToken} `true` if the token is a closing parenthesis token. + */ +function isClosingParenToken(token) { + return isPunctuatorTokenWithValue(token, ")") +} + +/** + * Checks if the given token is an opening square bracket token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is OpeningBracketToken} `true` if the token is an opening square bracket token. + */ +function isOpeningBracketToken(token) { + return isPunctuatorTokenWithValue(token, "[") +} + +/** + * Checks if the given token is a closing square bracket token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is ClosingBracketToken} `true` if the token is a closing square bracket token. + */ +function isClosingBracketToken(token) { + return isPunctuatorTokenWithValue(token, "]") +} + +/** + * Checks if the given token is an opening brace token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is OpeningBraceToken} `true` if the token is an opening brace token. + */ +function isOpeningBraceToken(token) { + return isPunctuatorTokenWithValue(token, "{") +} + +/** + * Checks if the given token is a closing brace token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is ClosingBraceToken} `true` if the token is a closing brace token. + */ +function isClosingBraceToken(token) { + return isPunctuatorTokenWithValue(token, "}") +} + +/** + * Checks if the given token is a comment token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is Comment} `true` if the token is a comment token. + */ +function isCommentToken(token) { + return ["Block", "Line", "Shebang"].includes(token.type) +} + +const isNotArrowToken = negate(isArrowToken); +const isNotCommaToken = negate(isCommaToken); +const isNotSemicolonToken = negate(isSemicolonToken); +const isNotColonToken = negate(isColonToken); +const isNotOpeningParenToken = negate(isOpeningParenToken); +const isNotClosingParenToken = negate(isClosingParenToken); +const isNotOpeningBracketToken = negate(isOpeningBracketToken); +const isNotClosingBracketToken = negate(isClosingBracketToken); +const isNotOpeningBraceToken = negate(isOpeningBraceToken); +const isNotClosingBraceToken = negate(isClosingBraceToken); +const isNotCommentToken = negate(isCommentToken); + +/** @typedef {import("eslint").Rule.Node} RuleNode */ +/** @typedef {import("eslint").SourceCode} SourceCode */ +/** @typedef {import("eslint").AST.Token} Token */ +/** @typedef {import("estree").Function} FunctionNode */ +/** @typedef {import("estree").FunctionDeclaration} FunctionDeclaration */ +/** @typedef {import("estree").FunctionExpression} FunctionExpression */ +/** @typedef {import("estree").SourceLocation} SourceLocation */ +/** @typedef {import("estree").Position} Position */ + +/** + * Get the `(` token of the given function node. + * @param {FunctionExpression | FunctionDeclaration} node - The function node to get. + * @param {SourceCode} sourceCode - The source code object to get tokens. + * @returns {Token} `(` token. + */ +function getOpeningParenOfParams(node, sourceCode) { + return node.id + ? /** @type {Token} */ ( + sourceCode.getTokenAfter(node.id, isOpeningParenToken) + ) + : /** @type {Token} */ ( + sourceCode.getFirstToken(node, isOpeningParenToken) + ) +} + +/** + * Get the location of the given function node for reporting. + * @param {FunctionNode} node - The function node to get. + * @param {SourceCode} sourceCode - The source code object to get tokens. + * @returns {SourceLocation|null} The location of the function node for reporting. + */ +function getFunctionHeadLocation(node, sourceCode) { + const parent = /** @type {RuleNode} */ (node).parent; + + /** @type {Position|null} */ + let start = null; + /** @type {Position|null} */ + let end = null; + + if (node.type === "ArrowFunctionExpression") { + const arrowToken = /** @type {Token} */ ( + sourceCode.getTokenBefore(node.body, isArrowToken) + ); + + start = arrowToken.loc.start; + end = arrowToken.loc.end; + } else if ( + parent.type === "Property" || + parent.type === "MethodDefinition" || + parent.type === "PropertyDefinition" + ) { + start = /** @type {SourceLocation} */ (parent.loc).start; + end = getOpeningParenOfParams(node, sourceCode).loc.start; + } else { + start = /** @type {SourceLocation} */ (node.loc).start; + end = getOpeningParenOfParams(node, sourceCode).loc.start; + } + + return { + start: { ...start }, + end: { ...end }, + } +} + +/* globals globalThis, global, self, window */ +/** @typedef {import("./types.mjs").StaticValue} StaticValue */ +/** @typedef {import("eslint").Scope.Scope} Scope */ +/** @typedef {import("eslint").Scope.Variable} Variable */ +/** @typedef {import("estree").Node} Node */ +/** @typedef {import("@typescript-eslint/types").TSESTree.Node} TSESTreeNode */ +/** @typedef {import("@typescript-eslint/types").TSESTree.AST_NODE_TYPES} TSESTreeNodeTypes */ +/** @typedef {import("@typescript-eslint/types").TSESTree.MemberExpression} MemberExpression */ +/** @typedef {import("@typescript-eslint/types").TSESTree.Property} Property */ +/** @typedef {import("@typescript-eslint/types").TSESTree.RegExpLiteral} RegExpLiteral */ +/** @typedef {import("@typescript-eslint/types").TSESTree.BigIntLiteral} BigIntLiteral */ +/** @typedef {import("@typescript-eslint/types").TSESTree.Literal} Literal */ + +const globalObject = + typeof globalThis !== "undefined" + ? globalThis + : // @ts-ignore + typeof self !== "undefined" + ? // @ts-ignore + self + : // @ts-ignore + typeof window !== "undefined" + ? // @ts-ignore + window + : typeof global !== "undefined" + ? global + : {}; + +const builtinNames = Object.freeze( + new Set([ + "Array", + "ArrayBuffer", + "BigInt", + "BigInt64Array", + "BigUint64Array", + "Boolean", + "DataView", + "Date", + "decodeURI", + "decodeURIComponent", + "encodeURI", + "encodeURIComponent", + "escape", + "Float32Array", + "Float64Array", + "Function", + "Infinity", + "Int16Array", + "Int32Array", + "Int8Array", + "isFinite", + "isNaN", + "isPrototypeOf", + "JSON", + "Map", + "Math", + "NaN", + "Number", + "Object", + "parseFloat", + "parseInt", + "Promise", + "Proxy", + "Reflect", + "RegExp", + "Set", + "String", + "Symbol", + "Uint16Array", + "Uint32Array", + "Uint8Array", + "Uint8ClampedArray", + "undefined", + "unescape", + "WeakMap", + "WeakSet", + ]), +); +const callAllowed = new Set( + [ + Array.isArray, + Array.of, + Array.prototype.at, + Array.prototype.concat, + Array.prototype.entries, + Array.prototype.every, + Array.prototype.filter, + Array.prototype.find, + Array.prototype.findIndex, + Array.prototype.flat, + Array.prototype.includes, + Array.prototype.indexOf, + Array.prototype.join, + Array.prototype.keys, + Array.prototype.lastIndexOf, + Array.prototype.slice, + Array.prototype.some, + Array.prototype.toString, + Array.prototype.values, + typeof BigInt === "function" ? BigInt : undefined, + Boolean, + Date, + Date.parse, + decodeURI, + decodeURIComponent, + encodeURI, + encodeURIComponent, + escape, + isFinite, + isNaN, + // @ts-ignore + isPrototypeOf, + Map, + Map.prototype.entries, + Map.prototype.get, + Map.prototype.has, + Map.prototype.keys, + Map.prototype.values, + .../** @type {(keyof typeof Math)[]} */ ( + Object.getOwnPropertyNames(Math) + ) + .filter((k) => k !== "random") + .map((k) => Math[k]) + .filter((f) => typeof f === "function"), + Number, + Number.isFinite, + Number.isNaN, + Number.parseFloat, + Number.parseInt, + Number.prototype.toExponential, + Number.prototype.toFixed, + Number.prototype.toPrecision, + Number.prototype.toString, + Object, + Object.entries, + Object.is, + Object.isExtensible, + Object.isFrozen, + Object.isSealed, + Object.keys, + Object.values, + parseFloat, + parseInt, + RegExp, + Set, + Set.prototype.entries, + Set.prototype.has, + Set.prototype.keys, + Set.prototype.values, + String, + String.fromCharCode, + String.fromCodePoint, + String.raw, + String.prototype.at, + String.prototype.charAt, + String.prototype.charCodeAt, + String.prototype.codePointAt, + String.prototype.concat, + String.prototype.endsWith, + String.prototype.includes, + String.prototype.indexOf, + String.prototype.lastIndexOf, + String.prototype.normalize, + String.prototype.padEnd, + String.prototype.padStart, + String.prototype.slice, + String.prototype.startsWith, + String.prototype.substr, + String.prototype.substring, + String.prototype.toLowerCase, + String.prototype.toString, + String.prototype.toUpperCase, + String.prototype.trim, + String.prototype.trimEnd, + String.prototype.trimLeft, + String.prototype.trimRight, + String.prototype.trimStart, + Symbol.for, + Symbol.keyFor, + unescape, + ].filter((f) => typeof f === "function"), +); +const callPassThrough = new Set([ + Object.freeze, + Object.preventExtensions, + Object.seal, +]); + +/** @type {ReadonlyArray]>} */ +const getterAllowed = [ + [Map, new Set(["size"])], + [ + RegExp, + new Set([ + "dotAll", + "flags", + "global", + "hasIndices", + "ignoreCase", + "multiline", + "source", + "sticky", + "unicode", + ]), + ], + [Set, new Set(["size"])], +]; + +/** + * Get the property descriptor. + * @param {object} object The object to get. + * @param {string|number|symbol} name The property name to get. + */ +function getPropertyDescriptor(object, name) { + let x = object; + while ((typeof x === "object" || typeof x === "function") && x !== null) { + const d = Object.getOwnPropertyDescriptor(x, name); + if (d) { + return d + } + x = Object.getPrototypeOf(x); + } + return null +} + +/** + * Check if a property is getter or not. + * @param {object} object The object to check. + * @param {string|number|symbol} name The property name to check. + */ +function isGetter(object, name) { + const d = getPropertyDescriptor(object, name); + return d != null && d.get != null +} + +/** + * Get the element values of a given node list. + * @param {(Node|TSESTreeNode|null)[]} nodeList The node list to get values. + * @param {Scope|undefined|null} initialScope The initial scope to find variables. + * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null. + */ +function getElementValues(nodeList, initialScope) { + const valueList = []; + + for (let i = 0; i < nodeList.length; ++i) { + const elementNode = nodeList[i]; + + if (elementNode == null) { + valueList.length = i + 1; + } else if (elementNode.type === "SpreadElement") { + const argument = getStaticValueR(elementNode.argument, initialScope); + if (argument == null) { + return null + } + valueList.push(.../** @type {Iterable} */ (argument.value)); + } else { + const element = getStaticValueR(elementNode, initialScope); + if (element == null) { + return null + } + valueList.push(element.value); + } + } + + return valueList +} + +/** + * Checks if a variable is a built-in global. + * @param {Variable|null} variable The variable to check. + * @returns {variable is Variable & {defs:[]}} + */ +function isBuiltinGlobal(variable) { + return ( + variable != null && + variable.defs.length === 0 && + builtinNames.has(variable.name) && + variable.name in globalObject + ) +} + +/** + * Checks if a variable can be considered as a constant. + * @param {Variable} variable + * @returns {variable is Variable & {defs: [import("eslint").Scope.Definition & { type: "Variable" }]}} True if the variable can be considered as a constant. + */ +function canBeConsideredConst(variable) { + if (variable.defs.length !== 1) { + return false + } + const def = variable.defs[0]; + return Boolean( + def.parent && + def.type === "Variable" && + (def.parent.kind === "const" || isEffectivelyConst(variable)), + ) +} + +/** + * Returns whether the given variable is never written to after initialization. + * @param {Variable} variable + * @returns {boolean} + */ +function isEffectivelyConst(variable) { + const refs = variable.references; + + const inits = refs.filter((r) => r.init).length; + const reads = refs.filter((r) => r.isReadOnly()).length; + if (inits === 1 && reads + inits === refs.length) { + // there is only one init and all other references only read + return true + } + return false +} + +/** + * Checks if a variable has mutation in its property. + * @param {Variable} variable The variable to check. + * @param {Scope|null} initialScope The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it. + * @returns {boolean} True if the variable has mutation in its property. + */ +function hasMutationInProperty(variable, initialScope) { + for (const ref of variable.references) { + let node = /** @type {TSESTreeNode} */ (ref.identifier); + while (node && node.parent && node.parent.type === "MemberExpression") { + node = node.parent; + } + if (!node || !node.parent) { + continue + } + if ( + (node.parent.type === "AssignmentExpression" && + node.parent.left === node) || + (node.parent.type === "UpdateExpression" && + node.parent.argument === node) + ) { + // This is a mutation. + return true + } + if ( + node.parent.type === "CallExpression" && + node.parent.callee === node && + node.type === "MemberExpression" + ) { + const methodName = getStaticPropertyNameValue(node, initialScope); + if (isNameOfMutationArrayMethod(methodName)) { + // This is a mutation. + return true + } + } + } + return false + + /** + * Checks if a method name is one of the mutation array methods. + * @param {StaticValue|null} methodName The method name to check. + * @returns {boolean} True if the method name is a mutation array method. + */ + function isNameOfMutationArrayMethod(methodName) { + if (methodName == null || methodName.value == null) { + return false + } + const name = methodName.value; + return ( + name === "copyWithin" || + name === "fill" || + name === "pop" || + name === "push" || + name === "reverse" || + name === "shift" || + name === "sort" || + name === "splice" || + name === "unshift" + ) + } +} + +/** + * @template {TSESTreeNodeTypes} T + * @callback VisitorCallback + * @param {TSESTreeNode & { type: T }} node + * @param {Scope|undefined|null} initialScope + * @returns {StaticValue | null} + */ +/** + * @typedef { { [K in TSESTreeNodeTypes]?: VisitorCallback } } Operations + */ +/** + * @type {Operations} + */ +const operations = Object.freeze({ + ArrayExpression(node, initialScope) { + const elements = getElementValues(node.elements, initialScope); + return elements != null ? { value: elements } : null + }, + + AssignmentExpression(node, initialScope) { + if (node.operator === "=") { + return getStaticValueR(node.right, initialScope) + } + return null + }, + + //eslint-disable-next-line complexity + BinaryExpression(node, initialScope) { + if (node.operator === "in" || node.operator === "instanceof") { + // Not supported. + return null + } + + const left = getStaticValueR(node.left, initialScope); + const right = getStaticValueR(node.right, initialScope); + if (left != null && right != null) { + switch (node.operator) { + case "==": + return { value: left.value == right.value } //eslint-disable-line eqeqeq + case "!=": + return { value: left.value != right.value } //eslint-disable-line eqeqeq + case "===": + return { value: left.value === right.value } + case "!==": + return { value: left.value !== right.value } + case "<": + return { + value: + /** @type {any} */ (left.value) < + /** @type {any} */ (right.value), + } + case "<=": + return { + value: + /** @type {any} */ (left.value) <= + /** @type {any} */ (right.value), + } + case ">": + return { + value: + /** @type {any} */ (left.value) > + /** @type {any} */ (right.value), + } + case ">=": + return { + value: + /** @type {any} */ (left.value) >= + /** @type {any} */ (right.value), + } + case "<<": + return { + value: + /** @type {any} */ (left.value) << + /** @type {any} */ (right.value), + } + case ">>": + return { + value: + /** @type {any} */ (left.value) >> + /** @type {any} */ (right.value), + } + case ">>>": + return { + value: + /** @type {any} */ (left.value) >>> + /** @type {any} */ (right.value), + } + case "+": + return { + value: + /** @type {any} */ (left.value) + + /** @type {any} */ (right.value), + } + case "-": + return { + value: + /** @type {any} */ (left.value) - + /** @type {any} */ (right.value), + } + case "*": + return { + value: + /** @type {any} */ (left.value) * + /** @type {any} */ (right.value), + } + case "/": + return { + value: + /** @type {any} */ (left.value) / + /** @type {any} */ (right.value), + } + case "%": + return { + value: + /** @type {any} */ (left.value) % + /** @type {any} */ (right.value), + } + case "**": + return { + value: + /** @type {any} */ (left.value) ** + /** @type {any} */ (right.value), + } + case "|": + return { + value: + /** @type {any} */ (left.value) | + /** @type {any} */ (right.value), + } + case "^": + return { + value: + /** @type {any} */ (left.value) ^ + /** @type {any} */ (right.value), + } + case "&": + return { + value: + /** @type {any} */ (left.value) & + /** @type {any} */ (right.value), + } + + // no default + } + } + + return null + }, + + CallExpression(node, initialScope) { + const calleeNode = node.callee; + const args = getElementValues(node.arguments, initialScope); + + if (args != null) { + if (calleeNode.type === "MemberExpression") { + if (calleeNode.property.type === "PrivateIdentifier") { + return null + } + const object = getStaticValueR(calleeNode.object, initialScope); + if (object != null) { + if ( + object.value == null && + (object.optional || node.optional) + ) { + return { value: undefined, optional: true } + } + const property = getStaticPropertyNameValue( + calleeNode, + initialScope, + ); + + if (property != null) { + const receiver = + /** @type {Record any>} */ ( + object.value + ); + const methodName = /** @type {PropertyKey} */ ( + property.value + ); + if (callAllowed.has(receiver[methodName])) { + return { + value: receiver[methodName](...args), + } + } + if (callPassThrough.has(receiver[methodName])) { + return { value: args[0] } + } + } + } + } else { + const callee = getStaticValueR(calleeNode, initialScope); + if (callee != null) { + if (callee.value == null && node.optional) { + return { value: undefined, optional: true } + } + const func = /** @type {(...args: any[]) => any} */ ( + callee.value + ); + if (callAllowed.has(func)) { + return { value: func(...args) } + } + if (callPassThrough.has(func)) { + return { value: args[0] } + } + } + } + } + + return null + }, + + ConditionalExpression(node, initialScope) { + const test = getStaticValueR(node.test, initialScope); + if (test != null) { + return test.value + ? getStaticValueR(node.consequent, initialScope) + : getStaticValueR(node.alternate, initialScope) + } + return null + }, + + ExpressionStatement(node, initialScope) { + return getStaticValueR(node.expression, initialScope) + }, + + Identifier(node, initialScope) { + if (initialScope != null) { + const variable = findVariable(initialScope, node); + + if (variable != null) { + // Built-in globals. + if (isBuiltinGlobal(variable)) { + return { value: globalObject[variable.name] } + } + + // Constants. + if (canBeConsideredConst(variable)) { + const def = variable.defs[0]; + if ( + // TODO(mysticatea): don't support destructuring here. + def.node.id.type === "Identifier" + ) { + const init = getStaticValueR( + def.node.init, + initialScope, + ); + if ( + init && + typeof init.value === "object" && + init.value !== null + ) { + if (hasMutationInProperty(variable, initialScope)) { + // This variable has mutation in its property. + return null + } + } + return init + } + } + } + } + return null + }, + + Literal(node) { + const literal = + /** @type {Partial & Partial & Partial} */ ( + node + ); + //istanbul ignore if : this is implementation-specific behavior. + if ( + (literal.regex != null || literal.bigint != null) && + literal.value == null + ) { + // It was a RegExp/BigInt literal, but Node.js didn't support it. + return null + } + return { value: literal.value } + }, + + LogicalExpression(node, initialScope) { + const left = getStaticValueR(node.left, initialScope); + if (left != null) { + if ( + (node.operator === "||" && Boolean(left.value) === true) || + (node.operator === "&&" && Boolean(left.value) === false) || + (node.operator === "??" && left.value != null) + ) { + return left + } + + const right = getStaticValueR(node.right, initialScope); + if (right != null) { + return right + } + } + + return null + }, + + MemberExpression(node, initialScope) { + if (node.property.type === "PrivateIdentifier") { + return null + } + const object = getStaticValueR(node.object, initialScope); + if (object != null) { + if (object.value == null && (object.optional || node.optional)) { + return { value: undefined, optional: true } + } + const property = getStaticPropertyNameValue(node, initialScope); + + if (property != null) { + if ( + !isGetter( + /** @type {object} */ (object.value), + /** @type {PropertyKey} */ (property.value), + ) + ) { + return { + value: /** @type {Record} */ ( + object.value + )[/** @type {PropertyKey} */ (property.value)], + } + } + + for (const [classFn, allowed] of getterAllowed) { + if ( + object.value instanceof classFn && + allowed.has(/** @type {string} */ (property.value)) + ) { + return { + value: /** @type {Record} */ ( + object.value + )[/** @type {PropertyKey} */ (property.value)], + } + } + } + } + } + return null + }, + + ChainExpression(node, initialScope) { + const expression = getStaticValueR(node.expression, initialScope); + if (expression != null) { + return { value: expression.value } + } + return null + }, + + NewExpression(node, initialScope) { + const callee = getStaticValueR(node.callee, initialScope); + const args = getElementValues(node.arguments, initialScope); + + if (callee != null && args != null) { + const Func = /** @type {new (...args: any[]) => any} */ ( + callee.value + ); + if (callAllowed.has(Func)) { + return { value: new Func(...args) } + } + } + + return null + }, + + ObjectExpression(node, initialScope) { + /** @type {Record} */ + const object = {}; + + for (const propertyNode of node.properties) { + if (propertyNode.type === "Property") { + if (propertyNode.kind !== "init") { + return null + } + const key = getStaticPropertyNameValue( + propertyNode, + initialScope, + ); + const value = getStaticValueR(propertyNode.value, initialScope); + if (key == null || value == null) { + return null + } + object[/** @type {PropertyKey} */ (key.value)] = value.value; + } else if ( + propertyNode.type === "SpreadElement" || + // @ts-expect-error -- Backward compatibility + propertyNode.type === "ExperimentalSpreadProperty" + ) { + const argument = getStaticValueR( + propertyNode.argument, + initialScope, + ); + if (argument == null) { + return null + } + Object.assign(object, argument.value); + } else { + return null + } + } + + return { value: object } + }, + + SequenceExpression(node, initialScope) { + const last = node.expressions[node.expressions.length - 1]; + return getStaticValueR(last, initialScope) + }, + + TaggedTemplateExpression(node, initialScope) { + const tag = getStaticValueR(node.tag, initialScope); + const expressions = getElementValues( + node.quasi.expressions, + initialScope, + ); + + if (tag != null && expressions != null) { + const func = /** @type {(...args: any[]) => any} */ (tag.value); + /** @type {any[] & { raw?: string[] }} */ + const strings = node.quasi.quasis.map((q) => q.value.cooked); + strings.raw = node.quasi.quasis.map((q) => q.value.raw); + + if (func === String.raw) { + return { value: func(strings, ...expressions) } + } + } + + return null + }, + + TemplateLiteral(node, initialScope) { + const expressions = getElementValues(node.expressions, initialScope); + if (expressions != null) { + let value = node.quasis[0].value.cooked; + for (let i = 0; i < expressions.length; ++i) { + value += expressions[i]; + value += /** @type {string} */ (node.quasis[i + 1].value.cooked); + } + return { value } + } + return null + }, + + UnaryExpression(node, initialScope) { + if (node.operator === "delete") { + // Not supported. + return null + } + if (node.operator === "void") { + return { value: undefined } + } + + const arg = getStaticValueR(node.argument, initialScope); + if (arg != null) { + switch (node.operator) { + case "-": + return { value: -(/** @type {any} */ (arg.value)) } + case "+": + return { value: +(/** @type {any} */ (arg.value)) } //eslint-disable-line no-implicit-coercion + case "!": + return { value: !arg.value } + case "~": + return { value: ~(/** @type {any} */ (arg.value)) } + case "typeof": + return { value: typeof arg.value } + + // no default + } + } + + return null + }, + TSAsExpression(node, initialScope) { + return getStaticValueR(node.expression, initialScope) + }, + TSSatisfiesExpression(node, initialScope) { + return getStaticValueR(node.expression, initialScope) + }, + TSTypeAssertion(node, initialScope) { + return getStaticValueR(node.expression, initialScope) + }, + TSNonNullExpression(node, initialScope) { + return getStaticValueR(node.expression, initialScope) + }, + TSInstantiationExpression(node, initialScope) { + return getStaticValueR(node.expression, initialScope) + }, +}); + +/** + * Get the value of a given node if it's a static value. + * @param {Node|TSESTreeNode|null|undefined} node The node to get. + * @param {Scope|undefined|null} initialScope The scope to start finding variable. + * @returns {StaticValue|null} The static value of the node, or `null`. + */ +function getStaticValueR(node, initialScope) { + if (node != null && Object.hasOwnProperty.call(operations, node.type)) { + return /** @type {VisitorCallback} */ (operations[node.type])( + /** @type {TSESTreeNode} */ (node), + initialScope, + ) + } + return null +} + +/** + * Get the static value of property name from a MemberExpression node or a Property node. + * @param {MemberExpression|Property} node The node to get. + * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it. + * @returns {StaticValue|null} The static value of the property name of the node, or `null`. + */ +function getStaticPropertyNameValue(node, initialScope) { + const nameNode = node.type === "Property" ? node.key : node.property; + + if (node.computed) { + return getStaticValueR(nameNode, initialScope) + } + + if (nameNode.type === "Identifier") { + return { value: nameNode.name } + } + + if (nameNode.type === "Literal") { + if (/** @type {Partial} */ (nameNode).bigint) { + return { value: /** @type {BigIntLiteral} */ (nameNode).bigint } + } + return { value: String(nameNode.value) } + } + + return null +} + +/** + * Get the value of a given node if it's a static value. + * @param {Node} node The node to get. + * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible. + * @returns {StaticValue | null} The static value of the node, or `null`. + */ +function getStaticValue(node, initialScope = null) { + try { + return getStaticValueR(node, initialScope) + } catch (_error) { + return null + } +} + +/** @typedef {import("eslint").Scope.Scope} Scope */ +/** @typedef {import("estree").Node} Node */ +/** @typedef {import("estree").RegExpLiteral} RegExpLiteral */ +/** @typedef {import("estree").BigIntLiteral} BigIntLiteral */ +/** @typedef {import("estree").SimpleLiteral} SimpleLiteral */ + +/** + * Get the value of a given node if it's a literal or a template literal. + * @param {Node} node The node to get. + * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant. + * @returns {string|null} The value of the node, or `null`. + */ +function getStringIfConstant(node, initialScope = null) { + // Handle the literals that the platform doesn't support natively. + if (node && node.type === "Literal" && node.value === null) { + const literal = + /** @type {Partial & Partial & Partial} */ ( + node + ); + if (literal.regex) { + return `/${literal.regex.pattern}/${literal.regex.flags}` + } + if (literal.bigint) { + return literal.bigint + } + } + + const evaluated = getStaticValue(node, initialScope); + + if (evaluated) { + // `String(Symbol.prototype)` throws error + try { + return String(evaluated.value) + } catch { + // No op + } + } + + return null +} + +/** @typedef {import("eslint").Scope.Scope} Scope */ +/** @typedef {import("estree").MemberExpression} MemberExpression */ +/** @typedef {import("estree").MethodDefinition} MethodDefinition */ +/** @typedef {import("estree").Property} Property */ +/** @typedef {import("estree").PropertyDefinition} PropertyDefinition */ +/** @typedef {import("estree").Identifier} Identifier */ + +/** + * Get the property name from a MemberExpression node or a Property node. + * @param {MemberExpression | MethodDefinition | Property | PropertyDefinition} node The node to get. + * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it. + * @returns {string|null|undefined} The property name of the node. + */ +function getPropertyName(node, initialScope) { + switch (node.type) { + case "MemberExpression": + if (node.computed) { + return getStringIfConstant(node.property, initialScope) + } + if (node.property.type === "PrivateIdentifier") { + return null + } + return /** @type {Partial} */ (node.property).name + + case "Property": + case "MethodDefinition": + case "PropertyDefinition": + if (node.computed) { + return getStringIfConstant(node.key, initialScope) + } + if (node.key.type === "Literal") { + return String(node.key.value) + } + if (node.key.type === "PrivateIdentifier") { + return null + } + return /** @type {Partial} */ (node.key).name + } + + return null +} + +/** @typedef {import("eslint").Rule.Node} RuleNode */ +/** @typedef {import("eslint").SourceCode} SourceCode */ +/** @typedef {import("estree").Function} FunctionNode */ +/** @typedef {import("estree").FunctionDeclaration} FunctionDeclaration */ +/** @typedef {import("estree").FunctionExpression} FunctionExpression */ +/** @typedef {import("estree").Identifier} Identifier */ + +/** + * Get the name and kind of the given function node. + * @param {FunctionNode} node - The function node to get. + * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys. + * @returns {string} The name and kind of the function node. + */ +// eslint-disable-next-line complexity +function getFunctionNameWithKind(node, sourceCode) { + const parent = /** @type {RuleNode} */ (node).parent; + const tokens = []; + const isObjectMethod = parent.type === "Property" && parent.value === node; + const isClassMethod = + parent.type === "MethodDefinition" && parent.value === node; + const isClassFieldMethod = + parent.type === "PropertyDefinition" && parent.value === node; + + // Modifiers. + if (isClassMethod || isClassFieldMethod) { + if (parent.static) { + tokens.push("static"); + } + if (parent.key.type === "PrivateIdentifier") { + tokens.push("private"); + } + } + if (node.async) { + tokens.push("async"); + } + if (node.generator) { + tokens.push("generator"); + } + + // Kinds. + if (isObjectMethod || isClassMethod) { + if (parent.kind === "constructor") { + return "constructor" + } + if (parent.kind === "get") { + tokens.push("getter"); + } else if (parent.kind === "set") { + tokens.push("setter"); + } else { + tokens.push("method"); + } + } else if (isClassFieldMethod) { + tokens.push("method"); + } else { + if (node.type === "ArrowFunctionExpression") { + tokens.push("arrow"); + } + tokens.push("function"); + } + + // Names. + if (isObjectMethod || isClassMethod || isClassFieldMethod) { + if (parent.key.type === "PrivateIdentifier") { + tokens.push(`#${parent.key.name}`); + } else { + const name = getPropertyName(parent); + if (name) { + tokens.push(`'${name}'`); + } else if (sourceCode) { + const keyText = sourceCode.getText(parent.key); + if (!keyText.includes("\n")) { + tokens.push(`[${keyText}]`); + } + } + } + } else if (hasId(node)) { + tokens.push(`'${node.id.name}'`); + } else if ( + parent.type === "VariableDeclarator" && + parent.id && + parent.id.type === "Identifier" + ) { + tokens.push(`'${parent.id.name}'`); + } else if ( + (parent.type === "AssignmentExpression" || + parent.type === "AssignmentPattern") && + parent.left && + parent.left.type === "Identifier" + ) { + tokens.push(`'${parent.left.name}'`); + } else if ( + parent.type === "ExportDefaultDeclaration" && + parent.declaration === node + ) { + tokens.push("'default'"); + } + + return tokens.join(" ") +} + +/** + * @param {FunctionNode} node + * @returns {node is FunctionDeclaration | FunctionExpression & { id: Identifier }} + */ +function hasId(node) { + return Boolean( + /** @type {Partial} */ (node) + .id, + ) +} + +/** @typedef {import("estree").Node} Node */ +/** @typedef {import("eslint").SourceCode} SourceCode */ +/** @typedef {import("./types.mjs").HasSideEffectOptions} HasSideEffectOptions */ +/** @typedef {import("estree").BinaryExpression} BinaryExpression */ +/** @typedef {import("estree").MemberExpression} MemberExpression */ +/** @typedef {import("estree").MethodDefinition} MethodDefinition */ +/** @typedef {import("estree").Property} Property */ +/** @typedef {import("estree").PropertyDefinition} PropertyDefinition */ +/** @typedef {import("estree").UnaryExpression} UnaryExpression */ + +const typeConversionBinaryOps = Object.freeze( + new Set([ + "==", + "!=", + "<", + "<=", + ">", + ">=", + "<<", + ">>", + ">>>", + "+", + "-", + "*", + "/", + "%", + "|", + "^", + "&", + "in", + ]), +); +const typeConversionUnaryOps = Object.freeze(new Set(["-", "+", "!", "~"])); + +/** + * Check whether the given value is an ASTNode or not. + * @param {any} x The value to check. + * @returns {x is Node} `true` if the value is an ASTNode. + */ +function isNode(x) { + return x !== null && typeof x === "object" && typeof x.type === "string" +} + +const visitor = Object.freeze( + Object.assign(Object.create(null), { + /** + * @param {Node} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + $visit(node, options, visitorKeys) { + const { type } = node; + + if (typeof (/** @type {any} */ (this)[type]) === "function") { + return /** @type {any} */ (this)[type]( + node, + options, + visitorKeys, + ) + } + + return this.$visitChildren(node, options, visitorKeys) + }, + + /** + * @param {Node} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + $visitChildren(node, options, visitorKeys) { + const { type } = node; + + for (const key of /** @type {(keyof Node)[]} */ ( + visitorKeys[type] || eslintVisitorKeys.getKeys(node) + )) { + const value = node[key]; + + if (Array.isArray(value)) { + for (const element of value) { + if ( + isNode(element) && + this.$visit(element, options, visitorKeys) + ) { + return true + } + } + } else if ( + isNode(value) && + this.$visit(value, options, visitorKeys) + ) { + return true + } + } + + return false + }, + + ArrowFunctionExpression() { + return false + }, + AssignmentExpression() { + return true + }, + AwaitExpression() { + return true + }, + /** + * @param {BinaryExpression} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + BinaryExpression(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + typeConversionBinaryOps.has(node.operator) && + (node.left.type !== "Literal" || node.right.type !== "Literal") + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + CallExpression() { + return true + }, + FunctionExpression() { + return false + }, + ImportExpression() { + return true + }, + /** + * @param {MemberExpression} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + MemberExpression(node, options, visitorKeys) { + if (options.considerGetters) { + return true + } + if ( + options.considerImplicitTypeConversion && + node.computed && + node.property.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + /** + * @param {MethodDefinition} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + MethodDefinition(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + NewExpression() { + return true + }, + /** + * @param {Property} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + Property(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + /** + * @param {PropertyDefinition} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + PropertyDefinition(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + /** + * @param {UnaryExpression} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + UnaryExpression(node, options, visitorKeys) { + if (node.operator === "delete") { + return true + } + if ( + options.considerImplicitTypeConversion && + typeConversionUnaryOps.has(node.operator) && + node.argument.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + UpdateExpression() { + return true + }, + YieldExpression() { + return true + }, + }), +); + +/** + * Check whether a given node has any side effect or not. + * @param {Node} node The node to get. + * @param {SourceCode} sourceCode The source code object. + * @param {HasSideEffectOptions} [options] The option object. + * @returns {boolean} `true` if the node has a certain side effect. + */ +function hasSideEffect(node, sourceCode, options = {}) { + const { considerGetters = false, considerImplicitTypeConversion = false } = + options; + return visitor.$visit( + node, + { considerGetters, considerImplicitTypeConversion }, + sourceCode.visitorKeys || eslintVisitorKeys.KEYS, + ) +} + +/** @typedef {import("estree").Node} Node */ +/** @typedef {import("@typescript-eslint/types").TSESTree.NewExpression} TSNewExpression */ +/** @typedef {import("@typescript-eslint/types").TSESTree.CallExpression} TSCallExpression */ +/** @typedef {import("eslint").SourceCode} SourceCode */ +/** @typedef {import("eslint").AST.Token} Token */ +/** @typedef {import("eslint").Rule.Node} RuleNode */ + +/** + * Get the left parenthesis of the parent node syntax if it exists. + * E.g., `if (a) {}` then the `(`. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {Token|null} The left parenthesis of the parent node syntax + */ +// eslint-disable-next-line complexity +function getParentSyntaxParen(node, sourceCode) { + const parent = /** @type {RuleNode} */ (node).parent; + + switch (parent.type) { + case "CallExpression": + case "NewExpression": + if (parent.arguments.length === 1 && parent.arguments[0] === node) { + return sourceCode.getTokenAfter( + // @ts-expect-error https://github.com/typescript-eslint/typescript-eslint/pull/5384 + parent.typeArguments || + /** @type {RuleNode} */ ( + /** @type {unknown} */ ( + /** @type {TSNewExpression | TSCallExpression} */ ( + parent + ).typeParameters + ) + ) || + parent.callee, + isOpeningParenToken, + ) + } + return null + + case "DoWhileStatement": + if (parent.test === node) { + return sourceCode.getTokenAfter( + parent.body, + isOpeningParenToken, + ) + } + return null + + case "IfStatement": + case "WhileStatement": + if (parent.test === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "ImportExpression": + if (parent.source === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "SwitchStatement": + if (parent.discriminant === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "WithStatement": + if (parent.object === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + default: + return null + } +} + +/** + * Check whether a given node is parenthesized or not. + * @param {number} times The number of parantheses. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is parenthesized the given times. + */ +/** + * Check whether a given node is parenthesized or not. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is parenthesized. + */ +/** + * Check whether a given node is parenthesized or not. + * @param {Node|number} timesOrNode The first parameter. + * @param {Node|SourceCode} nodeOrSourceCode The second parameter. + * @param {SourceCode} [optionalSourceCode] The third parameter. + * @returns {boolean} `true` if the node is parenthesized. + */ +function isParenthesized( + timesOrNode, + nodeOrSourceCode, + optionalSourceCode, +) { + /** @type {number} */ + let times, + /** @type {RuleNode} */ + node, + /** @type {SourceCode} */ + sourceCode, + maybeLeftParen, + maybeRightParen; + if (typeof timesOrNode === "number") { + times = timesOrNode | 0; + node = /** @type {RuleNode} */ (nodeOrSourceCode); + sourceCode = /** @type {SourceCode} */ (optionalSourceCode); + if (!(times >= 1)) { + throw new TypeError("'times' should be a positive integer.") + } + } else { + times = 1; + node = /** @type {RuleNode} */ (timesOrNode); + sourceCode = /** @type {SourceCode} */ (nodeOrSourceCode); + } + + if ( + node == null || + // `Program` can't be parenthesized + node.parent == null || + // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}` + (node.parent.type === "CatchClause" && node.parent.param === node) + ) { + return false + } + + maybeLeftParen = maybeRightParen = node; + do { + maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen); + maybeRightParen = sourceCode.getTokenAfter(maybeRightParen); + } while ( + maybeLeftParen != null && + maybeRightParen != null && + isOpeningParenToken(maybeLeftParen) && + isClosingParenToken(maybeRightParen) && + // Avoid false positive such as `if (a) {}` + maybeLeftParen !== getParentSyntaxParen(node, sourceCode) && + --times > 0 + ) + + return times === 0 +} + +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */ + +const placeholder = /\$(?:[$&`']|[1-9][0-9]?)/gu; + +/** @type {WeakMap} */ +const internal = new WeakMap(); + +/** + * Check whether a given character is escaped or not. + * @param {string} str The string to check. + * @param {number} index The location of the character to check. + * @returns {boolean} `true` if the character is escaped. + */ +function isEscaped(str, index) { + let escaped = false; + for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) { + escaped = !escaped; + } + return escaped +} + +/** + * Replace a given string by a given matcher. + * @param {PatternMatcher} matcher The pattern matcher. + * @param {string} str The string to be replaced. + * @param {string} replacement The new substring to replace each matched part. + * @returns {string} The replaced string. + */ +function replaceS(matcher, str, replacement) { + const chunks = []; + let index = 0; + + /** + * @param {string} key The placeholder. + * @param {RegExpExecArray} match The matched information. + * @returns {string} The replaced string. + */ + function replacer(key, match) { + switch (key) { + case "$$": + return "$" + case "$&": + return match[0] + case "$`": + return str.slice(0, match.index) + case "$'": + return str.slice(match.index + match[0].length) + default: { + const i = key.slice(1); + if (i in match) { + return match[/** @type {any} */ (i)] + } + return key + } + } + } + + for (const match of matcher.execAll(str)) { + chunks.push(str.slice(index, match.index)); + chunks.push( + replacement.replace(placeholder, (key) => replacer(key, match)), + ); + index = match.index + match[0].length; + } + chunks.push(str.slice(index)); + + return chunks.join("") +} + +/** + * Replace a given string by a given matcher. + * @param {PatternMatcher} matcher The pattern matcher. + * @param {string} str The string to be replaced. + * @param {(substring: string, ...args: any[]) => string} replace The function to replace each matched part. + * @returns {string} The replaced string. + */ +function replaceF(matcher, str, replace) { + const chunks = []; + let index = 0; + + for (const match of matcher.execAll(str)) { + chunks.push(str.slice(index, match.index)); + chunks.push( + String( + replace( + .../** @type {[string, ...string[]]} */ ( + /** @type {string[]} */ (match) + ), + match.index, + match.input, + ), + ), + ); + index = match.index + match[0].length; + } + chunks.push(str.slice(index)); + + return chunks.join("") +} + +/** + * The class to find patterns as considering escape sequences. + */ +class PatternMatcher { + /** + * Initialize this matcher. + * @param {RegExp} pattern The pattern to match. + * @param {{escaped?:boolean}} [options] The options. + */ + constructor(pattern, options = {}) { + const { escaped = false } = options; + if (!(pattern instanceof RegExp)) { + throw new TypeError("'pattern' should be a RegExp instance.") + } + if (!pattern.flags.includes("g")) { + throw new Error("'pattern' should contains 'g' flag.") + } + + internal.set(this, { + pattern: new RegExp(pattern.source, pattern.flags), + escaped: Boolean(escaped), + }); + } + + /** + * Find the pattern in a given string. + * @param {string} str The string to find. + * @returns {IterableIterator} The iterator which iterate the matched information. + */ + *execAll(str) { + const { pattern, escaped } = + /** @type {{pattern:RegExp,escaped:boolean}} */ (internal.get(this)); + let match = null; + let lastIndex = 0; + + pattern.lastIndex = 0; + while ((match = pattern.exec(str)) != null) { + if (escaped || !isEscaped(str, match.index)) { + lastIndex = pattern.lastIndex; + yield match; + pattern.lastIndex = lastIndex; + } + } + } + + /** + * Check whether the pattern is found in a given string. + * @param {string} str The string to check. + * @returns {boolean} `true` if the pattern was found in the string. + */ + test(str) { + const it = this.execAll(str); + const ret = it.next(); + return !ret.done + } + + /** + * Replace a given string. + * @param {string} str The string to be replaced. + * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`. + * @returns {string} The replaced string. + */ + [Symbol.replace](str, replacer) { + return typeof replacer === "function" + ? replaceF(this, String(str), replacer) + : replaceS(this, String(str), String(replacer)) + } +} + +/** @typedef {import("eslint").Scope.Scope} Scope */ +/** @typedef {import("eslint").Scope.Variable} Variable */ +/** @typedef {import("eslint").Rule.Node} RuleNode */ +/** @typedef {import("estree").Node} Node */ +/** @typedef {import("estree").Expression} Expression */ +/** @typedef {import("estree").Pattern} Pattern */ +/** @typedef {import("estree").Identifier} Identifier */ +/** @typedef {import("estree").SimpleCallExpression} CallExpression */ +/** @typedef {import("estree").Program} Program */ +/** @typedef {import("estree").ImportDeclaration} ImportDeclaration */ +/** @typedef {import("estree").ExportAllDeclaration} ExportAllDeclaration */ +/** @typedef {import("estree").ExportDefaultDeclaration} ExportDefaultDeclaration */ +/** @typedef {import("estree").ExportNamedDeclaration} ExportNamedDeclaration */ +/** @typedef {import("estree").ImportSpecifier} ImportSpecifier */ +/** @typedef {import("estree").ImportDefaultSpecifier} ImportDefaultSpecifier */ +/** @typedef {import("estree").ImportNamespaceSpecifier} ImportNamespaceSpecifier */ +/** @typedef {import("estree").ExportSpecifier} ExportSpecifier */ +/** @typedef {import("estree").Property} Property */ +/** @typedef {import("estree").AssignmentProperty} AssignmentProperty */ +/** @typedef {import("estree").Literal} Literal */ +/** @typedef {import("@typescript-eslint/types").TSESTree.Node} TSESTreeNode */ +/** @typedef {import("./types.mjs").ReferenceTrackerOptions} ReferenceTrackerOptions */ +/** + * @template T + * @typedef {import("./types.mjs").TraceMap} TraceMap + */ +/** + * @template T + * @typedef {import("./types.mjs").TraceMapObject} TraceMapObject + */ +/** + * @template T + * @typedef {import("./types.mjs").TrackedReferences} TrackedReferences + */ + +const IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u; + +/** + * Check whether a given node is an import node or not. + * @param {Node} node + * @returns {node is ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration&{source: Literal}} `true` if the node is an import node. + */ +function isHasSource(node) { + return ( + IMPORT_TYPE.test(node.type) && + /** @type {ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration} */ ( + node + ).source != null + ) +} +const has = + /** @type {(traceMap: TraceMap, v: T) => v is (string extends T ? string : T)} */ ( + Function.call.bind(Object.hasOwnProperty) + ); + +const READ = Symbol("read"); +const CALL = Symbol("call"); +const CONSTRUCT = Symbol("construct"); +const ESM = Symbol("esm"); + +const requireCall = { require: { [CALL]: true } }; + +/** + * Check whether a given variable is modified or not. + * @param {Variable|undefined} variable The variable to check. + * @returns {boolean} `true` if the variable is modified. + */ +function isModifiedGlobal(variable) { + return ( + variable == null || + variable.defs.length !== 0 || + variable.references.some((r) => r.isWrite()) + ) +} + +/** + * Check if the value of a given node is passed through to the parent syntax as-is. + * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through. + * @param {Node} node A node to check. + * @returns {node is RuleNode & {parent: Expression}} `true` if the node is passed through. + */ +function isPassThrough(node) { + const parent = /** @type {TSESTreeNode} */ (node).parent; + + if (parent) { + switch (parent.type) { + case "ConditionalExpression": + return parent.consequent === node || parent.alternate === node + case "LogicalExpression": + return true + case "SequenceExpression": + return ( + parent.expressions[parent.expressions.length - 1] === node + ) + case "ChainExpression": + return true + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSTypeAssertion": + case "TSNonNullExpression": + case "TSInstantiationExpression": + return true + + default: + return false + } + } + return false +} + +/** + * The reference tracker. + */ +class ReferenceTracker { + /** + * Initialize this tracker. + * @param {Scope} globalScope The global scope. + * @param {object} [options] The options. + * @param {"legacy"|"strict"} [options.mode="strict"] The mode to determine the ImportDeclaration's behavior for CJS modules. + * @param {string[]} [options.globalObjectNames=["global","globalThis","self","window"]] The variable names for Global Object. + */ + constructor(globalScope, options = {}) { + const { + mode = "strict", + globalObjectNames = ["global", "globalThis", "self", "window"], + } = options; + /** @private @type {Variable[]} */ + this.variableStack = []; + /** @private */ + this.globalScope = globalScope; + /** @private */ + this.mode = mode; + /** @private */ + this.globalObjectNames = globalObjectNames.slice(0); + } + + /** + * Iterate the references of global variables. + * @template T + * @param {TraceMap} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate references. + */ + *iterateGlobalReferences(traceMap) { + for (const key of Object.keys(traceMap)) { + const nextTraceMap = traceMap[key]; + const path = [key]; + const variable = this.globalScope.set.get(key); + + if (isModifiedGlobal(variable)) { + continue + } + + yield* this._iterateVariableReferences( + /** @type {Variable} */ (variable), + path, + nextTraceMap, + true, + ); + } + + for (const key of this.globalObjectNames) { + /** @type {string[]} */ + const path = []; + const variable = this.globalScope.set.get(key); + + if (isModifiedGlobal(variable)) { + continue + } + + yield* this._iterateVariableReferences( + /** @type {Variable} */ (variable), + path, + traceMap, + false, + ); + } + } + + /** + * Iterate the references of CommonJS modules. + * @template T + * @param {TraceMap} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate references. + */ + *iterateCjsReferences(traceMap) { + for (const { node } of this.iterateGlobalReferences(requireCall)) { + const key = getStringIfConstant( + /** @type {CallExpression} */ (node).arguments[0], + ); + if (key == null || !has(traceMap, key)) { + continue + } + + const nextTraceMap = traceMap[key]; + const path = [key]; + + if (nextTraceMap[READ]) { + yield { + node, + path, + type: READ, + info: nextTraceMap[READ], + }; + } + yield* this._iteratePropertyReferences( + /** @type {CallExpression} */ (node), + path, + nextTraceMap, + ); + } + } + + /** + * Iterate the references of ES modules. + * @template T + * @param {TraceMap} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate references. + */ + *iterateEsmReferences(traceMap) { + const programNode = /** @type {Program} */ (this.globalScope.block); + + for (const node of programNode.body) { + if (!isHasSource(node)) { + continue + } + const moduleId = /** @type {string} */ (node.source.value); + + if (!has(traceMap, moduleId)) { + continue + } + const nextTraceMap = traceMap[moduleId]; + const path = [moduleId]; + + if (nextTraceMap[READ]) { + yield { + // eslint-disable-next-line object-shorthand -- apply type + node: /** @type {RuleNode} */ (node), + path, + type: READ, + info: nextTraceMap[READ], + }; + } + + if (node.type === "ExportAllDeclaration") { + for (const key of Object.keys(nextTraceMap)) { + const exportTraceMap = nextTraceMap[key]; + if (exportTraceMap[READ]) { + yield { + // eslint-disable-next-line object-shorthand -- apply type + node: /** @type {RuleNode} */ (node), + path: path.concat(key), + type: READ, + info: exportTraceMap[READ], + }; + } + } + } else { + for (const specifier of node.specifiers) { + const esm = has(nextTraceMap, ESM); + const it = this._iterateImportReferences( + specifier, + path, + esm + ? nextTraceMap + : this.mode === "legacy" + ? { default: nextTraceMap, ...nextTraceMap } + : { default: nextTraceMap }, + ); + + if (esm) { + yield* it; + } else { + for (const report of it) { + report.path = report.path.filter(exceptDefault); + if ( + report.path.length >= 2 || + report.type !== READ + ) { + yield report; + } + } + } + } + } + } + } + + /** + * Iterate the property references for a given expression AST node. + * @template T + * @param {Expression} node The expression AST node to iterate property references. + * @param {TraceMap} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate property references. + */ + *iteratePropertyReferences(node, traceMap) { + yield* this._iteratePropertyReferences(node, [], traceMap); + } + + /** + * Iterate the references for a given variable. + * @private + * @template T + * @param {Variable} variable The variable to iterate that references. + * @param {string[]} path The current path. + * @param {TraceMapObject} traceMap The trace map. + * @param {boolean} shouldReport = The flag to report those references. + * @returns {IterableIterator>} The iterator to iterate references. + */ + *_iterateVariableReferences(variable, path, traceMap, shouldReport) { + if (this.variableStack.includes(variable)) { + return + } + this.variableStack.push(variable); + try { + for (const reference of variable.references) { + if (!reference.isRead()) { + continue + } + const node = /** @type {RuleNode & Identifier} */ ( + reference.identifier + ); + + if (shouldReport && traceMap[READ]) { + yield { node, path, type: READ, info: traceMap[READ] }; + } + yield* this._iteratePropertyReferences(node, path, traceMap); + } + } finally { + this.variableStack.pop(); + } + } + + /** + * Iterate the references for a given AST node. + * @private + * @template T + * @param {Expression} rootNode The AST node to iterate references. + * @param {string[]} path The current path. + * @param {TraceMapObject} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate references. + */ + //eslint-disable-next-line complexity + *_iteratePropertyReferences(rootNode, path, traceMap) { + let node = rootNode; + while (isPassThrough(node)) { + node = node.parent; + } + + const parent = /** @type {RuleNode} */ (node).parent; + if (parent.type === "MemberExpression") { + if (parent.object === node) { + const key = getPropertyName(parent); + if (key == null || !has(traceMap, key)) { + return + } + + path = path.concat(key); //eslint-disable-line no-param-reassign + const nextTraceMap = traceMap[key]; + if (nextTraceMap[READ]) { + yield { + node: parent, + path, + type: READ, + info: nextTraceMap[READ], + }; + } + yield* this._iteratePropertyReferences( + parent, + path, + nextTraceMap, + ); + } + return + } + if (parent.type === "CallExpression") { + if (parent.callee === node && traceMap[CALL]) { + yield { node: parent, path, type: CALL, info: traceMap[CALL] }; + } + return + } + if (parent.type === "NewExpression") { + if (parent.callee === node && traceMap[CONSTRUCT]) { + yield { + node: parent, + path, + type: CONSTRUCT, + info: traceMap[CONSTRUCT], + }; + } + return + } + if (parent.type === "AssignmentExpression") { + if (parent.right === node) { + yield* this._iterateLhsReferences(parent.left, path, traceMap); + yield* this._iteratePropertyReferences(parent, path, traceMap); + } + return + } + if (parent.type === "AssignmentPattern") { + if (parent.right === node) { + yield* this._iterateLhsReferences(parent.left, path, traceMap); + } + return + } + if (parent.type === "VariableDeclarator") { + if (parent.init === node) { + yield* this._iterateLhsReferences(parent.id, path, traceMap); + } + } + } + + /** + * Iterate the references for a given Pattern node. + * @private + * @template T + * @param {Pattern} patternNode The Pattern node to iterate references. + * @param {string[]} path The current path. + * @param {TraceMapObject} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate references. + */ + *_iterateLhsReferences(patternNode, path, traceMap) { + if (patternNode.type === "Identifier") { + const variable = findVariable(this.globalScope, patternNode); + if (variable != null) { + yield* this._iterateVariableReferences( + variable, + path, + traceMap, + false, + ); + } + return + } + if (patternNode.type === "ObjectPattern") { + for (const property of patternNode.properties) { + const key = getPropertyName( + /** @type {AssignmentProperty} */ (property), + ); + + if (key == null || !has(traceMap, key)) { + continue + } + + const nextPath = path.concat(key); + const nextTraceMap = traceMap[key]; + if (nextTraceMap[READ]) { + yield { + node: /** @type {RuleNode} */ (property), + path: nextPath, + type: READ, + info: nextTraceMap[READ], + }; + } + yield* this._iterateLhsReferences( + /** @type {AssignmentProperty} */ (property).value, + nextPath, + nextTraceMap, + ); + } + return + } + if (patternNode.type === "AssignmentPattern") { + yield* this._iterateLhsReferences(patternNode.left, path, traceMap); + } + } + + /** + * Iterate the references for a given ModuleSpecifier node. + * @private + * @template T + * @param {ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier} specifierNode The ModuleSpecifier node to iterate references. + * @param {string[]} path The current path. + * @param {TraceMapObject} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate references. + */ + *_iterateImportReferences(specifierNode, path, traceMap) { + const type = specifierNode.type; + + if (type === "ImportSpecifier" || type === "ImportDefaultSpecifier") { + const key = + type === "ImportDefaultSpecifier" + ? "default" + : specifierNode.imported.type === "Identifier" + ? specifierNode.imported.name + : specifierNode.imported.value; + if (!has(traceMap, key)) { + return + } + + path = path.concat(key); //eslint-disable-line no-param-reassign + const nextTraceMap = traceMap[key]; + if (nextTraceMap[READ]) { + yield { + node: /** @type {RuleNode} */ (specifierNode), + path, + type: READ, + info: nextTraceMap[READ], + }; + } + yield* this._iterateVariableReferences( + /** @type {Variable} */ ( + findVariable(this.globalScope, specifierNode.local) + ), + path, + nextTraceMap, + false, + ); + + return + } + + if (type === "ImportNamespaceSpecifier") { + yield* this._iterateVariableReferences( + /** @type {Variable} */ ( + findVariable(this.globalScope, specifierNode.local) + ), + path, + traceMap, + false, + ); + return + } + + if (type === "ExportSpecifier") { + const key = + specifierNode.local.type === "Identifier" + ? specifierNode.local.name + : specifierNode.local.value; + if (!has(traceMap, key)) { + return + } + + path = path.concat(key); //eslint-disable-line no-param-reassign + const nextTraceMap = traceMap[key]; + if (nextTraceMap[READ]) { + yield { + node: /** @type {RuleNode} */ (specifierNode), + path, + type: READ, + info: nextTraceMap[READ], + }; + } + } + } +} + +ReferenceTracker.READ = READ; +ReferenceTracker.CALL = CALL; +ReferenceTracker.CONSTRUCT = CONSTRUCT; +ReferenceTracker.ESM = ESM; + +/** + * This is a predicate function for Array#filter. + * @param {string} name A name part. + * @param {number} index The index of the name. + * @returns {boolean} `false` if it's default. + */ +function exceptDefault(name, index) { + return !(index === 1 && name === "default") +} + +/** @typedef {import("./types.mjs").StaticValue} StaticValue */ + +var index = { + CALL, + CONSTRUCT, + ESM, + findVariable, + getFunctionHeadLocation, + getFunctionNameWithKind, + getInnermostScope, + getPropertyName, + getStaticValue, + getStringIfConstant, + hasSideEffect, + isArrowToken, + isClosingBraceToken, + isClosingBracketToken, + isClosingParenToken, + isColonToken, + isCommaToken, + isCommentToken, + isNotArrowToken, + isNotClosingBraceToken, + isNotClosingBracketToken, + isNotClosingParenToken, + isNotColonToken, + isNotCommaToken, + isNotCommentToken, + isNotOpeningBraceToken, + isNotOpeningBracketToken, + isNotOpeningParenToken, + isNotSemicolonToken, + isOpeningBraceToken, + isOpeningBracketToken, + isOpeningParenToken, + isParenthesized, + isSemicolonToken, + PatternMatcher, + READ, + ReferenceTracker, +}; + +exports.CALL = CALL; +exports.CONSTRUCT = CONSTRUCT; +exports.ESM = ESM; +exports.PatternMatcher = PatternMatcher; +exports.READ = READ; +exports.ReferenceTracker = ReferenceTracker; +exports["default"] = index; +exports.findVariable = findVariable; +exports.getFunctionHeadLocation = getFunctionHeadLocation; +exports.getFunctionNameWithKind = getFunctionNameWithKind; +exports.getInnermostScope = getInnermostScope; +exports.getPropertyName = getPropertyName; +exports.getStaticValue = getStaticValue; +exports.getStringIfConstant = getStringIfConstant; +exports.hasSideEffect = hasSideEffect; +exports.isArrowToken = isArrowToken; +exports.isClosingBraceToken = isClosingBraceToken; +exports.isClosingBracketToken = isClosingBracketToken; +exports.isClosingParenToken = isClosingParenToken; +exports.isColonToken = isColonToken; +exports.isCommaToken = isCommaToken; +exports.isCommentToken = isCommentToken; +exports.isNotArrowToken = isNotArrowToken; +exports.isNotClosingBraceToken = isNotClosingBraceToken; +exports.isNotClosingBracketToken = isNotClosingBracketToken; +exports.isNotClosingParenToken = isNotClosingParenToken; +exports.isNotColonToken = isNotColonToken; +exports.isNotCommaToken = isNotCommaToken; +exports.isNotCommentToken = isNotCommentToken; +exports.isNotOpeningBraceToken = isNotOpeningBraceToken; +exports.isNotOpeningBracketToken = isNotOpeningBracketToken; +exports.isNotOpeningParenToken = isNotOpeningParenToken; +exports.isNotSemicolonToken = isNotSemicolonToken; +exports.isOpeningBraceToken = isOpeningBraceToken; +exports.isOpeningBracketToken = isOpeningBracketToken; +exports.isOpeningParenToken = isOpeningParenToken; +exports.isParenthesized = isParenthesized; +exports.isSemicolonToken = isSemicolonToken; +//# sourceMappingURL=index.js.map diff --git a/slider/node_modules/@eslint-community/eslint-utils/index.js.map b/slider/node_modules/@eslint-community/eslint-utils/index.js.map new file mode 100644 index 0000000..88ef384 --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["src/get-innermost-scope.mjs","src/find-variable.mjs","src/token-predicate.mjs","src/get-function-head-location.mjs","src/get-static-value.mjs","src/get-string-if-constant.mjs","src/get-property-name.mjs","src/get-function-name-with-kind.mjs","src/has-side-effect.mjs","src/is-parenthesized.mjs","src/pattern-matcher.mjs","src/reference-tracker.mjs","src/index.mjs"],"sourcesContent":["/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").Node} Node */\n\n/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = /** @type {[number, number]} */ (node.range)[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = /** @type {[number, number]} */ (\n childScope.block.range\n )\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Identifier} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n /** @type {Scope|null} */\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"estree\").Comment} Comment */\n/** @typedef {import(\"./types.mjs\").ArrowToken} ArrowToken */\n/** @typedef {import(\"./types.mjs\").CommaToken} CommaToken */\n/** @typedef {import(\"./types.mjs\").SemicolonToken} SemicolonToken */\n/** @typedef {import(\"./types.mjs\").ColonToken} ColonToken */\n/** @typedef {import(\"./types.mjs\").OpeningParenToken} OpeningParenToken */\n/** @typedef {import(\"./types.mjs\").ClosingParenToken} ClosingParenToken */\n/** @typedef {import(\"./types.mjs\").OpeningBracketToken} OpeningBracketToken */\n/** @typedef {import(\"./types.mjs\").ClosingBracketToken} ClosingBracketToken */\n/** @typedef {import(\"./types.mjs\").OpeningBraceToken} OpeningBraceToken */\n/** @typedef {import(\"./types.mjs\").ClosingBraceToken} ClosingBraceToken */\n/**\n * @template {string} Value\n * @typedef {import(\"./types.mjs\").PunctuatorToken} PunctuatorToken\n */\n\n/** @typedef {Comment | Token} CommentOrToken */\n\n/**\n * Creates the negate function of the given function.\n * @param {function(CommentOrToken):boolean} f - The function to negate.\n * @returns {function(CommentOrToken):boolean} Negated function.\n */\nfunction negate(f) {\n return (token) => !f(token)\n}\n\n/**\n * Checks if the given token is a PunctuatorToken with the given value\n * @template {string} Value\n * @param {CommentOrToken} token - The token to check.\n * @param {Value} value - The value to check.\n * @returns {token is PunctuatorToken} `true` if the token is a PunctuatorToken with the given value.\n */\nfunction isPunctuatorTokenWithValue(token, value) {\n return token.type === \"Punctuator\" && token.value === value\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ArrowToken} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return isPunctuatorTokenWithValue(token, \"=>\")\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is CommaToken} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return isPunctuatorTokenWithValue(token, \",\")\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is SemicolonToken} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return isPunctuatorTokenWithValue(token, \";\")\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ColonToken} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return isPunctuatorTokenWithValue(token, \":\")\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningParenToken} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return isPunctuatorTokenWithValue(token, \"(\")\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingParenToken} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return isPunctuatorTokenWithValue(token, \")\")\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningBracketToken} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"[\")\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingBracketToken} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"]\")\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningBraceToken} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"{\")\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingBraceToken} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"}\")\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is Comment} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return [\"Block\", \"Line\", \"Shebang\"].includes(token.type)\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"estree\").Function} FunctionNode */\n/** @typedef {import(\"estree\").FunctionDeclaration} FunctionDeclaration */\n/** @typedef {import(\"estree\").FunctionExpression} FunctionExpression */\n/** @typedef {import(\"estree\").SourceLocation} SourceLocation */\n/** @typedef {import(\"estree\").Position} Position */\n\n/**\n * Get the `(` token of the given function node.\n * @param {FunctionExpression | FunctionDeclaration} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? /** @type {Token} */ (\n sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n )\n : /** @type {Token} */ (\n sourceCode.getFirstToken(node, isOpeningParenToken)\n )\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {FunctionNode} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {SourceLocation|null} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n /** @type {Position|null} */\n let start = null\n /** @type {Position|null} */\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = /** @type {Token} */ (\n sourceCode.getTokenBefore(node.body, isArrowToken)\n )\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\" ||\n parent.type === \"PropertyDefinition\"\n ) {\n start = /** @type {SourceLocation} */ (parent.loc).start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = /** @type {SourceLocation} */ (node.loc).start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: { ...start },\n end: { ...end },\n }\n}\n","/* globals globalThis, global, self, window */\n\nimport { findVariable } from \"./find-variable.mjs\"\n/** @typedef {import(\"./types.mjs\").StaticValue} StaticValue */\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Node} TSESTreeNode */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.AST_NODE_TYPES} TSESTreeNodeTypes */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.MemberExpression} MemberExpression */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Property} Property */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.RegExpLiteral} RegExpLiteral */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.BigIntLiteral} BigIntLiteral */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Literal} Literal */\n\nconst globalObject =\n typeof globalThis !== \"undefined\"\n ? globalThis\n : // @ts-ignore\n typeof self !== \"undefined\"\n ? // @ts-ignore\n self\n : // @ts-ignore\n typeof window !== \"undefined\"\n ? // @ts-ignore\n window\n : typeof global !== \"undefined\"\n ? global\n : {}\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ]),\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n Array.of,\n Array.prototype.at,\n Array.prototype.concat,\n Array.prototype.entries,\n Array.prototype.every,\n Array.prototype.filter,\n Array.prototype.find,\n Array.prototype.findIndex,\n Array.prototype.flat,\n Array.prototype.includes,\n Array.prototype.indexOf,\n Array.prototype.join,\n Array.prototype.keys,\n Array.prototype.lastIndexOf,\n Array.prototype.slice,\n Array.prototype.some,\n Array.prototype.toString,\n Array.prototype.values,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n // @ts-ignore\n isPrototypeOf,\n Map,\n Map.prototype.entries,\n Map.prototype.get,\n Map.prototype.has,\n Map.prototype.keys,\n Map.prototype.values,\n .../** @type {(keyof typeof Math)[]} */ (\n Object.getOwnPropertyNames(Math)\n )\n .filter((k) => k !== \"random\")\n .map((k) => Math[k])\n .filter((f) => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Number.prototype.toExponential,\n Number.prototype.toFixed,\n Number.prototype.toPrecision,\n Number.prototype.toString,\n Object,\n Object.entries,\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values,\n parseFloat,\n parseInt,\n RegExp,\n Set,\n Set.prototype.entries,\n Set.prototype.has,\n Set.prototype.keys,\n Set.prototype.values,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n String.prototype.at,\n String.prototype.charAt,\n String.prototype.charCodeAt,\n String.prototype.codePointAt,\n String.prototype.concat,\n String.prototype.endsWith,\n String.prototype.includes,\n String.prototype.indexOf,\n String.prototype.lastIndexOf,\n String.prototype.normalize,\n String.prototype.padEnd,\n String.prototype.padStart,\n String.prototype.slice,\n String.prototype.startsWith,\n String.prototype.substr,\n String.prototype.substring,\n String.prototype.toLowerCase,\n String.prototype.toString,\n String.prototype.toUpperCase,\n String.prototype.trim,\n String.prototype.trimEnd,\n String.prototype.trimLeft,\n String.prototype.trimRight,\n String.prototype.trimStart,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter((f) => typeof f === \"function\"),\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/** @type {ReadonlyArray]>} */\nconst getterAllowed = [\n [Map, new Set([\"size\"])],\n [\n RegExp,\n new Set([\n \"dotAll\",\n \"flags\",\n \"global\",\n \"hasIndices\",\n \"ignoreCase\",\n \"multiline\",\n \"source\",\n \"sticky\",\n \"unicode\",\n ]),\n ],\n [Set, new Set([\"size\"])],\n]\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {(Node|TSESTreeNode|null)[]} nodeList The node list to get values.\n * @param {Scope|undefined|null} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(.../** @type {Iterable} */ (argument.value))\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\n/**\n * Checks if a variable is a built-in global.\n * @param {Variable|null} variable The variable to check.\n * @returns {variable is Variable & {defs:[]}}\n */\nfunction isBuiltinGlobal(variable) {\n return (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in globalObject\n )\n}\n\n/**\n * Checks if a variable can be considered as a constant.\n * @param {Variable} variable\n * @returns {variable is Variable & {defs: [import(\"eslint\").Scope.Definition & { type: \"Variable\" }]}} True if the variable can be considered as a constant.\n */\nfunction canBeConsideredConst(variable) {\n if (variable.defs.length !== 1) {\n return false\n }\n const def = variable.defs[0]\n return Boolean(\n def.parent &&\n def.type === \"Variable\" &&\n (def.parent.kind === \"const\" || isEffectivelyConst(variable)),\n )\n}\n\n/**\n * Returns whether the given variable is never written to after initialization.\n * @param {Variable} variable\n * @returns {boolean}\n */\nfunction isEffectivelyConst(variable) {\n const refs = variable.references\n\n const inits = refs.filter((r) => r.init).length\n const reads = refs.filter((r) => r.isReadOnly()).length\n if (inits === 1 && reads + inits === refs.length) {\n // there is only one init and all other references only read\n return true\n }\n return false\n}\n\n/**\n * Checks if a variable has mutation in its property.\n * @param {Variable} variable The variable to check.\n * @param {Scope|null} initialScope The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {boolean} True if the variable has mutation in its property.\n */\nfunction hasMutationInProperty(variable, initialScope) {\n for (const ref of variable.references) {\n let node = /** @type {TSESTreeNode} */ (ref.identifier)\n while (node && node.parent && node.parent.type === \"MemberExpression\") {\n node = node.parent\n }\n if (!node || !node.parent) {\n continue\n }\n if (\n (node.parent.type === \"AssignmentExpression\" &&\n node.parent.left === node) ||\n (node.parent.type === \"UpdateExpression\" &&\n node.parent.argument === node)\n ) {\n // This is a mutation.\n return true\n }\n if (\n node.parent.type === \"CallExpression\" &&\n node.parent.callee === node &&\n node.type === \"MemberExpression\"\n ) {\n const methodName = getStaticPropertyNameValue(node, initialScope)\n if (isNameOfMutationArrayMethod(methodName)) {\n // This is a mutation.\n return true\n }\n }\n }\n return false\n\n /**\n * Checks if a method name is one of the mutation array methods.\n * @param {StaticValue|null} methodName The method name to check.\n * @returns {boolean} True if the method name is a mutation array method.\n */\n function isNameOfMutationArrayMethod(methodName) {\n if (methodName == null || methodName.value == null) {\n return false\n }\n const name = methodName.value\n return (\n name === \"copyWithin\" ||\n name === \"fill\" ||\n name === \"pop\" ||\n name === \"push\" ||\n name === \"reverse\" ||\n name === \"shift\" ||\n name === \"sort\" ||\n name === \"splice\" ||\n name === \"unshift\"\n )\n }\n}\n\n/**\n * @template {TSESTreeNodeTypes} T\n * @callback VisitorCallback\n * @param {TSESTreeNode & { type: T }} node\n * @param {Scope|undefined|null} initialScope\n * @returns {StaticValue | null}\n */\n/**\n * @typedef { { [K in TSESTreeNodeTypes]?: VisitorCallback } } Operations\n */\n/**\n * @type {Operations}\n */\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return {\n value:\n /** @type {any} */ (left.value) <\n /** @type {any} */ (right.value),\n }\n case \"<=\":\n return {\n value:\n /** @type {any} */ (left.value) <=\n /** @type {any} */ (right.value),\n }\n case \">\":\n return {\n value:\n /** @type {any} */ (left.value) >\n /** @type {any} */ (right.value),\n }\n case \">=\":\n return {\n value:\n /** @type {any} */ (left.value) >=\n /** @type {any} */ (right.value),\n }\n case \"<<\":\n return {\n value:\n /** @type {any} */ (left.value) <<\n /** @type {any} */ (right.value),\n }\n case \">>\":\n return {\n value:\n /** @type {any} */ (left.value) >>\n /** @type {any} */ (right.value),\n }\n case \">>>\":\n return {\n value:\n /** @type {any} */ (left.value) >>>\n /** @type {any} */ (right.value),\n }\n case \"+\":\n return {\n value:\n /** @type {any} */ (left.value) +\n /** @type {any} */ (right.value),\n }\n case \"-\":\n return {\n value:\n /** @type {any} */ (left.value) -\n /** @type {any} */ (right.value),\n }\n case \"*\":\n return {\n value:\n /** @type {any} */ (left.value) *\n /** @type {any} */ (right.value),\n }\n case \"/\":\n return {\n value:\n /** @type {any} */ (left.value) /\n /** @type {any} */ (right.value),\n }\n case \"%\":\n return {\n value:\n /** @type {any} */ (left.value) %\n /** @type {any} */ (right.value),\n }\n case \"**\":\n return {\n value:\n /** @type {any} */ (left.value) **\n /** @type {any} */ (right.value),\n }\n case \"|\":\n return {\n value:\n /** @type {any} */ (left.value) |\n /** @type {any} */ (right.value),\n }\n case \"^\":\n return {\n value:\n /** @type {any} */ (left.value) ^\n /** @type {any} */ (right.value),\n }\n case \"&\":\n return {\n value:\n /** @type {any} */ (left.value) &\n /** @type {any} */ (right.value),\n }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n if (calleeNode.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(calleeNode.object, initialScope)\n if (object != null) {\n if (\n object.value == null &&\n (object.optional || node.optional)\n ) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(\n calleeNode,\n initialScope,\n )\n\n if (property != null) {\n const receiver =\n /** @type {Record any>} */ (\n object.value\n )\n const methodName = /** @type {PropertyKey} */ (\n property.value\n )\n if (callAllowed.has(receiver[methodName])) {\n return {\n value: receiver[methodName](...args),\n }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n if (callee.value == null && node.optional) {\n return { value: undefined, optional: true }\n }\n const func = /** @type {(...args: any[]) => any} */ (\n callee.value\n )\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n if (variable != null) {\n // Built-in globals.\n if (isBuiltinGlobal(variable)) {\n return { value: globalObject[variable.name] }\n }\n\n // Constants.\n if (canBeConsideredConst(variable)) {\n const def = variable.defs[0]\n if (\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n const init = getStaticValueR(\n def.node.init,\n initialScope,\n )\n if (\n init &&\n typeof init.value === \"object\" &&\n init.value !== null\n ) {\n if (hasMutationInProperty(variable, initialScope)) {\n // This variable has mutation in its property.\n return null\n }\n }\n return init\n }\n }\n }\n }\n return null\n },\n\n Literal(node) {\n const literal =\n /** @type {Partial & Partial & Partial} */ (\n node\n )\n //istanbul ignore if : this is implementation-specific behavior.\n if (\n (literal.regex != null || literal.bigint != null) &&\n literal.value == null\n ) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: literal.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false) ||\n (node.operator === \"??\" && left.value != null)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(node.object, initialScope)\n if (object != null) {\n if (object.value == null && (object.optional || node.optional)) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(node, initialScope)\n\n if (property != null) {\n if (\n !isGetter(\n /** @type {object} */ (object.value),\n /** @type {PropertyKey} */ (property.value),\n )\n ) {\n return {\n value: /** @type {Record} */ (\n object.value\n )[/** @type {PropertyKey} */ (property.value)],\n }\n }\n\n for (const [classFn, allowed] of getterAllowed) {\n if (\n object.value instanceof classFn &&\n allowed.has(/** @type {string} */ (property.value))\n ) {\n return {\n value: /** @type {Record} */ (\n object.value\n )[/** @type {PropertyKey} */ (property.value)],\n }\n }\n }\n }\n }\n return null\n },\n\n ChainExpression(node, initialScope) {\n const expression = getStaticValueR(node.expression, initialScope)\n if (expression != null) {\n return { value: expression.value }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = /** @type {new (...args: any[]) => any} */ (\n callee.value\n )\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n /** @type {Record} */\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = getStaticPropertyNameValue(\n propertyNode,\n initialScope,\n )\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[/** @type {PropertyKey} */ (key.value)] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n // @ts-expect-error -- Backward compatibility\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope,\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope,\n )\n\n if (tag != null && expressions != null) {\n const func = /** @type {(...args: any[]) => any} */ (tag.value)\n /** @type {any[] & { raw?: string[] }} */\n const strings = node.quasi.quasis.map((q) => q.value.cooked)\n strings.raw = node.quasi.quasis.map((q) => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += /** @type {string} */ (node.quasis[i + 1].value.cooked)\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -(/** @type {any} */ (arg.value)) }\n case \"+\":\n return { value: +(/** @type {any} */ (arg.value)) } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~(/** @type {any} */ (arg.value)) }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n TSAsExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSSatisfiesExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSTypeAssertion(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSNonNullExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSInstantiationExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node|TSESTreeNode|null|undefined} node The node to get.\n * @param {Scope|undefined|null} initialScope The scope to start finding variable.\n * @returns {StaticValue|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return /** @type {VisitorCallback} */ (operations[node.type])(\n /** @type {TSESTreeNode} */ (node),\n initialScope,\n )\n }\n return null\n}\n\n/**\n * Get the static value of property name from a MemberExpression node or a Property node.\n * @param {MemberExpression|Property} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {StaticValue|null} The static value of the property name of the node, or `null`.\n */\nfunction getStaticPropertyNameValue(node, initialScope) {\n const nameNode = node.type === \"Property\" ? node.key : node.property\n\n if (node.computed) {\n return getStaticValueR(nameNode, initialScope)\n }\n\n if (nameNode.type === \"Identifier\") {\n return { value: nameNode.name }\n }\n\n if (nameNode.type === \"Literal\") {\n if (/** @type {Partial} */ (nameNode).bigint) {\n return { value: /** @type {BigIntLiteral} */ (nameNode).bigint }\n }\n return { value: String(nameNode.value) }\n }\n\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {StaticValue | null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"estree\").RegExpLiteral} RegExpLiteral */\n/** @typedef {import(\"estree\").BigIntLiteral} BigIntLiteral */\n/** @typedef {import(\"estree\").SimpleLiteral} SimpleLiteral */\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n const literal =\n /** @type {Partial & Partial & Partial} */ (\n node\n )\n if (literal.regex) {\n return `/${literal.regex.pattern}/${literal.regex.flags}`\n }\n if (literal.bigint) {\n return literal.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n\n if (evaluated) {\n // `String(Symbol.prototype)` throws error\n try {\n return String(evaluated.value)\n } catch {\n // No op\n }\n }\n\n return null\n}\n","import { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").MemberExpression} MemberExpression */\n/** @typedef {import(\"estree\").MethodDefinition} MethodDefinition */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").PropertyDefinition} PropertyDefinition */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {MemberExpression | MethodDefinition | Property | PropertyDefinition} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null|undefined} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n return /** @type {Partial} */ (node.property).name\n\n case \"Property\":\n case \"MethodDefinition\":\n case \"PropertyDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n if (node.key.type === \"PrivateIdentifier\") {\n return null\n }\n return /** @type {Partial} */ (node.key).name\n\n default:\n break\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name.mjs\"\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"estree\").Function} FunctionNode */\n/** @typedef {import(\"estree\").FunctionDeclaration} FunctionDeclaration */\n/** @typedef {import(\"estree\").FunctionExpression} FunctionExpression */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Get the name and kind of the given function node.\n * @param {FunctionNode} node - The function node to get.\n * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys.\n * @returns {string} The name and kind of the function node.\n */\n// eslint-disable-next-line complexity\nexport function getFunctionNameWithKind(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n const tokens = []\n const isObjectMethod = parent.type === \"Property\" && parent.value === node\n const isClassMethod =\n parent.type === \"MethodDefinition\" && parent.value === node\n const isClassFieldMethod =\n parent.type === \"PropertyDefinition\" && parent.value === node\n\n // Modifiers.\n if (isClassMethod || isClassFieldMethod) {\n if (parent.static) {\n tokens.push(\"static\")\n }\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(\"private\")\n }\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n // Kinds.\n if (isObjectMethod || isClassMethod) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else if (isClassFieldMethod) {\n tokens.push(\"method\")\n } else {\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\")\n }\n tokens.push(\"function\")\n }\n\n // Names.\n if (isObjectMethod || isClassMethod || isClassFieldMethod) {\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(`#${parent.key.name}`)\n } else {\n const name = getPropertyName(parent)\n if (name) {\n tokens.push(`'${name}'`)\n } else if (sourceCode) {\n const keyText = sourceCode.getText(parent.key)\n if (!keyText.includes(\"\\n\")) {\n tokens.push(`[${keyText}]`)\n }\n }\n }\n } else if (hasId(node)) {\n tokens.push(`'${node.id.name}'`)\n } else if (\n parent.type === \"VariableDeclarator\" &&\n parent.id &&\n parent.id.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.id.name}'`)\n } else if (\n (parent.type === \"AssignmentExpression\" ||\n parent.type === \"AssignmentPattern\") &&\n parent.left &&\n parent.left.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.left.name}'`)\n } else if (\n parent.type === \"ExportDefaultDeclaration\" &&\n parent.declaration === node\n ) {\n tokens.push(\"'default'\")\n }\n\n return tokens.join(\" \")\n}\n\n/**\n * @param {FunctionNode} node\n * @returns {node is FunctionDeclaration | FunctionExpression & { id: Identifier }}\n */\nfunction hasId(node) {\n return Boolean(\n /** @type {Partial} */ (node)\n .id,\n )\n}\n","import { getKeys, KEYS } from \"eslint-visitor-keys\"\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"./types.mjs\").HasSideEffectOptions} HasSideEffectOptions */\n/** @typedef {import(\"estree\").BinaryExpression} BinaryExpression */\n/** @typedef {import(\"estree\").MemberExpression} MemberExpression */\n/** @typedef {import(\"estree\").MethodDefinition} MethodDefinition */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").PropertyDefinition} PropertyDefinition */\n/** @typedef {import(\"estree\").UnaryExpression} UnaryExpression */\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ]),\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} x The value to check.\n * @returns {x is Node} `true` if the value is an ASTNode.\n */\nfunction isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\"\n}\n\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n /**\n * @param {Node} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof (/** @type {any} */ (this)[type]) === \"function\") {\n return /** @type {any} */ (this)[type](\n node,\n options,\n visitorKeys,\n )\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n /**\n * @param {Node} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of /** @type {(keyof Node)[]} */ (\n visitorKeys[type] || getKeys(node)\n )) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n isNode(element) &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (\n isNode(value) &&\n this.$visit(value, options, visitorKeys)\n ) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n /**\n * @param {BinaryExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n /**\n * @param {MemberExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {MethodDefinition} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n /**\n * @param {Property} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {PropertyDefinition} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n PropertyDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {UnaryExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n }),\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {HasSideEffectOptions} [options] The option object.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(node, sourceCode, options = {}) {\n const { considerGetters = false, considerImplicitTypeConversion = false } =\n options\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || KEYS,\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.NewExpression} TSNewExpression */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.CallExpression} TSCallExpression */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\n// eslint-disable-next-line complexity\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n // @ts-expect-error https://github.com/typescript-eslint/typescript-eslint/pull/5384\n parent.typeArguments ||\n /** @type {RuleNode} */ (\n /** @type {unknown} */ (\n /** @type {TSNewExpression | TSCallExpression} */ (\n parent\n ).typeParameters\n )\n ) ||\n parent.callee,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node|number} timesOrNode The first parameter.\n * @param {Node|SourceCode} nodeOrSourceCode The second parameter.\n * @param {SourceCode} [optionalSourceCode] The third parameter.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode,\n) {\n /** @type {number} */\n let times,\n /** @type {RuleNode} */\n node,\n /** @type {SourceCode} */\n sourceCode,\n maybeLeftParen,\n maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = /** @type {RuleNode} */ (nodeOrSourceCode)\n sourceCode = /** @type {SourceCode} */ (optionalSourceCode)\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = /** @type {RuleNode} */ (timesOrNode)\n sourceCode = /** @type {SourceCode} */ (nodeOrSourceCode)\n }\n\n if (\n node == null ||\n // `Program` can't be parenthesized\n node.parent == null ||\n // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`\n (node.parent.type === \"CatchClause\" && node.parent.param === node)\n ) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /**\n * @param {string} key The placeholder.\n * @param {RegExpExecArray} match The matched information.\n * @returns {string} The replaced string.\n */\n function replacer(key, match) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[/** @type {any} */ (i)]\n }\n return key\n }\n }\n }\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(\n replacement.replace(placeholder, (key) => replacer(key, match)),\n )\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(substring: string, ...args: any[]) => string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(\n String(\n replace(\n .../** @type {[string, ...string[]]} */ (\n /** @type {string[]} */ (match)\n ),\n match.index,\n match.input,\n ),\n ),\n )\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped?:boolean}} [options] The options.\n */\n constructor(pattern, options = {}) {\n const { escaped = false } = options\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } =\n /** @type {{pattern:RegExp,escaped:boolean}} */ (internal.get(this))\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"estree\").Expression} Expression */\n/** @typedef {import(\"estree\").Pattern} Pattern */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n/** @typedef {import(\"estree\").SimpleCallExpression} CallExpression */\n/** @typedef {import(\"estree\").Program} Program */\n/** @typedef {import(\"estree\").ImportDeclaration} ImportDeclaration */\n/** @typedef {import(\"estree\").ExportAllDeclaration} ExportAllDeclaration */\n/** @typedef {import(\"estree\").ExportDefaultDeclaration} ExportDefaultDeclaration */\n/** @typedef {import(\"estree\").ExportNamedDeclaration} ExportNamedDeclaration */\n/** @typedef {import(\"estree\").ImportSpecifier} ImportSpecifier */\n/** @typedef {import(\"estree\").ImportDefaultSpecifier} ImportDefaultSpecifier */\n/** @typedef {import(\"estree\").ImportNamespaceSpecifier} ImportNamespaceSpecifier */\n/** @typedef {import(\"estree\").ExportSpecifier} ExportSpecifier */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").AssignmentProperty} AssignmentProperty */\n/** @typedef {import(\"estree\").Literal} Literal */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Node} TSESTreeNode */\n/** @typedef {import(\"./types.mjs\").ReferenceTrackerOptions} ReferenceTrackerOptions */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMap} TraceMap\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMapObject} TraceMapObject\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TrackedReferences} TrackedReferences\n */\n\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\n\n/**\n * Check whether a given node is an import node or not.\n * @param {Node} node\n * @returns {node is ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration&{source: Literal}} `true` if the node is an import node.\n */\nfunction isHasSource(node) {\n return (\n IMPORT_TYPE.test(node.type) &&\n /** @type {ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration} */ (\n node\n ).source != null\n )\n}\nconst has =\n /** @type {(traceMap: TraceMap, v: T) => v is (string extends T ? string : T)} */ (\n Function.call.bind(Object.hasOwnProperty)\n )\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable|undefined} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some((r) => r.isWrite())\n )\n}\n\n/**\n * Check if the value of a given node is passed through to the parent syntax as-is.\n * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.\n * @param {Node} node A node to check.\n * @returns {node is RuleNode & {parent: Expression}} `true` if the node is passed through.\n */\nfunction isPassThrough(node) {\n const parent = /** @type {TSESTreeNode} */ (node).parent\n\n if (parent) {\n switch (parent.type) {\n case \"ConditionalExpression\":\n return parent.consequent === node || parent.alternate === node\n case \"LogicalExpression\":\n return true\n case \"SequenceExpression\":\n return (\n parent.expressions[parent.expressions.length - 1] === node\n )\n case \"ChainExpression\":\n return true\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n case \"TSInstantiationExpression\":\n return true\n\n default:\n return false\n }\n }\n return false\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"globalThis\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(globalScope, options = {}) {\n const {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"globalThis\", \"self\", \"window\"],\n } = options\n /** @private @type {Variable[]} */\n this.variableStack = []\n /** @private */\n this.globalScope = globalScope\n /** @private */\n this.mode = mode\n /** @private */\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (variable),\n path,\n nextTraceMap,\n true,\n )\n }\n\n for (const key of this.globalObjectNames) {\n /** @type {string[]} */\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (variable),\n path,\n traceMap,\n false,\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(\n /** @type {CallExpression} */ (node).arguments[0],\n )\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n /** @type {CallExpression} */ (node),\n path,\n nextTraceMap,\n )\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = /** @type {Program} */ (this.globalScope.block)\n\n for (const node of programNode.body) {\n if (!isHasSource(node)) {\n continue\n }\n const moduleId = /** @type {string} */ (node.source.value)\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield {\n // eslint-disable-next-line object-shorthand -- apply type\n node: /** @type {RuleNode} */ (node),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n // eslint-disable-next-line object-shorthand -- apply type\n node: /** @type {RuleNode} */ (node),\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? { default: nextTraceMap, ...nextTraceMap }\n : { default: nextTraceMap },\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the property references for a given expression AST node.\n * @template T\n * @param {Expression} node The expression AST node to iterate property references.\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate property references.\n */\n *iteratePropertyReferences(node, traceMap) {\n yield* this._iteratePropertyReferences(node, [], traceMap)\n }\n\n /**\n * Iterate the references for a given variable.\n * @private\n * @template T\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = /** @type {RuleNode & Identifier} */ (\n reference.identifier\n )\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @private\n * @template T\n * @param {Expression} rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (isPassThrough(node)) {\n node = node.parent\n }\n\n const parent = /** @type {RuleNode} */ (node).parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap,\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @private\n * @template T\n * @param {Pattern} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(\n /** @type {AssignmentProperty} */ (property),\n )\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (property),\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n /** @type {AssignmentProperty} */ (property).value,\n nextPath,\n nextTraceMap,\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @private\n * @template T\n * @param {ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (specifierNode),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (\n findVariable(this.globalScope, specifierNode.local)\n ),\n path,\n nextTraceMap,\n false,\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (\n findVariable(this.globalScope, specifierNode.local)\n ),\n path,\n traceMap,\n false,\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key =\n specifierNode.local.type === \"Identifier\"\n ? specifierNode.local.name\n : specifierNode.local.value\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (specifierNode),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","/** @typedef {import(\"./types.mjs\").StaticValue} StaticValue */\n/** @typedef {import(\"./types.mjs\").StaticValueOptional} StaticValueOptional */\n/** @typedef {import(\"./types.mjs\").StaticValueProvided} StaticValueProvided */\n/** @typedef {import(\"./types.mjs\").ReferenceTrackerOptions} ReferenceTrackerOptions */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMap} TraceMap\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TrackedReferences} TrackedReferences\n */\n/** @typedef {import(\"./types.mjs\").HasSideEffectOptions} HasSideEffectOptions */\n/** @typedef {import(\"./types.mjs\").ArrowToken} ArrowToken */\n/** @typedef {import(\"./types.mjs\").CommaToken} CommaToken */\n/** @typedef {import(\"./types.mjs\").SemicolonToken} SemicolonToken */\n/** @typedef {import(\"./types.mjs\").ColonToken} ColonToken */\n/** @typedef {import(\"./types.mjs\").OpeningParenToken} OpeningParenToken */\n/** @typedef {import(\"./types.mjs\").ClosingParenToken} ClosingParenToken */\n/** @typedef {import(\"./types.mjs\").OpeningBracketToken} OpeningBracketToken */\n/** @typedef {import(\"./types.mjs\").ClosingBracketToken} ClosingBracketToken */\n/** @typedef {import(\"./types.mjs\").OpeningBraceToken} OpeningBraceToken */\n/** @typedef {import(\"./types.mjs\").ClosingBraceToken} ClosingBraceToken */\n\nimport { findVariable } from \"./find-variable.mjs\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location.mjs\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind.mjs\"\nimport { getInnermostScope } from \"./get-innermost-scope.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStaticValue } from \"./get-static-value.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\nimport { hasSideEffect } from \"./has-side-effect.mjs\"\nimport { isParenthesized } from \"./is-parenthesized.mjs\"\nimport { PatternMatcher } from \"./pattern-matcher.mjs\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker.mjs\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate.mjs\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\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AACpB,IAAI,cAAc;AAClB,IAAI,IAAI;AACR,IAAI,gBAAgB;AACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/slider/node_modules/@eslint-community/eslint-utils/index.mjs b/slider/node_modules/@eslint-community/eslint-utils/index.mjs new file mode 100644 index 0000000..c062ca7 --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/index.mjs @@ -0,0 +1,2566 @@ +import { getKeys, KEYS } from 'eslint-visitor-keys'; + +/** @typedef {import("eslint").Scope.Scope} Scope */ +/** @typedef {import("estree").Node} Node */ + +/** + * Get the innermost scope which contains a given location. + * @param {Scope} initialScope The initial scope to search. + * @param {Node} node The location to search. + * @returns {Scope} The innermost scope. + */ +function getInnermostScope(initialScope, node) { + const location = /** @type {[number, number]} */ (node.range)[0]; + + let scope = initialScope; + let found = false; + do { + found = false; + for (const childScope of scope.childScopes) { + const range = /** @type {[number, number]} */ ( + childScope.block.range + ); + + if (range[0] <= location && location < range[1]) { + scope = childScope; + found = true; + break + } + } + } while (found) + + return scope +} + +/** @typedef {import("eslint").Scope.Scope} Scope */ +/** @typedef {import("eslint").Scope.Variable} Variable */ +/** @typedef {import("estree").Identifier} Identifier */ + +/** + * Find the variable of a given name. + * @param {Scope} initialScope The scope to start finding. + * @param {string|Identifier} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node. + * @returns {Variable|null} The found variable or null. + */ +function findVariable(initialScope, nameOrNode) { + let name = ""; + /** @type {Scope|null} */ + let scope = initialScope; + + if (typeof nameOrNode === "string") { + name = nameOrNode; + } else { + name = nameOrNode.name; + scope = getInnermostScope(scope, nameOrNode); + } + + while (scope != null) { + const variable = scope.set.get(name); + if (variable != null) { + return variable + } + scope = scope.upper; + } + + return null +} + +/** @typedef {import("eslint").AST.Token} Token */ +/** @typedef {import("estree").Comment} Comment */ +/** @typedef {import("./types.mjs").ArrowToken} ArrowToken */ +/** @typedef {import("./types.mjs").CommaToken} CommaToken */ +/** @typedef {import("./types.mjs").SemicolonToken} SemicolonToken */ +/** @typedef {import("./types.mjs").ColonToken} ColonToken */ +/** @typedef {import("./types.mjs").OpeningParenToken} OpeningParenToken */ +/** @typedef {import("./types.mjs").ClosingParenToken} ClosingParenToken */ +/** @typedef {import("./types.mjs").OpeningBracketToken} OpeningBracketToken */ +/** @typedef {import("./types.mjs").ClosingBracketToken} ClosingBracketToken */ +/** @typedef {import("./types.mjs").OpeningBraceToken} OpeningBraceToken */ +/** @typedef {import("./types.mjs").ClosingBraceToken} ClosingBraceToken */ +/** + * @template {string} Value + * @typedef {import("./types.mjs").PunctuatorToken} PunctuatorToken + */ + +/** @typedef {Comment | Token} CommentOrToken */ + +/** + * Creates the negate function of the given function. + * @param {function(CommentOrToken):boolean} f - The function to negate. + * @returns {function(CommentOrToken):boolean} Negated function. + */ +function negate(f) { + return (token) => !f(token) +} + +/** + * Checks if the given token is a PunctuatorToken with the given value + * @template {string} Value + * @param {CommentOrToken} token - The token to check. + * @param {Value} value - The value to check. + * @returns {token is PunctuatorToken} `true` if the token is a PunctuatorToken with the given value. + */ +function isPunctuatorTokenWithValue(token, value) { + return token.type === "Punctuator" && token.value === value +} + +/** + * Checks if the given token is an arrow token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is ArrowToken} `true` if the token is an arrow token. + */ +function isArrowToken(token) { + return isPunctuatorTokenWithValue(token, "=>") +} + +/** + * Checks if the given token is a comma token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is CommaToken} `true` if the token is a comma token. + */ +function isCommaToken(token) { + return isPunctuatorTokenWithValue(token, ",") +} + +/** + * Checks if the given token is a semicolon token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is SemicolonToken} `true` if the token is a semicolon token. + */ +function isSemicolonToken(token) { + return isPunctuatorTokenWithValue(token, ";") +} + +/** + * Checks if the given token is a colon token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is ColonToken} `true` if the token is a colon token. + */ +function isColonToken(token) { + return isPunctuatorTokenWithValue(token, ":") +} + +/** + * Checks if the given token is an opening parenthesis token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is OpeningParenToken} `true` if the token is an opening parenthesis token. + */ +function isOpeningParenToken(token) { + return isPunctuatorTokenWithValue(token, "(") +} + +/** + * Checks if the given token is a closing parenthesis token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is ClosingParenToken} `true` if the token is a closing parenthesis token. + */ +function isClosingParenToken(token) { + return isPunctuatorTokenWithValue(token, ")") +} + +/** + * Checks if the given token is an opening square bracket token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is OpeningBracketToken} `true` if the token is an opening square bracket token. + */ +function isOpeningBracketToken(token) { + return isPunctuatorTokenWithValue(token, "[") +} + +/** + * Checks if the given token is a closing square bracket token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is ClosingBracketToken} `true` if the token is a closing square bracket token. + */ +function isClosingBracketToken(token) { + return isPunctuatorTokenWithValue(token, "]") +} + +/** + * Checks if the given token is an opening brace token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is OpeningBraceToken} `true` if the token is an opening brace token. + */ +function isOpeningBraceToken(token) { + return isPunctuatorTokenWithValue(token, "{") +} + +/** + * Checks if the given token is a closing brace token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is ClosingBraceToken} `true` if the token is a closing brace token. + */ +function isClosingBraceToken(token) { + return isPunctuatorTokenWithValue(token, "}") +} + +/** + * Checks if the given token is a comment token or not. + * @param {CommentOrToken} token - The token to check. + * @returns {token is Comment} `true` if the token is a comment token. + */ +function isCommentToken(token) { + return ["Block", "Line", "Shebang"].includes(token.type) +} + +const isNotArrowToken = negate(isArrowToken); +const isNotCommaToken = negate(isCommaToken); +const isNotSemicolonToken = negate(isSemicolonToken); +const isNotColonToken = negate(isColonToken); +const isNotOpeningParenToken = negate(isOpeningParenToken); +const isNotClosingParenToken = negate(isClosingParenToken); +const isNotOpeningBracketToken = negate(isOpeningBracketToken); +const isNotClosingBracketToken = negate(isClosingBracketToken); +const isNotOpeningBraceToken = negate(isOpeningBraceToken); +const isNotClosingBraceToken = negate(isClosingBraceToken); +const isNotCommentToken = negate(isCommentToken); + +/** @typedef {import("eslint").Rule.Node} RuleNode */ +/** @typedef {import("eslint").SourceCode} SourceCode */ +/** @typedef {import("eslint").AST.Token} Token */ +/** @typedef {import("estree").Function} FunctionNode */ +/** @typedef {import("estree").FunctionDeclaration} FunctionDeclaration */ +/** @typedef {import("estree").FunctionExpression} FunctionExpression */ +/** @typedef {import("estree").SourceLocation} SourceLocation */ +/** @typedef {import("estree").Position} Position */ + +/** + * Get the `(` token of the given function node. + * @param {FunctionExpression | FunctionDeclaration} node - The function node to get. + * @param {SourceCode} sourceCode - The source code object to get tokens. + * @returns {Token} `(` token. + */ +function getOpeningParenOfParams(node, sourceCode) { + return node.id + ? /** @type {Token} */ ( + sourceCode.getTokenAfter(node.id, isOpeningParenToken) + ) + : /** @type {Token} */ ( + sourceCode.getFirstToken(node, isOpeningParenToken) + ) +} + +/** + * Get the location of the given function node for reporting. + * @param {FunctionNode} node - The function node to get. + * @param {SourceCode} sourceCode - The source code object to get tokens. + * @returns {SourceLocation|null} The location of the function node for reporting. + */ +function getFunctionHeadLocation(node, sourceCode) { + const parent = /** @type {RuleNode} */ (node).parent; + + /** @type {Position|null} */ + let start = null; + /** @type {Position|null} */ + let end = null; + + if (node.type === "ArrowFunctionExpression") { + const arrowToken = /** @type {Token} */ ( + sourceCode.getTokenBefore(node.body, isArrowToken) + ); + + start = arrowToken.loc.start; + end = arrowToken.loc.end; + } else if ( + parent.type === "Property" || + parent.type === "MethodDefinition" || + parent.type === "PropertyDefinition" + ) { + start = /** @type {SourceLocation} */ (parent.loc).start; + end = getOpeningParenOfParams(node, sourceCode).loc.start; + } else { + start = /** @type {SourceLocation} */ (node.loc).start; + end = getOpeningParenOfParams(node, sourceCode).loc.start; + } + + return { + start: { ...start }, + end: { ...end }, + } +} + +/* globals globalThis, global, self, window */ +/** @typedef {import("./types.mjs").StaticValue} StaticValue */ +/** @typedef {import("eslint").Scope.Scope} Scope */ +/** @typedef {import("eslint").Scope.Variable} Variable */ +/** @typedef {import("estree").Node} Node */ +/** @typedef {import("@typescript-eslint/types").TSESTree.Node} TSESTreeNode */ +/** @typedef {import("@typescript-eslint/types").TSESTree.AST_NODE_TYPES} TSESTreeNodeTypes */ +/** @typedef {import("@typescript-eslint/types").TSESTree.MemberExpression} MemberExpression */ +/** @typedef {import("@typescript-eslint/types").TSESTree.Property} Property */ +/** @typedef {import("@typescript-eslint/types").TSESTree.RegExpLiteral} RegExpLiteral */ +/** @typedef {import("@typescript-eslint/types").TSESTree.BigIntLiteral} BigIntLiteral */ +/** @typedef {import("@typescript-eslint/types").TSESTree.Literal} Literal */ + +const globalObject = + typeof globalThis !== "undefined" + ? globalThis + : // @ts-ignore + typeof self !== "undefined" + ? // @ts-ignore + self + : // @ts-ignore + typeof window !== "undefined" + ? // @ts-ignore + window + : typeof global !== "undefined" + ? global + : {}; + +const builtinNames = Object.freeze( + new Set([ + "Array", + "ArrayBuffer", + "BigInt", + "BigInt64Array", + "BigUint64Array", + "Boolean", + "DataView", + "Date", + "decodeURI", + "decodeURIComponent", + "encodeURI", + "encodeURIComponent", + "escape", + "Float32Array", + "Float64Array", + "Function", + "Infinity", + "Int16Array", + "Int32Array", + "Int8Array", + "isFinite", + "isNaN", + "isPrototypeOf", + "JSON", + "Map", + "Math", + "NaN", + "Number", + "Object", + "parseFloat", + "parseInt", + "Promise", + "Proxy", + "Reflect", + "RegExp", + "Set", + "String", + "Symbol", + "Uint16Array", + "Uint32Array", + "Uint8Array", + "Uint8ClampedArray", + "undefined", + "unescape", + "WeakMap", + "WeakSet", + ]), +); +const callAllowed = new Set( + [ + Array.isArray, + Array.of, + Array.prototype.at, + Array.prototype.concat, + Array.prototype.entries, + Array.prototype.every, + Array.prototype.filter, + Array.prototype.find, + Array.prototype.findIndex, + Array.prototype.flat, + Array.prototype.includes, + Array.prototype.indexOf, + Array.prototype.join, + Array.prototype.keys, + Array.prototype.lastIndexOf, + Array.prototype.slice, + Array.prototype.some, + Array.prototype.toString, + Array.prototype.values, + typeof BigInt === "function" ? BigInt : undefined, + Boolean, + Date, + Date.parse, + decodeURI, + decodeURIComponent, + encodeURI, + encodeURIComponent, + escape, + isFinite, + isNaN, + // @ts-ignore + isPrototypeOf, + Map, + Map.prototype.entries, + Map.prototype.get, + Map.prototype.has, + Map.prototype.keys, + Map.prototype.values, + .../** @type {(keyof typeof Math)[]} */ ( + Object.getOwnPropertyNames(Math) + ) + .filter((k) => k !== "random") + .map((k) => Math[k]) + .filter((f) => typeof f === "function"), + Number, + Number.isFinite, + Number.isNaN, + Number.parseFloat, + Number.parseInt, + Number.prototype.toExponential, + Number.prototype.toFixed, + Number.prototype.toPrecision, + Number.prototype.toString, + Object, + Object.entries, + Object.is, + Object.isExtensible, + Object.isFrozen, + Object.isSealed, + Object.keys, + Object.values, + parseFloat, + parseInt, + RegExp, + Set, + Set.prototype.entries, + Set.prototype.has, + Set.prototype.keys, + Set.prototype.values, + String, + String.fromCharCode, + String.fromCodePoint, + String.raw, + String.prototype.at, + String.prototype.charAt, + String.prototype.charCodeAt, + String.prototype.codePointAt, + String.prototype.concat, + String.prototype.endsWith, + String.prototype.includes, + String.prototype.indexOf, + String.prototype.lastIndexOf, + String.prototype.normalize, + String.prototype.padEnd, + String.prototype.padStart, + String.prototype.slice, + String.prototype.startsWith, + String.prototype.substr, + String.prototype.substring, + String.prototype.toLowerCase, + String.prototype.toString, + String.prototype.toUpperCase, + String.prototype.trim, + String.prototype.trimEnd, + String.prototype.trimLeft, + String.prototype.trimRight, + String.prototype.trimStart, + Symbol.for, + Symbol.keyFor, + unescape, + ].filter((f) => typeof f === "function"), +); +const callPassThrough = new Set([ + Object.freeze, + Object.preventExtensions, + Object.seal, +]); + +/** @type {ReadonlyArray]>} */ +const getterAllowed = [ + [Map, new Set(["size"])], + [ + RegExp, + new Set([ + "dotAll", + "flags", + "global", + "hasIndices", + "ignoreCase", + "multiline", + "source", + "sticky", + "unicode", + ]), + ], + [Set, new Set(["size"])], +]; + +/** + * Get the property descriptor. + * @param {object} object The object to get. + * @param {string|number|symbol} name The property name to get. + */ +function getPropertyDescriptor(object, name) { + let x = object; + while ((typeof x === "object" || typeof x === "function") && x !== null) { + const d = Object.getOwnPropertyDescriptor(x, name); + if (d) { + return d + } + x = Object.getPrototypeOf(x); + } + return null +} + +/** + * Check if a property is getter or not. + * @param {object} object The object to check. + * @param {string|number|symbol} name The property name to check. + */ +function isGetter(object, name) { + const d = getPropertyDescriptor(object, name); + return d != null && d.get != null +} + +/** + * Get the element values of a given node list. + * @param {(Node|TSESTreeNode|null)[]} nodeList The node list to get values. + * @param {Scope|undefined|null} initialScope The initial scope to find variables. + * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null. + */ +function getElementValues(nodeList, initialScope) { + const valueList = []; + + for (let i = 0; i < nodeList.length; ++i) { + const elementNode = nodeList[i]; + + if (elementNode == null) { + valueList.length = i + 1; + } else if (elementNode.type === "SpreadElement") { + const argument = getStaticValueR(elementNode.argument, initialScope); + if (argument == null) { + return null + } + valueList.push(.../** @type {Iterable} */ (argument.value)); + } else { + const element = getStaticValueR(elementNode, initialScope); + if (element == null) { + return null + } + valueList.push(element.value); + } + } + + return valueList +} + +/** + * Checks if a variable is a built-in global. + * @param {Variable|null} variable The variable to check. + * @returns {variable is Variable & {defs:[]}} + */ +function isBuiltinGlobal(variable) { + return ( + variable != null && + variable.defs.length === 0 && + builtinNames.has(variable.name) && + variable.name in globalObject + ) +} + +/** + * Checks if a variable can be considered as a constant. + * @param {Variable} variable + * @returns {variable is Variable & {defs: [import("eslint").Scope.Definition & { type: "Variable" }]}} True if the variable can be considered as a constant. + */ +function canBeConsideredConst(variable) { + if (variable.defs.length !== 1) { + return false + } + const def = variable.defs[0]; + return Boolean( + def.parent && + def.type === "Variable" && + (def.parent.kind === "const" || isEffectivelyConst(variable)), + ) +} + +/** + * Returns whether the given variable is never written to after initialization. + * @param {Variable} variable + * @returns {boolean} + */ +function isEffectivelyConst(variable) { + const refs = variable.references; + + const inits = refs.filter((r) => r.init).length; + const reads = refs.filter((r) => r.isReadOnly()).length; + if (inits === 1 && reads + inits === refs.length) { + // there is only one init and all other references only read + return true + } + return false +} + +/** + * Checks if a variable has mutation in its property. + * @param {Variable} variable The variable to check. + * @param {Scope|null} initialScope The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it. + * @returns {boolean} True if the variable has mutation in its property. + */ +function hasMutationInProperty(variable, initialScope) { + for (const ref of variable.references) { + let node = /** @type {TSESTreeNode} */ (ref.identifier); + while (node && node.parent && node.parent.type === "MemberExpression") { + node = node.parent; + } + if (!node || !node.parent) { + continue + } + if ( + (node.parent.type === "AssignmentExpression" && + node.parent.left === node) || + (node.parent.type === "UpdateExpression" && + node.parent.argument === node) + ) { + // This is a mutation. + return true + } + if ( + node.parent.type === "CallExpression" && + node.parent.callee === node && + node.type === "MemberExpression" + ) { + const methodName = getStaticPropertyNameValue(node, initialScope); + if (isNameOfMutationArrayMethod(methodName)) { + // This is a mutation. + return true + } + } + } + return false + + /** + * Checks if a method name is one of the mutation array methods. + * @param {StaticValue|null} methodName The method name to check. + * @returns {boolean} True if the method name is a mutation array method. + */ + function isNameOfMutationArrayMethod(methodName) { + if (methodName == null || methodName.value == null) { + return false + } + const name = methodName.value; + return ( + name === "copyWithin" || + name === "fill" || + name === "pop" || + name === "push" || + name === "reverse" || + name === "shift" || + name === "sort" || + name === "splice" || + name === "unshift" + ) + } +} + +/** + * @template {TSESTreeNodeTypes} T + * @callback VisitorCallback + * @param {TSESTreeNode & { type: T }} node + * @param {Scope|undefined|null} initialScope + * @returns {StaticValue | null} + */ +/** + * @typedef { { [K in TSESTreeNodeTypes]?: VisitorCallback } } Operations + */ +/** + * @type {Operations} + */ +const operations = Object.freeze({ + ArrayExpression(node, initialScope) { + const elements = getElementValues(node.elements, initialScope); + return elements != null ? { value: elements } : null + }, + + AssignmentExpression(node, initialScope) { + if (node.operator === "=") { + return getStaticValueR(node.right, initialScope) + } + return null + }, + + //eslint-disable-next-line complexity + BinaryExpression(node, initialScope) { + if (node.operator === "in" || node.operator === "instanceof") { + // Not supported. + return null + } + + const left = getStaticValueR(node.left, initialScope); + const right = getStaticValueR(node.right, initialScope); + if (left != null && right != null) { + switch (node.operator) { + case "==": + return { value: left.value == right.value } //eslint-disable-line eqeqeq + case "!=": + return { value: left.value != right.value } //eslint-disable-line eqeqeq + case "===": + return { value: left.value === right.value } + case "!==": + return { value: left.value !== right.value } + case "<": + return { + value: + /** @type {any} */ (left.value) < + /** @type {any} */ (right.value), + } + case "<=": + return { + value: + /** @type {any} */ (left.value) <= + /** @type {any} */ (right.value), + } + case ">": + return { + value: + /** @type {any} */ (left.value) > + /** @type {any} */ (right.value), + } + case ">=": + return { + value: + /** @type {any} */ (left.value) >= + /** @type {any} */ (right.value), + } + case "<<": + return { + value: + /** @type {any} */ (left.value) << + /** @type {any} */ (right.value), + } + case ">>": + return { + value: + /** @type {any} */ (left.value) >> + /** @type {any} */ (right.value), + } + case ">>>": + return { + value: + /** @type {any} */ (left.value) >>> + /** @type {any} */ (right.value), + } + case "+": + return { + value: + /** @type {any} */ (left.value) + + /** @type {any} */ (right.value), + } + case "-": + return { + value: + /** @type {any} */ (left.value) - + /** @type {any} */ (right.value), + } + case "*": + return { + value: + /** @type {any} */ (left.value) * + /** @type {any} */ (right.value), + } + case "/": + return { + value: + /** @type {any} */ (left.value) / + /** @type {any} */ (right.value), + } + case "%": + return { + value: + /** @type {any} */ (left.value) % + /** @type {any} */ (right.value), + } + case "**": + return { + value: + /** @type {any} */ (left.value) ** + /** @type {any} */ (right.value), + } + case "|": + return { + value: + /** @type {any} */ (left.value) | + /** @type {any} */ (right.value), + } + case "^": + return { + value: + /** @type {any} */ (left.value) ^ + /** @type {any} */ (right.value), + } + case "&": + return { + value: + /** @type {any} */ (left.value) & + /** @type {any} */ (right.value), + } + + // no default + } + } + + return null + }, + + CallExpression(node, initialScope) { + const calleeNode = node.callee; + const args = getElementValues(node.arguments, initialScope); + + if (args != null) { + if (calleeNode.type === "MemberExpression") { + if (calleeNode.property.type === "PrivateIdentifier") { + return null + } + const object = getStaticValueR(calleeNode.object, initialScope); + if (object != null) { + if ( + object.value == null && + (object.optional || node.optional) + ) { + return { value: undefined, optional: true } + } + const property = getStaticPropertyNameValue( + calleeNode, + initialScope, + ); + + if (property != null) { + const receiver = + /** @type {Record any>} */ ( + object.value + ); + const methodName = /** @type {PropertyKey} */ ( + property.value + ); + if (callAllowed.has(receiver[methodName])) { + return { + value: receiver[methodName](...args), + } + } + if (callPassThrough.has(receiver[methodName])) { + return { value: args[0] } + } + } + } + } else { + const callee = getStaticValueR(calleeNode, initialScope); + if (callee != null) { + if (callee.value == null && node.optional) { + return { value: undefined, optional: true } + } + const func = /** @type {(...args: any[]) => any} */ ( + callee.value + ); + if (callAllowed.has(func)) { + return { value: func(...args) } + } + if (callPassThrough.has(func)) { + return { value: args[0] } + } + } + } + } + + return null + }, + + ConditionalExpression(node, initialScope) { + const test = getStaticValueR(node.test, initialScope); + if (test != null) { + return test.value + ? getStaticValueR(node.consequent, initialScope) + : getStaticValueR(node.alternate, initialScope) + } + return null + }, + + ExpressionStatement(node, initialScope) { + return getStaticValueR(node.expression, initialScope) + }, + + Identifier(node, initialScope) { + if (initialScope != null) { + const variable = findVariable(initialScope, node); + + if (variable != null) { + // Built-in globals. + if (isBuiltinGlobal(variable)) { + return { value: globalObject[variable.name] } + } + + // Constants. + if (canBeConsideredConst(variable)) { + const def = variable.defs[0]; + if ( + // TODO(mysticatea): don't support destructuring here. + def.node.id.type === "Identifier" + ) { + const init = getStaticValueR( + def.node.init, + initialScope, + ); + if ( + init && + typeof init.value === "object" && + init.value !== null + ) { + if (hasMutationInProperty(variable, initialScope)) { + // This variable has mutation in its property. + return null + } + } + return init + } + } + } + } + return null + }, + + Literal(node) { + const literal = + /** @type {Partial & Partial & Partial} */ ( + node + ); + //istanbul ignore if : this is implementation-specific behavior. + if ( + (literal.regex != null || literal.bigint != null) && + literal.value == null + ) { + // It was a RegExp/BigInt literal, but Node.js didn't support it. + return null + } + return { value: literal.value } + }, + + LogicalExpression(node, initialScope) { + const left = getStaticValueR(node.left, initialScope); + if (left != null) { + if ( + (node.operator === "||" && Boolean(left.value) === true) || + (node.operator === "&&" && Boolean(left.value) === false) || + (node.operator === "??" && left.value != null) + ) { + return left + } + + const right = getStaticValueR(node.right, initialScope); + if (right != null) { + return right + } + } + + return null + }, + + MemberExpression(node, initialScope) { + if (node.property.type === "PrivateIdentifier") { + return null + } + const object = getStaticValueR(node.object, initialScope); + if (object != null) { + if (object.value == null && (object.optional || node.optional)) { + return { value: undefined, optional: true } + } + const property = getStaticPropertyNameValue(node, initialScope); + + if (property != null) { + if ( + !isGetter( + /** @type {object} */ (object.value), + /** @type {PropertyKey} */ (property.value), + ) + ) { + return { + value: /** @type {Record} */ ( + object.value + )[/** @type {PropertyKey} */ (property.value)], + } + } + + for (const [classFn, allowed] of getterAllowed) { + if ( + object.value instanceof classFn && + allowed.has(/** @type {string} */ (property.value)) + ) { + return { + value: /** @type {Record} */ ( + object.value + )[/** @type {PropertyKey} */ (property.value)], + } + } + } + } + } + return null + }, + + ChainExpression(node, initialScope) { + const expression = getStaticValueR(node.expression, initialScope); + if (expression != null) { + return { value: expression.value } + } + return null + }, + + NewExpression(node, initialScope) { + const callee = getStaticValueR(node.callee, initialScope); + const args = getElementValues(node.arguments, initialScope); + + if (callee != null && args != null) { + const Func = /** @type {new (...args: any[]) => any} */ ( + callee.value + ); + if (callAllowed.has(Func)) { + return { value: new Func(...args) } + } + } + + return null + }, + + ObjectExpression(node, initialScope) { + /** @type {Record} */ + const object = {}; + + for (const propertyNode of node.properties) { + if (propertyNode.type === "Property") { + if (propertyNode.kind !== "init") { + return null + } + const key = getStaticPropertyNameValue( + propertyNode, + initialScope, + ); + const value = getStaticValueR(propertyNode.value, initialScope); + if (key == null || value == null) { + return null + } + object[/** @type {PropertyKey} */ (key.value)] = value.value; + } else if ( + propertyNode.type === "SpreadElement" || + // @ts-expect-error -- Backward compatibility + propertyNode.type === "ExperimentalSpreadProperty" + ) { + const argument = getStaticValueR( + propertyNode.argument, + initialScope, + ); + if (argument == null) { + return null + } + Object.assign(object, argument.value); + } else { + return null + } + } + + return { value: object } + }, + + SequenceExpression(node, initialScope) { + const last = node.expressions[node.expressions.length - 1]; + return getStaticValueR(last, initialScope) + }, + + TaggedTemplateExpression(node, initialScope) { + const tag = getStaticValueR(node.tag, initialScope); + const expressions = getElementValues( + node.quasi.expressions, + initialScope, + ); + + if (tag != null && expressions != null) { + const func = /** @type {(...args: any[]) => any} */ (tag.value); + /** @type {any[] & { raw?: string[] }} */ + const strings = node.quasi.quasis.map((q) => q.value.cooked); + strings.raw = node.quasi.quasis.map((q) => q.value.raw); + + if (func === String.raw) { + return { value: func(strings, ...expressions) } + } + } + + return null + }, + + TemplateLiteral(node, initialScope) { + const expressions = getElementValues(node.expressions, initialScope); + if (expressions != null) { + let value = node.quasis[0].value.cooked; + for (let i = 0; i < expressions.length; ++i) { + value += expressions[i]; + value += /** @type {string} */ (node.quasis[i + 1].value.cooked); + } + return { value } + } + return null + }, + + UnaryExpression(node, initialScope) { + if (node.operator === "delete") { + // Not supported. + return null + } + if (node.operator === "void") { + return { value: undefined } + } + + const arg = getStaticValueR(node.argument, initialScope); + if (arg != null) { + switch (node.operator) { + case "-": + return { value: -(/** @type {any} */ (arg.value)) } + case "+": + return { value: +(/** @type {any} */ (arg.value)) } //eslint-disable-line no-implicit-coercion + case "!": + return { value: !arg.value } + case "~": + return { value: ~(/** @type {any} */ (arg.value)) } + case "typeof": + return { value: typeof arg.value } + + // no default + } + } + + return null + }, + TSAsExpression(node, initialScope) { + return getStaticValueR(node.expression, initialScope) + }, + TSSatisfiesExpression(node, initialScope) { + return getStaticValueR(node.expression, initialScope) + }, + TSTypeAssertion(node, initialScope) { + return getStaticValueR(node.expression, initialScope) + }, + TSNonNullExpression(node, initialScope) { + return getStaticValueR(node.expression, initialScope) + }, + TSInstantiationExpression(node, initialScope) { + return getStaticValueR(node.expression, initialScope) + }, +}); + +/** + * Get the value of a given node if it's a static value. + * @param {Node|TSESTreeNode|null|undefined} node The node to get. + * @param {Scope|undefined|null} initialScope The scope to start finding variable. + * @returns {StaticValue|null} The static value of the node, or `null`. + */ +function getStaticValueR(node, initialScope) { + if (node != null && Object.hasOwnProperty.call(operations, node.type)) { + return /** @type {VisitorCallback} */ (operations[node.type])( + /** @type {TSESTreeNode} */ (node), + initialScope, + ) + } + return null +} + +/** + * Get the static value of property name from a MemberExpression node or a Property node. + * @param {MemberExpression|Property} node The node to get. + * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it. + * @returns {StaticValue|null} The static value of the property name of the node, or `null`. + */ +function getStaticPropertyNameValue(node, initialScope) { + const nameNode = node.type === "Property" ? node.key : node.property; + + if (node.computed) { + return getStaticValueR(nameNode, initialScope) + } + + if (nameNode.type === "Identifier") { + return { value: nameNode.name } + } + + if (nameNode.type === "Literal") { + if (/** @type {Partial} */ (nameNode).bigint) { + return { value: /** @type {BigIntLiteral} */ (nameNode).bigint } + } + return { value: String(nameNode.value) } + } + + return null +} + +/** + * Get the value of a given node if it's a static value. + * @param {Node} node The node to get. + * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible. + * @returns {StaticValue | null} The static value of the node, or `null`. + */ +function getStaticValue(node, initialScope = null) { + try { + return getStaticValueR(node, initialScope) + } catch (_error) { + return null + } +} + +/** @typedef {import("eslint").Scope.Scope} Scope */ +/** @typedef {import("estree").Node} Node */ +/** @typedef {import("estree").RegExpLiteral} RegExpLiteral */ +/** @typedef {import("estree").BigIntLiteral} BigIntLiteral */ +/** @typedef {import("estree").SimpleLiteral} SimpleLiteral */ + +/** + * Get the value of a given node if it's a literal or a template literal. + * @param {Node} node The node to get. + * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant. + * @returns {string|null} The value of the node, or `null`. + */ +function getStringIfConstant(node, initialScope = null) { + // Handle the literals that the platform doesn't support natively. + if (node && node.type === "Literal" && node.value === null) { + const literal = + /** @type {Partial & Partial & Partial} */ ( + node + ); + if (literal.regex) { + return `/${literal.regex.pattern}/${literal.regex.flags}` + } + if (literal.bigint) { + return literal.bigint + } + } + + const evaluated = getStaticValue(node, initialScope); + + if (evaluated) { + // `String(Symbol.prototype)` throws error + try { + return String(evaluated.value) + } catch { + // No op + } + } + + return null +} + +/** @typedef {import("eslint").Scope.Scope} Scope */ +/** @typedef {import("estree").MemberExpression} MemberExpression */ +/** @typedef {import("estree").MethodDefinition} MethodDefinition */ +/** @typedef {import("estree").Property} Property */ +/** @typedef {import("estree").PropertyDefinition} PropertyDefinition */ +/** @typedef {import("estree").Identifier} Identifier */ + +/** + * Get the property name from a MemberExpression node or a Property node. + * @param {MemberExpression | MethodDefinition | Property | PropertyDefinition} node The node to get. + * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it. + * @returns {string|null|undefined} The property name of the node. + */ +function getPropertyName(node, initialScope) { + switch (node.type) { + case "MemberExpression": + if (node.computed) { + return getStringIfConstant(node.property, initialScope) + } + if (node.property.type === "PrivateIdentifier") { + return null + } + return /** @type {Partial} */ (node.property).name + + case "Property": + case "MethodDefinition": + case "PropertyDefinition": + if (node.computed) { + return getStringIfConstant(node.key, initialScope) + } + if (node.key.type === "Literal") { + return String(node.key.value) + } + if (node.key.type === "PrivateIdentifier") { + return null + } + return /** @type {Partial} */ (node.key).name + } + + return null +} + +/** @typedef {import("eslint").Rule.Node} RuleNode */ +/** @typedef {import("eslint").SourceCode} SourceCode */ +/** @typedef {import("estree").Function} FunctionNode */ +/** @typedef {import("estree").FunctionDeclaration} FunctionDeclaration */ +/** @typedef {import("estree").FunctionExpression} FunctionExpression */ +/** @typedef {import("estree").Identifier} Identifier */ + +/** + * Get the name and kind of the given function node. + * @param {FunctionNode} node - The function node to get. + * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys. + * @returns {string} The name and kind of the function node. + */ +// eslint-disable-next-line complexity +function getFunctionNameWithKind(node, sourceCode) { + const parent = /** @type {RuleNode} */ (node).parent; + const tokens = []; + const isObjectMethod = parent.type === "Property" && parent.value === node; + const isClassMethod = + parent.type === "MethodDefinition" && parent.value === node; + const isClassFieldMethod = + parent.type === "PropertyDefinition" && parent.value === node; + + // Modifiers. + if (isClassMethod || isClassFieldMethod) { + if (parent.static) { + tokens.push("static"); + } + if (parent.key.type === "PrivateIdentifier") { + tokens.push("private"); + } + } + if (node.async) { + tokens.push("async"); + } + if (node.generator) { + tokens.push("generator"); + } + + // Kinds. + if (isObjectMethod || isClassMethod) { + if (parent.kind === "constructor") { + return "constructor" + } + if (parent.kind === "get") { + tokens.push("getter"); + } else if (parent.kind === "set") { + tokens.push("setter"); + } else { + tokens.push("method"); + } + } else if (isClassFieldMethod) { + tokens.push("method"); + } else { + if (node.type === "ArrowFunctionExpression") { + tokens.push("arrow"); + } + tokens.push("function"); + } + + // Names. + if (isObjectMethod || isClassMethod || isClassFieldMethod) { + if (parent.key.type === "PrivateIdentifier") { + tokens.push(`#${parent.key.name}`); + } else { + const name = getPropertyName(parent); + if (name) { + tokens.push(`'${name}'`); + } else if (sourceCode) { + const keyText = sourceCode.getText(parent.key); + if (!keyText.includes("\n")) { + tokens.push(`[${keyText}]`); + } + } + } + } else if (hasId(node)) { + tokens.push(`'${node.id.name}'`); + } else if ( + parent.type === "VariableDeclarator" && + parent.id && + parent.id.type === "Identifier" + ) { + tokens.push(`'${parent.id.name}'`); + } else if ( + (parent.type === "AssignmentExpression" || + parent.type === "AssignmentPattern") && + parent.left && + parent.left.type === "Identifier" + ) { + tokens.push(`'${parent.left.name}'`); + } else if ( + parent.type === "ExportDefaultDeclaration" && + parent.declaration === node + ) { + tokens.push("'default'"); + } + + return tokens.join(" ") +} + +/** + * @param {FunctionNode} node + * @returns {node is FunctionDeclaration | FunctionExpression & { id: Identifier }} + */ +function hasId(node) { + return Boolean( + /** @type {Partial} */ (node) + .id, + ) +} + +/** @typedef {import("estree").Node} Node */ +/** @typedef {import("eslint").SourceCode} SourceCode */ +/** @typedef {import("./types.mjs").HasSideEffectOptions} HasSideEffectOptions */ +/** @typedef {import("estree").BinaryExpression} BinaryExpression */ +/** @typedef {import("estree").MemberExpression} MemberExpression */ +/** @typedef {import("estree").MethodDefinition} MethodDefinition */ +/** @typedef {import("estree").Property} Property */ +/** @typedef {import("estree").PropertyDefinition} PropertyDefinition */ +/** @typedef {import("estree").UnaryExpression} UnaryExpression */ + +const typeConversionBinaryOps = Object.freeze( + new Set([ + "==", + "!=", + "<", + "<=", + ">", + ">=", + "<<", + ">>", + ">>>", + "+", + "-", + "*", + "/", + "%", + "|", + "^", + "&", + "in", + ]), +); +const typeConversionUnaryOps = Object.freeze(new Set(["-", "+", "!", "~"])); + +/** + * Check whether the given value is an ASTNode or not. + * @param {any} x The value to check. + * @returns {x is Node} `true` if the value is an ASTNode. + */ +function isNode(x) { + return x !== null && typeof x === "object" && typeof x.type === "string" +} + +const visitor = Object.freeze( + Object.assign(Object.create(null), { + /** + * @param {Node} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + $visit(node, options, visitorKeys) { + const { type } = node; + + if (typeof (/** @type {any} */ (this)[type]) === "function") { + return /** @type {any} */ (this)[type]( + node, + options, + visitorKeys, + ) + } + + return this.$visitChildren(node, options, visitorKeys) + }, + + /** + * @param {Node} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + $visitChildren(node, options, visitorKeys) { + const { type } = node; + + for (const key of /** @type {(keyof Node)[]} */ ( + visitorKeys[type] || getKeys(node) + )) { + const value = node[key]; + + if (Array.isArray(value)) { + for (const element of value) { + if ( + isNode(element) && + this.$visit(element, options, visitorKeys) + ) { + return true + } + } + } else if ( + isNode(value) && + this.$visit(value, options, visitorKeys) + ) { + return true + } + } + + return false + }, + + ArrowFunctionExpression() { + return false + }, + AssignmentExpression() { + return true + }, + AwaitExpression() { + return true + }, + /** + * @param {BinaryExpression} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + BinaryExpression(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + typeConversionBinaryOps.has(node.operator) && + (node.left.type !== "Literal" || node.right.type !== "Literal") + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + CallExpression() { + return true + }, + FunctionExpression() { + return false + }, + ImportExpression() { + return true + }, + /** + * @param {MemberExpression} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + MemberExpression(node, options, visitorKeys) { + if (options.considerGetters) { + return true + } + if ( + options.considerImplicitTypeConversion && + node.computed && + node.property.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + /** + * @param {MethodDefinition} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + MethodDefinition(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + NewExpression() { + return true + }, + /** + * @param {Property} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + Property(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + /** + * @param {PropertyDefinition} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + PropertyDefinition(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + /** + * @param {UnaryExpression} node + * @param {HasSideEffectOptions} options + * @param {Record} visitorKeys + */ + UnaryExpression(node, options, visitorKeys) { + if (node.operator === "delete") { + return true + } + if ( + options.considerImplicitTypeConversion && + typeConversionUnaryOps.has(node.operator) && + node.argument.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + UpdateExpression() { + return true + }, + YieldExpression() { + return true + }, + }), +); + +/** + * Check whether a given node has any side effect or not. + * @param {Node} node The node to get. + * @param {SourceCode} sourceCode The source code object. + * @param {HasSideEffectOptions} [options] The option object. + * @returns {boolean} `true` if the node has a certain side effect. + */ +function hasSideEffect(node, sourceCode, options = {}) { + const { considerGetters = false, considerImplicitTypeConversion = false } = + options; + return visitor.$visit( + node, + { considerGetters, considerImplicitTypeConversion }, + sourceCode.visitorKeys || KEYS, + ) +} + +/** @typedef {import("estree").Node} Node */ +/** @typedef {import("@typescript-eslint/types").TSESTree.NewExpression} TSNewExpression */ +/** @typedef {import("@typescript-eslint/types").TSESTree.CallExpression} TSCallExpression */ +/** @typedef {import("eslint").SourceCode} SourceCode */ +/** @typedef {import("eslint").AST.Token} Token */ +/** @typedef {import("eslint").Rule.Node} RuleNode */ + +/** + * Get the left parenthesis of the parent node syntax if it exists. + * E.g., `if (a) {}` then the `(`. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {Token|null} The left parenthesis of the parent node syntax + */ +// eslint-disable-next-line complexity +function getParentSyntaxParen(node, sourceCode) { + const parent = /** @type {RuleNode} */ (node).parent; + + switch (parent.type) { + case "CallExpression": + case "NewExpression": + if (parent.arguments.length === 1 && parent.arguments[0] === node) { + return sourceCode.getTokenAfter( + // @ts-expect-error https://github.com/typescript-eslint/typescript-eslint/pull/5384 + parent.typeArguments || + /** @type {RuleNode} */ ( + /** @type {unknown} */ ( + /** @type {TSNewExpression | TSCallExpression} */ ( + parent + ).typeParameters + ) + ) || + parent.callee, + isOpeningParenToken, + ) + } + return null + + case "DoWhileStatement": + if (parent.test === node) { + return sourceCode.getTokenAfter( + parent.body, + isOpeningParenToken, + ) + } + return null + + case "IfStatement": + case "WhileStatement": + if (parent.test === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "ImportExpression": + if (parent.source === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "SwitchStatement": + if (parent.discriminant === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "WithStatement": + if (parent.object === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + default: + return null + } +} + +/** + * Check whether a given node is parenthesized or not. + * @param {number} times The number of parantheses. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is parenthesized the given times. + */ +/** + * Check whether a given node is parenthesized or not. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is parenthesized. + */ +/** + * Check whether a given node is parenthesized or not. + * @param {Node|number} timesOrNode The first parameter. + * @param {Node|SourceCode} nodeOrSourceCode The second parameter. + * @param {SourceCode} [optionalSourceCode] The third parameter. + * @returns {boolean} `true` if the node is parenthesized. + */ +function isParenthesized( + timesOrNode, + nodeOrSourceCode, + optionalSourceCode, +) { + /** @type {number} */ + let times, + /** @type {RuleNode} */ + node, + /** @type {SourceCode} */ + sourceCode, + maybeLeftParen, + maybeRightParen; + if (typeof timesOrNode === "number") { + times = timesOrNode | 0; + node = /** @type {RuleNode} */ (nodeOrSourceCode); + sourceCode = /** @type {SourceCode} */ (optionalSourceCode); + if (!(times >= 1)) { + throw new TypeError("'times' should be a positive integer.") + } + } else { + times = 1; + node = /** @type {RuleNode} */ (timesOrNode); + sourceCode = /** @type {SourceCode} */ (nodeOrSourceCode); + } + + if ( + node == null || + // `Program` can't be parenthesized + node.parent == null || + // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}` + (node.parent.type === "CatchClause" && node.parent.param === node) + ) { + return false + } + + maybeLeftParen = maybeRightParen = node; + do { + maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen); + maybeRightParen = sourceCode.getTokenAfter(maybeRightParen); + } while ( + maybeLeftParen != null && + maybeRightParen != null && + isOpeningParenToken(maybeLeftParen) && + isClosingParenToken(maybeRightParen) && + // Avoid false positive such as `if (a) {}` + maybeLeftParen !== getParentSyntaxParen(node, sourceCode) && + --times > 0 + ) + + return times === 0 +} + +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */ + +const placeholder = /\$(?:[$&`']|[1-9][0-9]?)/gu; + +/** @type {WeakMap} */ +const internal = new WeakMap(); + +/** + * Check whether a given character is escaped or not. + * @param {string} str The string to check. + * @param {number} index The location of the character to check. + * @returns {boolean} `true` if the character is escaped. + */ +function isEscaped(str, index) { + let escaped = false; + for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) { + escaped = !escaped; + } + return escaped +} + +/** + * Replace a given string by a given matcher. + * @param {PatternMatcher} matcher The pattern matcher. + * @param {string} str The string to be replaced. + * @param {string} replacement The new substring to replace each matched part. + * @returns {string} The replaced string. + */ +function replaceS(matcher, str, replacement) { + const chunks = []; + let index = 0; + + /** + * @param {string} key The placeholder. + * @param {RegExpExecArray} match The matched information. + * @returns {string} The replaced string. + */ + function replacer(key, match) { + switch (key) { + case "$$": + return "$" + case "$&": + return match[0] + case "$`": + return str.slice(0, match.index) + case "$'": + return str.slice(match.index + match[0].length) + default: { + const i = key.slice(1); + if (i in match) { + return match[/** @type {any} */ (i)] + } + return key + } + } + } + + for (const match of matcher.execAll(str)) { + chunks.push(str.slice(index, match.index)); + chunks.push( + replacement.replace(placeholder, (key) => replacer(key, match)), + ); + index = match.index + match[0].length; + } + chunks.push(str.slice(index)); + + return chunks.join("") +} + +/** + * Replace a given string by a given matcher. + * @param {PatternMatcher} matcher The pattern matcher. + * @param {string} str The string to be replaced. + * @param {(substring: string, ...args: any[]) => string} replace The function to replace each matched part. + * @returns {string} The replaced string. + */ +function replaceF(matcher, str, replace) { + const chunks = []; + let index = 0; + + for (const match of matcher.execAll(str)) { + chunks.push(str.slice(index, match.index)); + chunks.push( + String( + replace( + .../** @type {[string, ...string[]]} */ ( + /** @type {string[]} */ (match) + ), + match.index, + match.input, + ), + ), + ); + index = match.index + match[0].length; + } + chunks.push(str.slice(index)); + + return chunks.join("") +} + +/** + * The class to find patterns as considering escape sequences. + */ +class PatternMatcher { + /** + * Initialize this matcher. + * @param {RegExp} pattern The pattern to match. + * @param {{escaped?:boolean}} [options] The options. + */ + constructor(pattern, options = {}) { + const { escaped = false } = options; + if (!(pattern instanceof RegExp)) { + throw new TypeError("'pattern' should be a RegExp instance.") + } + if (!pattern.flags.includes("g")) { + throw new Error("'pattern' should contains 'g' flag.") + } + + internal.set(this, { + pattern: new RegExp(pattern.source, pattern.flags), + escaped: Boolean(escaped), + }); + } + + /** + * Find the pattern in a given string. + * @param {string} str The string to find. + * @returns {IterableIterator} The iterator which iterate the matched information. + */ + *execAll(str) { + const { pattern, escaped } = + /** @type {{pattern:RegExp,escaped:boolean}} */ (internal.get(this)); + let match = null; + let lastIndex = 0; + + pattern.lastIndex = 0; + while ((match = pattern.exec(str)) != null) { + if (escaped || !isEscaped(str, match.index)) { + lastIndex = pattern.lastIndex; + yield match; + pattern.lastIndex = lastIndex; + } + } + } + + /** + * Check whether the pattern is found in a given string. + * @param {string} str The string to check. + * @returns {boolean} `true` if the pattern was found in the string. + */ + test(str) { + const it = this.execAll(str); + const ret = it.next(); + return !ret.done + } + + /** + * Replace a given string. + * @param {string} str The string to be replaced. + * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`. + * @returns {string} The replaced string. + */ + [Symbol.replace](str, replacer) { + return typeof replacer === "function" + ? replaceF(this, String(str), replacer) + : replaceS(this, String(str), String(replacer)) + } +} + +/** @typedef {import("eslint").Scope.Scope} Scope */ +/** @typedef {import("eslint").Scope.Variable} Variable */ +/** @typedef {import("eslint").Rule.Node} RuleNode */ +/** @typedef {import("estree").Node} Node */ +/** @typedef {import("estree").Expression} Expression */ +/** @typedef {import("estree").Pattern} Pattern */ +/** @typedef {import("estree").Identifier} Identifier */ +/** @typedef {import("estree").SimpleCallExpression} CallExpression */ +/** @typedef {import("estree").Program} Program */ +/** @typedef {import("estree").ImportDeclaration} ImportDeclaration */ +/** @typedef {import("estree").ExportAllDeclaration} ExportAllDeclaration */ +/** @typedef {import("estree").ExportDefaultDeclaration} ExportDefaultDeclaration */ +/** @typedef {import("estree").ExportNamedDeclaration} ExportNamedDeclaration */ +/** @typedef {import("estree").ImportSpecifier} ImportSpecifier */ +/** @typedef {import("estree").ImportDefaultSpecifier} ImportDefaultSpecifier */ +/** @typedef {import("estree").ImportNamespaceSpecifier} ImportNamespaceSpecifier */ +/** @typedef {import("estree").ExportSpecifier} ExportSpecifier */ +/** @typedef {import("estree").Property} Property */ +/** @typedef {import("estree").AssignmentProperty} AssignmentProperty */ +/** @typedef {import("estree").Literal} Literal */ +/** @typedef {import("@typescript-eslint/types").TSESTree.Node} TSESTreeNode */ +/** @typedef {import("./types.mjs").ReferenceTrackerOptions} ReferenceTrackerOptions */ +/** + * @template T + * @typedef {import("./types.mjs").TraceMap} TraceMap + */ +/** + * @template T + * @typedef {import("./types.mjs").TraceMapObject} TraceMapObject + */ +/** + * @template T + * @typedef {import("./types.mjs").TrackedReferences} TrackedReferences + */ + +const IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u; + +/** + * Check whether a given node is an import node or not. + * @param {Node} node + * @returns {node is ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration&{source: Literal}} `true` if the node is an import node. + */ +function isHasSource(node) { + return ( + IMPORT_TYPE.test(node.type) && + /** @type {ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration} */ ( + node + ).source != null + ) +} +const has = + /** @type {(traceMap: TraceMap, v: T) => v is (string extends T ? string : T)} */ ( + Function.call.bind(Object.hasOwnProperty) + ); + +const READ = Symbol("read"); +const CALL = Symbol("call"); +const CONSTRUCT = Symbol("construct"); +const ESM = Symbol("esm"); + +const requireCall = { require: { [CALL]: true } }; + +/** + * Check whether a given variable is modified or not. + * @param {Variable|undefined} variable The variable to check. + * @returns {boolean} `true` if the variable is modified. + */ +function isModifiedGlobal(variable) { + return ( + variable == null || + variable.defs.length !== 0 || + variable.references.some((r) => r.isWrite()) + ) +} + +/** + * Check if the value of a given node is passed through to the parent syntax as-is. + * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through. + * @param {Node} node A node to check. + * @returns {node is RuleNode & {parent: Expression}} `true` if the node is passed through. + */ +function isPassThrough(node) { + const parent = /** @type {TSESTreeNode} */ (node).parent; + + if (parent) { + switch (parent.type) { + case "ConditionalExpression": + return parent.consequent === node || parent.alternate === node + case "LogicalExpression": + return true + case "SequenceExpression": + return ( + parent.expressions[parent.expressions.length - 1] === node + ) + case "ChainExpression": + return true + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSTypeAssertion": + case "TSNonNullExpression": + case "TSInstantiationExpression": + return true + + default: + return false + } + } + return false +} + +/** + * The reference tracker. + */ +class ReferenceTracker { + /** + * Initialize this tracker. + * @param {Scope} globalScope The global scope. + * @param {object} [options] The options. + * @param {"legacy"|"strict"} [options.mode="strict"] The mode to determine the ImportDeclaration's behavior for CJS modules. + * @param {string[]} [options.globalObjectNames=["global","globalThis","self","window"]] The variable names for Global Object. + */ + constructor(globalScope, options = {}) { + const { + mode = "strict", + globalObjectNames = ["global", "globalThis", "self", "window"], + } = options; + /** @private @type {Variable[]} */ + this.variableStack = []; + /** @private */ + this.globalScope = globalScope; + /** @private */ + this.mode = mode; + /** @private */ + this.globalObjectNames = globalObjectNames.slice(0); + } + + /** + * Iterate the references of global variables. + * @template T + * @param {TraceMap} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate references. + */ + *iterateGlobalReferences(traceMap) { + for (const key of Object.keys(traceMap)) { + const nextTraceMap = traceMap[key]; + const path = [key]; + const variable = this.globalScope.set.get(key); + + if (isModifiedGlobal(variable)) { + continue + } + + yield* this._iterateVariableReferences( + /** @type {Variable} */ (variable), + path, + nextTraceMap, + true, + ); + } + + for (const key of this.globalObjectNames) { + /** @type {string[]} */ + const path = []; + const variable = this.globalScope.set.get(key); + + if (isModifiedGlobal(variable)) { + continue + } + + yield* this._iterateVariableReferences( + /** @type {Variable} */ (variable), + path, + traceMap, + false, + ); + } + } + + /** + * Iterate the references of CommonJS modules. + * @template T + * @param {TraceMap} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate references. + */ + *iterateCjsReferences(traceMap) { + for (const { node } of this.iterateGlobalReferences(requireCall)) { + const key = getStringIfConstant( + /** @type {CallExpression} */ (node).arguments[0], + ); + if (key == null || !has(traceMap, key)) { + continue + } + + const nextTraceMap = traceMap[key]; + const path = [key]; + + if (nextTraceMap[READ]) { + yield { + node, + path, + type: READ, + info: nextTraceMap[READ], + }; + } + yield* this._iteratePropertyReferences( + /** @type {CallExpression} */ (node), + path, + nextTraceMap, + ); + } + } + + /** + * Iterate the references of ES modules. + * @template T + * @param {TraceMap} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate references. + */ + *iterateEsmReferences(traceMap) { + const programNode = /** @type {Program} */ (this.globalScope.block); + + for (const node of programNode.body) { + if (!isHasSource(node)) { + continue + } + const moduleId = /** @type {string} */ (node.source.value); + + if (!has(traceMap, moduleId)) { + continue + } + const nextTraceMap = traceMap[moduleId]; + const path = [moduleId]; + + if (nextTraceMap[READ]) { + yield { + // eslint-disable-next-line object-shorthand -- apply type + node: /** @type {RuleNode} */ (node), + path, + type: READ, + info: nextTraceMap[READ], + }; + } + + if (node.type === "ExportAllDeclaration") { + for (const key of Object.keys(nextTraceMap)) { + const exportTraceMap = nextTraceMap[key]; + if (exportTraceMap[READ]) { + yield { + // eslint-disable-next-line object-shorthand -- apply type + node: /** @type {RuleNode} */ (node), + path: path.concat(key), + type: READ, + info: exportTraceMap[READ], + }; + } + } + } else { + for (const specifier of node.specifiers) { + const esm = has(nextTraceMap, ESM); + const it = this._iterateImportReferences( + specifier, + path, + esm + ? nextTraceMap + : this.mode === "legacy" + ? { default: nextTraceMap, ...nextTraceMap } + : { default: nextTraceMap }, + ); + + if (esm) { + yield* it; + } else { + for (const report of it) { + report.path = report.path.filter(exceptDefault); + if ( + report.path.length >= 2 || + report.type !== READ + ) { + yield report; + } + } + } + } + } + } + } + + /** + * Iterate the property references for a given expression AST node. + * @template T + * @param {Expression} node The expression AST node to iterate property references. + * @param {TraceMap} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate property references. + */ + *iteratePropertyReferences(node, traceMap) { + yield* this._iteratePropertyReferences(node, [], traceMap); + } + + /** + * Iterate the references for a given variable. + * @private + * @template T + * @param {Variable} variable The variable to iterate that references. + * @param {string[]} path The current path. + * @param {TraceMapObject} traceMap The trace map. + * @param {boolean} shouldReport = The flag to report those references. + * @returns {IterableIterator>} The iterator to iterate references. + */ + *_iterateVariableReferences(variable, path, traceMap, shouldReport) { + if (this.variableStack.includes(variable)) { + return + } + this.variableStack.push(variable); + try { + for (const reference of variable.references) { + if (!reference.isRead()) { + continue + } + const node = /** @type {RuleNode & Identifier} */ ( + reference.identifier + ); + + if (shouldReport && traceMap[READ]) { + yield { node, path, type: READ, info: traceMap[READ] }; + } + yield* this._iteratePropertyReferences(node, path, traceMap); + } + } finally { + this.variableStack.pop(); + } + } + + /** + * Iterate the references for a given AST node. + * @private + * @template T + * @param {Expression} rootNode The AST node to iterate references. + * @param {string[]} path The current path. + * @param {TraceMapObject} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate references. + */ + //eslint-disable-next-line complexity + *_iteratePropertyReferences(rootNode, path, traceMap) { + let node = rootNode; + while (isPassThrough(node)) { + node = node.parent; + } + + const parent = /** @type {RuleNode} */ (node).parent; + if (parent.type === "MemberExpression") { + if (parent.object === node) { + const key = getPropertyName(parent); + if (key == null || !has(traceMap, key)) { + return + } + + path = path.concat(key); //eslint-disable-line no-param-reassign + const nextTraceMap = traceMap[key]; + if (nextTraceMap[READ]) { + yield { + node: parent, + path, + type: READ, + info: nextTraceMap[READ], + }; + } + yield* this._iteratePropertyReferences( + parent, + path, + nextTraceMap, + ); + } + return + } + if (parent.type === "CallExpression") { + if (parent.callee === node && traceMap[CALL]) { + yield { node: parent, path, type: CALL, info: traceMap[CALL] }; + } + return + } + if (parent.type === "NewExpression") { + if (parent.callee === node && traceMap[CONSTRUCT]) { + yield { + node: parent, + path, + type: CONSTRUCT, + info: traceMap[CONSTRUCT], + }; + } + return + } + if (parent.type === "AssignmentExpression") { + if (parent.right === node) { + yield* this._iterateLhsReferences(parent.left, path, traceMap); + yield* this._iteratePropertyReferences(parent, path, traceMap); + } + return + } + if (parent.type === "AssignmentPattern") { + if (parent.right === node) { + yield* this._iterateLhsReferences(parent.left, path, traceMap); + } + return + } + if (parent.type === "VariableDeclarator") { + if (parent.init === node) { + yield* this._iterateLhsReferences(parent.id, path, traceMap); + } + } + } + + /** + * Iterate the references for a given Pattern node. + * @private + * @template T + * @param {Pattern} patternNode The Pattern node to iterate references. + * @param {string[]} path The current path. + * @param {TraceMapObject} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate references. + */ + *_iterateLhsReferences(patternNode, path, traceMap) { + if (patternNode.type === "Identifier") { + const variable = findVariable(this.globalScope, patternNode); + if (variable != null) { + yield* this._iterateVariableReferences( + variable, + path, + traceMap, + false, + ); + } + return + } + if (patternNode.type === "ObjectPattern") { + for (const property of patternNode.properties) { + const key = getPropertyName( + /** @type {AssignmentProperty} */ (property), + ); + + if (key == null || !has(traceMap, key)) { + continue + } + + const nextPath = path.concat(key); + const nextTraceMap = traceMap[key]; + if (nextTraceMap[READ]) { + yield { + node: /** @type {RuleNode} */ (property), + path: nextPath, + type: READ, + info: nextTraceMap[READ], + }; + } + yield* this._iterateLhsReferences( + /** @type {AssignmentProperty} */ (property).value, + nextPath, + nextTraceMap, + ); + } + return + } + if (patternNode.type === "AssignmentPattern") { + yield* this._iterateLhsReferences(patternNode.left, path, traceMap); + } + } + + /** + * Iterate the references for a given ModuleSpecifier node. + * @private + * @template T + * @param {ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier} specifierNode The ModuleSpecifier node to iterate references. + * @param {string[]} path The current path. + * @param {TraceMapObject} traceMap The trace map. + * @returns {IterableIterator>} The iterator to iterate references. + */ + *_iterateImportReferences(specifierNode, path, traceMap) { + const type = specifierNode.type; + + if (type === "ImportSpecifier" || type === "ImportDefaultSpecifier") { + const key = + type === "ImportDefaultSpecifier" + ? "default" + : specifierNode.imported.type === "Identifier" + ? specifierNode.imported.name + : specifierNode.imported.value; + if (!has(traceMap, key)) { + return + } + + path = path.concat(key); //eslint-disable-line no-param-reassign + const nextTraceMap = traceMap[key]; + if (nextTraceMap[READ]) { + yield { + node: /** @type {RuleNode} */ (specifierNode), + path, + type: READ, + info: nextTraceMap[READ], + }; + } + yield* this._iterateVariableReferences( + /** @type {Variable} */ ( + findVariable(this.globalScope, specifierNode.local) + ), + path, + nextTraceMap, + false, + ); + + return + } + + if (type === "ImportNamespaceSpecifier") { + yield* this._iterateVariableReferences( + /** @type {Variable} */ ( + findVariable(this.globalScope, specifierNode.local) + ), + path, + traceMap, + false, + ); + return + } + + if (type === "ExportSpecifier") { + const key = + specifierNode.local.type === "Identifier" + ? specifierNode.local.name + : specifierNode.local.value; + if (!has(traceMap, key)) { + return + } + + path = path.concat(key); //eslint-disable-line no-param-reassign + const nextTraceMap = traceMap[key]; + if (nextTraceMap[READ]) { + yield { + node: /** @type {RuleNode} */ (specifierNode), + path, + type: READ, + info: nextTraceMap[READ], + }; + } + } + } +} + +ReferenceTracker.READ = READ; +ReferenceTracker.CALL = CALL; +ReferenceTracker.CONSTRUCT = CONSTRUCT; +ReferenceTracker.ESM = ESM; + +/** + * This is a predicate function for Array#filter. + * @param {string} name A name part. + * @param {number} index The index of the name. + * @returns {boolean} `false` if it's default. + */ +function exceptDefault(name, index) { + return !(index === 1 && name === "default") +} + +/** @typedef {import("./types.mjs").StaticValue} StaticValue */ + +var index = { + CALL, + CONSTRUCT, + ESM, + findVariable, + getFunctionHeadLocation, + getFunctionNameWithKind, + getInnermostScope, + getPropertyName, + getStaticValue, + getStringIfConstant, + hasSideEffect, + isArrowToken, + isClosingBraceToken, + isClosingBracketToken, + isClosingParenToken, + isColonToken, + isCommaToken, + isCommentToken, + isNotArrowToken, + isNotClosingBraceToken, + isNotClosingBracketToken, + isNotClosingParenToken, + isNotColonToken, + isNotCommaToken, + isNotCommentToken, + isNotOpeningBraceToken, + isNotOpeningBracketToken, + isNotOpeningParenToken, + isNotSemicolonToken, + isOpeningBraceToken, + isOpeningBracketToken, + isOpeningParenToken, + isParenthesized, + isSemicolonToken, + PatternMatcher, + READ, + ReferenceTracker, +}; + +export { CALL, CONSTRUCT, ESM, PatternMatcher, READ, ReferenceTracker, index as default, findVariable, getFunctionHeadLocation, getFunctionNameWithKind, getInnermostScope, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isParenthesized, isSemicolonToken }; +//# sourceMappingURL=index.mjs.map diff --git a/slider/node_modules/@eslint-community/eslint-utils/index.mjs.map b/slider/node_modules/@eslint-community/eslint-utils/index.mjs.map new file mode 100644 index 0000000..51eeeb1 --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["src/get-innermost-scope.mjs","src/find-variable.mjs","src/token-predicate.mjs","src/get-function-head-location.mjs","src/get-static-value.mjs","src/get-string-if-constant.mjs","src/get-property-name.mjs","src/get-function-name-with-kind.mjs","src/has-side-effect.mjs","src/is-parenthesized.mjs","src/pattern-matcher.mjs","src/reference-tracker.mjs","src/index.mjs"],"sourcesContent":["/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").Node} Node */\n\n/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = /** @type {[number, number]} */ (node.range)[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = /** @type {[number, number]} */ (\n childScope.block.range\n )\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Identifier} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n /** @type {Scope|null} */\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"estree\").Comment} Comment */\n/** @typedef {import(\"./types.mjs\").ArrowToken} ArrowToken */\n/** @typedef {import(\"./types.mjs\").CommaToken} CommaToken */\n/** @typedef {import(\"./types.mjs\").SemicolonToken} SemicolonToken */\n/** @typedef {import(\"./types.mjs\").ColonToken} ColonToken */\n/** @typedef {import(\"./types.mjs\").OpeningParenToken} OpeningParenToken */\n/** @typedef {import(\"./types.mjs\").ClosingParenToken} ClosingParenToken */\n/** @typedef {import(\"./types.mjs\").OpeningBracketToken} OpeningBracketToken */\n/** @typedef {import(\"./types.mjs\").ClosingBracketToken} ClosingBracketToken */\n/** @typedef {import(\"./types.mjs\").OpeningBraceToken} OpeningBraceToken */\n/** @typedef {import(\"./types.mjs\").ClosingBraceToken} ClosingBraceToken */\n/**\n * @template {string} Value\n * @typedef {import(\"./types.mjs\").PunctuatorToken} PunctuatorToken\n */\n\n/** @typedef {Comment | Token} CommentOrToken */\n\n/**\n * Creates the negate function of the given function.\n * @param {function(CommentOrToken):boolean} f - The function to negate.\n * @returns {function(CommentOrToken):boolean} Negated function.\n */\nfunction negate(f) {\n return (token) => !f(token)\n}\n\n/**\n * Checks if the given token is a PunctuatorToken with the given value\n * @template {string} Value\n * @param {CommentOrToken} token - The token to check.\n * @param {Value} value - The value to check.\n * @returns {token is PunctuatorToken} `true` if the token is a PunctuatorToken with the given value.\n */\nfunction isPunctuatorTokenWithValue(token, value) {\n return token.type === \"Punctuator\" && token.value === value\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ArrowToken} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return isPunctuatorTokenWithValue(token, \"=>\")\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is CommaToken} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return isPunctuatorTokenWithValue(token, \",\")\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is SemicolonToken} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return isPunctuatorTokenWithValue(token, \";\")\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ColonToken} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return isPunctuatorTokenWithValue(token, \":\")\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningParenToken} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return isPunctuatorTokenWithValue(token, \"(\")\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingParenToken} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return isPunctuatorTokenWithValue(token, \")\")\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningBracketToken} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"[\")\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingBracketToken} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"]\")\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningBraceToken} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"{\")\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingBraceToken} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"}\")\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is Comment} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return [\"Block\", \"Line\", \"Shebang\"].includes(token.type)\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"estree\").Function} FunctionNode */\n/** @typedef {import(\"estree\").FunctionDeclaration} FunctionDeclaration */\n/** @typedef {import(\"estree\").FunctionExpression} FunctionExpression */\n/** @typedef {import(\"estree\").SourceLocation} SourceLocation */\n/** @typedef {import(\"estree\").Position} Position */\n\n/**\n * Get the `(` token of the given function node.\n * @param {FunctionExpression | FunctionDeclaration} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? /** @type {Token} */ (\n sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n )\n : /** @type {Token} */ (\n sourceCode.getFirstToken(node, isOpeningParenToken)\n )\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {FunctionNode} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {SourceLocation|null} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n /** @type {Position|null} */\n let start = null\n /** @type {Position|null} */\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = /** @type {Token} */ (\n sourceCode.getTokenBefore(node.body, isArrowToken)\n )\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\" ||\n parent.type === \"PropertyDefinition\"\n ) {\n start = /** @type {SourceLocation} */ (parent.loc).start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = /** @type {SourceLocation} */ (node.loc).start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: { ...start },\n end: { ...end },\n }\n}\n","/* globals globalThis, global, self, window */\n\nimport { findVariable } from \"./find-variable.mjs\"\n/** @typedef {import(\"./types.mjs\").StaticValue} StaticValue */\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Node} TSESTreeNode */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.AST_NODE_TYPES} TSESTreeNodeTypes */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.MemberExpression} MemberExpression */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Property} Property */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.RegExpLiteral} RegExpLiteral */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.BigIntLiteral} BigIntLiteral */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Literal} Literal */\n\nconst globalObject =\n typeof globalThis !== \"undefined\"\n ? globalThis\n : // @ts-ignore\n typeof self !== \"undefined\"\n ? // @ts-ignore\n self\n : // @ts-ignore\n typeof window !== \"undefined\"\n ? // @ts-ignore\n window\n : typeof global !== \"undefined\"\n ? global\n : {}\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ]),\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n Array.of,\n Array.prototype.at,\n Array.prototype.concat,\n Array.prototype.entries,\n Array.prototype.every,\n Array.prototype.filter,\n Array.prototype.find,\n Array.prototype.findIndex,\n Array.prototype.flat,\n Array.prototype.includes,\n Array.prototype.indexOf,\n Array.prototype.join,\n Array.prototype.keys,\n Array.prototype.lastIndexOf,\n Array.prototype.slice,\n Array.prototype.some,\n Array.prototype.toString,\n Array.prototype.values,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n // @ts-ignore\n isPrototypeOf,\n Map,\n Map.prototype.entries,\n Map.prototype.get,\n Map.prototype.has,\n Map.prototype.keys,\n Map.prototype.values,\n .../** @type {(keyof typeof Math)[]} */ (\n Object.getOwnPropertyNames(Math)\n )\n .filter((k) => k !== \"random\")\n .map((k) => Math[k])\n .filter((f) => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Number.prototype.toExponential,\n Number.prototype.toFixed,\n Number.prototype.toPrecision,\n Number.prototype.toString,\n Object,\n Object.entries,\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values,\n parseFloat,\n parseInt,\n RegExp,\n Set,\n Set.prototype.entries,\n Set.prototype.has,\n Set.prototype.keys,\n Set.prototype.values,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n String.prototype.at,\n String.prototype.charAt,\n String.prototype.charCodeAt,\n String.prototype.codePointAt,\n String.prototype.concat,\n String.prototype.endsWith,\n String.prototype.includes,\n String.prototype.indexOf,\n String.prototype.lastIndexOf,\n String.prototype.normalize,\n String.prototype.padEnd,\n String.prototype.padStart,\n String.prototype.slice,\n String.prototype.startsWith,\n String.prototype.substr,\n String.prototype.substring,\n String.prototype.toLowerCase,\n String.prototype.toString,\n String.prototype.toUpperCase,\n String.prototype.trim,\n String.prototype.trimEnd,\n String.prototype.trimLeft,\n String.prototype.trimRight,\n String.prototype.trimStart,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter((f) => typeof f === \"function\"),\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/** @type {ReadonlyArray]>} */\nconst getterAllowed = [\n [Map, new Set([\"size\"])],\n [\n RegExp,\n new Set([\n \"dotAll\",\n \"flags\",\n \"global\",\n \"hasIndices\",\n \"ignoreCase\",\n \"multiline\",\n \"source\",\n \"sticky\",\n \"unicode\",\n ]),\n ],\n [Set, new Set([\"size\"])],\n]\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {(Node|TSESTreeNode|null)[]} nodeList The node list to get values.\n * @param {Scope|undefined|null} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(.../** @type {Iterable} */ (argument.value))\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\n/**\n * Checks if a variable is a built-in global.\n * @param {Variable|null} variable The variable to check.\n * @returns {variable is Variable & {defs:[]}}\n */\nfunction isBuiltinGlobal(variable) {\n return (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in globalObject\n )\n}\n\n/**\n * Checks if a variable can be considered as a constant.\n * @param {Variable} variable\n * @returns {variable is Variable & {defs: [import(\"eslint\").Scope.Definition & { type: \"Variable\" }]}} True if the variable can be considered as a constant.\n */\nfunction canBeConsideredConst(variable) {\n if (variable.defs.length !== 1) {\n return false\n }\n const def = variable.defs[0]\n return Boolean(\n def.parent &&\n def.type === \"Variable\" &&\n (def.parent.kind === \"const\" || isEffectivelyConst(variable)),\n )\n}\n\n/**\n * Returns whether the given variable is never written to after initialization.\n * @param {Variable} variable\n * @returns {boolean}\n */\nfunction isEffectivelyConst(variable) {\n const refs = variable.references\n\n const inits = refs.filter((r) => r.init).length\n const reads = refs.filter((r) => r.isReadOnly()).length\n if (inits === 1 && reads + inits === refs.length) {\n // there is only one init and all other references only read\n return true\n }\n return false\n}\n\n/**\n * Checks if a variable has mutation in its property.\n * @param {Variable} variable The variable to check.\n * @param {Scope|null} initialScope The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {boolean} True if the variable has mutation in its property.\n */\nfunction hasMutationInProperty(variable, initialScope) {\n for (const ref of variable.references) {\n let node = /** @type {TSESTreeNode} */ (ref.identifier)\n while (node && node.parent && node.parent.type === \"MemberExpression\") {\n node = node.parent\n }\n if (!node || !node.parent) {\n continue\n }\n if (\n (node.parent.type === \"AssignmentExpression\" &&\n node.parent.left === node) ||\n (node.parent.type === \"UpdateExpression\" &&\n node.parent.argument === node)\n ) {\n // This is a mutation.\n return true\n }\n if (\n node.parent.type === \"CallExpression\" &&\n node.parent.callee === node &&\n node.type === \"MemberExpression\"\n ) {\n const methodName = getStaticPropertyNameValue(node, initialScope)\n if (isNameOfMutationArrayMethod(methodName)) {\n // This is a mutation.\n return true\n }\n }\n }\n return false\n\n /**\n * Checks if a method name is one of the mutation array methods.\n * @param {StaticValue|null} methodName The method name to check.\n * @returns {boolean} True if the method name is a mutation array method.\n */\n function isNameOfMutationArrayMethod(methodName) {\n if (methodName == null || methodName.value == null) {\n return false\n }\n const name = methodName.value\n return (\n name === \"copyWithin\" ||\n name === \"fill\" ||\n name === \"pop\" ||\n name === \"push\" ||\n name === \"reverse\" ||\n name === \"shift\" ||\n name === \"sort\" ||\n name === \"splice\" ||\n name === \"unshift\"\n )\n }\n}\n\n/**\n * @template {TSESTreeNodeTypes} T\n * @callback VisitorCallback\n * @param {TSESTreeNode & { type: T }} node\n * @param {Scope|undefined|null} initialScope\n * @returns {StaticValue | null}\n */\n/**\n * @typedef { { [K in TSESTreeNodeTypes]?: VisitorCallback } } Operations\n */\n/**\n * @type {Operations}\n */\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return {\n value:\n /** @type {any} */ (left.value) <\n /** @type {any} */ (right.value),\n }\n case \"<=\":\n return {\n value:\n /** @type {any} */ (left.value) <=\n /** @type {any} */ (right.value),\n }\n case \">\":\n return {\n value:\n /** @type {any} */ (left.value) >\n /** @type {any} */ (right.value),\n }\n case \">=\":\n return {\n value:\n /** @type {any} */ (left.value) >=\n /** @type {any} */ (right.value),\n }\n case \"<<\":\n return {\n value:\n /** @type {any} */ (left.value) <<\n /** @type {any} */ (right.value),\n }\n case \">>\":\n return {\n value:\n /** @type {any} */ (left.value) >>\n /** @type {any} */ (right.value),\n }\n case \">>>\":\n return {\n value:\n /** @type {any} */ (left.value) >>>\n /** @type {any} */ (right.value),\n }\n case \"+\":\n return {\n value:\n /** @type {any} */ (left.value) +\n /** @type {any} */ (right.value),\n }\n case \"-\":\n return {\n value:\n /** @type {any} */ (left.value) -\n /** @type {any} */ (right.value),\n }\n case \"*\":\n return {\n value:\n /** @type {any} */ (left.value) *\n /** @type {any} */ (right.value),\n }\n case \"/\":\n return {\n value:\n /** @type {any} */ (left.value) /\n /** @type {any} */ (right.value),\n }\n case \"%\":\n return {\n value:\n /** @type {any} */ (left.value) %\n /** @type {any} */ (right.value),\n }\n case \"**\":\n return {\n value:\n /** @type {any} */ (left.value) **\n /** @type {any} */ (right.value),\n }\n case \"|\":\n return {\n value:\n /** @type {any} */ (left.value) |\n /** @type {any} */ (right.value),\n }\n case \"^\":\n return {\n value:\n /** @type {any} */ (left.value) ^\n /** @type {any} */ (right.value),\n }\n case \"&\":\n return {\n value:\n /** @type {any} */ (left.value) &\n /** @type {any} */ (right.value),\n }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n if (calleeNode.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(calleeNode.object, initialScope)\n if (object != null) {\n if (\n object.value == null &&\n (object.optional || node.optional)\n ) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(\n calleeNode,\n initialScope,\n )\n\n if (property != null) {\n const receiver =\n /** @type {Record any>} */ (\n object.value\n )\n const methodName = /** @type {PropertyKey} */ (\n property.value\n )\n if (callAllowed.has(receiver[methodName])) {\n return {\n value: receiver[methodName](...args),\n }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n if (callee.value == null && node.optional) {\n return { value: undefined, optional: true }\n }\n const func = /** @type {(...args: any[]) => any} */ (\n callee.value\n )\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n if (variable != null) {\n // Built-in globals.\n if (isBuiltinGlobal(variable)) {\n return { value: globalObject[variable.name] }\n }\n\n // Constants.\n if (canBeConsideredConst(variable)) {\n const def = variable.defs[0]\n if (\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n const init = getStaticValueR(\n def.node.init,\n initialScope,\n )\n if (\n init &&\n typeof init.value === \"object\" &&\n init.value !== null\n ) {\n if (hasMutationInProperty(variable, initialScope)) {\n // This variable has mutation in its property.\n return null\n }\n }\n return init\n }\n }\n }\n }\n return null\n },\n\n Literal(node) {\n const literal =\n /** @type {Partial & Partial & Partial} */ (\n node\n )\n //istanbul ignore if : this is implementation-specific behavior.\n if (\n (literal.regex != null || literal.bigint != null) &&\n literal.value == null\n ) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: literal.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false) ||\n (node.operator === \"??\" && left.value != null)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(node.object, initialScope)\n if (object != null) {\n if (object.value == null && (object.optional || node.optional)) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(node, initialScope)\n\n if (property != null) {\n if (\n !isGetter(\n /** @type {object} */ (object.value),\n /** @type {PropertyKey} */ (property.value),\n )\n ) {\n return {\n value: /** @type {Record} */ (\n object.value\n )[/** @type {PropertyKey} */ (property.value)],\n }\n }\n\n for (const [classFn, allowed] of getterAllowed) {\n if (\n object.value instanceof classFn &&\n allowed.has(/** @type {string} */ (property.value))\n ) {\n return {\n value: /** @type {Record} */ (\n object.value\n )[/** @type {PropertyKey} */ (property.value)],\n }\n }\n }\n }\n }\n return null\n },\n\n ChainExpression(node, initialScope) {\n const expression = getStaticValueR(node.expression, initialScope)\n if (expression != null) {\n return { value: expression.value }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = /** @type {new (...args: any[]) => any} */ (\n callee.value\n )\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n /** @type {Record} */\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = getStaticPropertyNameValue(\n propertyNode,\n initialScope,\n )\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[/** @type {PropertyKey} */ (key.value)] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n // @ts-expect-error -- Backward compatibility\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope,\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope,\n )\n\n if (tag != null && expressions != null) {\n const func = /** @type {(...args: any[]) => any} */ (tag.value)\n /** @type {any[] & { raw?: string[] }} */\n const strings = node.quasi.quasis.map((q) => q.value.cooked)\n strings.raw = node.quasi.quasis.map((q) => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += /** @type {string} */ (node.quasis[i + 1].value.cooked)\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -(/** @type {any} */ (arg.value)) }\n case \"+\":\n return { value: +(/** @type {any} */ (arg.value)) } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~(/** @type {any} */ (arg.value)) }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n TSAsExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSSatisfiesExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSTypeAssertion(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSNonNullExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSInstantiationExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node|TSESTreeNode|null|undefined} node The node to get.\n * @param {Scope|undefined|null} initialScope The scope to start finding variable.\n * @returns {StaticValue|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return /** @type {VisitorCallback} */ (operations[node.type])(\n /** @type {TSESTreeNode} */ (node),\n initialScope,\n )\n }\n return null\n}\n\n/**\n * Get the static value of property name from a MemberExpression node or a Property node.\n * @param {MemberExpression|Property} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {StaticValue|null} The static value of the property name of the node, or `null`.\n */\nfunction getStaticPropertyNameValue(node, initialScope) {\n const nameNode = node.type === \"Property\" ? node.key : node.property\n\n if (node.computed) {\n return getStaticValueR(nameNode, initialScope)\n }\n\n if (nameNode.type === \"Identifier\") {\n return { value: nameNode.name }\n }\n\n if (nameNode.type === \"Literal\") {\n if (/** @type {Partial} */ (nameNode).bigint) {\n return { value: /** @type {BigIntLiteral} */ (nameNode).bigint }\n }\n return { value: String(nameNode.value) }\n }\n\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {StaticValue | null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"estree\").RegExpLiteral} RegExpLiteral */\n/** @typedef {import(\"estree\").BigIntLiteral} BigIntLiteral */\n/** @typedef {import(\"estree\").SimpleLiteral} SimpleLiteral */\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n const literal =\n /** @type {Partial & Partial & Partial} */ (\n node\n )\n if (literal.regex) {\n return `/${literal.regex.pattern}/${literal.regex.flags}`\n }\n if (literal.bigint) {\n return literal.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n\n if (evaluated) {\n // `String(Symbol.prototype)` throws error\n try {\n return String(evaluated.value)\n } catch {\n // No op\n }\n }\n\n return null\n}\n","import { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").MemberExpression} MemberExpression */\n/** @typedef {import(\"estree\").MethodDefinition} MethodDefinition */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").PropertyDefinition} PropertyDefinition */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {MemberExpression | MethodDefinition | Property | PropertyDefinition} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null|undefined} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n return /** @type {Partial} */ (node.property).name\n\n case \"Property\":\n case \"MethodDefinition\":\n case \"PropertyDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n if (node.key.type === \"PrivateIdentifier\") {\n return null\n }\n return /** @type {Partial} */ (node.key).name\n\n default:\n break\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name.mjs\"\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"estree\").Function} FunctionNode */\n/** @typedef {import(\"estree\").FunctionDeclaration} FunctionDeclaration */\n/** @typedef {import(\"estree\").FunctionExpression} FunctionExpression */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Get the name and kind of the given function node.\n * @param {FunctionNode} node - The function node to get.\n * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys.\n * @returns {string} The name and kind of the function node.\n */\n// eslint-disable-next-line complexity\nexport function getFunctionNameWithKind(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n const tokens = []\n const isObjectMethod = parent.type === \"Property\" && parent.value === node\n const isClassMethod =\n parent.type === \"MethodDefinition\" && parent.value === node\n const isClassFieldMethod =\n parent.type === \"PropertyDefinition\" && parent.value === node\n\n // Modifiers.\n if (isClassMethod || isClassFieldMethod) {\n if (parent.static) {\n tokens.push(\"static\")\n }\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(\"private\")\n }\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n // Kinds.\n if (isObjectMethod || isClassMethod) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else if (isClassFieldMethod) {\n tokens.push(\"method\")\n } else {\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\")\n }\n tokens.push(\"function\")\n }\n\n // Names.\n if (isObjectMethod || isClassMethod || isClassFieldMethod) {\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(`#${parent.key.name}`)\n } else {\n const name = getPropertyName(parent)\n if (name) {\n tokens.push(`'${name}'`)\n } else if (sourceCode) {\n const keyText = sourceCode.getText(parent.key)\n if (!keyText.includes(\"\\n\")) {\n tokens.push(`[${keyText}]`)\n }\n }\n }\n } else if (hasId(node)) {\n tokens.push(`'${node.id.name}'`)\n } else if (\n parent.type === \"VariableDeclarator\" &&\n parent.id &&\n parent.id.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.id.name}'`)\n } else if (\n (parent.type === \"AssignmentExpression\" ||\n parent.type === \"AssignmentPattern\") &&\n parent.left &&\n parent.left.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.left.name}'`)\n } else if (\n parent.type === \"ExportDefaultDeclaration\" &&\n parent.declaration === node\n ) {\n tokens.push(\"'default'\")\n }\n\n return tokens.join(\" \")\n}\n\n/**\n * @param {FunctionNode} node\n * @returns {node is FunctionDeclaration | FunctionExpression & { id: Identifier }}\n */\nfunction hasId(node) {\n return Boolean(\n /** @type {Partial} */ (node)\n .id,\n )\n}\n","import { getKeys, KEYS } from \"eslint-visitor-keys\"\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"./types.mjs\").HasSideEffectOptions} HasSideEffectOptions */\n/** @typedef {import(\"estree\").BinaryExpression} BinaryExpression */\n/** @typedef {import(\"estree\").MemberExpression} MemberExpression */\n/** @typedef {import(\"estree\").MethodDefinition} MethodDefinition */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").PropertyDefinition} PropertyDefinition */\n/** @typedef {import(\"estree\").UnaryExpression} UnaryExpression */\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ]),\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} x The value to check.\n * @returns {x is Node} `true` if the value is an ASTNode.\n */\nfunction isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\"\n}\n\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n /**\n * @param {Node} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof (/** @type {any} */ (this)[type]) === \"function\") {\n return /** @type {any} */ (this)[type](\n node,\n options,\n visitorKeys,\n )\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n /**\n * @param {Node} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of /** @type {(keyof Node)[]} */ (\n visitorKeys[type] || getKeys(node)\n )) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n isNode(element) &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (\n isNode(value) &&\n this.$visit(value, options, visitorKeys)\n ) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n /**\n * @param {BinaryExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n /**\n * @param {MemberExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {MethodDefinition} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n /**\n * @param {Property} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {PropertyDefinition} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n PropertyDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {UnaryExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n }),\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {HasSideEffectOptions} [options] The option object.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(node, sourceCode, options = {}) {\n const { considerGetters = false, considerImplicitTypeConversion = false } =\n options\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || KEYS,\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.NewExpression} TSNewExpression */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.CallExpression} TSCallExpression */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\n// eslint-disable-next-line complexity\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n // @ts-expect-error https://github.com/typescript-eslint/typescript-eslint/pull/5384\n parent.typeArguments ||\n /** @type {RuleNode} */ (\n /** @type {unknown} */ (\n /** @type {TSNewExpression | TSCallExpression} */ (\n parent\n ).typeParameters\n )\n ) ||\n parent.callee,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node|number} timesOrNode The first parameter.\n * @param {Node|SourceCode} nodeOrSourceCode The second parameter.\n * @param {SourceCode} [optionalSourceCode] The third parameter.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode,\n) {\n /** @type {number} */\n let times,\n /** @type {RuleNode} */\n node,\n /** @type {SourceCode} */\n sourceCode,\n maybeLeftParen,\n maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = /** @type {RuleNode} */ (nodeOrSourceCode)\n sourceCode = /** @type {SourceCode} */ (optionalSourceCode)\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = /** @type {RuleNode} */ (timesOrNode)\n sourceCode = /** @type {SourceCode} */ (nodeOrSourceCode)\n }\n\n if (\n node == null ||\n // `Program` can't be parenthesized\n node.parent == null ||\n // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`\n (node.parent.type === \"CatchClause\" && node.parent.param === node)\n ) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /**\n * @param {string} key The placeholder.\n * @param {RegExpExecArray} match The matched information.\n * @returns {string} The replaced string.\n */\n function replacer(key, match) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[/** @type {any} */ (i)]\n }\n return key\n }\n }\n }\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(\n replacement.replace(placeholder, (key) => replacer(key, match)),\n )\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(substring: string, ...args: any[]) => string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(\n String(\n replace(\n .../** @type {[string, ...string[]]} */ (\n /** @type {string[]} */ (match)\n ),\n match.index,\n match.input,\n ),\n ),\n )\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped?:boolean}} [options] The options.\n */\n constructor(pattern, options = {}) {\n const { escaped = false } = options\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } =\n /** @type {{pattern:RegExp,escaped:boolean}} */ (internal.get(this))\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"estree\").Expression} Expression */\n/** @typedef {import(\"estree\").Pattern} Pattern */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n/** @typedef {import(\"estree\").SimpleCallExpression} CallExpression */\n/** @typedef {import(\"estree\").Program} Program */\n/** @typedef {import(\"estree\").ImportDeclaration} ImportDeclaration */\n/** @typedef {import(\"estree\").ExportAllDeclaration} ExportAllDeclaration */\n/** @typedef {import(\"estree\").ExportDefaultDeclaration} ExportDefaultDeclaration */\n/** @typedef {import(\"estree\").ExportNamedDeclaration} ExportNamedDeclaration */\n/** @typedef {import(\"estree\").ImportSpecifier} ImportSpecifier */\n/** @typedef {import(\"estree\").ImportDefaultSpecifier} ImportDefaultSpecifier */\n/** @typedef {import(\"estree\").ImportNamespaceSpecifier} ImportNamespaceSpecifier */\n/** @typedef {import(\"estree\").ExportSpecifier} ExportSpecifier */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").AssignmentProperty} AssignmentProperty */\n/** @typedef {import(\"estree\").Literal} Literal */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Node} TSESTreeNode */\n/** @typedef {import(\"./types.mjs\").ReferenceTrackerOptions} ReferenceTrackerOptions */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMap} TraceMap\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMapObject} TraceMapObject\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TrackedReferences} TrackedReferences\n */\n\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\n\n/**\n * Check whether a given node is an import node or not.\n * @param {Node} node\n * @returns {node is ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration&{source: Literal}} `true` if the node is an import node.\n */\nfunction isHasSource(node) {\n return (\n IMPORT_TYPE.test(node.type) &&\n /** @type {ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration} */ (\n node\n ).source != null\n )\n}\nconst has =\n /** @type {(traceMap: TraceMap, v: T) => v is (string extends T ? string : T)} */ (\n Function.call.bind(Object.hasOwnProperty)\n )\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable|undefined} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some((r) => r.isWrite())\n )\n}\n\n/**\n * Check if the value of a given node is passed through to the parent syntax as-is.\n * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.\n * @param {Node} node A node to check.\n * @returns {node is RuleNode & {parent: Expression}} `true` if the node is passed through.\n */\nfunction isPassThrough(node) {\n const parent = /** @type {TSESTreeNode} */ (node).parent\n\n if (parent) {\n switch (parent.type) {\n case \"ConditionalExpression\":\n return parent.consequent === node || parent.alternate === node\n case \"LogicalExpression\":\n return true\n case \"SequenceExpression\":\n return (\n parent.expressions[parent.expressions.length - 1] === node\n )\n case \"ChainExpression\":\n return true\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n case \"TSInstantiationExpression\":\n return true\n\n default:\n return false\n }\n }\n return false\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"globalThis\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(globalScope, options = {}) {\n const {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"globalThis\", \"self\", \"window\"],\n } = options\n /** @private @type {Variable[]} */\n this.variableStack = []\n /** @private */\n this.globalScope = globalScope\n /** @private */\n this.mode = mode\n /** @private */\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (variable),\n path,\n nextTraceMap,\n true,\n )\n }\n\n for (const key of this.globalObjectNames) {\n /** @type {string[]} */\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (variable),\n path,\n traceMap,\n false,\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(\n /** @type {CallExpression} */ (node).arguments[0],\n )\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n /** @type {CallExpression} */ (node),\n path,\n nextTraceMap,\n )\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = /** @type {Program} */ (this.globalScope.block)\n\n for (const node of programNode.body) {\n if (!isHasSource(node)) {\n continue\n }\n const moduleId = /** @type {string} */ (node.source.value)\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield {\n // eslint-disable-next-line object-shorthand -- apply type\n node: /** @type {RuleNode} */ (node),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n // eslint-disable-next-line object-shorthand -- apply type\n node: /** @type {RuleNode} */ (node),\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? { default: nextTraceMap, ...nextTraceMap }\n : { default: nextTraceMap },\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the property references for a given expression AST node.\n * @template T\n * @param {Expression} node The expression AST node to iterate property references.\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate property references.\n */\n *iteratePropertyReferences(node, traceMap) {\n yield* this._iteratePropertyReferences(node, [], traceMap)\n }\n\n /**\n * Iterate the references for a given variable.\n * @private\n * @template T\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = /** @type {RuleNode & Identifier} */ (\n reference.identifier\n )\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @private\n * @template T\n * @param {Expression} rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (isPassThrough(node)) {\n node = node.parent\n }\n\n const parent = /** @type {RuleNode} */ (node).parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap,\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @private\n * @template T\n * @param {Pattern} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(\n /** @type {AssignmentProperty} */ (property),\n )\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (property),\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n /** @type {AssignmentProperty} */ (property).value,\n nextPath,\n nextTraceMap,\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @private\n * @template T\n * @param {ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (specifierNode),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (\n findVariable(this.globalScope, specifierNode.local)\n ),\n path,\n nextTraceMap,\n false,\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (\n findVariable(this.globalScope, specifierNode.local)\n ),\n path,\n traceMap,\n false,\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key =\n specifierNode.local.type === \"Identifier\"\n ? specifierNode.local.name\n : specifierNode.local.value\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (specifierNode),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","/** @typedef {import(\"./types.mjs\").StaticValue} StaticValue */\n/** @typedef {import(\"./types.mjs\").StaticValueOptional} StaticValueOptional */\n/** @typedef {import(\"./types.mjs\").StaticValueProvided} StaticValueProvided */\n/** @typedef {import(\"./types.mjs\").ReferenceTrackerOptions} ReferenceTrackerOptions */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMap} TraceMap\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TrackedReferences} TrackedReferences\n */\n/** @typedef {import(\"./types.mjs\").HasSideEffectOptions} HasSideEffectOptions */\n/** @typedef {import(\"./types.mjs\").ArrowToken} ArrowToken */\n/** @typedef {import(\"./types.mjs\").CommaToken} CommaToken */\n/** @typedef {import(\"./types.mjs\").SemicolonToken} SemicolonToken */\n/** @typedef {import(\"./types.mjs\").ColonToken} ColonToken */\n/** @typedef {import(\"./types.mjs\").OpeningParenToken} OpeningParenToken */\n/** @typedef {import(\"./types.mjs\").ClosingParenToken} ClosingParenToken */\n/** @typedef {import(\"./types.mjs\").OpeningBracketToken} OpeningBracketToken */\n/** @typedef {import(\"./types.mjs\").ClosingBracketToken} ClosingBracketToken */\n/** @typedef {import(\"./types.mjs\").OpeningBraceToken} OpeningBraceToken */\n/** @typedef {import(\"./types.mjs\").ClosingBraceToken} ClosingBraceToken */\n\nimport { findVariable } from \"./find-variable.mjs\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location.mjs\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind.mjs\"\nimport { getInnermostScope } from \"./get-innermost-scope.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStaticValue } from \"./get-static-value.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\nimport { hasSideEffect } from \"./has-side-effect.mjs\"\nimport { isParenthesized } from \"./is-parenthesized.mjs\"\nimport { PatternMatcher } from \"./pattern-matcher.mjs\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker.mjs\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate.mjs\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE;AACtD,IAAI,MAAM,QAAQ,mCAAmC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAC;AACpE;AACA,IAAI,IAAI,KAAK,GAAG,aAAY;AAC5B,IAAI,IAAI,KAAK,GAAG,MAAK;AACrB,IAAI,GAAG;AACP,QAAQ,KAAK,GAAG,MAAK;AACrB,QAAQ,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,WAAW,EAAE;AACpD,YAAY,MAAM,KAAK;AACvB,gBAAgB,UAAU,CAAC,KAAK,CAAC,KAAK;AACtC,cAAa;AACb;AACA,YAAY,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE;AAC7D,gBAAgB,KAAK,GAAG,WAAU;AAClC,gBAAgB,KAAK,GAAG,KAAI;AAC5B,gBAAgB,KAAK;AACrB,aAAa;AACb,SAAS;AACT,KAAK,QAAQ,KAAK,CAAC;AACnB;AACA,IAAI,OAAO,KAAK;AAChB;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,YAAY,CAAC,YAAY,EAAE,UAAU,EAAE;AACvD,IAAI,IAAI,IAAI,GAAG,GAAE;AACjB;AACA,IAAI,IAAI,KAAK,GAAG,aAAY;AAC5B;AACA,IAAI,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;AACxC,QAAQ,IAAI,GAAG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BAAiB;AACrB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,mBAAmB;AACvB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,cAAc;AAClB,IAAI,IAAI;AACR,IAAI,gBAAgB;AACpB;;;;"} \ No newline at end of file diff --git a/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/LICENSE b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/LICENSE new file mode 100644 index 0000000..eedbb35 --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/README.md b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/README.md new file mode 100644 index 0000000..a714526 --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/README.md @@ -0,0 +1,105 @@ +# eslint-visitor-keys + +[![npm version](https://img.shields.io/npm/v/eslint-visitor-keys.svg)](https://www.npmjs.com/package/eslint-visitor-keys) +[![Downloads/month](https://img.shields.io/npm/dm/eslint-visitor-keys.svg)](http://www.npmtrends.com/eslint-visitor-keys) +[![Build Status](https://github.com/eslint/eslint-visitor-keys/workflows/CI/badge.svg)](https://github.com/eslint/eslint-visitor-keys/actions) + +Constants and utilities about visitor keys to traverse AST. + +## 💿 Installation + +Use [npm] to install. + +```bash +$ npm install eslint-visitor-keys +``` + +### Requirements + +- [Node.js] `^12.22.0`, `^14.17.0`, or `>=16.0.0` + + +## 📖 Usage + +To use in an ESM file: + +```js +import * as evk from "eslint-visitor-keys" +``` + +To use in a CommonJS file: + +```js +const evk = require("eslint-visitor-keys") +``` + +### evk.KEYS + +> type: `{ [type: string]: string[] | undefined }` + +Visitor keys. This keys are frozen. + +This is an object. Keys are the type of [ESTree] nodes. Their values are an array of property names which have child nodes. + +For example: + +``` +console.log(evk.KEYS.AssignmentExpression) // → ["left", "right"] +``` + +### evk.getKeys(node) + +> type: `(node: object) => string[]` + +Get the visitor keys of a given AST node. + +This is similar to `Object.keys(node)` of ES Standard, but some keys are excluded: `parent`, `leadingComments`, `trailingComments`, and names which start with `_`. + +This will be used to traverse unknown nodes. + +For example: + +```js +const node = { + type: "AssignmentExpression", + left: { type: "Identifier", name: "foo" }, + right: { type: "Literal", value: 0 } +} +console.log(evk.getKeys(node)) // → ["type", "left", "right"] +``` + +### evk.unionWith(additionalKeys) + +> type: `(additionalKeys: object) => { [type: string]: string[] | undefined }` + +Make the union set with `evk.KEYS` and the given keys. + +- The order of keys is, `additionalKeys` is at first, then `evk.KEYS` is concatenated after that. +- It removes duplicated keys as keeping the first one. + +For example: + +```js +console.log(evk.unionWith({ + MethodDefinition: ["decorators"] +})) // → { ..., MethodDefinition: ["decorators", "key", "value"], ... } +``` + +## 📰 Change log + +See [GitHub releases](https://github.com/eslint/eslint-visitor-keys/releases). + +## 🍻 Contributing + +Welcome. See [ESLint contribution guidelines](https://eslint.org/docs/developer-guide/contributing/). + +### Development commands + +- `npm test` runs tests and measures code coverage. +- `npm run lint` checks source codes with ESLint. +- `npm run test:open-coverage` opens the code coverage report of the previous test with your default browser. + + +[npm]: https://www.npmjs.com/ +[Node.js]: https://nodejs.org/ +[ESTree]: https://github.com/estree/estree diff --git a/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs new file mode 100644 index 0000000..a2d5e17 --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs @@ -0,0 +1,384 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/** + * @typedef {{ readonly [type: string]: ReadonlyArray }} VisitorKeys + */ + +/** + * @type {VisitorKeys} + */ +const KEYS = { + ArrayExpression: [ + "elements" + ], + ArrayPattern: [ + "elements" + ], + ArrowFunctionExpression: [ + "params", + "body" + ], + AssignmentExpression: [ + "left", + "right" + ], + AssignmentPattern: [ + "left", + "right" + ], + AwaitExpression: [ + "argument" + ], + BinaryExpression: [ + "left", + "right" + ], + BlockStatement: [ + "body" + ], + BreakStatement: [ + "label" + ], + CallExpression: [ + "callee", + "arguments" + ], + CatchClause: [ + "param", + "body" + ], + ChainExpression: [ + "expression" + ], + ClassBody: [ + "body" + ], + ClassDeclaration: [ + "id", + "superClass", + "body" + ], + ClassExpression: [ + "id", + "superClass", + "body" + ], + ConditionalExpression: [ + "test", + "consequent", + "alternate" + ], + ContinueStatement: [ + "label" + ], + DebuggerStatement: [], + DoWhileStatement: [ + "body", + "test" + ], + EmptyStatement: [], + ExperimentalRestProperty: [ + "argument" + ], + ExperimentalSpreadProperty: [ + "argument" + ], + ExportAllDeclaration: [ + "exported", + "source" + ], + ExportDefaultDeclaration: [ + "declaration" + ], + ExportNamedDeclaration: [ + "declaration", + "specifiers", + "source" + ], + ExportSpecifier: [ + "exported", + "local" + ], + ExpressionStatement: [ + "expression" + ], + ForInStatement: [ + "left", + "right", + "body" + ], + ForOfStatement: [ + "left", + "right", + "body" + ], + ForStatement: [ + "init", + "test", + "update", + "body" + ], + FunctionDeclaration: [ + "id", + "params", + "body" + ], + FunctionExpression: [ + "id", + "params", + "body" + ], + Identifier: [], + IfStatement: [ + "test", + "consequent", + "alternate" + ], + ImportDeclaration: [ + "specifiers", + "source" + ], + ImportDefaultSpecifier: [ + "local" + ], + ImportExpression: [ + "source" + ], + ImportNamespaceSpecifier: [ + "local" + ], + ImportSpecifier: [ + "imported", + "local" + ], + JSXAttribute: [ + "name", + "value" + ], + JSXClosingElement: [ + "name" + ], + JSXClosingFragment: [], + JSXElement: [ + "openingElement", + "children", + "closingElement" + ], + JSXEmptyExpression: [], + JSXExpressionContainer: [ + "expression" + ], + JSXFragment: [ + "openingFragment", + "children", + "closingFragment" + ], + JSXIdentifier: [], + JSXMemberExpression: [ + "object", + "property" + ], + JSXNamespacedName: [ + "namespace", + "name" + ], + JSXOpeningElement: [ + "name", + "attributes" + ], + JSXOpeningFragment: [], + JSXSpreadAttribute: [ + "argument" + ], + JSXSpreadChild: [ + "expression" + ], + JSXText: [], + LabeledStatement: [ + "label", + "body" + ], + Literal: [], + LogicalExpression: [ + "left", + "right" + ], + MemberExpression: [ + "object", + "property" + ], + MetaProperty: [ + "meta", + "property" + ], + MethodDefinition: [ + "key", + "value" + ], + NewExpression: [ + "callee", + "arguments" + ], + ObjectExpression: [ + "properties" + ], + ObjectPattern: [ + "properties" + ], + PrivateIdentifier: [], + Program: [ + "body" + ], + Property: [ + "key", + "value" + ], + PropertyDefinition: [ + "key", + "value" + ], + RestElement: [ + "argument" + ], + ReturnStatement: [ + "argument" + ], + SequenceExpression: [ + "expressions" + ], + SpreadElement: [ + "argument" + ], + StaticBlock: [ + "body" + ], + Super: [], + SwitchCase: [ + "test", + "consequent" + ], + SwitchStatement: [ + "discriminant", + "cases" + ], + TaggedTemplateExpression: [ + "tag", + "quasi" + ], + TemplateElement: [], + TemplateLiteral: [ + "quasis", + "expressions" + ], + ThisExpression: [], + ThrowStatement: [ + "argument" + ], + TryStatement: [ + "block", + "handler", + "finalizer" + ], + UnaryExpression: [ + "argument" + ], + UpdateExpression: [ + "argument" + ], + VariableDeclaration: [ + "declarations" + ], + VariableDeclarator: [ + "id", + "init" + ], + WhileStatement: [ + "test", + "body" + ], + WithStatement: [ + "object", + "body" + ], + YieldExpression: [ + "argument" + ] +}; + +// Types. +const NODE_TYPES = Object.keys(KEYS); + +// Freeze the keys. +for (const type of NODE_TYPES) { + Object.freeze(KEYS[type]); +} +Object.freeze(KEYS); + +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */ + +/** + * @typedef {import('./visitor-keys.js').VisitorKeys} VisitorKeys + */ + +// List to ignore keys. +const KEY_BLACKLIST = new Set([ + "parent", + "leadingComments", + "trailingComments" +]); + +/** + * Check whether a given key should be used or not. + * @param {string} key The key to check. + * @returns {boolean} `true` if the key should be used. + */ +function filterKey(key) { + return !KEY_BLACKLIST.has(key) && key[0] !== "_"; +} + +/** + * Get visitor keys of a given node. + * @param {object} node The AST node to get keys. + * @returns {readonly string[]} Visitor keys of the node. + */ +function getKeys(node) { + return Object.keys(node).filter(filterKey); +} + +// Disable valid-jsdoc rule because it reports syntax error on the type of @returns. +// eslint-disable-next-line valid-jsdoc +/** + * Make the union set with `KEYS` and given keys. + * @param {VisitorKeys} additionalKeys The additional keys. + * @returns {VisitorKeys} The union set. + */ +function unionWith(additionalKeys) { + const retv = /** @type {{ + [type: string]: ReadonlyArray + }} */ (Object.assign({}, KEYS)); + + for (const type of Object.keys(additionalKeys)) { + if (Object.prototype.hasOwnProperty.call(retv, type)) { + const keys = new Set(additionalKeys[type]); + + for (const key of retv[type]) { + keys.add(key); + } + + retv[type] = Object.freeze(Array.from(keys)); + } else { + retv[type] = Object.freeze(Array.from(additionalKeys[type])); + } + } + + return Object.freeze(retv); +} + +exports.KEYS = KEYS; +exports.getKeys = getKeys; +exports.unionWith = unionWith; diff --git a/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts new file mode 100644 index 0000000..ad93d14 --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts @@ -0,0 +1,27 @@ +type VisitorKeys$1 = { + readonly [type: string]: readonly string[]; +}; +/** + * @typedef {{ readonly [type: string]: ReadonlyArray }} VisitorKeys + */ +/** + * @type {VisitorKeys} + */ +declare const KEYS: VisitorKeys$1; + +/** + * Get visitor keys of a given node. + * @param {object} node The AST node to get keys. + * @returns {readonly string[]} Visitor keys of the node. + */ +declare function getKeys(node: object): readonly string[]; +/** + * Make the union set with `KEYS` and given keys. + * @param {VisitorKeys} additionalKeys The additional keys. + * @returns {VisitorKeys} The union set. + */ +declare function unionWith(additionalKeys: VisitorKeys): VisitorKeys; + +type VisitorKeys = VisitorKeys$1; + +export { KEYS, VisitorKeys, getKeys, unionWith }; diff --git a/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/index.d.ts b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/index.d.ts new file mode 100644 index 0000000..1e7d235 --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/index.d.ts @@ -0,0 +1,16 @@ +/** + * Get visitor keys of a given node. + * @param {object} node The AST node to get keys. + * @returns {readonly string[]} Visitor keys of the node. + */ +export function getKeys(node: object): readonly string[]; +/** + * Make the union set with `KEYS` and given keys. + * @param {VisitorKeys} additionalKeys The additional keys. + * @returns {VisitorKeys} The union set. + */ +export function unionWith(additionalKeys: VisitorKeys): VisitorKeys; +export { KEYS }; +export type VisitorKeys = import('./visitor-keys.js').VisitorKeys; +import KEYS from "./visitor-keys.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts new file mode 100644 index 0000000..f9c877f --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts @@ -0,0 +1,12 @@ +export default KEYS; +export type VisitorKeys = { + readonly [type: string]: readonly string[]; +}; +/** + * @typedef {{ readonly [type: string]: ReadonlyArray }} VisitorKeys + */ +/** + * @type {VisitorKeys} + */ +declare const KEYS: VisitorKeys; +//# sourceMappingURL=visitor-keys.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js new file mode 100644 index 0000000..1cc8426 --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js @@ -0,0 +1,65 @@ +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */ +import KEYS from "./visitor-keys.js"; + +/** + * @typedef {import('./visitor-keys.js').VisitorKeys} VisitorKeys + */ + +// List to ignore keys. +const KEY_BLACKLIST = new Set([ + "parent", + "leadingComments", + "trailingComments" +]); + +/** + * Check whether a given key should be used or not. + * @param {string} key The key to check. + * @returns {boolean} `true` if the key should be used. + */ +function filterKey(key) { + return !KEY_BLACKLIST.has(key) && key[0] !== "_"; +} + +/** + * Get visitor keys of a given node. + * @param {object} node The AST node to get keys. + * @returns {readonly string[]} Visitor keys of the node. + */ +export function getKeys(node) { + return Object.keys(node).filter(filterKey); +} + +// Disable valid-jsdoc rule because it reports syntax error on the type of @returns. +// eslint-disable-next-line valid-jsdoc +/** + * Make the union set with `KEYS` and given keys. + * @param {VisitorKeys} additionalKeys The additional keys. + * @returns {VisitorKeys} The union set. + */ +export function unionWith(additionalKeys) { + const retv = /** @type {{ + [type: string]: ReadonlyArray + }} */ (Object.assign({}, KEYS)); + + for (const type of Object.keys(additionalKeys)) { + if (Object.prototype.hasOwnProperty.call(retv, type)) { + const keys = new Set(additionalKeys[type]); + + for (const key of retv[type]) { + keys.add(key); + } + + retv[type] = Object.freeze(Array.from(keys)); + } else { + retv[type] = Object.freeze(Array.from(additionalKeys[type])); + } + } + + return Object.freeze(retv); +} + +export { KEYS }; diff --git a/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.js b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.js new file mode 100644 index 0000000..442308b --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.js @@ -0,0 +1,315 @@ +/** + * @typedef {{ readonly [type: string]: ReadonlyArray }} VisitorKeys + */ + +/** + * @type {VisitorKeys} + */ +const KEYS = { + ArrayExpression: [ + "elements" + ], + ArrayPattern: [ + "elements" + ], + ArrowFunctionExpression: [ + "params", + "body" + ], + AssignmentExpression: [ + "left", + "right" + ], + AssignmentPattern: [ + "left", + "right" + ], + AwaitExpression: [ + "argument" + ], + BinaryExpression: [ + "left", + "right" + ], + BlockStatement: [ + "body" + ], + BreakStatement: [ + "label" + ], + CallExpression: [ + "callee", + "arguments" + ], + CatchClause: [ + "param", + "body" + ], + ChainExpression: [ + "expression" + ], + ClassBody: [ + "body" + ], + ClassDeclaration: [ + "id", + "superClass", + "body" + ], + ClassExpression: [ + "id", + "superClass", + "body" + ], + ConditionalExpression: [ + "test", + "consequent", + "alternate" + ], + ContinueStatement: [ + "label" + ], + DebuggerStatement: [], + DoWhileStatement: [ + "body", + "test" + ], + EmptyStatement: [], + ExperimentalRestProperty: [ + "argument" + ], + ExperimentalSpreadProperty: [ + "argument" + ], + ExportAllDeclaration: [ + "exported", + "source" + ], + ExportDefaultDeclaration: [ + "declaration" + ], + ExportNamedDeclaration: [ + "declaration", + "specifiers", + "source" + ], + ExportSpecifier: [ + "exported", + "local" + ], + ExpressionStatement: [ + "expression" + ], + ForInStatement: [ + "left", + "right", + "body" + ], + ForOfStatement: [ + "left", + "right", + "body" + ], + ForStatement: [ + "init", + "test", + "update", + "body" + ], + FunctionDeclaration: [ + "id", + "params", + "body" + ], + FunctionExpression: [ + "id", + "params", + "body" + ], + Identifier: [], + IfStatement: [ + "test", + "consequent", + "alternate" + ], + ImportDeclaration: [ + "specifiers", + "source" + ], + ImportDefaultSpecifier: [ + "local" + ], + ImportExpression: [ + "source" + ], + ImportNamespaceSpecifier: [ + "local" + ], + ImportSpecifier: [ + "imported", + "local" + ], + JSXAttribute: [ + "name", + "value" + ], + JSXClosingElement: [ + "name" + ], + JSXClosingFragment: [], + JSXElement: [ + "openingElement", + "children", + "closingElement" + ], + JSXEmptyExpression: [], + JSXExpressionContainer: [ + "expression" + ], + JSXFragment: [ + "openingFragment", + "children", + "closingFragment" + ], + JSXIdentifier: [], + JSXMemberExpression: [ + "object", + "property" + ], + JSXNamespacedName: [ + "namespace", + "name" + ], + JSXOpeningElement: [ + "name", + "attributes" + ], + JSXOpeningFragment: [], + JSXSpreadAttribute: [ + "argument" + ], + JSXSpreadChild: [ + "expression" + ], + JSXText: [], + LabeledStatement: [ + "label", + "body" + ], + Literal: [], + LogicalExpression: [ + "left", + "right" + ], + MemberExpression: [ + "object", + "property" + ], + MetaProperty: [ + "meta", + "property" + ], + MethodDefinition: [ + "key", + "value" + ], + NewExpression: [ + "callee", + "arguments" + ], + ObjectExpression: [ + "properties" + ], + ObjectPattern: [ + "properties" + ], + PrivateIdentifier: [], + Program: [ + "body" + ], + Property: [ + "key", + "value" + ], + PropertyDefinition: [ + "key", + "value" + ], + RestElement: [ + "argument" + ], + ReturnStatement: [ + "argument" + ], + SequenceExpression: [ + "expressions" + ], + SpreadElement: [ + "argument" + ], + StaticBlock: [ + "body" + ], + Super: [], + SwitchCase: [ + "test", + "consequent" + ], + SwitchStatement: [ + "discriminant", + "cases" + ], + TaggedTemplateExpression: [ + "tag", + "quasi" + ], + TemplateElement: [], + TemplateLiteral: [ + "quasis", + "expressions" + ], + ThisExpression: [], + ThrowStatement: [ + "argument" + ], + TryStatement: [ + "block", + "handler", + "finalizer" + ], + UnaryExpression: [ + "argument" + ], + UpdateExpression: [ + "argument" + ], + VariableDeclaration: [ + "declarations" + ], + VariableDeclarator: [ + "id", + "init" + ], + WhileStatement: [ + "test", + "body" + ], + WithStatement: [ + "object", + "body" + ], + YieldExpression: [ + "argument" + ] +}; + +// Types. +const NODE_TYPES = Object.keys(KEYS); + +// Freeze the keys. +for (const type of NODE_TYPES) { + Object.freeze(KEYS[type]); +} +Object.freeze(KEYS); + +export default KEYS; diff --git a/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/package.json b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/package.json new file mode 100644 index 0000000..946c4de --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/package.json @@ -0,0 +1,74 @@ +{ + "name": "eslint-visitor-keys", + "version": "3.4.3", + "description": "Constants and utilities about visitor keys to traverse AST.", + "type": "module", + "main": "dist/eslint-visitor-keys.cjs", + "types": "./dist/index.d.ts", + "exports": { + ".": [ + { + "import": "./lib/index.js", + "require": "./dist/eslint-visitor-keys.cjs" + }, + "./dist/eslint-visitor-keys.cjs" + ], + "./package.json": "./package.json" + }, + "files": [ + "dist/index.d.ts", + "dist/visitor-keys.d.ts", + "dist/eslint-visitor-keys.cjs", + "dist/eslint-visitor-keys.d.cts", + "lib" + ], + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "devDependencies": { + "@types/estree": "^0.0.51", + "@types/estree-jsx": "^0.0.1", + "@typescript-eslint/parser": "^5.14.0", + "c8": "^7.11.0", + "chai": "^4.3.6", + "eslint": "^7.29.0", + "eslint-config-eslint": "^7.0.0", + "eslint-plugin-jsdoc": "^35.4.0", + "eslint-plugin-node": "^11.1.0", + "eslint-release": "^3.2.0", + "esquery": "^1.4.0", + "json-diff": "^0.7.3", + "mocha": "^9.2.1", + "opener": "^1.5.2", + "rollup": "^2.70.0", + "rollup-plugin-dts": "^4.2.3", + "tsd": "^0.19.1", + "typescript": "^4.6.2" + }, + "scripts": { + "build": "npm run build:cjs && npm run build:types", + "build:cjs": "rollup -c", + "build:debug": "npm run build:cjs -- -m && npm run build:types", + "build:keys": "node tools/build-keys-from-ts", + "build:types": "tsc", + "lint": "eslint .", + "prepare": "npm run build", + "release:generate:latest": "eslint-generate-release", + "release:generate:alpha": "eslint-generate-prerelease alpha", + "release:generate:beta": "eslint-generate-prerelease beta", + "release:generate:rc": "eslint-generate-prerelease rc", + "release:publish": "eslint-publish-release", + "test": "mocha tests/lib/**/*.cjs && c8 mocha tests/lib/**/*.js && npm run test:types", + "test:open-coverage": "c8 report --reporter lcov && opener coverage/lcov-report/index.html", + "test:types": "tsd" + }, + "repository": "eslint/eslint-visitor-keys", + "funding": "https://opencollective.com/eslint", + "keywords": [], + "author": "Toru Nagashima (https://github.com/mysticatea)", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/eslint/eslint-visitor-keys/issues" + }, + "homepage": "https://github.com/eslint/eslint-visitor-keys#readme" +} diff --git a/slider/node_modules/@eslint-community/eslint-utils/package.json b/slider/node_modules/@eslint-community/eslint-utils/package.json new file mode 100644 index 0000000..61a8cbb --- /dev/null +++ b/slider/node_modules/@eslint-community/eslint-utils/package.json @@ -0,0 +1,89 @@ +{ + "name": "@eslint-community/eslint-utils", + "version": "4.9.0", + "description": "Utilities for ESLint plugins.", + "keywords": [ + "eslint" + ], + "homepage": "https://github.com/eslint-community/eslint-utils#readme", + "bugs": { + "url": "https://github.com/eslint-community/eslint-utils/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/eslint-community/eslint-utils" + }, + "license": "MIT", + "author": "Toru Nagashima", + "sideEffects": false, + "exports": { + ".": { + "import": "./index.mjs", + "require": "./index.js" + }, + "./package.json": "./package.json" + }, + "main": "index", + "module": "index.mjs", + "files": [ + "index.*" + ], + "scripts": { + "prebuild": "npm run -s clean", + "build": "npm run build:dts && npm run build:rollup", + "build:dts": "tsc -p tsconfig.build.json", + "build:rollup": "rollup -c", + "clean": "rimraf .nyc_output coverage index.* dist", + "coverage": "opener ./coverage/lcov-report/index.html", + "docs:build": "vitepress build docs", + "docs:watch": "vitepress dev docs", + "format": "npm run -s format:prettier -- --write", + "format:prettier": "prettier .", + "format:check": "npm run -s format:prettier -- --check", + "lint:eslint": "eslint .", + "lint:format": "npm run -s format:check", + "lint:installed-check": "installed-check -v -i installed-check -i npm-run-all2 -i knip -i rollup-plugin-dts", + "lint:knip": "knip", + "lint": "run-p lint:*", + "test-coverage": "c8 mocha --reporter dot \"test/*.mjs\"", + "test": "mocha --reporter dot \"test/*.mjs\"", + "preversion": "npm run test-coverage && npm run -s build", + "postversion": "git push && git push --tags", + "prewatch": "npm run -s clean", + "watch": "warun \"{src,test}/**/*.mjs\" -- npm run -s test:mocha" + }, + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "devDependencies": { + "@eslint-community/eslint-plugin-mysticatea": "^15.6.1", + "@types/eslint": "^9.6.1", + "@types/estree": "^1.0.7", + "@typescript-eslint/parser": "^5.62.0", + "@typescript-eslint/types": "^5.62.0", + "c8": "^8.0.1", + "dot-prop": "^7.2.0", + "eslint": "^8.57.1", + "installed-check": "^8.0.1", + "knip": "^5.33.3", + "mocha": "^9.2.2", + "npm-run-all2": "^6.2.3", + "opener": "^1.5.2", + "prettier": "2.8.8", + "rimraf": "^3.0.2", + "rollup": "^2.79.2", + "rollup-plugin-dts": "^4.2.3", + "rollup-plugin-sourcemaps": "^0.6.3", + "semver": "^7.6.3", + "typescript": "^4.9.5", + "vitepress": "^1.4.1", + "warun": "^1.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": "https://opencollective.com/eslint" +} diff --git a/slider/node_modules/@eslint-community/regexpp/LICENSE b/slider/node_modules/@eslint-community/regexpp/LICENSE new file mode 100644 index 0000000..d77398f --- /dev/null +++ b/slider/node_modules/@eslint-community/regexpp/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@eslint-community/regexpp/README.md b/slider/node_modules/@eslint-community/regexpp/README.md new file mode 100644 index 0000000..5842857 --- /dev/null +++ b/slider/node_modules/@eslint-community/regexpp/README.md @@ -0,0 +1,177 @@ +# @eslint-community/regexpp + +[![npm version](https://img.shields.io/npm/v/@eslint-community/regexpp.svg)](https://www.npmjs.com/package/@eslint-community/regexpp) +[![Downloads/month](https://img.shields.io/npm/dm/@eslint-community/regexpp.svg)](http://www.npmtrends.com/@eslint-community/regexpp) +[![Build Status](https://github.com/eslint-community/regexpp/workflows/CI/badge.svg)](https://github.com/eslint-community/regexpp/actions) +[![codecov](https://codecov.io/gh/eslint-community/regexpp/branch/main/graph/badge.svg)](https://codecov.io/gh/eslint-community/regexpp) + +A regular expression parser for ECMAScript. + +## 💿 Installation + +```bash +$ npm install @eslint-community/regexpp +``` + +- require Node@^12.0.0 || ^14.0.0 || >=16.0.0. + +## 📖 Usage + +```ts +import { + AST, + RegExpParser, + RegExpValidator, + RegExpVisitor, + parseRegExpLiteral, + validateRegExpLiteral, + visitRegExpAST +} from "@eslint-community/regexpp" +``` + +### parseRegExpLiteral(source, options?) + +Parse a given regular expression literal then make AST object. + +This is equivalent to `new RegExpParser(options).parseLiteral(source)`. + +- **Parameters:** + - `source` (`string | RegExp`) The source code to parse. + - `options?` ([`RegExpParser.Options`]) The options to parse. +- **Return:** + - The AST of the regular expression. + +### validateRegExpLiteral(source, options?) + +Validate a given regular expression literal. + +This is equivalent to `new RegExpValidator(options).validateLiteral(source)`. + +- **Parameters:** + - `source` (`string`) The source code to validate. + - `options?` ([`RegExpValidator.Options`]) The options to validate. + +### visitRegExpAST(ast, handlers) + +Visit each node of a given AST. + +This is equivalent to `new RegExpVisitor(handlers).visit(ast)`. + +- **Parameters:** + - `ast` ([`AST.Node`]) The AST to visit. + - `handlers` ([`RegExpVisitor.Handlers`]) The callbacks. + +### RegExpParser + +#### new RegExpParser(options?) + +- **Parameters:** + - `options?` ([`RegExpParser.Options`]) The options to parse. + +#### parser.parseLiteral(source, start?, end?) + +Parse a regular expression literal. + +- **Parameters:** + - `source` (`string`) The source code to parse. E.g. `"/abc/g"`. + - `start?` (`number`) The start index in the source code. Default is `0`. + - `end?` (`number`) The end index in the source code. Default is `source.length`. +- **Return:** + - The AST of the regular expression. + +#### parser.parsePattern(source, start?, end?, flags?) + +Parse a regular expression pattern. + +- **Parameters:** + - `source` (`string`) The source code to parse. E.g. `"abc"`. + - `start?` (`number`) The start index in the source code. Default is `0`. + - `end?` (`number`) The end index in the source code. Default is `source.length`. + - `flags?` (`{ unicode?: boolean, unicodeSets?: boolean }`) The flags to enable Unicode mode, and Unicode Set mode. +- **Return:** + - The AST of the regular expression pattern. + +#### parser.parseFlags(source, start?, end?) + +Parse a regular expression flags. + +- **Parameters:** + - `source` (`string`) The source code to parse. E.g. `"gim"`. + - `start?` (`number`) The start index in the source code. Default is `0`. + - `end?` (`number`) The end index in the source code. Default is `source.length`. +- **Return:** + - The AST of the regular expression flags. + +### RegExpValidator + +#### new RegExpValidator(options) + +- **Parameters:** + - `options` ([`RegExpValidator.Options`]) The options to validate. + +#### validator.validateLiteral(source, start, end) + +Validate a regular expression literal. + +- **Parameters:** + - `source` (`string`) The source code to validate. + - `start?` (`number`) The start index in the source code. Default is `0`. + - `end?` (`number`) The end index in the source code. Default is `source.length`. + +#### validator.validatePattern(source, start, end, flags) + +Validate a regular expression pattern. + +- **Parameters:** + - `source` (`string`) The source code to validate. + - `start?` (`number`) The start index in the source code. Default is `0`. + - `end?` (`number`) The end index in the source code. Default is `source.length`. + - `flags?` (`{ unicode?: boolean, unicodeSets?: boolean }`) The flags to enable Unicode mode, and Unicode Set mode. + +#### validator.validateFlags(source, start, end) + +Validate a regular expression flags. + +- **Parameters:** + - `source` (`string`) The source code to validate. + - `start?` (`number`) The start index in the source code. Default is `0`. + - `end?` (`number`) The end index in the source code. Default is `source.length`. + +### RegExpVisitor + +#### new RegExpVisitor(handlers) + +- **Parameters:** + - `handlers` ([`RegExpVisitor.Handlers`]) The callbacks. + +#### visitor.visit(ast) + +Validate a regular expression literal. + +- **Parameters:** + - `ast` ([`AST.Node`]) The AST to visit. + +## 📰 Changelog + +- [GitHub Releases](https://github.com/eslint-community/regexpp/releases) + +## 🍻 Contributing + +Welcome contributing! + +Please use GitHub's Issues/PRs. + +### Development Tools + +- `npm test` runs tests and measures coverage. +- `npm run build` compiles TypeScript source code to `index.js`, `index.js.map`, and `index.d.ts`. +- `npm run clean` removes the temporary files which are created by `npm test` and `npm run build`. +- `npm run lint` runs ESLint. +- `npm run update:test` updates test fixtures. +- `npm run update:ids` updates `src/unicode/ids.ts`. +- `npm run watch` runs tests with `--watch` option. + +[`AST.Node`]: src/ast.ts#L4 +[`RegExpParser.Options`]: src/parser.ts#L743 +[`RegExpValidator.Options`]: src/validator.ts#L220 +[`RegExpVisitor.Handlers`]: src/visitor.ts#L291 diff --git a/slider/node_modules/@eslint-community/regexpp/index.d.ts b/slider/node_modules/@eslint-community/regexpp/index.d.ts new file mode 100644 index 0000000..4230936 --- /dev/null +++ b/slider/node_modules/@eslint-community/regexpp/index.d.ts @@ -0,0 +1,1163 @@ +// Generated by dts-bundle v0.7.3 + +declare module "@eslint-community/regexpp" { + import * as AST from "@eslint-community/regexpp/ast"; + import { RegExpParser } from "@eslint-community/regexpp/parser"; + import { RegExpValidator } from "@eslint-community/regexpp/validator"; + import { RegExpVisitor } from "@eslint-community/regexpp/visitor"; + export { RegExpSyntaxError } from "@eslint-community/regexpp/regexp-syntax-error"; + export { AST, RegExpParser, RegExpValidator }; + /** + * Parse a given regular expression literal then make AST object. + * @param source The source code to parse. + * @param options The options to parse. + * @returns The AST of the regular expression. + */ + export function parseRegExpLiteral( + source: RegExp | string, + options?: RegExpParser.Options + ): AST.RegExpLiteral; + /** + * Validate a given regular expression literal. + * @param source The source code to validate. + * @param options The options to validate. + */ + export function validateRegExpLiteral( + source: string, + options?: RegExpValidator.Options + ): void; + export function visitRegExpAST( + node: AST.Node, + handlers: RegExpVisitor.Handlers + ): void; +} + +declare module "@eslint-community/regexpp/ast" { + /** + * The type which includes all nodes. + */ + export type Node = BranchNode | LeafNode; + /** + * The type which includes all branch nodes. + */ + export type BranchNode = + | Alternative + | CapturingGroup + | CharacterClass + | CharacterClassRange + | ClassIntersection + | ClassStringDisjunction + | ClassSubtraction + | ExpressionCharacterClass + | Group + | LookaroundAssertion + | Modifiers + | Pattern + | Quantifier + | RegExpLiteral + | StringAlternative; + /** + * The type which includes all leaf nodes. + */ + export type LeafNode = + | Backreference + | BoundaryAssertion + | Character + | CharacterSet + | Flags + | ModifierFlags; + /** + * The type which includes all atom nodes. + */ + export type Element = Assertion | QuantifiableElement | Quantifier; + /** + * The type which includes all atom nodes that Quantifier node can have as children. + */ + export type QuantifiableElement = + | Backreference + | CapturingGroup + | Character + | CharacterClass + | CharacterSet + | ExpressionCharacterClass + | Group + | LookaheadAssertion; + /** + * The type which includes all character class atom nodes. + */ + export type CharacterClassElement = + | ClassRangesCharacterClassElement + | UnicodeSetsCharacterClassElement; + export type ClassRangesCharacterClassElement = + | Character + | CharacterClassRange + | CharacterUnicodePropertyCharacterSet + | EscapeCharacterSet; + export type UnicodeSetsCharacterClassElement = + | Character + | CharacterClassRange + | ClassStringDisjunction + | EscapeCharacterSet + | ExpressionCharacterClass + | UnicodePropertyCharacterSet + | UnicodeSetsCharacterClass; + /** + * The type which defines common properties for all node types. + */ + export interface NodeBase { + /** The node type. */ + type: Node["type"]; + /** The parent node. */ + parent: Node["parent"]; + /** The 0-based index that this node starts. */ + start: number; + /** The 0-based index that this node ends. */ + end: number; + /** The raw text of this node. */ + raw: string; + } + /** + * The root node. + */ + export interface RegExpLiteral extends NodeBase { + type: "RegExpLiteral"; + parent: null; + pattern: Pattern; + flags: Flags; + } + /** + * The pattern. + */ + export interface Pattern extends NodeBase { + type: "Pattern"; + parent: RegExpLiteral | null; + alternatives: Alternative[]; + } + /** + * The alternative. + * E.g. `a|b` + */ + export interface Alternative extends NodeBase { + type: "Alternative"; + parent: CapturingGroup | Group | LookaroundAssertion | Pattern; + elements: Element[]; + } + /** + * The uncapturing group. + * E.g. `(?:ab)` + */ + export interface Group extends NodeBase { + type: "Group"; + parent: Alternative | Quantifier; + modifiers: Modifiers | null; + alternatives: Alternative[]; + } + /** + * The capturing group. + * E.g. `(ab)`, `(?ab)` + */ + export interface CapturingGroup extends NodeBase { + type: "CapturingGroup"; + parent: Alternative | Quantifier; + name: string | null; + alternatives: Alternative[]; + references: Backreference[]; + } + /** + * The lookaround assertion. + */ + export type LookaroundAssertion = LookaheadAssertion | LookbehindAssertion; + /** + * The lookahead assertion. + * E.g. `(?=ab)`, `(?!ab)` + */ + export interface LookaheadAssertion extends NodeBase { + type: "Assertion"; + parent: Alternative | Quantifier; + kind: "lookahead"; + negate: boolean; + alternatives: Alternative[]; + } + /** + * The lookbehind assertion. + * E.g. `(?<=ab)`, `(?` + */ + export type Backreference = AmbiguousBackreference | UnambiguousBackreference; + interface BaseBackreference extends NodeBase { + type: "Backreference"; + parent: Alternative | Quantifier; + ref: number | string; + ambiguous: boolean; + resolved: CapturingGroup | CapturingGroup[]; + } + export interface AmbiguousBackreference extends BaseBackreference { + ref: string; + ambiguous: true; + resolved: CapturingGroup[]; + } + export interface UnambiguousBackreference extends BaseBackreference { + ambiguous: false; + resolved: CapturingGroup; + } + /** + * The modifiers. + */ + export interface Modifiers extends NodeBase { + type: "Modifiers"; + parent: Group; + /** + * The add modifier flags. + */ + add: ModifierFlags; + /** + * The remove modifier flags. + * + * `null` means no remove modifier flags. e.g. `(?ims:x)` + * The reason for `null` is that there is no position where the remove modifier flags appears. Must be behind the minus mark. + */ + remove: ModifierFlags | null; + } + /** + * The modifier flags. + */ + export interface ModifierFlags extends NodeBase { + type: "ModifierFlags"; + parent: Modifiers; + dotAll: boolean; + ignoreCase: boolean; + multiline: boolean; + } + /** + * The flags. + */ + export interface Flags extends NodeBase { + type: "Flags"; + parent: RegExpLiteral | null; + dotAll: boolean; + global: boolean; + hasIndices: boolean; + ignoreCase: boolean; + multiline: boolean; + sticky: boolean; + unicode: boolean; + unicodeSets: boolean; + } + export {}; +} + +declare module "@eslint-community/regexpp/parser" { + import type { + Flags, + RegExpLiteral, + Pattern, + } from "@eslint-community/regexpp/ast"; + import type { EcmaVersion } from "@eslint-community/regexpp/ecma-versions"; + export namespace RegExpParser { + /** + * The options for RegExpParser construction. + */ + interface Options { + /** + * The flag to disable Annex B syntax. Default is `false`. + */ + strict?: boolean; + /** + * ECMAScript version. Default is `2025`. + * - `2015` added `u` and `y` flags. + * - `2018` added `s` flag, Named Capturing Group, Lookbehind Assertion, + * and Unicode Property Escape. + * - `2019`, `2020`, and `2021` added more valid Unicode Property Escapes. + * - `2022` added `d` flag. + * - `2023` added more valid Unicode Property Escapes. + * - `2024` added `v` flag. + * - `2025` added duplicate named capturing groups, modifiers. + */ + ecmaVersion?: EcmaVersion; + } + } + export class RegExpParser { + /** + * Initialize this parser. + * @param options The options of parser. + */ + constructor(options?: RegExpParser.Options); + /** + * Parse a regular expression literal. E.g. "/abc/g" + * @param source The source code to parse. + * @param start The start index in the source code. + * @param end The end index in the source code. + * @returns The AST of the given regular expression. + */ + parseLiteral(source: string, start?: number, end?: number): RegExpLiteral; + /** + * Parse a regular expression flags. E.g. "gim" + * @param source The source code to parse. + * @param start The start index in the source code. + * @param end The end index in the source code. + * @returns The AST of the given flags. + */ + parseFlags(source: string, start?: number, end?: number): Flags; + /** + * Parse a regular expression pattern. E.g. "abc" + * @param source The source code to parse. + * @param start The start index in the source code. + * @param end The end index in the source code. + * @param flags The flags. + * @returns The AST of the given pattern. + */ + parsePattern( + source: string, + start?: number, + end?: number, + flags?: { + unicode?: boolean; + unicodeSets?: boolean; + } + ): Pattern; + /** + * @deprecated Backward compatibility + * Use object `flags` instead of boolean `uFlag`. + * + * @param source The source code to parse. + * @param start The start index in the source code. + * @param end The end index in the source code. + * @param uFlag The flag to set unicode mode. + * @returns The AST of the given pattern. + */ + parsePattern( + source: string, + start?: number, + end?: number, + uFlag?: boolean + ): Pattern; + } +} + +declare module "@eslint-community/regexpp/validator" { + import type { EcmaVersion } from "@eslint-community/regexpp/ecma-versions"; + export type RegExpValidatorSourceContext = { + readonly source: string; + readonly start: number; + readonly end: number; + readonly kind: "flags" | "literal" | "pattern"; + }; + export namespace RegExpValidator { + /** + * The options for RegExpValidator construction. + */ + interface Options { + /** + * The flag to disable Annex B syntax. Default is `false`. + */ + strict?: boolean; + /** + * ECMAScript version. Default is `2025`. + * - `2015` added `u` and `y` flags. + * - `2018` added `s` flag, Named Capturing Group, Lookbehind Assertion, + * and Unicode Property Escape. + * - `2019`, `2020`, and `2021` added more valid Unicode Property Escapes. + * - `2022` added `d` flag. + * - `2023` added more valid Unicode Property Escapes. + * - `2024` added `v` flag. + * - `2025` added duplicate named capturing groups, modifiers. + */ + ecmaVersion?: EcmaVersion; + /** + * A function that is called when the validator entered a RegExp literal. + * @param start The 0-based index of the first character. + */ + onLiteralEnter?: (start: number) => void; + /** + * A function that is called when the validator left a RegExp literal. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onLiteralLeave?: (start: number, end: number) => void; + /** + * A function that is called when the validator found flags. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param flags.global `g` flag. + * @param flags.ignoreCase `i` flag. + * @param flags.multiline `m` flag. + * @param flags.unicode `u` flag. + * @param flags.sticky `y` flag. + * @param flags.dotAll `s` flag. + * @param flags.hasIndices `d` flag. + * @param flags.unicodeSets `v` flag. + */ + onRegExpFlags?: ( + start: number, + end: number, + flags: { + global: boolean; + ignoreCase: boolean; + multiline: boolean; + unicode: boolean; + sticky: boolean; + dotAll: boolean; + hasIndices: boolean; + unicodeSets: boolean; + } + ) => void; + /** + * A function that is called when the validator found flags. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param global `g` flag. + * @param ignoreCase `i` flag. + * @param multiline `m` flag. + * @param unicode `u` flag. + * @param sticky `y` flag. + * @param dotAll `s` flag. + * @param hasIndices `d` flag. + * + * @deprecated Use `onRegExpFlags` instead. + */ + onFlags?: ( + start: number, + end: number, + global: boolean, + ignoreCase: boolean, + multiline: boolean, + unicode: boolean, + sticky: boolean, + dotAll: boolean, + hasIndices: boolean + ) => void; + /** + * A function that is called when the validator entered a pattern. + * @param start The 0-based index of the first character. + */ + onPatternEnter?: (start: number) => void; + /** + * A function that is called when the validator left a pattern. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onPatternLeave?: (start: number, end: number) => void; + /** + * A function that is called when the validator entered a disjunction. + * @param start The 0-based index of the first character. + */ + onDisjunctionEnter?: (start: number) => void; + /** + * A function that is called when the validator left a disjunction. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onDisjunctionLeave?: (start: number, end: number) => void; + /** + * A function that is called when the validator entered an alternative. + * @param start The 0-based index of the first character. + * @param index The 0-based index of alternatives in a disjunction. + */ + onAlternativeEnter?: (start: number, index: number) => void; + /** + * A function that is called when the validator left an alternative. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param index The 0-based index of alternatives in a disjunction. + */ + onAlternativeLeave?: (start: number, end: number, index: number) => void; + /** + * A function that is called when the validator entered an uncapturing group. + * @param start The 0-based index of the first character. + */ + onGroupEnter?: (start: number) => void; + /** + * A function that is called when the validator left an uncapturing group. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onGroupLeave?: (start: number, end: number) => void; + /** + * A function that is called when the validator entered a modifiers. + * @param start The 0-based index of the first character. + */ + onModifiersEnter?: (start: number) => void; + /** + * A function that is called when the validator left a modifiers. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onModifiersLeave?: (start: number, end: number) => void; + /** + * A function that is called when the validator found an add modifiers. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param flags flags. + * @param flags.ignoreCase `i` flag. + * @param flags.multiline `m` flag. + * @param flags.dotAll `s` flag. + */ + onAddModifiers?: ( + start: number, + end: number, + flags: { + ignoreCase: boolean; + multiline: boolean; + dotAll: boolean; + } + ) => void; + /** + * A function that is called when the validator found a remove modifiers. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param flags flags. + * @param flags.ignoreCase `i` flag. + * @param flags.multiline `m` flag. + * @param flags.dotAll `s` flag. + */ + onRemoveModifiers?: ( + start: number, + end: number, + flags: { + ignoreCase: boolean; + multiline: boolean; + dotAll: boolean; + } + ) => void; + /** + * A function that is called when the validator entered a capturing group. + * @param start The 0-based index of the first character. + * @param name The group name. + */ + onCapturingGroupEnter?: (start: number, name: string | null) => void; + /** + * A function that is called when the validator left a capturing group. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param name The group name. + */ + onCapturingGroupLeave?: ( + start: number, + end: number, + name: string | null + ) => void; + /** + * A function that is called when the validator found a quantifier. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param min The minimum number of repeating. + * @param max The maximum number of repeating. + * @param greedy The flag to choose the longest matching. + */ + onQuantifier?: ( + start: number, + end: number, + min: number, + max: number, + greedy: boolean + ) => void; + /** + * A function that is called when the validator entered a lookahead/lookbehind assertion. + * @param start The 0-based index of the first character. + * @param kind The kind of the assertion. + * @param negate The flag which represents that the assertion is negative. + */ + onLookaroundAssertionEnter?: ( + start: number, + kind: "lookahead" | "lookbehind", + negate: boolean + ) => void; + /** + * A function that is called when the validator left a lookahead/lookbehind assertion. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param kind The kind of the assertion. + * @param negate The flag which represents that the assertion is negative. + */ + onLookaroundAssertionLeave?: ( + start: number, + end: number, + kind: "lookahead" | "lookbehind", + negate: boolean + ) => void; + /** + * A function that is called when the validator found an edge boundary assertion. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param kind The kind of the assertion. + */ + onEdgeAssertion?: ( + start: number, + end: number, + kind: "end" | "start" + ) => void; + /** + * A function that is called when the validator found a word boundary assertion. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param kind The kind of the assertion. + * @param negate The flag which represents that the assertion is negative. + */ + onWordBoundaryAssertion?: ( + start: number, + end: number, + kind: "word", + negate: boolean + ) => void; + /** + * A function that is called when the validator found a dot. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param kind The kind of the character set. + */ + onAnyCharacterSet?: (start: number, end: number, kind: "any") => void; + /** + * A function that is called when the validator found a character set escape. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param kind The kind of the character set. + * @param negate The flag which represents that the character set is negative. + */ + onEscapeCharacterSet?: ( + start: number, + end: number, + kind: "digit" | "space" | "word", + negate: boolean + ) => void; + /** + * A function that is called when the validator found a Unicode proerty escape. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param kind The kind of the character set. + * @param key The property name. + * @param value The property value. + * @param negate The flag which represents that the character set is negative. + * @param strings If true, the given property is property of strings. + */ + onUnicodePropertyCharacterSet?: ( + start: number, + end: number, + kind: "property", + key: string, + value: string | null, + negate: boolean, + strings: boolean + ) => void; + /** + * A function that is called when the validator found a character. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param value The code point of the character. + */ + onCharacter?: (start: number, end: number, value: number) => void; + /** + * A function that is called when the validator found a backreference. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param ref The key of the referred capturing group. + */ + onBackreference?: ( + start: number, + end: number, + ref: number | string + ) => void; + /** + * A function that is called when the validator entered a character class. + * @param start The 0-based index of the first character. + * @param negate The flag which represents that the character class is negative. + * @param unicodeSets `true` if unicodeSets mode. + */ + onCharacterClassEnter?: ( + start: number, + negate: boolean, + unicodeSets: boolean + ) => void; + /** + * A function that is called when the validator left a character class. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param negate The flag which represents that the character class is negative. + */ + onCharacterClassLeave?: ( + start: number, + end: number, + negate: boolean + ) => void; + /** + * A function that is called when the validator found a character class range. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param min The minimum code point of the range. + * @param max The maximum code point of the range. + */ + onCharacterClassRange?: ( + start: number, + end: number, + min: number, + max: number + ) => void; + /** + * A function that is called when the validator found a class intersection. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onClassIntersection?: (start: number, end: number) => void; + /** + * A function that is called when the validator found a class subtraction. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onClassSubtraction?: (start: number, end: number) => void; + /** + * A function that is called when the validator entered a class string disjunction. + * @param start The 0-based index of the first character. + */ + onClassStringDisjunctionEnter?: (start: number) => void; + /** + * A function that is called when the validator left a class string disjunction. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onClassStringDisjunctionLeave?: (start: number, end: number) => void; + /** + * A function that is called when the validator entered a string alternative. + * @param start The 0-based index of the first character. + * @param index The 0-based index of alternatives in a disjunction. + */ + onStringAlternativeEnter?: (start: number, index: number) => void; + /** + * A function that is called when the validator left a string alternative. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param index The 0-based index of alternatives in a disjunction. + */ + onStringAlternativeLeave?: ( + start: number, + end: number, + index: number + ) => void; + } + } + /** + * The regular expression validator. + */ + export class RegExpValidator { + /** + * Initialize this validator. + * @param options The options of validator. + */ + constructor(options?: RegExpValidator.Options); + /** + * Validate a regular expression literal. E.g. "/abc/g" + * @param source The source code to validate. + * @param start The start index in the source code. + * @param end The end index in the source code. + */ + validateLiteral(source: string, start?: number, end?: number): void; + /** + * Validate a regular expression flags. E.g. "gim" + * @param source The source code to validate. + * @param start The start index in the source code. + * @param end The end index in the source code. + */ + validateFlags(source: string, start?: number, end?: number): void; + /** + * Validate a regular expression pattern. E.g. "abc" + * @param source The source code to validate. + * @param start The start index in the source code. + * @param end The end index in the source code. + * @param flags The flags. + */ + validatePattern( + source: string, + start?: number, + end?: number, + flags?: { + unicode?: boolean; + unicodeSets?: boolean; + } + ): void; + /** + * @deprecated Backward compatibility + * Use object `flags` instead of boolean `uFlag`. + * @param source The source code to validate. + * @param start The start index in the source code. + * @param end The end index in the source code. + * @param uFlag The flag to set unicode mode. + */ + validatePattern( + source: string, + start?: number, + end?: number, + uFlag?: boolean + ): void; + } +} + +declare module "@eslint-community/regexpp/visitor" { + import type { + Alternative, + Assertion, + Backreference, + CapturingGroup, + Character, + CharacterClass, + CharacterClassRange, + CharacterSet, + ClassIntersection, + ClassStringDisjunction, + ClassSubtraction, + ExpressionCharacterClass, + Flags, + Group, + ModifierFlags, + Modifiers, + Node, + Pattern, + Quantifier, + RegExpLiteral, + StringAlternative, + } from "@eslint-community/regexpp/ast"; + /** + * The visitor to walk on AST. + */ + export class RegExpVisitor { + /** + * Initialize this visitor. + * @param handlers Callbacks for each node. + */ + constructor(handlers: RegExpVisitor.Handlers); + /** + * Visit a given node and descendant nodes. + * @param node The root node to visit tree. + */ + visit(node: Node): void; + } + export namespace RegExpVisitor { + interface Handlers { + onAlternativeEnter?: (node: Alternative) => void; + onAlternativeLeave?: (node: Alternative) => void; + onAssertionEnter?: (node: Assertion) => void; + onAssertionLeave?: (node: Assertion) => void; + onBackreferenceEnter?: (node: Backreference) => void; + onBackreferenceLeave?: (node: Backreference) => void; + onCapturingGroupEnter?: (node: CapturingGroup) => void; + onCapturingGroupLeave?: (node: CapturingGroup) => void; + onCharacterEnter?: (node: Character) => void; + onCharacterLeave?: (node: Character) => void; + onCharacterClassEnter?: (node: CharacterClass) => void; + onCharacterClassLeave?: (node: CharacterClass) => void; + onCharacterClassRangeEnter?: (node: CharacterClassRange) => void; + onCharacterClassRangeLeave?: (node: CharacterClassRange) => void; + onCharacterSetEnter?: (node: CharacterSet) => void; + onCharacterSetLeave?: (node: CharacterSet) => void; + onClassIntersectionEnter?: (node: ClassIntersection) => void; + onClassIntersectionLeave?: (node: ClassIntersection) => void; + onClassStringDisjunctionEnter?: (node: ClassStringDisjunction) => void; + onClassStringDisjunctionLeave?: (node: ClassStringDisjunction) => void; + onClassSubtractionEnter?: (node: ClassSubtraction) => void; + onClassSubtractionLeave?: (node: ClassSubtraction) => void; + onExpressionCharacterClassEnter?: ( + node: ExpressionCharacterClass + ) => void; + onExpressionCharacterClassLeave?: ( + node: ExpressionCharacterClass + ) => void; + onFlagsEnter?: (node: Flags) => void; + onFlagsLeave?: (node: Flags) => void; + onGroupEnter?: (node: Group) => void; + onGroupLeave?: (node: Group) => void; + onModifierFlagsEnter?: (node: ModifierFlags) => void; + onModifierFlagsLeave?: (node: ModifierFlags) => void; + onModifiersEnter?: (node: Modifiers) => void; + onModifiersLeave?: (node: Modifiers) => void; + onPatternEnter?: (node: Pattern) => void; + onPatternLeave?: (node: Pattern) => void; + onQuantifierEnter?: (node: Quantifier) => void; + onQuantifierLeave?: (node: Quantifier) => void; + onRegExpLiteralEnter?: (node: RegExpLiteral) => void; + onRegExpLiteralLeave?: (node: RegExpLiteral) => void; + onStringAlternativeEnter?: (node: StringAlternative) => void; + onStringAlternativeLeave?: (node: StringAlternative) => void; + } + } +} + +declare module "@eslint-community/regexpp/regexp-syntax-error" { + import type { RegExpValidatorSourceContext } from "@eslint-community/regexpp/validator"; + export class RegExpSyntaxError extends SyntaxError { + index: number; + constructor(message: string, index: number); + } + export function newRegExpSyntaxError( + srcCtx: RegExpValidatorSourceContext, + flags: { + unicode: boolean; + unicodeSets: boolean; + }, + index: number, + message: string + ): RegExpSyntaxError; +} + +declare module "@eslint-community/regexpp/ecma-versions" { + export type EcmaVersion = + | 5 + | 2015 + | 2016 + | 2017 + | 2018 + | 2019 + | 2020 + | 2021 + | 2022 + | 2023 + | 2024 + | 2025; + export const latestEcmaVersion = 2025; +} diff --git a/slider/node_modules/@eslint-community/regexpp/index.js b/slider/node_modules/@eslint-community/regexpp/index.js new file mode 100644 index 0000000..684909c --- /dev/null +++ b/slider/node_modules/@eslint-community/regexpp/index.js @@ -0,0 +1,3037 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var ast = /*#__PURE__*/Object.freeze({ + __proto__: null +}); + +const latestEcmaVersion = 2025; + +let largeIdStartRanges = undefined; +let largeIdContinueRanges = undefined; +function isIdStart(cp) { + if (cp < 0x41) + return false; + if (cp < 0x5b) + return true; + if (cp < 0x61) + return false; + if (cp < 0x7b) + return true; + return isLargeIdStart(cp); +} +function isIdContinue(cp) { + if (cp < 0x30) + return false; + if (cp < 0x3a) + return true; + if (cp < 0x41) + return false; + if (cp < 0x5b) + return true; + if (cp === 0x5f) + return true; + if (cp < 0x61) + return false; + if (cp < 0x7b) + return true; + return isLargeIdStart(cp) || isLargeIdContinue(cp); +} +function isLargeIdStart(cp) { + return isInRange(cp, largeIdStartRanges !== null && largeIdStartRanges !== void 0 ? largeIdStartRanges : (largeIdStartRanges = initLargeIdStartRanges())); +} +function isLargeIdContinue(cp) { + return isInRange(cp, largeIdContinueRanges !== null && largeIdContinueRanges !== void 0 ? largeIdContinueRanges : (largeIdContinueRanges = initLargeIdContinueRanges())); +} +function initLargeIdStartRanges() { + return restoreRanges("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 a 6 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1u 3 1 2 0 2 7 m f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 4 1f d 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 13 r a m 6z 15 7 1 h 2 1o s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 v 9 2 0 3 0 2 11 2 0 q 0 2 0 19 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 5k w w 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 q 32y 6 g6 5a2 t 1cz fs 8 u i 26 i t j 1b h 3 w k 6 i c1 18 5w 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 16 9 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r 6d t 3 0 ds 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk g h9 1wj f1 15v 3t6 6 38f"); +} +function initLargeIdContinueRanges() { + return restoreRanges("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1o 8 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 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 1m e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f 9j 9 1i 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e a 44m 0 7 e 8uh r 1t3 9 2f 9 13 4 1o 6 q 9 ev 9 d2 0 2 1i 8 3 2a 0 c 1 f58 1 382 9 ef 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d 6t 1 2 9 k6 6 32 6 6 9 3o7 9 gvt3 6n"); +} +function isInRange(cp, ranges) { + let l = 0, r = (ranges.length / 2) | 0, i = 0, min = 0, max = 0; + while (l < r) { + i = ((l + r) / 2) | 0; + min = ranges[2 * i]; + max = ranges[2 * i + 1]; + if (cp < min) { + r = i; + } + else if (cp > max) { + l = i + 1; + } + else { + return true; + } + } + return false; +} +function restoreRanges(data) { + let last = 0; + return data.split(" ").map((s) => (last += parseInt(s, 36) | 0)); +} + +class DataSet { + constructor(raw2018, raw2019, raw2020, raw2021, raw2022, raw2023, raw2024, raw2025) { + this._raw2018 = raw2018; + this._raw2019 = raw2019; + this._raw2020 = raw2020; + this._raw2021 = raw2021; + this._raw2022 = raw2022; + this._raw2023 = raw2023; + this._raw2024 = raw2024; + this._raw2025 = raw2025; + } + get es2018() { + var _a; + return ((_a = this._set2018) !== null && _a !== void 0 ? _a : (this._set2018 = new Set(this._raw2018.split(" ")))); + } + get es2019() { + var _a; + return ((_a = this._set2019) !== null && _a !== void 0 ? _a : (this._set2019 = new Set(this._raw2019.split(" ")))); + } + get es2020() { + var _a; + return ((_a = this._set2020) !== null && _a !== void 0 ? _a : (this._set2020 = new Set(this._raw2020.split(" ")))); + } + get es2021() { + var _a; + return ((_a = this._set2021) !== null && _a !== void 0 ? _a : (this._set2021 = new Set(this._raw2021.split(" ")))); + } + get es2022() { + var _a; + return ((_a = this._set2022) !== null && _a !== void 0 ? _a : (this._set2022 = new Set(this._raw2022.split(" ")))); + } + get es2023() { + var _a; + return ((_a = this._set2023) !== null && _a !== void 0 ? _a : (this._set2023 = new Set(this._raw2023.split(" ")))); + } + get es2024() { + var _a; + return ((_a = this._set2024) !== null && _a !== void 0 ? _a : (this._set2024 = new Set(this._raw2024.split(" ")))); + } + get es2025() { + var _a; + return ((_a = this._set2025) !== null && _a !== void 0 ? _a : (this._set2025 = new Set(this._raw2025.split(" ")))); + } +} +const gcNameSet = new Set(["General_Category", "gc"]); +const scNameSet = new Set(["Script", "Script_Extensions", "sc", "scx"]); +const gcValueSets = new DataSet("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct", "", "", "", "", "", "", ""); +const scValueSets = new DataSet("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy", "Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo", "Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho", "Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", "Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi", "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz", "", ""); +const binPropertySets = new DataSet("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space", "Extended_Pictographic", "", "EBase EComp EMod EPres ExtPict", "", "", "", ""); +const binPropertyOfStringsSets = new DataSet("", "", "", "", "", "", "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence", ""); +function isValidUnicodeProperty(version, name, value) { + if (gcNameSet.has(name)) { + return version >= 2018 && gcValueSets.es2018.has(value); + } + if (scNameSet.has(name)) { + return ((version >= 2018 && scValueSets.es2018.has(value)) || + (version >= 2019 && scValueSets.es2019.has(value)) || + (version >= 2020 && scValueSets.es2020.has(value)) || + (version >= 2021 && scValueSets.es2021.has(value)) || + (version >= 2022 && scValueSets.es2022.has(value)) || + (version >= 2023 && scValueSets.es2023.has(value))); + } + return false; +} +function isValidLoneUnicodeProperty(version, value) { + return ((version >= 2018 && binPropertySets.es2018.has(value)) || + (version >= 2019 && binPropertySets.es2019.has(value)) || + (version >= 2021 && binPropertySets.es2021.has(value))); +} +function isValidLoneUnicodePropertyOfString(version, value) { + return version >= 2024 && binPropertyOfStringsSets.es2024.has(value); +} + +const BACKSPACE = 0x08; +const CHARACTER_TABULATION = 0x09; +const LINE_FEED = 0x0a; +const LINE_TABULATION = 0x0b; +const FORM_FEED = 0x0c; +const CARRIAGE_RETURN = 0x0d; +const EXCLAMATION_MARK = 0x21; +const NUMBER_SIGN = 0x23; +const DOLLAR_SIGN = 0x24; +const PERCENT_SIGN = 0x25; +const AMPERSAND = 0x26; +const LEFT_PARENTHESIS = 0x28; +const RIGHT_PARENTHESIS = 0x29; +const ASTERISK = 0x2a; +const PLUS_SIGN = 0x2b; +const COMMA = 0x2c; +const HYPHEN_MINUS = 0x2d; +const FULL_STOP = 0x2e; +const SOLIDUS = 0x2f; +const DIGIT_ZERO = 0x30; +const DIGIT_ONE = 0x31; +const DIGIT_SEVEN = 0x37; +const DIGIT_NINE = 0x39; +const COLON = 0x3a; +const SEMICOLON = 0x3b; +const LESS_THAN_SIGN = 0x3c; +const EQUALS_SIGN = 0x3d; +const GREATER_THAN_SIGN = 0x3e; +const QUESTION_MARK = 0x3f; +const COMMERCIAL_AT = 0x40; +const LATIN_CAPITAL_LETTER_A = 0x41; +const LATIN_CAPITAL_LETTER_B = 0x42; +const LATIN_CAPITAL_LETTER_D = 0x44; +const LATIN_CAPITAL_LETTER_F = 0x46; +const LATIN_CAPITAL_LETTER_P = 0x50; +const LATIN_CAPITAL_LETTER_S = 0x53; +const LATIN_CAPITAL_LETTER_W = 0x57; +const LATIN_CAPITAL_LETTER_Z = 0x5a; +const LOW_LINE = 0x5f; +const LATIN_SMALL_LETTER_A = 0x61; +const LATIN_SMALL_LETTER_B = 0x62; +const LATIN_SMALL_LETTER_C = 0x63; +const LATIN_SMALL_LETTER_D = 0x64; +const LATIN_SMALL_LETTER_F = 0x66; +const LATIN_SMALL_LETTER_G = 0x67; +const LATIN_SMALL_LETTER_I = 0x69; +const LATIN_SMALL_LETTER_K = 0x6b; +const LATIN_SMALL_LETTER_M = 0x6d; +const LATIN_SMALL_LETTER_N = 0x6e; +const LATIN_SMALL_LETTER_P = 0x70; +const LATIN_SMALL_LETTER_Q = 0x71; +const LATIN_SMALL_LETTER_R = 0x72; +const LATIN_SMALL_LETTER_S = 0x73; +const LATIN_SMALL_LETTER_T = 0x74; +const LATIN_SMALL_LETTER_U = 0x75; +const LATIN_SMALL_LETTER_V = 0x76; +const LATIN_SMALL_LETTER_W = 0x77; +const LATIN_SMALL_LETTER_X = 0x78; +const LATIN_SMALL_LETTER_Y = 0x79; +const LATIN_SMALL_LETTER_Z = 0x7a; +const LEFT_SQUARE_BRACKET = 0x5b; +const REVERSE_SOLIDUS = 0x5c; +const RIGHT_SQUARE_BRACKET = 0x5d; +const CIRCUMFLEX_ACCENT = 0x5e; +const GRAVE_ACCENT = 0x60; +const LEFT_CURLY_BRACKET = 0x7b; +const VERTICAL_LINE = 0x7c; +const RIGHT_CURLY_BRACKET = 0x7d; +const TILDE = 0x7e; +const ZERO_WIDTH_NON_JOINER = 0x200c; +const ZERO_WIDTH_JOINER = 0x200d; +const LINE_SEPARATOR = 0x2028; +const PARAGRAPH_SEPARATOR = 0x2029; +const MIN_CODE_POINT = 0x00; +const MAX_CODE_POINT = 0x10ffff; +function isLatinLetter(code) { + return ((code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_Z) || + (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_Z)); +} +function isDecimalDigit(code) { + return code >= DIGIT_ZERO && code <= DIGIT_NINE; +} +function isOctalDigit(code) { + return code >= DIGIT_ZERO && code <= DIGIT_SEVEN; +} +function isHexDigit(code) { + return ((code >= DIGIT_ZERO && code <= DIGIT_NINE) || + (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) || + (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F)); +} +function isLineTerminator(code) { + return (code === LINE_FEED || + code === CARRIAGE_RETURN || + code === LINE_SEPARATOR || + code === PARAGRAPH_SEPARATOR); +} +function isValidUnicode(code) { + return code >= MIN_CODE_POINT && code <= MAX_CODE_POINT; +} +function digitToInt(code) { + if (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F) { + return code - LATIN_SMALL_LETTER_A + 10; + } + if (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) { + return code - LATIN_CAPITAL_LETTER_A + 10; + } + return code - DIGIT_ZERO; +} +function isLeadSurrogate(code) { + return code >= 0xd800 && code <= 0xdbff; +} +function isTrailSurrogate(code) { + return code >= 0xdc00 && code <= 0xdfff; +} +function combineSurrogatePair(lead, trail) { + return (lead - 0xd800) * 0x400 + (trail - 0xdc00) + 0x10000; +} + +class GroupSpecifiersAsES2018 { + constructor() { + this.groupName = new Set(); + } + clear() { + this.groupName.clear(); + } + isEmpty() { + return !this.groupName.size; + } + hasInPattern(name) { + return this.groupName.has(name); + } + hasInScope(name) { + return this.hasInPattern(name); + } + addToScope(name) { + this.groupName.add(name); + } + enterDisjunction() { + } + enterAlternative() { + } + leaveDisjunction() { + } +} +class BranchID { + constructor(parent, base) { + this.parent = parent; + this.base = base !== null && base !== void 0 ? base : this; + } + separatedFrom(other) { + var _a, _b; + if (this.base === other.base && this !== other) { + return true; + } + if (other.parent && this.separatedFrom(other.parent)) { + return true; + } + return (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.separatedFrom(other)) !== null && _b !== void 0 ? _b : false; + } + child() { + return new BranchID(this, null); + } + sibling() { + return new BranchID(this.parent, this.base); + } +} +class GroupSpecifiersAsES2025 { + constructor() { + this.branchID = new BranchID(null, null); + this.groupNames = new Map(); + } + clear() { + this.branchID = new BranchID(null, null); + this.groupNames.clear(); + } + isEmpty() { + return !this.groupNames.size; + } + enterDisjunction() { + this.branchID = this.branchID.child(); + } + enterAlternative(index) { + if (index === 0) { + return; + } + this.branchID = this.branchID.sibling(); + } + leaveDisjunction() { + this.branchID = this.branchID.parent; + } + hasInPattern(name) { + return this.groupNames.has(name); + } + hasInScope(name) { + const branches = this.groupNames.get(name); + if (!branches) { + return false; + } + for (const branch of branches) { + if (!branch.separatedFrom(this.branchID)) { + return true; + } + } + return false; + } + addToScope(name) { + const branches = this.groupNames.get(name); + if (branches) { + branches.push(this.branchID); + return; + } + this.groupNames.set(name, [this.branchID]); + } +} + +const legacyImpl = { + at(s, end, i) { + return i < end ? s.charCodeAt(i) : -1; + }, + width(c) { + return 1; + }, +}; +const unicodeImpl = { + at(s, end, i) { + return i < end ? s.codePointAt(i) : -1; + }, + width(c) { + return c > 0xffff ? 2 : 1; + }, +}; +class Reader { + constructor() { + this._impl = legacyImpl; + this._s = ""; + this._i = 0; + this._end = 0; + this._cp1 = -1; + this._w1 = 1; + this._cp2 = -1; + this._w2 = 1; + this._cp3 = -1; + this._w3 = 1; + this._cp4 = -1; + } + get source() { + return this._s; + } + get index() { + return this._i; + } + get currentCodePoint() { + return this._cp1; + } + get nextCodePoint() { + return this._cp2; + } + get nextCodePoint2() { + return this._cp3; + } + get nextCodePoint3() { + return this._cp4; + } + reset(source, start, end, uFlag) { + this._impl = uFlag ? unicodeImpl : legacyImpl; + this._s = source; + this._end = end; + this.rewind(start); + } + rewind(index) { + const impl = this._impl; + this._i = index; + this._cp1 = impl.at(this._s, this._end, index); + this._w1 = impl.width(this._cp1); + this._cp2 = impl.at(this._s, this._end, index + this._w1); + this._w2 = impl.width(this._cp2); + this._cp3 = impl.at(this._s, this._end, index + this._w1 + this._w2); + this._w3 = impl.width(this._cp3); + this._cp4 = impl.at(this._s, this._end, index + this._w1 + this._w2 + this._w3); + } + advance() { + if (this._cp1 !== -1) { + const impl = this._impl; + this._i += this._w1; + this._cp1 = this._cp2; + this._w1 = this._w2; + this._cp2 = this._cp3; + this._w2 = impl.width(this._cp2); + this._cp3 = this._cp4; + this._w3 = impl.width(this._cp3); + this._cp4 = impl.at(this._s, this._end, this._i + this._w1 + this._w2 + this._w3); + } + } + eat(cp) { + if (this._cp1 === cp) { + this.advance(); + return true; + } + return false; + } + eat2(cp1, cp2) { + if (this._cp1 === cp1 && this._cp2 === cp2) { + this.advance(); + this.advance(); + return true; + } + return false; + } + eat3(cp1, cp2, cp3) { + if (this._cp1 === cp1 && this._cp2 === cp2 && this._cp3 === cp3) { + this.advance(); + this.advance(); + this.advance(); + return true; + } + return false; + } +} + +class RegExpSyntaxError extends SyntaxError { + constructor(message, index) { + super(message); + this.index = index; + } +} +function newRegExpSyntaxError(srcCtx, flags, index, message) { + let source = ""; + if (srcCtx.kind === "literal") { + const literal = srcCtx.source.slice(srcCtx.start, srcCtx.end); + if (literal) { + source = `: ${literal}`; + } + } + else if (srcCtx.kind === "pattern") { + const pattern = srcCtx.source.slice(srcCtx.start, srcCtx.end); + const flagsText = `${flags.unicode ? "u" : ""}${flags.unicodeSets ? "v" : ""}`; + source = `: /${pattern}/${flagsText}`; + } + return new RegExpSyntaxError(`Invalid regular expression${source}: ${message}`, index); +} + +const SYNTAX_CHARACTER = new Set([ + CIRCUMFLEX_ACCENT, + DOLLAR_SIGN, + REVERSE_SOLIDUS, + FULL_STOP, + ASTERISK, + PLUS_SIGN, + QUESTION_MARK, + LEFT_PARENTHESIS, + RIGHT_PARENTHESIS, + LEFT_SQUARE_BRACKET, + RIGHT_SQUARE_BRACKET, + LEFT_CURLY_BRACKET, + RIGHT_CURLY_BRACKET, + VERTICAL_LINE, +]); +const CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER = new Set([ + AMPERSAND, + EXCLAMATION_MARK, + NUMBER_SIGN, + DOLLAR_SIGN, + PERCENT_SIGN, + ASTERISK, + PLUS_SIGN, + COMMA, + FULL_STOP, + COLON, + SEMICOLON, + LESS_THAN_SIGN, + EQUALS_SIGN, + GREATER_THAN_SIGN, + QUESTION_MARK, + COMMERCIAL_AT, + CIRCUMFLEX_ACCENT, + GRAVE_ACCENT, + TILDE, +]); +const CLASS_SET_SYNTAX_CHARACTER = new Set([ + LEFT_PARENTHESIS, + RIGHT_PARENTHESIS, + LEFT_SQUARE_BRACKET, + RIGHT_SQUARE_BRACKET, + LEFT_CURLY_BRACKET, + RIGHT_CURLY_BRACKET, + SOLIDUS, + HYPHEN_MINUS, + REVERSE_SOLIDUS, + VERTICAL_LINE, +]); +const CLASS_SET_RESERVED_PUNCTUATOR = new Set([ + AMPERSAND, + HYPHEN_MINUS, + EXCLAMATION_MARK, + NUMBER_SIGN, + PERCENT_SIGN, + COMMA, + COLON, + SEMICOLON, + LESS_THAN_SIGN, + EQUALS_SIGN, + GREATER_THAN_SIGN, + COMMERCIAL_AT, + GRAVE_ACCENT, + TILDE, +]); +const FLAG_PROP_TO_CODEPOINT = { + global: LATIN_SMALL_LETTER_G, + ignoreCase: LATIN_SMALL_LETTER_I, + multiline: LATIN_SMALL_LETTER_M, + unicode: LATIN_SMALL_LETTER_U, + sticky: LATIN_SMALL_LETTER_Y, + dotAll: LATIN_SMALL_LETTER_S, + hasIndices: LATIN_SMALL_LETTER_D, + unicodeSets: LATIN_SMALL_LETTER_V, +}; +const FLAG_CODEPOINT_TO_PROP = Object.fromEntries(Object.entries(FLAG_PROP_TO_CODEPOINT).map(([k, v]) => [v, k])); +function isSyntaxCharacter(cp) { + return SYNTAX_CHARACTER.has(cp); +} +function isClassSetReservedDoublePunctuatorCharacter(cp) { + return CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER.has(cp); +} +function isClassSetSyntaxCharacter(cp) { + return CLASS_SET_SYNTAX_CHARACTER.has(cp); +} +function isClassSetReservedPunctuator(cp) { + return CLASS_SET_RESERVED_PUNCTUATOR.has(cp); +} +function isIdentifierStartChar(cp) { + return isIdStart(cp) || cp === DOLLAR_SIGN || cp === LOW_LINE; +} +function isIdentifierPartChar(cp) { + return (isIdContinue(cp) || + cp === DOLLAR_SIGN || + cp === ZERO_WIDTH_NON_JOINER || + cp === ZERO_WIDTH_JOINER); +} +function isUnicodePropertyNameCharacter(cp) { + return isLatinLetter(cp) || cp === LOW_LINE; +} +function isUnicodePropertyValueCharacter(cp) { + return isUnicodePropertyNameCharacter(cp) || isDecimalDigit(cp); +} +function isRegularExpressionModifier(ch) { + return (ch === LATIN_SMALL_LETTER_I || + ch === LATIN_SMALL_LETTER_M || + ch === LATIN_SMALL_LETTER_S); +} +class RegExpValidator { + constructor(options) { + this._reader = new Reader(); + this._unicodeMode = false; + this._unicodeSetsMode = false; + this._nFlag = false; + this._lastIntValue = 0; + this._lastRange = { + min: 0, + max: Number.POSITIVE_INFINITY, + }; + this._lastStrValue = ""; + this._lastAssertionIsQuantifiable = false; + this._numCapturingParens = 0; + this._backreferenceNames = new Set(); + this._srcCtx = null; + this._options = options !== null && options !== void 0 ? options : {}; + this._groupSpecifiers = + this.ecmaVersion >= 2025 + ? new GroupSpecifiersAsES2025() + : new GroupSpecifiersAsES2018(); + } + validateLiteral(source, start = 0, end = source.length) { + this._srcCtx = { source, start, end, kind: "literal" }; + this._unicodeSetsMode = this._unicodeMode = this._nFlag = false; + this.reset(source, start, end); + this.onLiteralEnter(start); + if (this.eat(SOLIDUS) && this.eatRegExpBody() && this.eat(SOLIDUS)) { + const flagStart = this.index; + const unicode = source.includes("u", flagStart); + const unicodeSets = source.includes("v", flagStart); + this.validateFlagsInternal(source, flagStart, end); + this.validatePatternInternal(source, start + 1, flagStart - 1, { + unicode, + unicodeSets, + }); + } + else if (start >= end) { + this.raise("Empty"); + } + else { + const c = String.fromCodePoint(this.currentCodePoint); + this.raise(`Unexpected character '${c}'`); + } + this.onLiteralLeave(start, end); + } + validateFlags(source, start = 0, end = source.length) { + this._srcCtx = { source, start, end, kind: "flags" }; + this.validateFlagsInternal(source, start, end); + } + validatePattern(source, start = 0, end = source.length, uFlagOrFlags = undefined) { + this._srcCtx = { source, start, end, kind: "pattern" }; + this.validatePatternInternal(source, start, end, uFlagOrFlags); + } + validatePatternInternal(source, start = 0, end = source.length, uFlagOrFlags = undefined) { + const mode = this._parseFlagsOptionToMode(uFlagOrFlags, end); + this._unicodeMode = mode.unicodeMode; + this._nFlag = mode.nFlag; + this._unicodeSetsMode = mode.unicodeSetsMode; + this.reset(source, start, end); + this.consumePattern(); + if (!this._nFlag && + this.ecmaVersion >= 2018 && + !this._groupSpecifiers.isEmpty()) { + this._nFlag = true; + this.rewind(start); + this.consumePattern(); + } + } + validateFlagsInternal(source, start, end) { + const flags = this.parseFlags(source, start, end); + this.onRegExpFlags(start, end, flags); + } + _parseFlagsOptionToMode(uFlagOrFlags, sourceEnd) { + let unicode = false; + let unicodeSets = false; + if (uFlagOrFlags && this.ecmaVersion >= 2015) { + if (typeof uFlagOrFlags === "object") { + unicode = Boolean(uFlagOrFlags.unicode); + if (this.ecmaVersion >= 2024) { + unicodeSets = Boolean(uFlagOrFlags.unicodeSets); + } + } + else { + unicode = uFlagOrFlags; + } + } + if (unicode && unicodeSets) { + this.raise("Invalid regular expression flags", { + index: sourceEnd + 1, + unicode, + unicodeSets, + }); + } + const unicodeMode = unicode || unicodeSets; + const nFlag = (unicode && this.ecmaVersion >= 2018) || + unicodeSets || + Boolean(this._options.strict && this.ecmaVersion >= 2023); + const unicodeSetsMode = unicodeSets; + return { unicodeMode, nFlag, unicodeSetsMode }; + } + get strict() { + return Boolean(this._options.strict) || this._unicodeMode; + } + get ecmaVersion() { + var _a; + return (_a = this._options.ecmaVersion) !== null && _a !== void 0 ? _a : latestEcmaVersion; + } + onLiteralEnter(start) { + if (this._options.onLiteralEnter) { + this._options.onLiteralEnter(start); + } + } + onLiteralLeave(start, end) { + if (this._options.onLiteralLeave) { + this._options.onLiteralLeave(start, end); + } + } + onRegExpFlags(start, end, flags) { + if (this._options.onRegExpFlags) { + this._options.onRegExpFlags(start, end, flags); + } + if (this._options.onFlags) { + this._options.onFlags(start, end, flags.global, flags.ignoreCase, flags.multiline, flags.unicode, flags.sticky, flags.dotAll, flags.hasIndices); + } + } + onPatternEnter(start) { + if (this._options.onPatternEnter) { + this._options.onPatternEnter(start); + } + } + onPatternLeave(start, end) { + if (this._options.onPatternLeave) { + this._options.onPatternLeave(start, end); + } + } + onDisjunctionEnter(start) { + if (this._options.onDisjunctionEnter) { + this._options.onDisjunctionEnter(start); + } + } + onDisjunctionLeave(start, end) { + if (this._options.onDisjunctionLeave) { + this._options.onDisjunctionLeave(start, end); + } + } + onAlternativeEnter(start, index) { + if (this._options.onAlternativeEnter) { + this._options.onAlternativeEnter(start, index); + } + } + onAlternativeLeave(start, end, index) { + if (this._options.onAlternativeLeave) { + this._options.onAlternativeLeave(start, end, index); + } + } + onGroupEnter(start) { + if (this._options.onGroupEnter) { + this._options.onGroupEnter(start); + } + } + onGroupLeave(start, end) { + if (this._options.onGroupLeave) { + this._options.onGroupLeave(start, end); + } + } + onModifiersEnter(start) { + if (this._options.onModifiersEnter) { + this._options.onModifiersEnter(start); + } + } + onModifiersLeave(start, end) { + if (this._options.onModifiersLeave) { + this._options.onModifiersLeave(start, end); + } + } + onAddModifiers(start, end, flags) { + if (this._options.onAddModifiers) { + this._options.onAddModifiers(start, end, flags); + } + } + onRemoveModifiers(start, end, flags) { + if (this._options.onRemoveModifiers) { + this._options.onRemoveModifiers(start, end, flags); + } + } + onCapturingGroupEnter(start, name) { + if (this._options.onCapturingGroupEnter) { + this._options.onCapturingGroupEnter(start, name); + } + } + onCapturingGroupLeave(start, end, name) { + if (this._options.onCapturingGroupLeave) { + this._options.onCapturingGroupLeave(start, end, name); + } + } + onQuantifier(start, end, min, max, greedy) { + if (this._options.onQuantifier) { + this._options.onQuantifier(start, end, min, max, greedy); + } + } + onLookaroundAssertionEnter(start, kind, negate) { + if (this._options.onLookaroundAssertionEnter) { + this._options.onLookaroundAssertionEnter(start, kind, negate); + } + } + onLookaroundAssertionLeave(start, end, kind, negate) { + if (this._options.onLookaroundAssertionLeave) { + this._options.onLookaroundAssertionLeave(start, end, kind, negate); + } + } + onEdgeAssertion(start, end, kind) { + if (this._options.onEdgeAssertion) { + this._options.onEdgeAssertion(start, end, kind); + } + } + onWordBoundaryAssertion(start, end, kind, negate) { + if (this._options.onWordBoundaryAssertion) { + this._options.onWordBoundaryAssertion(start, end, kind, negate); + } + } + onAnyCharacterSet(start, end, kind) { + if (this._options.onAnyCharacterSet) { + this._options.onAnyCharacterSet(start, end, kind); + } + } + onEscapeCharacterSet(start, end, kind, negate) { + if (this._options.onEscapeCharacterSet) { + this._options.onEscapeCharacterSet(start, end, kind, negate); + } + } + onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings) { + if (this._options.onUnicodePropertyCharacterSet) { + this._options.onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings); + } + } + onCharacter(start, end, value) { + if (this._options.onCharacter) { + this._options.onCharacter(start, end, value); + } + } + onBackreference(start, end, ref) { + if (this._options.onBackreference) { + this._options.onBackreference(start, end, ref); + } + } + onCharacterClassEnter(start, negate, unicodeSets) { + if (this._options.onCharacterClassEnter) { + this._options.onCharacterClassEnter(start, negate, unicodeSets); + } + } + onCharacterClassLeave(start, end, negate) { + if (this._options.onCharacterClassLeave) { + this._options.onCharacterClassLeave(start, end, negate); + } + } + onCharacterClassRange(start, end, min, max) { + if (this._options.onCharacterClassRange) { + this._options.onCharacterClassRange(start, end, min, max); + } + } + onClassIntersection(start, end) { + if (this._options.onClassIntersection) { + this._options.onClassIntersection(start, end); + } + } + onClassSubtraction(start, end) { + if (this._options.onClassSubtraction) { + this._options.onClassSubtraction(start, end); + } + } + onClassStringDisjunctionEnter(start) { + if (this._options.onClassStringDisjunctionEnter) { + this._options.onClassStringDisjunctionEnter(start); + } + } + onClassStringDisjunctionLeave(start, end) { + if (this._options.onClassStringDisjunctionLeave) { + this._options.onClassStringDisjunctionLeave(start, end); + } + } + onStringAlternativeEnter(start, index) { + if (this._options.onStringAlternativeEnter) { + this._options.onStringAlternativeEnter(start, index); + } + } + onStringAlternativeLeave(start, end, index) { + if (this._options.onStringAlternativeLeave) { + this._options.onStringAlternativeLeave(start, end, index); + } + } + get index() { + return this._reader.index; + } + get currentCodePoint() { + return this._reader.currentCodePoint; + } + get nextCodePoint() { + return this._reader.nextCodePoint; + } + get nextCodePoint2() { + return this._reader.nextCodePoint2; + } + get nextCodePoint3() { + return this._reader.nextCodePoint3; + } + reset(source, start, end) { + this._reader.reset(source, start, end, this._unicodeMode); + } + rewind(index) { + this._reader.rewind(index); + } + advance() { + this._reader.advance(); + } + eat(cp) { + return this._reader.eat(cp); + } + eat2(cp1, cp2) { + return this._reader.eat2(cp1, cp2); + } + eat3(cp1, cp2, cp3) { + return this._reader.eat3(cp1, cp2, cp3); + } + raise(message, context) { + var _a, _b, _c; + throw newRegExpSyntaxError(this._srcCtx, { + unicode: (_a = context === null || context === void 0 ? void 0 : context.unicode) !== null && _a !== void 0 ? _a : (this._unicodeMode && !this._unicodeSetsMode), + unicodeSets: (_b = context === null || context === void 0 ? void 0 : context.unicodeSets) !== null && _b !== void 0 ? _b : this._unicodeSetsMode, + }, (_c = context === null || context === void 0 ? void 0 : context.index) !== null && _c !== void 0 ? _c : this.index, message); + } + eatRegExpBody() { + const start = this.index; + let inClass = false; + let escaped = false; + for (;;) { + const cp = this.currentCodePoint; + if (cp === -1 || isLineTerminator(cp)) { + const kind = inClass ? "character class" : "regular expression"; + this.raise(`Unterminated ${kind}`); + } + if (escaped) { + escaped = false; + } + else if (cp === REVERSE_SOLIDUS) { + escaped = true; + } + else if (cp === LEFT_SQUARE_BRACKET) { + inClass = true; + } + else if (cp === RIGHT_SQUARE_BRACKET) { + inClass = false; + } + else if ((cp === SOLIDUS && !inClass) || + (cp === ASTERISK && this.index === start)) { + break; + } + this.advance(); + } + return this.index !== start; + } + consumePattern() { + const start = this.index; + this._numCapturingParens = this.countCapturingParens(); + this._groupSpecifiers.clear(); + this._backreferenceNames.clear(); + this.onPatternEnter(start); + this.consumeDisjunction(); + const cp = this.currentCodePoint; + if (this.currentCodePoint !== -1) { + if (cp === RIGHT_PARENTHESIS) { + this.raise("Unmatched ')'"); + } + if (cp === REVERSE_SOLIDUS) { + this.raise("\\ at end of pattern"); + } + if (cp === RIGHT_SQUARE_BRACKET || cp === RIGHT_CURLY_BRACKET) { + this.raise("Lone quantifier brackets"); + } + const c = String.fromCodePoint(cp); + this.raise(`Unexpected character '${c}'`); + } + for (const name of this._backreferenceNames) { + if (!this._groupSpecifiers.hasInPattern(name)) { + this.raise("Invalid named capture referenced"); + } + } + this.onPatternLeave(start, this.index); + } + countCapturingParens() { + const start = this.index; + let inClass = false; + let escaped = false; + let count = 0; + let cp = 0; + while ((cp = this.currentCodePoint) !== -1) { + if (escaped) { + escaped = false; + } + else if (cp === REVERSE_SOLIDUS) { + escaped = true; + } + else if (cp === LEFT_SQUARE_BRACKET) { + inClass = true; + } + else if (cp === RIGHT_SQUARE_BRACKET) { + inClass = false; + } + else if (cp === LEFT_PARENTHESIS && + !inClass && + (this.nextCodePoint !== QUESTION_MARK || + (this.nextCodePoint2 === LESS_THAN_SIGN && + this.nextCodePoint3 !== EQUALS_SIGN && + this.nextCodePoint3 !== EXCLAMATION_MARK))) { + count += 1; + } + this.advance(); + } + this.rewind(start); + return count; + } + consumeDisjunction() { + const start = this.index; + let i = 0; + this._groupSpecifiers.enterDisjunction(); + this.onDisjunctionEnter(start); + do { + this.consumeAlternative(i++); + } while (this.eat(VERTICAL_LINE)); + if (this.consumeQuantifier(true)) { + this.raise("Nothing to repeat"); + } + if (this.eat(LEFT_CURLY_BRACKET)) { + this.raise("Lone quantifier brackets"); + } + this.onDisjunctionLeave(start, this.index); + this._groupSpecifiers.leaveDisjunction(); + } + consumeAlternative(i) { + const start = this.index; + this._groupSpecifiers.enterAlternative(i); + this.onAlternativeEnter(start, i); + while (this.currentCodePoint !== -1 && this.consumeTerm()) { + } + this.onAlternativeLeave(start, this.index, i); + } + consumeTerm() { + if (this._unicodeMode || this.strict) { + return (this.consumeAssertion() || + (this.consumeAtom() && this.consumeOptionalQuantifier())); + } + return ((this.consumeAssertion() && + (!this._lastAssertionIsQuantifiable || + this.consumeOptionalQuantifier())) || + (this.consumeExtendedAtom() && this.consumeOptionalQuantifier())); + } + consumeOptionalQuantifier() { + this.consumeQuantifier(); + return true; + } + consumeAssertion() { + const start = this.index; + this._lastAssertionIsQuantifiable = false; + if (this.eat(CIRCUMFLEX_ACCENT)) { + this.onEdgeAssertion(start, this.index, "start"); + return true; + } + if (this.eat(DOLLAR_SIGN)) { + this.onEdgeAssertion(start, this.index, "end"); + return true; + } + if (this.eat2(REVERSE_SOLIDUS, LATIN_CAPITAL_LETTER_B)) { + this.onWordBoundaryAssertion(start, this.index, "word", true); + return true; + } + if (this.eat2(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_B)) { + this.onWordBoundaryAssertion(start, this.index, "word", false); + return true; + } + if (this.eat2(LEFT_PARENTHESIS, QUESTION_MARK)) { + const lookbehind = this.ecmaVersion >= 2018 && this.eat(LESS_THAN_SIGN); + let negate = false; + if (this.eat(EQUALS_SIGN) || + (negate = this.eat(EXCLAMATION_MARK))) { + const kind = lookbehind ? "lookbehind" : "lookahead"; + this.onLookaroundAssertionEnter(start, kind, negate); + this.consumeDisjunction(); + if (!this.eat(RIGHT_PARENTHESIS)) { + this.raise("Unterminated group"); + } + this._lastAssertionIsQuantifiable = !lookbehind && !this.strict; + this.onLookaroundAssertionLeave(start, this.index, kind, negate); + return true; + } + this.rewind(start); + } + return false; + } + consumeQuantifier(noConsume = false) { + const start = this.index; + let min = 0; + let max = 0; + let greedy = false; + if (this.eat(ASTERISK)) { + min = 0; + max = Number.POSITIVE_INFINITY; + } + else if (this.eat(PLUS_SIGN)) { + min = 1; + max = Number.POSITIVE_INFINITY; + } + else if (this.eat(QUESTION_MARK)) { + min = 0; + max = 1; + } + else if (this.eatBracedQuantifier(noConsume)) { + ({ min, max } = this._lastRange); + } + else { + return false; + } + greedy = !this.eat(QUESTION_MARK); + if (!noConsume) { + this.onQuantifier(start, this.index, min, max, greedy); + } + return true; + } + eatBracedQuantifier(noError) { + const start = this.index; + if (this.eat(LEFT_CURLY_BRACKET)) { + if (this.eatDecimalDigits()) { + const min = this._lastIntValue; + let max = min; + if (this.eat(COMMA)) { + max = this.eatDecimalDigits() + ? this._lastIntValue + : Number.POSITIVE_INFINITY; + } + if (this.eat(RIGHT_CURLY_BRACKET)) { + if (!noError && max < min) { + this.raise("numbers out of order in {} quantifier"); + } + this._lastRange = { min, max }; + return true; + } + } + if (!noError && (this._unicodeMode || this.strict)) { + this.raise("Incomplete quantifier"); + } + this.rewind(start); + } + return false; + } + consumeAtom() { + return (this.consumePatternCharacter() || + this.consumeDot() || + this.consumeReverseSolidusAtomEscape() || + Boolean(this.consumeCharacterClass()) || + this.consumeCapturingGroup() || + this.consumeUncapturingGroup()); + } + consumeDot() { + if (this.eat(FULL_STOP)) { + this.onAnyCharacterSet(this.index - 1, this.index, "any"); + return true; + } + return false; + } + consumeReverseSolidusAtomEscape() { + const start = this.index; + if (this.eat(REVERSE_SOLIDUS)) { + if (this.consumeAtomEscape()) { + return true; + } + this.rewind(start); + } + return false; + } + consumeUncapturingGroup() { + const start = this.index; + if (this.eat2(LEFT_PARENTHESIS, QUESTION_MARK)) { + this.onGroupEnter(start); + if (this.ecmaVersion >= 2025) { + this.consumeModifiers(); + } + if (!this.eat(COLON)) { + this.rewind(start + 1); + this.raise("Invalid group"); + } + this.consumeDisjunction(); + if (!this.eat(RIGHT_PARENTHESIS)) { + this.raise("Unterminated group"); + } + this.onGroupLeave(start, this.index); + return true; + } + return false; + } + consumeModifiers() { + const start = this.index; + const hasAddModifiers = this.eatModifiers(); + const addModifiersEnd = this.index; + const hasHyphen = this.eat(HYPHEN_MINUS); + if (!hasAddModifiers && !hasHyphen) { + return false; + } + this.onModifiersEnter(start); + const addModifiers = this.parseModifiers(start, addModifiersEnd); + this.onAddModifiers(start, addModifiersEnd, addModifiers); + if (hasHyphen) { + const modifiersStart = this.index; + if (!this.eatModifiers() && + !hasAddModifiers && + this.currentCodePoint === COLON) { + this.raise("Invalid empty flags"); + } + const modifiers = this.parseModifiers(modifiersStart, this.index); + for (const [flagName] of Object.entries(modifiers).filter(([, enable]) => enable)) { + if (addModifiers[flagName]) { + this.raise(`Duplicated flag '${String.fromCodePoint(FLAG_PROP_TO_CODEPOINT[flagName])}'`); + } + } + this.onRemoveModifiers(modifiersStart, this.index, modifiers); + } + this.onModifiersLeave(start, this.index); + return true; + } + consumeCapturingGroup() { + const start = this.index; + if (this.eat(LEFT_PARENTHESIS)) { + let name = null; + if (this.ecmaVersion >= 2018) { + if (this.consumeGroupSpecifier()) { + name = this._lastStrValue; + } + else if (this.currentCodePoint === QUESTION_MARK) { + this.rewind(start); + return false; + } + } + else if (this.currentCodePoint === QUESTION_MARK) { + this.rewind(start); + return false; + } + this.onCapturingGroupEnter(start, name); + this.consumeDisjunction(); + if (!this.eat(RIGHT_PARENTHESIS)) { + this.raise("Unterminated group"); + } + this.onCapturingGroupLeave(start, this.index, name); + return true; + } + return false; + } + consumeExtendedAtom() { + return (this.consumeDot() || + this.consumeReverseSolidusAtomEscape() || + this.consumeReverseSolidusFollowedByC() || + Boolean(this.consumeCharacterClass()) || + this.consumeCapturingGroup() || + this.consumeUncapturingGroup() || + this.consumeInvalidBracedQuantifier() || + this.consumeExtendedPatternCharacter()); + } + consumeReverseSolidusFollowedByC() { + const start = this.index; + if (this.currentCodePoint === REVERSE_SOLIDUS && + this.nextCodePoint === LATIN_SMALL_LETTER_C) { + this._lastIntValue = this.currentCodePoint; + this.advance(); + this.onCharacter(start, this.index, REVERSE_SOLIDUS); + return true; + } + return false; + } + consumeInvalidBracedQuantifier() { + if (this.eatBracedQuantifier(true)) { + this.raise("Nothing to repeat"); + } + return false; + } + consumePatternCharacter() { + const start = this.index; + const cp = this.currentCodePoint; + if (cp !== -1 && !isSyntaxCharacter(cp)) { + this.advance(); + this.onCharacter(start, this.index, cp); + return true; + } + return false; + } + consumeExtendedPatternCharacter() { + const start = this.index; + const cp = this.currentCodePoint; + if (cp !== -1 && + cp !== CIRCUMFLEX_ACCENT && + cp !== DOLLAR_SIGN && + cp !== REVERSE_SOLIDUS && + cp !== FULL_STOP && + cp !== ASTERISK && + cp !== PLUS_SIGN && + cp !== QUESTION_MARK && + cp !== LEFT_PARENTHESIS && + cp !== RIGHT_PARENTHESIS && + cp !== LEFT_SQUARE_BRACKET && + cp !== VERTICAL_LINE) { + this.advance(); + this.onCharacter(start, this.index, cp); + return true; + } + return false; + } + consumeGroupSpecifier() { + const start = this.index; + if (this.eat(QUESTION_MARK)) { + if (this.eatGroupName()) { + if (!this._groupSpecifiers.hasInScope(this._lastStrValue)) { + this._groupSpecifiers.addToScope(this._lastStrValue); + return true; + } + this.raise("Duplicate capture group name"); + } + this.rewind(start); + } + return false; + } + consumeAtomEscape() { + if (this.consumeBackreference() || + this.consumeCharacterClassEscape() || + this.consumeCharacterEscape() || + (this._nFlag && this.consumeKGroupName())) { + return true; + } + if (this.strict || this._unicodeMode) { + this.raise("Invalid escape"); + } + return false; + } + consumeBackreference() { + const start = this.index; + if (this.eatDecimalEscape()) { + const n = this._lastIntValue; + if (n <= this._numCapturingParens) { + this.onBackreference(start - 1, this.index, n); + return true; + } + if (this.strict || this._unicodeMode) { + this.raise("Invalid escape"); + } + this.rewind(start); + } + return false; + } + consumeCharacterClassEscape() { + var _a; + const start = this.index; + if (this.eat(LATIN_SMALL_LETTER_D)) { + this._lastIntValue = -1; + this.onEscapeCharacterSet(start - 1, this.index, "digit", false); + return {}; + } + if (this.eat(LATIN_CAPITAL_LETTER_D)) { + this._lastIntValue = -1; + this.onEscapeCharacterSet(start - 1, this.index, "digit", true); + return {}; + } + if (this.eat(LATIN_SMALL_LETTER_S)) { + this._lastIntValue = -1; + this.onEscapeCharacterSet(start - 1, this.index, "space", false); + return {}; + } + if (this.eat(LATIN_CAPITAL_LETTER_S)) { + this._lastIntValue = -1; + this.onEscapeCharacterSet(start - 1, this.index, "space", true); + return {}; + } + if (this.eat(LATIN_SMALL_LETTER_W)) { + this._lastIntValue = -1; + this.onEscapeCharacterSet(start - 1, this.index, "word", false); + return {}; + } + if (this.eat(LATIN_CAPITAL_LETTER_W)) { + this._lastIntValue = -1; + this.onEscapeCharacterSet(start - 1, this.index, "word", true); + return {}; + } + let negate = false; + if (this._unicodeMode && + this.ecmaVersion >= 2018 && + (this.eat(LATIN_SMALL_LETTER_P) || + (negate = this.eat(LATIN_CAPITAL_LETTER_P)))) { + this._lastIntValue = -1; + let result = null; + if (this.eat(LEFT_CURLY_BRACKET) && + (result = this.eatUnicodePropertyValueExpression()) && + this.eat(RIGHT_CURLY_BRACKET)) { + if (negate && result.strings) { + this.raise("Invalid property name"); + } + this.onUnicodePropertyCharacterSet(start - 1, this.index, "property", result.key, result.value, negate, (_a = result.strings) !== null && _a !== void 0 ? _a : false); + return { mayContainStrings: result.strings }; + } + this.raise("Invalid property name"); + } + return null; + } + consumeCharacterEscape() { + const start = this.index; + if (this.eatControlEscape() || + this.eatCControlLetter() || + this.eatZero() || + this.eatHexEscapeSequence() || + this.eatRegExpUnicodeEscapeSequence() || + (!this.strict && + !this._unicodeMode && + this.eatLegacyOctalEscapeSequence()) || + this.eatIdentityEscape()) { + this.onCharacter(start - 1, this.index, this._lastIntValue); + return true; + } + return false; + } + consumeKGroupName() { + const start = this.index; + if (this.eat(LATIN_SMALL_LETTER_K)) { + if (this.eatGroupName()) { + const groupName = this._lastStrValue; + this._backreferenceNames.add(groupName); + this.onBackreference(start - 1, this.index, groupName); + return true; + } + this.raise("Invalid named reference"); + } + return false; + } + consumeCharacterClass() { + const start = this.index; + if (this.eat(LEFT_SQUARE_BRACKET)) { + const negate = this.eat(CIRCUMFLEX_ACCENT); + this.onCharacterClassEnter(start, negate, this._unicodeSetsMode); + const result = this.consumeClassContents(); + if (!this.eat(RIGHT_SQUARE_BRACKET)) { + if (this.currentCodePoint === -1) { + this.raise("Unterminated character class"); + } + this.raise("Invalid character in character class"); + } + if (negate && result.mayContainStrings) { + this.raise("Negated character class may contain strings"); + } + this.onCharacterClassLeave(start, this.index, negate); + return result; + } + return null; + } + consumeClassContents() { + if (this._unicodeSetsMode) { + if (this.currentCodePoint === RIGHT_SQUARE_BRACKET) { + return {}; + } + const result = this.consumeClassSetExpression(); + return result; + } + const strict = this.strict || this._unicodeMode; + for (;;) { + const rangeStart = this.index; + if (!this.consumeClassAtom()) { + break; + } + const min = this._lastIntValue; + if (!this.eat(HYPHEN_MINUS)) { + continue; + } + this.onCharacter(this.index - 1, this.index, HYPHEN_MINUS); + if (!this.consumeClassAtom()) { + break; + } + const max = this._lastIntValue; + if (min === -1 || max === -1) { + if (strict) { + this.raise("Invalid character class"); + } + continue; + } + if (min > max) { + this.raise("Range out of order in character class"); + } + this.onCharacterClassRange(rangeStart, this.index, min, max); + } + return {}; + } + consumeClassAtom() { + const start = this.index; + const cp = this.currentCodePoint; + if (cp !== -1 && + cp !== REVERSE_SOLIDUS && + cp !== RIGHT_SQUARE_BRACKET) { + this.advance(); + this._lastIntValue = cp; + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + if (this.eat(REVERSE_SOLIDUS)) { + if (this.consumeClassEscape()) { + return true; + } + if (!this.strict && + this.currentCodePoint === LATIN_SMALL_LETTER_C) { + this._lastIntValue = REVERSE_SOLIDUS; + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + if (this.strict || this._unicodeMode) { + this.raise("Invalid escape"); + } + this.rewind(start); + } + return false; + } + consumeClassEscape() { + const start = this.index; + if (this.eat(LATIN_SMALL_LETTER_B)) { + this._lastIntValue = BACKSPACE; + this.onCharacter(start - 1, this.index, this._lastIntValue); + return true; + } + if (this._unicodeMode && this.eat(HYPHEN_MINUS)) { + this._lastIntValue = HYPHEN_MINUS; + this.onCharacter(start - 1, this.index, this._lastIntValue); + return true; + } + let cp = 0; + if (!this.strict && + !this._unicodeMode && + this.currentCodePoint === LATIN_SMALL_LETTER_C && + (isDecimalDigit((cp = this.nextCodePoint)) || cp === LOW_LINE)) { + this.advance(); + this.advance(); + this._lastIntValue = cp % 0x20; + this.onCharacter(start - 1, this.index, this._lastIntValue); + return true; + } + return (Boolean(this.consumeCharacterClassEscape()) || + this.consumeCharacterEscape()); + } + consumeClassSetExpression() { + const start = this.index; + let mayContainStrings = false; + let result = null; + if (this.consumeClassSetCharacter()) { + if (this.consumeClassSetRangeFromOperator(start)) { + this.consumeClassUnionRight({}); + return {}; + } + mayContainStrings = false; + } + else if ((result = this.consumeClassSetOperand())) { + mayContainStrings = result.mayContainStrings; + } + else { + const cp = this.currentCodePoint; + if (cp === REVERSE_SOLIDUS) { + this.advance(); + this.raise("Invalid escape"); + } + if (cp === this.nextCodePoint && + isClassSetReservedDoublePunctuatorCharacter(cp)) { + this.raise("Invalid set operation in character class"); + } + this.raise("Invalid character in character class"); + } + if (this.eat2(AMPERSAND, AMPERSAND)) { + while (this.currentCodePoint !== AMPERSAND && + (result = this.consumeClassSetOperand())) { + this.onClassIntersection(start, this.index); + if (!result.mayContainStrings) { + mayContainStrings = false; + } + if (this.eat2(AMPERSAND, AMPERSAND)) { + continue; + } + return { mayContainStrings }; + } + this.raise("Invalid character in character class"); + } + if (this.eat2(HYPHEN_MINUS, HYPHEN_MINUS)) { + while (this.consumeClassSetOperand()) { + this.onClassSubtraction(start, this.index); + if (this.eat2(HYPHEN_MINUS, HYPHEN_MINUS)) { + continue; + } + return { mayContainStrings }; + } + this.raise("Invalid character in character class"); + } + return this.consumeClassUnionRight({ mayContainStrings }); + } + consumeClassUnionRight(leftResult) { + let mayContainStrings = leftResult.mayContainStrings; + for (;;) { + const start = this.index; + if (this.consumeClassSetCharacter()) { + this.consumeClassSetRangeFromOperator(start); + continue; + } + const result = this.consumeClassSetOperand(); + if (result) { + if (result.mayContainStrings) { + mayContainStrings = true; + } + continue; + } + break; + } + return { mayContainStrings }; + } + consumeClassSetRangeFromOperator(start) { + const currentStart = this.index; + const min = this._lastIntValue; + if (this.eat(HYPHEN_MINUS)) { + if (this.consumeClassSetCharacter()) { + const max = this._lastIntValue; + if (min === -1 || max === -1) { + this.raise("Invalid character class"); + } + if (min > max) { + this.raise("Range out of order in character class"); + } + this.onCharacterClassRange(start, this.index, min, max); + return true; + } + this.rewind(currentStart); + } + return false; + } + consumeClassSetOperand() { + let result = null; + if ((result = this.consumeNestedClass())) { + return result; + } + if ((result = this.consumeClassStringDisjunction())) { + return result; + } + if (this.consumeClassSetCharacter()) { + return {}; + } + return null; + } + consumeNestedClass() { + const start = this.index; + if (this.eat(LEFT_SQUARE_BRACKET)) { + const negate = this.eat(CIRCUMFLEX_ACCENT); + this.onCharacterClassEnter(start, negate, true); + const result = this.consumeClassContents(); + if (!this.eat(RIGHT_SQUARE_BRACKET)) { + this.raise("Unterminated character class"); + } + if (negate && result.mayContainStrings) { + this.raise("Negated character class may contain strings"); + } + this.onCharacterClassLeave(start, this.index, negate); + return result; + } + if (this.eat(REVERSE_SOLIDUS)) { + const result = this.consumeCharacterClassEscape(); + if (result) { + return result; + } + this.rewind(start); + } + return null; + } + consumeClassStringDisjunction() { + const start = this.index; + if (this.eat3(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_Q, LEFT_CURLY_BRACKET)) { + this.onClassStringDisjunctionEnter(start); + let i = 0; + let mayContainStrings = false; + do { + if (this.consumeClassString(i++).mayContainStrings) { + mayContainStrings = true; + } + } while (this.eat(VERTICAL_LINE)); + if (this.eat(RIGHT_CURLY_BRACKET)) { + this.onClassStringDisjunctionLeave(start, this.index); + return { mayContainStrings }; + } + this.raise("Unterminated class string disjunction"); + } + return null; + } + consumeClassString(i) { + const start = this.index; + let count = 0; + this.onStringAlternativeEnter(start, i); + while (this.currentCodePoint !== -1 && + this.consumeClassSetCharacter()) { + count++; + } + this.onStringAlternativeLeave(start, this.index, i); + return { mayContainStrings: count !== 1 }; + } + consumeClassSetCharacter() { + const start = this.index; + const cp = this.currentCodePoint; + if (cp !== this.nextCodePoint || + !isClassSetReservedDoublePunctuatorCharacter(cp)) { + if (cp !== -1 && !isClassSetSyntaxCharacter(cp)) { + this._lastIntValue = cp; + this.advance(); + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + } + if (this.eat(REVERSE_SOLIDUS)) { + if (this.consumeCharacterEscape()) { + return true; + } + if (isClassSetReservedPunctuator(this.currentCodePoint)) { + this._lastIntValue = this.currentCodePoint; + this.advance(); + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + if (this.eat(LATIN_SMALL_LETTER_B)) { + this._lastIntValue = BACKSPACE; + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + this.rewind(start); + } + return false; + } + eatGroupName() { + if (this.eat(LESS_THAN_SIGN)) { + if (this.eatRegExpIdentifierName() && this.eat(GREATER_THAN_SIGN)) { + return true; + } + this.raise("Invalid capture group name"); + } + return false; + } + eatRegExpIdentifierName() { + if (this.eatRegExpIdentifierStart()) { + this._lastStrValue = String.fromCodePoint(this._lastIntValue); + while (this.eatRegExpIdentifierPart()) { + this._lastStrValue += String.fromCodePoint(this._lastIntValue); + } + return true; + } + return false; + } + eatRegExpIdentifierStart() { + const start = this.index; + const forceUFlag = !this._unicodeMode && this.ecmaVersion >= 2020; + let cp = this.currentCodePoint; + this.advance(); + if (cp === REVERSE_SOLIDUS && + this.eatRegExpUnicodeEscapeSequence(forceUFlag)) { + cp = this._lastIntValue; + } + else if (forceUFlag && + isLeadSurrogate(cp) && + isTrailSurrogate(this.currentCodePoint)) { + cp = combineSurrogatePair(cp, this.currentCodePoint); + this.advance(); + } + if (isIdentifierStartChar(cp)) { + this._lastIntValue = cp; + return true; + } + if (this.index !== start) { + this.rewind(start); + } + return false; + } + eatRegExpIdentifierPart() { + const start = this.index; + const forceUFlag = !this._unicodeMode && this.ecmaVersion >= 2020; + let cp = this.currentCodePoint; + this.advance(); + if (cp === REVERSE_SOLIDUS && + this.eatRegExpUnicodeEscapeSequence(forceUFlag)) { + cp = this._lastIntValue; + } + else if (forceUFlag && + isLeadSurrogate(cp) && + isTrailSurrogate(this.currentCodePoint)) { + cp = combineSurrogatePair(cp, this.currentCodePoint); + this.advance(); + } + if (isIdentifierPartChar(cp)) { + this._lastIntValue = cp; + return true; + } + if (this.index !== start) { + this.rewind(start); + } + return false; + } + eatCControlLetter() { + const start = this.index; + if (this.eat(LATIN_SMALL_LETTER_C)) { + if (this.eatControlLetter()) { + return true; + } + this.rewind(start); + } + return false; + } + eatZero() { + if (this.currentCodePoint === DIGIT_ZERO && + !isDecimalDigit(this.nextCodePoint)) { + this._lastIntValue = 0; + this.advance(); + return true; + } + return false; + } + eatControlEscape() { + if (this.eat(LATIN_SMALL_LETTER_F)) { + this._lastIntValue = FORM_FEED; + return true; + } + if (this.eat(LATIN_SMALL_LETTER_N)) { + this._lastIntValue = LINE_FEED; + return true; + } + if (this.eat(LATIN_SMALL_LETTER_R)) { + this._lastIntValue = CARRIAGE_RETURN; + return true; + } + if (this.eat(LATIN_SMALL_LETTER_T)) { + this._lastIntValue = CHARACTER_TABULATION; + return true; + } + if (this.eat(LATIN_SMALL_LETTER_V)) { + this._lastIntValue = LINE_TABULATION; + return true; + } + return false; + } + eatControlLetter() { + const cp = this.currentCodePoint; + if (isLatinLetter(cp)) { + this.advance(); + this._lastIntValue = cp % 0x20; + return true; + } + return false; + } + eatRegExpUnicodeEscapeSequence(forceUFlag = false) { + const start = this.index; + const uFlag = forceUFlag || this._unicodeMode; + if (this.eat(LATIN_SMALL_LETTER_U)) { + if ((uFlag && this.eatRegExpUnicodeSurrogatePairEscape()) || + this.eatFixedHexDigits(4) || + (uFlag && this.eatRegExpUnicodeCodePointEscape())) { + return true; + } + if (this.strict || uFlag) { + this.raise("Invalid unicode escape"); + } + this.rewind(start); + } + return false; + } + eatRegExpUnicodeSurrogatePairEscape() { + const start = this.index; + if (this.eatFixedHexDigits(4)) { + const lead = this._lastIntValue; + if (isLeadSurrogate(lead) && + this.eat(REVERSE_SOLIDUS) && + this.eat(LATIN_SMALL_LETTER_U) && + this.eatFixedHexDigits(4)) { + const trail = this._lastIntValue; + if (isTrailSurrogate(trail)) { + this._lastIntValue = combineSurrogatePair(lead, trail); + return true; + } + } + this.rewind(start); + } + return false; + } + eatRegExpUnicodeCodePointEscape() { + const start = this.index; + if (this.eat(LEFT_CURLY_BRACKET) && + this.eatHexDigits() && + this.eat(RIGHT_CURLY_BRACKET) && + isValidUnicode(this._lastIntValue)) { + return true; + } + this.rewind(start); + return false; + } + eatIdentityEscape() { + const cp = this.currentCodePoint; + if (this.isValidIdentityEscape(cp)) { + this._lastIntValue = cp; + this.advance(); + return true; + } + return false; + } + isValidIdentityEscape(cp) { + if (cp === -1) { + return false; + } + if (this._unicodeMode) { + return isSyntaxCharacter(cp) || cp === SOLIDUS; + } + if (this.strict) { + return !isIdContinue(cp); + } + if (this._nFlag) { + return !(cp === LATIN_SMALL_LETTER_C || cp === LATIN_SMALL_LETTER_K); + } + return cp !== LATIN_SMALL_LETTER_C; + } + eatDecimalEscape() { + this._lastIntValue = 0; + let cp = this.currentCodePoint; + if (cp >= DIGIT_ONE && cp <= DIGIT_NINE) { + do { + this._lastIntValue = 10 * this._lastIntValue + (cp - DIGIT_ZERO); + this.advance(); + } while ((cp = this.currentCodePoint) >= DIGIT_ZERO && + cp <= DIGIT_NINE); + return true; + } + return false; + } + eatUnicodePropertyValueExpression() { + const start = this.index; + if (this.eatUnicodePropertyName() && this.eat(EQUALS_SIGN)) { + const key = this._lastStrValue; + if (this.eatUnicodePropertyValue()) { + const value = this._lastStrValue; + if (isValidUnicodeProperty(this.ecmaVersion, key, value)) { + return { + key, + value: value || null, + }; + } + this.raise("Invalid property name"); + } + } + this.rewind(start); + if (this.eatLoneUnicodePropertyNameOrValue()) { + const nameOrValue = this._lastStrValue; + if (isValidUnicodeProperty(this.ecmaVersion, "General_Category", nameOrValue)) { + return { + key: "General_Category", + value: nameOrValue || null, + }; + } + if (isValidLoneUnicodeProperty(this.ecmaVersion, nameOrValue)) { + return { + key: nameOrValue, + value: null, + }; + } + if (this._unicodeSetsMode && + isValidLoneUnicodePropertyOfString(this.ecmaVersion, nameOrValue)) { + return { + key: nameOrValue, + value: null, + strings: true, + }; + } + this.raise("Invalid property name"); + } + return null; + } + eatUnicodePropertyName() { + this._lastStrValue = ""; + while (isUnicodePropertyNameCharacter(this.currentCodePoint)) { + this._lastStrValue += String.fromCodePoint(this.currentCodePoint); + this.advance(); + } + return this._lastStrValue !== ""; + } + eatUnicodePropertyValue() { + this._lastStrValue = ""; + while (isUnicodePropertyValueCharacter(this.currentCodePoint)) { + this._lastStrValue += String.fromCodePoint(this.currentCodePoint); + this.advance(); + } + return this._lastStrValue !== ""; + } + eatLoneUnicodePropertyNameOrValue() { + return this.eatUnicodePropertyValue(); + } + eatHexEscapeSequence() { + const start = this.index; + if (this.eat(LATIN_SMALL_LETTER_X)) { + if (this.eatFixedHexDigits(2)) { + return true; + } + if (this._unicodeMode || this.strict) { + this.raise("Invalid escape"); + } + this.rewind(start); + } + return false; + } + eatDecimalDigits() { + const start = this.index; + this._lastIntValue = 0; + while (isDecimalDigit(this.currentCodePoint)) { + this._lastIntValue = + 10 * this._lastIntValue + digitToInt(this.currentCodePoint); + this.advance(); + } + return this.index !== start; + } + eatHexDigits() { + const start = this.index; + this._lastIntValue = 0; + while (isHexDigit(this.currentCodePoint)) { + this._lastIntValue = + 16 * this._lastIntValue + digitToInt(this.currentCodePoint); + this.advance(); + } + return this.index !== start; + } + eatLegacyOctalEscapeSequence() { + if (this.eatOctalDigit()) { + const n1 = this._lastIntValue; + if (this.eatOctalDigit()) { + const n2 = this._lastIntValue; + if (n1 <= 3 && this.eatOctalDigit()) { + this._lastIntValue = n1 * 64 + n2 * 8 + this._lastIntValue; + } + else { + this._lastIntValue = n1 * 8 + n2; + } + } + else { + this._lastIntValue = n1; + } + return true; + } + return false; + } + eatOctalDigit() { + const cp = this.currentCodePoint; + if (isOctalDigit(cp)) { + this.advance(); + this._lastIntValue = cp - DIGIT_ZERO; + return true; + } + this._lastIntValue = 0; + return false; + } + eatFixedHexDigits(length) { + const start = this.index; + this._lastIntValue = 0; + for (let i = 0; i < length; ++i) { + const cp = this.currentCodePoint; + if (!isHexDigit(cp)) { + this.rewind(start); + return false; + } + this._lastIntValue = 16 * this._lastIntValue + digitToInt(cp); + this.advance(); + } + return true; + } + eatModifiers() { + let ate = false; + while (isRegularExpressionModifier(this.currentCodePoint)) { + this.advance(); + ate = true; + } + return ate; + } + parseModifiers(start, end) { + const { ignoreCase, multiline, dotAll } = this.parseFlags(this._reader.source, start, end); + return { ignoreCase, multiline, dotAll }; + } + parseFlags(source, start, end) { + const flags = { + global: false, + ignoreCase: false, + multiline: false, + unicode: false, + sticky: false, + dotAll: false, + hasIndices: false, + unicodeSets: false, + }; + const validFlags = new Set(); + validFlags.add(LATIN_SMALL_LETTER_G); + validFlags.add(LATIN_SMALL_LETTER_I); + validFlags.add(LATIN_SMALL_LETTER_M); + if (this.ecmaVersion >= 2015) { + validFlags.add(LATIN_SMALL_LETTER_U); + validFlags.add(LATIN_SMALL_LETTER_Y); + if (this.ecmaVersion >= 2018) { + validFlags.add(LATIN_SMALL_LETTER_S); + if (this.ecmaVersion >= 2022) { + validFlags.add(LATIN_SMALL_LETTER_D); + if (this.ecmaVersion >= 2024) { + validFlags.add(LATIN_SMALL_LETTER_V); + } + } + } + } + for (let i = start; i < end; ++i) { + const flag = source.charCodeAt(i); + if (validFlags.has(flag)) { + const prop = FLAG_CODEPOINT_TO_PROP[flag]; + if (flags[prop]) { + this.raise(`Duplicated flag '${source[i]}'`, { + index: start, + }); + } + flags[prop] = true; + } + else { + this.raise(`Invalid flag '${source[i]}'`, { index: start }); + } + } + return flags; + } +} + +const DUMMY_PATTERN = {}; +const DUMMY_FLAGS = {}; +const DUMMY_CAPTURING_GROUP = {}; +function isClassSetOperand(node) { + return (node.type === "Character" || + node.type === "CharacterSet" || + node.type === "CharacterClass" || + node.type === "ExpressionCharacterClass" || + node.type === "ClassStringDisjunction"); +} +class RegExpParserState { + constructor(options) { + var _a; + this._node = DUMMY_PATTERN; + this._expressionBufferMap = new Map(); + this._flags = DUMMY_FLAGS; + this._backreferences = []; + this._capturingGroups = []; + this.source = ""; + this.strict = Boolean(options === null || options === void 0 ? void 0 : options.strict); + this.ecmaVersion = (_a = options === null || options === void 0 ? void 0 : options.ecmaVersion) !== null && _a !== void 0 ? _a : latestEcmaVersion; + } + get pattern() { + if (this._node.type !== "Pattern") { + throw new Error("UnknownError"); + } + return this._node; + } + get flags() { + if (this._flags.type !== "Flags") { + throw new Error("UnknownError"); + } + return this._flags; + } + onRegExpFlags(start, end, { global, ignoreCase, multiline, unicode, sticky, dotAll, hasIndices, unicodeSets, }) { + this._flags = { + type: "Flags", + parent: null, + start, + end, + raw: this.source.slice(start, end), + global, + ignoreCase, + multiline, + unicode, + sticky, + dotAll, + hasIndices, + unicodeSets, + }; + } + onPatternEnter(start) { + this._node = { + type: "Pattern", + parent: null, + start, + end: start, + raw: "", + alternatives: [], + }; + this._backreferences.length = 0; + this._capturingGroups.length = 0; + } + onPatternLeave(start, end) { + this._node.end = end; + this._node.raw = this.source.slice(start, end); + for (const reference of this._backreferences) { + const ref = reference.ref; + const groups = typeof ref === "number" + ? [this._capturingGroups[ref - 1]] + : this._capturingGroups.filter((g) => g.name === ref); + if (groups.length === 1) { + const group = groups[0]; + reference.ambiguous = false; + reference.resolved = group; + } + else { + reference.ambiguous = true; + reference.resolved = groups; + } + for (const group of groups) { + group.references.push(reference); + } + } + } + onAlternativeEnter(start) { + const parent = this._node; + if (parent.type !== "Assertion" && + parent.type !== "CapturingGroup" && + parent.type !== "Group" && + parent.type !== "Pattern") { + throw new Error("UnknownError"); + } + this._node = { + type: "Alternative", + parent, + start, + end: start, + raw: "", + elements: [], + }; + parent.alternatives.push(this._node); + } + onAlternativeLeave(start, end) { + const node = this._node; + if (node.type !== "Alternative") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onGroupEnter(start) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + const group = { + type: "Group", + parent, + start, + end: start, + raw: "", + modifiers: null, + alternatives: [], + }; + this._node = group; + parent.elements.push(this._node); + } + onGroupLeave(start, end) { + const node = this._node; + if (node.type !== "Group" || node.parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onModifiersEnter(start) { + const parent = this._node; + if (parent.type !== "Group") { + throw new Error("UnknownError"); + } + this._node = { + type: "Modifiers", + parent, + start, + end: start, + raw: "", + add: null, + remove: null, + }; + parent.modifiers = this._node; + } + onModifiersLeave(start, end) { + const node = this._node; + if (node.type !== "Modifiers" || node.parent.type !== "Group") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onAddModifiers(start, end, { ignoreCase, multiline, dotAll, }) { + const parent = this._node; + if (parent.type !== "Modifiers") { + throw new Error("UnknownError"); + } + parent.add = { + type: "ModifierFlags", + parent, + start, + end, + raw: this.source.slice(start, end), + ignoreCase, + multiline, + dotAll, + }; + } + onRemoveModifiers(start, end, { ignoreCase, multiline, dotAll, }) { + const parent = this._node; + if (parent.type !== "Modifiers") { + throw new Error("UnknownError"); + } + parent.remove = { + type: "ModifierFlags", + parent, + start, + end, + raw: this.source.slice(start, end), + ignoreCase, + multiline, + dotAll, + }; + } + onCapturingGroupEnter(start, name) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + this._node = { + type: "CapturingGroup", + parent, + start, + end: start, + raw: "", + name, + alternatives: [], + references: [], + }; + parent.elements.push(this._node); + this._capturingGroups.push(this._node); + } + onCapturingGroupLeave(start, end) { + const node = this._node; + if (node.type !== "CapturingGroup" || + node.parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onQuantifier(start, end, min, max, greedy) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + const element = parent.elements.pop(); + if (element == null || + element.type === "Quantifier" || + (element.type === "Assertion" && element.kind !== "lookahead")) { + throw new Error("UnknownError"); + } + const node = { + type: "Quantifier", + parent, + start: element.start, + end, + raw: this.source.slice(element.start, end), + min, + max, + greedy, + element, + }; + parent.elements.push(node); + element.parent = node; + } + onLookaroundAssertionEnter(start, kind, negate) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + const node = (this._node = { + type: "Assertion", + parent, + start, + end: start, + raw: "", + kind, + negate, + alternatives: [], + }); + parent.elements.push(node); + } + onLookaroundAssertionLeave(start, end) { + const node = this._node; + if (node.type !== "Assertion" || node.parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onEdgeAssertion(start, end, kind) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + parent.elements.push({ + type: "Assertion", + parent, + start, + end, + raw: this.source.slice(start, end), + kind, + }); + } + onWordBoundaryAssertion(start, end, kind, negate) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + parent.elements.push({ + type: "Assertion", + parent, + start, + end, + raw: this.source.slice(start, end), + kind, + negate, + }); + } + onAnyCharacterSet(start, end, kind) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + parent.elements.push({ + type: "CharacterSet", + parent, + start, + end, + raw: this.source.slice(start, end), + kind, + }); + } + onEscapeCharacterSet(start, end, kind, negate) { + const parent = this._node; + if (parent.type !== "Alternative" && parent.type !== "CharacterClass") { + throw new Error("UnknownError"); + } + parent.elements.push({ + type: "CharacterSet", + parent, + start, + end, + raw: this.source.slice(start, end), + kind, + negate, + }); + } + onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings) { + const parent = this._node; + if (parent.type !== "Alternative" && parent.type !== "CharacterClass") { + throw new Error("UnknownError"); + } + const base = { + type: "CharacterSet", + parent: null, + start, + end, + raw: this.source.slice(start, end), + kind, + strings: null, + key, + }; + if (strings) { + if ((parent.type === "CharacterClass" && !parent.unicodeSets) || + negate || + value !== null) { + throw new Error("UnknownError"); + } + parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate })); + } + else { + parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate })); + } + } + onCharacter(start, end, value) { + const parent = this._node; + if (parent.type !== "Alternative" && + parent.type !== "CharacterClass" && + parent.type !== "StringAlternative") { + throw new Error("UnknownError"); + } + parent.elements.push({ + type: "Character", + parent, + start, + end, + raw: this.source.slice(start, end), + value, + }); + } + onBackreference(start, end, ref) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + const node = { + type: "Backreference", + parent, + start, + end, + raw: this.source.slice(start, end), + ref, + ambiguous: false, + resolved: DUMMY_CAPTURING_GROUP, + }; + parent.elements.push(node); + this._backreferences.push(node); + } + onCharacterClassEnter(start, negate, unicodeSets) { + const parent = this._node; + const base = { + type: "CharacterClass", + parent, + start, + end: start, + raw: "", + unicodeSets, + negate, + elements: [], + }; + if (parent.type === "Alternative") { + const node = Object.assign(Object.assign({}, base), { parent }); + this._node = node; + parent.elements.push(node); + } + else if (parent.type === "CharacterClass" && + parent.unicodeSets && + unicodeSets) { + const node = Object.assign(Object.assign({}, base), { parent, + unicodeSets }); + this._node = node; + parent.elements.push(node); + } + else { + throw new Error("UnknownError"); + } + } + onCharacterClassLeave(start, end) { + const node = this._node; + if (node.type !== "CharacterClass" || + (node.parent.type !== "Alternative" && + node.parent.type !== "CharacterClass")) { + throw new Error("UnknownError"); + } + const parent = node.parent; + node.end = end; + node.raw = this.source.slice(start, end); + this._node = parent; + const expression = this._expressionBufferMap.get(node); + if (!expression) { + return; + } + if (node.elements.length > 0) { + throw new Error("UnknownError"); + } + this._expressionBufferMap.delete(node); + const newNode = { + type: "ExpressionCharacterClass", + parent, + start: node.start, + end: node.end, + raw: node.raw, + negate: node.negate, + expression, + }; + expression.parent = newNode; + if (node !== parent.elements.pop()) { + throw new Error("UnknownError"); + } + parent.elements.push(newNode); + } + onCharacterClassRange(start, end) { + const parent = this._node; + if (parent.type !== "CharacterClass") { + throw new Error("UnknownError"); + } + const elements = parent.elements; + const max = elements.pop(); + if (!max || max.type !== "Character") { + throw new Error("UnknownError"); + } + if (!parent.unicodeSets) { + const hyphen = elements.pop(); + if (!hyphen || + hyphen.type !== "Character" || + hyphen.value !== HYPHEN_MINUS) { + throw new Error("UnknownError"); + } + } + const min = elements.pop(); + if (!min || min.type !== "Character") { + throw new Error("UnknownError"); + } + const node = { + type: "CharacterClassRange", + parent, + start, + end, + raw: this.source.slice(start, end), + min, + max, + }; + min.parent = node; + max.parent = node; + elements.push(node); + } + onClassIntersection(start, end) { + var _a; + const parent = this._node; + if (parent.type !== "CharacterClass" || !parent.unicodeSets) { + throw new Error("UnknownError"); + } + const right = parent.elements.pop(); + const left = (_a = this._expressionBufferMap.get(parent)) !== null && _a !== void 0 ? _a : parent.elements.pop(); + if (!left || + !right || + left.type === "ClassSubtraction" || + (left.type !== "ClassIntersection" && !isClassSetOperand(left)) || + !isClassSetOperand(right)) { + throw new Error("UnknownError"); + } + const node = { + type: "ClassIntersection", + parent: parent, + start, + end, + raw: this.source.slice(start, end), + left, + right, + }; + left.parent = node; + right.parent = node; + this._expressionBufferMap.set(parent, node); + } + onClassSubtraction(start, end) { + var _a; + const parent = this._node; + if (parent.type !== "CharacterClass" || !parent.unicodeSets) { + throw new Error("UnknownError"); + } + const right = parent.elements.pop(); + const left = (_a = this._expressionBufferMap.get(parent)) !== null && _a !== void 0 ? _a : parent.elements.pop(); + if (!left || + !right || + left.type === "ClassIntersection" || + (left.type !== "ClassSubtraction" && !isClassSetOperand(left)) || + !isClassSetOperand(right)) { + throw new Error("UnknownError"); + } + const node = { + type: "ClassSubtraction", + parent: parent, + start, + end, + raw: this.source.slice(start, end), + left, + right, + }; + left.parent = node; + right.parent = node; + this._expressionBufferMap.set(parent, node); + } + onClassStringDisjunctionEnter(start) { + const parent = this._node; + if (parent.type !== "CharacterClass" || !parent.unicodeSets) { + throw new Error("UnknownError"); + } + this._node = { + type: "ClassStringDisjunction", + parent, + start, + end: start, + raw: "", + alternatives: [], + }; + parent.elements.push(this._node); + } + onClassStringDisjunctionLeave(start, end) { + const node = this._node; + if (node.type !== "ClassStringDisjunction" || + node.parent.type !== "CharacterClass") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onStringAlternativeEnter(start) { + const parent = this._node; + if (parent.type !== "ClassStringDisjunction") { + throw new Error("UnknownError"); + } + this._node = { + type: "StringAlternative", + parent, + start, + end: start, + raw: "", + elements: [], + }; + parent.alternatives.push(this._node); + } + onStringAlternativeLeave(start, end) { + const node = this._node; + if (node.type !== "StringAlternative") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } +} +class RegExpParser { + constructor(options) { + this._state = new RegExpParserState(options); + this._validator = new RegExpValidator(this._state); + } + parseLiteral(source, start = 0, end = source.length) { + this._state.source = source; + this._validator.validateLiteral(source, start, end); + const pattern = this._state.pattern; + const flags = this._state.flags; + const literal = { + type: "RegExpLiteral", + parent: null, + start, + end, + raw: source, + pattern, + flags, + }; + pattern.parent = literal; + flags.parent = literal; + return literal; + } + parseFlags(source, start = 0, end = source.length) { + this._state.source = source; + this._validator.validateFlags(source, start, end); + return this._state.flags; + } + parsePattern(source, start = 0, end = source.length, uFlagOrFlags = undefined) { + this._state.source = source; + this._validator.validatePattern(source, start, end, uFlagOrFlags); + return this._state.pattern; + } +} + +class RegExpVisitor { + constructor(handlers) { + this._handlers = handlers; + } + visit(node) { + switch (node.type) { + case "Alternative": + this.visitAlternative(node); + break; + case "Assertion": + this.visitAssertion(node); + break; + case "Backreference": + this.visitBackreference(node); + break; + case "CapturingGroup": + this.visitCapturingGroup(node); + break; + case "Character": + this.visitCharacter(node); + break; + case "CharacterClass": + this.visitCharacterClass(node); + break; + case "CharacterClassRange": + this.visitCharacterClassRange(node); + break; + case "CharacterSet": + this.visitCharacterSet(node); + break; + case "ClassIntersection": + this.visitClassIntersection(node); + break; + case "ClassStringDisjunction": + this.visitClassStringDisjunction(node); + break; + case "ClassSubtraction": + this.visitClassSubtraction(node); + break; + case "ExpressionCharacterClass": + this.visitExpressionCharacterClass(node); + break; + case "Flags": + this.visitFlags(node); + break; + case "Group": + this.visitGroup(node); + break; + case "Modifiers": + this.visitModifiers(node); + break; + case "ModifierFlags": + this.visitModifierFlags(node); + break; + case "Pattern": + this.visitPattern(node); + break; + case "Quantifier": + this.visitQuantifier(node); + break; + case "RegExpLiteral": + this.visitRegExpLiteral(node); + break; + case "StringAlternative": + this.visitStringAlternative(node); + break; + default: + throw new Error(`Unknown type: ${node.type}`); + } + } + visitAlternative(node) { + if (this._handlers.onAlternativeEnter) { + this._handlers.onAlternativeEnter(node); + } + node.elements.forEach(this.visit, this); + if (this._handlers.onAlternativeLeave) { + this._handlers.onAlternativeLeave(node); + } + } + visitAssertion(node) { + if (this._handlers.onAssertionEnter) { + this._handlers.onAssertionEnter(node); + } + if (node.kind === "lookahead" || node.kind === "lookbehind") { + node.alternatives.forEach(this.visit, this); + } + if (this._handlers.onAssertionLeave) { + this._handlers.onAssertionLeave(node); + } + } + visitBackreference(node) { + if (this._handlers.onBackreferenceEnter) { + this._handlers.onBackreferenceEnter(node); + } + if (this._handlers.onBackreferenceLeave) { + this._handlers.onBackreferenceLeave(node); + } + } + visitCapturingGroup(node) { + if (this._handlers.onCapturingGroupEnter) { + this._handlers.onCapturingGroupEnter(node); + } + node.alternatives.forEach(this.visit, this); + if (this._handlers.onCapturingGroupLeave) { + this._handlers.onCapturingGroupLeave(node); + } + } + visitCharacter(node) { + if (this._handlers.onCharacterEnter) { + this._handlers.onCharacterEnter(node); + } + if (this._handlers.onCharacterLeave) { + this._handlers.onCharacterLeave(node); + } + } + visitCharacterClass(node) { + if (this._handlers.onCharacterClassEnter) { + this._handlers.onCharacterClassEnter(node); + } + node.elements.forEach(this.visit, this); + if (this._handlers.onCharacterClassLeave) { + this._handlers.onCharacterClassLeave(node); + } + } + visitCharacterClassRange(node) { + if (this._handlers.onCharacterClassRangeEnter) { + this._handlers.onCharacterClassRangeEnter(node); + } + this.visitCharacter(node.min); + this.visitCharacter(node.max); + if (this._handlers.onCharacterClassRangeLeave) { + this._handlers.onCharacterClassRangeLeave(node); + } + } + visitCharacterSet(node) { + if (this._handlers.onCharacterSetEnter) { + this._handlers.onCharacterSetEnter(node); + } + if (this._handlers.onCharacterSetLeave) { + this._handlers.onCharacterSetLeave(node); + } + } + visitClassIntersection(node) { + if (this._handlers.onClassIntersectionEnter) { + this._handlers.onClassIntersectionEnter(node); + } + this.visit(node.left); + this.visit(node.right); + if (this._handlers.onClassIntersectionLeave) { + this._handlers.onClassIntersectionLeave(node); + } + } + visitClassStringDisjunction(node) { + if (this._handlers.onClassStringDisjunctionEnter) { + this._handlers.onClassStringDisjunctionEnter(node); + } + node.alternatives.forEach(this.visit, this); + if (this._handlers.onClassStringDisjunctionLeave) { + this._handlers.onClassStringDisjunctionLeave(node); + } + } + visitClassSubtraction(node) { + if (this._handlers.onClassSubtractionEnter) { + this._handlers.onClassSubtractionEnter(node); + } + this.visit(node.left); + this.visit(node.right); + if (this._handlers.onClassSubtractionLeave) { + this._handlers.onClassSubtractionLeave(node); + } + } + visitExpressionCharacterClass(node) { + if (this._handlers.onExpressionCharacterClassEnter) { + this._handlers.onExpressionCharacterClassEnter(node); + } + this.visit(node.expression); + if (this._handlers.onExpressionCharacterClassLeave) { + this._handlers.onExpressionCharacterClassLeave(node); + } + } + visitFlags(node) { + if (this._handlers.onFlagsEnter) { + this._handlers.onFlagsEnter(node); + } + if (this._handlers.onFlagsLeave) { + this._handlers.onFlagsLeave(node); + } + } + visitGroup(node) { + if (this._handlers.onGroupEnter) { + this._handlers.onGroupEnter(node); + } + if (node.modifiers) { + this.visit(node.modifiers); + } + node.alternatives.forEach(this.visit, this); + if (this._handlers.onGroupLeave) { + this._handlers.onGroupLeave(node); + } + } + visitModifiers(node) { + if (this._handlers.onModifiersEnter) { + this._handlers.onModifiersEnter(node); + } + if (node.add) { + this.visit(node.add); + } + if (node.remove) { + this.visit(node.remove); + } + if (this._handlers.onModifiersLeave) { + this._handlers.onModifiersLeave(node); + } + } + visitModifierFlags(node) { + if (this._handlers.onModifierFlagsEnter) { + this._handlers.onModifierFlagsEnter(node); + } + if (this._handlers.onModifierFlagsLeave) { + this._handlers.onModifierFlagsLeave(node); + } + } + visitPattern(node) { + if (this._handlers.onPatternEnter) { + this._handlers.onPatternEnter(node); + } + node.alternatives.forEach(this.visit, this); + if (this._handlers.onPatternLeave) { + this._handlers.onPatternLeave(node); + } + } + visitQuantifier(node) { + if (this._handlers.onQuantifierEnter) { + this._handlers.onQuantifierEnter(node); + } + this.visit(node.element); + if (this._handlers.onQuantifierLeave) { + this._handlers.onQuantifierLeave(node); + } + } + visitRegExpLiteral(node) { + if (this._handlers.onRegExpLiteralEnter) { + this._handlers.onRegExpLiteralEnter(node); + } + this.visitPattern(node.pattern); + this.visitFlags(node.flags); + if (this._handlers.onRegExpLiteralLeave) { + this._handlers.onRegExpLiteralLeave(node); + } + } + visitStringAlternative(node) { + if (this._handlers.onStringAlternativeEnter) { + this._handlers.onStringAlternativeEnter(node); + } + node.elements.forEach(this.visit, this); + if (this._handlers.onStringAlternativeLeave) { + this._handlers.onStringAlternativeLeave(node); + } + } +} + +function parseRegExpLiteral(source, options) { + return new RegExpParser(options).parseLiteral(String(source)); +} +function validateRegExpLiteral(source, options) { + new RegExpValidator(options).validateLiteral(source); +} +function visitRegExpAST(node, handlers) { + new RegExpVisitor(handlers).visit(node); +} + +exports.AST = ast; +exports.RegExpParser = RegExpParser; +exports.RegExpSyntaxError = RegExpSyntaxError; +exports.RegExpValidator = RegExpValidator; +exports.parseRegExpLiteral = parseRegExpLiteral; +exports.validateRegExpLiteral = validateRegExpLiteral; +exports.visitRegExpAST = visitRegExpAST; +//# sourceMappingURL=index.js.map diff --git a/slider/node_modules/@eslint-community/regexpp/index.js.map b/slider/node_modules/@eslint-community/regexpp/index.js.map new file mode 100644 index 0000000..2423a1a --- /dev/null +++ b/slider/node_modules/@eslint-community/regexpp/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js.map","sources":[".temp/src/ecma-versions.ts",".temp/unicode/src/unicode/ids.ts",".temp/unicode/src/unicode/properties.ts",".temp/unicode/src/unicode/index.ts",".temp/src/group-specifiers.ts",".temp/src/reader.ts",".temp/src/regexp-syntax-error.ts",".temp/src/validator.ts",".temp/src/parser.ts",".temp/src/visitor.ts",".temp/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;AAaO,MAAM,iBAAiB,GAAG,IAAI;;ACTrC,IAAI,kBAAkB,GAAyB,SAAS,CAAA;AACxD,IAAI,qBAAqB,GAAyB,SAAS,CAAA;AAErD,SAAU,SAAS,CAAC,EAAU,EAAA;IAChC,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;AAC1B,IAAA,OAAO,cAAc,CAAC,EAAE,CAAC,CAAA;AAC7B,CAAC;AAEK,SAAU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OAAO,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA;AACxD,CAAC;AAEe,SAAA,cAAc,CAC1B,IAAc,EACd,QAAgC,EAAA;IAEhC,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC3C;;;;;;;;;;"} \ No newline at end of file diff --git a/slider/node_modules/@eslint-community/regexpp/index.mjs b/slider/node_modules/@eslint-community/regexpp/index.mjs new file mode 100644 index 0000000..9b14aaf --- /dev/null +++ b/slider/node_modules/@eslint-community/regexpp/index.mjs @@ -0,0 +1,3027 @@ +var ast = /*#__PURE__*/Object.freeze({ + __proto__: null +}); + +const latestEcmaVersion = 2025; + +let largeIdStartRanges = undefined; +let largeIdContinueRanges = undefined; +function isIdStart(cp) { + if (cp < 0x41) + return false; + if (cp < 0x5b) + return true; + if (cp < 0x61) + return false; + if (cp < 0x7b) + return true; + return isLargeIdStart(cp); +} +function isIdContinue(cp) { + if (cp < 0x30) + return false; + if (cp < 0x3a) + return true; + if (cp < 0x41) + return false; + if (cp < 0x5b) + return true; + if (cp === 0x5f) + return true; + if (cp < 0x61) + return false; + if (cp < 0x7b) + return true; + return isLargeIdStart(cp) || isLargeIdContinue(cp); +} +function isLargeIdStart(cp) { + return isInRange(cp, largeIdStartRanges !== null && largeIdStartRanges !== void 0 ? largeIdStartRanges : (largeIdStartRanges = initLargeIdStartRanges())); +} +function isLargeIdContinue(cp) { + return isInRange(cp, largeIdContinueRanges !== null && largeIdContinueRanges !== void 0 ? largeIdContinueRanges : (largeIdContinueRanges = initLargeIdContinueRanges())); +} +function initLargeIdStartRanges() { + return restoreRanges("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0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 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1u 3 1 2 0 2 7 m f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 4 1f d 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 13 r a m 6z 15 7 1 h 2 1o s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 v 9 2 0 3 0 2 11 2 0 q 0 2 0 19 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 5k w w 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 q 32y 6 g6 5a2 t 1cz f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 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d 6t 1 2 9 k6 6 32 6 6 9 3o7 9 gvt3 6n"); +} +function isInRange(cp, ranges) { + let l = 0, r = (ranges.length / 2) | 0, i = 0, min = 0, max = 0; + while (l < r) { + i = ((l + r) / 2) | 0; + min = ranges[2 * i]; + max = ranges[2 * i + 1]; + if (cp < min) { + r = i; + } + else if (cp > max) { + l = i + 1; + } + else { + return true; + } + } + return false; +} +function restoreRanges(data) { + let last = 0; + return data.split(" ").map((s) => (last += parseInt(s, 36) | 0)); +} + +class DataSet { + constructor(raw2018, raw2019, raw2020, raw2021, raw2022, raw2023, raw2024, raw2025) { + this._raw2018 = raw2018; + this._raw2019 = raw2019; + this._raw2020 = raw2020; + this._raw2021 = raw2021; + this._raw2022 = raw2022; + this._raw2023 = raw2023; + this._raw2024 = raw2024; + this._raw2025 = raw2025; + } + get es2018() { + var _a; + return ((_a = this._set2018) !== null && _a !== void 0 ? _a : (this._set2018 = new Set(this._raw2018.split(" ")))); + } + get es2019() { + var _a; + return ((_a = this._set2019) !== null && _a !== void 0 ? _a : (this._set2019 = new Set(this._raw2019.split(" ")))); + } + get es2020() { + var _a; + return ((_a = this._set2020) !== null && _a !== void 0 ? _a : (this._set2020 = new Set(this._raw2020.split(" ")))); + } + get es2021() { + var _a; + return ((_a = this._set2021) !== null && _a !== void 0 ? _a : (this._set2021 = new Set(this._raw2021.split(" ")))); + } + get es2022() { + var _a; + return ((_a = this._set2022) !== null && _a !== void 0 ? _a : (this._set2022 = new Set(this._raw2022.split(" ")))); + } + get es2023() { + var _a; + return ((_a = this._set2023) !== null && _a !== void 0 ? _a : (this._set2023 = new Set(this._raw2023.split(" ")))); + } + get es2024() { + var _a; + return ((_a = this._set2024) !== null && _a !== void 0 ? _a : (this._set2024 = new Set(this._raw2024.split(" ")))); + } + get es2025() { + var _a; + return ((_a = this._set2025) !== null && _a !== void 0 ? _a : (this._set2025 = new Set(this._raw2025.split(" ")))); + } +} +const gcNameSet = new Set(["General_Category", "gc"]); +const scNameSet = new Set(["Script", "Script_Extensions", "sc", "scx"]); +const gcValueSets = new DataSet("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct", "", "", "", "", "", "", ""); +const scValueSets = new DataSet("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy", "Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo", "Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho", "Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", "Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi", "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz", "", ""); +const binPropertySets = new DataSet("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space", "Extended_Pictographic", "", "EBase EComp EMod EPres ExtPict", "", "", "", ""); +const binPropertyOfStringsSets = new DataSet("", "", "", "", "", "", "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence", ""); +function isValidUnicodeProperty(version, name, value) { + if (gcNameSet.has(name)) { + return version >= 2018 && gcValueSets.es2018.has(value); + } + if (scNameSet.has(name)) { + return ((version >= 2018 && scValueSets.es2018.has(value)) || + (version >= 2019 && scValueSets.es2019.has(value)) || + (version >= 2020 && scValueSets.es2020.has(value)) || + (version >= 2021 && scValueSets.es2021.has(value)) || + (version >= 2022 && scValueSets.es2022.has(value)) || + (version >= 2023 && scValueSets.es2023.has(value))); + } + return false; +} +function isValidLoneUnicodeProperty(version, value) { + return ((version >= 2018 && binPropertySets.es2018.has(value)) || + (version >= 2019 && binPropertySets.es2019.has(value)) || + (version >= 2021 && binPropertySets.es2021.has(value))); +} +function isValidLoneUnicodePropertyOfString(version, value) { + return version >= 2024 && binPropertyOfStringsSets.es2024.has(value); +} + +const BACKSPACE = 0x08; +const CHARACTER_TABULATION = 0x09; +const LINE_FEED = 0x0a; +const LINE_TABULATION = 0x0b; +const FORM_FEED = 0x0c; +const CARRIAGE_RETURN = 0x0d; +const EXCLAMATION_MARK = 0x21; +const NUMBER_SIGN = 0x23; +const DOLLAR_SIGN = 0x24; +const PERCENT_SIGN = 0x25; +const AMPERSAND = 0x26; +const LEFT_PARENTHESIS = 0x28; +const RIGHT_PARENTHESIS = 0x29; +const ASTERISK = 0x2a; +const PLUS_SIGN = 0x2b; +const COMMA = 0x2c; +const HYPHEN_MINUS = 0x2d; +const FULL_STOP = 0x2e; +const SOLIDUS = 0x2f; +const DIGIT_ZERO = 0x30; +const DIGIT_ONE = 0x31; +const DIGIT_SEVEN = 0x37; +const DIGIT_NINE = 0x39; +const COLON = 0x3a; +const SEMICOLON = 0x3b; +const LESS_THAN_SIGN = 0x3c; +const EQUALS_SIGN = 0x3d; +const GREATER_THAN_SIGN = 0x3e; +const QUESTION_MARK = 0x3f; +const COMMERCIAL_AT = 0x40; +const LATIN_CAPITAL_LETTER_A = 0x41; +const LATIN_CAPITAL_LETTER_B = 0x42; +const LATIN_CAPITAL_LETTER_D = 0x44; +const LATIN_CAPITAL_LETTER_F = 0x46; +const LATIN_CAPITAL_LETTER_P = 0x50; +const LATIN_CAPITAL_LETTER_S = 0x53; +const LATIN_CAPITAL_LETTER_W = 0x57; +const LATIN_CAPITAL_LETTER_Z = 0x5a; +const LOW_LINE = 0x5f; +const LATIN_SMALL_LETTER_A = 0x61; +const LATIN_SMALL_LETTER_B = 0x62; +const LATIN_SMALL_LETTER_C = 0x63; +const LATIN_SMALL_LETTER_D = 0x64; +const LATIN_SMALL_LETTER_F = 0x66; +const LATIN_SMALL_LETTER_G = 0x67; +const LATIN_SMALL_LETTER_I = 0x69; +const LATIN_SMALL_LETTER_K = 0x6b; +const LATIN_SMALL_LETTER_M = 0x6d; +const LATIN_SMALL_LETTER_N = 0x6e; +const LATIN_SMALL_LETTER_P = 0x70; +const LATIN_SMALL_LETTER_Q = 0x71; +const LATIN_SMALL_LETTER_R = 0x72; +const LATIN_SMALL_LETTER_S = 0x73; +const LATIN_SMALL_LETTER_T = 0x74; +const LATIN_SMALL_LETTER_U = 0x75; +const LATIN_SMALL_LETTER_V = 0x76; +const LATIN_SMALL_LETTER_W = 0x77; +const LATIN_SMALL_LETTER_X = 0x78; +const LATIN_SMALL_LETTER_Y = 0x79; +const LATIN_SMALL_LETTER_Z = 0x7a; +const LEFT_SQUARE_BRACKET = 0x5b; +const REVERSE_SOLIDUS = 0x5c; +const RIGHT_SQUARE_BRACKET = 0x5d; +const CIRCUMFLEX_ACCENT = 0x5e; +const GRAVE_ACCENT = 0x60; +const LEFT_CURLY_BRACKET = 0x7b; +const VERTICAL_LINE = 0x7c; +const RIGHT_CURLY_BRACKET = 0x7d; +const TILDE = 0x7e; +const ZERO_WIDTH_NON_JOINER = 0x200c; +const ZERO_WIDTH_JOINER = 0x200d; +const LINE_SEPARATOR = 0x2028; +const PARAGRAPH_SEPARATOR = 0x2029; +const MIN_CODE_POINT = 0x00; +const MAX_CODE_POINT = 0x10ffff; +function isLatinLetter(code) { + return ((code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_Z) || + (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_Z)); +} +function isDecimalDigit(code) { + return code >= DIGIT_ZERO && code <= DIGIT_NINE; +} +function isOctalDigit(code) { + return code >= DIGIT_ZERO && code <= DIGIT_SEVEN; +} +function isHexDigit(code) { + return ((code >= DIGIT_ZERO && code <= DIGIT_NINE) || + (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) || + (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F)); +} +function isLineTerminator(code) { + return (code === LINE_FEED || + code === CARRIAGE_RETURN || + code === LINE_SEPARATOR || + code === PARAGRAPH_SEPARATOR); +} +function isValidUnicode(code) { + return code >= MIN_CODE_POINT && code <= MAX_CODE_POINT; +} +function digitToInt(code) { + if (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F) { + return code - LATIN_SMALL_LETTER_A + 10; + } + if (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) { + return code - LATIN_CAPITAL_LETTER_A + 10; + } + return code - DIGIT_ZERO; +} +function isLeadSurrogate(code) { + return code >= 0xd800 && code <= 0xdbff; +} +function isTrailSurrogate(code) { + return code >= 0xdc00 && code <= 0xdfff; +} +function combineSurrogatePair(lead, trail) { + return (lead - 0xd800) * 0x400 + (trail - 0xdc00) + 0x10000; +} + +class GroupSpecifiersAsES2018 { + constructor() { + this.groupName = new Set(); + } + clear() { + this.groupName.clear(); + } + isEmpty() { + return !this.groupName.size; + } + hasInPattern(name) { + return this.groupName.has(name); + } + hasInScope(name) { + return this.hasInPattern(name); + } + addToScope(name) { + this.groupName.add(name); + } + enterDisjunction() { + } + enterAlternative() { + } + leaveDisjunction() { + } +} +class BranchID { + constructor(parent, base) { + this.parent = parent; + this.base = base !== null && base !== void 0 ? base : this; + } + separatedFrom(other) { + var _a, _b; + if (this.base === other.base && this !== other) { + return true; + } + if (other.parent && this.separatedFrom(other.parent)) { + return true; + } + return (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.separatedFrom(other)) !== null && _b !== void 0 ? _b : false; + } + child() { + return new BranchID(this, null); + } + sibling() { + return new BranchID(this.parent, this.base); + } +} +class GroupSpecifiersAsES2025 { + constructor() { + this.branchID = new BranchID(null, null); + this.groupNames = new Map(); + } + clear() { + this.branchID = new BranchID(null, null); + this.groupNames.clear(); + } + isEmpty() { + return !this.groupNames.size; + } + enterDisjunction() { + this.branchID = this.branchID.child(); + } + enterAlternative(index) { + if (index === 0) { + return; + } + this.branchID = this.branchID.sibling(); + } + leaveDisjunction() { + this.branchID = this.branchID.parent; + } + hasInPattern(name) { + return this.groupNames.has(name); + } + hasInScope(name) { + const branches = this.groupNames.get(name); + if (!branches) { + return false; + } + for (const branch of branches) { + if (!branch.separatedFrom(this.branchID)) { + return true; + } + } + return false; + } + addToScope(name) { + const branches = this.groupNames.get(name); + if (branches) { + branches.push(this.branchID); + return; + } + this.groupNames.set(name, [this.branchID]); + } +} + +const legacyImpl = { + at(s, end, i) { + return i < end ? s.charCodeAt(i) : -1; + }, + width(c) { + return 1; + }, +}; +const unicodeImpl = { + at(s, end, i) { + return i < end ? s.codePointAt(i) : -1; + }, + width(c) { + return c > 0xffff ? 2 : 1; + }, +}; +class Reader { + constructor() { + this._impl = legacyImpl; + this._s = ""; + this._i = 0; + this._end = 0; + this._cp1 = -1; + this._w1 = 1; + this._cp2 = -1; + this._w2 = 1; + this._cp3 = -1; + this._w3 = 1; + this._cp4 = -1; + } + get source() { + return this._s; + } + get index() { + return this._i; + } + get currentCodePoint() { + return this._cp1; + } + get nextCodePoint() { + return this._cp2; + } + get nextCodePoint2() { + return this._cp3; + } + get nextCodePoint3() { + return this._cp4; + } + reset(source, start, end, uFlag) { + this._impl = uFlag ? unicodeImpl : legacyImpl; + this._s = source; + this._end = end; + this.rewind(start); + } + rewind(index) { + const impl = this._impl; + this._i = index; + this._cp1 = impl.at(this._s, this._end, index); + this._w1 = impl.width(this._cp1); + this._cp2 = impl.at(this._s, this._end, index + this._w1); + this._w2 = impl.width(this._cp2); + this._cp3 = impl.at(this._s, this._end, index + this._w1 + this._w2); + this._w3 = impl.width(this._cp3); + this._cp4 = impl.at(this._s, this._end, index + this._w1 + this._w2 + this._w3); + } + advance() { + if (this._cp1 !== -1) { + const impl = this._impl; + this._i += this._w1; + this._cp1 = this._cp2; + this._w1 = this._w2; + this._cp2 = this._cp3; + this._w2 = impl.width(this._cp2); + this._cp3 = this._cp4; + this._w3 = impl.width(this._cp3); + this._cp4 = impl.at(this._s, this._end, this._i + this._w1 + this._w2 + this._w3); + } + } + eat(cp) { + if (this._cp1 === cp) { + this.advance(); + return true; + } + return false; + } + eat2(cp1, cp2) { + if (this._cp1 === cp1 && this._cp2 === cp2) { + this.advance(); + this.advance(); + return true; + } + return false; + } + eat3(cp1, cp2, cp3) { + if (this._cp1 === cp1 && this._cp2 === cp2 && this._cp3 === cp3) { + this.advance(); + this.advance(); + this.advance(); + return true; + } + return false; + } +} + +class RegExpSyntaxError extends SyntaxError { + constructor(message, index) { + super(message); + this.index = index; + } +} +function newRegExpSyntaxError(srcCtx, flags, index, message) { + let source = ""; + if (srcCtx.kind === "literal") { + const literal = srcCtx.source.slice(srcCtx.start, srcCtx.end); + if (literal) { + source = `: ${literal}`; + } + } + else if (srcCtx.kind === "pattern") { + const pattern = srcCtx.source.slice(srcCtx.start, srcCtx.end); + const flagsText = `${flags.unicode ? "u" : ""}${flags.unicodeSets ? "v" : ""}`; + source = `: /${pattern}/${flagsText}`; + } + return new RegExpSyntaxError(`Invalid regular expression${source}: ${message}`, index); +} + +const SYNTAX_CHARACTER = new Set([ + CIRCUMFLEX_ACCENT, + DOLLAR_SIGN, + REVERSE_SOLIDUS, + FULL_STOP, + ASTERISK, + PLUS_SIGN, + QUESTION_MARK, + LEFT_PARENTHESIS, + RIGHT_PARENTHESIS, + LEFT_SQUARE_BRACKET, + RIGHT_SQUARE_BRACKET, + LEFT_CURLY_BRACKET, + RIGHT_CURLY_BRACKET, + VERTICAL_LINE, +]); +const CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER = new Set([ + AMPERSAND, + EXCLAMATION_MARK, + NUMBER_SIGN, + DOLLAR_SIGN, + PERCENT_SIGN, + ASTERISK, + PLUS_SIGN, + COMMA, + FULL_STOP, + COLON, + SEMICOLON, + LESS_THAN_SIGN, + EQUALS_SIGN, + GREATER_THAN_SIGN, + QUESTION_MARK, + COMMERCIAL_AT, + CIRCUMFLEX_ACCENT, + GRAVE_ACCENT, + TILDE, +]); +const CLASS_SET_SYNTAX_CHARACTER = new Set([ + LEFT_PARENTHESIS, + RIGHT_PARENTHESIS, + LEFT_SQUARE_BRACKET, + RIGHT_SQUARE_BRACKET, + LEFT_CURLY_BRACKET, + RIGHT_CURLY_BRACKET, + SOLIDUS, + HYPHEN_MINUS, + REVERSE_SOLIDUS, + VERTICAL_LINE, +]); +const CLASS_SET_RESERVED_PUNCTUATOR = new Set([ + AMPERSAND, + HYPHEN_MINUS, + EXCLAMATION_MARK, + NUMBER_SIGN, + PERCENT_SIGN, + COMMA, + COLON, + SEMICOLON, + LESS_THAN_SIGN, + EQUALS_SIGN, + GREATER_THAN_SIGN, + COMMERCIAL_AT, + GRAVE_ACCENT, + TILDE, +]); +const FLAG_PROP_TO_CODEPOINT = { + global: LATIN_SMALL_LETTER_G, + ignoreCase: LATIN_SMALL_LETTER_I, + multiline: LATIN_SMALL_LETTER_M, + unicode: LATIN_SMALL_LETTER_U, + sticky: LATIN_SMALL_LETTER_Y, + dotAll: LATIN_SMALL_LETTER_S, + hasIndices: LATIN_SMALL_LETTER_D, + unicodeSets: LATIN_SMALL_LETTER_V, +}; +const FLAG_CODEPOINT_TO_PROP = Object.fromEntries(Object.entries(FLAG_PROP_TO_CODEPOINT).map(([k, v]) => [v, k])); +function isSyntaxCharacter(cp) { + return SYNTAX_CHARACTER.has(cp); +} +function isClassSetReservedDoublePunctuatorCharacter(cp) { + return CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER.has(cp); +} +function isClassSetSyntaxCharacter(cp) { + return CLASS_SET_SYNTAX_CHARACTER.has(cp); +} +function isClassSetReservedPunctuator(cp) { + return CLASS_SET_RESERVED_PUNCTUATOR.has(cp); +} +function isIdentifierStartChar(cp) { + return isIdStart(cp) || cp === DOLLAR_SIGN || cp === LOW_LINE; +} +function isIdentifierPartChar(cp) { + return (isIdContinue(cp) || + cp === DOLLAR_SIGN || + cp === ZERO_WIDTH_NON_JOINER || + cp === ZERO_WIDTH_JOINER); +} +function isUnicodePropertyNameCharacter(cp) { + return isLatinLetter(cp) || cp === LOW_LINE; +} +function isUnicodePropertyValueCharacter(cp) { + return isUnicodePropertyNameCharacter(cp) || isDecimalDigit(cp); +} +function isRegularExpressionModifier(ch) { + return (ch === LATIN_SMALL_LETTER_I || + ch === LATIN_SMALL_LETTER_M || + ch === LATIN_SMALL_LETTER_S); +} +class RegExpValidator { + constructor(options) { + this._reader = new Reader(); + this._unicodeMode = false; + this._unicodeSetsMode = false; + this._nFlag = false; + this._lastIntValue = 0; + this._lastRange = { + min: 0, + max: Number.POSITIVE_INFINITY, + }; + this._lastStrValue = ""; + this._lastAssertionIsQuantifiable = false; + this._numCapturingParens = 0; + this._backreferenceNames = new Set(); + this._srcCtx = null; + this._options = options !== null && options !== void 0 ? options : {}; + this._groupSpecifiers = + this.ecmaVersion >= 2025 + ? new GroupSpecifiersAsES2025() + : new GroupSpecifiersAsES2018(); + } + validateLiteral(source, start = 0, end = source.length) { + this._srcCtx = { source, start, end, kind: "literal" }; + this._unicodeSetsMode = this._unicodeMode = this._nFlag = false; + this.reset(source, start, end); + this.onLiteralEnter(start); + if (this.eat(SOLIDUS) && this.eatRegExpBody() && this.eat(SOLIDUS)) { + const flagStart = this.index; + const unicode = source.includes("u", flagStart); + const unicodeSets = source.includes("v", flagStart); + this.validateFlagsInternal(source, flagStart, end); + this.validatePatternInternal(source, start + 1, flagStart - 1, { + unicode, + unicodeSets, + }); + } + else if (start >= end) { + this.raise("Empty"); + } + else { + const c = String.fromCodePoint(this.currentCodePoint); + this.raise(`Unexpected character '${c}'`); + } + this.onLiteralLeave(start, end); + } + validateFlags(source, start = 0, end = source.length) { + this._srcCtx = { source, start, end, kind: "flags" }; + this.validateFlagsInternal(source, start, end); + } + validatePattern(source, start = 0, end = source.length, uFlagOrFlags = undefined) { + this._srcCtx = { source, start, end, kind: "pattern" }; + this.validatePatternInternal(source, start, end, uFlagOrFlags); + } + validatePatternInternal(source, start = 0, end = source.length, uFlagOrFlags = undefined) { + const mode = this._parseFlagsOptionToMode(uFlagOrFlags, end); + this._unicodeMode = mode.unicodeMode; + this._nFlag = mode.nFlag; + this._unicodeSetsMode = mode.unicodeSetsMode; + this.reset(source, start, end); + this.consumePattern(); + if (!this._nFlag && + this.ecmaVersion >= 2018 && + !this._groupSpecifiers.isEmpty()) { + this._nFlag = true; + this.rewind(start); + this.consumePattern(); + } + } + validateFlagsInternal(source, start, end) { + const flags = this.parseFlags(source, start, end); + this.onRegExpFlags(start, end, flags); + } + _parseFlagsOptionToMode(uFlagOrFlags, sourceEnd) { + let unicode = false; + let unicodeSets = false; + if (uFlagOrFlags && this.ecmaVersion >= 2015) { + if (typeof uFlagOrFlags === "object") { + unicode = Boolean(uFlagOrFlags.unicode); + if (this.ecmaVersion >= 2024) { + unicodeSets = Boolean(uFlagOrFlags.unicodeSets); + } + } + else { + unicode = uFlagOrFlags; + } + } + if (unicode && unicodeSets) { + this.raise("Invalid regular expression flags", { + index: sourceEnd + 1, + unicode, + unicodeSets, + }); + } + const unicodeMode = unicode || unicodeSets; + const nFlag = (unicode && this.ecmaVersion >= 2018) || + unicodeSets || + Boolean(this._options.strict && this.ecmaVersion >= 2023); + const unicodeSetsMode = unicodeSets; + return { unicodeMode, nFlag, unicodeSetsMode }; + } + get strict() { + return Boolean(this._options.strict) || this._unicodeMode; + } + get ecmaVersion() { + var _a; + return (_a = this._options.ecmaVersion) !== null && _a !== void 0 ? _a : latestEcmaVersion; + } + onLiteralEnter(start) { + if (this._options.onLiteralEnter) { + this._options.onLiteralEnter(start); + } + } + onLiteralLeave(start, end) { + if (this._options.onLiteralLeave) { + this._options.onLiteralLeave(start, end); + } + } + onRegExpFlags(start, end, flags) { + if (this._options.onRegExpFlags) { + this._options.onRegExpFlags(start, end, flags); + } + if (this._options.onFlags) { + this._options.onFlags(start, end, flags.global, flags.ignoreCase, flags.multiline, flags.unicode, flags.sticky, flags.dotAll, flags.hasIndices); + } + } + onPatternEnter(start) { + if (this._options.onPatternEnter) { + this._options.onPatternEnter(start); + } + } + onPatternLeave(start, end) { + if (this._options.onPatternLeave) { + this._options.onPatternLeave(start, end); + } + } + onDisjunctionEnter(start) { + if (this._options.onDisjunctionEnter) { + this._options.onDisjunctionEnter(start); + } + } + onDisjunctionLeave(start, end) { + if (this._options.onDisjunctionLeave) { + this._options.onDisjunctionLeave(start, end); + } + } + onAlternativeEnter(start, index) { + if (this._options.onAlternativeEnter) { + this._options.onAlternativeEnter(start, index); + } + } + onAlternativeLeave(start, end, index) { + if (this._options.onAlternativeLeave) { + this._options.onAlternativeLeave(start, end, index); + } + } + onGroupEnter(start) { + if (this._options.onGroupEnter) { + this._options.onGroupEnter(start); + } + } + onGroupLeave(start, end) { + if (this._options.onGroupLeave) { + this._options.onGroupLeave(start, end); + } + } + onModifiersEnter(start) { + if (this._options.onModifiersEnter) { + this._options.onModifiersEnter(start); + } + } + onModifiersLeave(start, end) { + if (this._options.onModifiersLeave) { + this._options.onModifiersLeave(start, end); + } + } + onAddModifiers(start, end, flags) { + if (this._options.onAddModifiers) { + this._options.onAddModifiers(start, end, flags); + } + } + onRemoveModifiers(start, end, flags) { + if (this._options.onRemoveModifiers) { + this._options.onRemoveModifiers(start, end, flags); + } + } + onCapturingGroupEnter(start, name) { + if (this._options.onCapturingGroupEnter) { + this._options.onCapturingGroupEnter(start, name); + } + } + onCapturingGroupLeave(start, end, name) { + if (this._options.onCapturingGroupLeave) { + this._options.onCapturingGroupLeave(start, end, name); + } + } + onQuantifier(start, end, min, max, greedy) { + if (this._options.onQuantifier) { + this._options.onQuantifier(start, end, min, max, greedy); + } + } + onLookaroundAssertionEnter(start, kind, negate) { + if (this._options.onLookaroundAssertionEnter) { + this._options.onLookaroundAssertionEnter(start, kind, negate); + } + } + onLookaroundAssertionLeave(start, end, kind, negate) { + if (this._options.onLookaroundAssertionLeave) { + this._options.onLookaroundAssertionLeave(start, end, kind, negate); + } + } + onEdgeAssertion(start, end, kind) { + if (this._options.onEdgeAssertion) { + this._options.onEdgeAssertion(start, end, kind); + } + } + onWordBoundaryAssertion(start, end, kind, negate) { + if (this._options.onWordBoundaryAssertion) { + this._options.onWordBoundaryAssertion(start, end, kind, negate); + } + } + onAnyCharacterSet(start, end, kind) { + if (this._options.onAnyCharacterSet) { + this._options.onAnyCharacterSet(start, end, kind); + } + } + onEscapeCharacterSet(start, end, kind, negate) { + if (this._options.onEscapeCharacterSet) { + this._options.onEscapeCharacterSet(start, end, kind, negate); + } + } + onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings) { + if (this._options.onUnicodePropertyCharacterSet) { + this._options.onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings); + } + } + onCharacter(start, end, value) { + if (this._options.onCharacter) { + this._options.onCharacter(start, end, value); + } + } + onBackreference(start, end, ref) { + if (this._options.onBackreference) { + this._options.onBackreference(start, end, ref); + } + } + onCharacterClassEnter(start, negate, unicodeSets) { + if (this._options.onCharacterClassEnter) { + this._options.onCharacterClassEnter(start, negate, unicodeSets); + } + } + onCharacterClassLeave(start, end, negate) { + if (this._options.onCharacterClassLeave) { + this._options.onCharacterClassLeave(start, end, negate); + } + } + onCharacterClassRange(start, end, min, max) { + if (this._options.onCharacterClassRange) { + this._options.onCharacterClassRange(start, end, min, max); + } + } + onClassIntersection(start, end) { + if (this._options.onClassIntersection) { + this._options.onClassIntersection(start, end); + } + } + onClassSubtraction(start, end) { + if (this._options.onClassSubtraction) { + this._options.onClassSubtraction(start, end); + } + } + onClassStringDisjunctionEnter(start) { + if (this._options.onClassStringDisjunctionEnter) { + this._options.onClassStringDisjunctionEnter(start); + } + } + onClassStringDisjunctionLeave(start, end) { + if (this._options.onClassStringDisjunctionLeave) { + this._options.onClassStringDisjunctionLeave(start, end); + } + } + onStringAlternativeEnter(start, index) { + if (this._options.onStringAlternativeEnter) { + this._options.onStringAlternativeEnter(start, index); + } + } + onStringAlternativeLeave(start, end, index) { + if (this._options.onStringAlternativeLeave) { + this._options.onStringAlternativeLeave(start, end, index); + } + } + get index() { + return this._reader.index; + } + get currentCodePoint() { + return this._reader.currentCodePoint; + } + get nextCodePoint() { + return this._reader.nextCodePoint; + } + get nextCodePoint2() { + return this._reader.nextCodePoint2; + } + get nextCodePoint3() { + return this._reader.nextCodePoint3; + } + reset(source, start, end) { + this._reader.reset(source, start, end, this._unicodeMode); + } + rewind(index) { + this._reader.rewind(index); + } + advance() { + this._reader.advance(); + } + eat(cp) { + return this._reader.eat(cp); + } + eat2(cp1, cp2) { + return this._reader.eat2(cp1, cp2); + } + eat3(cp1, cp2, cp3) { + return this._reader.eat3(cp1, cp2, cp3); + } + raise(message, context) { + var _a, _b, _c; + throw newRegExpSyntaxError(this._srcCtx, { + unicode: (_a = context === null || context === void 0 ? void 0 : context.unicode) !== null && _a !== void 0 ? _a : (this._unicodeMode && !this._unicodeSetsMode), + unicodeSets: (_b = context === null || context === void 0 ? void 0 : context.unicodeSets) !== null && _b !== void 0 ? _b : this._unicodeSetsMode, + }, (_c = context === null || context === void 0 ? void 0 : context.index) !== null && _c !== void 0 ? _c : this.index, message); + } + eatRegExpBody() { + const start = this.index; + let inClass = false; + let escaped = false; + for (;;) { + const cp = this.currentCodePoint; + if (cp === -1 || isLineTerminator(cp)) { + const kind = inClass ? "character class" : "regular expression"; + this.raise(`Unterminated ${kind}`); + } + if (escaped) { + escaped = false; + } + else if (cp === REVERSE_SOLIDUS) { + escaped = true; + } + else if (cp === LEFT_SQUARE_BRACKET) { + inClass = true; + } + else if (cp === RIGHT_SQUARE_BRACKET) { + inClass = false; + } + else if ((cp === SOLIDUS && !inClass) || + (cp === ASTERISK && this.index === start)) { + break; + } + this.advance(); + } + return this.index !== start; + } + consumePattern() { + const start = this.index; + this._numCapturingParens = this.countCapturingParens(); + this._groupSpecifiers.clear(); + this._backreferenceNames.clear(); + this.onPatternEnter(start); + this.consumeDisjunction(); + const cp = this.currentCodePoint; + if (this.currentCodePoint !== -1) { + if (cp === RIGHT_PARENTHESIS) { + this.raise("Unmatched ')'"); + } + if (cp === REVERSE_SOLIDUS) { + this.raise("\\ at end of pattern"); + } + if (cp === RIGHT_SQUARE_BRACKET || cp === RIGHT_CURLY_BRACKET) { + this.raise("Lone quantifier brackets"); + } + const c = String.fromCodePoint(cp); + this.raise(`Unexpected character '${c}'`); + } + for (const name of this._backreferenceNames) { + if (!this._groupSpecifiers.hasInPattern(name)) { + this.raise("Invalid named capture referenced"); + } + } + this.onPatternLeave(start, this.index); + } + countCapturingParens() { + const start = this.index; + let inClass = false; + let escaped = false; + let count = 0; + let cp = 0; + while ((cp = this.currentCodePoint) !== -1) { + if (escaped) { + escaped = false; + } + else if (cp === REVERSE_SOLIDUS) { + escaped = true; + } + else if (cp === LEFT_SQUARE_BRACKET) { + inClass = true; + } + else if (cp === RIGHT_SQUARE_BRACKET) { + inClass = false; + } + else if (cp === LEFT_PARENTHESIS && + !inClass && + (this.nextCodePoint !== QUESTION_MARK || + (this.nextCodePoint2 === LESS_THAN_SIGN && + this.nextCodePoint3 !== EQUALS_SIGN && + this.nextCodePoint3 !== EXCLAMATION_MARK))) { + count += 1; + } + this.advance(); + } + this.rewind(start); + return count; + } + consumeDisjunction() { + const start = this.index; + let i = 0; + this._groupSpecifiers.enterDisjunction(); + this.onDisjunctionEnter(start); + do { + this.consumeAlternative(i++); + } while (this.eat(VERTICAL_LINE)); + if (this.consumeQuantifier(true)) { + this.raise("Nothing to repeat"); + } + if (this.eat(LEFT_CURLY_BRACKET)) { + this.raise("Lone quantifier brackets"); + } + this.onDisjunctionLeave(start, this.index); + this._groupSpecifiers.leaveDisjunction(); + } + consumeAlternative(i) { + const start = this.index; + this._groupSpecifiers.enterAlternative(i); + this.onAlternativeEnter(start, i); + while (this.currentCodePoint !== -1 && this.consumeTerm()) { + } + this.onAlternativeLeave(start, this.index, i); + } + consumeTerm() { + if (this._unicodeMode || this.strict) { + return (this.consumeAssertion() || + (this.consumeAtom() && this.consumeOptionalQuantifier())); + } + return ((this.consumeAssertion() && + (!this._lastAssertionIsQuantifiable || + this.consumeOptionalQuantifier())) || + (this.consumeExtendedAtom() && this.consumeOptionalQuantifier())); + } + consumeOptionalQuantifier() { + this.consumeQuantifier(); + return true; + } + consumeAssertion() { + const start = this.index; + this._lastAssertionIsQuantifiable = false; + if (this.eat(CIRCUMFLEX_ACCENT)) { + this.onEdgeAssertion(start, this.index, "start"); + return true; + } + if (this.eat(DOLLAR_SIGN)) { + this.onEdgeAssertion(start, this.index, "end"); + return true; + } + if (this.eat2(REVERSE_SOLIDUS, LATIN_CAPITAL_LETTER_B)) { + this.onWordBoundaryAssertion(start, this.index, "word", true); + return true; + } + if (this.eat2(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_B)) { + this.onWordBoundaryAssertion(start, this.index, "word", false); + return true; + } + if (this.eat2(LEFT_PARENTHESIS, QUESTION_MARK)) { + const lookbehind = this.ecmaVersion >= 2018 && this.eat(LESS_THAN_SIGN); + let negate = false; + if (this.eat(EQUALS_SIGN) || + (negate = this.eat(EXCLAMATION_MARK))) { + const kind = lookbehind ? "lookbehind" : "lookahead"; + this.onLookaroundAssertionEnter(start, kind, negate); + this.consumeDisjunction(); + if (!this.eat(RIGHT_PARENTHESIS)) { + this.raise("Unterminated group"); + } + this._lastAssertionIsQuantifiable = !lookbehind && !this.strict; + this.onLookaroundAssertionLeave(start, this.index, kind, negate); + return true; + } + this.rewind(start); + } + return false; + } + consumeQuantifier(noConsume = false) { + const start = this.index; + let min = 0; + let max = 0; + let greedy = false; + if (this.eat(ASTERISK)) { + min = 0; + max = Number.POSITIVE_INFINITY; + } + else if (this.eat(PLUS_SIGN)) { + min = 1; + max = Number.POSITIVE_INFINITY; + } + else if (this.eat(QUESTION_MARK)) { + min = 0; + max = 1; + } + else if (this.eatBracedQuantifier(noConsume)) { + ({ min, max } = this._lastRange); + } + else { + return false; + } + greedy = !this.eat(QUESTION_MARK); + if (!noConsume) { + this.onQuantifier(start, this.index, min, max, greedy); + } + return true; + } + eatBracedQuantifier(noError) { + const start = this.index; + if (this.eat(LEFT_CURLY_BRACKET)) { + if (this.eatDecimalDigits()) { + const min = this._lastIntValue; + let max = min; + if (this.eat(COMMA)) { + max = this.eatDecimalDigits() + ? this._lastIntValue + : Number.POSITIVE_INFINITY; + } + if (this.eat(RIGHT_CURLY_BRACKET)) { + if (!noError && max < min) { + this.raise("numbers out of order in {} quantifier"); + } + this._lastRange = { min, max }; + return true; + } + } + if (!noError && (this._unicodeMode || this.strict)) { + this.raise("Incomplete quantifier"); + } + this.rewind(start); + } + return false; + } + consumeAtom() { + return (this.consumePatternCharacter() || + this.consumeDot() || + this.consumeReverseSolidusAtomEscape() || + Boolean(this.consumeCharacterClass()) || + this.consumeCapturingGroup() || + this.consumeUncapturingGroup()); + } + consumeDot() { + if (this.eat(FULL_STOP)) { + this.onAnyCharacterSet(this.index - 1, this.index, "any"); + return true; + } + return false; + } + consumeReverseSolidusAtomEscape() { + const start = this.index; + if (this.eat(REVERSE_SOLIDUS)) { + if (this.consumeAtomEscape()) { + return true; + } + this.rewind(start); + } + return false; + } + consumeUncapturingGroup() { + const start = this.index; + if (this.eat2(LEFT_PARENTHESIS, QUESTION_MARK)) { + this.onGroupEnter(start); + if (this.ecmaVersion >= 2025) { + this.consumeModifiers(); + } + if (!this.eat(COLON)) { + this.rewind(start + 1); + this.raise("Invalid group"); + } + this.consumeDisjunction(); + if (!this.eat(RIGHT_PARENTHESIS)) { + this.raise("Unterminated group"); + } + this.onGroupLeave(start, this.index); + return true; + } + return false; + } + consumeModifiers() { + const start = this.index; + const hasAddModifiers = this.eatModifiers(); + const addModifiersEnd = this.index; + const hasHyphen = this.eat(HYPHEN_MINUS); + if (!hasAddModifiers && !hasHyphen) { + return false; + } + this.onModifiersEnter(start); + const addModifiers = this.parseModifiers(start, addModifiersEnd); + this.onAddModifiers(start, addModifiersEnd, addModifiers); + if (hasHyphen) { + const modifiersStart = this.index; + if (!this.eatModifiers() && + !hasAddModifiers && + this.currentCodePoint === COLON) { + this.raise("Invalid empty flags"); + } + const modifiers = this.parseModifiers(modifiersStart, this.index); + for (const [flagName] of Object.entries(modifiers).filter(([, enable]) => enable)) { + if (addModifiers[flagName]) { + this.raise(`Duplicated flag '${String.fromCodePoint(FLAG_PROP_TO_CODEPOINT[flagName])}'`); + } + } + this.onRemoveModifiers(modifiersStart, this.index, modifiers); + } + this.onModifiersLeave(start, this.index); + return true; + } + consumeCapturingGroup() { + const start = this.index; + if (this.eat(LEFT_PARENTHESIS)) { + let name = null; + if (this.ecmaVersion >= 2018) { + if (this.consumeGroupSpecifier()) { + name = this._lastStrValue; + } + else if (this.currentCodePoint === QUESTION_MARK) { + this.rewind(start); + return false; + } + } + else if (this.currentCodePoint === QUESTION_MARK) { + this.rewind(start); + return false; + } + this.onCapturingGroupEnter(start, name); + this.consumeDisjunction(); + if (!this.eat(RIGHT_PARENTHESIS)) { + this.raise("Unterminated group"); + } + this.onCapturingGroupLeave(start, this.index, name); + return true; + } + return false; + } + consumeExtendedAtom() { + return (this.consumeDot() || + this.consumeReverseSolidusAtomEscape() || + this.consumeReverseSolidusFollowedByC() || + Boolean(this.consumeCharacterClass()) || + this.consumeCapturingGroup() || + this.consumeUncapturingGroup() || + this.consumeInvalidBracedQuantifier() || + this.consumeExtendedPatternCharacter()); + } + consumeReverseSolidusFollowedByC() { + const start = this.index; + if (this.currentCodePoint === REVERSE_SOLIDUS && + this.nextCodePoint === LATIN_SMALL_LETTER_C) { + this._lastIntValue = this.currentCodePoint; + this.advance(); + this.onCharacter(start, this.index, REVERSE_SOLIDUS); + return true; + } + return false; + } + consumeInvalidBracedQuantifier() { + if (this.eatBracedQuantifier(true)) { + this.raise("Nothing to repeat"); + } + return false; + } + consumePatternCharacter() { + const start = this.index; + const cp = this.currentCodePoint; + if (cp !== -1 && !isSyntaxCharacter(cp)) { + this.advance(); + this.onCharacter(start, this.index, cp); + return true; + } + return false; + } + consumeExtendedPatternCharacter() { + const start = this.index; + const cp = this.currentCodePoint; + if (cp !== -1 && + cp !== CIRCUMFLEX_ACCENT && + cp !== DOLLAR_SIGN && + cp !== REVERSE_SOLIDUS && + cp !== FULL_STOP && + cp !== ASTERISK && + cp !== PLUS_SIGN && + cp !== QUESTION_MARK && + cp !== LEFT_PARENTHESIS && + cp !== RIGHT_PARENTHESIS && + cp !== LEFT_SQUARE_BRACKET && + cp !== VERTICAL_LINE) { + this.advance(); + this.onCharacter(start, this.index, cp); + return true; + } + return false; + } + consumeGroupSpecifier() { + const start = this.index; + if (this.eat(QUESTION_MARK)) { + if (this.eatGroupName()) { + if (!this._groupSpecifiers.hasInScope(this._lastStrValue)) { + this._groupSpecifiers.addToScope(this._lastStrValue); + return true; + } + this.raise("Duplicate capture group name"); + } + this.rewind(start); + } + return false; + } + consumeAtomEscape() { + if (this.consumeBackreference() || + this.consumeCharacterClassEscape() || + this.consumeCharacterEscape() || + (this._nFlag && this.consumeKGroupName())) { + return true; + } + if (this.strict || this._unicodeMode) { + this.raise("Invalid escape"); + } + return false; + } + consumeBackreference() { + const start = this.index; + if (this.eatDecimalEscape()) { + const n = this._lastIntValue; + if (n <= this._numCapturingParens) { + this.onBackreference(start - 1, this.index, n); + return true; + } + if (this.strict || this._unicodeMode) { + this.raise("Invalid escape"); + } + this.rewind(start); + } + return false; + } + consumeCharacterClassEscape() { + var _a; + const start = this.index; + if (this.eat(LATIN_SMALL_LETTER_D)) { + this._lastIntValue = -1; + this.onEscapeCharacterSet(start - 1, this.index, "digit", false); + return {}; + } + if (this.eat(LATIN_CAPITAL_LETTER_D)) { + this._lastIntValue = -1; + this.onEscapeCharacterSet(start - 1, this.index, "digit", true); + return {}; + } + if (this.eat(LATIN_SMALL_LETTER_S)) { + this._lastIntValue = -1; + this.onEscapeCharacterSet(start - 1, this.index, "space", false); + return {}; + } + if (this.eat(LATIN_CAPITAL_LETTER_S)) { + this._lastIntValue = -1; + this.onEscapeCharacterSet(start - 1, this.index, "space", true); + return {}; + } + if (this.eat(LATIN_SMALL_LETTER_W)) { + this._lastIntValue = -1; + this.onEscapeCharacterSet(start - 1, this.index, "word", false); + return {}; + } + if (this.eat(LATIN_CAPITAL_LETTER_W)) { + this._lastIntValue = -1; + this.onEscapeCharacterSet(start - 1, this.index, "word", true); + return {}; + } + let negate = false; + if (this._unicodeMode && + this.ecmaVersion >= 2018 && + (this.eat(LATIN_SMALL_LETTER_P) || + (negate = this.eat(LATIN_CAPITAL_LETTER_P)))) { + this._lastIntValue = -1; + let result = null; + if (this.eat(LEFT_CURLY_BRACKET) && + (result = this.eatUnicodePropertyValueExpression()) && + this.eat(RIGHT_CURLY_BRACKET)) { + if (negate && result.strings) { + this.raise("Invalid property name"); + } + this.onUnicodePropertyCharacterSet(start - 1, this.index, "property", result.key, result.value, negate, (_a = result.strings) !== null && _a !== void 0 ? _a : false); + return { mayContainStrings: result.strings }; + } + this.raise("Invalid property name"); + } + return null; + } + consumeCharacterEscape() { + const start = this.index; + if (this.eatControlEscape() || + this.eatCControlLetter() || + this.eatZero() || + this.eatHexEscapeSequence() || + this.eatRegExpUnicodeEscapeSequence() || + (!this.strict && + !this._unicodeMode && + this.eatLegacyOctalEscapeSequence()) || + this.eatIdentityEscape()) { + this.onCharacter(start - 1, this.index, this._lastIntValue); + return true; + } + return false; + } + consumeKGroupName() { + const start = this.index; + if (this.eat(LATIN_SMALL_LETTER_K)) { + if (this.eatGroupName()) { + const groupName = this._lastStrValue; + this._backreferenceNames.add(groupName); + this.onBackreference(start - 1, this.index, groupName); + return true; + } + this.raise("Invalid named reference"); + } + return false; + } + consumeCharacterClass() { + const start = this.index; + if (this.eat(LEFT_SQUARE_BRACKET)) { + const negate = this.eat(CIRCUMFLEX_ACCENT); + this.onCharacterClassEnter(start, negate, this._unicodeSetsMode); + const result = this.consumeClassContents(); + if (!this.eat(RIGHT_SQUARE_BRACKET)) { + if (this.currentCodePoint === -1) { + this.raise("Unterminated character class"); + } + this.raise("Invalid character in character class"); + } + if (negate && result.mayContainStrings) { + this.raise("Negated character class may contain strings"); + } + this.onCharacterClassLeave(start, this.index, negate); + return result; + } + return null; + } + consumeClassContents() { + if (this._unicodeSetsMode) { + if (this.currentCodePoint === RIGHT_SQUARE_BRACKET) { + return {}; + } + const result = this.consumeClassSetExpression(); + return result; + } + const strict = this.strict || this._unicodeMode; + for (;;) { + const rangeStart = this.index; + if (!this.consumeClassAtom()) { + break; + } + const min = this._lastIntValue; + if (!this.eat(HYPHEN_MINUS)) { + continue; + } + this.onCharacter(this.index - 1, this.index, HYPHEN_MINUS); + if (!this.consumeClassAtom()) { + break; + } + const max = this._lastIntValue; + if (min === -1 || max === -1) { + if (strict) { + this.raise("Invalid character class"); + } + continue; + } + if (min > max) { + this.raise("Range out of order in character class"); + } + this.onCharacterClassRange(rangeStart, this.index, min, max); + } + return {}; + } + consumeClassAtom() { + const start = this.index; + const cp = this.currentCodePoint; + if (cp !== -1 && + cp !== REVERSE_SOLIDUS && + cp !== RIGHT_SQUARE_BRACKET) { + this.advance(); + this._lastIntValue = cp; + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + if (this.eat(REVERSE_SOLIDUS)) { + if (this.consumeClassEscape()) { + return true; + } + if (!this.strict && + this.currentCodePoint === LATIN_SMALL_LETTER_C) { + this._lastIntValue = REVERSE_SOLIDUS; + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + if (this.strict || this._unicodeMode) { + this.raise("Invalid escape"); + } + this.rewind(start); + } + return false; + } + consumeClassEscape() { + const start = this.index; + if (this.eat(LATIN_SMALL_LETTER_B)) { + this._lastIntValue = BACKSPACE; + this.onCharacter(start - 1, this.index, this._lastIntValue); + return true; + } + if (this._unicodeMode && this.eat(HYPHEN_MINUS)) { + this._lastIntValue = HYPHEN_MINUS; + this.onCharacter(start - 1, this.index, this._lastIntValue); + return true; + } + let cp = 0; + if (!this.strict && + !this._unicodeMode && + this.currentCodePoint === LATIN_SMALL_LETTER_C && + (isDecimalDigit((cp = this.nextCodePoint)) || cp === LOW_LINE)) { + this.advance(); + this.advance(); + this._lastIntValue = cp % 0x20; + this.onCharacter(start - 1, this.index, this._lastIntValue); + return true; + } + return (Boolean(this.consumeCharacterClassEscape()) || + this.consumeCharacterEscape()); + } + consumeClassSetExpression() { + const start = this.index; + let mayContainStrings = false; + let result = null; + if (this.consumeClassSetCharacter()) { + if (this.consumeClassSetRangeFromOperator(start)) { + this.consumeClassUnionRight({}); + return {}; + } + mayContainStrings = false; + } + else if ((result = this.consumeClassSetOperand())) { + mayContainStrings = result.mayContainStrings; + } + else { + const cp = this.currentCodePoint; + if (cp === REVERSE_SOLIDUS) { + this.advance(); + this.raise("Invalid escape"); + } + if (cp === this.nextCodePoint && + isClassSetReservedDoublePunctuatorCharacter(cp)) { + this.raise("Invalid set operation in character class"); + } + this.raise("Invalid character in character class"); + } + if (this.eat2(AMPERSAND, AMPERSAND)) { + while (this.currentCodePoint !== AMPERSAND && + (result = this.consumeClassSetOperand())) { + this.onClassIntersection(start, this.index); + if (!result.mayContainStrings) { + mayContainStrings = false; + } + if (this.eat2(AMPERSAND, AMPERSAND)) { + continue; + } + return { mayContainStrings }; + } + this.raise("Invalid character in character class"); + } + if (this.eat2(HYPHEN_MINUS, HYPHEN_MINUS)) { + while (this.consumeClassSetOperand()) { + this.onClassSubtraction(start, this.index); + if (this.eat2(HYPHEN_MINUS, HYPHEN_MINUS)) { + continue; + } + return { mayContainStrings }; + } + this.raise("Invalid character in character class"); + } + return this.consumeClassUnionRight({ mayContainStrings }); + } + consumeClassUnionRight(leftResult) { + let mayContainStrings = leftResult.mayContainStrings; + for (;;) { + const start = this.index; + if (this.consumeClassSetCharacter()) { + this.consumeClassSetRangeFromOperator(start); + continue; + } + const result = this.consumeClassSetOperand(); + if (result) { + if (result.mayContainStrings) { + mayContainStrings = true; + } + continue; + } + break; + } + return { mayContainStrings }; + } + consumeClassSetRangeFromOperator(start) { + const currentStart = this.index; + const min = this._lastIntValue; + if (this.eat(HYPHEN_MINUS)) { + if (this.consumeClassSetCharacter()) { + const max = this._lastIntValue; + if (min === -1 || max === -1) { + this.raise("Invalid character class"); + } + if (min > max) { + this.raise("Range out of order in character class"); + } + this.onCharacterClassRange(start, this.index, min, max); + return true; + } + this.rewind(currentStart); + } + return false; + } + consumeClassSetOperand() { + let result = null; + if ((result = this.consumeNestedClass())) { + return result; + } + if ((result = this.consumeClassStringDisjunction())) { + return result; + } + if (this.consumeClassSetCharacter()) { + return {}; + } + return null; + } + consumeNestedClass() { + const start = this.index; + if (this.eat(LEFT_SQUARE_BRACKET)) { + const negate = this.eat(CIRCUMFLEX_ACCENT); + this.onCharacterClassEnter(start, negate, true); + const result = this.consumeClassContents(); + if (!this.eat(RIGHT_SQUARE_BRACKET)) { + this.raise("Unterminated character class"); + } + if (negate && result.mayContainStrings) { + this.raise("Negated character class may contain strings"); + } + this.onCharacterClassLeave(start, this.index, negate); + return result; + } + if (this.eat(REVERSE_SOLIDUS)) { + const result = this.consumeCharacterClassEscape(); + if (result) { + return result; + } + this.rewind(start); + } + return null; + } + consumeClassStringDisjunction() { + const start = this.index; + if (this.eat3(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_Q, LEFT_CURLY_BRACKET)) { + this.onClassStringDisjunctionEnter(start); + let i = 0; + let mayContainStrings = false; + do { + if (this.consumeClassString(i++).mayContainStrings) { + mayContainStrings = true; + } + } while (this.eat(VERTICAL_LINE)); + if (this.eat(RIGHT_CURLY_BRACKET)) { + this.onClassStringDisjunctionLeave(start, this.index); + return { mayContainStrings }; + } + this.raise("Unterminated class string disjunction"); + } + return null; + } + consumeClassString(i) { + const start = this.index; + let count = 0; + this.onStringAlternativeEnter(start, i); + while (this.currentCodePoint !== -1 && + this.consumeClassSetCharacter()) { + count++; + } + this.onStringAlternativeLeave(start, this.index, i); + return { mayContainStrings: count !== 1 }; + } + consumeClassSetCharacter() { + const start = this.index; + const cp = this.currentCodePoint; + if (cp !== this.nextCodePoint || + !isClassSetReservedDoublePunctuatorCharacter(cp)) { + if (cp !== -1 && !isClassSetSyntaxCharacter(cp)) { + this._lastIntValue = cp; + this.advance(); + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + } + if (this.eat(REVERSE_SOLIDUS)) { + if (this.consumeCharacterEscape()) { + return true; + } + if (isClassSetReservedPunctuator(this.currentCodePoint)) { + this._lastIntValue = this.currentCodePoint; + this.advance(); + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + if (this.eat(LATIN_SMALL_LETTER_B)) { + this._lastIntValue = BACKSPACE; + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + this.rewind(start); + } + return false; + } + eatGroupName() { + if (this.eat(LESS_THAN_SIGN)) { + if (this.eatRegExpIdentifierName() && this.eat(GREATER_THAN_SIGN)) { + return true; + } + this.raise("Invalid capture group name"); + } + return false; + } + eatRegExpIdentifierName() { + if (this.eatRegExpIdentifierStart()) { + this._lastStrValue = String.fromCodePoint(this._lastIntValue); + while (this.eatRegExpIdentifierPart()) { + this._lastStrValue += String.fromCodePoint(this._lastIntValue); + } + return true; + } + return false; + } + eatRegExpIdentifierStart() { + const start = this.index; + const forceUFlag = !this._unicodeMode && this.ecmaVersion >= 2020; + let cp = this.currentCodePoint; + this.advance(); + if (cp === REVERSE_SOLIDUS && + this.eatRegExpUnicodeEscapeSequence(forceUFlag)) { + cp = this._lastIntValue; + } + else if (forceUFlag && + isLeadSurrogate(cp) && + isTrailSurrogate(this.currentCodePoint)) { + cp = combineSurrogatePair(cp, this.currentCodePoint); + this.advance(); + } + if (isIdentifierStartChar(cp)) { + this._lastIntValue = cp; + return true; + } + if (this.index !== start) { + this.rewind(start); + } + return false; + } + eatRegExpIdentifierPart() { + const start = this.index; + const forceUFlag = !this._unicodeMode && this.ecmaVersion >= 2020; + let cp = this.currentCodePoint; + this.advance(); + if (cp === REVERSE_SOLIDUS && + this.eatRegExpUnicodeEscapeSequence(forceUFlag)) { + cp = this._lastIntValue; + } + else if (forceUFlag && + isLeadSurrogate(cp) && + isTrailSurrogate(this.currentCodePoint)) { + cp = combineSurrogatePair(cp, this.currentCodePoint); + this.advance(); + } + if (isIdentifierPartChar(cp)) { + this._lastIntValue = cp; + return true; + } + if (this.index !== start) { + this.rewind(start); + } + return false; + } + eatCControlLetter() { + const start = this.index; + if (this.eat(LATIN_SMALL_LETTER_C)) { + if (this.eatControlLetter()) { + return true; + } + this.rewind(start); + } + return false; + } + eatZero() { + if (this.currentCodePoint === DIGIT_ZERO && + !isDecimalDigit(this.nextCodePoint)) { + this._lastIntValue = 0; + this.advance(); + return true; + } + return false; + } + eatControlEscape() { + if (this.eat(LATIN_SMALL_LETTER_F)) { + this._lastIntValue = FORM_FEED; + return true; + } + if (this.eat(LATIN_SMALL_LETTER_N)) { + this._lastIntValue = LINE_FEED; + return true; + } + if (this.eat(LATIN_SMALL_LETTER_R)) { + this._lastIntValue = CARRIAGE_RETURN; + return true; + } + if (this.eat(LATIN_SMALL_LETTER_T)) { + this._lastIntValue = CHARACTER_TABULATION; + return true; + } + if (this.eat(LATIN_SMALL_LETTER_V)) { + this._lastIntValue = LINE_TABULATION; + return true; + } + return false; + } + eatControlLetter() { + const cp = this.currentCodePoint; + if (isLatinLetter(cp)) { + this.advance(); + this._lastIntValue = cp % 0x20; + return true; + } + return false; + } + eatRegExpUnicodeEscapeSequence(forceUFlag = false) { + const start = this.index; + const uFlag = forceUFlag || this._unicodeMode; + if (this.eat(LATIN_SMALL_LETTER_U)) { + if ((uFlag && this.eatRegExpUnicodeSurrogatePairEscape()) || + this.eatFixedHexDigits(4) || + (uFlag && this.eatRegExpUnicodeCodePointEscape())) { + return true; + } + if (this.strict || uFlag) { + this.raise("Invalid unicode escape"); + } + this.rewind(start); + } + return false; + } + eatRegExpUnicodeSurrogatePairEscape() { + const start = this.index; + if (this.eatFixedHexDigits(4)) { + const lead = this._lastIntValue; + if (isLeadSurrogate(lead) && + this.eat(REVERSE_SOLIDUS) && + this.eat(LATIN_SMALL_LETTER_U) && + this.eatFixedHexDigits(4)) { + const trail = this._lastIntValue; + if (isTrailSurrogate(trail)) { + this._lastIntValue = combineSurrogatePair(lead, trail); + return true; + } + } + this.rewind(start); + } + return false; + } + eatRegExpUnicodeCodePointEscape() { + const start = this.index; + if (this.eat(LEFT_CURLY_BRACKET) && + this.eatHexDigits() && + this.eat(RIGHT_CURLY_BRACKET) && + isValidUnicode(this._lastIntValue)) { + return true; + } + this.rewind(start); + return false; + } + eatIdentityEscape() { + const cp = this.currentCodePoint; + if (this.isValidIdentityEscape(cp)) { + this._lastIntValue = cp; + this.advance(); + return true; + } + return false; + } + isValidIdentityEscape(cp) { + if (cp === -1) { + return false; + } + if (this._unicodeMode) { + return isSyntaxCharacter(cp) || cp === SOLIDUS; + } + if (this.strict) { + return !isIdContinue(cp); + } + if (this._nFlag) { + return !(cp === LATIN_SMALL_LETTER_C || cp === LATIN_SMALL_LETTER_K); + } + return cp !== LATIN_SMALL_LETTER_C; + } + eatDecimalEscape() { + this._lastIntValue = 0; + let cp = this.currentCodePoint; + if (cp >= DIGIT_ONE && cp <= DIGIT_NINE) { + do { + this._lastIntValue = 10 * this._lastIntValue + (cp - DIGIT_ZERO); + this.advance(); + } while ((cp = this.currentCodePoint) >= DIGIT_ZERO && + cp <= DIGIT_NINE); + return true; + } + return false; + } + eatUnicodePropertyValueExpression() { + const start = this.index; + if (this.eatUnicodePropertyName() && this.eat(EQUALS_SIGN)) { + const key = this._lastStrValue; + if (this.eatUnicodePropertyValue()) { + const value = this._lastStrValue; + if (isValidUnicodeProperty(this.ecmaVersion, key, value)) { + return { + key, + value: value || null, + }; + } + this.raise("Invalid property name"); + } + } + this.rewind(start); + if (this.eatLoneUnicodePropertyNameOrValue()) { + const nameOrValue = this._lastStrValue; + if (isValidUnicodeProperty(this.ecmaVersion, "General_Category", nameOrValue)) { + return { + key: "General_Category", + value: nameOrValue || null, + }; + } + if (isValidLoneUnicodeProperty(this.ecmaVersion, nameOrValue)) { + return { + key: nameOrValue, + value: null, + }; + } + if (this._unicodeSetsMode && + isValidLoneUnicodePropertyOfString(this.ecmaVersion, nameOrValue)) { + return { + key: nameOrValue, + value: null, + strings: true, + }; + } + this.raise("Invalid property name"); + } + return null; + } + eatUnicodePropertyName() { + this._lastStrValue = ""; + while (isUnicodePropertyNameCharacter(this.currentCodePoint)) { + this._lastStrValue += String.fromCodePoint(this.currentCodePoint); + this.advance(); + } + return this._lastStrValue !== ""; + } + eatUnicodePropertyValue() { + this._lastStrValue = ""; + while (isUnicodePropertyValueCharacter(this.currentCodePoint)) { + this._lastStrValue += String.fromCodePoint(this.currentCodePoint); + this.advance(); + } + return this._lastStrValue !== ""; + } + eatLoneUnicodePropertyNameOrValue() { + return this.eatUnicodePropertyValue(); + } + eatHexEscapeSequence() { + const start = this.index; + if (this.eat(LATIN_SMALL_LETTER_X)) { + if (this.eatFixedHexDigits(2)) { + return true; + } + if (this._unicodeMode || this.strict) { + this.raise("Invalid escape"); + } + this.rewind(start); + } + return false; + } + eatDecimalDigits() { + const start = this.index; + this._lastIntValue = 0; + while (isDecimalDigit(this.currentCodePoint)) { + this._lastIntValue = + 10 * this._lastIntValue + digitToInt(this.currentCodePoint); + this.advance(); + } + return this.index !== start; + } + eatHexDigits() { + const start = this.index; + this._lastIntValue = 0; + while (isHexDigit(this.currentCodePoint)) { + this._lastIntValue = + 16 * this._lastIntValue + digitToInt(this.currentCodePoint); + this.advance(); + } + return this.index !== start; + } + eatLegacyOctalEscapeSequence() { + if (this.eatOctalDigit()) { + const n1 = this._lastIntValue; + if (this.eatOctalDigit()) { + const n2 = this._lastIntValue; + if (n1 <= 3 && this.eatOctalDigit()) { + this._lastIntValue = n1 * 64 + n2 * 8 + this._lastIntValue; + } + else { + this._lastIntValue = n1 * 8 + n2; + } + } + else { + this._lastIntValue = n1; + } + return true; + } + return false; + } + eatOctalDigit() { + const cp = this.currentCodePoint; + if (isOctalDigit(cp)) { + this.advance(); + this._lastIntValue = cp - DIGIT_ZERO; + return true; + } + this._lastIntValue = 0; + return false; + } + eatFixedHexDigits(length) { + const start = this.index; + this._lastIntValue = 0; + for (let i = 0; i < length; ++i) { + const cp = this.currentCodePoint; + if (!isHexDigit(cp)) { + this.rewind(start); + return false; + } + this._lastIntValue = 16 * this._lastIntValue + digitToInt(cp); + this.advance(); + } + return true; + } + eatModifiers() { + let ate = false; + while (isRegularExpressionModifier(this.currentCodePoint)) { + this.advance(); + ate = true; + } + return ate; + } + parseModifiers(start, end) { + const { ignoreCase, multiline, dotAll } = this.parseFlags(this._reader.source, start, end); + return { ignoreCase, multiline, dotAll }; + } + parseFlags(source, start, end) { + const flags = { + global: false, + ignoreCase: false, + multiline: false, + unicode: false, + sticky: false, + dotAll: false, + hasIndices: false, + unicodeSets: false, + }; + const validFlags = new Set(); + validFlags.add(LATIN_SMALL_LETTER_G); + validFlags.add(LATIN_SMALL_LETTER_I); + validFlags.add(LATIN_SMALL_LETTER_M); + if (this.ecmaVersion >= 2015) { + validFlags.add(LATIN_SMALL_LETTER_U); + validFlags.add(LATIN_SMALL_LETTER_Y); + if (this.ecmaVersion >= 2018) { + validFlags.add(LATIN_SMALL_LETTER_S); + if (this.ecmaVersion >= 2022) { + validFlags.add(LATIN_SMALL_LETTER_D); + if (this.ecmaVersion >= 2024) { + validFlags.add(LATIN_SMALL_LETTER_V); + } + } + } + } + for (let i = start; i < end; ++i) { + const flag = source.charCodeAt(i); + if (validFlags.has(flag)) { + const prop = FLAG_CODEPOINT_TO_PROP[flag]; + if (flags[prop]) { + this.raise(`Duplicated flag '${source[i]}'`, { + index: start, + }); + } + flags[prop] = true; + } + else { + this.raise(`Invalid flag '${source[i]}'`, { index: start }); + } + } + return flags; + } +} + +const DUMMY_PATTERN = {}; +const DUMMY_FLAGS = {}; +const DUMMY_CAPTURING_GROUP = {}; +function isClassSetOperand(node) { + return (node.type === "Character" || + node.type === "CharacterSet" || + node.type === "CharacterClass" || + node.type === "ExpressionCharacterClass" || + node.type === "ClassStringDisjunction"); +} +class RegExpParserState { + constructor(options) { + var _a; + this._node = DUMMY_PATTERN; + this._expressionBufferMap = new Map(); + this._flags = DUMMY_FLAGS; + this._backreferences = []; + this._capturingGroups = []; + this.source = ""; + this.strict = Boolean(options === null || options === void 0 ? void 0 : options.strict); + this.ecmaVersion = (_a = options === null || options === void 0 ? void 0 : options.ecmaVersion) !== null && _a !== void 0 ? _a : latestEcmaVersion; + } + get pattern() { + if (this._node.type !== "Pattern") { + throw new Error("UnknownError"); + } + return this._node; + } + get flags() { + if (this._flags.type !== "Flags") { + throw new Error("UnknownError"); + } + return this._flags; + } + onRegExpFlags(start, end, { global, ignoreCase, multiline, unicode, sticky, dotAll, hasIndices, unicodeSets, }) { + this._flags = { + type: "Flags", + parent: null, + start, + end, + raw: this.source.slice(start, end), + global, + ignoreCase, + multiline, + unicode, + sticky, + dotAll, + hasIndices, + unicodeSets, + }; + } + onPatternEnter(start) { + this._node = { + type: "Pattern", + parent: null, + start, + end: start, + raw: "", + alternatives: [], + }; + this._backreferences.length = 0; + this._capturingGroups.length = 0; + } + onPatternLeave(start, end) { + this._node.end = end; + this._node.raw = this.source.slice(start, end); + for (const reference of this._backreferences) { + const ref = reference.ref; + const groups = typeof ref === "number" + ? [this._capturingGroups[ref - 1]] + : this._capturingGroups.filter((g) => g.name === ref); + if (groups.length === 1) { + const group = groups[0]; + reference.ambiguous = false; + reference.resolved = group; + } + else { + reference.ambiguous = true; + reference.resolved = groups; + } + for (const group of groups) { + group.references.push(reference); + } + } + } + onAlternativeEnter(start) { + const parent = this._node; + if (parent.type !== "Assertion" && + parent.type !== "CapturingGroup" && + parent.type !== "Group" && + parent.type !== "Pattern") { + throw new Error("UnknownError"); + } + this._node = { + type: "Alternative", + parent, + start, + end: start, + raw: "", + elements: [], + }; + parent.alternatives.push(this._node); + } + onAlternativeLeave(start, end) { + const node = this._node; + if (node.type !== "Alternative") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onGroupEnter(start) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + const group = { + type: "Group", + parent, + start, + end: start, + raw: "", + modifiers: null, + alternatives: [], + }; + this._node = group; + parent.elements.push(this._node); + } + onGroupLeave(start, end) { + const node = this._node; + if (node.type !== "Group" || node.parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onModifiersEnter(start) { + const parent = this._node; + if (parent.type !== "Group") { + throw new Error("UnknownError"); + } + this._node = { + type: "Modifiers", + parent, + start, + end: start, + raw: "", + add: null, + remove: null, + }; + parent.modifiers = this._node; + } + onModifiersLeave(start, end) { + const node = this._node; + if (node.type !== "Modifiers" || node.parent.type !== "Group") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onAddModifiers(start, end, { ignoreCase, multiline, dotAll, }) { + const parent = this._node; + if (parent.type !== "Modifiers") { + throw new Error("UnknownError"); + } + parent.add = { + type: "ModifierFlags", + parent, + start, + end, + raw: this.source.slice(start, end), + ignoreCase, + multiline, + dotAll, + }; + } + onRemoveModifiers(start, end, { ignoreCase, multiline, dotAll, }) { + const parent = this._node; + if (parent.type !== "Modifiers") { + throw new Error("UnknownError"); + } + parent.remove = { + type: "ModifierFlags", + parent, + start, + end, + raw: this.source.slice(start, end), + ignoreCase, + multiline, + dotAll, + }; + } + onCapturingGroupEnter(start, name) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + this._node = { + type: "CapturingGroup", + parent, + start, + end: start, + raw: "", + name, + alternatives: [], + references: [], + }; + parent.elements.push(this._node); + this._capturingGroups.push(this._node); + } + onCapturingGroupLeave(start, end) { + const node = this._node; + if (node.type !== "CapturingGroup" || + node.parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onQuantifier(start, end, min, max, greedy) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + const element = parent.elements.pop(); + if (element == null || + element.type === "Quantifier" || + (element.type === "Assertion" && element.kind !== "lookahead")) { + throw new Error("UnknownError"); + } + const node = { + type: "Quantifier", + parent, + start: element.start, + end, + raw: this.source.slice(element.start, end), + min, + max, + greedy, + element, + }; + parent.elements.push(node); + element.parent = node; + } + onLookaroundAssertionEnter(start, kind, negate) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + const node = (this._node = { + type: "Assertion", + parent, + start, + end: start, + raw: "", + kind, + negate, + alternatives: [], + }); + parent.elements.push(node); + } + onLookaroundAssertionLeave(start, end) { + const node = this._node; + if (node.type !== "Assertion" || node.parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onEdgeAssertion(start, end, kind) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + parent.elements.push({ + type: "Assertion", + parent, + start, + end, + raw: this.source.slice(start, end), + kind, + }); + } + onWordBoundaryAssertion(start, end, kind, negate) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + parent.elements.push({ + type: "Assertion", + parent, + start, + end, + raw: this.source.slice(start, end), + kind, + negate, + }); + } + onAnyCharacterSet(start, end, kind) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + parent.elements.push({ + type: "CharacterSet", + parent, + start, + end, + raw: this.source.slice(start, end), + kind, + }); + } + onEscapeCharacterSet(start, end, kind, negate) { + const parent = this._node; + if (parent.type !== "Alternative" && parent.type !== "CharacterClass") { + throw new Error("UnknownError"); + } + parent.elements.push({ + type: "CharacterSet", + parent, + start, + end, + raw: this.source.slice(start, end), + kind, + negate, + }); + } + onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings) { + const parent = this._node; + if (parent.type !== "Alternative" && parent.type !== "CharacterClass") { + throw new Error("UnknownError"); + } + const base = { + type: "CharacterSet", + parent: null, + start, + end, + raw: this.source.slice(start, end), + kind, + strings: null, + key, + }; + if (strings) { + if ((parent.type === "CharacterClass" && !parent.unicodeSets) || + negate || + value !== null) { + throw new Error("UnknownError"); + } + parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate })); + } + else { + parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate })); + } + } + onCharacter(start, end, value) { + const parent = this._node; + if (parent.type !== "Alternative" && + parent.type !== "CharacterClass" && + parent.type !== "StringAlternative") { + throw new Error("UnknownError"); + } + parent.elements.push({ + type: "Character", + parent, + start, + end, + raw: this.source.slice(start, end), + value, + }); + } + onBackreference(start, end, ref) { + const parent = this._node; + if (parent.type !== "Alternative") { + throw new Error("UnknownError"); + } + const node = { + type: "Backreference", + parent, + start, + end, + raw: this.source.slice(start, end), + ref, + ambiguous: false, + resolved: DUMMY_CAPTURING_GROUP, + }; + parent.elements.push(node); + this._backreferences.push(node); + } + onCharacterClassEnter(start, negate, unicodeSets) { + const parent = this._node; + const base = { + type: "CharacterClass", + parent, + start, + end: start, + raw: "", + unicodeSets, + negate, + elements: [], + }; + if (parent.type === "Alternative") { + const node = Object.assign(Object.assign({}, base), { parent }); + this._node = node; + parent.elements.push(node); + } + else if (parent.type === "CharacterClass" && + parent.unicodeSets && + unicodeSets) { + const node = Object.assign(Object.assign({}, base), { parent, + unicodeSets }); + this._node = node; + parent.elements.push(node); + } + else { + throw new Error("UnknownError"); + } + } + onCharacterClassLeave(start, end) { + const node = this._node; + if (node.type !== "CharacterClass" || + (node.parent.type !== "Alternative" && + node.parent.type !== "CharacterClass")) { + throw new Error("UnknownError"); + } + const parent = node.parent; + node.end = end; + node.raw = this.source.slice(start, end); + this._node = parent; + const expression = this._expressionBufferMap.get(node); + if (!expression) { + return; + } + if (node.elements.length > 0) { + throw new Error("UnknownError"); + } + this._expressionBufferMap.delete(node); + const newNode = { + type: "ExpressionCharacterClass", + parent, + start: node.start, + end: node.end, + raw: node.raw, + negate: node.negate, + expression, + }; + expression.parent = newNode; + if (node !== parent.elements.pop()) { + throw new Error("UnknownError"); + } + parent.elements.push(newNode); + } + onCharacterClassRange(start, end) { + const parent = this._node; + if (parent.type !== "CharacterClass") { + throw new Error("UnknownError"); + } + const elements = parent.elements; + const max = elements.pop(); + if (!max || max.type !== "Character") { + throw new Error("UnknownError"); + } + if (!parent.unicodeSets) { + const hyphen = elements.pop(); + if (!hyphen || + hyphen.type !== "Character" || + hyphen.value !== HYPHEN_MINUS) { + throw new Error("UnknownError"); + } + } + const min = elements.pop(); + if (!min || min.type !== "Character") { + throw new Error("UnknownError"); + } + const node = { + type: "CharacterClassRange", + parent, + start, + end, + raw: this.source.slice(start, end), + min, + max, + }; + min.parent = node; + max.parent = node; + elements.push(node); + } + onClassIntersection(start, end) { + var _a; + const parent = this._node; + if (parent.type !== "CharacterClass" || !parent.unicodeSets) { + throw new Error("UnknownError"); + } + const right = parent.elements.pop(); + const left = (_a = this._expressionBufferMap.get(parent)) !== null && _a !== void 0 ? _a : parent.elements.pop(); + if (!left || + !right || + left.type === "ClassSubtraction" || + (left.type !== "ClassIntersection" && !isClassSetOperand(left)) || + !isClassSetOperand(right)) { + throw new Error("UnknownError"); + } + const node = { + type: "ClassIntersection", + parent: parent, + start, + end, + raw: this.source.slice(start, end), + left, + right, + }; + left.parent = node; + right.parent = node; + this._expressionBufferMap.set(parent, node); + } + onClassSubtraction(start, end) { + var _a; + const parent = this._node; + if (parent.type !== "CharacterClass" || !parent.unicodeSets) { + throw new Error("UnknownError"); + } + const right = parent.elements.pop(); + const left = (_a = this._expressionBufferMap.get(parent)) !== null && _a !== void 0 ? _a : parent.elements.pop(); + if (!left || + !right || + left.type === "ClassIntersection" || + (left.type !== "ClassSubtraction" && !isClassSetOperand(left)) || + !isClassSetOperand(right)) { + throw new Error("UnknownError"); + } + const node = { + type: "ClassSubtraction", + parent: parent, + start, + end, + raw: this.source.slice(start, end), + left, + right, + }; + left.parent = node; + right.parent = node; + this._expressionBufferMap.set(parent, node); + } + onClassStringDisjunctionEnter(start) { + const parent = this._node; + if (parent.type !== "CharacterClass" || !parent.unicodeSets) { + throw new Error("UnknownError"); + } + this._node = { + type: "ClassStringDisjunction", + parent, + start, + end: start, + raw: "", + alternatives: [], + }; + parent.elements.push(this._node); + } + onClassStringDisjunctionLeave(start, end) { + const node = this._node; + if (node.type !== "ClassStringDisjunction" || + node.parent.type !== "CharacterClass") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onStringAlternativeEnter(start) { + const parent = this._node; + if (parent.type !== "ClassStringDisjunction") { + throw new Error("UnknownError"); + } + this._node = { + type: "StringAlternative", + parent, + start, + end: start, + raw: "", + elements: [], + }; + parent.alternatives.push(this._node); + } + onStringAlternativeLeave(start, end) { + const node = this._node; + if (node.type !== "StringAlternative") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } +} +class RegExpParser { + constructor(options) { + this._state = new RegExpParserState(options); + this._validator = new RegExpValidator(this._state); + } + parseLiteral(source, start = 0, end = source.length) { + this._state.source = source; + this._validator.validateLiteral(source, start, end); + const pattern = this._state.pattern; + const flags = this._state.flags; + const literal = { + type: "RegExpLiteral", + parent: null, + start, + end, + raw: source, + pattern, + flags, + }; + pattern.parent = literal; + flags.parent = literal; + return literal; + } + parseFlags(source, start = 0, end = source.length) { + this._state.source = source; + this._validator.validateFlags(source, start, end); + return this._state.flags; + } + parsePattern(source, start = 0, end = source.length, uFlagOrFlags = undefined) { + this._state.source = source; + this._validator.validatePattern(source, start, end, uFlagOrFlags); + return this._state.pattern; + } +} + +class RegExpVisitor { + constructor(handlers) { + this._handlers = handlers; + } + visit(node) { + switch (node.type) { + case "Alternative": + this.visitAlternative(node); + break; + case "Assertion": + this.visitAssertion(node); + break; + case "Backreference": + this.visitBackreference(node); + break; + case "CapturingGroup": + this.visitCapturingGroup(node); + break; + case "Character": + this.visitCharacter(node); + break; + case "CharacterClass": + this.visitCharacterClass(node); + break; + case "CharacterClassRange": + this.visitCharacterClassRange(node); + break; + case "CharacterSet": + this.visitCharacterSet(node); + break; + case "ClassIntersection": + this.visitClassIntersection(node); + break; + case "ClassStringDisjunction": + this.visitClassStringDisjunction(node); + break; + case "ClassSubtraction": + this.visitClassSubtraction(node); + break; + case "ExpressionCharacterClass": + this.visitExpressionCharacterClass(node); + break; + case "Flags": + this.visitFlags(node); + break; + case "Group": + this.visitGroup(node); + break; + case "Modifiers": + this.visitModifiers(node); + break; + case "ModifierFlags": + this.visitModifierFlags(node); + break; + case "Pattern": + this.visitPattern(node); + break; + case "Quantifier": + this.visitQuantifier(node); + break; + case "RegExpLiteral": + this.visitRegExpLiteral(node); + break; + case "StringAlternative": + this.visitStringAlternative(node); + break; + default: + throw new Error(`Unknown type: ${node.type}`); + } + } + visitAlternative(node) { + if (this._handlers.onAlternativeEnter) { + this._handlers.onAlternativeEnter(node); + } + node.elements.forEach(this.visit, this); + if (this._handlers.onAlternativeLeave) { + this._handlers.onAlternativeLeave(node); + } + } + visitAssertion(node) { + if (this._handlers.onAssertionEnter) { + this._handlers.onAssertionEnter(node); + } + if (node.kind === "lookahead" || node.kind === "lookbehind") { + node.alternatives.forEach(this.visit, this); + } + if (this._handlers.onAssertionLeave) { + this._handlers.onAssertionLeave(node); + } + } + visitBackreference(node) { + if (this._handlers.onBackreferenceEnter) { + this._handlers.onBackreferenceEnter(node); + } + if (this._handlers.onBackreferenceLeave) { + this._handlers.onBackreferenceLeave(node); + } + } + visitCapturingGroup(node) { + if (this._handlers.onCapturingGroupEnter) { + this._handlers.onCapturingGroupEnter(node); + } + node.alternatives.forEach(this.visit, this); + if (this._handlers.onCapturingGroupLeave) { + this._handlers.onCapturingGroupLeave(node); + } + } + visitCharacter(node) { + if (this._handlers.onCharacterEnter) { + this._handlers.onCharacterEnter(node); + } + if (this._handlers.onCharacterLeave) { + this._handlers.onCharacterLeave(node); + } + } + visitCharacterClass(node) { + if (this._handlers.onCharacterClassEnter) { + this._handlers.onCharacterClassEnter(node); + } + node.elements.forEach(this.visit, this); + if (this._handlers.onCharacterClassLeave) { + this._handlers.onCharacterClassLeave(node); + } + } + visitCharacterClassRange(node) { + if (this._handlers.onCharacterClassRangeEnter) { + this._handlers.onCharacterClassRangeEnter(node); + } + this.visitCharacter(node.min); + this.visitCharacter(node.max); + if (this._handlers.onCharacterClassRangeLeave) { + this._handlers.onCharacterClassRangeLeave(node); + } + } + visitCharacterSet(node) { + if (this._handlers.onCharacterSetEnter) { + this._handlers.onCharacterSetEnter(node); + } + if (this._handlers.onCharacterSetLeave) { + this._handlers.onCharacterSetLeave(node); + } + } + visitClassIntersection(node) { + if (this._handlers.onClassIntersectionEnter) { + this._handlers.onClassIntersectionEnter(node); + } + this.visit(node.left); + this.visit(node.right); + if (this._handlers.onClassIntersectionLeave) { + this._handlers.onClassIntersectionLeave(node); + } + } + visitClassStringDisjunction(node) { + if (this._handlers.onClassStringDisjunctionEnter) { + this._handlers.onClassStringDisjunctionEnter(node); + } + node.alternatives.forEach(this.visit, this); + if (this._handlers.onClassStringDisjunctionLeave) { + this._handlers.onClassStringDisjunctionLeave(node); + } + } + visitClassSubtraction(node) { + if (this._handlers.onClassSubtractionEnter) { + this._handlers.onClassSubtractionEnter(node); + } + this.visit(node.left); + this.visit(node.right); + if (this._handlers.onClassSubtractionLeave) { + this._handlers.onClassSubtractionLeave(node); + } + } + visitExpressionCharacterClass(node) { + if (this._handlers.onExpressionCharacterClassEnter) { + this._handlers.onExpressionCharacterClassEnter(node); + } + this.visit(node.expression); + if (this._handlers.onExpressionCharacterClassLeave) { + this._handlers.onExpressionCharacterClassLeave(node); + } + } + visitFlags(node) { + if (this._handlers.onFlagsEnter) { + this._handlers.onFlagsEnter(node); + } + if (this._handlers.onFlagsLeave) { + this._handlers.onFlagsLeave(node); + } + } + visitGroup(node) { + if (this._handlers.onGroupEnter) { + this._handlers.onGroupEnter(node); + } + if (node.modifiers) { + this.visit(node.modifiers); + } + node.alternatives.forEach(this.visit, this); + if (this._handlers.onGroupLeave) { + this._handlers.onGroupLeave(node); + } + } + visitModifiers(node) { + if (this._handlers.onModifiersEnter) { + this._handlers.onModifiersEnter(node); + } + if (node.add) { + this.visit(node.add); + } + if (node.remove) { + this.visit(node.remove); + } + if (this._handlers.onModifiersLeave) { + this._handlers.onModifiersLeave(node); + } + } + visitModifierFlags(node) { + if (this._handlers.onModifierFlagsEnter) { + this._handlers.onModifierFlagsEnter(node); + } + if (this._handlers.onModifierFlagsLeave) { + this._handlers.onModifierFlagsLeave(node); + } + } + visitPattern(node) { + if (this._handlers.onPatternEnter) { + this._handlers.onPatternEnter(node); + } + node.alternatives.forEach(this.visit, this); + if (this._handlers.onPatternLeave) { + this._handlers.onPatternLeave(node); + } + } + visitQuantifier(node) { + if (this._handlers.onQuantifierEnter) { + this._handlers.onQuantifierEnter(node); + } + this.visit(node.element); + if (this._handlers.onQuantifierLeave) { + this._handlers.onQuantifierLeave(node); + } + } + visitRegExpLiteral(node) { + if (this._handlers.onRegExpLiteralEnter) { + this._handlers.onRegExpLiteralEnter(node); + } + this.visitPattern(node.pattern); + this.visitFlags(node.flags); + if (this._handlers.onRegExpLiteralLeave) { + this._handlers.onRegExpLiteralLeave(node); + } + } + visitStringAlternative(node) { + if (this._handlers.onStringAlternativeEnter) { + this._handlers.onStringAlternativeEnter(node); + } + node.elements.forEach(this.visit, this); + if (this._handlers.onStringAlternativeLeave) { + this._handlers.onStringAlternativeLeave(node); + } + } +} + +function parseRegExpLiteral(source, options) { + return new RegExpParser(options).parseLiteral(String(source)); +} +function validateRegExpLiteral(source, options) { + new RegExpValidator(options).validateLiteral(source); +} +function visitRegExpAST(node, handlers) { + new RegExpVisitor(handlers).visit(node); +} + +export { ast as AST, RegExpParser, RegExpSyntaxError, RegExpValidator, parseRegExpLiteral, validateRegExpLiteral, visitRegExpAST }; +//# sourceMappingURL=index.mjs.map diff --git a/slider/node_modules/@eslint-community/regexpp/index.mjs.map b/slider/node_modules/@eslint-community/regexpp/index.mjs.map new file mode 100644 index 0000000..5e5f037 --- /dev/null +++ b/slider/node_modules/@eslint-community/regexpp/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs.map","sources":[".temp/src/ecma-versions.ts",".temp/unicode/src/unicode/ids.ts",".temp/unicode/src/unicode/properties.ts",".temp/unicode/src/unicode/index.ts",".temp/src/group-specifiers.ts",".temp/src/reader.ts",".temp/src/regexp-syntax-error.ts",".temp/src/validator.ts",".temp/src/parser.ts",".temp/src/visitor.ts",".temp/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;AAaO,MAAM,iBAAiB,GAAG,IAAI;;ACTrC,IAAI,kBAAkB,GAAyB,SAAS,CAAA;AACxD,IAAI,qBAAqB,GAAyB,SAAS,CAAA;AAErD,SAAU,SAAS,CAAC,EAAU,EAAA;IAChC,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;AAC1B,IAAA,OAAO,cAAc,CAAC,EAAE,CAAC,CAAA;AAC7B,CAAC;AAEK,SAAU,YAAY,CAAC,EAAU,EAAA;IACnC,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,KAAK,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;IAC5B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;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AAA;AAC3B,QAAA,IAAI,IAAI,CAAC,SAAS,CAAC,oBAAoB,EAAE;AACrC,YAAA,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;AAC5C,SAAA;KACJ;AAEO,IAAA,sBAAsB,CAAC,IAAuB,EAAA;AAClD,QAAA,IAAI,IAAI,CAAC,SAAS,CAAC,wBAAwB,EAAE;AACzC,YAAA,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAA;AAChD,SAAA;QACD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;AACvC,QAAA,IAAI,IAAI,CAAC,SAAS,CAAC,wBAAwB,EAAE;AACzC,YAAA,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAA;AAChD,SAAA;KACJ;AACJ;;ACpTe,SAAA,kBAAkB,CAC9B,MAAuB,EACvB,OAA8B,EAAA;AAE9B,IAAA,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;AACjE,CAAC;AAOe,SAAA,qBAAqB,CACjC,MAAc,EACd,OAAiC,EAAA;IAEjC,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA;AACxD,CAAC;AAEe,SAAA,cAAc,CAC1B,IAAc,EACd,QAAgC,EAAA;IAEhC,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC3C;;;;"} \ No newline at end of file diff --git a/slider/node_modules/@eslint-community/regexpp/package.json b/slider/node_modules/@eslint-community/regexpp/package.json new file mode 100644 index 0000000..2b59b3d --- /dev/null +++ b/slider/node_modules/@eslint-community/regexpp/package.json @@ -0,0 +1,91 @@ +{ + "name": "@eslint-community/regexpp", + "version": "4.12.1", + "description": "Regular expression parser for ECMAScript.", + "keywords": [ + "regexp", + "regular", + "expression", + "parser", + "validator", + "ast", + "abstract", + "syntax", + "tree", + "ecmascript", + "es2015", + "es2016", + "es2017", + "es2018", + "es2019", + "es2020", + "es2021", + "annexB" + ], + "homepage": "https://github.com/eslint-community/regexpp#readme", + "bugs": { + "url": "https://github.com/eslint-community/regexpp/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/eslint-community/regexpp" + }, + "license": "MIT", + "author": "Toru Nagashima", + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./index.mjs", + "default": "./index.js" + }, + "./package.json": "./package.json" + }, + "main": "index", + "files": [ + "index.*" + ], + "scripts": { + "prebuild": "npm run -s clean", + "build": "run-s build:*", + "build:tsc": "tsc --module es2015", + "build:rollup": "rollup -c", + "build:dts": "npm run -s build:tsc -- --removeComments false && dts-bundle --name @eslint-community/regexpp --main .temp/index.d.ts --out ../index.d.ts && prettier --write index.d.ts", + "clean": "rimraf .temp index.*", + "lint": "eslint . --ext .ts", + "test": "nyc _mocha \"test/*.ts\" --reporter dot --timeout 10000", + "debug": "mocha --require ts-node/register/transpile-only \"test/*.ts\" --reporter dot --timeout 10000", + "update:test": "ts-node scripts/update-fixtures.ts", + "update:unicode": "run-s update:unicode:*", + "update:unicode:ids": "ts-node scripts/update-unicode-ids.ts", + "update:unicode:props": "ts-node scripts/update-unicode-properties.ts", + "update:test262:extract": "ts-node -T scripts/extract-test262.ts", + "preversion": "npm test && npm run -s build", + "postversion": "git push && git push --tags", + "prewatch": "npm run -s clean", + "watch": "_mocha \"test/*.ts\" --require ts-node/register --reporter dot --timeout 10000 --watch-extensions ts --watch --growl" + }, + "dependencies": {}, + "devDependencies": { + "@eslint-community/eslint-plugin-mysticatea": "^15.5.1", + "@rollup/plugin-node-resolve": "^14.1.0", + "@types/eslint": "^8.44.3", + "@types/jsdom": "^16.2.15", + "@types/mocha": "^9.1.1", + "@types/node": "^12.20.55", + "dts-bundle": "^0.7.3", + "eslint": "^8.50.0", + "js-tokens": "^8.0.2", + "jsdom": "^19.0.0", + "mocha": "^9.2.2", + "npm-run-all2": "^6.2.2", + "nyc": "^14.1.1", + "rimraf": "^3.0.2", + "rollup": "^2.79.1", + "rollup-plugin-sourcemaps": "^0.6.3", + "ts-node": "^10.9.1", + "typescript": "~5.0.2" + }, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } +} diff --git a/slider/node_modules/@eslint/config-array/LICENSE b/slider/node_modules/@eslint/config-array/LICENSE new file mode 100644 index 0000000..ed43975 --- /dev/null +++ b/slider/node_modules/@eslint/config-array/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/slider/node_modules/@eslint/config-array/README.md b/slider/node_modules/@eslint/config-array/README.md new file mode 100644 index 0000000..3723338 --- /dev/null +++ b/slider/node_modules/@eslint/config-array/README.md @@ -0,0 +1,369 @@ +# Config Array + +## Description + +A config array is a way of managing configurations that are based on glob pattern matching of filenames. Each config array contains the information needed to determine the correct configuration for any file based on the filename. + +**Note:** This is a generic package that can be used outside of ESLint. It contains no ESLint-specific functionality. + +## Installation + +For Node.js and compatible runtimes: + +```shell +npm install @eslint/config-array +# or +yarn add @eslint/config-array +# or +pnpm install @eslint/config-array +# or +bun add @eslint/config-array +``` + +For Deno: + +```shell +deno add @eslint/config-array +``` + +## Background + +The basic idea is that all configuration, including overrides, can be represented by a single array where each item in the array is a config object. Config objects appearing later in the array override config objects appearing earlier in the array. You can calculate a config for a given file by traversing all config objects in the array to find the ones that match the filename. Matching is done by specifying glob patterns in `files` and `ignores` properties on each config object. Here's an example: + +```js +export default [ + // match all JSON files + { + name: "JSON Handler", + files: ["**/*.json"], + handler: jsonHandler, + }, + + // match only package.json + { + name: "package.json Handler", + files: ["package.json"], + handler: packageJsonHandler, + }, +]; +``` + +In this example, there are two config objects: the first matches all JSON files in all directories and the second matches just `package.json` in the base path directory (all the globs are evaluated as relative to a base path that can be specified). When you retrieve a configuration for `foo.json`, only the first config object matches so `handler` is equal to `jsonHandler`; when you retrieve a configuration for `package.json`, `handler` is equal to `packageJsonHandler` (because both config objects match, the second one wins). + +## Usage + +First, import the `ConfigArray` constructor: + +```js +import { ConfigArray } from "@eslint/config-array"; + +// or using CommonJS + +const { ConfigArray } = require("@eslint/config-array"); +``` + +When you create a new instance of `ConfigArray`, you must pass in two arguments: an array of configs and an options object. The array of configs is most likely read in from a configuration file, so here's a typical example: + +```js +const configFilename = path.resolve(process.cwd(), "my.config.js"); +const { default: rawConfigs } = await import(configFilename); +const configs = new ConfigArray(rawConfigs, { + // the path to match filenames from + basePath: process.cwd(), + + // additional items in each config + schema: mySchema, +}); +``` + +This example reads in an object or array from `my.config.js` and passes it into the `ConfigArray` constructor as the first argument. The second argument is an object specifying the `basePath` (the directory in which `my.config.js` is found) and a `schema` to define the additional properties of a config object beyond `files`, `ignores`, `basePath`, and `name`. + +### Specifying a Schema + +The `schema` option is required for you to use additional properties in config objects. The schema is an object that follows the format of an [`ObjectSchema`](https://npmjs.com/package/@eslint/object-schema). The schema specifies both validation and merge rules that the `ConfigArray` instance needs to combine configs when there are multiple matches. Here's an example: + +```js +const configFilename = path.resolve(process.cwd(), "my.config.js"); +const { default: rawConfigs } = await import(configFilename); + +const mySchema = { + + // define the handler key in configs + handler: { + required: true, + merge(a, b) { + if (!b) return a; + if (!a) return b; + }, + validate(value) { + if (typeof value !== "function") { + throw new TypeError("Function expected."); + } + } + } +}; + +const configs = new ConfigArray(rawConfigs, { + + // the path to match filenames from + basePath: process.cwd(), + + // additional item schemas in each config + schema: mySchema, + + // additional config types supported (default: []) + extraConfigTypes: ["array", "function"]; +}); +``` + +### Config Arrays + +Config arrays can be multidimensional, so it's possible for a config array to contain another config array when `extraConfigTypes` contains `"array"`, such as: + +```js +export default [ + // JS config + { + files: ["**/*.js"], + handler: jsHandler, + }, + + // JSON configs + [ + // match all JSON files + { + name: "JSON Handler", + files: ["**/*.json"], + handler: jsonHandler, + }, + + // match only package.json + { + name: "package.json Handler", + files: ["package.json"], + handler: packageJsonHandler, + }, + ], + + // filename must match function + { + files: [filePath => filePath.endsWith(".md")], + handler: markdownHandler, + }, + + // filename must match all patterns in subarray + { + files: [["*.test.*", "*.js"]], + handler: jsTestHandler, + }, + + // filename must not match patterns beginning with ! + { + name: "Non-JS files", + files: ["!*.js"], + settings: { + js: false, + }, + }, + + // specific settings for files inside `src` directory + { + name: "Source files", + basePath: "src", + files: ["**/*"], + settings: { + source: true, + }, + }, +]; +``` + +In this example, the array contains both config objects and a config array. When a config array is normalized (see details below), it is flattened so only config objects remain. However, the order of evaluation remains the same. + +If the `files` array contains a function, then that function is called with the path of the file as it was passed in. The function is expected to return `true` if there is a match and `false` if not. (The `ignores` array can also contain functions.) + +If the `files` array contains an item that is an array of strings and functions, then all patterns must match in order for the config to match. In the preceding examples, both `*.test.*` and `*.js` must match in order for the config object to be used. + +If a pattern in the files array begins with `!` then it excludes that pattern. In the preceding example, any filename that doesn't end with `.js` will automatically get a `settings.js` property set to `false`. + +You can also specify an `ignores` key that will force files matching those patterns to not be included. If the `ignores` key is in a config object without any other keys, then those ignores will always be applied; otherwise those ignores act as exclusions. Here's an example: + +```js +export default [ + + // Always ignored + { + ignores: ["**/.git/**", "**/node_modules/**"] + }, + + // .eslintrc.js file is ignored only when .js file matches + { + files: ["**/*.js"], + ignores: [".eslintrc.js"] + handler: jsHandler + } +]; +``` + +You can use negated patterns in `ignores` to exclude a file that was already ignored, such as: + +```js +export default [ + // Ignore all JSON files except tsconfig.json + { + files: ["**/*"], + ignores: ["**/*.json", "!tsconfig.json"], + }, +]; +``` + +### Config Functions + +Config arrays can also include config functions when `extraConfigTypes` contains `"function"`. A config function accepts a single parameter, `context` (defined by you), and must return either a config object or a config array (it cannot return another function). Config functions allow end users to execute code in the creation of appropriate config objects. Here's an example: + +```js +export default [ + // JS config + { + files: ["**/*.js"], + handler: jsHandler, + }, + + // JSON configs + function (context) { + return [ + // match all JSON files + { + name: context.name + " JSON Handler", + files: ["**/*.json"], + handler: jsonHandler, + }, + + // match only package.json + { + name: context.name + " package.json Handler", + files: ["package.json"], + handler: packageJsonHandler, + }, + ]; + }, +]; +``` + +When a config array is normalized, each function is executed and replaced in the config array with the return value. + +**Note:** Config functions can also be async. + +### Normalizing Config Arrays + +Once a config array has been created and loaded with all of the raw config data, it must be normalized before it can be used. The normalization process goes through and flattens the config array as well as executing all config functions to get their final values. + +To normalize a config array, call the `normalize()` method and pass in a context object: + +```js +await configs.normalize({ + name: "MyApp", +}); +``` + +The `normalize()` method returns a promise, so be sure to use the `await` operator. The config array instance is normalized in-place, so you don't need to create a new variable. + +If you want to disallow async config functions, you can call `normalizeSync()` instead. This method is completely synchronous and does not require using the `await` operator as it does not return a promise: + +```js +await configs.normalizeSync({ + name: "MyApp", +}); +``` + +**Important:** Once a `ConfigArray` is normalized, it cannot be changed further. You can, however, create a new `ConfigArray` and pass in the normalized instance to create an unnormalized copy. + +### Getting Config for a File + +To get the config for a file, use the `getConfig()` method on a normalized config array and pass in the filename to get a config for: + +```js +// pass in filename +const fileConfig = configs.getConfig( + path.resolve(process.cwd(), "package.json"), +); +``` + +The config array always returns an object, even if there are no configs matching the given filename. You can then inspect the returned config object to determine how to proceed. + +A few things to keep in mind: + +- If a filename is not an absolute path, it will be resolved relative to the base path directory. +- The returned config object never has `files`, `ignores`, `basePath`, or `name` properties; the only properties on the object will be the other configuration options specified. +- The config array caches configs, so subsequent calls to `getConfig()` with the same filename will return in a fast lookup rather than another calculation. +- A config will only be generated if the filename matches an entry in a `files` key. A config will not be generated without matching a `files` key (configs without a `files` key are only applied when another config with a `files` key is applied; configs without `files` are never applied on their own). Any config with a `files` key entry that is `*` or ends with `/**` or `/*` will only be applied if another entry in the same `files` key matches or another config matches. + +## Determining Ignored Paths + +You can determine if a file is ignored by using the `isFileIgnored()` method and passing in the path of any file, as in this example: + +```js +const ignored = configs.isFileIgnored("/foo/bar/baz.txt"); +``` + +A file is considered ignored if any of the following is true: + +- **It's parent directory is ignored.** For example, if `foo` is in `ignores`, then `foo/a.js` is considered ignored. +- **It has an ancestor directory that is ignored.** For example, if `foo` is in `ignores`, then `foo/baz/a.js` is considered ignored. +- **It matches an ignored file pattern.** For example, if `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored. +- **If it matches an entry in `files` and also in `ignores`.** For example, if `**/*.js` is in `files` and `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored. +- **The file is outside the `basePath`.** If the `basePath` is `/usr/me`, then `/foo/a.js` is considered ignored. + +For directories, use the `isDirectoryIgnored()` method and pass in the path of any directory, as in this example: + +```js +const ignored = configs.isDirectoryIgnored("/foo/bar/"); +``` + +A directory is considered ignored if any of the following is true: + +- **It's parent directory is ignored.** For example, if `foo` is in `ignores`, then `foo/baz` is considered ignored. +- **It has an ancestor directory that is ignored.** For example, if `foo` is in `ignores`, then `foo/bar/baz/a.js` is considered ignored. +- **It matches and ignored file pattern.** For example, if `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored. +- **If it matches an entry in `files` and also in `ignores`.** For example, if `**/*.js` is in `files` and `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored. +- **The file is outside the `basePath`.** If the `basePath` is `/usr/me`, then `/foo/a.js` is considered ignored. + +**Important:** A pattern such as `foo/**` means that `foo` and `foo/` are _not_ ignored whereas `foo/bar` is ignored. If you want to ignore `foo` and all of its subdirectories, use the pattern `foo` or `foo/` in `ignores`. + +## Caching Mechanisms + +Each `ConfigArray` aggressively caches configuration objects to avoid unnecessary work. This caching occurs in two ways: + +1. **File-based Caching.** For each filename that is passed into a method, the resulting config is cached against that filename so you're always guaranteed to get the same object returned from `getConfig()` whenever you pass the same filename in. +2. **Index-based Caching.** Whenever a config is calculated, the config elements that were used to create the config are also cached. So if a given filename matches elements 1, 5, and 7, the resulting config is cached with a key of `1,5,7`. That way, if another file is passed that matches the same config elements, the result is already known and doesn't have to be recalculated. That means two files that match all the same elements will return the same config from `getConfig()`. + +## Acknowledgements + +The design of this project was influenced by feedback on the ESLint RFC, and incorporates ideas from: + +- Teddy Katz (@not-an-aardvark) +- Toru Nagashima (@mysticatea) +- Kai Cataldo (@kaicataldo) + +## License + +Apache 2.0 + + + + +## Sponsors + +The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) +to get your logo on our READMEs and [website](https://eslint.org/sponsors). + +

Diamond Sponsors

+

AG Grid

Platinum Sponsors

+

Automattic Airbnb

Gold Sponsors

+

Qlty Software trunk.io Shopify

Silver Sponsors

+

Vite Liftoff American Express StackBlitz

Bronze Sponsors

+

Sentry Syntax Cybozu Anagram Solver Icons8 Discord GitBook Neko Nx Mercedes-Benz Group HeroCoders LambdaTest

+

Technology Sponsors

+Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work. +

Netlify Algolia 1Password

+ diff --git a/slider/node_modules/@eslint/config-array/dist/cjs/index.cjs b/slider/node_modules/@eslint/config-array/dist/cjs/index.cjs new file mode 100644 index 0000000..da70c94 --- /dev/null +++ b/slider/node_modules/@eslint/config-array/dist/cjs/index.cjs @@ -0,0 +1,1534 @@ +'use strict'; + +var posixPath = require('./std__path/posix.cjs'); +var windowsPath = require('./std__path/windows.cjs'); +var minimatch = require('minimatch'); +var createDebug = require('debug'); +var objectSchema = require('@eslint/object-schema'); + +function _interopNamespaceDefault(e) { + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { return e[k]; } + }); + } + }); + } + n.default = e; + return Object.freeze(n); +} + +var posixPath__namespace = /*#__PURE__*/_interopNamespaceDefault(posixPath); +var windowsPath__namespace = /*#__PURE__*/_interopNamespaceDefault(windowsPath); + +/** + * @fileoverview ConfigSchema + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Types +//------------------------------------------------------------------------------ + +/** @typedef {import("@eslint/object-schema").PropertyDefinition} PropertyDefinition */ +/** @typedef {import("@eslint/object-schema").ObjectDefinition} ObjectDefinition */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * A strategy that does nothing. + * @type {PropertyDefinition} + */ +const NOOP_STRATEGY = { + required: false, + merge() { + return undefined; + }, + validate() {}, +}; + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The base schema that every ConfigArray uses. + * @type {ObjectDefinition} + */ +const baseSchema = Object.freeze({ + name: { + required: false, + merge() { + return undefined; + }, + validate(value) { + if (typeof value !== "string") { + throw new TypeError("Property must be a string."); + } + }, + }, + basePath: NOOP_STRATEGY, + files: NOOP_STRATEGY, + ignores: NOOP_STRATEGY, +}); + +/** + * @fileoverview ConfigSchema + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Types +//------------------------------------------------------------------------------ + + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Asserts that a given value is an array. + * @param {*} value The value to check. + * @returns {void} + * @throws {TypeError} When the value is not an array. + */ +function assertIsArray(value) { + if (!Array.isArray(value)) { + throw new TypeError("Expected value to be an array."); + } +} + +/** + * Asserts that a given value is an array containing only strings and functions. + * @param {*} value The value to check. + * @returns {void} + * @throws {TypeError} When the value is not an array of strings and functions. + */ +function assertIsArrayOfStringsAndFunctions(value) { + assertIsArray(value); + + if ( + value.some( + item => typeof item !== "string" && typeof item !== "function", + ) + ) { + throw new TypeError( + "Expected array to only contain strings and functions.", + ); + } +} + +/** + * Asserts that a given value is a non-empty array. + * @param {*} value The value to check. + * @returns {void} + * @throws {TypeError} When the value is not an array or an empty array. + */ +function assertIsNonEmptyArray(value) { + if (!Array.isArray(value) || value.length === 0) { + throw new TypeError("Expected value to be a non-empty array."); + } +} + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The schema for `files` and `ignores` that every ConfigArray uses. + * @type {ObjectDefinition} + */ +const filesAndIgnoresSchema = Object.freeze({ + basePath: { + required: false, + merge() { + return undefined; + }, + validate(value) { + if (typeof value !== "string") { + throw new TypeError("Expected value to be a string."); + } + }, + }, + files: { + required: false, + merge() { + return undefined; + }, + validate(value) { + // first check if it's an array + assertIsNonEmptyArray(value); + + // then check each member + value.forEach(item => { + if (Array.isArray(item)) { + assertIsArrayOfStringsAndFunctions(item); + } else if ( + typeof item !== "string" && + typeof item !== "function" + ) { + throw new TypeError( + "Items must be a string, a function, or an array of strings and functions.", + ); + } + }); + }, + }, + ignores: { + required: false, + merge() { + return undefined; + }, + validate: assertIsArrayOfStringsAndFunctions, + }, +}); + +/** + * @fileoverview ConfigArray + * @author Nicholas C. Zakas + */ + + +//------------------------------------------------------------------------------ +// Types +//------------------------------------------------------------------------------ + +/** @typedef {import("./types.ts").ConfigObject} ConfigObject */ +/** @typedef {import("minimatch").IMinimatchStatic} IMinimatchStatic */ +/** @typedef {import("minimatch").IMinimatch} IMinimatch */ +/** @typedef {import("@jsr/std__path")} PathImpl */ + +/* + * This is a bit of a hack to make TypeScript happy with the Rollup-created + * CommonJS file. Rollup doesn't do object destructuring for imported files + * and instead imports the default via `require()`. This messes up type checking + * for `ObjectSchema`. To work around that, we just import the type manually + * and give it a different name to use in the JSDoc comments. + */ +/** @typedef {import("@eslint/object-schema").ObjectSchema} ObjectSchemaInstance */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const Minimatch = minimatch.Minimatch; +const debug = createDebug("@eslint/config-array"); + +/** + * A cache for minimatch instances. + * @type {Map} + */ +const minimatchCache = new Map(); + +/** + * A cache for negated minimatch instances. + * @type {Map} + */ +const negatedMinimatchCache = new Map(); + +/** + * Options to use with minimatch. + * @type {Object} + */ +const MINIMATCH_OPTIONS = { + // matchBase: true, + dot: true, + allowWindowsEscape: true, +}; + +/** + * The types of config objects that are supported. + * @type {Set} + */ +const CONFIG_TYPES = new Set(["array", "function"]); + +/** + * Fields that are considered metadata and not part of the config object. + * @type {Set} + */ +const META_FIELDS = new Set(["name", "basePath"]); + +/** + * A schema containing just files and ignores for early validation. + * @type {ObjectSchemaInstance} + */ +const FILES_AND_IGNORES_SCHEMA = new objectSchema.ObjectSchema(filesAndIgnoresSchema); + +// Precomputed constant objects returned by `ConfigArray.getConfigWithStatus`. + +const CONFIG_WITH_STATUS_EXTERNAL = Object.freeze({ status: "external" }); +const CONFIG_WITH_STATUS_IGNORED = Object.freeze({ status: "ignored" }); +const CONFIG_WITH_STATUS_UNCONFIGURED = Object.freeze({ + status: "unconfigured", +}); + +// Match two leading dots followed by a slash or the end of input. +const EXTERNAL_PATH_REGEX = /^\.\.(?:\/|$)/u; + +/** + * Wrapper error for config validation errors that adds a name to the front of the + * error message. + */ +class ConfigError extends Error { + /** + * Creates a new instance. + * @param {string} name The config object name causing the error. + * @param {number} index The index of the config object in the array. + * @param {Object} options The options for the error. + * @param {Error} [options.cause] The error that caused this error. + * @param {string} [options.message] The message to use for the error. + */ + constructor(name, index, { cause, message }) { + const finalMessage = message || cause.message; + + super(`Config ${name}: ${finalMessage}`, { cause }); + + // copy over custom properties that aren't represented + if (cause) { + for (const key of Object.keys(cause)) { + if (!(key in this)) { + this[key] = cause[key]; + } + } + } + + /** + * The name of the error. + * @type {string} + * @readonly + */ + this.name = "ConfigError"; + + /** + * The index of the config object in the array. + * @type {number} + * @readonly + */ + this.index = index; + } +} + +/** + * Gets the name of a config object. + * @param {ConfigObject} config The config object to get the name of. + * @returns {string} The name of the config object. + */ +function getConfigName(config) { + if (config && typeof config.name === "string" && config.name) { + return `"${config.name}"`; + } + + return "(unnamed)"; +} + +/** + * Rethrows a config error with additional information about the config object. + * @param {object} config The config object to get the name of. + * @param {number} index The index of the config object in the array. + * @param {Error} error The error to rethrow. + * @throws {ConfigError} When the error is rethrown for a config. + */ +function rethrowConfigError(config, index, error) { + const configName = getConfigName(config); + throw new ConfigError(configName, index, { cause: error }); +} + +/** + * Shorthand for checking if a value is a string. + * @param {any} value The value to check. + * @returns {boolean} True if a string, false if not. + */ +function isString(value) { + return typeof value === "string"; +} + +/** + * Creates a function that asserts that the config is valid + * during normalization. This checks that the config is not nullish + * and that files and ignores keys of a config object are valid as per base schema. + * @param {Object} config The config object to check. + * @param {number} index The index of the config object in the array. + * @returns {void} + * @throws {ConfigError} If the files and ignores keys of a config object are not valid. + */ +function assertValidBaseConfig(config, index) { + if (config === null) { + throw new ConfigError(getConfigName(config), index, { + message: "Unexpected null config.", + }); + } + + if (config === undefined) { + throw new ConfigError(getConfigName(config), index, { + message: "Unexpected undefined config.", + }); + } + + if (typeof config !== "object") { + throw new ConfigError(getConfigName(config), index, { + message: "Unexpected non-object config.", + }); + } + + const validateConfig = {}; + + if ("basePath" in config) { + validateConfig.basePath = config.basePath; + } + + if ("files" in config) { + validateConfig.files = config.files; + } + + if ("ignores" in config) { + validateConfig.ignores = config.ignores; + } + + try { + FILES_AND_IGNORES_SCHEMA.validate(validateConfig); + } catch (validationError) { + rethrowConfigError(config, index, validationError); + } +} + +/** + * Wrapper around minimatch that caches minimatch patterns for + * faster matching speed over multiple file path evaluations. + * @param {string} filepath The file path to match. + * @param {string} pattern The glob pattern to match against. + * @param {object} options The minimatch options to use. + * @returns + */ +function doMatch(filepath, pattern, options = {}) { + let cache = minimatchCache; + + if (options.flipNegate) { + cache = negatedMinimatchCache; + } + + let matcher = cache.get(pattern); + + if (!matcher) { + matcher = new Minimatch( + pattern, + Object.assign({}, MINIMATCH_OPTIONS, options), + ); + cache.set(pattern, matcher); + } + + return matcher.match(filepath); +} + +/** + * Normalizes a pattern by removing the leading "./" if present. + * @param {string} pattern The pattern to normalize. + * @returns {string} The normalized pattern. + */ +function normalizePattern(pattern) { + if (isString(pattern)) { + if (pattern.startsWith("./")) { + return pattern.slice(2); + } + + if (pattern.startsWith("!./")) { + return `!${pattern.slice(3)}`; + } + } + + return pattern; +} + +/** + * Checks if a given pattern requires normalization. + * @param {any} pattern The pattern to check. + * @returns {boolean} True if the pattern needs normalization, false otherwise. + * + */ +function needsPatternNormalization(pattern) { + return ( + isString(pattern) && + (pattern.startsWith("./") || pattern.startsWith("!./")) + ); +} + +/** + * Normalizes `files` and `ignores` patterns in a config by removing "./" prefixes. + * @param {Object} config The config object to normalize patterns in. + * @param {string} namespacedBasePath The namespaced base path of the directory to which config base path is relative. + * @param {PathImpl} path Path-handling implementation. + * @returns {Object} The normalized config object. + */ +function normalizeConfigPatterns(config, namespacedBasePath, path) { + if (!config) { + return config; + } + + const hasBasePath = typeof config.basePath === "string"; + + let needsNormalization = false; + + if (hasBasePath) { + needsNormalization = true; + } + + if (!needsNormalization && Array.isArray(config.files)) { + needsNormalization = config.files.some(pattern => { + if (Array.isArray(pattern)) { + return pattern.some(needsPatternNormalization); + } + return needsPatternNormalization(pattern); + }); + } + + if (!needsNormalization && Array.isArray(config.ignores)) { + needsNormalization = config.ignores.some(needsPatternNormalization); + } + + if (!needsNormalization) { + return config; + } + + const newConfig = { ...config }; + + if (hasBasePath) { + if (path.isAbsolute(config.basePath)) { + newConfig.basePath = path.toNamespacedPath(config.basePath); + } else { + newConfig.basePath = path.resolve( + namespacedBasePath, + config.basePath, + ); + } + } + + if (Array.isArray(newConfig.files)) { + newConfig.files = newConfig.files.map(pattern => { + if (Array.isArray(pattern)) { + return pattern.map(normalizePattern); + } + return normalizePattern(pattern); + }); + } + + if (Array.isArray(newConfig.ignores)) { + newConfig.ignores = newConfig.ignores.map(normalizePattern); + } + + return newConfig; +} + +/** + * Normalizes a `ConfigArray` by flattening it and executing any functions + * that are found inside. + * @param {Array} items The items in a `ConfigArray`. + * @param {Object} context The context object to pass into any function + * found. + * @param {Array} extraConfigTypes The config types to check. + * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative. + * @param {PathImpl} path Path-handling implementation. + * @returns {Promise} A flattened array containing only config objects. + * @throws {TypeError} When a config function returns a function. + */ +async function normalize( + items, + context, + extraConfigTypes, + namespacedBasePath, + path, +) { + const allowFunctions = extraConfigTypes.includes("function"); + const allowArrays = extraConfigTypes.includes("array"); + + async function* flatTraverse(array) { + for (let item of array) { + if (typeof item === "function") { + if (!allowFunctions) { + throw new TypeError("Unexpected function."); + } + + item = item(context); + if (item.then) { + item = await item; + } + } + + if (Array.isArray(item)) { + if (!allowArrays) { + throw new TypeError("Unexpected array."); + } + yield* flatTraverse(item); + } else if (typeof item === "function") { + throw new TypeError( + "A config function can only return an object or array.", + ); + } else { + yield item; + } + } + } + + /* + * Async iterables cannot be used with the spread operator, so we need to manually + * create the array to return. + */ + const asyncIterable = await flatTraverse(items); + const configs = []; + + for await (const config of asyncIterable) { + configs.push(normalizeConfigPatterns(config, namespacedBasePath, path)); + } + + return configs; +} + +/** + * Normalizes a `ConfigArray` by flattening it and executing any functions + * that are found inside. + * @param {Array} items The items in a `ConfigArray`. + * @param {Object} context The context object to pass into any function + * found. + * @param {Array} extraConfigTypes The config types to check. + * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative. + * @param {PathImpl} path Path-handling implementation + * @returns {Array} A flattened array containing only config objects. + * @throws {TypeError} When a config function returns a function. + */ +function normalizeSync( + items, + context, + extraConfigTypes, + namespacedBasePath, + path, +) { + const allowFunctions = extraConfigTypes.includes("function"); + const allowArrays = extraConfigTypes.includes("array"); + + function* flatTraverse(array) { + for (let item of array) { + if (typeof item === "function") { + if (!allowFunctions) { + throw new TypeError("Unexpected function."); + } + + item = item(context); + if (item.then) { + throw new TypeError( + "Async config functions are not supported.", + ); + } + } + + if (Array.isArray(item)) { + if (!allowArrays) { + throw new TypeError("Unexpected array."); + } + + yield* flatTraverse(item); + } else if (typeof item === "function") { + throw new TypeError( + "A config function can only return an object or array.", + ); + } else { + yield item; + } + } + } + + const configs = []; + + for (const config of flatTraverse(items)) { + configs.push(normalizeConfigPatterns(config, namespacedBasePath, path)); + } + + return configs; +} + +/** + * Converts a given path to a relative path with all separator characters replaced by forward slashes (`"/"`). + * @param {string} fileOrDirPath The unprocessed path to convert. + * @param {string} namespacedBasePath The namespaced base path of the directory to which the calculated path shall be relative. + * @param {PathImpl} path Path-handling implementations. + * @returns {string} A relative path with all separator characters replaced by forward slashes. + */ +function toRelativePath(fileOrDirPath, namespacedBasePath, path) { + const fullPath = path.resolve(namespacedBasePath, fileOrDirPath); + const namespacedFullPath = path.toNamespacedPath(fullPath); + const relativePath = path.relative(namespacedBasePath, namespacedFullPath); + return relativePath.replaceAll(path.SEPARATOR, "/"); +} + +/** + * Determines if a given file path should be ignored based on the given + * matcher. + * @param {Array<{ basePath?: string, ignores: Array boolean)>}>} configs Configuration objects containing `ignores`. + * @param {string} filePath The unprocessed file path to check. + * @param {string} relativeFilePath The path of the file to check relative to the base path, + * using forward slash (`"/"`) as a separator. + * @param {Object} [basePathData] Additional data needed to recalculate paths for configuration objects + * that have `basePath` property. + * @param {string} [basePathData.basePath] Namespaced path to witch `relativeFilePath` is relative. + * @param {PathImpl} [basePathData.path] Path-handling implementation. + * @returns {boolean} True if the path should be ignored and false if not. + */ +function shouldIgnorePath( + configs, + filePath, + relativeFilePath, + { basePath, path } = {}, +) { + let shouldIgnore = false; + + for (const config of configs) { + let relativeFilePathToCheck = relativeFilePath; + if (config.basePath) { + relativeFilePathToCheck = toRelativePath( + path.resolve(basePath, relativeFilePath), + config.basePath, + path, + ); + + if ( + relativeFilePathToCheck === "" || + EXTERNAL_PATH_REGEX.test(relativeFilePathToCheck) + ) { + continue; + } + + if (relativeFilePath.endsWith("/")) { + relativeFilePathToCheck += "/"; + } + } + shouldIgnore = config.ignores.reduce((ignored, matcher) => { + if (!ignored) { + if (typeof matcher === "function") { + return matcher(filePath); + } + + // don't check negated patterns because we're not ignored yet + if (!matcher.startsWith("!")) { + return doMatch(relativeFilePathToCheck, matcher); + } + + // otherwise we're still not ignored + return false; + } + + // only need to check negated patterns because we're ignored + if (typeof matcher === "string" && matcher.startsWith("!")) { + return !doMatch(relativeFilePathToCheck, matcher, { + flipNegate: true, + }); + } + + return ignored; + }, shouldIgnore); + } + + return shouldIgnore; +} + +/** + * Determines if a given file path is matched by a config. If the config + * has no `files` field, then it matches; otherwise, if a `files` field + * is present then we match the globs in `files` and exclude any globs in + * `ignores`. + * @param {string} filePath The unprocessed file path to check. + * @param {string} relativeFilePath The path of the file to check relative to the base path, + * using forward slash (`"/"`) as a separator. + * @param {Object} config The config object to check. + * @returns {boolean} True if the file path is matched by the config, + * false if not. + */ +function pathMatches(filePath, relativeFilePath, config) { + // match both strings and functions + function match(pattern) { + if (isString(pattern)) { + return doMatch(relativeFilePath, pattern); + } + + if (typeof pattern === "function") { + return pattern(filePath); + } + + throw new TypeError(`Unexpected matcher type ${pattern}.`); + } + + // check for all matches to config.files + let filePathMatchesPattern = config.files.some(pattern => { + if (Array.isArray(pattern)) { + return pattern.every(match); + } + + return match(pattern); + }); + + /* + * If the file path matches the config.files patterns, then check to see + * if there are any files to ignore. + */ + if (filePathMatchesPattern && config.ignores) { + /* + * Pass config object without `basePath`, because `relativeFilePath` is already + * calculated as relative to it. + */ + filePathMatchesPattern = !shouldIgnorePath( + [{ ignores: config.ignores }], + filePath, + relativeFilePath, + ); + } + + return filePathMatchesPattern; +} + +/** + * Ensures that a ConfigArray has been normalized. + * @param {ConfigArray} configArray The ConfigArray to check. + * @returns {void} + * @throws {Error} When the `ConfigArray` is not normalized. + */ +function assertNormalized(configArray) { + // TODO: Throw more verbose error + if (!configArray.isNormalized()) { + throw new Error( + "ConfigArray must be normalized to perform this operation.", + ); + } +} + +/** + * Ensures that config types are valid. + * @param {Array} extraConfigTypes The config types to check. + * @returns {void} + * @throws {TypeError} When the config types array is invalid. + */ +function assertExtraConfigTypes(extraConfigTypes) { + if (extraConfigTypes.length > 2) { + throw new TypeError( + "configTypes must be an array with at most two items.", + ); + } + + for (const configType of extraConfigTypes) { + if (!CONFIG_TYPES.has(configType)) { + throw new TypeError( + `Unexpected config type "${configType}" found. Expected one of: "object", "array", "function".`, + ); + } + } +} + +/** + * Returns path-handling implementations for Unix or Windows, depending on a given absolute path. + * @param {string} fileOrDirPath The absolute path to check. + * @returns {PathImpl} Path-handling implementations for the specified path. + * @throws {Error} An error is thrown if the specified argument is not an absolute path. + */ +function getPathImpl(fileOrDirPath) { + // Posix absolute paths always start with a slash. + if (fileOrDirPath.startsWith("/")) { + return posixPath__namespace; + } + + // Windows absolute paths start with a letter followed by a colon and at least one backslash, + // or with two backslashes in the case of UNC paths. + // Forward slashed are automatically normalized to backslashes. + if (/^(?:[A-Za-z]:[/\\]|[/\\]{2})/u.test(fileOrDirPath)) { + return windowsPath__namespace; + } + + throw new Error( + `Expected an absolute path but received "${fileOrDirPath}"`, + ); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +const ConfigArraySymbol = { + isNormalized: Symbol("isNormalized"), + configCache: Symbol("configCache"), + schema: Symbol("schema"), + finalizeConfig: Symbol("finalizeConfig"), + preprocessConfig: Symbol("preprocessConfig"), +}; + +// used to store calculate data for faster lookup +const dataCache = new WeakMap(); + +/** + * Represents an array of config objects and provides method for working with + * those config objects. + */ +class ConfigArray extends Array { + /** + * The namespaced path of the config file directory. + * @type {string} + */ + #namespacedBasePath; + + /** + * Path-handling implementations. + * @type {PathImpl} + */ + #path; + + /** + * Creates a new instance of ConfigArray. + * @param {Iterable|Function|Object} configs An iterable yielding config + * objects, or a config function, or a config object. + * @param {Object} options The options for the ConfigArray. + * @param {string} [options.basePath="/"] The absolute path of the config file directory. + * Defaults to `"/"`. + * @param {boolean} [options.normalized=false] Flag indicating if the + * configs have already been normalized. + * @param {Object} [options.schema] The additional schema + * definitions to use for the ConfigArray schema. + * @param {Array} [options.extraConfigTypes] List of config types supported. + * @throws {TypeError} When the `basePath` is not a non-empty string, + */ + constructor( + configs, + { + basePath = "/", + normalized = false, + schema: customSchema, + extraConfigTypes = [], + } = {}, + ) { + super(); + + /** + * Tracks if the array has been normalized. + * @property isNormalized + * @type {boolean} + * @private + */ + this[ConfigArraySymbol.isNormalized] = normalized; + + /** + * The schema used for validating and merging configs. + * @property schema + * @type {ObjectSchemaInstance} + * @private + */ + this[ConfigArraySymbol.schema] = new objectSchema.ObjectSchema( + Object.assign({}, customSchema, baseSchema), + ); + + if (!isString(basePath) || !basePath) { + throw new TypeError("basePath must be a non-empty string"); + } + + /** + * The path of the config file that this array was loaded from. + * This is used to calculate filename matches. + * @property basePath + * @type {string} + */ + this.basePath = basePath; + + assertExtraConfigTypes(extraConfigTypes); + + /** + * The supported config types. + * @type {Array} + */ + this.extraConfigTypes = [...extraConfigTypes]; + Object.freeze(this.extraConfigTypes); + + /** + * A cache to store calculated configs for faster repeat lookup. + * @property configCache + * @type {Map} + * @private + */ + this[ConfigArraySymbol.configCache] = new Map(); + + // init cache + dataCache.set(this, { + explicitMatches: new Map(), + directoryMatches: new Map(), + files: undefined, + ignores: undefined, + }); + + // load the configs into this array + if (Array.isArray(configs)) { + this.push(...configs); + } else { + this.push(configs); + } + + // select path-handling implementations depending on the base path + this.#path = getPathImpl(basePath); + + // On Windows, `path.relative()` returns an absolute path when given two paths on different drives. + // The namespaced base path is useful to make sure that calculated relative paths are always relative. + // On Unix, it is identical to the base path. + this.#namespacedBasePath = this.#path.toNamespacedPath(basePath); + } + + /** + * Prevent normal array methods from creating a new `ConfigArray` instance. + * This is to ensure that methods such as `slice()` won't try to create a + * new instance of `ConfigArray` behind the scenes as doing so may throw + * an error due to the different constructor signature. + * @type {ArrayConstructor} The `Array` constructor. + */ + static get [Symbol.species]() { + return Array; + } + + /** + * Returns the `files` globs from every config object in the array. + * This can be used to determine which files will be matched by a + * config array or to use as a glob pattern when no patterns are provided + * for a command line interface. + * @returns {Array} An array of matchers. + */ + get files() { + assertNormalized(this); + + // if this data has been cached, retrieve it + const cache = dataCache.get(this); + + if (cache.files) { + return cache.files; + } + + // otherwise calculate it + + const result = []; + + for (const config of this) { + if (config.files) { + config.files.forEach(filePattern => { + result.push(filePattern); + }); + } + } + + // store result + cache.files = result; + dataCache.set(this, cache); + + return result; + } + + /** + * Returns ignore matchers that should always be ignored regardless of + * the matching `files` fields in any configs. This is necessary to mimic + * the behavior of things like .gitignore and .eslintignore, allowing a + * globbing operation to be faster. + * @returns {Object[]} An array of config objects representing global ignores. + */ + get ignores() { + assertNormalized(this); + + // if this data has been cached, retrieve it + const cache = dataCache.get(this); + + if (cache.ignores) { + return cache.ignores; + } + + // otherwise calculate it + + const result = []; + + for (const config of this) { + /* + * We only count ignores if there are no other keys in the object. + * In this case, it acts list a globally ignored pattern. If there + * are additional keys, then ignores act like exclusions. + */ + if ( + config.ignores && + Object.keys(config).filter(key => !META_FIELDS.has(key)) + .length === 1 + ) { + result.push(config); + } + } + + // store result + cache.ignores = result; + dataCache.set(this, cache); + + return result; + } + + /** + * Indicates if the config array has been normalized. + * @returns {boolean} True if the config array is normalized, false if not. + */ + isNormalized() { + return this[ConfigArraySymbol.isNormalized]; + } + + /** + * Normalizes a config array by flattening embedded arrays and executing + * config functions. + * @param {Object} [context] The context object for config functions. + * @returns {Promise} The current ConfigArray instance. + */ + async normalize(context = {}) { + if (!this.isNormalized()) { + const normalizedConfigs = await normalize( + this, + context, + this.extraConfigTypes, + this.#namespacedBasePath, + this.#path, + ); + this.length = 0; + this.push( + ...normalizedConfigs.map( + this[ConfigArraySymbol.preprocessConfig].bind(this), + ), + ); + this.forEach(assertValidBaseConfig); + this[ConfigArraySymbol.isNormalized] = true; + + // prevent further changes + Object.freeze(this); + } + + return this; + } + + /** + * Normalizes a config array by flattening embedded arrays and executing + * config functions. + * @param {Object} [context] The context object for config functions. + * @returns {ConfigArray} The current ConfigArray instance. + */ + normalizeSync(context = {}) { + if (!this.isNormalized()) { + const normalizedConfigs = normalizeSync( + this, + context, + this.extraConfigTypes, + this.#namespacedBasePath, + this.#path, + ); + this.length = 0; + this.push( + ...normalizedConfigs.map( + this[ConfigArraySymbol.preprocessConfig].bind(this), + ), + ); + this.forEach(assertValidBaseConfig); + this[ConfigArraySymbol.isNormalized] = true; + + // prevent further changes + Object.freeze(this); + } + + return this; + } + + /* eslint-disable class-methods-use-this -- Desired as instance methods */ + + /** + * Finalizes the state of a config before being cached and returned by + * `getConfig()`. Does nothing by default but is provided to be + * overridden by subclasses as necessary. + * @param {Object} config The config to finalize. + * @returns {Object} The finalized config. + */ + [ConfigArraySymbol.finalizeConfig](config) { + return config; + } + + /** + * Preprocesses a config during the normalization process. This is the + * method to override if you want to convert an array item before it is + * validated for the first time. For example, if you want to replace a + * string with an object, this is the method to override. + * @param {Object} config The config to preprocess. + * @returns {Object} The config to use in place of the argument. + */ + [ConfigArraySymbol.preprocessConfig](config) { + return config; + } + + /* eslint-enable class-methods-use-this -- Desired as instance methods */ + + /** + * Returns the config object for a given file path and a status that can be used to determine why a file has no config. + * @param {string} filePath The path of a file to get a config for. + * @returns {{ config?: Object, status: "ignored"|"external"|"unconfigured"|"matched" }} + * An object with an optional property `config` and property `status`. + * `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig}, + * `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}. + */ + getConfigWithStatus(filePath) { + assertNormalized(this); + + const cache = this[ConfigArraySymbol.configCache]; + + // first check the cache for a filename match to avoid duplicate work + if (cache.has(filePath)) { + return cache.get(filePath); + } + + // check to see if the file is outside the base path + + const relativeToBaseFilePath = toRelativePath( + filePath, + this.#namespacedBasePath, + this.#path, + ); + + if (EXTERNAL_PATH_REGEX.test(relativeToBaseFilePath)) { + debug(`No config for file ${filePath} outside of base path`); + + // cache and return result + cache.set(filePath, CONFIG_WITH_STATUS_EXTERNAL); + return CONFIG_WITH_STATUS_EXTERNAL; + } + + // next check to see if the file should be ignored + + // check if this should be ignored due to its directory + if (this.isDirectoryIgnored(this.#path.dirname(filePath))) { + debug(`Ignoring ${filePath} based on directory pattern`); + + // cache and return result + cache.set(filePath, CONFIG_WITH_STATUS_IGNORED); + return CONFIG_WITH_STATUS_IGNORED; + } + + if ( + shouldIgnorePath(this.ignores, filePath, relativeToBaseFilePath, { + basePath: this.#namespacedBasePath, + path: this.#path, + }) + ) { + debug(`Ignoring ${filePath} based on file pattern`); + + // cache and return result + cache.set(filePath, CONFIG_WITH_STATUS_IGNORED); + return CONFIG_WITH_STATUS_IGNORED; + } + + // filePath isn't automatically ignored, so try to construct config + + const matchingConfigIndices = []; + let matchFound = false; + const universalPattern = /^\*$|^!|\/\*{1,2}$/u; + + this.forEach((config, index) => { + const relativeFilePath = config.basePath + ? toRelativePath( + this.#path.resolve(this.#namespacedBasePath, filePath), + config.basePath, + this.#path, + ) + : relativeToBaseFilePath; + + if (config.basePath && EXTERNAL_PATH_REGEX.test(relativeFilePath)) { + debug( + `Skipped config found for ${filePath} (based on config's base path: ${config.basePath}`, + ); + return; + } + + if (!config.files) { + if (!config.ignores) { + debug(`Universal config found for ${filePath}`); + matchingConfigIndices.push(index); + return; + } + + if ( + Object.keys(config).filter(key => !META_FIELDS.has(key)) + .length === 1 + ) { + debug( + `Skipped config found for ${filePath} (global ignores)`, + ); + return; + } + + /* + * Pass config object without `basePath`, because `relativeFilePath` is already + * calculated as relative to it. + */ + if ( + shouldIgnorePath( + [{ ignores: config.ignores }], + filePath, + relativeFilePath, + ) + ) { + debug( + `Skipped config found for ${filePath} (based on ignores: ${config.ignores})`, + ); + return; + } + + debug( + `Matching config found for ${filePath} (based on ignores: ${config.ignores})`, + ); + matchingConfigIndices.push(index); + return; + } + + /* + * If a config has a files pattern * or patterns ending in /** or /*, + * and the filePath only matches those patterns, then the config is only + * applied if there is another config where the filePath matches + * a file with a specific extensions such as *.js. + */ + + const nonUniversalFiles = []; + const universalFiles = config.files.filter(element => { + if (Array.isArray(element)) { + /* + * filePath matches an element that is an array only if it matches + * all patterns in it (AND operation). Therefore, if there is at least + * one non-universal pattern in the array, and filePath matches the array, + * then we know for sure that filePath matches at least one non-universal + * pattern, so we can consider the entire array to be non-universal. + * In other words, all patterns in the array need to be universal + * for it to be considered universal. + */ + if ( + element.every(pattern => universalPattern.test(pattern)) + ) { + return true; + } + + nonUniversalFiles.push(element); + return false; + } + + // element is a string + + if (universalPattern.test(element)) { + return true; + } + + nonUniversalFiles.push(element); + return false; + }); + + // universal patterns were found so we need to check the config twice + if (universalFiles.length) { + debug("Universal files patterns found. Checking carefully."); + + // check that the config matches without the non-universal files first + if ( + nonUniversalFiles.length && + pathMatches(filePath, relativeFilePath, { + files: nonUniversalFiles, + ignores: config.ignores, + }) + ) { + debug(`Matching config found for ${filePath}`); + matchingConfigIndices.push(index); + matchFound = true; + return; + } + + // if there wasn't a match then check if it matches with universal files + if ( + universalFiles.length && + pathMatches(filePath, relativeFilePath, { + files: universalFiles, + ignores: config.ignores, + }) + ) { + debug(`Matching config found for ${filePath}`); + matchingConfigIndices.push(index); + return; + } + + // if we make here, then there was no match + return; + } + + // the normal case + if (pathMatches(filePath, relativeFilePath, config)) { + debug(`Matching config found for ${filePath}`); + matchingConfigIndices.push(index); + matchFound = true; + } + }); + + // if matching both files and ignores, there will be no config to create + if (!matchFound) { + debug(`No matching configs found for ${filePath}`); + + // cache and return result + cache.set(filePath, CONFIG_WITH_STATUS_UNCONFIGURED); + return CONFIG_WITH_STATUS_UNCONFIGURED; + } + + // check to see if there is a config cached by indices + const indicesKey = matchingConfigIndices.toString(); + let configWithStatus = cache.get(indicesKey); + + if (configWithStatus) { + // also store for filename for faster lookup next time + cache.set(filePath, configWithStatus); + + return configWithStatus; + } + + // otherwise construct the config + + // eslint-disable-next-line array-callback-return, consistent-return -- rethrowConfigError always throws an error + let finalConfig = matchingConfigIndices.reduce((result, index) => { + try { + return this[ConfigArraySymbol.schema].merge( + result, + this[index], + ); + } catch (validationError) { + rethrowConfigError(this[index], index, validationError); + } + }, {}); + + finalConfig = this[ConfigArraySymbol.finalizeConfig](finalConfig); + + configWithStatus = Object.freeze({ + config: finalConfig, + status: "matched", + }); + cache.set(filePath, configWithStatus); + cache.set(indicesKey, configWithStatus); + + return configWithStatus; + } + + /** + * Returns the config object for a given file path. + * @param {string} filePath The path of a file to get a config for. + * @returns {Object|undefined} The config object for this file or `undefined`. + */ + getConfig(filePath) { + return this.getConfigWithStatus(filePath).config; + } + + /** + * Determines whether a file has a config or why it doesn't. + * @param {string} filePath The path of the file to check. + * @returns {"ignored"|"external"|"unconfigured"|"matched"} One of the following values: + * * `"ignored"`: the file is ignored + * * `"external"`: the file is outside the base path + * * `"unconfigured"`: the file is not matched by any config + * * `"matched"`: the file has a matching config + */ + getConfigStatus(filePath) { + return this.getConfigWithStatus(filePath).status; + } + + /** + * Determines if the given filepath is ignored based on the configs. + * @param {string} filePath The path of a file to check. + * @returns {boolean} True if the path is ignored, false if not. + * @deprecated Use `isFileIgnored` instead. + */ + isIgnored(filePath) { + return this.isFileIgnored(filePath); + } + + /** + * Determines if the given filepath is ignored based on the configs. + * @param {string} filePath The path of a file to check. + * @returns {boolean} True if the path is ignored, false if not. + */ + isFileIgnored(filePath) { + return this.getConfigStatus(filePath) === "ignored"; + } + + /** + * Determines if the given directory is ignored based on the configs. + * This checks only default `ignores` that don't have `files` in the + * same config. A pattern such as `/foo` be considered to ignore the directory + * while a pattern such as `/foo/**` is not considered to ignore the + * directory because it is matching files. + * @param {string} directoryPath The path of a directory to check. + * @returns {boolean} True if the directory is ignored, false if not. Will + * return true for any directory that is not inside of `basePath`. + * @throws {Error} When the `ConfigArray` is not normalized. + */ + isDirectoryIgnored(directoryPath) { + assertNormalized(this); + + const relativeDirectoryPath = toRelativePath( + directoryPath, + this.#namespacedBasePath, + this.#path, + ); + + // basePath directory can never be ignored + if (relativeDirectoryPath === "") { + return false; + } + + if (EXTERNAL_PATH_REGEX.test(relativeDirectoryPath)) { + return true; + } + + // first check the cache + const cache = dataCache.get(this).directoryMatches; + + if (cache.has(relativeDirectoryPath)) { + return cache.get(relativeDirectoryPath); + } + + const directoryParts = relativeDirectoryPath.split("/"); + let relativeDirectoryToCheck = ""; + let result; + + /* + * In order to get the correct gitignore-style ignores, where an + * ignored parent directory cannot have any descendants unignored, + * we need to check every directory starting at the parent all + * the way down to the actual requested directory. + * + * We aggressively cache all of this info to make sure we don't + * have to recalculate everything for every call. + */ + do { + relativeDirectoryToCheck += `${directoryParts.shift()}/`; + + result = shouldIgnorePath( + this.ignores, + this.#path.join(this.basePath, relativeDirectoryToCheck), + relativeDirectoryToCheck, + { + basePath: this.#namespacedBasePath, + path: this.#path, + }, + ); + + cache.set(relativeDirectoryToCheck, result); + } while (!result && directoryParts.length); + + // also cache the result for the requested path + cache.set(relativeDirectoryPath, result); + + return result; + } +} + +Object.defineProperty(exports, "ObjectSchema", { + enumerable: true, + get: function () { return objectSchema.ObjectSchema; } +}); +exports.ConfigArray = ConfigArray; +exports.ConfigArraySymbol = ConfigArraySymbol; diff --git a/slider/node_modules/@eslint/config-array/dist/cjs/index.d.cts b/slider/node_modules/@eslint/config-array/dist/cjs/index.d.cts new file mode 100644 index 0000000..f060557 --- /dev/null +++ b/slider/node_modules/@eslint/config-array/dist/cjs/index.d.cts @@ -0,0 +1,143 @@ +export { ObjectSchema } from "@eslint/object-schema"; +export type PropertyDefinition = import("@eslint/object-schema").PropertyDefinition; +export type ObjectDefinition = import("@eslint/object-schema").ObjectDefinition; +export type ConfigObject = import("./types.cts").ConfigObject; +export type IMinimatchStatic = import("minimatch").IMinimatchStatic; +export type IMinimatch = import("minimatch").IMinimatch; +export type PathImpl = typeof import("@jsr/std__path"); +export type ObjectSchemaInstance = import("@eslint/object-schema").ObjectSchema; +/** + * Represents an array of config objects and provides method for working with + * those config objects. + */ +export class ConfigArray extends Array { + [x: symbol]: (config: any) => any; + /** + * Creates a new instance of ConfigArray. + * @param {Iterable|Function|Object} configs An iterable yielding config + * objects, or a config function, or a config object. + * @param {Object} options The options for the ConfigArray. + * @param {string} [options.basePath="/"] The absolute path of the config file directory. + * Defaults to `"/"`. + * @param {boolean} [options.normalized=false] Flag indicating if the + * configs have already been normalized. + * @param {Object} [options.schema] The additional schema + * definitions to use for the ConfigArray schema. + * @param {Array} [options.extraConfigTypes] List of config types supported. + * @throws {TypeError} When the `basePath` is not a non-empty string, + */ + constructor(configs: Iterable | Function | any, { basePath, normalized, schema: customSchema, extraConfigTypes, }?: { + basePath?: string; + normalized?: boolean; + schema?: any; + extraConfigTypes?: Array; + }); + /** + * The path of the config file that this array was loaded from. + * This is used to calculate filename matches. + * @property basePath + * @type {string} + */ + basePath: string; + /** + * The supported config types. + * @type {Array} + */ + extraConfigTypes: Array; + /** + * Returns the `files` globs from every config object in the array. + * This can be used to determine which files will be matched by a + * config array or to use as a glob pattern when no patterns are provided + * for a command line interface. + * @returns {Array} An array of matchers. + */ + get files(): Array; + /** + * Returns ignore matchers that should always be ignored regardless of + * the matching `files` fields in any configs. This is necessary to mimic + * the behavior of things like .gitignore and .eslintignore, allowing a + * globbing operation to be faster. + * @returns {Object[]} An array of config objects representing global ignores. + */ + get ignores(): any[]; + /** + * Indicates if the config array has been normalized. + * @returns {boolean} True if the config array is normalized, false if not. + */ + isNormalized(): boolean; + /** + * Normalizes a config array by flattening embedded arrays and executing + * config functions. + * @param {Object} [context] The context object for config functions. + * @returns {Promise} The current ConfigArray instance. + */ + normalize(context?: any): Promise; + /** + * Normalizes a config array by flattening embedded arrays and executing + * config functions. + * @param {Object} [context] The context object for config functions. + * @returns {ConfigArray} The current ConfigArray instance. + */ + normalizeSync(context?: any): ConfigArray; + /** + * Returns the config object for a given file path and a status that can be used to determine why a file has no config. + * @param {string} filePath The path of a file to get a config for. + * @returns {{ config?: Object, status: "ignored"|"external"|"unconfigured"|"matched" }} + * An object with an optional property `config` and property `status`. + * `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig}, + * `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}. + */ + getConfigWithStatus(filePath: string): { + config?: any; + status: "ignored" | "external" | "unconfigured" | "matched"; + }; + /** + * Returns the config object for a given file path. + * @param {string} filePath The path of a file to get a config for. + * @returns {Object|undefined} The config object for this file or `undefined`. + */ + getConfig(filePath: string): any | undefined; + /** + * Determines whether a file has a config or why it doesn't. + * @param {string} filePath The path of the file to check. + * @returns {"ignored"|"external"|"unconfigured"|"matched"} One of the following values: + * * `"ignored"`: the file is ignored + * * `"external"`: the file is outside the base path + * * `"unconfigured"`: the file is not matched by any config + * * `"matched"`: the file has a matching config + */ + getConfigStatus(filePath: string): "ignored" | "external" | "unconfigured" | "matched"; + /** + * Determines if the given filepath is ignored based on the configs. + * @param {string} filePath The path of a file to check. + * @returns {boolean} True if the path is ignored, false if not. + * @deprecated Use `isFileIgnored` instead. + */ + isIgnored(filePath: string): boolean; + /** + * Determines if the given filepath is ignored based on the configs. + * @param {string} filePath The path of a file to check. + * @returns {boolean} True if the path is ignored, false if not. + */ + isFileIgnored(filePath: string): boolean; + /** + * Determines if the given directory is ignored based on the configs. + * This checks only default `ignores` that don't have `files` in the + * same config. A pattern such as `/foo` be considered to ignore the directory + * while a pattern such as `/foo/**` is not considered to ignore the + * directory because it is matching files. + * @param {string} directoryPath The path of a directory to check. + * @returns {boolean} True if the directory is ignored, false if not. Will + * return true for any directory that is not inside of `basePath`. + * @throws {Error} When the `ConfigArray` is not normalized. + */ + isDirectoryIgnored(directoryPath: string): boolean; + #private; +} +export namespace ConfigArraySymbol { + let isNormalized: symbol; + let configCache: symbol; + let schema: symbol; + let finalizeConfig: symbol; + let preprocessConfig: symbol; +} diff --git a/slider/node_modules/@eslint/config-array/dist/cjs/std__path/posix.cjs b/slider/node_modules/@eslint/config-array/dist/cjs/std__path/posix.cjs new file mode 100644 index 0000000..c119b91 --- /dev/null +++ b/slider/node_modules/@eslint/config-array/dist/cjs/std__path/posix.cjs @@ -0,0 +1,1335 @@ +'use strict'; + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +function assertPath(path) { + if (typeof path !== "string") { + throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function stripSuffix(name, suffix) { + if (suffix.length >= name.length) { + return name; + } + const lenDiff = name.length - suffix.length; + for(let i = suffix.length - 1; i >= 0; --i){ + if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) { + return name; + } + } + return name.slice(0, -suffix.length); +} +function lastPathSegment(path, isSep, start = 0) { + let matchedNonSeparator = false; + let end = path.length; + for(let i = path.length - 1; i >= start; --i){ + if (isSep(path.charCodeAt(i))) { + if (matchedNonSeparator) { + start = i + 1; + break; + } + } else if (!matchedNonSeparator) { + matchedNonSeparator = true; + end = i + 1; + } + } + return path.slice(start, end); +} +function assertArgs$1(path, suffix) { + assertPath(path); + if (path.length === 0) return path; + if (typeof suffix !== "string") { + throw new TypeError(`Suffix must be a string, received "${JSON.stringify(suffix)}"`); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArg$3(url) { + url = url instanceof URL ? url : new URL(url); + if (url.protocol !== "file:") { + throw new TypeError(`URL must be a file URL: received "${url.protocol}"`); + } + return url; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Converts a file URL to a path string. + * + * @example Usage + * ```ts + * import { fromFileUrl } from "@std/path/posix/from-file-url"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(fromFileUrl(new URL("file:///home/foo")), "/home/foo"); + * ``` + * + * @param url The file URL to convert. + * @returns The path string. + */ function fromFileUrl(url) { + url = assertArg$3(url); + return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25")); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +function stripTrailingSeparators(segment, isSep) { + if (segment.length <= 1) { + return segment; + } + let end = segment.length; + for(let i = segment.length - 1; i > 0; i--){ + if (isSep(segment.charCodeAt(i))) { + end = i; + } else { + break; + } + } + return segment.slice(0, end); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +// Alphabet chars. +// Non-alphabetic chars. +const CHAR_DOT = 46; /* . */ +const CHAR_FORWARD_SLASH = 47; /* / */ + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +function isPosixPathSeparator(code) { + return code === CHAR_FORWARD_SLASH; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the last portion of a `path`. + * Trailing directory separators are ignored, and optional suffix is removed. + * + * @example Usage + * ```ts + * import { basename } from "@std/path/posix/basename"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(basename("/home/user/Documents/"), "Documents"); + * assertEquals(basename("/home/user/Documents/image.png"), "image.png"); + * assertEquals(basename("/home/user/Documents/image.png", ".png"), "image"); + * assertEquals(basename(new URL("file:///home/user/Documents/image.png")), "image.png"); + * assertEquals(basename(new URL("file:///home/user/Documents/image.png"), ".png"), "image"); + * ``` + * + * @example Working with URLs + * + * Note: This function doesn't automatically strip hash and query parts from + * URLs. If your URL contains a hash or query, remove them before passing the + * URL to the function. This can be done by passing the URL to `new URL(url)`, + * and setting the `hash` and `search` properties to empty strings. + * + * ```ts + * import { basename } from "@std/path/posix/basename"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(basename("https://deno.land/std/path/mod.ts"), "mod.ts"); + * assertEquals(basename("https://deno.land/std/path/mod.ts", ".ts"), "mod"); + * assertEquals(basename("https://deno.land/std/path/mod.ts?a=b"), "mod.ts?a=b"); + * assertEquals(basename("https://deno.land/std/path/mod.ts#header"), "mod.ts#header"); + * ``` + * + * @param path The path to extract the name from. + * @param suffix The suffix to remove from extracted name. + * @returns The extracted name. + */ function basename(path, suffix = "") { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertArgs$1(path, suffix); + const lastSegment = lastPathSegment(path, isPosixPathSeparator); + const strippedSegment = stripTrailingSeparators(lastSegment, isPosixPathSeparator); + return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * The character used to separate entries in the PATH environment variable. + */ const DELIMITER = ":"; +/** + * The character used to separate components of a file path. + */ const SEPARATOR = "/"; +/** + * A regular expression that matches one or more path separators. + */ const SEPARATOR_PATTERN = /\/+/; + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArg$2(path) { + assertPath(path); + if (path.length === 0) return "."; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the directory path of a `path`. + * + * @example Usage + * ```ts + * import { dirname } from "@std/path/posix/dirname"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(dirname("/home/user/Documents/"), "/home/user"); + * assertEquals(dirname("/home/user/Documents/image.png"), "/home/user/Documents"); + * assertEquals(dirname("https://deno.land/std/path/mod.ts"), "https://deno.land/std/path"); + * assertEquals(dirname(new URL("file:///home/user/Documents/image.png")), "/home/user/Documents"); + * ``` + * + * @example Working with URLs + * + * ```ts + * import { dirname } from "@std/path/posix/dirname"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(dirname("https://deno.land/std/path/mod.ts"), "https://deno.land/std/path"); + * assertEquals(dirname("https://deno.land/std/path/mod.ts?a=b"), "https://deno.land/std/path"); + * assertEquals(dirname("https://deno.land/std/path/mod.ts#header"), "https://deno.land/std/path"); + * ``` + * + * @param path The path to get the directory from. + * @returns The directory path. + */ function dirname(path) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertArg$2(path); + let end = -1; + let matchedNonSeparator = false; + for(let i = path.length - 1; i >= 1; --i){ + if (isPosixPathSeparator(path.charCodeAt(i))) { + if (matchedNonSeparator) { + end = i; + break; + } + } else { + matchedNonSeparator = true; + } + } + // No matches. Fallback based on provided path: + // + // - leading slashes paths + // "/foo" => "/" + // "///foo" => "/" + // - no slash path + // "foo" => "." + if (end === -1) { + return isPosixPathSeparator(path.charCodeAt(0)) ? "/" : "."; + } + return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the extension of the `path` with leading period. + * + * @example Usage + * ```ts + * import { extname } from "@std/path/posix/extname"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(extname("/home/user/Documents/file.ts"), ".ts"); + * assertEquals(extname("/home/user/Documents/"), ""); + * assertEquals(extname("/home/user/Documents/image.png"), ".png"); + * assertEquals(extname(new URL("file:///home/user/Documents/file.ts")), ".ts"); + * assertEquals(extname(new URL("file:///home/user/Documents/file.ts?a=b")), ".ts"); + * assertEquals(extname(new URL("file:///home/user/Documents/file.ts#header")), ".ts"); + * ``` + * + * @example Working with URLs + * + * Note: This function doesn't automatically strip hash and query parts from + * URLs. If your URL contains a hash or query, remove them before passing the + * URL to the function. This can be done by passing the URL to `new URL(url)`, + * and setting the `hash` and `search` properties to empty strings. + * + * ```ts + * import { extname } from "@std/path/posix/extname"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(extname("https://deno.land/std/path/mod.ts"), ".ts"); + * assertEquals(extname("https://deno.land/std/path/mod.ts?a=b"), ".ts?a=b"); + * assertEquals(extname("https://deno.land/std/path/mod.ts#header"), ".ts#header"); + * ``` + * + * @param path The path to get the extension from. + * @returns The extension (ex. for `file.ts` returns `.ts`). + */ function extname(path) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertPath(path); + let startDot = -1; + let startPart = 0; + let end = -1; + let matchedSlash = true; + // Track the state of characters (if any) we see before our first dot and + // after any path separator we find + let preDotState = 0; + for(let i = path.length - 1; i >= 0; --i){ + const code = path.charCodeAt(i); + if (isPosixPathSeparator(code)) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // extension + matchedSlash = false; + end = i + 1; + } + if (code === CHAR_DOT) { + // If this is our first dot, mark it as the start of our extension + if (startDot === -1) startDot = i; + else if (preDotState !== 1) preDotState = 1; + } else if (startDot !== -1) { + // We saw a non-dot and non-path separator before our dot, so we should + // have a good chance at having a non-empty extension + preDotState = -1; + } + } + if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + return ""; + } + return path.slice(startDot, end); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function _format(sep, pathObject) { + const dir = pathObject.dir || pathObject.root; + const base = pathObject.base || (pathObject.name ?? "") + (pathObject.ext ?? ""); + if (!dir) return base; + if (base === sep) return dir; + if (dir === pathObject.root) return dir + base; + return dir + sep + base; +} +function assertArg$1(pathObject) { + if (pathObject === null || typeof pathObject !== "object") { + throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof pathObject}"`); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Generate a path from `ParsedPath` object. + * + * @example Usage + * ```ts + * import { format } from "@std/path/posix/format"; + * import { assertEquals } from "@std/assert"; + * + * const path = format({ + * root: "/", + * dir: "/path/dir", + * base: "file.txt", + * ext: ".txt", + * name: "file" + * }); + * assertEquals(path, "/path/dir/file.txt"); + * ``` + * + * @param pathObject The path object to format. + * @returns The formatted path. + */ function format(pathObject) { + assertArg$1(pathObject); + return _format("/", pathObject); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Verifies whether provided path is absolute. + * + * @example Usage + * ```ts + * import { isAbsolute } from "@std/path/posix/is-absolute"; + * import { assert, assertFalse } from "@std/assert"; + * + * assert(isAbsolute("/home/user/Documents/")); + * assertFalse(isAbsolute("home/user/Documents/")); + * ``` + * + * @param path The path to verify. + * @returns Whether the path is absolute. + */ function isAbsolute(path) { + assertPath(path); + return path.length > 0 && isPosixPathSeparator(path.charCodeAt(0)); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArg(path) { + assertPath(path); + if (path.length === 0) return "."; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +// Resolves . and .. elements in a path with directory names +function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { + let res = ""; + let lastSegmentLength = 0; + let lastSlash = -1; + let dots = 0; + let code; + for(let i = 0; i <= path.length; ++i){ + if (i < path.length) code = path.charCodeAt(i); + else if (isPathSeparator(code)) break; + else code = CHAR_FORWARD_SLASH; + if (isPathSeparator(code)) { + if (lastSlash === i - 1 || dots === 1) ; else if (lastSlash !== i - 1 && dots === 2) { + if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) { + if (res.length > 2) { + const lastSlashIndex = res.lastIndexOf(separator); + if (lastSlashIndex === -1) { + res = ""; + lastSegmentLength = 0; + } else { + res = res.slice(0, lastSlashIndex); + lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); + } + lastSlash = i; + dots = 0; + continue; + } else if (res.length === 2 || res.length === 1) { + res = ""; + lastSegmentLength = 0; + lastSlash = i; + dots = 0; + continue; + } + } + if (allowAboveRoot) { + if (res.length > 0) res += `${separator}..`; + else res = ".."; + lastSegmentLength = 2; + } + } else { + if (res.length > 0) res += separator + path.slice(lastSlash + 1, i); + else res = path.slice(lastSlash + 1, i); + lastSegmentLength = i - lastSlash - 1; + } + lastSlash = i; + dots = 0; + } else if (code === CHAR_DOT && dots !== -1) { + ++dots; + } else { + dots = -1; + } + } + return res; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Normalize the `path`, resolving `'..'` and `'.'` segments. + * Note that resolving these segments does not necessarily mean that all will be eliminated. + * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`. + * + * @example Usage + * ```ts + * import { normalize } from "@std/path/posix/normalize"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(normalize("/foo/bar//baz/asdf/quux/.."), "/foo/bar/baz/asdf"); + * assertEquals(normalize(new URL("file:///foo/bar//baz/asdf/quux/..")), "/foo/bar/baz/asdf/"); + * ``` + * + * @example Working with URLs + * + * Note: This function will remove the double slashes from a URL's scheme. + * Hence, do not pass a full URL to this function. Instead, pass the pathname of + * the URL. + * + * ```ts + * import { normalize } from "@std/path/posix/normalize"; + * import { assertEquals } from "@std/assert"; + * + * const url = new URL("https://deno.land"); + * url.pathname = normalize("//std//assert//.//mod.ts"); + * assertEquals(url.href, "https://deno.land/std/assert/mod.ts"); + * + * url.pathname = normalize("std/assert/../async/retry.ts"); + * assertEquals(url.href, "https://deno.land/std/async/retry.ts"); + * ``` + * + * @param path The path to normalize. + * @returns The normalized path. + */ function normalize(path) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertArg(path); + const isAbsolute = isPosixPathSeparator(path.charCodeAt(0)); + const trailingSeparator = isPosixPathSeparator(path.charCodeAt(path.length - 1)); + // Normalize the path + path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator); + if (path.length === 0 && !isAbsolute) path = "."; + if (path.length > 0 && trailingSeparator) path += "/"; + if (isAbsolute) return `/${path}`; + return path; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Join all given a sequence of `paths`,then normalizes the resulting path. + * + * @example Usage + * ```ts + * import { join } from "@std/path/posix/join"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(join("/foo", "bar", "baz/asdf", "quux", ".."), "/foo/bar/baz/asdf"); + * assertEquals(join(new URL("file:///foo"), "bar", "baz/asdf", "quux", ".."), "/foo/bar/baz/asdf"); + * ``` + * + * @example Working with URLs + * ```ts + * import { join } from "@std/path/posix/join"; + * import { assertEquals } from "@std/assert"; + * + * const url = new URL("https://deno.land"); + * url.pathname = join("std", "path", "mod.ts"); + * assertEquals(url.href, "https://deno.land/std/path/mod.ts"); + * + * url.pathname = join("//std", "path/", "/mod.ts"); + * assertEquals(url.href, "https://deno.land/std/path/mod.ts"); + * ``` + * + * @param path The path to join. This can be string or file URL. + * @param paths The paths to join. + * @returns The joined path. + */ function join(path, ...paths) { + if (path === undefined) return "."; + if (path instanceof URL) { + path = fromFileUrl(path); + } + paths = path ? [ + path, + ...paths + ] : paths; + paths.forEach((path)=>assertPath(path)); + const joined = paths.filter((path)=>path.length > 0).join("/"); + return joined === "" ? "." : normalize(joined); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return a `ParsedPath` object of the `path`. + * + * @example Usage + * ```ts + * import { parse } from "@std/path/posix/parse"; + * import { assertEquals } from "@std/assert"; + * + * const path = parse("/home/user/file.txt"); + * assertEquals(path, { + * root: "/", + * dir: "/home/user", + * base: "file.txt", + * ext: ".txt", + * name: "file" + * }); + * ``` + * + * @param path The path to parse. + * @returns The parsed path object. + */ function parse(path) { + assertPath(path); + const ret = { + root: "", + dir: "", + base: "", + ext: "", + name: "" + }; + if (path.length === 0) return ret; + const isAbsolute = isPosixPathSeparator(path.charCodeAt(0)); + let start; + if (isAbsolute) { + ret.root = "/"; + start = 1; + } else { + start = 0; + } + let startDot = -1; + let startPart = 0; + let end = -1; + let matchedSlash = true; + let i = path.length - 1; + // Track the state of characters (if any) we see before our first dot and + // after any path separator we find + let preDotState = 0; + // Get non-dir info + for(; i >= start; --i){ + const code = path.charCodeAt(i); + if (isPosixPathSeparator(code)) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // extension + matchedSlash = false; + end = i + 1; + } + if (code === CHAR_DOT) { + // If this is our first dot, mark it as the start of our extension + if (startDot === -1) startDot = i; + else if (preDotState !== 1) preDotState = 1; + } else if (startDot !== -1) { + // We saw a non-dot and non-path separator before our dot, so we should + // have a good chance at having a non-empty extension + preDotState = -1; + } + } + if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + if (end !== -1) { + if (startPart === 0 && isAbsolute) { + ret.base = ret.name = path.slice(1, end); + } else { + ret.base = ret.name = path.slice(startPart, end); + } + } + // Fallback to '/' in case there is no basename + ret.base = ret.base || "/"; + } else { + if (startPart === 0 && isAbsolute) { + ret.name = path.slice(1, startDot); + ret.base = path.slice(1, end); + } else { + ret.name = path.slice(startPart, startDot); + ret.base = path.slice(startPart, end); + } + ret.ext = path.slice(startDot, end); + } + if (startPart > 0) { + ret.dir = stripTrailingSeparators(path.slice(0, startPart - 1), isPosixPathSeparator); + } else if (isAbsolute) ret.dir = "/"; + return ret; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Resolves path segments into a `path`. + * + * @example Usage + * ```ts + * import { resolve } from "@std/path/posix/resolve"; + * import { assertEquals } from "@std/assert"; + * + * const path = resolve("/foo", "bar", "baz/asdf", "quux", ".."); + * assertEquals(path, "/foo/bar/baz/asdf"); + * ``` + * + * @param pathSegments The path segments to resolve. + * @returns The resolved path. + */ function resolve(...pathSegments) { + let resolvedPath = ""; + let resolvedAbsolute = false; + for(let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--){ + let path; + if (i >= 0) path = pathSegments[i]; + else { + // deno-lint-ignore no-explicit-any + const { Deno } = globalThis; + if (typeof Deno?.cwd !== "function") { + throw new TypeError("Resolved a relative path without a current working directory (CWD)"); + } + path = Deno.cwd(); + } + assertPath(path); + // Skip empty entries + if (path.length === 0) { + continue; + } + resolvedPath = `${path}/${resolvedPath}`; + resolvedAbsolute = isPosixPathSeparator(path.charCodeAt(0)); + } + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when Deno.cwd() fails) + // Normalize the path + resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator); + if (resolvedAbsolute) { + if (resolvedPath.length > 0) return `/${resolvedPath}`; + else return "/"; + } else if (resolvedPath.length > 0) return resolvedPath; + else return "."; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArgs(from, to) { + assertPath(from); + assertPath(to); + if (from === to) return ""; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the relative path from `from` to `to` based on current working directory. + * + * If `from` and `to` are the same, return an empty string. + * + * @example Usage + * ```ts + * import { relative } from "@std/path/posix/relative"; + * import { assertEquals } from "@std/assert"; + * + * const path = relative("/data/orandea/test/aaa", "/data/orandea/impl/bbb"); + * assertEquals(path, "../../impl/bbb"); + * ``` + * + * @param from The path to start from. + * @param to The path to reach. + * @returns The relative path. + */ function relative(from, to) { + assertArgs(from, to); + from = resolve(from); + to = resolve(to); + if (from === to) return ""; + // Trim any leading backslashes + let fromStart = 1; + const fromEnd = from.length; + for(; fromStart < fromEnd; ++fromStart){ + if (!isPosixPathSeparator(from.charCodeAt(fromStart))) break; + } + const fromLen = fromEnd - fromStart; + // Trim any leading backslashes + let toStart = 1; + const toEnd = to.length; + for(; toStart < toEnd; ++toStart){ + if (!isPosixPathSeparator(to.charCodeAt(toStart))) break; + } + const toLen = toEnd - toStart; + // Compare paths to find the longest common path from root + const length = fromLen < toLen ? fromLen : toLen; + let lastCommonSep = -1; + let i = 0; + for(; i <= length; ++i){ + if (i === length) { + if (toLen > length) { + if (isPosixPathSeparator(to.charCodeAt(toStart + i))) { + // We get here if `from` is the exact base path for `to`. + // For example: from='/foo/bar'; to='/foo/bar/baz' + return to.slice(toStart + i + 1); + } else if (i === 0) { + // We get here if `from` is the root + // For example: from='/'; to='/foo' + return to.slice(toStart + i); + } + } else if (fromLen > length) { + if (isPosixPathSeparator(from.charCodeAt(fromStart + i))) { + // We get here if `to` is the exact base path for `from`. + // For example: from='/foo/bar/baz'; to='/foo/bar' + lastCommonSep = i; + } else if (i === 0) { + // We get here if `to` is the root. + // For example: from='/foo'; to='/' + lastCommonSep = 0; + } + } + break; + } + const fromCode = from.charCodeAt(fromStart + i); + const toCode = to.charCodeAt(toStart + i); + if (fromCode !== toCode) break; + else if (isPosixPathSeparator(fromCode)) lastCommonSep = i; + } + let out = ""; + // Generate the relative path based on the path difference between `to` + // and `from` + for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){ + if (i === fromEnd || isPosixPathSeparator(from.charCodeAt(i))) { + if (out.length === 0) out += ".."; + else out += "/.."; + } + } + // Lastly, append the rest of the destination (`to`) path that comes after + // the common path parts + if (out.length > 0) return out + to.slice(toStart + lastCommonSep); + else { + toStart += lastCommonSep; + if (isPosixPathSeparator(to.charCodeAt(toStart))) ++toStart; + return to.slice(toStart); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +const WHITESPACE_ENCODINGS = { + "\u0009": "%09", + "\u000A": "%0A", + "\u000B": "%0B", + "\u000C": "%0C", + "\u000D": "%0D", + "\u0020": "%20" +}; +function encodeWhitespace(string) { + return string.replaceAll(/[\s]/g, (c)=>{ + return WHITESPACE_ENCODINGS[c] ?? c; + }); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Converts a path string to a file URL. + * + * @example Usage + * ```ts + * import { toFileUrl } from "@std/path/posix/to-file-url"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(toFileUrl("/home/foo"), new URL("file:///home/foo")); + * assertEquals(toFileUrl("/home/foo bar"), new URL("file:///home/foo%20bar")); + * ``` + * + * @param path The path to convert. + * @returns The file URL. + */ function toFileUrl(path) { + if (!isAbsolute(path)) { + throw new TypeError(`Path must be absolute: received "${path}"`); + } + const url = new URL("file:///"); + url.pathname = encodeWhitespace(path.replace(/%/g, "%25").replace(/\\/g, "%5C")); + return url; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Converts a path to a namespaced path. This function returns the path as is on posix. + * + * @example Usage + * ```ts + * import { toNamespacedPath } from "@std/path/posix/to-namespaced-path"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(toNamespacedPath("/home/foo"), "/home/foo"); + * ``` + * + * @param path The path. + * @returns The namespaced path. + */ function toNamespacedPath(path) { + // Non-op on posix systems + return path; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function common$1(paths, sep) { + const [first = "", ...remaining] = paths; + const parts = first.split(sep); + let endOfPrefix = parts.length; + let append = ""; + for (const path of remaining){ + const compare = path.split(sep); + if (compare.length <= endOfPrefix) { + endOfPrefix = compare.length; + append = ""; + } + for(let i = 0; i < endOfPrefix; i++){ + if (compare[i] !== parts[i]) { + endOfPrefix = i; + append = i === 0 ? "" : sep; + break; + } + } + } + return parts.slice(0, endOfPrefix).join(sep) + append; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** Determines the common path from a set of paths for POSIX systems. + * + * @example Usage + * ```ts + * import { common } from "@std/path/posix/common"; + * import { assertEquals } from "@std/assert"; + * + * const path = common([ + * "./deno/std/path/mod.ts", + * "./deno/std/fs/mod.ts", + * ]); + * assertEquals(path, "./deno/std/"); + * ``` + * + * @param paths The paths to compare. + * @returns The common path. + */ function common(paths) { + return common$1(paths, SEPARATOR); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Options for {@linkcode globToRegExp}, {@linkcode joinGlobs}, + * {@linkcode normalizeGlob} and {@linkcode expandGlob}. + */ const REG_EXP_ESCAPE_CHARS = [ + "!", + "$", + "(", + ")", + "*", + "+", + ".", + "=", + "?", + "[", + "\\", + "^", + "{", + "|" +]; +const RANGE_ESCAPE_CHARS = [ + "-", + "\\", + "]" +]; +function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true, // os = osType, +caseInsensitive = false } = {}) { + if (glob === "") { + return /(?!)/; + } + // Remove trailing separators. + let newLength = glob.length; + for(; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--); + glob = glob.slice(0, newLength); + let regExpString = ""; + // Terminates correctly. Trust that `j` is incremented every iteration. + for(let j = 0; j < glob.length;){ + let segment = ""; + const groupStack = []; + let inRange = false; + let inEscape = false; + let endsWithSep = false; + let i = j; + // Terminates with `i` at the non-inclusive end of the current segment. + for(; i < glob.length && !c.seps.includes(glob[i]); i++){ + if (inEscape) { + inEscape = false; + const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS; + segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; + continue; + } + if (glob[i] === c.escapePrefix) { + inEscape = true; + continue; + } + if (glob[i] === "[") { + if (!inRange) { + inRange = true; + segment += "["; + if (glob[i + 1] === "!") { + i++; + segment += "^"; + } else if (glob[i + 1] === "^") { + i++; + segment += "\\^"; + } + continue; + } else if (glob[i + 1] === ":") { + let k = i + 1; + let value = ""; + while(glob[k + 1] !== undefined && glob[k + 1] !== ":"){ + value += glob[k + 1]; + k++; + } + if (glob[k + 1] === ":" && glob[k + 2] === "]") { + i = k + 2; + if (value === "alnum") segment += "\\dA-Za-z"; + else if (value === "alpha") segment += "A-Za-z"; + else if (value === "ascii") segment += "\x00-\x7F"; + else if (value === "blank") segment += "\t "; + else if (value === "cntrl") segment += "\x00-\x1F\x7F"; + else if (value === "digit") segment += "\\d"; + else if (value === "graph") segment += "\x21-\x7E"; + else if (value === "lower") segment += "a-z"; + else if (value === "print") segment += "\x20-\x7E"; + else if (value === "punct") { + segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~"; + } else if (value === "space") segment += "\\s\v"; + else if (value === "upper") segment += "A-Z"; + else if (value === "word") segment += "\\w"; + else if (value === "xdigit") segment += "\\dA-Fa-f"; + continue; + } + } + } + if (glob[i] === "]" && inRange) { + inRange = false; + segment += "]"; + continue; + } + if (inRange) { + segment += glob[i]; + continue; + } + if (glob[i] === ")" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { + segment += ")"; + const type = groupStack.pop(); + if (type === "!") { + segment += c.wildcard; + } else if (type !== "@") { + segment += type; + } + continue; + } + if (glob[i] === "|" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { + segment += "|"; + continue; + } + if (glob[i] === "+" && extended && glob[i + 1] === "(") { + i++; + groupStack.push("+"); + segment += "(?:"; + continue; + } + if (glob[i] === "@" && extended && glob[i + 1] === "(") { + i++; + groupStack.push("@"); + segment += "(?:"; + continue; + } + if (glob[i] === "?") { + if (extended && glob[i + 1] === "(") { + i++; + groupStack.push("?"); + segment += "(?:"; + } else { + segment += "."; + } + continue; + } + if (glob[i] === "!" && extended && glob[i + 1] === "(") { + i++; + groupStack.push("!"); + segment += "(?!"; + continue; + } + if (glob[i] === "{") { + groupStack.push("BRACE"); + segment += "(?:"; + continue; + } + if (glob[i] === "}" && groupStack[groupStack.length - 1] === "BRACE") { + groupStack.pop(); + segment += ")"; + continue; + } + if (glob[i] === "," && groupStack[groupStack.length - 1] === "BRACE") { + segment += "|"; + continue; + } + if (glob[i] === "*") { + if (extended && glob[i + 1] === "(") { + i++; + groupStack.push("*"); + segment += "(?:"; + } else { + const prevChar = glob[i - 1]; + let numStars = 1; + while(glob[i + 1] === "*"){ + i++; + numStars++; + } + const nextChar = glob[i + 1]; + if (globstarOption && numStars === 2 && [ + ...c.seps, + undefined + ].includes(prevChar) && [ + ...c.seps, + undefined + ].includes(nextChar)) { + segment += c.globstar; + endsWithSep = true; + } else { + segment += c.wildcard; + } + } + continue; + } + segment += REG_EXP_ESCAPE_CHARS.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; + } + // Check for unclosed groups or a dangling backslash. + if (groupStack.length > 0 || inRange || inEscape) { + // Parse failure. Take all characters from this segment literally. + segment = ""; + for (const c of glob.slice(j, i)){ + segment += REG_EXP_ESCAPE_CHARS.includes(c) ? `\\${c}` : c; + endsWithSep = false; + } + } + regExpString += segment; + if (!endsWithSep) { + regExpString += i < glob.length ? c.sep : c.sepMaybe; + endsWithSep = true; + } + // Terminates with `i` at the start of the next segment. + while(c.seps.includes(glob[i]))i++; + j = i; + } + regExpString = `^${regExpString}$`; + return new RegExp(regExpString, caseInsensitive ? "i" : ""); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +const constants = { + sep: "/+", + sepMaybe: "/*", + seps: [ + "/" + ], + globstar: "(?:[^/]*(?:/|$)+)*", + wildcard: "[^/]*", + escapePrefix: "\\" +}; +/** Convert a glob string to a regular expression. + * + * Tries to match bash glob expansion as closely as possible. + * + * Basic glob syntax: + * - `*` - Matches everything without leaving the path segment. + * - `?` - Matches any single character. + * - `{foo,bar}` - Matches `foo` or `bar`. + * - `[abcd]` - Matches `a`, `b`, `c` or `d`. + * - `[a-d]` - Matches `a`, `b`, `c` or `d`. + * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`. + * - `[[::]]` - Matches any character belonging to ``. + * - `[[:alnum:]]` - Matches any digit or letter. + * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`. + * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes + * for a complete list of supported character classes. + * - `\` - Escapes the next character for an `os` other than `"windows"`. + * - \` - Escapes the next character for `os` set to `"windows"`. + * - `/` - Path separator. + * - `\` - Additional path separator only for `os` set to `"windows"`. + * + * Extended syntax: + * - Requires `{ extended: true }`. + * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`. + * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same. + * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`. + * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`. + * - `!(foo|bar)` - Matches anything other than `{foo,bar}`. + * - See https://www.linuxjournal.com/content/bash-extended-globbing. + * + * Globstar syntax: + * - Requires `{ globstar: true }`. + * - `**` - Matches any number of any path segments. + * - Must comprise its entire path segment in the provided glob. + * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option. + * + * Note the following properties: + * - The generated `RegExp` is anchored at both start and end. + * - Repeating and trailing separators are tolerated. Trailing separators in the + * provided glob have no meaning and are discarded. + * - Absolute globs will only match absolute paths, etc. + * - Empty globs will match nothing. + * - Any special glob syntax must be contained to one path segment. For example, + * `?(foo|bar/baz)` is invalid. The separator will take precedence and the + * first segment ends with an unclosed group. + * - If a path segment ends with unclosed groups or a dangling escape prefix, a + * parse error has occurred. Every character for that segment is taken + * literally in this event. + * + * Limitations: + * - A negative group like `!(foo|bar)` will wrongly be converted to a negative + * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly + * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively, + * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if + * the group occurs not nested at the end of the segment. + * + * @example Usage + * ```ts + * import { globToRegExp } from "@std/path/posix/glob-to-regexp"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(globToRegExp("*.js"), /^[^/]*\.js\/*$/); + * ``` + * + * @param glob Glob string to convert. + * @param options Conversion options. + * @returns The regular expression equivalent to the glob. + */ function globToRegExp(glob, options = {}) { + return _globToRegExp(constants, glob, options); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Test whether the given string is a glob. + * + * @example Usage + * ```ts + * import { isGlob } from "@std/path/is-glob"; + * import { assert } from "@std/assert"; + * + * assert(!isGlob("foo/bar/../baz")); + * assert(isGlob("foo/*ar/../baz")); + * ``` + * + * @param str String to test. + * @returns `true` if the given string is a glob, otherwise `false` + */ function isGlob(str) { + const chars = { + "{": "}", + "(": ")", + "[": "]" + }; + const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; + if (str === "") { + return false; + } + let match; + while(match = regex.exec(str)){ + if (match[2]) return true; + let idx = match.index + match[0].length; + // if an open bracket/brace/paren is escaped, + // set the index to the next closing character + const open = match[1]; + const close = open ? chars[open] : null; + if (open && close) { + const n = str.indexOf(close, idx); + if (n !== -1) { + idx = n + 1; + } + } + str = str.slice(idx); + } + return false; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. + * + * @example Usage + * ```ts + * import { normalizeGlob } from "@std/path/posix/normalize-glob"; + * import { assertEquals } from "@std/assert"; + * + * const path = normalizeGlob("foo/bar/../*", { globstar: true }); + * assertEquals(path, "foo/*"); + * ``` + * + * @param glob The glob to normalize. + * @param options The options to use. + * @returns The normalized path. + */ function normalizeGlob(glob, options = {}) { + const { globstar = false } = options; + if (glob.match(/\0/g)) { + throw new Error(`Glob contains invalid characters: "${glob}"`); + } + if (!globstar) { + return normalize(glob); + } + const s = SEPARATOR_PATTERN.source; + const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g"); + return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, ".."); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Like join(), but doesn't collapse "**\/.." when `globstar` is true. + * + * @example Usage + * ```ts + * import { joinGlobs } from "@std/path/posix/join-globs"; + * import { assertEquals } from "@std/assert"; + * + * const path = joinGlobs(["foo", "bar", "**"], { globstar: true }); + * assertEquals(path, "foo/bar/**"); + * ``` + * + * @param globs The globs to join. + * @param options The options to use. + * @returns The joined path. + */ function joinGlobs(globs, options = {}) { + const { globstar = false } = options; + if (!globstar || globs.length === 0) { + return join(...globs); + } + let joined; + for (const glob of globs){ + const path = glob; + if (path.length > 0) { + if (!joined) joined = path; + else joined += `${SEPARATOR}${path}`; + } + } + if (!joined) return "."; + return normalizeGlob(joined, { + globstar + }); +} + +exports.DELIMITER = DELIMITER; +exports.SEPARATOR = SEPARATOR; +exports.SEPARATOR_PATTERN = SEPARATOR_PATTERN; +exports.basename = basename; +exports.common = common; +exports.dirname = dirname; +exports.extname = extname; +exports.format = format; +exports.fromFileUrl = fromFileUrl; +exports.globToRegExp = globToRegExp; +exports.isAbsolute = isAbsolute; +exports.isGlob = isGlob; +exports.join = join; +exports.joinGlobs = joinGlobs; +exports.normalize = normalize; +exports.normalizeGlob = normalizeGlob; +exports.parse = parse; +exports.relative = relative; +exports.resolve = resolve; +exports.toFileUrl = toFileUrl; +exports.toNamespacedPath = toNamespacedPath; diff --git a/slider/node_modules/@eslint/config-array/dist/cjs/std__path/windows.cjs b/slider/node_modules/@eslint/config-array/dist/cjs/std__path/windows.cjs new file mode 100644 index 0000000..5998b5e --- /dev/null +++ b/slider/node_modules/@eslint/config-array/dist/cjs/std__path/windows.cjs @@ -0,0 +1,1677 @@ +'use strict'; + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +function assertPath(path) { + if (typeof path !== "string") { + throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function stripSuffix(name, suffix) { + if (suffix.length >= name.length) { + return name; + } + const lenDiff = name.length - suffix.length; + for(let i = suffix.length - 1; i >= 0; --i){ + if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) { + return name; + } + } + return name.slice(0, -suffix.length); +} +function lastPathSegment(path, isSep, start = 0) { + let matchedNonSeparator = false; + let end = path.length; + for(let i = path.length - 1; i >= start; --i){ + if (isSep(path.charCodeAt(i))) { + if (matchedNonSeparator) { + start = i + 1; + break; + } + } else if (!matchedNonSeparator) { + matchedNonSeparator = true; + end = i + 1; + } + } + return path.slice(start, end); +} +function assertArgs$1(path, suffix) { + assertPath(path); + if (path.length === 0) return path; + if (typeof suffix !== "string") { + throw new TypeError(`Suffix must be a string, received "${JSON.stringify(suffix)}"`); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +// Alphabet chars. +const CHAR_UPPERCASE_A = 65; /* A */ +const CHAR_LOWERCASE_A = 97; /* a */ +const CHAR_UPPERCASE_Z = 90; /* Z */ +const CHAR_LOWERCASE_Z = 122; /* z */ +// Non-alphabetic chars. +const CHAR_DOT = 46; /* . */ +const CHAR_FORWARD_SLASH = 47; /* / */ +const CHAR_BACKWARD_SLASH = 92; /* \ */ +const CHAR_COLON = 58; /* : */ +const CHAR_QUESTION_MARK = 63; /* ? */ + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +function stripTrailingSeparators(segment, isSep) { + if (segment.length <= 1) { + return segment; + } + let end = segment.length; + for(let i = segment.length - 1; i > 0; i--){ + if (isSep(segment.charCodeAt(i))) { + end = i; + } else { + break; + } + } + return segment.slice(0, end); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +function isPosixPathSeparator(code) { + return code === CHAR_FORWARD_SLASH; +} +function isPathSeparator(code) { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; +} +function isWindowsDeviceRoot(code) { + return code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z || code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArg$3(url) { + url = url instanceof URL ? url : new URL(url); + if (url.protocol !== "file:") { + throw new TypeError(`URL must be a file URL: received "${url.protocol}"`); + } + return url; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Converts a file URL to a path string. + * + * @example Usage + * ```ts + * import { fromFileUrl } from "@std/path/windows/from-file-url"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(fromFileUrl("file:///home/foo"), "\\home\\foo"); + * assertEquals(fromFileUrl("file:///C:/Users/foo"), "C:\\Users\\foo"); + * assertEquals(fromFileUrl("file://localhost/home/foo"), "\\home\\foo"); + * ``` + * + * @param url The file URL to convert. + * @returns The path string. + */ function fromFileUrl(url) { + url = assertArg$3(url); + let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\"); + if (url.hostname !== "") { + // Note: The `URL` implementation guarantees that the drive letter and + // hostname are mutually exclusive. Otherwise it would not have been valid + // to append the hostname and path like this. + path = `\\\\${url.hostname}${path}`; + } + return path; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the last portion of a `path`. + * Trailing directory separators are ignored, and optional suffix is removed. + * + * @example Usage + * ```ts + * import { basename } from "@std/path/windows/basename"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(basename("C:\\user\\Documents\\"), "Documents"); + * assertEquals(basename("C:\\user\\Documents\\image.png"), "image.png"); + * assertEquals(basename("C:\\user\\Documents\\image.png", ".png"), "image"); + * assertEquals(basename(new URL("file:///C:/user/Documents/image.png")), "image.png"); + * assertEquals(basename(new URL("file:///C:/user/Documents/image.png"), ".png"), "image"); + * ``` + * + * @param path The path to extract the name from. + * @param suffix The suffix to remove from extracted name. + * @returns The extracted name. + */ function basename(path, suffix = "") { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertArgs$1(path, suffix); + // Check for a drive letter prefix so as not to mistake the following + // path separator as an extra separator at the end of the path that can be + // disregarded + let start = 0; + if (path.length >= 2) { + const drive = path.charCodeAt(0); + if (isWindowsDeviceRoot(drive)) { + if (path.charCodeAt(1) === CHAR_COLON) start = 2; + } + } + const lastSegment = lastPathSegment(path, isPathSeparator, start); + const strippedSegment = stripTrailingSeparators(lastSegment, isPathSeparator); + return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * The character used to separate entries in the PATH environment variable. + */ const DELIMITER = ";"; +/** + * The character used to separate components of a file path. + */ const SEPARATOR = "\\"; +/** + * A regular expression that matches one or more path separators. + */ const SEPARATOR_PATTERN = /[\\/]+/; + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArg$2(path) { + assertPath(path); + if (path.length === 0) return "."; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the directory path of a `path`. + * + * @example Usage + * ```ts + * import { dirname } from "@std/path/windows/dirname"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(dirname("C:\\foo\\bar\\baz.ext"), "C:\\foo\\bar"); + * assertEquals(dirname(new URL("file:///C:/foo/bar/baz.ext")), "C:\\foo\\bar"); + * ``` + * + * @param path The path to get the directory from. + * @returns The directory path. + */ function dirname(path) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertArg$2(path); + const len = path.length; + let rootEnd = -1; + let end = -1; + let matchedSlash = true; + let offset = 0; + const code = path.charCodeAt(0); + // Try to match a root + if (len > 1) { + if (isPathSeparator(code)) { + // Possible UNC root + rootEnd = offset = 1; + if (isPathSeparator(path.charCodeAt(1))) { + // Matched double path separator at beginning + let j = 2; + let last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more path separators + for(; j < len; ++j){ + if (!isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j === len) { + // We matched a UNC root only + return path; + } + if (j !== last) { + // We matched a UNC root with leftovers + // Offset by 1 to include the separator after the UNC root to + // treat it as a "normal root" on top of a (UNC) root + rootEnd = offset = j + 1; + } + } + } + } + } else if (isWindowsDeviceRoot(code)) { + // Possible device root + if (path.charCodeAt(1) === CHAR_COLON) { + rootEnd = offset = 2; + if (len > 2) { + if (isPathSeparator(path.charCodeAt(2))) rootEnd = offset = 3; + } + } + } + } else if (isPathSeparator(code)) { + // `path` contains just a path separator, exit early to avoid + // unnecessary work + return path; + } + for(let i = len - 1; i >= offset; --i){ + if (isPathSeparator(path.charCodeAt(i))) { + if (!matchedSlash) { + end = i; + break; + } + } else { + // We saw the first non-path separator + matchedSlash = false; + } + } + if (end === -1) { + if (rootEnd === -1) return "."; + else end = rootEnd; + } + return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the extension of the `path` with leading period. + * + * @example Usage + * ```ts + * import { extname } from "@std/path/windows/extname"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(extname("file.ts"), ".ts"); + * assertEquals(extname(new URL("file:///C:/foo/bar/baz.ext")), ".ext"); + * ``` + * + * @param path The path to get the extension from. + * @returns The extension of the `path`. + */ function extname(path) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertPath(path); + let start = 0; + let startDot = -1; + let startPart = 0; + let end = -1; + let matchedSlash = true; + // Track the state of characters (if any) we see before our first dot and + // after any path separator we find + let preDotState = 0; + // Check for a drive letter prefix so as not to mistake the following + // path separator as an extra separator at the end of the path that can be + // disregarded + if (path.length >= 2 && path.charCodeAt(1) === CHAR_COLON && isWindowsDeviceRoot(path.charCodeAt(0))) { + start = startPart = 2; + } + for(let i = path.length - 1; i >= start; --i){ + const code = path.charCodeAt(i); + if (isPathSeparator(code)) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // extension + matchedSlash = false; + end = i + 1; + } + if (code === CHAR_DOT) { + // If this is our first dot, mark it as the start of our extension + if (startDot === -1) startDot = i; + else if (preDotState !== 1) preDotState = 1; + } else if (startDot !== -1) { + // We saw a non-dot and non-path separator before our dot, so we should + // have a good chance at having a non-empty extension + preDotState = -1; + } + } + if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + return ""; + } + return path.slice(startDot, end); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function _format(sep, pathObject) { + const dir = pathObject.dir || pathObject.root; + const base = pathObject.base || (pathObject.name ?? "") + (pathObject.ext ?? ""); + if (!dir) return base; + if (base === sep) return dir; + if (dir === pathObject.root) return dir + base; + return dir + sep + base; +} +function assertArg$1(pathObject) { + if (pathObject === null || typeof pathObject !== "object") { + throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof pathObject}"`); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Generate a path from `ParsedPath` object. + * + * @example Usage + * ```ts + * import { format } from "@std/path/windows/format"; + * import { assertEquals } from "@std/assert"; + * + * const path = format({ + * root: "C:\\", + * dir: "C:\\path\\dir", + * base: "file.txt", + * ext: ".txt", + * name: "file" + * }); + * assertEquals(path, "C:\\path\\dir\\file.txt"); + * ``` + * + * @param pathObject The path object to format. + * @returns The formatted path. + */ function format(pathObject) { + assertArg$1(pathObject); + return _format("\\", pathObject); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Verifies whether provided path is absolute. + * + * @example Usage + * ```ts + * import { isAbsolute } from "@std/path/windows/is-absolute"; + * import { assert, assertFalse } from "@std/assert"; + * + * assert(isAbsolute("C:\\foo\\bar")); + * assertFalse(isAbsolute("..\\baz")); + * ``` + * + * @param path The path to verify. + * @returns `true` if the path is absolute, `false` otherwise. + */ function isAbsolute(path) { + assertPath(path); + const len = path.length; + if (len === 0) return false; + const code = path.charCodeAt(0); + if (isPathSeparator(code)) { + return true; + } else if (isWindowsDeviceRoot(code)) { + // Possible device root + if (len > 2 && path.charCodeAt(1) === CHAR_COLON) { + if (isPathSeparator(path.charCodeAt(2))) return true; + } + } + return false; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArg(path) { + assertPath(path); + if (path.length === 0) return "."; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +// Resolves . and .. elements in a path with directory names +function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { + let res = ""; + let lastSegmentLength = 0; + let lastSlash = -1; + let dots = 0; + let code; + for(let i = 0; i <= path.length; ++i){ + if (i < path.length) code = path.charCodeAt(i); + else if (isPathSeparator(code)) break; + else code = CHAR_FORWARD_SLASH; + if (isPathSeparator(code)) { + if (lastSlash === i - 1 || dots === 1) ; else if (lastSlash !== i - 1 && dots === 2) { + if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) { + if (res.length > 2) { + const lastSlashIndex = res.lastIndexOf(separator); + if (lastSlashIndex === -1) { + res = ""; + lastSegmentLength = 0; + } else { + res = res.slice(0, lastSlashIndex); + lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); + } + lastSlash = i; + dots = 0; + continue; + } else if (res.length === 2 || res.length === 1) { + res = ""; + lastSegmentLength = 0; + lastSlash = i; + dots = 0; + continue; + } + } + if (allowAboveRoot) { + if (res.length > 0) res += `${separator}..`; + else res = ".."; + lastSegmentLength = 2; + } + } else { + if (res.length > 0) res += separator + path.slice(lastSlash + 1, i); + else res = path.slice(lastSlash + 1, i); + lastSegmentLength = i - lastSlash - 1; + } + lastSlash = i; + dots = 0; + } else if (code === CHAR_DOT && dots !== -1) { + ++dots; + } else { + dots = -1; + } + } + return res; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Normalize the `path`, resolving `'..'` and `'.'` segments. + * Note that resolving these segments does not necessarily mean that all will be eliminated. + * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`. + * + * @example Usage + * ```ts + * import { normalize } from "@std/path/windows/normalize"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(normalize("C:\\foo\\..\\bar"), "C:\\bar"); + * assertEquals(normalize(new URL("file:///C:/foo/../bar")), "C:\\bar"); + * ``` + * + * @param path The path to normalize + * @returns The normalized path + */ function normalize(path) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertArg(path); + const len = path.length; + let rootEnd = 0; + let device; + let isAbsolute = false; + const code = path.charCodeAt(0); + // Try to match a root + if (len > 1) { + if (isPathSeparator(code)) { + // Possible UNC root + // If we started with a separator, we know we at least have an absolute + // path of some kind (UNC or otherwise) + isAbsolute = true; + if (isPathSeparator(path.charCodeAt(1))) { + // Matched double path separator at beginning + let j = 2; + let last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + const firstPart = path.slice(last, j); + // Matched! + last = j; + // Match 1 or more path separators + for(; j < len; ++j){ + if (!isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j === len) { + // We matched a UNC root only + // Return the normalized version of the UNC root since there + // is nothing left to process + return `\\\\${firstPart}\\${path.slice(last)}\\`; + } else if (j !== last) { + // We matched a UNC root with leftovers + device = `\\\\${firstPart}\\${path.slice(last, j)}`; + rootEnd = j; + } + } + } + } else { + rootEnd = 1; + } + } else if (isWindowsDeviceRoot(code)) { + // Possible device root + if (path.charCodeAt(1) === CHAR_COLON) { + device = path.slice(0, 2); + rootEnd = 2; + if (len > 2) { + if (isPathSeparator(path.charCodeAt(2))) { + // Treat separator following drive name as an absolute path + // indicator + isAbsolute = true; + rootEnd = 3; + } + } + } + } + } else if (isPathSeparator(code)) { + // `path` contains just a path separator, exit early to avoid unnecessary + // work + return "\\"; + } + let tail; + if (rootEnd < len) { + tail = normalizeString(path.slice(rootEnd), !isAbsolute, "\\", isPathSeparator); + } else { + tail = ""; + } + if (tail.length === 0 && !isAbsolute) tail = "."; + if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) { + tail += "\\"; + } + if (device === undefined) { + if (isAbsolute) { + if (tail.length > 0) return `\\${tail}`; + else return "\\"; + } + return tail; + } else if (isAbsolute) { + if (tail.length > 0) return `${device}\\${tail}`; + else return `${device}\\`; + } + return device + tail; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Join all given a sequence of `paths`,then normalizes the resulting path. + * + * @example Usage + * ```ts + * import { join } from "@std/path/windows/join"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(join("C:\\foo", "bar", "baz\\.."), "C:\\foo\\bar"); + * assertEquals(join(new URL("file:///C:/foo"), "bar", "baz\\.."), "C:\\foo\\bar"); + * ``` + * + * @param path The path to join. This can be string or file URL. + * @param paths The paths to join. + * @returns The joined path. + */ function join(path, ...paths) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + paths = path ? [ + path, + ...paths + ] : paths; + paths.forEach((path)=>assertPath(path)); + paths = paths.filter((path)=>path.length > 0); + if (paths.length === 0) return "."; + // Make sure that the joined path doesn't start with two slashes, because + // normalize() will mistake it for an UNC path then. + // + // This step is skipped when it is very clear that the user actually + // intended to point at an UNC path. This is assumed when the first + // non-empty string arguments starts with exactly two slashes followed by + // at least one more non-slash character. + // + // Note that for normalize() to treat a path as an UNC path it needs to + // have at least 2 components, so we don't filter for that here. + // This means that the user can use join to construct UNC paths from + // a server name and a share name; for example: + // path.join('//server', 'share') -> '\\\\server\\share\\' + let needsReplace = true; + let slashCount = 0; + const firstPart = paths[0]; + if (isPathSeparator(firstPart.charCodeAt(0))) { + ++slashCount; + const firstLen = firstPart.length; + if (firstLen > 1) { + if (isPathSeparator(firstPart.charCodeAt(1))) { + ++slashCount; + if (firstLen > 2) { + if (isPathSeparator(firstPart.charCodeAt(2))) ++slashCount; + else { + // We matched a UNC path in the first part + needsReplace = false; + } + } + } + } + } + let joined = paths.join("\\"); + if (needsReplace) { + // Find any more consecutive slashes we need to replace + for(; slashCount < joined.length; ++slashCount){ + if (!isPathSeparator(joined.charCodeAt(slashCount))) break; + } + // Replace the slashes if needed + if (slashCount >= 2) joined = `\\${joined.slice(slashCount)}`; + } + return normalize(joined); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return a `ParsedPath` object of the `path`. + * + * @example Usage + * ```ts + * import { parse } from "@std/path/windows/parse"; + * import { assertEquals } from "@std/assert"; + * + * const parsed = parse("C:\\foo\\bar\\baz.ext"); + * assertEquals(parsed, { + * root: "C:\\", + * dir: "C:\\foo\\bar", + * base: "baz.ext", + * ext: ".ext", + * name: "baz", + * }); + * ``` + * + * @param path The path to parse. + * @returns The `ParsedPath` object. + */ function parse(path) { + assertPath(path); + const ret = { + root: "", + dir: "", + base: "", + ext: "", + name: "" + }; + const len = path.length; + if (len === 0) return ret; + let rootEnd = 0; + let code = path.charCodeAt(0); + // Try to match a root + if (len > 1) { + if (isPathSeparator(code)) { + // Possible UNC root + rootEnd = 1; + if (isPathSeparator(path.charCodeAt(1))) { + // Matched double path separator at beginning + let j = 2; + let last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more path separators + for(; j < len; ++j){ + if (!isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j === len) { + // We matched a UNC root only + rootEnd = j; + } else if (j !== last) { + // We matched a UNC root with leftovers + rootEnd = j + 1; + } + } + } + } + } else if (isWindowsDeviceRoot(code)) { + // Possible device root + if (path.charCodeAt(1) === CHAR_COLON) { + rootEnd = 2; + if (len > 2) { + if (isPathSeparator(path.charCodeAt(2))) { + if (len === 3) { + // `path` contains just a drive root, exit early to avoid + // unnecessary work + ret.root = ret.dir = path; + ret.base = "\\"; + return ret; + } + rootEnd = 3; + } + } else { + // `path` contains just a relative drive root, exit early to avoid + // unnecessary work + ret.root = ret.dir = path; + return ret; + } + } + } + } else if (isPathSeparator(code)) { + // `path` contains just a path separator, exit early to avoid + // unnecessary work + ret.root = ret.dir = path; + ret.base = "\\"; + return ret; + } + if (rootEnd > 0) ret.root = path.slice(0, rootEnd); + let startDot = -1; + let startPart = rootEnd; + let end = -1; + let matchedSlash = true; + let i = path.length - 1; + // Track the state of characters (if any) we see before our first dot and + // after any path separator we find + let preDotState = 0; + // Get non-dir info + for(; i >= rootEnd; --i){ + code = path.charCodeAt(i); + if (isPathSeparator(code)) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // extension + matchedSlash = false; + end = i + 1; + } + if (code === CHAR_DOT) { + // If this is our first dot, mark it as the start of our extension + if (startDot === -1) startDot = i; + else if (preDotState !== 1) preDotState = 1; + } else if (startDot !== -1) { + // We saw a non-dot and non-path separator before our dot, so we should + // have a good chance at having a non-empty extension + preDotState = -1; + } + } + if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + if (end !== -1) { + ret.base = ret.name = path.slice(startPart, end); + } + } else { + ret.name = path.slice(startPart, startDot); + ret.base = path.slice(startPart, end); + ret.ext = path.slice(startDot, end); + } + // Fallback to '\' in case there is no basename + ret.base = ret.base || "\\"; + // If the directory is the root, use the entire root as the `dir` including + // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the + // trailing slash (`C:\abc\def` -> `C:\abc`). + if (startPart > 0 && startPart !== rootEnd) { + ret.dir = path.slice(0, startPart - 1); + } else ret.dir = ret.root; + return ret; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Resolves path segments into a `path`. + * + * @example Usage + * ```ts + * import { resolve } from "@std/path/windows/resolve"; + * import { assertEquals } from "@std/assert"; + * + * const resolved = resolve("C:\\foo\\bar", "..\\baz"); + * assertEquals(resolved, "C:\\foo\\baz"); + * ``` + * + * @param pathSegments The path segments to process to path + * @returns The resolved path + */ function resolve(...pathSegments) { + let resolvedDevice = ""; + let resolvedTail = ""; + let resolvedAbsolute = false; + for(let i = pathSegments.length - 1; i >= -1; i--){ + let path; + // deno-lint-ignore no-explicit-any + const { Deno } = globalThis; + if (i >= 0) { + path = pathSegments[i]; + } else if (!resolvedDevice) { + if (typeof Deno?.cwd !== "function") { + throw new TypeError("Resolved a drive-letter-less path without a current working directory (CWD)"); + } + path = Deno.cwd(); + } else { + if (typeof Deno?.env?.get !== "function" || typeof Deno?.cwd !== "function") { + throw new TypeError("Resolved a relative path without a current working directory (CWD)"); + } + path = Deno.cwd(); + // Verify that a cwd was found and that it actually points + // to our drive. If not, default to the drive's root. + if (path === undefined || path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) { + path = `${resolvedDevice}\\`; + } + } + assertPath(path); + const len = path.length; + // Skip empty entries + if (len === 0) continue; + let rootEnd = 0; + let device = ""; + let isAbsolute = false; + const code = path.charCodeAt(0); + // Try to match a root + if (len > 1) { + if (isPathSeparator(code)) { + // Possible UNC root + // If we started with a separator, we know we at least have an + // absolute path of some kind (UNC or otherwise) + isAbsolute = true; + if (isPathSeparator(path.charCodeAt(1))) { + // Matched double path separator at beginning + let j = 2; + let last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + const firstPart = path.slice(last, j); + // Matched! + last = j; + // Match 1 or more path separators + for(; j < len; ++j){ + if (!isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j === len) { + // We matched a UNC root only + device = `\\\\${firstPart}\\${path.slice(last)}`; + rootEnd = j; + } else if (j !== last) { + // We matched a UNC root with leftovers + device = `\\\\${firstPart}\\${path.slice(last, j)}`; + rootEnd = j; + } + } + } + } else { + rootEnd = 1; + } + } else if (isWindowsDeviceRoot(code)) { + // Possible device root + if (path.charCodeAt(1) === CHAR_COLON) { + device = path.slice(0, 2); + rootEnd = 2; + if (len > 2) { + if (isPathSeparator(path.charCodeAt(2))) { + // Treat separator following drive name as an absolute path + // indicator + isAbsolute = true; + rootEnd = 3; + } + } + } + } + } else if (isPathSeparator(code)) { + // `path` contains just a path separator + rootEnd = 1; + isAbsolute = true; + } + if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) { + continue; + } + if (resolvedDevice.length === 0 && device.length > 0) { + resolvedDevice = device; + } + if (!resolvedAbsolute) { + resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`; + resolvedAbsolute = isAbsolute; + } + if (resolvedAbsolute && resolvedDevice.length > 0) break; + } + // At this point the path should be resolved to a full absolute path, + // but handle relative paths to be safe (might happen when Deno.cwd() + // fails) + // Normalize the tail path + resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator); + return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || "."; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArgs(from, to) { + assertPath(from); + assertPath(to); + if (from === to) return ""; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the relative path from `from` to `to` based on current working directory. + * + * An example in windws, for instance: + * from = 'C:\\orandea\\test\\aaa' + * to = 'C:\\orandea\\impl\\bbb' + * The output of the function should be: '..\\..\\impl\\bbb' + * + * @example Usage + * ```ts + * import { relative } from "@std/path/windows/relative"; + * import { assertEquals } from "@std/assert"; + * + * const relativePath = relative("C:\\foobar\\test\\aaa", "C:\\foobar\\impl\\bbb"); + * assertEquals(relativePath, "..\\..\\impl\\bbb"); + * ``` + * + * @param from The path from which to calculate the relative path + * @param to The path to which to calculate the relative path + * @returns The relative path from `from` to `to` + */ function relative(from, to) { + assertArgs(from, to); + const fromOrig = resolve(from); + const toOrig = resolve(to); + if (fromOrig === toOrig) return ""; + from = fromOrig.toLowerCase(); + to = toOrig.toLowerCase(); + if (from === to) return ""; + // Trim any leading backslashes + let fromStart = 0; + let fromEnd = from.length; + for(; fromStart < fromEnd; ++fromStart){ + if (from.charCodeAt(fromStart) !== CHAR_BACKWARD_SLASH) break; + } + // Trim trailing backslashes (applicable to UNC paths only) + for(; fromEnd - 1 > fromStart; --fromEnd){ + if (from.charCodeAt(fromEnd - 1) !== CHAR_BACKWARD_SLASH) break; + } + const fromLen = fromEnd - fromStart; + // Trim any leading backslashes + let toStart = 0; + let toEnd = to.length; + for(; toStart < toEnd; ++toStart){ + if (to.charCodeAt(toStart) !== CHAR_BACKWARD_SLASH) break; + } + // Trim trailing backslashes (applicable to UNC paths only) + for(; toEnd - 1 > toStart; --toEnd){ + if (to.charCodeAt(toEnd - 1) !== CHAR_BACKWARD_SLASH) break; + } + const toLen = toEnd - toStart; + // Compare paths to find the longest common path from root + const length = fromLen < toLen ? fromLen : toLen; + let lastCommonSep = -1; + let i = 0; + for(; i <= length; ++i){ + if (i === length) { + if (toLen > length) { + if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) { + // We get here if `from` is the exact base path for `to`. + // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz' + return toOrig.slice(toStart + i + 1); + } else if (i === 2) { + // We get here if `from` is the device root. + // For example: from='C:\\'; to='C:\\foo' + return toOrig.slice(toStart + i); + } + } + if (fromLen > length) { + if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) { + // We get here if `to` is the exact base path for `from`. + // For example: from='C:\\foo\\bar'; to='C:\\foo' + lastCommonSep = i; + } else if (i === 2) { + // We get here if `to` is the device root. + // For example: from='C:\\foo\\bar'; to='C:\\' + lastCommonSep = 3; + } + } + break; + } + const fromCode = from.charCodeAt(fromStart + i); + const toCode = to.charCodeAt(toStart + i); + if (fromCode !== toCode) break; + else if (fromCode === CHAR_BACKWARD_SLASH) lastCommonSep = i; + } + // We found a mismatch before the first common path separator was seen, so + // return the original `to`. + if (i !== length && lastCommonSep === -1) { + return toOrig; + } + let out = ""; + if (lastCommonSep === -1) lastCommonSep = 0; + // Generate the relative path based on the path difference between `to` and + // `from` + for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){ + if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) { + if (out.length === 0) out += ".."; + else out += "\\.."; + } + } + // Lastly, append the rest of the destination (`to`) path that comes after + // the common path parts + if (out.length > 0) { + return out + toOrig.slice(toStart + lastCommonSep, toEnd); + } else { + toStart += lastCommonSep; + if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) ++toStart; + return toOrig.slice(toStart, toEnd); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +const WHITESPACE_ENCODINGS = { + "\u0009": "%09", + "\u000A": "%0A", + "\u000B": "%0B", + "\u000C": "%0C", + "\u000D": "%0D", + "\u0020": "%20" +}; +function encodeWhitespace(string) { + return string.replaceAll(/[\s]/g, (c)=>{ + return WHITESPACE_ENCODINGS[c] ?? c; + }); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Converts a path string to a file URL. + * + * @example Usage + * ```ts + * import { toFileUrl } from "@std/path/windows/to-file-url"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(toFileUrl("\\home\\foo"), new URL("file:///home/foo")); + * assertEquals(toFileUrl("C:\\Users\\foo"), new URL("file:///C:/Users/foo")); + * assertEquals(toFileUrl("\\\\127.0.0.1\\home\\foo"), new URL("file://127.0.0.1/home/foo")); + * ``` + * @param path The path to convert. + * @returns The file URL. + */ function toFileUrl(path) { + if (!isAbsolute(path)) { + throw new TypeError(`Path must be absolute: received "${path}"`); + } + const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/); + const url = new URL("file:///"); + url.pathname = encodeWhitespace(pathname.replace(/%/g, "%25")); + if (hostname !== undefined && hostname !== "localhost") { + url.hostname = hostname; + if (!url.hostname) { + throw new TypeError(`Invalid hostname: "${url.hostname}"`); + } + } + return url; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Resolves path to a namespace path + * + * @example Usage + * ```ts + * import { toNamespacedPath } from "@std/path/windows/to-namespaced-path"; + * import { assertEquals } from "@std/assert"; + * + * const namespaced = toNamespacedPath("C:\\foo\\bar"); + * assertEquals(namespaced, "\\\\?\\C:\\foo\\bar"); + * ``` + * + * @param path The path to resolve to namespaced path + * @returns The resolved namespaced path + */ function toNamespacedPath(path) { + // Note: this will *probably* throw somewhere. + if (typeof path !== "string") return path; + if (path.length === 0) return ""; + const resolvedPath = resolve(path); + if (resolvedPath.length >= 3) { + if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) { + // Possible UNC root + if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) { + const code = resolvedPath.charCodeAt(2); + if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) { + // Matched non-long UNC root, convert the path to a long UNC path + return `\\\\?\\UNC\\${resolvedPath.slice(2)}`; + } + } + } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) { + // Possible device root + if (resolvedPath.charCodeAt(1) === CHAR_COLON && resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) { + // Matched device root, convert the path to a long UNC path + return `\\\\?\\${resolvedPath}`; + } + } + } + return path; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function common$1(paths, sep) { + const [first = "", ...remaining] = paths; + const parts = first.split(sep); + let endOfPrefix = parts.length; + let append = ""; + for (const path of remaining){ + const compare = path.split(sep); + if (compare.length <= endOfPrefix) { + endOfPrefix = compare.length; + append = ""; + } + for(let i = 0; i < endOfPrefix; i++){ + if (compare[i] !== parts[i]) { + endOfPrefix = i; + append = i === 0 ? "" : sep; + break; + } + } + } + return parts.slice(0, endOfPrefix).join(sep) + append; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Determines the common path from a set of paths for Windows systems. + * + * @example Usage + * ```ts + * import { common } from "@std/path/windows/common"; + * import { assertEquals } from "@std/assert"; + * + * const path = common([ + * "C:\\foo\\bar", + * "C:\\foo\\baz", + * ]); + * assertEquals(path, "C:\\foo\\"); + * ``` + * + * @param paths The paths to compare. + * @returns The common path. + */ function common(paths) { + return common$1(paths, SEPARATOR); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Options for {@linkcode globToRegExp}, {@linkcode joinGlobs}, + * {@linkcode normalizeGlob} and {@linkcode expandGlob}. + */ const REG_EXP_ESCAPE_CHARS = [ + "!", + "$", + "(", + ")", + "*", + "+", + ".", + "=", + "?", + "[", + "\\", + "^", + "{", + "|" +]; +const RANGE_ESCAPE_CHARS = [ + "-", + "\\", + "]" +]; +function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true, // os = osType, +caseInsensitive = false } = {}) { + if (glob === "") { + return /(?!)/; + } + // Remove trailing separators. + let newLength = glob.length; + for(; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--); + glob = glob.slice(0, newLength); + let regExpString = ""; + // Terminates correctly. Trust that `j` is incremented every iteration. + for(let j = 0; j < glob.length;){ + let segment = ""; + const groupStack = []; + let inRange = false; + let inEscape = false; + let endsWithSep = false; + let i = j; + // Terminates with `i` at the non-inclusive end of the current segment. + for(; i < glob.length && !c.seps.includes(glob[i]); i++){ + if (inEscape) { + inEscape = false; + const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS; + segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; + continue; + } + if (glob[i] === c.escapePrefix) { + inEscape = true; + continue; + } + if (glob[i] === "[") { + if (!inRange) { + inRange = true; + segment += "["; + if (glob[i + 1] === "!") { + i++; + segment += "^"; + } else if (glob[i + 1] === "^") { + i++; + segment += "\\^"; + } + continue; + } else if (glob[i + 1] === ":") { + let k = i + 1; + let value = ""; + while(glob[k + 1] !== undefined && glob[k + 1] !== ":"){ + value += glob[k + 1]; + k++; + } + if (glob[k + 1] === ":" && glob[k + 2] === "]") { + i = k + 2; + if (value === "alnum") segment += "\\dA-Za-z"; + else if (value === "alpha") segment += "A-Za-z"; + else if (value === "ascii") segment += "\x00-\x7F"; + else if (value === "blank") segment += "\t "; + else if (value === "cntrl") segment += "\x00-\x1F\x7F"; + else if (value === "digit") segment += "\\d"; + else if (value === "graph") segment += "\x21-\x7E"; + else if (value === "lower") segment += "a-z"; + else if (value === "print") segment += "\x20-\x7E"; + else if (value === "punct") { + segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~"; + } else if (value === "space") segment += "\\s\v"; + else if (value === "upper") segment += "A-Z"; + else if (value === "word") segment += "\\w"; + else if (value === "xdigit") segment += "\\dA-Fa-f"; + continue; + } + } + } + if (glob[i] === "]" && inRange) { + inRange = false; + segment += "]"; + continue; + } + if (inRange) { + segment += glob[i]; + continue; + } + if (glob[i] === ")" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { + segment += ")"; + const type = groupStack.pop(); + if (type === "!") { + segment += c.wildcard; + } else if (type !== "@") { + segment += type; + } + continue; + } + if (glob[i] === "|" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { + segment += "|"; + continue; + } + if (glob[i] === "+" && extended && glob[i + 1] === "(") { + i++; + groupStack.push("+"); + segment += "(?:"; + continue; + } + if (glob[i] === "@" && extended && glob[i + 1] === "(") { + i++; + groupStack.push("@"); + segment += "(?:"; + continue; + } + if (glob[i] === "?") { + if (extended && glob[i + 1] === "(") { + i++; + groupStack.push("?"); + segment += "(?:"; + } else { + segment += "."; + } + continue; + } + if (glob[i] === "!" && extended && glob[i + 1] === "(") { + i++; + groupStack.push("!"); + segment += "(?!"; + continue; + } + if (glob[i] === "{") { + groupStack.push("BRACE"); + segment += "(?:"; + continue; + } + if (glob[i] === "}" && groupStack[groupStack.length - 1] === "BRACE") { + groupStack.pop(); + segment += ")"; + continue; + } + if (glob[i] === "," && groupStack[groupStack.length - 1] === "BRACE") { + segment += "|"; + continue; + } + if (glob[i] === "*") { + if (extended && glob[i + 1] === "(") { + i++; + groupStack.push("*"); + segment += "(?:"; + } else { + const prevChar = glob[i - 1]; + let numStars = 1; + while(glob[i + 1] === "*"){ + i++; + numStars++; + } + const nextChar = glob[i + 1]; + if (globstarOption && numStars === 2 && [ + ...c.seps, + undefined + ].includes(prevChar) && [ + ...c.seps, + undefined + ].includes(nextChar)) { + segment += c.globstar; + endsWithSep = true; + } else { + segment += c.wildcard; + } + } + continue; + } + segment += REG_EXP_ESCAPE_CHARS.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; + } + // Check for unclosed groups or a dangling backslash. + if (groupStack.length > 0 || inRange || inEscape) { + // Parse failure. Take all characters from this segment literally. + segment = ""; + for (const c of glob.slice(j, i)){ + segment += REG_EXP_ESCAPE_CHARS.includes(c) ? `\\${c}` : c; + endsWithSep = false; + } + } + regExpString += segment; + if (!endsWithSep) { + regExpString += i < glob.length ? c.sep : c.sepMaybe; + endsWithSep = true; + } + // Terminates with `i` at the start of the next segment. + while(c.seps.includes(glob[i]))i++; + j = i; + } + regExpString = `^${regExpString}$`; + return new RegExp(regExpString, caseInsensitive ? "i" : ""); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +const constants = { + sep: "(?:\\\\|/)+", + sepMaybe: "(?:\\\\|/)*", + seps: [ + "\\", + "/" + ], + globstar: "(?:[^\\\\/]*(?:\\\\|/|$)+)*", + wildcard: "[^\\\\/]*", + escapePrefix: "`" +}; +/** Convert a glob string to a regular expression. + * + * Tries to match bash glob expansion as closely as possible. + * + * Basic glob syntax: + * - `*` - Matches everything without leaving the path segment. + * - `?` - Matches any single character. + * - `{foo,bar}` - Matches `foo` or `bar`. + * - `[abcd]` - Matches `a`, `b`, `c` or `d`. + * - `[a-d]` - Matches `a`, `b`, `c` or `d`. + * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`. + * - `[[::]]` - Matches any character belonging to ``. + * - `[[:alnum:]]` - Matches any digit or letter. + * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`. + * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes + * for a complete list of supported character classes. + * - `\` - Escapes the next character for an `os` other than `"windows"`. + * - \` - Escapes the next character for `os` set to `"windows"`. + * - `/` - Path separator. + * - `\` - Additional path separator only for `os` set to `"windows"`. + * + * Extended syntax: + * - Requires `{ extended: true }`. + * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`. + * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same. + * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`. + * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`. + * - `!(foo|bar)` - Matches anything other than `{foo,bar}`. + * - See https://www.linuxjournal.com/content/bash-extended-globbing. + * + * Globstar syntax: + * - Requires `{ globstar: true }`. + * - `**` - Matches any number of any path segments. + * - Must comprise its entire path segment in the provided glob. + * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option. + * + * Note the following properties: + * - The generated `RegExp` is anchored at both start and end. + * - Repeating and trailing separators are tolerated. Trailing separators in the + * provided glob have no meaning and are discarded. + * - Absolute globs will only match absolute paths, etc. + * - Empty globs will match nothing. + * - Any special glob syntax must be contained to one path segment. For example, + * `?(foo|bar/baz)` is invalid. The separator will take precedence and the + * first segment ends with an unclosed group. + * - If a path segment ends with unclosed groups or a dangling escape prefix, a + * parse error has occurred. Every character for that segment is taken + * literally in this event. + * + * Limitations: + * - A negative group like `!(foo|bar)` will wrongly be converted to a negative + * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly + * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively, + * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if + * the group occurs not nested at the end of the segment. + * + * @example Usage + * ```ts + * import { globToRegExp } from "@std/path/windows/glob-to-regexp"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(globToRegExp("*.js"), /^[^\\/]*\.js(?:\\|\/)*$/); + * ``` + * + * @param glob Glob string to convert. + * @param options Conversion options. + * @returns The regular expression equivalent to the glob. + */ function globToRegExp(glob, options = {}) { + return _globToRegExp(constants, glob, options); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Test whether the given string is a glob. + * + * @example Usage + * ```ts + * import { isGlob } from "@std/path/is-glob"; + * import { assert } from "@std/assert"; + * + * assert(!isGlob("foo/bar/../baz")); + * assert(isGlob("foo/*ar/../baz")); + * ``` + * + * @param str String to test. + * @returns `true` if the given string is a glob, otherwise `false` + */ function isGlob(str) { + const chars = { + "{": "}", + "(": ")", + "[": "]" + }; + const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; + if (str === "") { + return false; + } + let match; + while(match = regex.exec(str)){ + if (match[2]) return true; + let idx = match.index + match[0].length; + // if an open bracket/brace/paren is escaped, + // set the index to the next closing character + const open = match[1]; + const close = open ? chars[open] : null; + if (open && close) { + const n = str.indexOf(close, idx); + if (n !== -1) { + idx = n + 1; + } + } + str = str.slice(idx); + } + return false; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. + * + * @example Usage + * ```ts + * import { normalizeGlob } from "@std/path/windows/normalize-glob"; + * import { assertEquals } from "@std/assert"; + * + * const normalized = normalizeGlob("**\\foo\\..\\bar", { globstar: true }); + * assertEquals(normalized, "**\\bar"); + * ``` + * + * @param glob The glob pattern to normalize. + * @param options The options for glob pattern. + * @returns The normalized glob pattern. + */ function normalizeGlob(glob, options = {}) { + const { globstar = false } = options; + if (glob.match(/\0/g)) { + throw new Error(`Glob contains invalid characters: "${glob}"`); + } + if (!globstar) { + return normalize(glob); + } + const s = SEPARATOR_PATTERN.source; + const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g"); + return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, ".."); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Like join(), but doesn't collapse "**\/.." when `globstar` is true. + * + * @example Usage + * + * ```ts + * import { joinGlobs } from "@std/path/windows/join-globs"; + * import { assertEquals } from "@std/assert"; + * + * const joined = joinGlobs(["foo", "**", "bar"], { globstar: true }); + * assertEquals(joined, "foo\\**\\bar"); + * ``` + * + * @param globs The globs to join. + * @param options The options for glob pattern. + * @returns The joined glob pattern. + */ function joinGlobs(globs, options = {}) { + const { globstar = false } = options; + if (!globstar || globs.length === 0) { + return join(...globs); + } + let joined; + for (const glob of globs){ + const path = glob; + if (path.length > 0) { + if (!joined) joined = path; + else joined += `${SEPARATOR}${path}`; + } + } + if (!joined) return "."; + return normalizeGlob(joined, { + globstar + }); +} + +exports.DELIMITER = DELIMITER; +exports.SEPARATOR = SEPARATOR; +exports.SEPARATOR_PATTERN = SEPARATOR_PATTERN; +exports.basename = basename; +exports.common = common; +exports.dirname = dirname; +exports.extname = extname; +exports.format = format; +exports.fromFileUrl = fromFileUrl; +exports.globToRegExp = globToRegExp; +exports.isAbsolute = isAbsolute; +exports.isGlob = isGlob; +exports.join = join; +exports.joinGlobs = joinGlobs; +exports.normalize = normalize; +exports.normalizeGlob = normalizeGlob; +exports.parse = parse; +exports.relative = relative; +exports.resolve = resolve; +exports.toFileUrl = toFileUrl; +exports.toNamespacedPath = toNamespacedPath; diff --git a/slider/node_modules/@eslint/config-array/dist/cjs/types.ts b/slider/node_modules/@eslint/config-array/dist/cjs/types.ts new file mode 100644 index 0000000..8566e04 --- /dev/null +++ b/slider/node_modules/@eslint/config-array/dist/cjs/types.ts @@ -0,0 +1,29 @@ +/** + * @fileoverview Types for the config-array package. + * @author Nicholas C. Zakas + */ + +export interface ConfigObject { + /** + * The base path for files and ignores. + */ + basePath?: string; + + /** + * The files to include. + */ + files?: string[]; + + /** + * The files to exclude. + */ + ignores?: string[]; + + /** + * The name of the config object. + */ + name?: string; + + // may also have any number of other properties + [key: string]: unknown; +} diff --git a/slider/node_modules/@eslint/config-array/dist/esm/index.d.ts b/slider/node_modules/@eslint/config-array/dist/esm/index.d.ts new file mode 100644 index 0000000..e4105d9 --- /dev/null +++ b/slider/node_modules/@eslint/config-array/dist/esm/index.d.ts @@ -0,0 +1,143 @@ +export { ObjectSchema } from "@eslint/object-schema"; +export type PropertyDefinition = import("@eslint/object-schema").PropertyDefinition; +export type ObjectDefinition = import("@eslint/object-schema").ObjectDefinition; +export type ConfigObject = import("./types.ts").ConfigObject; +export type IMinimatchStatic = import("minimatch").IMinimatchStatic; +export type IMinimatch = import("minimatch").IMinimatch; +export type PathImpl = typeof import("@jsr/std__path"); +export type ObjectSchemaInstance = import("@eslint/object-schema").ObjectSchema; +/** + * Represents an array of config objects and provides method for working with + * those config objects. + */ +export class ConfigArray extends Array { + [x: symbol]: (config: any) => any; + /** + * Creates a new instance of ConfigArray. + * @param {Iterable|Function|Object} configs An iterable yielding config + * objects, or a config function, or a config object. + * @param {Object} options The options for the ConfigArray. + * @param {string} [options.basePath="/"] The absolute path of the config file directory. + * Defaults to `"/"`. + * @param {boolean} [options.normalized=false] Flag indicating if the + * configs have already been normalized. + * @param {Object} [options.schema] The additional schema + * definitions to use for the ConfigArray schema. + * @param {Array} [options.extraConfigTypes] List of config types supported. + * @throws {TypeError} When the `basePath` is not a non-empty string, + */ + constructor(configs: Iterable | Function | any, { basePath, normalized, schema: customSchema, extraConfigTypes, }?: { + basePath?: string; + normalized?: boolean; + schema?: any; + extraConfigTypes?: Array; + }); + /** + * The path of the config file that this array was loaded from. + * This is used to calculate filename matches. + * @property basePath + * @type {string} + */ + basePath: string; + /** + * The supported config types. + * @type {Array} + */ + extraConfigTypes: Array; + /** + * Returns the `files` globs from every config object in the array. + * This can be used to determine which files will be matched by a + * config array or to use as a glob pattern when no patterns are provided + * for a command line interface. + * @returns {Array} An array of matchers. + */ + get files(): Array; + /** + * Returns ignore matchers that should always be ignored regardless of + * the matching `files` fields in any configs. This is necessary to mimic + * the behavior of things like .gitignore and .eslintignore, allowing a + * globbing operation to be faster. + * @returns {Object[]} An array of config objects representing global ignores. + */ + get ignores(): any[]; + /** + * Indicates if the config array has been normalized. + * @returns {boolean} True if the config array is normalized, false if not. + */ + isNormalized(): boolean; + /** + * Normalizes a config array by flattening embedded arrays and executing + * config functions. + * @param {Object} [context] The context object for config functions. + * @returns {Promise} The current ConfigArray instance. + */ + normalize(context?: any): Promise; + /** + * Normalizes a config array by flattening embedded arrays and executing + * config functions. + * @param {Object} [context] The context object for config functions. + * @returns {ConfigArray} The current ConfigArray instance. + */ + normalizeSync(context?: any): ConfigArray; + /** + * Returns the config object for a given file path and a status that can be used to determine why a file has no config. + * @param {string} filePath The path of a file to get a config for. + * @returns {{ config?: Object, status: "ignored"|"external"|"unconfigured"|"matched" }} + * An object with an optional property `config` and property `status`. + * `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig}, + * `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}. + */ + getConfigWithStatus(filePath: string): { + config?: any; + status: "ignored" | "external" | "unconfigured" | "matched"; + }; + /** + * Returns the config object for a given file path. + * @param {string} filePath The path of a file to get a config for. + * @returns {Object|undefined} The config object for this file or `undefined`. + */ + getConfig(filePath: string): any | undefined; + /** + * Determines whether a file has a config or why it doesn't. + * @param {string} filePath The path of the file to check. + * @returns {"ignored"|"external"|"unconfigured"|"matched"} One of the following values: + * * `"ignored"`: the file is ignored + * * `"external"`: the file is outside the base path + * * `"unconfigured"`: the file is not matched by any config + * * `"matched"`: the file has a matching config + */ + getConfigStatus(filePath: string): "ignored" | "external" | "unconfigured" | "matched"; + /** + * Determines if the given filepath is ignored based on the configs. + * @param {string} filePath The path of a file to check. + * @returns {boolean} True if the path is ignored, false if not. + * @deprecated Use `isFileIgnored` instead. + */ + isIgnored(filePath: string): boolean; + /** + * Determines if the given filepath is ignored based on the configs. + * @param {string} filePath The path of a file to check. + * @returns {boolean} True if the path is ignored, false if not. + */ + isFileIgnored(filePath: string): boolean; + /** + * Determines if the given directory is ignored based on the configs. + * This checks only default `ignores` that don't have `files` in the + * same config. A pattern such as `/foo` be considered to ignore the directory + * while a pattern such as `/foo/**` is not considered to ignore the + * directory because it is matching files. + * @param {string} directoryPath The path of a directory to check. + * @returns {boolean} True if the directory is ignored, false if not. Will + * return true for any directory that is not inside of `basePath`. + * @throws {Error} When the `ConfigArray` is not normalized. + */ + isDirectoryIgnored(directoryPath: string): boolean; + #private; +} +export namespace ConfigArraySymbol { + let isNormalized: symbol; + let configCache: symbol; + let schema: symbol; + let finalizeConfig: symbol; + let preprocessConfig: symbol; +} diff --git a/slider/node_modules/@eslint/config-array/dist/esm/index.js b/slider/node_modules/@eslint/config-array/dist/esm/index.js new file mode 100644 index 0000000..60da469 --- /dev/null +++ b/slider/node_modules/@eslint/config-array/dist/esm/index.js @@ -0,0 +1,1509 @@ +// @ts-self-types="./index.d.ts" +import * as posixPath from './std__path/posix.js'; +import * as windowsPath from './std__path/windows.js'; +import minimatch from 'minimatch'; +import createDebug from 'debug'; +import { ObjectSchema } from '@eslint/object-schema'; +export { ObjectSchema } from '@eslint/object-schema'; + +/** + * @fileoverview ConfigSchema + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Types +//------------------------------------------------------------------------------ + +/** @typedef {import("@eslint/object-schema").PropertyDefinition} PropertyDefinition */ +/** @typedef {import("@eslint/object-schema").ObjectDefinition} ObjectDefinition */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * A strategy that does nothing. + * @type {PropertyDefinition} + */ +const NOOP_STRATEGY = { + required: false, + merge() { + return undefined; + }, + validate() {}, +}; + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The base schema that every ConfigArray uses. + * @type {ObjectDefinition} + */ +const baseSchema = Object.freeze({ + name: { + required: false, + merge() { + return undefined; + }, + validate(value) { + if (typeof value !== "string") { + throw new TypeError("Property must be a string."); + } + }, + }, + basePath: NOOP_STRATEGY, + files: NOOP_STRATEGY, + ignores: NOOP_STRATEGY, +}); + +/** + * @fileoverview ConfigSchema + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Types +//------------------------------------------------------------------------------ + + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Asserts that a given value is an array. + * @param {*} value The value to check. + * @returns {void} + * @throws {TypeError} When the value is not an array. + */ +function assertIsArray(value) { + if (!Array.isArray(value)) { + throw new TypeError("Expected value to be an array."); + } +} + +/** + * Asserts that a given value is an array containing only strings and functions. + * @param {*} value The value to check. + * @returns {void} + * @throws {TypeError} When the value is not an array of strings and functions. + */ +function assertIsArrayOfStringsAndFunctions(value) { + assertIsArray(value); + + if ( + value.some( + item => typeof item !== "string" && typeof item !== "function", + ) + ) { + throw new TypeError( + "Expected array to only contain strings and functions.", + ); + } +} + +/** + * Asserts that a given value is a non-empty array. + * @param {*} value The value to check. + * @returns {void} + * @throws {TypeError} When the value is not an array or an empty array. + */ +function assertIsNonEmptyArray(value) { + if (!Array.isArray(value) || value.length === 0) { + throw new TypeError("Expected value to be a non-empty array."); + } +} + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The schema for `files` and `ignores` that every ConfigArray uses. + * @type {ObjectDefinition} + */ +const filesAndIgnoresSchema = Object.freeze({ + basePath: { + required: false, + merge() { + return undefined; + }, + validate(value) { + if (typeof value !== "string") { + throw new TypeError("Expected value to be a string."); + } + }, + }, + files: { + required: false, + merge() { + return undefined; + }, + validate(value) { + // first check if it's an array + assertIsNonEmptyArray(value); + + // then check each member + value.forEach(item => { + if (Array.isArray(item)) { + assertIsArrayOfStringsAndFunctions(item); + } else if ( + typeof item !== "string" && + typeof item !== "function" + ) { + throw new TypeError( + "Items must be a string, a function, or an array of strings and functions.", + ); + } + }); + }, + }, + ignores: { + required: false, + merge() { + return undefined; + }, + validate: assertIsArrayOfStringsAndFunctions, + }, +}); + +/** + * @fileoverview ConfigArray + * @author Nicholas C. Zakas + */ + + +//------------------------------------------------------------------------------ +// Types +//------------------------------------------------------------------------------ + +/** @typedef {import("./types.ts").ConfigObject} ConfigObject */ +/** @typedef {import("minimatch").IMinimatchStatic} IMinimatchStatic */ +/** @typedef {import("minimatch").IMinimatch} IMinimatch */ +/** @typedef {import("@jsr/std__path")} PathImpl */ + +/* + * This is a bit of a hack to make TypeScript happy with the Rollup-created + * CommonJS file. Rollup doesn't do object destructuring for imported files + * and instead imports the default via `require()`. This messes up type checking + * for `ObjectSchema`. To work around that, we just import the type manually + * and give it a different name to use in the JSDoc comments. + */ +/** @typedef {import("@eslint/object-schema").ObjectSchema} ObjectSchemaInstance */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const Minimatch = minimatch.Minimatch; +const debug = createDebug("@eslint/config-array"); + +/** + * A cache for minimatch instances. + * @type {Map} + */ +const minimatchCache = new Map(); + +/** + * A cache for negated minimatch instances. + * @type {Map} + */ +const negatedMinimatchCache = new Map(); + +/** + * Options to use with minimatch. + * @type {Object} + */ +const MINIMATCH_OPTIONS = { + // matchBase: true, + dot: true, + allowWindowsEscape: true, +}; + +/** + * The types of config objects that are supported. + * @type {Set} + */ +const CONFIG_TYPES = new Set(["array", "function"]); + +/** + * Fields that are considered metadata and not part of the config object. + * @type {Set} + */ +const META_FIELDS = new Set(["name", "basePath"]); + +/** + * A schema containing just files and ignores for early validation. + * @type {ObjectSchemaInstance} + */ +const FILES_AND_IGNORES_SCHEMA = new ObjectSchema(filesAndIgnoresSchema); + +// Precomputed constant objects returned by `ConfigArray.getConfigWithStatus`. + +const CONFIG_WITH_STATUS_EXTERNAL = Object.freeze({ status: "external" }); +const CONFIG_WITH_STATUS_IGNORED = Object.freeze({ status: "ignored" }); +const CONFIG_WITH_STATUS_UNCONFIGURED = Object.freeze({ + status: "unconfigured", +}); + +// Match two leading dots followed by a slash or the end of input. +const EXTERNAL_PATH_REGEX = /^\.\.(?:\/|$)/u; + +/** + * Wrapper error for config validation errors that adds a name to the front of the + * error message. + */ +class ConfigError extends Error { + /** + * Creates a new instance. + * @param {string} name The config object name causing the error. + * @param {number} index The index of the config object in the array. + * @param {Object} options The options for the error. + * @param {Error} [options.cause] The error that caused this error. + * @param {string} [options.message] The message to use for the error. + */ + constructor(name, index, { cause, message }) { + const finalMessage = message || cause.message; + + super(`Config ${name}: ${finalMessage}`, { cause }); + + // copy over custom properties that aren't represented + if (cause) { + for (const key of Object.keys(cause)) { + if (!(key in this)) { + this[key] = cause[key]; + } + } + } + + /** + * The name of the error. + * @type {string} + * @readonly + */ + this.name = "ConfigError"; + + /** + * The index of the config object in the array. + * @type {number} + * @readonly + */ + this.index = index; + } +} + +/** + * Gets the name of a config object. + * @param {ConfigObject} config The config object to get the name of. + * @returns {string} The name of the config object. + */ +function getConfigName(config) { + if (config && typeof config.name === "string" && config.name) { + return `"${config.name}"`; + } + + return "(unnamed)"; +} + +/** + * Rethrows a config error with additional information about the config object. + * @param {object} config The config object to get the name of. + * @param {number} index The index of the config object in the array. + * @param {Error} error The error to rethrow. + * @throws {ConfigError} When the error is rethrown for a config. + */ +function rethrowConfigError(config, index, error) { + const configName = getConfigName(config); + throw new ConfigError(configName, index, { cause: error }); +} + +/** + * Shorthand for checking if a value is a string. + * @param {any} value The value to check. + * @returns {boolean} True if a string, false if not. + */ +function isString(value) { + return typeof value === "string"; +} + +/** + * Creates a function that asserts that the config is valid + * during normalization. This checks that the config is not nullish + * and that files and ignores keys of a config object are valid as per base schema. + * @param {Object} config The config object to check. + * @param {number} index The index of the config object in the array. + * @returns {void} + * @throws {ConfigError} If the files and ignores keys of a config object are not valid. + */ +function assertValidBaseConfig(config, index) { + if (config === null) { + throw new ConfigError(getConfigName(config), index, { + message: "Unexpected null config.", + }); + } + + if (config === undefined) { + throw new ConfigError(getConfigName(config), index, { + message: "Unexpected undefined config.", + }); + } + + if (typeof config !== "object") { + throw new ConfigError(getConfigName(config), index, { + message: "Unexpected non-object config.", + }); + } + + const validateConfig = {}; + + if ("basePath" in config) { + validateConfig.basePath = config.basePath; + } + + if ("files" in config) { + validateConfig.files = config.files; + } + + if ("ignores" in config) { + validateConfig.ignores = config.ignores; + } + + try { + FILES_AND_IGNORES_SCHEMA.validate(validateConfig); + } catch (validationError) { + rethrowConfigError(config, index, validationError); + } +} + +/** + * Wrapper around minimatch that caches minimatch patterns for + * faster matching speed over multiple file path evaluations. + * @param {string} filepath The file path to match. + * @param {string} pattern The glob pattern to match against. + * @param {object} options The minimatch options to use. + * @returns + */ +function doMatch(filepath, pattern, options = {}) { + let cache = minimatchCache; + + if (options.flipNegate) { + cache = negatedMinimatchCache; + } + + let matcher = cache.get(pattern); + + if (!matcher) { + matcher = new Minimatch( + pattern, + Object.assign({}, MINIMATCH_OPTIONS, options), + ); + cache.set(pattern, matcher); + } + + return matcher.match(filepath); +} + +/** + * Normalizes a pattern by removing the leading "./" if present. + * @param {string} pattern The pattern to normalize. + * @returns {string} The normalized pattern. + */ +function normalizePattern(pattern) { + if (isString(pattern)) { + if (pattern.startsWith("./")) { + return pattern.slice(2); + } + + if (pattern.startsWith("!./")) { + return `!${pattern.slice(3)}`; + } + } + + return pattern; +} + +/** + * Checks if a given pattern requires normalization. + * @param {any} pattern The pattern to check. + * @returns {boolean} True if the pattern needs normalization, false otherwise. + * + */ +function needsPatternNormalization(pattern) { + return ( + isString(pattern) && + (pattern.startsWith("./") || pattern.startsWith("!./")) + ); +} + +/** + * Normalizes `files` and `ignores` patterns in a config by removing "./" prefixes. + * @param {Object} config The config object to normalize patterns in. + * @param {string} namespacedBasePath The namespaced base path of the directory to which config base path is relative. + * @param {PathImpl} path Path-handling implementation. + * @returns {Object} The normalized config object. + */ +function normalizeConfigPatterns(config, namespacedBasePath, path) { + if (!config) { + return config; + } + + const hasBasePath = typeof config.basePath === "string"; + + let needsNormalization = false; + + if (hasBasePath) { + needsNormalization = true; + } + + if (!needsNormalization && Array.isArray(config.files)) { + needsNormalization = config.files.some(pattern => { + if (Array.isArray(pattern)) { + return pattern.some(needsPatternNormalization); + } + return needsPatternNormalization(pattern); + }); + } + + if (!needsNormalization && Array.isArray(config.ignores)) { + needsNormalization = config.ignores.some(needsPatternNormalization); + } + + if (!needsNormalization) { + return config; + } + + const newConfig = { ...config }; + + if (hasBasePath) { + if (path.isAbsolute(config.basePath)) { + newConfig.basePath = path.toNamespacedPath(config.basePath); + } else { + newConfig.basePath = path.resolve( + namespacedBasePath, + config.basePath, + ); + } + } + + if (Array.isArray(newConfig.files)) { + newConfig.files = newConfig.files.map(pattern => { + if (Array.isArray(pattern)) { + return pattern.map(normalizePattern); + } + return normalizePattern(pattern); + }); + } + + if (Array.isArray(newConfig.ignores)) { + newConfig.ignores = newConfig.ignores.map(normalizePattern); + } + + return newConfig; +} + +/** + * Normalizes a `ConfigArray` by flattening it and executing any functions + * that are found inside. + * @param {Array} items The items in a `ConfigArray`. + * @param {Object} context The context object to pass into any function + * found. + * @param {Array} extraConfigTypes The config types to check. + * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative. + * @param {PathImpl} path Path-handling implementation. + * @returns {Promise} A flattened array containing only config objects. + * @throws {TypeError} When a config function returns a function. + */ +async function normalize( + items, + context, + extraConfigTypes, + namespacedBasePath, + path, +) { + const allowFunctions = extraConfigTypes.includes("function"); + const allowArrays = extraConfigTypes.includes("array"); + + async function* flatTraverse(array) { + for (let item of array) { + if (typeof item === "function") { + if (!allowFunctions) { + throw new TypeError("Unexpected function."); + } + + item = item(context); + if (item.then) { + item = await item; + } + } + + if (Array.isArray(item)) { + if (!allowArrays) { + throw new TypeError("Unexpected array."); + } + yield* flatTraverse(item); + } else if (typeof item === "function") { + throw new TypeError( + "A config function can only return an object or array.", + ); + } else { + yield item; + } + } + } + + /* + * Async iterables cannot be used with the spread operator, so we need to manually + * create the array to return. + */ + const asyncIterable = await flatTraverse(items); + const configs = []; + + for await (const config of asyncIterable) { + configs.push(normalizeConfigPatterns(config, namespacedBasePath, path)); + } + + return configs; +} + +/** + * Normalizes a `ConfigArray` by flattening it and executing any functions + * that are found inside. + * @param {Array} items The items in a `ConfigArray`. + * @param {Object} context The context object to pass into any function + * found. + * @param {Array} extraConfigTypes The config types to check. + * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative. + * @param {PathImpl} path Path-handling implementation + * @returns {Array} A flattened array containing only config objects. + * @throws {TypeError} When a config function returns a function. + */ +function normalizeSync( + items, + context, + extraConfigTypes, + namespacedBasePath, + path, +) { + const allowFunctions = extraConfigTypes.includes("function"); + const allowArrays = extraConfigTypes.includes("array"); + + function* flatTraverse(array) { + for (let item of array) { + if (typeof item === "function") { + if (!allowFunctions) { + throw new TypeError("Unexpected function."); + } + + item = item(context); + if (item.then) { + throw new TypeError( + "Async config functions are not supported.", + ); + } + } + + if (Array.isArray(item)) { + if (!allowArrays) { + throw new TypeError("Unexpected array."); + } + + yield* flatTraverse(item); + } else if (typeof item === "function") { + throw new TypeError( + "A config function can only return an object or array.", + ); + } else { + yield item; + } + } + } + + const configs = []; + + for (const config of flatTraverse(items)) { + configs.push(normalizeConfigPatterns(config, namespacedBasePath, path)); + } + + return configs; +} + +/** + * Converts a given path to a relative path with all separator characters replaced by forward slashes (`"/"`). + * @param {string} fileOrDirPath The unprocessed path to convert. + * @param {string} namespacedBasePath The namespaced base path of the directory to which the calculated path shall be relative. + * @param {PathImpl} path Path-handling implementations. + * @returns {string} A relative path with all separator characters replaced by forward slashes. + */ +function toRelativePath(fileOrDirPath, namespacedBasePath, path) { + const fullPath = path.resolve(namespacedBasePath, fileOrDirPath); + const namespacedFullPath = path.toNamespacedPath(fullPath); + const relativePath = path.relative(namespacedBasePath, namespacedFullPath); + return relativePath.replaceAll(path.SEPARATOR, "/"); +} + +/** + * Determines if a given file path should be ignored based on the given + * matcher. + * @param {Array<{ basePath?: string, ignores: Array boolean)>}>} configs Configuration objects containing `ignores`. + * @param {string} filePath The unprocessed file path to check. + * @param {string} relativeFilePath The path of the file to check relative to the base path, + * using forward slash (`"/"`) as a separator. + * @param {Object} [basePathData] Additional data needed to recalculate paths for configuration objects + * that have `basePath` property. + * @param {string} [basePathData.basePath] Namespaced path to witch `relativeFilePath` is relative. + * @param {PathImpl} [basePathData.path] Path-handling implementation. + * @returns {boolean} True if the path should be ignored and false if not. + */ +function shouldIgnorePath( + configs, + filePath, + relativeFilePath, + { basePath, path } = {}, +) { + let shouldIgnore = false; + + for (const config of configs) { + let relativeFilePathToCheck = relativeFilePath; + if (config.basePath) { + relativeFilePathToCheck = toRelativePath( + path.resolve(basePath, relativeFilePath), + config.basePath, + path, + ); + + if ( + relativeFilePathToCheck === "" || + EXTERNAL_PATH_REGEX.test(relativeFilePathToCheck) + ) { + continue; + } + + if (relativeFilePath.endsWith("/")) { + relativeFilePathToCheck += "/"; + } + } + shouldIgnore = config.ignores.reduce((ignored, matcher) => { + if (!ignored) { + if (typeof matcher === "function") { + return matcher(filePath); + } + + // don't check negated patterns because we're not ignored yet + if (!matcher.startsWith("!")) { + return doMatch(relativeFilePathToCheck, matcher); + } + + // otherwise we're still not ignored + return false; + } + + // only need to check negated patterns because we're ignored + if (typeof matcher === "string" && matcher.startsWith("!")) { + return !doMatch(relativeFilePathToCheck, matcher, { + flipNegate: true, + }); + } + + return ignored; + }, shouldIgnore); + } + + return shouldIgnore; +} + +/** + * Determines if a given file path is matched by a config. If the config + * has no `files` field, then it matches; otherwise, if a `files` field + * is present then we match the globs in `files` and exclude any globs in + * `ignores`. + * @param {string} filePath The unprocessed file path to check. + * @param {string} relativeFilePath The path of the file to check relative to the base path, + * using forward slash (`"/"`) as a separator. + * @param {Object} config The config object to check. + * @returns {boolean} True if the file path is matched by the config, + * false if not. + */ +function pathMatches(filePath, relativeFilePath, config) { + // match both strings and functions + function match(pattern) { + if (isString(pattern)) { + return doMatch(relativeFilePath, pattern); + } + + if (typeof pattern === "function") { + return pattern(filePath); + } + + throw new TypeError(`Unexpected matcher type ${pattern}.`); + } + + // check for all matches to config.files + let filePathMatchesPattern = config.files.some(pattern => { + if (Array.isArray(pattern)) { + return pattern.every(match); + } + + return match(pattern); + }); + + /* + * If the file path matches the config.files patterns, then check to see + * if there are any files to ignore. + */ + if (filePathMatchesPattern && config.ignores) { + /* + * Pass config object without `basePath`, because `relativeFilePath` is already + * calculated as relative to it. + */ + filePathMatchesPattern = !shouldIgnorePath( + [{ ignores: config.ignores }], + filePath, + relativeFilePath, + ); + } + + return filePathMatchesPattern; +} + +/** + * Ensures that a ConfigArray has been normalized. + * @param {ConfigArray} configArray The ConfigArray to check. + * @returns {void} + * @throws {Error} When the `ConfigArray` is not normalized. + */ +function assertNormalized(configArray) { + // TODO: Throw more verbose error + if (!configArray.isNormalized()) { + throw new Error( + "ConfigArray must be normalized to perform this operation.", + ); + } +} + +/** + * Ensures that config types are valid. + * @param {Array} extraConfigTypes The config types to check. + * @returns {void} + * @throws {TypeError} When the config types array is invalid. + */ +function assertExtraConfigTypes(extraConfigTypes) { + if (extraConfigTypes.length > 2) { + throw new TypeError( + "configTypes must be an array with at most two items.", + ); + } + + for (const configType of extraConfigTypes) { + if (!CONFIG_TYPES.has(configType)) { + throw new TypeError( + `Unexpected config type "${configType}" found. Expected one of: "object", "array", "function".`, + ); + } + } +} + +/** + * Returns path-handling implementations for Unix or Windows, depending on a given absolute path. + * @param {string} fileOrDirPath The absolute path to check. + * @returns {PathImpl} Path-handling implementations for the specified path. + * @throws {Error} An error is thrown if the specified argument is not an absolute path. + */ +function getPathImpl(fileOrDirPath) { + // Posix absolute paths always start with a slash. + if (fileOrDirPath.startsWith("/")) { + return posixPath; + } + + // Windows absolute paths start with a letter followed by a colon and at least one backslash, + // or with two backslashes in the case of UNC paths. + // Forward slashed are automatically normalized to backslashes. + if (/^(?:[A-Za-z]:[/\\]|[/\\]{2})/u.test(fileOrDirPath)) { + return windowsPath; + } + + throw new Error( + `Expected an absolute path but received "${fileOrDirPath}"`, + ); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +const ConfigArraySymbol = { + isNormalized: Symbol("isNormalized"), + configCache: Symbol("configCache"), + schema: Symbol("schema"), + finalizeConfig: Symbol("finalizeConfig"), + preprocessConfig: Symbol("preprocessConfig"), +}; + +// used to store calculate data for faster lookup +const dataCache = new WeakMap(); + +/** + * Represents an array of config objects and provides method for working with + * those config objects. + */ +class ConfigArray extends Array { + /** + * The namespaced path of the config file directory. + * @type {string} + */ + #namespacedBasePath; + + /** + * Path-handling implementations. + * @type {PathImpl} + */ + #path; + + /** + * Creates a new instance of ConfigArray. + * @param {Iterable|Function|Object} configs An iterable yielding config + * objects, or a config function, or a config object. + * @param {Object} options The options for the ConfigArray. + * @param {string} [options.basePath="/"] The absolute path of the config file directory. + * Defaults to `"/"`. + * @param {boolean} [options.normalized=false] Flag indicating if the + * configs have already been normalized. + * @param {Object} [options.schema] The additional schema + * definitions to use for the ConfigArray schema. + * @param {Array} [options.extraConfigTypes] List of config types supported. + * @throws {TypeError} When the `basePath` is not a non-empty string, + */ + constructor( + configs, + { + basePath = "/", + normalized = false, + schema: customSchema, + extraConfigTypes = [], + } = {}, + ) { + super(); + + /** + * Tracks if the array has been normalized. + * @property isNormalized + * @type {boolean} + * @private + */ + this[ConfigArraySymbol.isNormalized] = normalized; + + /** + * The schema used for validating and merging configs. + * @property schema + * @type {ObjectSchemaInstance} + * @private + */ + this[ConfigArraySymbol.schema] = new ObjectSchema( + Object.assign({}, customSchema, baseSchema), + ); + + if (!isString(basePath) || !basePath) { + throw new TypeError("basePath must be a non-empty string"); + } + + /** + * The path of the config file that this array was loaded from. + * This is used to calculate filename matches. + * @property basePath + * @type {string} + */ + this.basePath = basePath; + + assertExtraConfigTypes(extraConfigTypes); + + /** + * The supported config types. + * @type {Array} + */ + this.extraConfigTypes = [...extraConfigTypes]; + Object.freeze(this.extraConfigTypes); + + /** + * A cache to store calculated configs for faster repeat lookup. + * @property configCache + * @type {Map} + * @private + */ + this[ConfigArraySymbol.configCache] = new Map(); + + // init cache + dataCache.set(this, { + explicitMatches: new Map(), + directoryMatches: new Map(), + files: undefined, + ignores: undefined, + }); + + // load the configs into this array + if (Array.isArray(configs)) { + this.push(...configs); + } else { + this.push(configs); + } + + // select path-handling implementations depending on the base path + this.#path = getPathImpl(basePath); + + // On Windows, `path.relative()` returns an absolute path when given two paths on different drives. + // The namespaced base path is useful to make sure that calculated relative paths are always relative. + // On Unix, it is identical to the base path. + this.#namespacedBasePath = this.#path.toNamespacedPath(basePath); + } + + /** + * Prevent normal array methods from creating a new `ConfigArray` instance. + * This is to ensure that methods such as `slice()` won't try to create a + * new instance of `ConfigArray` behind the scenes as doing so may throw + * an error due to the different constructor signature. + * @type {ArrayConstructor} The `Array` constructor. + */ + static get [Symbol.species]() { + return Array; + } + + /** + * Returns the `files` globs from every config object in the array. + * This can be used to determine which files will be matched by a + * config array or to use as a glob pattern when no patterns are provided + * for a command line interface. + * @returns {Array} An array of matchers. + */ + get files() { + assertNormalized(this); + + // if this data has been cached, retrieve it + const cache = dataCache.get(this); + + if (cache.files) { + return cache.files; + } + + // otherwise calculate it + + const result = []; + + for (const config of this) { + if (config.files) { + config.files.forEach(filePattern => { + result.push(filePattern); + }); + } + } + + // store result + cache.files = result; + dataCache.set(this, cache); + + return result; + } + + /** + * Returns ignore matchers that should always be ignored regardless of + * the matching `files` fields in any configs. This is necessary to mimic + * the behavior of things like .gitignore and .eslintignore, allowing a + * globbing operation to be faster. + * @returns {Object[]} An array of config objects representing global ignores. + */ + get ignores() { + assertNormalized(this); + + // if this data has been cached, retrieve it + const cache = dataCache.get(this); + + if (cache.ignores) { + return cache.ignores; + } + + // otherwise calculate it + + const result = []; + + for (const config of this) { + /* + * We only count ignores if there are no other keys in the object. + * In this case, it acts list a globally ignored pattern. If there + * are additional keys, then ignores act like exclusions. + */ + if ( + config.ignores && + Object.keys(config).filter(key => !META_FIELDS.has(key)) + .length === 1 + ) { + result.push(config); + } + } + + // store result + cache.ignores = result; + dataCache.set(this, cache); + + return result; + } + + /** + * Indicates if the config array has been normalized. + * @returns {boolean} True if the config array is normalized, false if not. + */ + isNormalized() { + return this[ConfigArraySymbol.isNormalized]; + } + + /** + * Normalizes a config array by flattening embedded arrays and executing + * config functions. + * @param {Object} [context] The context object for config functions. + * @returns {Promise} The current ConfigArray instance. + */ + async normalize(context = {}) { + if (!this.isNormalized()) { + const normalizedConfigs = await normalize( + this, + context, + this.extraConfigTypes, + this.#namespacedBasePath, + this.#path, + ); + this.length = 0; + this.push( + ...normalizedConfigs.map( + this[ConfigArraySymbol.preprocessConfig].bind(this), + ), + ); + this.forEach(assertValidBaseConfig); + this[ConfigArraySymbol.isNormalized] = true; + + // prevent further changes + Object.freeze(this); + } + + return this; + } + + /** + * Normalizes a config array by flattening embedded arrays and executing + * config functions. + * @param {Object} [context] The context object for config functions. + * @returns {ConfigArray} The current ConfigArray instance. + */ + normalizeSync(context = {}) { + if (!this.isNormalized()) { + const normalizedConfigs = normalizeSync( + this, + context, + this.extraConfigTypes, + this.#namespacedBasePath, + this.#path, + ); + this.length = 0; + this.push( + ...normalizedConfigs.map( + this[ConfigArraySymbol.preprocessConfig].bind(this), + ), + ); + this.forEach(assertValidBaseConfig); + this[ConfigArraySymbol.isNormalized] = true; + + // prevent further changes + Object.freeze(this); + } + + return this; + } + + /* eslint-disable class-methods-use-this -- Desired as instance methods */ + + /** + * Finalizes the state of a config before being cached and returned by + * `getConfig()`. Does nothing by default but is provided to be + * overridden by subclasses as necessary. + * @param {Object} config The config to finalize. + * @returns {Object} The finalized config. + */ + [ConfigArraySymbol.finalizeConfig](config) { + return config; + } + + /** + * Preprocesses a config during the normalization process. This is the + * method to override if you want to convert an array item before it is + * validated for the first time. For example, if you want to replace a + * string with an object, this is the method to override. + * @param {Object} config The config to preprocess. + * @returns {Object} The config to use in place of the argument. + */ + [ConfigArraySymbol.preprocessConfig](config) { + return config; + } + + /* eslint-enable class-methods-use-this -- Desired as instance methods */ + + /** + * Returns the config object for a given file path and a status that can be used to determine why a file has no config. + * @param {string} filePath The path of a file to get a config for. + * @returns {{ config?: Object, status: "ignored"|"external"|"unconfigured"|"matched" }} + * An object with an optional property `config` and property `status`. + * `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig}, + * `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}. + */ + getConfigWithStatus(filePath) { + assertNormalized(this); + + const cache = this[ConfigArraySymbol.configCache]; + + // first check the cache for a filename match to avoid duplicate work + if (cache.has(filePath)) { + return cache.get(filePath); + } + + // check to see if the file is outside the base path + + const relativeToBaseFilePath = toRelativePath( + filePath, + this.#namespacedBasePath, + this.#path, + ); + + if (EXTERNAL_PATH_REGEX.test(relativeToBaseFilePath)) { + debug(`No config for file ${filePath} outside of base path`); + + // cache and return result + cache.set(filePath, CONFIG_WITH_STATUS_EXTERNAL); + return CONFIG_WITH_STATUS_EXTERNAL; + } + + // next check to see if the file should be ignored + + // check if this should be ignored due to its directory + if (this.isDirectoryIgnored(this.#path.dirname(filePath))) { + debug(`Ignoring ${filePath} based on directory pattern`); + + // cache and return result + cache.set(filePath, CONFIG_WITH_STATUS_IGNORED); + return CONFIG_WITH_STATUS_IGNORED; + } + + if ( + shouldIgnorePath(this.ignores, filePath, relativeToBaseFilePath, { + basePath: this.#namespacedBasePath, + path: this.#path, + }) + ) { + debug(`Ignoring ${filePath} based on file pattern`); + + // cache and return result + cache.set(filePath, CONFIG_WITH_STATUS_IGNORED); + return CONFIG_WITH_STATUS_IGNORED; + } + + // filePath isn't automatically ignored, so try to construct config + + const matchingConfigIndices = []; + let matchFound = false; + const universalPattern = /^\*$|^!|\/\*{1,2}$/u; + + this.forEach((config, index) => { + const relativeFilePath = config.basePath + ? toRelativePath( + this.#path.resolve(this.#namespacedBasePath, filePath), + config.basePath, + this.#path, + ) + : relativeToBaseFilePath; + + if (config.basePath && EXTERNAL_PATH_REGEX.test(relativeFilePath)) { + debug( + `Skipped config found for ${filePath} (based on config's base path: ${config.basePath}`, + ); + return; + } + + if (!config.files) { + if (!config.ignores) { + debug(`Universal config found for ${filePath}`); + matchingConfigIndices.push(index); + return; + } + + if ( + Object.keys(config).filter(key => !META_FIELDS.has(key)) + .length === 1 + ) { + debug( + `Skipped config found for ${filePath} (global ignores)`, + ); + return; + } + + /* + * Pass config object without `basePath`, because `relativeFilePath` is already + * calculated as relative to it. + */ + if ( + shouldIgnorePath( + [{ ignores: config.ignores }], + filePath, + relativeFilePath, + ) + ) { + debug( + `Skipped config found for ${filePath} (based on ignores: ${config.ignores})`, + ); + return; + } + + debug( + `Matching config found for ${filePath} (based on ignores: ${config.ignores})`, + ); + matchingConfigIndices.push(index); + return; + } + + /* + * If a config has a files pattern * or patterns ending in /** or /*, + * and the filePath only matches those patterns, then the config is only + * applied if there is another config where the filePath matches + * a file with a specific extensions such as *.js. + */ + + const nonUniversalFiles = []; + const universalFiles = config.files.filter(element => { + if (Array.isArray(element)) { + /* + * filePath matches an element that is an array only if it matches + * all patterns in it (AND operation). Therefore, if there is at least + * one non-universal pattern in the array, and filePath matches the array, + * then we know for sure that filePath matches at least one non-universal + * pattern, so we can consider the entire array to be non-universal. + * In other words, all patterns in the array need to be universal + * for it to be considered universal. + */ + if ( + element.every(pattern => universalPattern.test(pattern)) + ) { + return true; + } + + nonUniversalFiles.push(element); + return false; + } + + // element is a string + + if (universalPattern.test(element)) { + return true; + } + + nonUniversalFiles.push(element); + return false; + }); + + // universal patterns were found so we need to check the config twice + if (universalFiles.length) { + debug("Universal files patterns found. Checking carefully."); + + // check that the config matches without the non-universal files first + if ( + nonUniversalFiles.length && + pathMatches(filePath, relativeFilePath, { + files: nonUniversalFiles, + ignores: config.ignores, + }) + ) { + debug(`Matching config found for ${filePath}`); + matchingConfigIndices.push(index); + matchFound = true; + return; + } + + // if there wasn't a match then check if it matches with universal files + if ( + universalFiles.length && + pathMatches(filePath, relativeFilePath, { + files: universalFiles, + ignores: config.ignores, + }) + ) { + debug(`Matching config found for ${filePath}`); + matchingConfigIndices.push(index); + return; + } + + // if we make here, then there was no match + return; + } + + // the normal case + if (pathMatches(filePath, relativeFilePath, config)) { + debug(`Matching config found for ${filePath}`); + matchingConfigIndices.push(index); + matchFound = true; + } + }); + + // if matching both files and ignores, there will be no config to create + if (!matchFound) { + debug(`No matching configs found for ${filePath}`); + + // cache and return result + cache.set(filePath, CONFIG_WITH_STATUS_UNCONFIGURED); + return CONFIG_WITH_STATUS_UNCONFIGURED; + } + + // check to see if there is a config cached by indices + const indicesKey = matchingConfigIndices.toString(); + let configWithStatus = cache.get(indicesKey); + + if (configWithStatus) { + // also store for filename for faster lookup next time + cache.set(filePath, configWithStatus); + + return configWithStatus; + } + + // otherwise construct the config + + // eslint-disable-next-line array-callback-return, consistent-return -- rethrowConfigError always throws an error + let finalConfig = matchingConfigIndices.reduce((result, index) => { + try { + return this[ConfigArraySymbol.schema].merge( + result, + this[index], + ); + } catch (validationError) { + rethrowConfigError(this[index], index, validationError); + } + }, {}); + + finalConfig = this[ConfigArraySymbol.finalizeConfig](finalConfig); + + configWithStatus = Object.freeze({ + config: finalConfig, + status: "matched", + }); + cache.set(filePath, configWithStatus); + cache.set(indicesKey, configWithStatus); + + return configWithStatus; + } + + /** + * Returns the config object for a given file path. + * @param {string} filePath The path of a file to get a config for. + * @returns {Object|undefined} The config object for this file or `undefined`. + */ + getConfig(filePath) { + return this.getConfigWithStatus(filePath).config; + } + + /** + * Determines whether a file has a config or why it doesn't. + * @param {string} filePath The path of the file to check. + * @returns {"ignored"|"external"|"unconfigured"|"matched"} One of the following values: + * * `"ignored"`: the file is ignored + * * `"external"`: the file is outside the base path + * * `"unconfigured"`: the file is not matched by any config + * * `"matched"`: the file has a matching config + */ + getConfigStatus(filePath) { + return this.getConfigWithStatus(filePath).status; + } + + /** + * Determines if the given filepath is ignored based on the configs. + * @param {string} filePath The path of a file to check. + * @returns {boolean} True if the path is ignored, false if not. + * @deprecated Use `isFileIgnored` instead. + */ + isIgnored(filePath) { + return this.isFileIgnored(filePath); + } + + /** + * Determines if the given filepath is ignored based on the configs. + * @param {string} filePath The path of a file to check. + * @returns {boolean} True if the path is ignored, false if not. + */ + isFileIgnored(filePath) { + return this.getConfigStatus(filePath) === "ignored"; + } + + /** + * Determines if the given directory is ignored based on the configs. + * This checks only default `ignores` that don't have `files` in the + * same config. A pattern such as `/foo` be considered to ignore the directory + * while a pattern such as `/foo/**` is not considered to ignore the + * directory because it is matching files. + * @param {string} directoryPath The path of a directory to check. + * @returns {boolean} True if the directory is ignored, false if not. Will + * return true for any directory that is not inside of `basePath`. + * @throws {Error} When the `ConfigArray` is not normalized. + */ + isDirectoryIgnored(directoryPath) { + assertNormalized(this); + + const relativeDirectoryPath = toRelativePath( + directoryPath, + this.#namespacedBasePath, + this.#path, + ); + + // basePath directory can never be ignored + if (relativeDirectoryPath === "") { + return false; + } + + if (EXTERNAL_PATH_REGEX.test(relativeDirectoryPath)) { + return true; + } + + // first check the cache + const cache = dataCache.get(this).directoryMatches; + + if (cache.has(relativeDirectoryPath)) { + return cache.get(relativeDirectoryPath); + } + + const directoryParts = relativeDirectoryPath.split("/"); + let relativeDirectoryToCheck = ""; + let result; + + /* + * In order to get the correct gitignore-style ignores, where an + * ignored parent directory cannot have any descendants unignored, + * we need to check every directory starting at the parent all + * the way down to the actual requested directory. + * + * We aggressively cache all of this info to make sure we don't + * have to recalculate everything for every call. + */ + do { + relativeDirectoryToCheck += `${directoryParts.shift()}/`; + + result = shouldIgnorePath( + this.ignores, + this.#path.join(this.basePath, relativeDirectoryToCheck), + relativeDirectoryToCheck, + { + basePath: this.#namespacedBasePath, + path: this.#path, + }, + ); + + cache.set(relativeDirectoryToCheck, result); + } while (!result && directoryParts.length); + + // also cache the result for the requested path + cache.set(relativeDirectoryPath, result); + + return result; + } +} + +export { ConfigArray, ConfigArraySymbol }; diff --git a/slider/node_modules/@eslint/config-array/dist/esm/std__path/posix.js b/slider/node_modules/@eslint/config-array/dist/esm/std__path/posix.js new file mode 100644 index 0000000..aee32b1 --- /dev/null +++ b/slider/node_modules/@eslint/config-array/dist/esm/std__path/posix.js @@ -0,0 +1,1313 @@ +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +function assertPath(path) { + if (typeof path !== "string") { + throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function stripSuffix(name, suffix) { + if (suffix.length >= name.length) { + return name; + } + const lenDiff = name.length - suffix.length; + for(let i = suffix.length - 1; i >= 0; --i){ + if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) { + return name; + } + } + return name.slice(0, -suffix.length); +} +function lastPathSegment(path, isSep, start = 0) { + let matchedNonSeparator = false; + let end = path.length; + for(let i = path.length - 1; i >= start; --i){ + if (isSep(path.charCodeAt(i))) { + if (matchedNonSeparator) { + start = i + 1; + break; + } + } else if (!matchedNonSeparator) { + matchedNonSeparator = true; + end = i + 1; + } + } + return path.slice(start, end); +} +function assertArgs$1(path, suffix) { + assertPath(path); + if (path.length === 0) return path; + if (typeof suffix !== "string") { + throw new TypeError(`Suffix must be a string, received "${JSON.stringify(suffix)}"`); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArg$3(url) { + url = url instanceof URL ? url : new URL(url); + if (url.protocol !== "file:") { + throw new TypeError(`URL must be a file URL: received "${url.protocol}"`); + } + return url; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Converts a file URL to a path string. + * + * @example Usage + * ```ts + * import { fromFileUrl } from "@std/path/posix/from-file-url"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(fromFileUrl(new URL("file:///home/foo")), "/home/foo"); + * ``` + * + * @param url The file URL to convert. + * @returns The path string. + */ function fromFileUrl(url) { + url = assertArg$3(url); + return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25")); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +function stripTrailingSeparators(segment, isSep) { + if (segment.length <= 1) { + return segment; + } + let end = segment.length; + for(let i = segment.length - 1; i > 0; i--){ + if (isSep(segment.charCodeAt(i))) { + end = i; + } else { + break; + } + } + return segment.slice(0, end); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +// Alphabet chars. +// Non-alphabetic chars. +const CHAR_DOT = 46; /* . */ +const CHAR_FORWARD_SLASH = 47; /* / */ + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +function isPosixPathSeparator(code) { + return code === CHAR_FORWARD_SLASH; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the last portion of a `path`. + * Trailing directory separators are ignored, and optional suffix is removed. + * + * @example Usage + * ```ts + * import { basename } from "@std/path/posix/basename"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(basename("/home/user/Documents/"), "Documents"); + * assertEquals(basename("/home/user/Documents/image.png"), "image.png"); + * assertEquals(basename("/home/user/Documents/image.png", ".png"), "image"); + * assertEquals(basename(new URL("file:///home/user/Documents/image.png")), "image.png"); + * assertEquals(basename(new URL("file:///home/user/Documents/image.png"), ".png"), "image"); + * ``` + * + * @example Working with URLs + * + * Note: This function doesn't automatically strip hash and query parts from + * URLs. If your URL contains a hash or query, remove them before passing the + * URL to the function. This can be done by passing the URL to `new URL(url)`, + * and setting the `hash` and `search` properties to empty strings. + * + * ```ts + * import { basename } from "@std/path/posix/basename"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(basename("https://deno.land/std/path/mod.ts"), "mod.ts"); + * assertEquals(basename("https://deno.land/std/path/mod.ts", ".ts"), "mod"); + * assertEquals(basename("https://deno.land/std/path/mod.ts?a=b"), "mod.ts?a=b"); + * assertEquals(basename("https://deno.land/std/path/mod.ts#header"), "mod.ts#header"); + * ``` + * + * @param path The path to extract the name from. + * @param suffix The suffix to remove from extracted name. + * @returns The extracted name. + */ function basename(path, suffix = "") { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertArgs$1(path, suffix); + const lastSegment = lastPathSegment(path, isPosixPathSeparator); + const strippedSegment = stripTrailingSeparators(lastSegment, isPosixPathSeparator); + return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * The character used to separate entries in the PATH environment variable. + */ const DELIMITER = ":"; +/** + * The character used to separate components of a file path. + */ const SEPARATOR = "/"; +/** + * A regular expression that matches one or more path separators. + */ const SEPARATOR_PATTERN = /\/+/; + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArg$2(path) { + assertPath(path); + if (path.length === 0) return "."; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the directory path of a `path`. + * + * @example Usage + * ```ts + * import { dirname } from "@std/path/posix/dirname"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(dirname("/home/user/Documents/"), "/home/user"); + * assertEquals(dirname("/home/user/Documents/image.png"), "/home/user/Documents"); + * assertEquals(dirname("https://deno.land/std/path/mod.ts"), "https://deno.land/std/path"); + * assertEquals(dirname(new URL("file:///home/user/Documents/image.png")), "/home/user/Documents"); + * ``` + * + * @example Working with URLs + * + * ```ts + * import { dirname } from "@std/path/posix/dirname"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(dirname("https://deno.land/std/path/mod.ts"), "https://deno.land/std/path"); + * assertEquals(dirname("https://deno.land/std/path/mod.ts?a=b"), "https://deno.land/std/path"); + * assertEquals(dirname("https://deno.land/std/path/mod.ts#header"), "https://deno.land/std/path"); + * ``` + * + * @param path The path to get the directory from. + * @returns The directory path. + */ function dirname(path) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertArg$2(path); + let end = -1; + let matchedNonSeparator = false; + for(let i = path.length - 1; i >= 1; --i){ + if (isPosixPathSeparator(path.charCodeAt(i))) { + if (matchedNonSeparator) { + end = i; + break; + } + } else { + matchedNonSeparator = true; + } + } + // No matches. Fallback based on provided path: + // + // - leading slashes paths + // "/foo" => "/" + // "///foo" => "/" + // - no slash path + // "foo" => "." + if (end === -1) { + return isPosixPathSeparator(path.charCodeAt(0)) ? "/" : "."; + } + return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the extension of the `path` with leading period. + * + * @example Usage + * ```ts + * import { extname } from "@std/path/posix/extname"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(extname("/home/user/Documents/file.ts"), ".ts"); + * assertEquals(extname("/home/user/Documents/"), ""); + * assertEquals(extname("/home/user/Documents/image.png"), ".png"); + * assertEquals(extname(new URL("file:///home/user/Documents/file.ts")), ".ts"); + * assertEquals(extname(new URL("file:///home/user/Documents/file.ts?a=b")), ".ts"); + * assertEquals(extname(new URL("file:///home/user/Documents/file.ts#header")), ".ts"); + * ``` + * + * @example Working with URLs + * + * Note: This function doesn't automatically strip hash and query parts from + * URLs. If your URL contains a hash or query, remove them before passing the + * URL to the function. This can be done by passing the URL to `new URL(url)`, + * and setting the `hash` and `search` properties to empty strings. + * + * ```ts + * import { extname } from "@std/path/posix/extname"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(extname("https://deno.land/std/path/mod.ts"), ".ts"); + * assertEquals(extname("https://deno.land/std/path/mod.ts?a=b"), ".ts?a=b"); + * assertEquals(extname("https://deno.land/std/path/mod.ts#header"), ".ts#header"); + * ``` + * + * @param path The path to get the extension from. + * @returns The extension (ex. for `file.ts` returns `.ts`). + */ function extname(path) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertPath(path); + let startDot = -1; + let startPart = 0; + let end = -1; + let matchedSlash = true; + // Track the state of characters (if any) we see before our first dot and + // after any path separator we find + let preDotState = 0; + for(let i = path.length - 1; i >= 0; --i){ + const code = path.charCodeAt(i); + if (isPosixPathSeparator(code)) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // extension + matchedSlash = false; + end = i + 1; + } + if (code === CHAR_DOT) { + // If this is our first dot, mark it as the start of our extension + if (startDot === -1) startDot = i; + else if (preDotState !== 1) preDotState = 1; + } else if (startDot !== -1) { + // We saw a non-dot and non-path separator before our dot, so we should + // have a good chance at having a non-empty extension + preDotState = -1; + } + } + if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + return ""; + } + return path.slice(startDot, end); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function _format(sep, pathObject) { + const dir = pathObject.dir || pathObject.root; + const base = pathObject.base || (pathObject.name ?? "") + (pathObject.ext ?? ""); + if (!dir) return base; + if (base === sep) return dir; + if (dir === pathObject.root) return dir + base; + return dir + sep + base; +} +function assertArg$1(pathObject) { + if (pathObject === null || typeof pathObject !== "object") { + throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof pathObject}"`); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Generate a path from `ParsedPath` object. + * + * @example Usage + * ```ts + * import { format } from "@std/path/posix/format"; + * import { assertEquals } from "@std/assert"; + * + * const path = format({ + * root: "/", + * dir: "/path/dir", + * base: "file.txt", + * ext: ".txt", + * name: "file" + * }); + * assertEquals(path, "/path/dir/file.txt"); + * ``` + * + * @param pathObject The path object to format. + * @returns The formatted path. + */ function format(pathObject) { + assertArg$1(pathObject); + return _format("/", pathObject); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Verifies whether provided path is absolute. + * + * @example Usage + * ```ts + * import { isAbsolute } from "@std/path/posix/is-absolute"; + * import { assert, assertFalse } from "@std/assert"; + * + * assert(isAbsolute("/home/user/Documents/")); + * assertFalse(isAbsolute("home/user/Documents/")); + * ``` + * + * @param path The path to verify. + * @returns Whether the path is absolute. + */ function isAbsolute(path) { + assertPath(path); + return path.length > 0 && isPosixPathSeparator(path.charCodeAt(0)); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArg(path) { + assertPath(path); + if (path.length === 0) return "."; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +// Resolves . and .. elements in a path with directory names +function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { + let res = ""; + let lastSegmentLength = 0; + let lastSlash = -1; + let dots = 0; + let code; + for(let i = 0; i <= path.length; ++i){ + if (i < path.length) code = path.charCodeAt(i); + else if (isPathSeparator(code)) break; + else code = CHAR_FORWARD_SLASH; + if (isPathSeparator(code)) { + if (lastSlash === i - 1 || dots === 1) ; else if (lastSlash !== i - 1 && dots === 2) { + if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) { + if (res.length > 2) { + const lastSlashIndex = res.lastIndexOf(separator); + if (lastSlashIndex === -1) { + res = ""; + lastSegmentLength = 0; + } else { + res = res.slice(0, lastSlashIndex); + lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); + } + lastSlash = i; + dots = 0; + continue; + } else if (res.length === 2 || res.length === 1) { + res = ""; + lastSegmentLength = 0; + lastSlash = i; + dots = 0; + continue; + } + } + if (allowAboveRoot) { + if (res.length > 0) res += `${separator}..`; + else res = ".."; + lastSegmentLength = 2; + } + } else { + if (res.length > 0) res += separator + path.slice(lastSlash + 1, i); + else res = path.slice(lastSlash + 1, i); + lastSegmentLength = i - lastSlash - 1; + } + lastSlash = i; + dots = 0; + } else if (code === CHAR_DOT && dots !== -1) { + ++dots; + } else { + dots = -1; + } + } + return res; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Normalize the `path`, resolving `'..'` and `'.'` segments. + * Note that resolving these segments does not necessarily mean that all will be eliminated. + * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`. + * + * @example Usage + * ```ts + * import { normalize } from "@std/path/posix/normalize"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(normalize("/foo/bar//baz/asdf/quux/.."), "/foo/bar/baz/asdf"); + * assertEquals(normalize(new URL("file:///foo/bar//baz/asdf/quux/..")), "/foo/bar/baz/asdf/"); + * ``` + * + * @example Working with URLs + * + * Note: This function will remove the double slashes from a URL's scheme. + * Hence, do not pass a full URL to this function. Instead, pass the pathname of + * the URL. + * + * ```ts + * import { normalize } from "@std/path/posix/normalize"; + * import { assertEquals } from "@std/assert"; + * + * const url = new URL("https://deno.land"); + * url.pathname = normalize("//std//assert//.//mod.ts"); + * assertEquals(url.href, "https://deno.land/std/assert/mod.ts"); + * + * url.pathname = normalize("std/assert/../async/retry.ts"); + * assertEquals(url.href, "https://deno.land/std/async/retry.ts"); + * ``` + * + * @param path The path to normalize. + * @returns The normalized path. + */ function normalize(path) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertArg(path); + const isAbsolute = isPosixPathSeparator(path.charCodeAt(0)); + const trailingSeparator = isPosixPathSeparator(path.charCodeAt(path.length - 1)); + // Normalize the path + path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator); + if (path.length === 0 && !isAbsolute) path = "."; + if (path.length > 0 && trailingSeparator) path += "/"; + if (isAbsolute) return `/${path}`; + return path; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Join all given a sequence of `paths`,then normalizes the resulting path. + * + * @example Usage + * ```ts + * import { join } from "@std/path/posix/join"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(join("/foo", "bar", "baz/asdf", "quux", ".."), "/foo/bar/baz/asdf"); + * assertEquals(join(new URL("file:///foo"), "bar", "baz/asdf", "quux", ".."), "/foo/bar/baz/asdf"); + * ``` + * + * @example Working with URLs + * ```ts + * import { join } from "@std/path/posix/join"; + * import { assertEquals } from "@std/assert"; + * + * const url = new URL("https://deno.land"); + * url.pathname = join("std", "path", "mod.ts"); + * assertEquals(url.href, "https://deno.land/std/path/mod.ts"); + * + * url.pathname = join("//std", "path/", "/mod.ts"); + * assertEquals(url.href, "https://deno.land/std/path/mod.ts"); + * ``` + * + * @param path The path to join. This can be string or file URL. + * @param paths The paths to join. + * @returns The joined path. + */ function join(path, ...paths) { + if (path === undefined) return "."; + if (path instanceof URL) { + path = fromFileUrl(path); + } + paths = path ? [ + path, + ...paths + ] : paths; + paths.forEach((path)=>assertPath(path)); + const joined = paths.filter((path)=>path.length > 0).join("/"); + return joined === "" ? "." : normalize(joined); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return a `ParsedPath` object of the `path`. + * + * @example Usage + * ```ts + * import { parse } from "@std/path/posix/parse"; + * import { assertEquals } from "@std/assert"; + * + * const path = parse("/home/user/file.txt"); + * assertEquals(path, { + * root: "/", + * dir: "/home/user", + * base: "file.txt", + * ext: ".txt", + * name: "file" + * }); + * ``` + * + * @param path The path to parse. + * @returns The parsed path object. + */ function parse(path) { + assertPath(path); + const ret = { + root: "", + dir: "", + base: "", + ext: "", + name: "" + }; + if (path.length === 0) return ret; + const isAbsolute = isPosixPathSeparator(path.charCodeAt(0)); + let start; + if (isAbsolute) { + ret.root = "/"; + start = 1; + } else { + start = 0; + } + let startDot = -1; + let startPart = 0; + let end = -1; + let matchedSlash = true; + let i = path.length - 1; + // Track the state of characters (if any) we see before our first dot and + // after any path separator we find + let preDotState = 0; + // Get non-dir info + for(; i >= start; --i){ + const code = path.charCodeAt(i); + if (isPosixPathSeparator(code)) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // extension + matchedSlash = false; + end = i + 1; + } + if (code === CHAR_DOT) { + // If this is our first dot, mark it as the start of our extension + if (startDot === -1) startDot = i; + else if (preDotState !== 1) preDotState = 1; + } else if (startDot !== -1) { + // We saw a non-dot and non-path separator before our dot, so we should + // have a good chance at having a non-empty extension + preDotState = -1; + } + } + if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + if (end !== -1) { + if (startPart === 0 && isAbsolute) { + ret.base = ret.name = path.slice(1, end); + } else { + ret.base = ret.name = path.slice(startPart, end); + } + } + // Fallback to '/' in case there is no basename + ret.base = ret.base || "/"; + } else { + if (startPart === 0 && isAbsolute) { + ret.name = path.slice(1, startDot); + ret.base = path.slice(1, end); + } else { + ret.name = path.slice(startPart, startDot); + ret.base = path.slice(startPart, end); + } + ret.ext = path.slice(startDot, end); + } + if (startPart > 0) { + ret.dir = stripTrailingSeparators(path.slice(0, startPart - 1), isPosixPathSeparator); + } else if (isAbsolute) ret.dir = "/"; + return ret; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Resolves path segments into a `path`. + * + * @example Usage + * ```ts + * import { resolve } from "@std/path/posix/resolve"; + * import { assertEquals } from "@std/assert"; + * + * const path = resolve("/foo", "bar", "baz/asdf", "quux", ".."); + * assertEquals(path, "/foo/bar/baz/asdf"); + * ``` + * + * @param pathSegments The path segments to resolve. + * @returns The resolved path. + */ function resolve(...pathSegments) { + let resolvedPath = ""; + let resolvedAbsolute = false; + for(let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--){ + let path; + if (i >= 0) path = pathSegments[i]; + else { + // deno-lint-ignore no-explicit-any + const { Deno } = globalThis; + if (typeof Deno?.cwd !== "function") { + throw new TypeError("Resolved a relative path without a current working directory (CWD)"); + } + path = Deno.cwd(); + } + assertPath(path); + // Skip empty entries + if (path.length === 0) { + continue; + } + resolvedPath = `${path}/${resolvedPath}`; + resolvedAbsolute = isPosixPathSeparator(path.charCodeAt(0)); + } + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when Deno.cwd() fails) + // Normalize the path + resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator); + if (resolvedAbsolute) { + if (resolvedPath.length > 0) return `/${resolvedPath}`; + else return "/"; + } else if (resolvedPath.length > 0) return resolvedPath; + else return "."; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArgs(from, to) { + assertPath(from); + assertPath(to); + if (from === to) return ""; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the relative path from `from` to `to` based on current working directory. + * + * If `from` and `to` are the same, return an empty string. + * + * @example Usage + * ```ts + * import { relative } from "@std/path/posix/relative"; + * import { assertEquals } from "@std/assert"; + * + * const path = relative("/data/orandea/test/aaa", "/data/orandea/impl/bbb"); + * assertEquals(path, "../../impl/bbb"); + * ``` + * + * @param from The path to start from. + * @param to The path to reach. + * @returns The relative path. + */ function relative(from, to) { + assertArgs(from, to); + from = resolve(from); + to = resolve(to); + if (from === to) return ""; + // Trim any leading backslashes + let fromStart = 1; + const fromEnd = from.length; + for(; fromStart < fromEnd; ++fromStart){ + if (!isPosixPathSeparator(from.charCodeAt(fromStart))) break; + } + const fromLen = fromEnd - fromStart; + // Trim any leading backslashes + let toStart = 1; + const toEnd = to.length; + for(; toStart < toEnd; ++toStart){ + if (!isPosixPathSeparator(to.charCodeAt(toStart))) break; + } + const toLen = toEnd - toStart; + // Compare paths to find the longest common path from root + const length = fromLen < toLen ? fromLen : toLen; + let lastCommonSep = -1; + let i = 0; + for(; i <= length; ++i){ + if (i === length) { + if (toLen > length) { + if (isPosixPathSeparator(to.charCodeAt(toStart + i))) { + // We get here if `from` is the exact base path for `to`. + // For example: from='/foo/bar'; to='/foo/bar/baz' + return to.slice(toStart + i + 1); + } else if (i === 0) { + // We get here if `from` is the root + // For example: from='/'; to='/foo' + return to.slice(toStart + i); + } + } else if (fromLen > length) { + if (isPosixPathSeparator(from.charCodeAt(fromStart + i))) { + // We get here if `to` is the exact base path for `from`. + // For example: from='/foo/bar/baz'; to='/foo/bar' + lastCommonSep = i; + } else if (i === 0) { + // We get here if `to` is the root. + // For example: from='/foo'; to='/' + lastCommonSep = 0; + } + } + break; + } + const fromCode = from.charCodeAt(fromStart + i); + const toCode = to.charCodeAt(toStart + i); + if (fromCode !== toCode) break; + else if (isPosixPathSeparator(fromCode)) lastCommonSep = i; + } + let out = ""; + // Generate the relative path based on the path difference between `to` + // and `from` + for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){ + if (i === fromEnd || isPosixPathSeparator(from.charCodeAt(i))) { + if (out.length === 0) out += ".."; + else out += "/.."; + } + } + // Lastly, append the rest of the destination (`to`) path that comes after + // the common path parts + if (out.length > 0) return out + to.slice(toStart + lastCommonSep); + else { + toStart += lastCommonSep; + if (isPosixPathSeparator(to.charCodeAt(toStart))) ++toStart; + return to.slice(toStart); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +const WHITESPACE_ENCODINGS = { + "\u0009": "%09", + "\u000A": "%0A", + "\u000B": "%0B", + "\u000C": "%0C", + "\u000D": "%0D", + "\u0020": "%20" +}; +function encodeWhitespace(string) { + return string.replaceAll(/[\s]/g, (c)=>{ + return WHITESPACE_ENCODINGS[c] ?? c; + }); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Converts a path string to a file URL. + * + * @example Usage + * ```ts + * import { toFileUrl } from "@std/path/posix/to-file-url"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(toFileUrl("/home/foo"), new URL("file:///home/foo")); + * assertEquals(toFileUrl("/home/foo bar"), new URL("file:///home/foo%20bar")); + * ``` + * + * @param path The path to convert. + * @returns The file URL. + */ function toFileUrl(path) { + if (!isAbsolute(path)) { + throw new TypeError(`Path must be absolute: received "${path}"`); + } + const url = new URL("file:///"); + url.pathname = encodeWhitespace(path.replace(/%/g, "%25").replace(/\\/g, "%5C")); + return url; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Converts a path to a namespaced path. This function returns the path as is on posix. + * + * @example Usage + * ```ts + * import { toNamespacedPath } from "@std/path/posix/to-namespaced-path"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(toNamespacedPath("/home/foo"), "/home/foo"); + * ``` + * + * @param path The path. + * @returns The namespaced path. + */ function toNamespacedPath(path) { + // Non-op on posix systems + return path; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function common$1(paths, sep) { + const [first = "", ...remaining] = paths; + const parts = first.split(sep); + let endOfPrefix = parts.length; + let append = ""; + for (const path of remaining){ + const compare = path.split(sep); + if (compare.length <= endOfPrefix) { + endOfPrefix = compare.length; + append = ""; + } + for(let i = 0; i < endOfPrefix; i++){ + if (compare[i] !== parts[i]) { + endOfPrefix = i; + append = i === 0 ? "" : sep; + break; + } + } + } + return parts.slice(0, endOfPrefix).join(sep) + append; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** Determines the common path from a set of paths for POSIX systems. + * + * @example Usage + * ```ts + * import { common } from "@std/path/posix/common"; + * import { assertEquals } from "@std/assert"; + * + * const path = common([ + * "./deno/std/path/mod.ts", + * "./deno/std/fs/mod.ts", + * ]); + * assertEquals(path, "./deno/std/"); + * ``` + * + * @param paths The paths to compare. + * @returns The common path. + */ function common(paths) { + return common$1(paths, SEPARATOR); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Options for {@linkcode globToRegExp}, {@linkcode joinGlobs}, + * {@linkcode normalizeGlob} and {@linkcode expandGlob}. + */ const REG_EXP_ESCAPE_CHARS = [ + "!", + "$", + "(", + ")", + "*", + "+", + ".", + "=", + "?", + "[", + "\\", + "^", + "{", + "|" +]; +const RANGE_ESCAPE_CHARS = [ + "-", + "\\", + "]" +]; +function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true, // os = osType, +caseInsensitive = false } = {}) { + if (glob === "") { + return /(?!)/; + } + // Remove trailing separators. + let newLength = glob.length; + for(; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--); + glob = glob.slice(0, newLength); + let regExpString = ""; + // Terminates correctly. Trust that `j` is incremented every iteration. + for(let j = 0; j < glob.length;){ + let segment = ""; + const groupStack = []; + let inRange = false; + let inEscape = false; + let endsWithSep = false; + let i = j; + // Terminates with `i` at the non-inclusive end of the current segment. + for(; i < glob.length && !c.seps.includes(glob[i]); i++){ + if (inEscape) { + inEscape = false; + const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS; + segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; + continue; + } + if (glob[i] === c.escapePrefix) { + inEscape = true; + continue; + } + if (glob[i] === "[") { + if (!inRange) { + inRange = true; + segment += "["; + if (glob[i + 1] === "!") { + i++; + segment += "^"; + } else if (glob[i + 1] === "^") { + i++; + segment += "\\^"; + } + continue; + } else if (glob[i + 1] === ":") { + let k = i + 1; + let value = ""; + while(glob[k + 1] !== undefined && glob[k + 1] !== ":"){ + value += glob[k + 1]; + k++; + } + if (glob[k + 1] === ":" && glob[k + 2] === "]") { + i = k + 2; + if (value === "alnum") segment += "\\dA-Za-z"; + else if (value === "alpha") segment += "A-Za-z"; + else if (value === "ascii") segment += "\x00-\x7F"; + else if (value === "blank") segment += "\t "; + else if (value === "cntrl") segment += "\x00-\x1F\x7F"; + else if (value === "digit") segment += "\\d"; + else if (value === "graph") segment += "\x21-\x7E"; + else if (value === "lower") segment += "a-z"; + else if (value === "print") segment += "\x20-\x7E"; + else if (value === "punct") { + segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~"; + } else if (value === "space") segment += "\\s\v"; + else if (value === "upper") segment += "A-Z"; + else if (value === "word") segment += "\\w"; + else if (value === "xdigit") segment += "\\dA-Fa-f"; + continue; + } + } + } + if (glob[i] === "]" && inRange) { + inRange = false; + segment += "]"; + continue; + } + if (inRange) { + segment += glob[i]; + continue; + } + if (glob[i] === ")" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { + segment += ")"; + const type = groupStack.pop(); + if (type === "!") { + segment += c.wildcard; + } else if (type !== "@") { + segment += type; + } + continue; + } + if (glob[i] === "|" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { + segment += "|"; + continue; + } + if (glob[i] === "+" && extended && glob[i + 1] === "(") { + i++; + groupStack.push("+"); + segment += "(?:"; + continue; + } + if (glob[i] === "@" && extended && glob[i + 1] === "(") { + i++; + groupStack.push("@"); + segment += "(?:"; + continue; + } + if (glob[i] === "?") { + if (extended && glob[i + 1] === "(") { + i++; + groupStack.push("?"); + segment += "(?:"; + } else { + segment += "."; + } + continue; + } + if (glob[i] === "!" && extended && glob[i + 1] === "(") { + i++; + groupStack.push("!"); + segment += "(?!"; + continue; + } + if (glob[i] === "{") { + groupStack.push("BRACE"); + segment += "(?:"; + continue; + } + if (glob[i] === "}" && groupStack[groupStack.length - 1] === "BRACE") { + groupStack.pop(); + segment += ")"; + continue; + } + if (glob[i] === "," && groupStack[groupStack.length - 1] === "BRACE") { + segment += "|"; + continue; + } + if (glob[i] === "*") { + if (extended && glob[i + 1] === "(") { + i++; + groupStack.push("*"); + segment += "(?:"; + } else { + const prevChar = glob[i - 1]; + let numStars = 1; + while(glob[i + 1] === "*"){ + i++; + numStars++; + } + const nextChar = glob[i + 1]; + if (globstarOption && numStars === 2 && [ + ...c.seps, + undefined + ].includes(prevChar) && [ + ...c.seps, + undefined + ].includes(nextChar)) { + segment += c.globstar; + endsWithSep = true; + } else { + segment += c.wildcard; + } + } + continue; + } + segment += REG_EXP_ESCAPE_CHARS.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; + } + // Check for unclosed groups or a dangling backslash. + if (groupStack.length > 0 || inRange || inEscape) { + // Parse failure. Take all characters from this segment literally. + segment = ""; + for (const c of glob.slice(j, i)){ + segment += REG_EXP_ESCAPE_CHARS.includes(c) ? `\\${c}` : c; + endsWithSep = false; + } + } + regExpString += segment; + if (!endsWithSep) { + regExpString += i < glob.length ? c.sep : c.sepMaybe; + endsWithSep = true; + } + // Terminates with `i` at the start of the next segment. + while(c.seps.includes(glob[i]))i++; + j = i; + } + regExpString = `^${regExpString}$`; + return new RegExp(regExpString, caseInsensitive ? "i" : ""); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +const constants = { + sep: "/+", + sepMaybe: "/*", + seps: [ + "/" + ], + globstar: "(?:[^/]*(?:/|$)+)*", + wildcard: "[^/]*", + escapePrefix: "\\" +}; +/** Convert a glob string to a regular expression. + * + * Tries to match bash glob expansion as closely as possible. + * + * Basic glob syntax: + * - `*` - Matches everything without leaving the path segment. + * - `?` - Matches any single character. + * - `{foo,bar}` - Matches `foo` or `bar`. + * - `[abcd]` - Matches `a`, `b`, `c` or `d`. + * - `[a-d]` - Matches `a`, `b`, `c` or `d`. + * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`. + * - `[[::]]` - Matches any character belonging to ``. + * - `[[:alnum:]]` - Matches any digit or letter. + * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`. + * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes + * for a complete list of supported character classes. + * - `\` - Escapes the next character for an `os` other than `"windows"`. + * - \` - Escapes the next character for `os` set to `"windows"`. + * - `/` - Path separator. + * - `\` - Additional path separator only for `os` set to `"windows"`. + * + * Extended syntax: + * - Requires `{ extended: true }`. + * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`. + * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same. + * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`. + * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`. + * - `!(foo|bar)` - Matches anything other than `{foo,bar}`. + * - See https://www.linuxjournal.com/content/bash-extended-globbing. + * + * Globstar syntax: + * - Requires `{ globstar: true }`. + * - `**` - Matches any number of any path segments. + * - Must comprise its entire path segment in the provided glob. + * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option. + * + * Note the following properties: + * - The generated `RegExp` is anchored at both start and end. + * - Repeating and trailing separators are tolerated. Trailing separators in the + * provided glob have no meaning and are discarded. + * - Absolute globs will only match absolute paths, etc. + * - Empty globs will match nothing. + * - Any special glob syntax must be contained to one path segment. For example, + * `?(foo|bar/baz)` is invalid. The separator will take precedence and the + * first segment ends with an unclosed group. + * - If a path segment ends with unclosed groups or a dangling escape prefix, a + * parse error has occurred. Every character for that segment is taken + * literally in this event. + * + * Limitations: + * - A negative group like `!(foo|bar)` will wrongly be converted to a negative + * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly + * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively, + * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if + * the group occurs not nested at the end of the segment. + * + * @example Usage + * ```ts + * import { globToRegExp } from "@std/path/posix/glob-to-regexp"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(globToRegExp("*.js"), /^[^/]*\.js\/*$/); + * ``` + * + * @param glob Glob string to convert. + * @param options Conversion options. + * @returns The regular expression equivalent to the glob. + */ function globToRegExp(glob, options = {}) { + return _globToRegExp(constants, glob, options); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Test whether the given string is a glob. + * + * @example Usage + * ```ts + * import { isGlob } from "@std/path/is-glob"; + * import { assert } from "@std/assert"; + * + * assert(!isGlob("foo/bar/../baz")); + * assert(isGlob("foo/*ar/../baz")); + * ``` + * + * @param str String to test. + * @returns `true` if the given string is a glob, otherwise `false` + */ function isGlob(str) { + const chars = { + "{": "}", + "(": ")", + "[": "]" + }; + const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; + if (str === "") { + return false; + } + let match; + while(match = regex.exec(str)){ + if (match[2]) return true; + let idx = match.index + match[0].length; + // if an open bracket/brace/paren is escaped, + // set the index to the next closing character + const open = match[1]; + const close = open ? chars[open] : null; + if (open && close) { + const n = str.indexOf(close, idx); + if (n !== -1) { + idx = n + 1; + } + } + str = str.slice(idx); + } + return false; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. + * + * @example Usage + * ```ts + * import { normalizeGlob } from "@std/path/posix/normalize-glob"; + * import { assertEquals } from "@std/assert"; + * + * const path = normalizeGlob("foo/bar/../*", { globstar: true }); + * assertEquals(path, "foo/*"); + * ``` + * + * @param glob The glob to normalize. + * @param options The options to use. + * @returns The normalized path. + */ function normalizeGlob(glob, options = {}) { + const { globstar = false } = options; + if (glob.match(/\0/g)) { + throw new Error(`Glob contains invalid characters: "${glob}"`); + } + if (!globstar) { + return normalize(glob); + } + const s = SEPARATOR_PATTERN.source; + const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g"); + return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, ".."); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Like join(), but doesn't collapse "**\/.." when `globstar` is true. + * + * @example Usage + * ```ts + * import { joinGlobs } from "@std/path/posix/join-globs"; + * import { assertEquals } from "@std/assert"; + * + * const path = joinGlobs(["foo", "bar", "**"], { globstar: true }); + * assertEquals(path, "foo/bar/**"); + * ``` + * + * @param globs The globs to join. + * @param options The options to use. + * @returns The joined path. + */ function joinGlobs(globs, options = {}) { + const { globstar = false } = options; + if (!globstar || globs.length === 0) { + return join(...globs); + } + let joined; + for (const glob of globs){ + const path = glob; + if (path.length > 0) { + if (!joined) joined = path; + else joined += `${SEPARATOR}${path}`; + } + } + if (!joined) return "."; + return normalizeGlob(joined, { + globstar + }); +} + +export { DELIMITER, SEPARATOR, SEPARATOR_PATTERN, basename, common, dirname, extname, format, fromFileUrl, globToRegExp, isAbsolute, isGlob, join, joinGlobs, normalize, normalizeGlob, parse, relative, resolve, toFileUrl, toNamespacedPath }; diff --git a/slider/node_modules/@eslint/config-array/dist/esm/std__path/windows.js b/slider/node_modules/@eslint/config-array/dist/esm/std__path/windows.js new file mode 100644 index 0000000..3a11a2e --- /dev/null +++ b/slider/node_modules/@eslint/config-array/dist/esm/std__path/windows.js @@ -0,0 +1,1655 @@ +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +function assertPath(path) { + if (typeof path !== "string") { + throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function stripSuffix(name, suffix) { + if (suffix.length >= name.length) { + return name; + } + const lenDiff = name.length - suffix.length; + for(let i = suffix.length - 1; i >= 0; --i){ + if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) { + return name; + } + } + return name.slice(0, -suffix.length); +} +function lastPathSegment(path, isSep, start = 0) { + let matchedNonSeparator = false; + let end = path.length; + for(let i = path.length - 1; i >= start; --i){ + if (isSep(path.charCodeAt(i))) { + if (matchedNonSeparator) { + start = i + 1; + break; + } + } else if (!matchedNonSeparator) { + matchedNonSeparator = true; + end = i + 1; + } + } + return path.slice(start, end); +} +function assertArgs$1(path, suffix) { + assertPath(path); + if (path.length === 0) return path; + if (typeof suffix !== "string") { + throw new TypeError(`Suffix must be a string, received "${JSON.stringify(suffix)}"`); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +// Alphabet chars. +const CHAR_UPPERCASE_A = 65; /* A */ +const CHAR_LOWERCASE_A = 97; /* a */ +const CHAR_UPPERCASE_Z = 90; /* Z */ +const CHAR_LOWERCASE_Z = 122; /* z */ +// Non-alphabetic chars. +const CHAR_DOT = 46; /* . */ +const CHAR_FORWARD_SLASH = 47; /* / */ +const CHAR_BACKWARD_SLASH = 92; /* \ */ +const CHAR_COLON = 58; /* : */ +const CHAR_QUESTION_MARK = 63; /* ? */ + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +function stripTrailingSeparators(segment, isSep) { + if (segment.length <= 1) { + return segment; + } + let end = segment.length; + for(let i = segment.length - 1; i > 0; i--){ + if (isSep(segment.charCodeAt(i))) { + end = i; + } else { + break; + } + } + return segment.slice(0, end); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +function isPosixPathSeparator(code) { + return code === CHAR_FORWARD_SLASH; +} +function isPathSeparator(code) { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; +} +function isWindowsDeviceRoot(code) { + return code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z || code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArg$3(url) { + url = url instanceof URL ? url : new URL(url); + if (url.protocol !== "file:") { + throw new TypeError(`URL must be a file URL: received "${url.protocol}"`); + } + return url; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Converts a file URL to a path string. + * + * @example Usage + * ```ts + * import { fromFileUrl } from "@std/path/windows/from-file-url"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(fromFileUrl("file:///home/foo"), "\\home\\foo"); + * assertEquals(fromFileUrl("file:///C:/Users/foo"), "C:\\Users\\foo"); + * assertEquals(fromFileUrl("file://localhost/home/foo"), "\\home\\foo"); + * ``` + * + * @param url The file URL to convert. + * @returns The path string. + */ function fromFileUrl(url) { + url = assertArg$3(url); + let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\"); + if (url.hostname !== "") { + // Note: The `URL` implementation guarantees that the drive letter and + // hostname are mutually exclusive. Otherwise it would not have been valid + // to append the hostname and path like this. + path = `\\\\${url.hostname}${path}`; + } + return path; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the last portion of a `path`. + * Trailing directory separators are ignored, and optional suffix is removed. + * + * @example Usage + * ```ts + * import { basename } from "@std/path/windows/basename"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(basename("C:\\user\\Documents\\"), "Documents"); + * assertEquals(basename("C:\\user\\Documents\\image.png"), "image.png"); + * assertEquals(basename("C:\\user\\Documents\\image.png", ".png"), "image"); + * assertEquals(basename(new URL("file:///C:/user/Documents/image.png")), "image.png"); + * assertEquals(basename(new URL("file:///C:/user/Documents/image.png"), ".png"), "image"); + * ``` + * + * @param path The path to extract the name from. + * @param suffix The suffix to remove from extracted name. + * @returns The extracted name. + */ function basename(path, suffix = "") { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertArgs$1(path, suffix); + // Check for a drive letter prefix so as not to mistake the following + // path separator as an extra separator at the end of the path that can be + // disregarded + let start = 0; + if (path.length >= 2) { + const drive = path.charCodeAt(0); + if (isWindowsDeviceRoot(drive)) { + if (path.charCodeAt(1) === CHAR_COLON) start = 2; + } + } + const lastSegment = lastPathSegment(path, isPathSeparator, start); + const strippedSegment = stripTrailingSeparators(lastSegment, isPathSeparator); + return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * The character used to separate entries in the PATH environment variable. + */ const DELIMITER = ";"; +/** + * The character used to separate components of a file path. + */ const SEPARATOR = "\\"; +/** + * A regular expression that matches one or more path separators. + */ const SEPARATOR_PATTERN = /[\\/]+/; + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArg$2(path) { + assertPath(path); + if (path.length === 0) return "."; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the directory path of a `path`. + * + * @example Usage + * ```ts + * import { dirname } from "@std/path/windows/dirname"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(dirname("C:\\foo\\bar\\baz.ext"), "C:\\foo\\bar"); + * assertEquals(dirname(new URL("file:///C:/foo/bar/baz.ext")), "C:\\foo\\bar"); + * ``` + * + * @param path The path to get the directory from. + * @returns The directory path. + */ function dirname(path) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertArg$2(path); + const len = path.length; + let rootEnd = -1; + let end = -1; + let matchedSlash = true; + let offset = 0; + const code = path.charCodeAt(0); + // Try to match a root + if (len > 1) { + if (isPathSeparator(code)) { + // Possible UNC root + rootEnd = offset = 1; + if (isPathSeparator(path.charCodeAt(1))) { + // Matched double path separator at beginning + let j = 2; + let last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more path separators + for(; j < len; ++j){ + if (!isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j === len) { + // We matched a UNC root only + return path; + } + if (j !== last) { + // We matched a UNC root with leftovers + // Offset by 1 to include the separator after the UNC root to + // treat it as a "normal root" on top of a (UNC) root + rootEnd = offset = j + 1; + } + } + } + } + } else if (isWindowsDeviceRoot(code)) { + // Possible device root + if (path.charCodeAt(1) === CHAR_COLON) { + rootEnd = offset = 2; + if (len > 2) { + if (isPathSeparator(path.charCodeAt(2))) rootEnd = offset = 3; + } + } + } + } else if (isPathSeparator(code)) { + // `path` contains just a path separator, exit early to avoid + // unnecessary work + return path; + } + for(let i = len - 1; i >= offset; --i){ + if (isPathSeparator(path.charCodeAt(i))) { + if (!matchedSlash) { + end = i; + break; + } + } else { + // We saw the first non-path separator + matchedSlash = false; + } + } + if (end === -1) { + if (rootEnd === -1) return "."; + else end = rootEnd; + } + return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the extension of the `path` with leading period. + * + * @example Usage + * ```ts + * import { extname } from "@std/path/windows/extname"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(extname("file.ts"), ".ts"); + * assertEquals(extname(new URL("file:///C:/foo/bar/baz.ext")), ".ext"); + * ``` + * + * @param path The path to get the extension from. + * @returns The extension of the `path`. + */ function extname(path) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertPath(path); + let start = 0; + let startDot = -1; + let startPart = 0; + let end = -1; + let matchedSlash = true; + // Track the state of characters (if any) we see before our first dot and + // after any path separator we find + let preDotState = 0; + // Check for a drive letter prefix so as not to mistake the following + // path separator as an extra separator at the end of the path that can be + // disregarded + if (path.length >= 2 && path.charCodeAt(1) === CHAR_COLON && isWindowsDeviceRoot(path.charCodeAt(0))) { + start = startPart = 2; + } + for(let i = path.length - 1; i >= start; --i){ + const code = path.charCodeAt(i); + if (isPathSeparator(code)) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // extension + matchedSlash = false; + end = i + 1; + } + if (code === CHAR_DOT) { + // If this is our first dot, mark it as the start of our extension + if (startDot === -1) startDot = i; + else if (preDotState !== 1) preDotState = 1; + } else if (startDot !== -1) { + // We saw a non-dot and non-path separator before our dot, so we should + // have a good chance at having a non-empty extension + preDotState = -1; + } + } + if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + return ""; + } + return path.slice(startDot, end); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function _format(sep, pathObject) { + const dir = pathObject.dir || pathObject.root; + const base = pathObject.base || (pathObject.name ?? "") + (pathObject.ext ?? ""); + if (!dir) return base; + if (base === sep) return dir; + if (dir === pathObject.root) return dir + base; + return dir + sep + base; +} +function assertArg$1(pathObject) { + if (pathObject === null || typeof pathObject !== "object") { + throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof pathObject}"`); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Generate a path from `ParsedPath` object. + * + * @example Usage + * ```ts + * import { format } from "@std/path/windows/format"; + * import { assertEquals } from "@std/assert"; + * + * const path = format({ + * root: "C:\\", + * dir: "C:\\path\\dir", + * base: "file.txt", + * ext: ".txt", + * name: "file" + * }); + * assertEquals(path, "C:\\path\\dir\\file.txt"); + * ``` + * + * @param pathObject The path object to format. + * @returns The formatted path. + */ function format(pathObject) { + assertArg$1(pathObject); + return _format("\\", pathObject); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Verifies whether provided path is absolute. + * + * @example Usage + * ```ts + * import { isAbsolute } from "@std/path/windows/is-absolute"; + * import { assert, assertFalse } from "@std/assert"; + * + * assert(isAbsolute("C:\\foo\\bar")); + * assertFalse(isAbsolute("..\\baz")); + * ``` + * + * @param path The path to verify. + * @returns `true` if the path is absolute, `false` otherwise. + */ function isAbsolute(path) { + assertPath(path); + const len = path.length; + if (len === 0) return false; + const code = path.charCodeAt(0); + if (isPathSeparator(code)) { + return true; + } else if (isWindowsDeviceRoot(code)) { + // Possible device root + if (len > 2 && path.charCodeAt(1) === CHAR_COLON) { + if (isPathSeparator(path.charCodeAt(2))) return true; + } + } + return false; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArg(path) { + assertPath(path); + if (path.length === 0) return "."; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// Copyright the Browserify authors. MIT License. +// Ported from https://github.com/browserify/path-browserify/ +// This module is browser compatible. +// Resolves . and .. elements in a path with directory names +function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { + let res = ""; + let lastSegmentLength = 0; + let lastSlash = -1; + let dots = 0; + let code; + for(let i = 0; i <= path.length; ++i){ + if (i < path.length) code = path.charCodeAt(i); + else if (isPathSeparator(code)) break; + else code = CHAR_FORWARD_SLASH; + if (isPathSeparator(code)) { + if (lastSlash === i - 1 || dots === 1) ; else if (lastSlash !== i - 1 && dots === 2) { + if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) { + if (res.length > 2) { + const lastSlashIndex = res.lastIndexOf(separator); + if (lastSlashIndex === -1) { + res = ""; + lastSegmentLength = 0; + } else { + res = res.slice(0, lastSlashIndex); + lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); + } + lastSlash = i; + dots = 0; + continue; + } else if (res.length === 2 || res.length === 1) { + res = ""; + lastSegmentLength = 0; + lastSlash = i; + dots = 0; + continue; + } + } + if (allowAboveRoot) { + if (res.length > 0) res += `${separator}..`; + else res = ".."; + lastSegmentLength = 2; + } + } else { + if (res.length > 0) res += separator + path.slice(lastSlash + 1, i); + else res = path.slice(lastSlash + 1, i); + lastSegmentLength = i - lastSlash - 1; + } + lastSlash = i; + dots = 0; + } else if (code === CHAR_DOT && dots !== -1) { + ++dots; + } else { + dots = -1; + } + } + return res; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Normalize the `path`, resolving `'..'` and `'.'` segments. + * Note that resolving these segments does not necessarily mean that all will be eliminated. + * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`. + * + * @example Usage + * ```ts + * import { normalize } from "@std/path/windows/normalize"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(normalize("C:\\foo\\..\\bar"), "C:\\bar"); + * assertEquals(normalize(new URL("file:///C:/foo/../bar")), "C:\\bar"); + * ``` + * + * @param path The path to normalize + * @returns The normalized path + */ function normalize(path) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + assertArg(path); + const len = path.length; + let rootEnd = 0; + let device; + let isAbsolute = false; + const code = path.charCodeAt(0); + // Try to match a root + if (len > 1) { + if (isPathSeparator(code)) { + // Possible UNC root + // If we started with a separator, we know we at least have an absolute + // path of some kind (UNC or otherwise) + isAbsolute = true; + if (isPathSeparator(path.charCodeAt(1))) { + // Matched double path separator at beginning + let j = 2; + let last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + const firstPart = path.slice(last, j); + // Matched! + last = j; + // Match 1 or more path separators + for(; j < len; ++j){ + if (!isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j === len) { + // We matched a UNC root only + // Return the normalized version of the UNC root since there + // is nothing left to process + return `\\\\${firstPart}\\${path.slice(last)}\\`; + } else if (j !== last) { + // We matched a UNC root with leftovers + device = `\\\\${firstPart}\\${path.slice(last, j)}`; + rootEnd = j; + } + } + } + } else { + rootEnd = 1; + } + } else if (isWindowsDeviceRoot(code)) { + // Possible device root + if (path.charCodeAt(1) === CHAR_COLON) { + device = path.slice(0, 2); + rootEnd = 2; + if (len > 2) { + if (isPathSeparator(path.charCodeAt(2))) { + // Treat separator following drive name as an absolute path + // indicator + isAbsolute = true; + rootEnd = 3; + } + } + } + } + } else if (isPathSeparator(code)) { + // `path` contains just a path separator, exit early to avoid unnecessary + // work + return "\\"; + } + let tail; + if (rootEnd < len) { + tail = normalizeString(path.slice(rootEnd), !isAbsolute, "\\", isPathSeparator); + } else { + tail = ""; + } + if (tail.length === 0 && !isAbsolute) tail = "."; + if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) { + tail += "\\"; + } + if (device === undefined) { + if (isAbsolute) { + if (tail.length > 0) return `\\${tail}`; + else return "\\"; + } + return tail; + } else if (isAbsolute) { + if (tail.length > 0) return `${device}\\${tail}`; + else return `${device}\\`; + } + return device + tail; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Join all given a sequence of `paths`,then normalizes the resulting path. + * + * @example Usage + * ```ts + * import { join } from "@std/path/windows/join"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(join("C:\\foo", "bar", "baz\\.."), "C:\\foo\\bar"); + * assertEquals(join(new URL("file:///C:/foo"), "bar", "baz\\.."), "C:\\foo\\bar"); + * ``` + * + * @param path The path to join. This can be string or file URL. + * @param paths The paths to join. + * @returns The joined path. + */ function join(path, ...paths) { + if (path instanceof URL) { + path = fromFileUrl(path); + } + paths = path ? [ + path, + ...paths + ] : paths; + paths.forEach((path)=>assertPath(path)); + paths = paths.filter((path)=>path.length > 0); + if (paths.length === 0) return "."; + // Make sure that the joined path doesn't start with two slashes, because + // normalize() will mistake it for an UNC path then. + // + // This step is skipped when it is very clear that the user actually + // intended to point at an UNC path. This is assumed when the first + // non-empty string arguments starts with exactly two slashes followed by + // at least one more non-slash character. + // + // Note that for normalize() to treat a path as an UNC path it needs to + // have at least 2 components, so we don't filter for that here. + // This means that the user can use join to construct UNC paths from + // a server name and a share name; for example: + // path.join('//server', 'share') -> '\\\\server\\share\\' + let needsReplace = true; + let slashCount = 0; + const firstPart = paths[0]; + if (isPathSeparator(firstPart.charCodeAt(0))) { + ++slashCount; + const firstLen = firstPart.length; + if (firstLen > 1) { + if (isPathSeparator(firstPart.charCodeAt(1))) { + ++slashCount; + if (firstLen > 2) { + if (isPathSeparator(firstPart.charCodeAt(2))) ++slashCount; + else { + // We matched a UNC path in the first part + needsReplace = false; + } + } + } + } + } + let joined = paths.join("\\"); + if (needsReplace) { + // Find any more consecutive slashes we need to replace + for(; slashCount < joined.length; ++slashCount){ + if (!isPathSeparator(joined.charCodeAt(slashCount))) break; + } + // Replace the slashes if needed + if (slashCount >= 2) joined = `\\${joined.slice(slashCount)}`; + } + return normalize(joined); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return a `ParsedPath` object of the `path`. + * + * @example Usage + * ```ts + * import { parse } from "@std/path/windows/parse"; + * import { assertEquals } from "@std/assert"; + * + * const parsed = parse("C:\\foo\\bar\\baz.ext"); + * assertEquals(parsed, { + * root: "C:\\", + * dir: "C:\\foo\\bar", + * base: "baz.ext", + * ext: ".ext", + * name: "baz", + * }); + * ``` + * + * @param path The path to parse. + * @returns The `ParsedPath` object. + */ function parse(path) { + assertPath(path); + const ret = { + root: "", + dir: "", + base: "", + ext: "", + name: "" + }; + const len = path.length; + if (len === 0) return ret; + let rootEnd = 0; + let code = path.charCodeAt(0); + // Try to match a root + if (len > 1) { + if (isPathSeparator(code)) { + // Possible UNC root + rootEnd = 1; + if (isPathSeparator(path.charCodeAt(1))) { + // Matched double path separator at beginning + let j = 2; + let last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more path separators + for(; j < len; ++j){ + if (!isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j === len) { + // We matched a UNC root only + rootEnd = j; + } else if (j !== last) { + // We matched a UNC root with leftovers + rootEnd = j + 1; + } + } + } + } + } else if (isWindowsDeviceRoot(code)) { + // Possible device root + if (path.charCodeAt(1) === CHAR_COLON) { + rootEnd = 2; + if (len > 2) { + if (isPathSeparator(path.charCodeAt(2))) { + if (len === 3) { + // `path` contains just a drive root, exit early to avoid + // unnecessary work + ret.root = ret.dir = path; + ret.base = "\\"; + return ret; + } + rootEnd = 3; + } + } else { + // `path` contains just a relative drive root, exit early to avoid + // unnecessary work + ret.root = ret.dir = path; + return ret; + } + } + } + } else if (isPathSeparator(code)) { + // `path` contains just a path separator, exit early to avoid + // unnecessary work + ret.root = ret.dir = path; + ret.base = "\\"; + return ret; + } + if (rootEnd > 0) ret.root = path.slice(0, rootEnd); + let startDot = -1; + let startPart = rootEnd; + let end = -1; + let matchedSlash = true; + let i = path.length - 1; + // Track the state of characters (if any) we see before our first dot and + // after any path separator we find + let preDotState = 0; + // Get non-dir info + for(; i >= rootEnd; --i){ + code = path.charCodeAt(i); + if (isPathSeparator(code)) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // extension + matchedSlash = false; + end = i + 1; + } + if (code === CHAR_DOT) { + // If this is our first dot, mark it as the start of our extension + if (startDot === -1) startDot = i; + else if (preDotState !== 1) preDotState = 1; + } else if (startDot !== -1) { + // We saw a non-dot and non-path separator before our dot, so we should + // have a good chance at having a non-empty extension + preDotState = -1; + } + } + if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + if (end !== -1) { + ret.base = ret.name = path.slice(startPart, end); + } + } else { + ret.name = path.slice(startPart, startDot); + ret.base = path.slice(startPart, end); + ret.ext = path.slice(startDot, end); + } + // Fallback to '\' in case there is no basename + ret.base = ret.base || "\\"; + // If the directory is the root, use the entire root as the `dir` including + // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the + // trailing slash (`C:\abc\def` -> `C:\abc`). + if (startPart > 0 && startPart !== rootEnd) { + ret.dir = path.slice(0, startPart - 1); + } else ret.dir = ret.root; + return ret; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Resolves path segments into a `path`. + * + * @example Usage + * ```ts + * import { resolve } from "@std/path/windows/resolve"; + * import { assertEquals } from "@std/assert"; + * + * const resolved = resolve("C:\\foo\\bar", "..\\baz"); + * assertEquals(resolved, "C:\\foo\\baz"); + * ``` + * + * @param pathSegments The path segments to process to path + * @returns The resolved path + */ function resolve(...pathSegments) { + let resolvedDevice = ""; + let resolvedTail = ""; + let resolvedAbsolute = false; + for(let i = pathSegments.length - 1; i >= -1; i--){ + let path; + // deno-lint-ignore no-explicit-any + const { Deno } = globalThis; + if (i >= 0) { + path = pathSegments[i]; + } else if (!resolvedDevice) { + if (typeof Deno?.cwd !== "function") { + throw new TypeError("Resolved a drive-letter-less path without a current working directory (CWD)"); + } + path = Deno.cwd(); + } else { + if (typeof Deno?.env?.get !== "function" || typeof Deno?.cwd !== "function") { + throw new TypeError("Resolved a relative path without a current working directory (CWD)"); + } + path = Deno.cwd(); + // Verify that a cwd was found and that it actually points + // to our drive. If not, default to the drive's root. + if (path === undefined || path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) { + path = `${resolvedDevice}\\`; + } + } + assertPath(path); + const len = path.length; + // Skip empty entries + if (len === 0) continue; + let rootEnd = 0; + let device = ""; + let isAbsolute = false; + const code = path.charCodeAt(0); + // Try to match a root + if (len > 1) { + if (isPathSeparator(code)) { + // Possible UNC root + // If we started with a separator, we know we at least have an + // absolute path of some kind (UNC or otherwise) + isAbsolute = true; + if (isPathSeparator(path.charCodeAt(1))) { + // Matched double path separator at beginning + let j = 2; + let last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + const firstPart = path.slice(last, j); + // Matched! + last = j; + // Match 1 or more path separators + for(; j < len; ++j){ + if (!isPathSeparator(path.charCodeAt(j))) break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more non-path separators + for(; j < len; ++j){ + if (isPathSeparator(path.charCodeAt(j))) break; + } + if (j === len) { + // We matched a UNC root only + device = `\\\\${firstPart}\\${path.slice(last)}`; + rootEnd = j; + } else if (j !== last) { + // We matched a UNC root with leftovers + device = `\\\\${firstPart}\\${path.slice(last, j)}`; + rootEnd = j; + } + } + } + } else { + rootEnd = 1; + } + } else if (isWindowsDeviceRoot(code)) { + // Possible device root + if (path.charCodeAt(1) === CHAR_COLON) { + device = path.slice(0, 2); + rootEnd = 2; + if (len > 2) { + if (isPathSeparator(path.charCodeAt(2))) { + // Treat separator following drive name as an absolute path + // indicator + isAbsolute = true; + rootEnd = 3; + } + } + } + } + } else if (isPathSeparator(code)) { + // `path` contains just a path separator + rootEnd = 1; + isAbsolute = true; + } + if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) { + continue; + } + if (resolvedDevice.length === 0 && device.length > 0) { + resolvedDevice = device; + } + if (!resolvedAbsolute) { + resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`; + resolvedAbsolute = isAbsolute; + } + if (resolvedAbsolute && resolvedDevice.length > 0) break; + } + // At this point the path should be resolved to a full absolute path, + // but handle relative paths to be safe (might happen when Deno.cwd() + // fails) + // Normalize the tail path + resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator); + return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || "."; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function assertArgs(from, to) { + assertPath(from); + assertPath(to); + if (from === to) return ""; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Return the relative path from `from` to `to` based on current working directory. + * + * An example in windws, for instance: + * from = 'C:\\orandea\\test\\aaa' + * to = 'C:\\orandea\\impl\\bbb' + * The output of the function should be: '..\\..\\impl\\bbb' + * + * @example Usage + * ```ts + * import { relative } from "@std/path/windows/relative"; + * import { assertEquals } from "@std/assert"; + * + * const relativePath = relative("C:\\foobar\\test\\aaa", "C:\\foobar\\impl\\bbb"); + * assertEquals(relativePath, "..\\..\\impl\\bbb"); + * ``` + * + * @param from The path from which to calculate the relative path + * @param to The path to which to calculate the relative path + * @returns The relative path from `from` to `to` + */ function relative(from, to) { + assertArgs(from, to); + const fromOrig = resolve(from); + const toOrig = resolve(to); + if (fromOrig === toOrig) return ""; + from = fromOrig.toLowerCase(); + to = toOrig.toLowerCase(); + if (from === to) return ""; + // Trim any leading backslashes + let fromStart = 0; + let fromEnd = from.length; + for(; fromStart < fromEnd; ++fromStart){ + if (from.charCodeAt(fromStart) !== CHAR_BACKWARD_SLASH) break; + } + // Trim trailing backslashes (applicable to UNC paths only) + for(; fromEnd - 1 > fromStart; --fromEnd){ + if (from.charCodeAt(fromEnd - 1) !== CHAR_BACKWARD_SLASH) break; + } + const fromLen = fromEnd - fromStart; + // Trim any leading backslashes + let toStart = 0; + let toEnd = to.length; + for(; toStart < toEnd; ++toStart){ + if (to.charCodeAt(toStart) !== CHAR_BACKWARD_SLASH) break; + } + // Trim trailing backslashes (applicable to UNC paths only) + for(; toEnd - 1 > toStart; --toEnd){ + if (to.charCodeAt(toEnd - 1) !== CHAR_BACKWARD_SLASH) break; + } + const toLen = toEnd - toStart; + // Compare paths to find the longest common path from root + const length = fromLen < toLen ? fromLen : toLen; + let lastCommonSep = -1; + let i = 0; + for(; i <= length; ++i){ + if (i === length) { + if (toLen > length) { + if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) { + // We get here if `from` is the exact base path for `to`. + // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz' + return toOrig.slice(toStart + i + 1); + } else if (i === 2) { + // We get here if `from` is the device root. + // For example: from='C:\\'; to='C:\\foo' + return toOrig.slice(toStart + i); + } + } + if (fromLen > length) { + if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) { + // We get here if `to` is the exact base path for `from`. + // For example: from='C:\\foo\\bar'; to='C:\\foo' + lastCommonSep = i; + } else if (i === 2) { + // We get here if `to` is the device root. + // For example: from='C:\\foo\\bar'; to='C:\\' + lastCommonSep = 3; + } + } + break; + } + const fromCode = from.charCodeAt(fromStart + i); + const toCode = to.charCodeAt(toStart + i); + if (fromCode !== toCode) break; + else if (fromCode === CHAR_BACKWARD_SLASH) lastCommonSep = i; + } + // We found a mismatch before the first common path separator was seen, so + // return the original `to`. + if (i !== length && lastCommonSep === -1) { + return toOrig; + } + let out = ""; + if (lastCommonSep === -1) lastCommonSep = 0; + // Generate the relative path based on the path difference between `to` and + // `from` + for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){ + if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) { + if (out.length === 0) out += ".."; + else out += "\\.."; + } + } + // Lastly, append the rest of the destination (`to`) path that comes after + // the common path parts + if (out.length > 0) { + return out + toOrig.slice(toStart + lastCommonSep, toEnd); + } else { + toStart += lastCommonSep; + if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) ++toStart; + return toOrig.slice(toStart, toEnd); + } +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +const WHITESPACE_ENCODINGS = { + "\u0009": "%09", + "\u000A": "%0A", + "\u000B": "%0B", + "\u000C": "%0C", + "\u000D": "%0D", + "\u0020": "%20" +}; +function encodeWhitespace(string) { + return string.replaceAll(/[\s]/g, (c)=>{ + return WHITESPACE_ENCODINGS[c] ?? c; + }); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Converts a path string to a file URL. + * + * @example Usage + * ```ts + * import { toFileUrl } from "@std/path/windows/to-file-url"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(toFileUrl("\\home\\foo"), new URL("file:///home/foo")); + * assertEquals(toFileUrl("C:\\Users\\foo"), new URL("file:///C:/Users/foo")); + * assertEquals(toFileUrl("\\\\127.0.0.1\\home\\foo"), new URL("file://127.0.0.1/home/foo")); + * ``` + * @param path The path to convert. + * @returns The file URL. + */ function toFileUrl(path) { + if (!isAbsolute(path)) { + throw new TypeError(`Path must be absolute: received "${path}"`); + } + const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/); + const url = new URL("file:///"); + url.pathname = encodeWhitespace(pathname.replace(/%/g, "%25")); + if (hostname !== undefined && hostname !== "localhost") { + url.hostname = hostname; + if (!url.hostname) { + throw new TypeError(`Invalid hostname: "${url.hostname}"`); + } + } + return url; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Resolves path to a namespace path + * + * @example Usage + * ```ts + * import { toNamespacedPath } from "@std/path/windows/to-namespaced-path"; + * import { assertEquals } from "@std/assert"; + * + * const namespaced = toNamespacedPath("C:\\foo\\bar"); + * assertEquals(namespaced, "\\\\?\\C:\\foo\\bar"); + * ``` + * + * @param path The path to resolve to namespaced path + * @returns The resolved namespaced path + */ function toNamespacedPath(path) { + // Note: this will *probably* throw somewhere. + if (typeof path !== "string") return path; + if (path.length === 0) return ""; + const resolvedPath = resolve(path); + if (resolvedPath.length >= 3) { + if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) { + // Possible UNC root + if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) { + const code = resolvedPath.charCodeAt(2); + if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) { + // Matched non-long UNC root, convert the path to a long UNC path + return `\\\\?\\UNC\\${resolvedPath.slice(2)}`; + } + } + } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) { + // Possible device root + if (resolvedPath.charCodeAt(1) === CHAR_COLON && resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) { + // Matched device root, convert the path to a long UNC path + return `\\\\?\\${resolvedPath}`; + } + } + } + return path; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +function common$1(paths, sep) { + const [first = "", ...remaining] = paths; + const parts = first.split(sep); + let endOfPrefix = parts.length; + let append = ""; + for (const path of remaining){ + const compare = path.split(sep); + if (compare.length <= endOfPrefix) { + endOfPrefix = compare.length; + append = ""; + } + for(let i = 0; i < endOfPrefix; i++){ + if (compare[i] !== parts[i]) { + endOfPrefix = i; + append = i === 0 ? "" : sep; + break; + } + } + } + return parts.slice(0, endOfPrefix).join(sep) + append; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Determines the common path from a set of paths for Windows systems. + * + * @example Usage + * ```ts + * import { common } from "@std/path/windows/common"; + * import { assertEquals } from "@std/assert"; + * + * const path = common([ + * "C:\\foo\\bar", + * "C:\\foo\\baz", + * ]); + * assertEquals(path, "C:\\foo\\"); + * ``` + * + * @param paths The paths to compare. + * @returns The common path. + */ function common(paths) { + return common$1(paths, SEPARATOR); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Options for {@linkcode globToRegExp}, {@linkcode joinGlobs}, + * {@linkcode normalizeGlob} and {@linkcode expandGlob}. + */ const REG_EXP_ESCAPE_CHARS = [ + "!", + "$", + "(", + ")", + "*", + "+", + ".", + "=", + "?", + "[", + "\\", + "^", + "{", + "|" +]; +const RANGE_ESCAPE_CHARS = [ + "-", + "\\", + "]" +]; +function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true, // os = osType, +caseInsensitive = false } = {}) { + if (glob === "") { + return /(?!)/; + } + // Remove trailing separators. + let newLength = glob.length; + for(; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--); + glob = glob.slice(0, newLength); + let regExpString = ""; + // Terminates correctly. Trust that `j` is incremented every iteration. + for(let j = 0; j < glob.length;){ + let segment = ""; + const groupStack = []; + let inRange = false; + let inEscape = false; + let endsWithSep = false; + let i = j; + // Terminates with `i` at the non-inclusive end of the current segment. + for(; i < glob.length && !c.seps.includes(glob[i]); i++){ + if (inEscape) { + inEscape = false; + const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS; + segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; + continue; + } + if (glob[i] === c.escapePrefix) { + inEscape = true; + continue; + } + if (glob[i] === "[") { + if (!inRange) { + inRange = true; + segment += "["; + if (glob[i + 1] === "!") { + i++; + segment += "^"; + } else if (glob[i + 1] === "^") { + i++; + segment += "\\^"; + } + continue; + } else if (glob[i + 1] === ":") { + let k = i + 1; + let value = ""; + while(glob[k + 1] !== undefined && glob[k + 1] !== ":"){ + value += glob[k + 1]; + k++; + } + if (glob[k + 1] === ":" && glob[k + 2] === "]") { + i = k + 2; + if (value === "alnum") segment += "\\dA-Za-z"; + else if (value === "alpha") segment += "A-Za-z"; + else if (value === "ascii") segment += "\x00-\x7F"; + else if (value === "blank") segment += "\t "; + else if (value === "cntrl") segment += "\x00-\x1F\x7F"; + else if (value === "digit") segment += "\\d"; + else if (value === "graph") segment += "\x21-\x7E"; + else if (value === "lower") segment += "a-z"; + else if (value === "print") segment += "\x20-\x7E"; + else if (value === "punct") { + segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~"; + } else if (value === "space") segment += "\\s\v"; + else if (value === "upper") segment += "A-Z"; + else if (value === "word") segment += "\\w"; + else if (value === "xdigit") segment += "\\dA-Fa-f"; + continue; + } + } + } + if (glob[i] === "]" && inRange) { + inRange = false; + segment += "]"; + continue; + } + if (inRange) { + segment += glob[i]; + continue; + } + if (glob[i] === ")" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { + segment += ")"; + const type = groupStack.pop(); + if (type === "!") { + segment += c.wildcard; + } else if (type !== "@") { + segment += type; + } + continue; + } + if (glob[i] === "|" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { + segment += "|"; + continue; + } + if (glob[i] === "+" && extended && glob[i + 1] === "(") { + i++; + groupStack.push("+"); + segment += "(?:"; + continue; + } + if (glob[i] === "@" && extended && glob[i + 1] === "(") { + i++; + groupStack.push("@"); + segment += "(?:"; + continue; + } + if (glob[i] === "?") { + if (extended && glob[i + 1] === "(") { + i++; + groupStack.push("?"); + segment += "(?:"; + } else { + segment += "."; + } + continue; + } + if (glob[i] === "!" && extended && glob[i + 1] === "(") { + i++; + groupStack.push("!"); + segment += "(?!"; + continue; + } + if (glob[i] === "{") { + groupStack.push("BRACE"); + segment += "(?:"; + continue; + } + if (glob[i] === "}" && groupStack[groupStack.length - 1] === "BRACE") { + groupStack.pop(); + segment += ")"; + continue; + } + if (glob[i] === "," && groupStack[groupStack.length - 1] === "BRACE") { + segment += "|"; + continue; + } + if (glob[i] === "*") { + if (extended && glob[i + 1] === "(") { + i++; + groupStack.push("*"); + segment += "(?:"; + } else { + const prevChar = glob[i - 1]; + let numStars = 1; + while(glob[i + 1] === "*"){ + i++; + numStars++; + } + const nextChar = glob[i + 1]; + if (globstarOption && numStars === 2 && [ + ...c.seps, + undefined + ].includes(prevChar) && [ + ...c.seps, + undefined + ].includes(nextChar)) { + segment += c.globstar; + endsWithSep = true; + } else { + segment += c.wildcard; + } + } + continue; + } + segment += REG_EXP_ESCAPE_CHARS.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; + } + // Check for unclosed groups or a dangling backslash. + if (groupStack.length > 0 || inRange || inEscape) { + // Parse failure. Take all characters from this segment literally. + segment = ""; + for (const c of glob.slice(j, i)){ + segment += REG_EXP_ESCAPE_CHARS.includes(c) ? `\\${c}` : c; + endsWithSep = false; + } + } + regExpString += segment; + if (!endsWithSep) { + regExpString += i < glob.length ? c.sep : c.sepMaybe; + endsWithSep = true; + } + // Terminates with `i` at the start of the next segment. + while(c.seps.includes(glob[i]))i++; + j = i; + } + regExpString = `^${regExpString}$`; + return new RegExp(regExpString, caseInsensitive ? "i" : ""); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +const constants = { + sep: "(?:\\\\|/)+", + sepMaybe: "(?:\\\\|/)*", + seps: [ + "\\", + "/" + ], + globstar: "(?:[^\\\\/]*(?:\\\\|/|$)+)*", + wildcard: "[^\\\\/]*", + escapePrefix: "`" +}; +/** Convert a glob string to a regular expression. + * + * Tries to match bash glob expansion as closely as possible. + * + * Basic glob syntax: + * - `*` - Matches everything without leaving the path segment. + * - `?` - Matches any single character. + * - `{foo,bar}` - Matches `foo` or `bar`. + * - `[abcd]` - Matches `a`, `b`, `c` or `d`. + * - `[a-d]` - Matches `a`, `b`, `c` or `d`. + * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`. + * - `[[::]]` - Matches any character belonging to ``. + * - `[[:alnum:]]` - Matches any digit or letter. + * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`. + * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes + * for a complete list of supported character classes. + * - `\` - Escapes the next character for an `os` other than `"windows"`. + * - \` - Escapes the next character for `os` set to `"windows"`. + * - `/` - Path separator. + * - `\` - Additional path separator only for `os` set to `"windows"`. + * + * Extended syntax: + * - Requires `{ extended: true }`. + * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`. + * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same. + * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`. + * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`. + * - `!(foo|bar)` - Matches anything other than `{foo,bar}`. + * - See https://www.linuxjournal.com/content/bash-extended-globbing. + * + * Globstar syntax: + * - Requires `{ globstar: true }`. + * - `**` - Matches any number of any path segments. + * - Must comprise its entire path segment in the provided glob. + * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option. + * + * Note the following properties: + * - The generated `RegExp` is anchored at both start and end. + * - Repeating and trailing separators are tolerated. Trailing separators in the + * provided glob have no meaning and are discarded. + * - Absolute globs will only match absolute paths, etc. + * - Empty globs will match nothing. + * - Any special glob syntax must be contained to one path segment. For example, + * `?(foo|bar/baz)` is invalid. The separator will take precedence and the + * first segment ends with an unclosed group. + * - If a path segment ends with unclosed groups or a dangling escape prefix, a + * parse error has occurred. Every character for that segment is taken + * literally in this event. + * + * Limitations: + * - A negative group like `!(foo|bar)` will wrongly be converted to a negative + * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly + * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively, + * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if + * the group occurs not nested at the end of the segment. + * + * @example Usage + * ```ts + * import { globToRegExp } from "@std/path/windows/glob-to-regexp"; + * import { assertEquals } from "@std/assert"; + * + * assertEquals(globToRegExp("*.js"), /^[^\\/]*\.js(?:\\|\/)*$/); + * ``` + * + * @param glob Glob string to convert. + * @param options Conversion options. + * @returns The regular expression equivalent to the glob. + */ function globToRegExp(glob, options = {}) { + return _globToRegExp(constants, glob, options); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Test whether the given string is a glob. + * + * @example Usage + * ```ts + * import { isGlob } from "@std/path/is-glob"; + * import { assert } from "@std/assert"; + * + * assert(!isGlob("foo/bar/../baz")); + * assert(isGlob("foo/*ar/../baz")); + * ``` + * + * @param str String to test. + * @returns `true` if the given string is a glob, otherwise `false` + */ function isGlob(str) { + const chars = { + "{": "}", + "(": ")", + "[": "]" + }; + const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; + if (str === "") { + return false; + } + let match; + while(match = regex.exec(str)){ + if (match[2]) return true; + let idx = match.index + match[0].length; + // if an open bracket/brace/paren is escaped, + // set the index to the next closing character + const open = match[1]; + const close = open ? chars[open] : null; + if (open && close) { + const n = str.indexOf(close, idx); + if (n !== -1) { + idx = n + 1; + } + } + str = str.slice(idx); + } + return false; +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. + * + * @example Usage + * ```ts + * import { normalizeGlob } from "@std/path/windows/normalize-glob"; + * import { assertEquals } from "@std/assert"; + * + * const normalized = normalizeGlob("**\\foo\\..\\bar", { globstar: true }); + * assertEquals(normalized, "**\\bar"); + * ``` + * + * @param glob The glob pattern to normalize. + * @param options The options for glob pattern. + * @returns The normalized glob pattern. + */ function normalizeGlob(glob, options = {}) { + const { globstar = false } = options; + if (glob.match(/\0/g)) { + throw new Error(`Glob contains invalid characters: "${glob}"`); + } + if (!globstar) { + return normalize(glob); + } + const s = SEPARATOR_PATTERN.source; + const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g"); + return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, ".."); +} + +// Copyright 2018-2025 the Deno authors. MIT license. +// This module is browser compatible. +/** + * Like join(), but doesn't collapse "**\/.." when `globstar` is true. + * + * @example Usage + * + * ```ts + * import { joinGlobs } from "@std/path/windows/join-globs"; + * import { assertEquals } from "@std/assert"; + * + * const joined = joinGlobs(["foo", "**", "bar"], { globstar: true }); + * assertEquals(joined, "foo\\**\\bar"); + * ``` + * + * @param globs The globs to join. + * @param options The options for glob pattern. + * @returns The joined glob pattern. + */ function joinGlobs(globs, options = {}) { + const { globstar = false } = options; + if (!globstar || globs.length === 0) { + return join(...globs); + } + let joined; + for (const glob of globs){ + const path = glob; + if (path.length > 0) { + if (!joined) joined = path; + else joined += `${SEPARATOR}${path}`; + } + } + if (!joined) return "."; + return normalizeGlob(joined, { + globstar + }); +} + +export { DELIMITER, SEPARATOR, SEPARATOR_PATTERN, basename, common, dirname, extname, format, fromFileUrl, globToRegExp, isAbsolute, isGlob, join, joinGlobs, normalize, normalizeGlob, parse, relative, resolve, toFileUrl, toNamespacedPath }; diff --git a/slider/node_modules/@eslint/config-array/dist/esm/types.d.ts b/slider/node_modules/@eslint/config-array/dist/esm/types.d.ts new file mode 100644 index 0000000..9b9e520 --- /dev/null +++ b/slider/node_modules/@eslint/config-array/dist/esm/types.d.ts @@ -0,0 +1,23 @@ +/** + * @fileoverview Types for the config-array package. + * @author Nicholas C. Zakas + */ +export interface ConfigObject { + /** + * The base path for files and ignores. + */ + basePath?: string; + /** + * The files to include. + */ + files?: string[]; + /** + * The files to exclude. + */ + ignores?: string[]; + /** + * The name of the config object. + */ + name?: string; + [key: string]: unknown; +} diff --git a/slider/node_modules/@eslint/config-array/dist/esm/types.ts b/slider/node_modules/@eslint/config-array/dist/esm/types.ts new file mode 100644 index 0000000..8566e04 --- /dev/null +++ b/slider/node_modules/@eslint/config-array/dist/esm/types.ts @@ -0,0 +1,29 @@ +/** + * @fileoverview Types for the config-array package. + * @author Nicholas C. Zakas + */ + +export interface ConfigObject { + /** + * The base path for files and ignores. + */ + basePath?: string; + + /** + * The files to include. + */ + files?: string[]; + + /** + * The files to exclude. + */ + ignores?: string[]; + + /** + * The name of the config object. + */ + name?: string; + + // may also have any number of other properties + [key: string]: unknown; +} diff --git a/slider/node_modules/@eslint/config-array/package.json b/slider/node_modules/@eslint/config-array/package.json new file mode 100644 index 0000000..a4f76d7 --- /dev/null +++ b/slider/node_modules/@eslint/config-array/package.json @@ -0,0 +1,63 @@ +{ + "name": "@eslint/config-array", + "version": "0.21.0", + "description": "General purpose glob-based configuration matching.", + "author": "Nicholas C. Zakas", + "type": "module", + "main": "dist/esm/index.js", + "types": "dist/esm/index.d.ts", + "exports": { + "require": { + "types": "./dist/cjs/index.d.cts", + "default": "./dist/cjs/index.cjs" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + } + }, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/rewrite.git", + "directory": "packages/config-array" + }, + "bugs": { + "url": "https://github.com/eslint/rewrite/issues" + }, + "homepage": "https://github.com/eslint/rewrite/tree/main/packages/config-array#readme", + "scripts": { + "build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js", + "build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts", + "build:std__path": "rollup -c rollup.std__path-config.js && node fix-std__path-imports", + "build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts && npm run build:std__path", + "test:jsr": "npx jsr@latest publish --dry-run", + "pretest": "npm run build", + "test": "mocha tests/", + "test:coverage": "c8 npm test" + }, + "keywords": [ + "configuration", + "configarray", + "config file" + ], + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "devDependencies": { + "@jsr/std__path": "^1.0.4", + "@types/minimatch": "^3.0.5", + "rollup-plugin-copy": "^3.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } +} diff --git a/slider/node_modules/@eslint/config-helpers/LICENSE b/slider/node_modules/@eslint/config-helpers/LICENSE new file mode 100644 index 0000000..ed43975 --- /dev/null +++ b/slider/node_modules/@eslint/config-helpers/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/slider/node_modules/@eslint/config-helpers/README.md b/slider/node_modules/@eslint/config-helpers/README.md new file mode 100644 index 0000000..5a65f6d --- /dev/null +++ b/slider/node_modules/@eslint/config-helpers/README.md @@ -0,0 +1,97 @@ +# @eslint/config-helpers + +## Description + +Helper utilities for creating ESLint configuration. + +## Installation + +For Node.js and compatible runtimes: + +```shell +npm install @eslint/config-helpers +# or +yarn add @eslint/config-helpers +# or +pnpm install @eslint/config-helpers +# or +bun add @eslint/config-helpers +``` + +For Deno: + +```shell +deno add @eslint/config-helpers +``` + +## Usage + +### `defineConfig()` + +The `defineConfig()` function allows you to specify an ESLint configuration with full type checking and additional capabilities, such as `extends`. Here's an example: + +```js +// eslint.config.js +import { defineConfig } from "@eslint/config-helpers"; +import js from "@eslint/js"; + +export default defineConfig([ + { + files: ["src/**/*.js"], + plugins: { js }, + extends: ["js/recommended"], + rules: { + semi: "error", + "prefer-const": "error", + }, + }, + { + files: ["test/**/*.js"], + rules: { + "no-console": "off", + }, + }, +]); +``` + +### `globalIgnores()` + +The `globalIgnores()` function allows you to specify patterns for files and directories that should be globally ignored by ESLint. This is useful for excluding files that you don't want to lint, such as build directories or third-party libraries. Here's an example: + +```js +// eslint.config.js +import { defineConfig, globalIgnores } from "@eslint/config-helpers"; + +export default defineConfig([ + { + files: ["src/**/*.js"], + rules: { + semi: "error", + "prefer-const": "error", + }, + }, + globalIgnores(["node_modules/", "dist/", "coverage/"]), +]); +``` + +## License + +Apache 2.0 + + + + +## Sponsors + +The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) +to get your logo on our READMEs and [website](https://eslint.org/sponsors). + +

Platinum Sponsors

+

Automattic Airbnb

Gold Sponsors

+

Qlty Software trunk.io Shopify

Silver Sponsors

+

Vite Liftoff American Express StackBlitz

Bronze Sponsors

+

Cybozu Anagram Solver Icons8 Discord GitBook Nx Mercedes-Benz Group HeroCoders LambdaTest

+

Technology Sponsors

+Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work. +

Netlify Algolia 1Password

+ diff --git a/slider/node_modules/@eslint/config-helpers/dist/cjs/index.cjs b/slider/node_modules/@eslint/config-helpers/dist/cjs/index.cjs new file mode 100644 index 0000000..0d01588 --- /dev/null +++ b/slider/node_modules/@eslint/config-helpers/dist/cjs/index.cjs @@ -0,0 +1,581 @@ +'use strict'; + +/** + * @fileoverview defineConfig helper + * @author Nicholas C. Zakas + */ + +//----------------------------------------------------------------------------- +// Type Definitions +//----------------------------------------------------------------------------- + +/** @typedef {import("eslint").Linter.Config} Config */ +/** @typedef {import("eslint").Linter.LegacyConfig} LegacyConfig */ +/** @typedef {import("eslint").ESLint.Plugin} Plugin */ +/** @typedef {import("eslint").Linter.RuleEntry} RuleEntry */ +/** @typedef {import("./types.ts").ExtendsElement} ExtendsElement */ +/** @typedef {import("./types.ts").SimpleExtendsElement} SimpleExtendsElement */ +/** @typedef {import("./types.ts").ConfigWithExtends} ConfigWithExtends */ +/** @typedef {import("./types.ts").InfiniteArray} InfiniteConfigArray */ +/** @typedef {import("./types.ts").ConfigWithExtendsArray} ConfigWithExtendsArray */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const eslintrcKeys = [ + "env", + "extends", + "globals", + "ignorePatterns", + "noInlineConfig", + "overrides", + "parser", + "parserOptions", + "reportUnusedDisableDirectives", + "root", +]; + +const allowedGlobalIgnoreKeys = new Set(["basePath", "ignores", "name"]); + +/** + * Gets the name of a config object. + * @param {Config} config The config object. + * @param {string} indexPath The index path of the config object. + * @return {string} The name of the config object. + */ +function getConfigName(config, indexPath) { + if (config.name) { + return config.name; + } + + return `UserConfig${indexPath}`; +} + +/** + * Gets the name of an extension. + * @param {SimpleExtendsElement} extension The extension. + * @param {string} indexPath The index of the extension. + * @return {string} The name of the extension. + */ +function getExtensionName(extension, indexPath) { + if (typeof extension === "string") { + return extension; + } + + if (extension.name) { + return extension.name; + } + + return `ExtendedConfig${indexPath}`; +} + +/** + * Determines if a config object is a legacy config. + * @param {Config|LegacyConfig} config The config object to check. + * @return {config is LegacyConfig} `true` if the config object is a legacy config. + */ +function isLegacyConfig(config) { + for (const key of eslintrcKeys) { + if (key in config) { + return true; + } + } + + return false; +} + +/** + * Determines if a config object is a global ignores config. + * @param {Config} config The config object to check. + * @return {boolean} `true` if the config object is a global ignores config. + */ +function isGlobalIgnores(config) { + return Object.keys(config).every(key => allowedGlobalIgnoreKeys.has(key)); +} + +/** + * Parses a plugin member ID (rule, processor, etc.) and returns + * the namespace and member name. + * @param {string} id The ID to parse. + * @returns {{namespace:string, name:string}} The namespace and member name. + */ +function getPluginMember(id) { + const firstSlashIndex = id.indexOf("/"); + + if (firstSlashIndex === -1) { + return { namespace: "", name: id }; + } + + let namespace = id.slice(0, firstSlashIndex); + + /* + * Special cases: + * 1. The namespace is `@`, that means it's referring to the + * core plugin so `@` is the full namespace. + * 2. The namespace starts with `@`, that means it's referring to + * an npm scoped package. That means the namespace is the scope + * and the package name (i.e., `@eslint/core`). + */ + if (namespace[0] === "@" && namespace !== "@") { + const secondSlashIndex = id.indexOf("/", firstSlashIndex + 1); + if (secondSlashIndex !== -1) { + namespace = id.slice(0, secondSlashIndex); + return { namespace, name: id.slice(secondSlashIndex + 1) }; + } + } + + const name = id.slice(firstSlashIndex + 1); + + return { namespace, name }; +} + +/** + * Normalizes the plugin config by replacing the namespace with the plugin namespace. + * @param {string} userNamespace The namespace of the plugin. + * @param {Plugin} plugin The plugin config object. + * @param {Config} config The config object to normalize. + * @return {Config} The normalized config object. + */ +function normalizePluginConfig(userNamespace, plugin, config) { + const pluginNamespace = plugin.meta?.namespace; + + // don't do anything if the plugin doesn't have a namespace or rules + if ( + !pluginNamespace || + pluginNamespace === userNamespace || + (!config.rules && !config.processor && !config.language) + ) { + return config; + } + + const result = { ...config }; + + // update the rules + if (result.rules) { + const ruleIds = Object.keys(result.rules); + + /** @type {Record} */ + const newRules = {}; + + for (let i = 0; i < ruleIds.length; i++) { + const ruleId = ruleIds[i]; + const { namespace: ruleNamespace, name: ruleName } = + getPluginMember(ruleId); + + if (ruleNamespace === pluginNamespace) { + newRules[`${userNamespace}/${ruleName}`] = result.rules[ruleId]; + } else { + newRules[ruleId] = result.rules[ruleId]; + } + } + + result.rules = newRules; + } + + // update the processor + + if (typeof result.processor === "string") { + const { namespace: processorNamespace, name: processorName } = + getPluginMember(result.processor); + + if (processorNamespace) { + if (processorNamespace === pluginNamespace) { + result.processor = `${userNamespace}/${processorName}`; + } + } + } + + // update the language + if (typeof result.language === "string") { + const { namespace: languageNamespace, name: languageName } = + getPluginMember(result.language); + + if (languageNamespace === pluginNamespace) { + result.language = `${userNamespace}/${languageName}`; + } + } + + return result; +} + +/** + * Deeply normalizes a plugin config, traversing recursively into an arrays. + * @param {string} userPluginNamespace The namespace of the plugin. + * @param {Plugin} plugin The plugin object. + * @param {Config|LegacyConfig|(Config|LegacyConfig)[]} pluginConfig The plugin config to normalize. + * @param {string} pluginConfigName The name of the plugin config. + * @return {InfiniteConfigArray} The normalized plugin config. + * @throws {TypeError} If the plugin config is a legacy config. + */ +function deepNormalizePluginConfig( + userPluginNamespace, + plugin, + pluginConfig, + pluginConfigName, +) { + // if it's an array then it's definitely a new config + if (Array.isArray(pluginConfig)) { + return pluginConfig.map(pluginSubConfig => + deepNormalizePluginConfig( + userPluginNamespace, + plugin, + pluginSubConfig, + pluginConfigName, + ), + ); + } + + // if it's a legacy config, throw an error + if (isLegacyConfig(pluginConfig)) { + throw new TypeError( + `Plugin config "${pluginConfigName}" is an eslintrc config and cannot be used in this context.`, + ); + } + + return normalizePluginConfig(userPluginNamespace, plugin, pluginConfig); +} + +/** + * Finds a plugin config by name in the given config. + * @param {Config} config The config object. + * @param {string} pluginConfigName The name of the plugin config. + * @return {InfiniteConfigArray} The plugin config. + * @throws {TypeError} If the plugin config is not found or is a legacy config. + */ +function findPluginConfig(config, pluginConfigName) { + const { namespace: userPluginNamespace, name: configName } = + getPluginMember(pluginConfigName); + const plugin = config.plugins?.[userPluginNamespace]; + + if (!plugin) { + throw new TypeError(`Plugin "${userPluginNamespace}" not found.`); + } + + const directConfig = plugin.configs?.[configName]; + if (directConfig) { + // Arrays are always flat configs, and non-legacy configs can be used directly + if (Array.isArray(directConfig) || !isLegacyConfig(directConfig)) { + return deepNormalizePluginConfig( + userPluginNamespace, + plugin, + directConfig, + pluginConfigName, + ); + } + + // If it's a legacy config, look for the flat version + const flatConfig = plugin.configs?.[`flat/${configName}`]; + + if ( + flatConfig && + (Array.isArray(flatConfig) || !isLegacyConfig(flatConfig)) + ) { + return deepNormalizePluginConfig( + userPluginNamespace, + plugin, + flatConfig, + pluginConfigName, + ); + } + + throw new TypeError( + `Plugin config "${configName}" in plugin "${userPluginNamespace}" is an eslintrc config and cannot be used in this context.`, + ); + } + + throw new TypeError( + `Plugin config "${configName}" not found in plugin "${userPluginNamespace}".`, + ); +} + +/** + * Flattens an array while keeping track of the index path. + * @param {any[]} configList The array to traverse. + * @param {string} indexPath The index path of the value in a multidimensional array. + * @return {IterableIterator<{indexPath:string, value:any}>} The flattened list of values. + */ +function* flatTraverse(configList, indexPath = "") { + for (let i = 0; i < configList.length; i++) { + const newIndexPath = indexPath ? `${indexPath}[${i}]` : `[${i}]`; + + // if it's an array then traverse it as well + if (Array.isArray(configList[i])) { + yield* flatTraverse(configList[i], newIndexPath); + continue; + } + + yield { indexPath: newIndexPath, value: configList[i] }; + } +} + +/** + * Extends a list of config files by creating every combination of base and extension files. + * @param {(string|string[])[]} [baseFiles] The base files. + * @param {(string|string[])[]} [extensionFiles] The extension files. + * @return {(string|string[])[]} The extended files. + */ +function extendConfigFiles(baseFiles = [], extensionFiles = []) { + if (!extensionFiles.length) { + return baseFiles.concat(); + } + + if (!baseFiles.length) { + return extensionFiles.concat(); + } + + /** @type {(string|string[])[]} */ + const result = []; + + for (const baseFile of baseFiles) { + for (const extensionFile of extensionFiles) { + /* + * Each entry can be a string or array of strings. The end result + * needs to be an array of strings, so we need to be sure to include + * all of the items when there's an array. + */ + + const entry = []; + + if (Array.isArray(baseFile)) { + entry.push(...baseFile); + } else { + entry.push(baseFile); + } + + if (Array.isArray(extensionFile)) { + entry.push(...extensionFile); + } else { + entry.push(extensionFile); + } + + result.push(entry); + } + } + + return result; +} + +/** + * Extends a config object with another config object. + * @param {Config} baseConfig The base config object. + * @param {string} baseConfigName The name of the base config object. + * @param {Config} extension The extension config object. + * @param {string} extensionName The index of the extension config object. + * @return {Config} The extended config object. + */ +function extendConfig(baseConfig, baseConfigName, extension, extensionName) { + const result = { ...extension }; + + // for global ignores there is no further work to be done, we just keep everything + if (!isGlobalIgnores(extension)) { + // for files we need to create every combination of base and extension files + if (baseConfig.files) { + result.files = extendConfigFiles(baseConfig.files, extension.files); + } + + // for ignores we just concatenation the extension ignores onto the base ignores + if (baseConfig.ignores) { + result.ignores = baseConfig.ignores.concat(extension.ignores ?? []); + } + } + + result.name = `${baseConfigName} > ${extensionName}`; + + // @ts-ignore -- ESLint types aren't updated yet + if (baseConfig.basePath) { + // @ts-ignore -- ESLint types aren't updated yet + result.basePath = baseConfig.basePath; + } + + return result; +} + +/** + * Processes a list of extends elements. + * @param {ConfigWithExtends} config The config object. + * @param {WeakMap} configNames The map of config objects to their names. + * @return {Config[]} The flattened list of config objects. + * @throws {TypeError} If the `extends` property is not an array or if nested `extends` is found. + */ +function processExtends(config, configNames) { + if (!config.extends) { + return [config]; + } + + if (!Array.isArray(config.extends)) { + throw new TypeError("The `extends` property must be an array."); + } + + const { + /** @type {Config[]} */ + extends: extendsList, + + /** @type {Config} */ + ...configObject + } = config; + + const extensionNames = new WeakMap(); + + // replace strings with the actual configs + const objectExtends = extendsList.map(extendsElement => { + if (typeof extendsElement === "string") { + const pluginConfig = findPluginConfig(config, extendsElement); + + // assign names + if (Array.isArray(pluginConfig)) { + pluginConfig.forEach((pluginConfigElement, index) => { + extensionNames.set( + pluginConfigElement, + `${extendsElement}[${index}]`, + ); + }); + } else { + extensionNames.set(pluginConfig, extendsElement); + } + + return pluginConfig; + } + + return /** @type {Config} */ (extendsElement); + }); + + const result = []; + + for (const { indexPath, value: extendsElement } of flatTraverse( + objectExtends, + )) { + const extension = /** @type {Config} */ (extendsElement); + + if ("basePath" in extension) { + throw new TypeError("'basePath' in `extends` is not allowed."); + } + + if ("extends" in extension) { + throw new TypeError("Nested 'extends' is not allowed."); + } + + const baseConfigName = /** @type {string} */ (configNames.get(config)); + const extensionName = + extensionNames.get(extendsElement) ?? + getExtensionName(extendsElement, indexPath); + + result.push( + extendConfig( + configObject, + baseConfigName, + extension, + extensionName, + ), + ); + } + + /* + * If the base config object has only `ignores` and `extends`, then + * removing `extends` turns it into a global ignores, which is not what + * we want. So we need to check if the base config object is a global ignores + * and if so, we don't add it to the array. + * + * (The other option would be to add a `files` entry, but that would result + * in a config that didn't actually do anything because there are no + * other keys in the config.) + */ + if (!isGlobalIgnores(configObject)) { + result.push(configObject); + } + + return result.flat(); +} + +/** + * Processes a list of config objects and arrays. + * @param {ConfigWithExtends[]} configList The list of config objects and arrays. + * @param {WeakMap} configNames The map of config objects to their names. + * @return {Config[]} The flattened list of config objects. + */ +function processConfigList(configList, configNames) { + return configList.flatMap(config => processExtends(config, configNames)); +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * Helper function to define a config array. + * @param {ConfigWithExtendsArray} args The arguments to the function. + * @returns {Config[]} The config array. + * @throws {TypeError} If no arguments are provided or if an argument is not an object. + */ +function defineConfig(...args) { + const configNames = new WeakMap(); + const configs = []; + + if (args.length === 0) { + throw new TypeError("Expected one or more arguments."); + } + + // first flatten the list of configs and get the names + for (const { indexPath, value } of flatTraverse(args)) { + if (typeof value !== "object" || value === null) { + throw new TypeError( + `Expected an object but received ${String(value)}.`, + ); + } + + const config = /** @type {ConfigWithExtends} */ (value); + + // save config name for easy reference later + configNames.set(config, getConfigName(config, indexPath)); + configs.push(config); + } + + return processConfigList(configs, configNames); +} + +/** + * @fileoverview Global ignores helper function. + * @author Nicholas C. Zakas + */ + +//----------------------------------------------------------------------------- +// Type Definitions +//----------------------------------------------------------------------------- + + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +let globalIgnoreCount = 0; + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * Creates a global ignores config with the given patterns. + * @param {string[]} ignorePatterns The ignore patterns. + * @param {string} [name] The name of the global ignores config. + * @returns {Config} The global ignores config. + * @throws {TypeError} If ignorePatterns is not an array or if it is empty. + */ +function globalIgnores(ignorePatterns, name) { + if (!Array.isArray(ignorePatterns)) { + throw new TypeError("ignorePatterns must be an array"); + } + + if (ignorePatterns.length === 0) { + throw new TypeError("ignorePatterns must contain at least one pattern"); + } + + const id = globalIgnoreCount++; + + return { + name: name || `globalIgnores ${id}`, + ignores: ignorePatterns, + }; +} + +exports.defineConfig = defineConfig; +exports.globalIgnores = globalIgnores; diff --git a/slider/node_modules/@eslint/config-helpers/dist/cjs/index.d.cts b/slider/node_modules/@eslint/config-helpers/dist/cjs/index.d.cts new file mode 100644 index 0000000..3dc8a2a --- /dev/null +++ b/slider/node_modules/@eslint/config-helpers/dist/cjs/index.d.cts @@ -0,0 +1,24 @@ +export type Config = import("eslint").Linter.Config; +export type LegacyConfig = import("eslint").Linter.LegacyConfig; +export type Plugin = import("eslint").ESLint.Plugin; +export type RuleEntry = import("eslint").Linter.RuleEntry; +export type ExtendsElement = import("./types.cts").ExtendsElement; +export type SimpleExtendsElement = import("./types.cts").SimpleExtendsElement; +export type ConfigWithExtends = import("./types.cts").ConfigWithExtends; +export type InfiniteConfigArray = import("./types.cts").InfiniteArray; +export type ConfigWithExtendsArray = import("./types.cts").ConfigWithExtendsArray; +/** + * Helper function to define a config array. + * @param {ConfigWithExtendsArray} args The arguments to the function. + * @returns {Config[]} The config array. + * @throws {TypeError} If no arguments are provided or if an argument is not an object. + */ +export function defineConfig(...args: ConfigWithExtendsArray): Config[]; +/** + * Creates a global ignores config with the given patterns. + * @param {string[]} ignorePatterns The ignore patterns. + * @param {string} [name] The name of the global ignores config. + * @returns {Config} The global ignores config. + * @throws {TypeError} If ignorePatterns is not an array or if it is empty. + */ +export function globalIgnores(ignorePatterns: string[], name?: string): Config; diff --git a/slider/node_modules/@eslint/config-helpers/dist/cjs/types.cts b/slider/node_modules/@eslint/config-helpers/dist/cjs/types.cts new file mode 100644 index 0000000..8cfd99a --- /dev/null +++ b/slider/node_modules/@eslint/config-helpers/dist/cjs/types.cts @@ -0,0 +1,31 @@ +/** + * @fileoverview Types for this package. + */ + +import type { Linter } from "eslint"; + +/** + * Infinite array type. + */ +export type InfiniteArray = T | InfiniteArray[]; + +/** + * The type of array element in the `extends` property after flattening. + */ +export type SimpleExtendsElement = string | Linter.Config; + +/** + * The type of array element in the `extends` property before flattening. + */ +export type ExtendsElement = + | SimpleExtendsElement + | InfiniteArray; + +/** + * Config with extends. Valid only inside of `defineConfig()`. + */ +export interface ConfigWithExtends extends Linter.Config { + extends?: ExtendsElement[]; +} + +export type ConfigWithExtendsArray = InfiniteArray[]; diff --git a/slider/node_modules/@eslint/config-helpers/dist/esm/index.d.ts b/slider/node_modules/@eslint/config-helpers/dist/esm/index.d.ts new file mode 100644 index 0000000..ba848e8 --- /dev/null +++ b/slider/node_modules/@eslint/config-helpers/dist/esm/index.d.ts @@ -0,0 +1,24 @@ +export type Config = import("eslint").Linter.Config; +export type LegacyConfig = import("eslint").Linter.LegacyConfig; +export type Plugin = import("eslint").ESLint.Plugin; +export type RuleEntry = import("eslint").Linter.RuleEntry; +export type ExtendsElement = import("./types.ts").ExtendsElement; +export type SimpleExtendsElement = import("./types.ts").SimpleExtendsElement; +export type ConfigWithExtends = import("./types.ts").ConfigWithExtends; +export type InfiniteConfigArray = import("./types.ts").InfiniteArray; +export type ConfigWithExtendsArray = import("./types.ts").ConfigWithExtendsArray; +/** + * Helper function to define a config array. + * @param {ConfigWithExtendsArray} args The arguments to the function. + * @returns {Config[]} The config array. + * @throws {TypeError} If no arguments are provided or if an argument is not an object. + */ +export function defineConfig(...args: ConfigWithExtendsArray): Config[]; +/** + * Creates a global ignores config with the given patterns. + * @param {string[]} ignorePatterns The ignore patterns. + * @param {string} [name] The name of the global ignores config. + * @returns {Config} The global ignores config. + * @throws {TypeError} If ignorePatterns is not an array or if it is empty. + */ +export function globalIgnores(ignorePatterns: string[], name?: string): Config; diff --git a/slider/node_modules/@eslint/config-helpers/dist/esm/index.js b/slider/node_modules/@eslint/config-helpers/dist/esm/index.js new file mode 100644 index 0000000..910ae3c --- /dev/null +++ b/slider/node_modules/@eslint/config-helpers/dist/esm/index.js @@ -0,0 +1,579 @@ +// @ts-self-types="./index.d.ts" +/** + * @fileoverview defineConfig helper + * @author Nicholas C. Zakas + */ + +//----------------------------------------------------------------------------- +// Type Definitions +//----------------------------------------------------------------------------- + +/** @typedef {import("eslint").Linter.Config} Config */ +/** @typedef {import("eslint").Linter.LegacyConfig} LegacyConfig */ +/** @typedef {import("eslint").ESLint.Plugin} Plugin */ +/** @typedef {import("eslint").Linter.RuleEntry} RuleEntry */ +/** @typedef {import("./types.ts").ExtendsElement} ExtendsElement */ +/** @typedef {import("./types.ts").SimpleExtendsElement} SimpleExtendsElement */ +/** @typedef {import("./types.ts").ConfigWithExtends} ConfigWithExtends */ +/** @typedef {import("./types.ts").InfiniteArray} InfiniteConfigArray */ +/** @typedef {import("./types.ts").ConfigWithExtendsArray} ConfigWithExtendsArray */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const eslintrcKeys = [ + "env", + "extends", + "globals", + "ignorePatterns", + "noInlineConfig", + "overrides", + "parser", + "parserOptions", + "reportUnusedDisableDirectives", + "root", +]; + +const allowedGlobalIgnoreKeys = new Set(["basePath", "ignores", "name"]); + +/** + * Gets the name of a config object. + * @param {Config} config The config object. + * @param {string} indexPath The index path of the config object. + * @return {string} The name of the config object. + */ +function getConfigName(config, indexPath) { + if (config.name) { + return config.name; + } + + return `UserConfig${indexPath}`; +} + +/** + * Gets the name of an extension. + * @param {SimpleExtendsElement} extension The extension. + * @param {string} indexPath The index of the extension. + * @return {string} The name of the extension. + */ +function getExtensionName(extension, indexPath) { + if (typeof extension === "string") { + return extension; + } + + if (extension.name) { + return extension.name; + } + + return `ExtendedConfig${indexPath}`; +} + +/** + * Determines if a config object is a legacy config. + * @param {Config|LegacyConfig} config The config object to check. + * @return {config is LegacyConfig} `true` if the config object is a legacy config. + */ +function isLegacyConfig(config) { + for (const key of eslintrcKeys) { + if (key in config) { + return true; + } + } + + return false; +} + +/** + * Determines if a config object is a global ignores config. + * @param {Config} config The config object to check. + * @return {boolean} `true` if the config object is a global ignores config. + */ +function isGlobalIgnores(config) { + return Object.keys(config).every(key => allowedGlobalIgnoreKeys.has(key)); +} + +/** + * Parses a plugin member ID (rule, processor, etc.) and returns + * the namespace and member name. + * @param {string} id The ID to parse. + * @returns {{namespace:string, name:string}} The namespace and member name. + */ +function getPluginMember(id) { + const firstSlashIndex = id.indexOf("/"); + + if (firstSlashIndex === -1) { + return { namespace: "", name: id }; + } + + let namespace = id.slice(0, firstSlashIndex); + + /* + * Special cases: + * 1. The namespace is `@`, that means it's referring to the + * core plugin so `@` is the full namespace. + * 2. The namespace starts with `@`, that means it's referring to + * an npm scoped package. That means the namespace is the scope + * and the package name (i.e., `@eslint/core`). + */ + if (namespace[0] === "@" && namespace !== "@") { + const secondSlashIndex = id.indexOf("/", firstSlashIndex + 1); + if (secondSlashIndex !== -1) { + namespace = id.slice(0, secondSlashIndex); + return { namespace, name: id.slice(secondSlashIndex + 1) }; + } + } + + const name = id.slice(firstSlashIndex + 1); + + return { namespace, name }; +} + +/** + * Normalizes the plugin config by replacing the namespace with the plugin namespace. + * @param {string} userNamespace The namespace of the plugin. + * @param {Plugin} plugin The plugin config object. + * @param {Config} config The config object to normalize. + * @return {Config} The normalized config object. + */ +function normalizePluginConfig(userNamespace, plugin, config) { + const pluginNamespace = plugin.meta?.namespace; + + // don't do anything if the plugin doesn't have a namespace or rules + if ( + !pluginNamespace || + pluginNamespace === userNamespace || + (!config.rules && !config.processor && !config.language) + ) { + return config; + } + + const result = { ...config }; + + // update the rules + if (result.rules) { + const ruleIds = Object.keys(result.rules); + + /** @type {Record} */ + const newRules = {}; + + for (let i = 0; i < ruleIds.length; i++) { + const ruleId = ruleIds[i]; + const { namespace: ruleNamespace, name: ruleName } = + getPluginMember(ruleId); + + if (ruleNamespace === pluginNamespace) { + newRules[`${userNamespace}/${ruleName}`] = result.rules[ruleId]; + } else { + newRules[ruleId] = result.rules[ruleId]; + } + } + + result.rules = newRules; + } + + // update the processor + + if (typeof result.processor === "string") { + const { namespace: processorNamespace, name: processorName } = + getPluginMember(result.processor); + + if (processorNamespace) { + if (processorNamespace === pluginNamespace) { + result.processor = `${userNamespace}/${processorName}`; + } + } + } + + // update the language + if (typeof result.language === "string") { + const { namespace: languageNamespace, name: languageName } = + getPluginMember(result.language); + + if (languageNamespace === pluginNamespace) { + result.language = `${userNamespace}/${languageName}`; + } + } + + return result; +} + +/** + * Deeply normalizes a plugin config, traversing recursively into an arrays. + * @param {string} userPluginNamespace The namespace of the plugin. + * @param {Plugin} plugin The plugin object. + * @param {Config|LegacyConfig|(Config|LegacyConfig)[]} pluginConfig The plugin config to normalize. + * @param {string} pluginConfigName The name of the plugin config. + * @return {InfiniteConfigArray} The normalized plugin config. + * @throws {TypeError} If the plugin config is a legacy config. + */ +function deepNormalizePluginConfig( + userPluginNamespace, + plugin, + pluginConfig, + pluginConfigName, +) { + // if it's an array then it's definitely a new config + if (Array.isArray(pluginConfig)) { + return pluginConfig.map(pluginSubConfig => + deepNormalizePluginConfig( + userPluginNamespace, + plugin, + pluginSubConfig, + pluginConfigName, + ), + ); + } + + // if it's a legacy config, throw an error + if (isLegacyConfig(pluginConfig)) { + throw new TypeError( + `Plugin config "${pluginConfigName}" is an eslintrc config and cannot be used in this context.`, + ); + } + + return normalizePluginConfig(userPluginNamespace, plugin, pluginConfig); +} + +/** + * Finds a plugin config by name in the given config. + * @param {Config} config The config object. + * @param {string} pluginConfigName The name of the plugin config. + * @return {InfiniteConfigArray} The plugin config. + * @throws {TypeError} If the plugin config is not found or is a legacy config. + */ +function findPluginConfig(config, pluginConfigName) { + const { namespace: userPluginNamespace, name: configName } = + getPluginMember(pluginConfigName); + const plugin = config.plugins?.[userPluginNamespace]; + + if (!plugin) { + throw new TypeError(`Plugin "${userPluginNamespace}" not found.`); + } + + const directConfig = plugin.configs?.[configName]; + if (directConfig) { + // Arrays are always flat configs, and non-legacy configs can be used directly + if (Array.isArray(directConfig) || !isLegacyConfig(directConfig)) { + return deepNormalizePluginConfig( + userPluginNamespace, + plugin, + directConfig, + pluginConfigName, + ); + } + + // If it's a legacy config, look for the flat version + const flatConfig = plugin.configs?.[`flat/${configName}`]; + + if ( + flatConfig && + (Array.isArray(flatConfig) || !isLegacyConfig(flatConfig)) + ) { + return deepNormalizePluginConfig( + userPluginNamespace, + plugin, + flatConfig, + pluginConfigName, + ); + } + + throw new TypeError( + `Plugin config "${configName}" in plugin "${userPluginNamespace}" is an eslintrc config and cannot be used in this context.`, + ); + } + + throw new TypeError( + `Plugin config "${configName}" not found in plugin "${userPluginNamespace}".`, + ); +} + +/** + * Flattens an array while keeping track of the index path. + * @param {any[]} configList The array to traverse. + * @param {string} indexPath The index path of the value in a multidimensional array. + * @return {IterableIterator<{indexPath:string, value:any}>} The flattened list of values. + */ +function* flatTraverse(configList, indexPath = "") { + for (let i = 0; i < configList.length; i++) { + const newIndexPath = indexPath ? `${indexPath}[${i}]` : `[${i}]`; + + // if it's an array then traverse it as well + if (Array.isArray(configList[i])) { + yield* flatTraverse(configList[i], newIndexPath); + continue; + } + + yield { indexPath: newIndexPath, value: configList[i] }; + } +} + +/** + * Extends a list of config files by creating every combination of base and extension files. + * @param {(string|string[])[]} [baseFiles] The base files. + * @param {(string|string[])[]} [extensionFiles] The extension files. + * @return {(string|string[])[]} The extended files. + */ +function extendConfigFiles(baseFiles = [], extensionFiles = []) { + if (!extensionFiles.length) { + return baseFiles.concat(); + } + + if (!baseFiles.length) { + return extensionFiles.concat(); + } + + /** @type {(string|string[])[]} */ + const result = []; + + for (const baseFile of baseFiles) { + for (const extensionFile of extensionFiles) { + /* + * Each entry can be a string or array of strings. The end result + * needs to be an array of strings, so we need to be sure to include + * all of the items when there's an array. + */ + + const entry = []; + + if (Array.isArray(baseFile)) { + entry.push(...baseFile); + } else { + entry.push(baseFile); + } + + if (Array.isArray(extensionFile)) { + entry.push(...extensionFile); + } else { + entry.push(extensionFile); + } + + result.push(entry); + } + } + + return result; +} + +/** + * Extends a config object with another config object. + * @param {Config} baseConfig The base config object. + * @param {string} baseConfigName The name of the base config object. + * @param {Config} extension The extension config object. + * @param {string} extensionName The index of the extension config object. + * @return {Config} The extended config object. + */ +function extendConfig(baseConfig, baseConfigName, extension, extensionName) { + const result = { ...extension }; + + // for global ignores there is no further work to be done, we just keep everything + if (!isGlobalIgnores(extension)) { + // for files we need to create every combination of base and extension files + if (baseConfig.files) { + result.files = extendConfigFiles(baseConfig.files, extension.files); + } + + // for ignores we just concatenation the extension ignores onto the base ignores + if (baseConfig.ignores) { + result.ignores = baseConfig.ignores.concat(extension.ignores ?? []); + } + } + + result.name = `${baseConfigName} > ${extensionName}`; + + // @ts-ignore -- ESLint types aren't updated yet + if (baseConfig.basePath) { + // @ts-ignore -- ESLint types aren't updated yet + result.basePath = baseConfig.basePath; + } + + return result; +} + +/** + * Processes a list of extends elements. + * @param {ConfigWithExtends} config The config object. + * @param {WeakMap} configNames The map of config objects to their names. + * @return {Config[]} The flattened list of config objects. + * @throws {TypeError} If the `extends` property is not an array or if nested `extends` is found. + */ +function processExtends(config, configNames) { + if (!config.extends) { + return [config]; + } + + if (!Array.isArray(config.extends)) { + throw new TypeError("The `extends` property must be an array."); + } + + const { + /** @type {Config[]} */ + extends: extendsList, + + /** @type {Config} */ + ...configObject + } = config; + + const extensionNames = new WeakMap(); + + // replace strings with the actual configs + const objectExtends = extendsList.map(extendsElement => { + if (typeof extendsElement === "string") { + const pluginConfig = findPluginConfig(config, extendsElement); + + // assign names + if (Array.isArray(pluginConfig)) { + pluginConfig.forEach((pluginConfigElement, index) => { + extensionNames.set( + pluginConfigElement, + `${extendsElement}[${index}]`, + ); + }); + } else { + extensionNames.set(pluginConfig, extendsElement); + } + + return pluginConfig; + } + + return /** @type {Config} */ (extendsElement); + }); + + const result = []; + + for (const { indexPath, value: extendsElement } of flatTraverse( + objectExtends, + )) { + const extension = /** @type {Config} */ (extendsElement); + + if ("basePath" in extension) { + throw new TypeError("'basePath' in `extends` is not allowed."); + } + + if ("extends" in extension) { + throw new TypeError("Nested 'extends' is not allowed."); + } + + const baseConfigName = /** @type {string} */ (configNames.get(config)); + const extensionName = + extensionNames.get(extendsElement) ?? + getExtensionName(extendsElement, indexPath); + + result.push( + extendConfig( + configObject, + baseConfigName, + extension, + extensionName, + ), + ); + } + + /* + * If the base config object has only `ignores` and `extends`, then + * removing `extends` turns it into a global ignores, which is not what + * we want. So we need to check if the base config object is a global ignores + * and if so, we don't add it to the array. + * + * (The other option would be to add a `files` entry, but that would result + * in a config that didn't actually do anything because there are no + * other keys in the config.) + */ + if (!isGlobalIgnores(configObject)) { + result.push(configObject); + } + + return result.flat(); +} + +/** + * Processes a list of config objects and arrays. + * @param {ConfigWithExtends[]} configList The list of config objects and arrays. + * @param {WeakMap} configNames The map of config objects to their names. + * @return {Config[]} The flattened list of config objects. + */ +function processConfigList(configList, configNames) { + return configList.flatMap(config => processExtends(config, configNames)); +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * Helper function to define a config array. + * @param {ConfigWithExtendsArray} args The arguments to the function. + * @returns {Config[]} The config array. + * @throws {TypeError} If no arguments are provided or if an argument is not an object. + */ +function defineConfig(...args) { + const configNames = new WeakMap(); + const configs = []; + + if (args.length === 0) { + throw new TypeError("Expected one or more arguments."); + } + + // first flatten the list of configs and get the names + for (const { indexPath, value } of flatTraverse(args)) { + if (typeof value !== "object" || value === null) { + throw new TypeError( + `Expected an object but received ${String(value)}.`, + ); + } + + const config = /** @type {ConfigWithExtends} */ (value); + + // save config name for easy reference later + configNames.set(config, getConfigName(config, indexPath)); + configs.push(config); + } + + return processConfigList(configs, configNames); +} + +/** + * @fileoverview Global ignores helper function. + * @author Nicholas C. Zakas + */ + +//----------------------------------------------------------------------------- +// Type Definitions +//----------------------------------------------------------------------------- + + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +let globalIgnoreCount = 0; + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * Creates a global ignores config with the given patterns. + * @param {string[]} ignorePatterns The ignore patterns. + * @param {string} [name] The name of the global ignores config. + * @returns {Config} The global ignores config. + * @throws {TypeError} If ignorePatterns is not an array or if it is empty. + */ +function globalIgnores(ignorePatterns, name) { + if (!Array.isArray(ignorePatterns)) { + throw new TypeError("ignorePatterns must be an array"); + } + + if (ignorePatterns.length === 0) { + throw new TypeError("ignorePatterns must contain at least one pattern"); + } + + const id = globalIgnoreCount++; + + return { + name: name || `globalIgnores ${id}`, + ignores: ignorePatterns, + }; +} + +export { defineConfig, globalIgnores }; diff --git a/slider/node_modules/@eslint/config-helpers/dist/esm/types.d.ts b/slider/node_modules/@eslint/config-helpers/dist/esm/types.d.ts new file mode 100644 index 0000000..0c5d5a0 --- /dev/null +++ b/slider/node_modules/@eslint/config-helpers/dist/esm/types.d.ts @@ -0,0 +1,23 @@ +/** + * @fileoverview Types for this package. + */ +import type { Linter } from "eslint"; +/** + * Infinite array type. + */ +export type InfiniteArray = T | InfiniteArray[]; +/** + * The type of array element in the `extends` property after flattening. + */ +export type SimpleExtendsElement = string | Linter.Config; +/** + * The type of array element in the `extends` property before flattening. + */ +export type ExtendsElement = SimpleExtendsElement | InfiniteArray; +/** + * Config with extends. Valid only inside of `defineConfig()`. + */ +export interface ConfigWithExtends extends Linter.Config { + extends?: ExtendsElement[]; +} +export type ConfigWithExtendsArray = InfiniteArray[]; diff --git a/slider/node_modules/@eslint/config-helpers/dist/esm/types.ts b/slider/node_modules/@eslint/config-helpers/dist/esm/types.ts new file mode 100644 index 0000000..8cfd99a --- /dev/null +++ b/slider/node_modules/@eslint/config-helpers/dist/esm/types.ts @@ -0,0 +1,31 @@ +/** + * @fileoverview Types for this package. + */ + +import type { Linter } from "eslint"; + +/** + * Infinite array type. + */ +export type InfiniteArray = T | InfiniteArray[]; + +/** + * The type of array element in the `extends` property after flattening. + */ +export type SimpleExtendsElement = string | Linter.Config; + +/** + * The type of array element in the `extends` property before flattening. + */ +export type ExtendsElement = + | SimpleExtendsElement + | InfiniteArray; + +/** + * Config with extends. Valid only inside of `defineConfig()`. + */ +export interface ConfigWithExtends extends Linter.Config { + extends?: ExtendsElement[]; +} + +export type ConfigWithExtendsArray = InfiniteArray[]; diff --git a/slider/node_modules/@eslint/config-helpers/package.json b/slider/node_modules/@eslint/config-helpers/package.json new file mode 100644 index 0000000..8cd38b6 --- /dev/null +++ b/slider/node_modules/@eslint/config-helpers/package.json @@ -0,0 +1,57 @@ +{ + "name": "@eslint/config-helpers", + "version": "0.3.1", + "description": "Helper utilities for creating ESLint configuration", + "type": "module", + "main": "dist/esm/index.js", + "types": "dist/esm/index.d.ts", + "exports": { + "require": { + "types": "./dist/cjs/index.d.cts", + "default": "./dist/cjs/index.cjs" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + } + }, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "directories": { + "test": "tests" + }, + "scripts": { + "build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js", + "build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts", + "build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts", + "test:jsr": "npx jsr@latest publish --dry-run", + "test": "mocha tests/*.js", + "test:coverage": "c8 npm test", + "test:types": "tsc -p tests/types/tsconfig.json" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/rewrite.git", + "directory": "packages/config-helpers" + }, + "keywords": [ + "eslint" + ], + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/eslint/rewrite/issues" + }, + "homepage": "https://github.com/eslint/rewrite/tree/main/packages/config-helpers#readme", + "devDependencies": { + "@eslint/core": "^0.15.2", + "eslint": "^9.27.0", + "rollup-plugin-copy": "^3.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } +} diff --git a/slider/node_modules/@eslint/core/LICENSE b/slider/node_modules/@eslint/core/LICENSE new file mode 100644 index 0000000..ed43975 --- /dev/null +++ b/slider/node_modules/@eslint/core/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/slider/node_modules/@eslint/core/README.md b/slider/node_modules/@eslint/core/README.md new file mode 100644 index 0000000..f74a06e --- /dev/null +++ b/slider/node_modules/@eslint/core/README.md @@ -0,0 +1,29 @@ +# ESLint Core + +## Overview + +This package is the future home of the rewritten, runtime-agnostic ESLint core. + +Right now, it exports the core types necessary to implement language plugins. + +## License + +Apache 2.0 + + + + +## Sponsors + +The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) +to get your logo on our READMEs and [website](https://eslint.org/sponsors). + +

Platinum Sponsors

+

Automattic Airbnb

Gold Sponsors

+

Qlty Software trunk.io Shopify

Silver Sponsors

+

Vite Liftoff American Express StackBlitz

Bronze Sponsors

+

Cybozu Anagram Solver Icons8 Discord GitBook Nx Mercedes-Benz Group HeroCoders LambdaTest

+

Technology Sponsors

+Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work. +

Netlify Algolia 1Password

+ diff --git a/slider/node_modules/@eslint/core/dist/cjs/types.d.cts b/slider/node_modules/@eslint/core/dist/cjs/types.d.cts new file mode 100644 index 0000000..f573710 --- /dev/null +++ b/slider/node_modules/@eslint/core/dist/cjs/types.d.cts @@ -0,0 +1,849 @@ +/** + * @fileoverview Shared types for ESLint Core. + */ +import type { JSONSchema4 } from "json-schema"; +/** + * Represents an error inside of a file. + */ +export interface FileError { + message: string; + line: number; + column: number; + endLine?: number; + endColumn?: number; +} +/** + * Represents a problem found in a file. + */ +export interface FileProblem { + ruleId: string | null; + message: string; + loc: SourceLocation; +} +/** + * Represents the start and end coordinates of a node inside the source. + */ +export interface SourceLocation { + start: Position; + end: Position; +} +/** + * Represents the start and end coordinates of a node inside the source with an offset. + */ +export interface SourceLocationWithOffset { + start: PositionWithOffset; + end: PositionWithOffset; +} +/** + * Represents a location coordinate inside the source. ESLint-style formats + * have just `line` and `column` while others may have `offset` as well. + */ +export interface Position { + line: number; + column: number; +} +/** + * Represents a location coordinate inside the source with an offset. + */ +export interface PositionWithOffset extends Position { + offset: number; +} +/** + * Represents a range of characters in the source. + */ +export type SourceRange = [number, number]; +/** + * What the rule is responsible for finding: + * - `problem` means the rule has noticed a potential error. + * - `suggestion` means the rule suggests an alternate or better approach. + * - `layout` means the rule is looking at spacing, indentation, etc. + */ +export type RuleType = "problem" | "suggestion" | "layout"; +/** + * The type of fix the rule can provide: + * - `code` means the rule can fix syntax. + * - `whitespace` means the rule can fix spacing and indentation. + */ +export type RuleFixType = "code" | "whitespace"; +/** + * An object containing visitor information for a rule. Each method is either the + * name of a node type or a selector, or is a method that will be called at specific + * times during the traversal. + */ +export type RuleVisitor = Record void) | undefined>; +/** + * Rule meta information used for documentation. + */ +export interface RulesMetaDocs { + /** + * A short description of the rule. + */ + description?: string | undefined; + /** + * The URL to the documentation for the rule. + */ + url?: string | undefined; + /** + * The category the rule falls under. + * @deprecated No longer used. + */ + category?: string | undefined; + /** + * Indicates if the rule is generally recommended for all users. + * + * Note - this will always be a boolean for core rules, but may be used in any way by plugins. + */ + recommended?: unknown; + /** + * Indicates if the rule is frozen (no longer accepting feature requests). + */ + frozen?: boolean | undefined; +} +/** + * Meta information about a rule. + */ +export interface RulesMeta { + /** + * Properties that are used when documenting the rule. + */ + docs?: (RulesMetaDocs & ExtRuleDocs) | undefined; + /** + * The type of rule. + */ + type?: RuleType | undefined; + /** + * The schema for the rule options. Required if the rule has options. + */ + schema?: JSONSchema4 | JSONSchema4[] | false | undefined; + /** + * Any default options to be recursively merged on top of any user-provided options. + **/ + defaultOptions?: RuleOptions; + /** + * The messages that the rule can report. + */ + messages?: Record; + /** + * Indicates whether the rule has been deprecated or provides additional metadata about the deprecation. Omit if not deprecated. + */ + deprecated?: boolean | DeprecatedInfo | undefined; + /** + * @deprecated Use deprecated.replacedBy instead. + * The name of the rule(s) this rule was replaced by, if it was deprecated. + */ + replacedBy?: readonly string[] | undefined; + /** + * Indicates if the rule is fixable, and if so, what type of fix it provides. + */ + fixable?: RuleFixType | undefined; + /** + * Indicates if the rule may provide suggestions. + */ + hasSuggestions?: boolean | undefined; + /** + * The language the rule is intended to lint. + */ + language?: string; + /** + * The dialects of `language` that the rule is intended to lint. + */ + dialects?: string[]; +} +/** + * Provides additional metadata about a deprecation. + */ +export interface DeprecatedInfo { + /** + * General message presented to the user, e.g. for the key rule why the rule + * is deprecated or for info how to replace the rule. + */ + message?: string; + /** + * URL to more information about this deprecation in general. + */ + url?: string; + /** + * An empty array explicitly states that there is no replacement. + */ + replacedBy?: ReplacedByInfo[]; + /** + * The package version since when the rule is deprecated (should use full + * semver without a leading "v"). + */ + deprecatedSince?: string; + /** + * The estimated version when the rule is removed (probably the next major + * version). null means the rule is "frozen" (will be available but will not + * be changed). + */ + availableUntil?: string | null; +} +/** + * Provides metadata about a replacement + */ +export interface ReplacedByInfo { + /** + * General message presented to the user, e.g. how to replace the rule + */ + message?: string; + /** + * URL to more information about this replacement in general + */ + url?: string; + /** + * Name should be "eslint" if the replacement is an ESLint core rule. Omit + * the property if the replacement is in the same plugin. + */ + plugin?: ExternalSpecifier; + /** + * Name and documentation of the replacement rule + */ + rule?: ExternalSpecifier; +} +/** + * Specifies the name and url of an external resource. At least one property + * should be set. + */ +export interface ExternalSpecifier { + /** + * Name of the referenced plugin / rule. + */ + name?: string; + /** + * URL pointing to documentation for the plugin / rule. + */ + url?: string; +} +/** + * Generic type for `RuleContext`. + */ +export interface RuleContextTypeOptions { + LangOptions: LanguageOptions; + Code: SourceCode; + RuleOptions: unknown[]; + Node: unknown; + MessageIds: string; +} +/** + * Represents the context object that is passed to a rule. This object contains + * information about the current state of the linting process and is the rule's + * view into the outside world. + */ +export interface RuleContext { + /** + * The current working directory for the session. + */ + cwd: string; + /** + * Returns the current working directory for the session. + * @deprecated Use `cwd` instead. + */ + getCwd(): string; + /** + * The filename of the file being linted. + */ + filename: string; + /** + * Returns the filename of the file being linted. + * @deprecated Use `filename` instead. + */ + getFilename(): string; + /** + * The physical filename of the file being linted. + */ + physicalFilename: string; + /** + * Returns the physical filename of the file being linted. + * @deprecated Use `physicalFilename` instead. + */ + getPhysicalFilename(): string; + /** + * The source code object that the rule is running on. + */ + sourceCode: Options["Code"]; + /** + * Returns the source code object that the rule is running on. + * @deprecated Use `sourceCode` instead. + */ + getSourceCode(): Options["Code"]; + /** + * Shared settings for the configuration. + */ + settings: SettingsConfig; + /** + * Parser-specific options for the configuration. + * @deprecated Use `languageOptions.parserOptions` instead. + */ + parserOptions: Record; + /** + * The language options for the configuration. + */ + languageOptions: Options["LangOptions"]; + /** + * The CommonJS path to the parser used while parsing this file. + * @deprecated No longer used. + */ + parserPath: string | undefined; + /** + * The rule ID. + */ + id: string; + /** + * The rule's configured options. + */ + options: Options["RuleOptions"]; + /** + * The report function that the rule should use to report problems. + * @param violation The violation to report. + */ + report(violation: ViolationReport): void; +} +/** + * Manager of text edits for a rule fix. + */ +export interface RuleTextEditor { + /** + * Inserts text after the specified node or token. + * @param syntaxElement The node or token to insert after. + * @param text The edit to insert after the node or token. + */ + insertTextAfter(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit; + /** + * Inserts text after the specified range. + * @param range The range to insert after. + * @param text The edit to insert after the range. + */ + insertTextAfterRange(range: SourceRange, text: string): RuleTextEdit; + /** + * Inserts text before the specified node or token. + * @param syntaxElement A syntax element with location information to insert before. + * @param text The edit to insert before the node or token. + */ + insertTextBefore(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit; + /** + * Inserts text before the specified range. + * @param range The range to insert before. + * @param text The edit to insert before the range. + */ + insertTextBeforeRange(range: SourceRange, text: string): RuleTextEdit; + /** + * Removes the specified node or token. + * @param syntaxElement A syntax element with location information to remove. + * @returns The edit to remove the node or token. + */ + remove(syntaxElement: EditableSyntaxElement): RuleTextEdit; + /** + * Removes the specified range. + * @param range The range to remove. + * @returns The edit to remove the range. + */ + removeRange(range: SourceRange): RuleTextEdit; + /** + * Replaces the specified node or token with the given text. + * @param syntaxElement A syntax element with location information to replace. + * @param text The text to replace the node or token with. + * @returns The edit to replace the node or token. + */ + replaceText(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit; + /** + * Replaces the specified range with the given text. + * @param range The range to replace. + * @param text The text to replace the range with. + * @returns The edit to replace the range. + */ + replaceTextRange(range: SourceRange, text: string): RuleTextEdit; +} +/** + * Represents a fix for a rule violation implemented as a text edit. + */ +export interface RuleTextEdit { + /** + * The range to replace. + */ + range: SourceRange; + /** + * The text to insert. + */ + text: string; +} +/** + * Fixes a violation. + * @param fixer The text editor to apply the fix. + * @returns The fix(es) for the violation. + */ +type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable | null; +interface ViolationReportBase { + /** + * The type of node that the violation is for. + * @deprecated May be removed in the future. + */ + nodeType?: string | undefined; + /** + * The data to insert into the message. + */ + data?: Record | undefined; + /** + * The fix to be applied for the violation. + */ + fix?: RuleFixer | null | undefined; + /** + * An array of suggested fixes for the problem. These fixes may change the + * behavior of the code, so they are not applied automatically. + */ + suggest?: SuggestedEdit[] | null | undefined; +} +type ViolationMessage = { + message: string; +} | { + messageId: MessageIds; +}; +type ViolationLocation = { + loc: SourceLocation | Position; +} | { + node: Node; +}; +export type ViolationReport = ViolationReportBase & ViolationMessage & ViolationLocation; +interface SuggestedEditBase { + /** + * The data to insert into the message. + */ + data?: Record | undefined; + /** + * The fix to be applied for the suggestion. + */ + fix?: RuleFixer | null | undefined; +} +type SuggestionMessage = { + desc: string; +} | { + messageId: string; +}; +/** + * A suggested edit for a rule violation. + */ +export type SuggestedEdit = SuggestedEditBase & SuggestionMessage; +/** + * Generic options for the `RuleDefinition` type. + */ +export interface RuleDefinitionTypeOptions { + LangOptions: LanguageOptions; + Code: SourceCode; + RuleOptions: unknown[]; + Visitor: RuleVisitor; + Node: unknown; + MessageIds: string; + ExtRuleDocs: unknown; +} +/** + * The definition of an ESLint rule. + */ +export interface RuleDefinition { + /** + * The meta information for the rule. + */ + meta?: RulesMeta; + /** + * Creates the visitor that ESLint uses to apply the rule during traversal. + * @param context The rule context. + * @returns The rule visitor. + */ + create(context: RuleContext<{ + LangOptions: Options["LangOptions"]; + Code: Options["Code"]; + RuleOptions: Options["RuleOptions"]; + Node: Options["Node"]; + MessageIds: Options["MessageIds"]; + }>): Options["Visitor"]; +} +/** + * Defaults for non-language-related `RuleDefinition` options. + */ +export interface CustomRuleTypeDefinitions { + RuleOptions: unknown[]; + MessageIds: string; + ExtRuleDocs: Record; +} +/** + * A helper type to define language specific specializations of the `RuleDefinition` type. + * + * @example + * ```ts + * type YourRuleDefinition< + * Options extends Partial = {}, + * > = CustomRuleDefinitionType< + * { + * LangOptions: YourLanguageOptions; + * Code: YourSourceCode; + * Visitor: YourRuleVisitor; + * Node: YourNode; + * }, + * Options + * >; + * ``` + */ +export type CustomRuleDefinitionType, Options extends Partial> = RuleDefinition>>; +/** + * The human readable severity level used in a configuration. + */ +export type SeverityName = "off" | "warn" | "error"; +/** + * The numeric severity level for a rule. + * + * - `0` means off. + * - `1` means warn. + * - `2` means error. + */ +export type SeverityLevel = 0 | 1 | 2; +/** + * The severity of a rule in a configuration. + */ +export type Severity = SeverityName | SeverityLevel; +/** + * Represents the configuration options for the core linter. + */ +export interface LinterOptionsConfig { + /** + * Indicates whether or not inline configuration is evaluated. + */ + noInlineConfig?: boolean; + /** + * Indicates what to do when an unused disable directive is found. + */ + reportUnusedDisableDirectives?: boolean | Severity; + /** + * A severity value indicating if and how unused inline configs should be + * tracked and reported. + */ + reportUnusedInlineConfigs?: Severity; +} +/** + * The configuration for a rule. + */ +export type RuleConfig = Severity | [Severity, ...Partial]; +/** + * A collection of rules and their configurations. + */ +export interface RulesConfig { + [key: string]: RuleConfig; +} +/** + * A collection of settings. + */ +export interface SettingsConfig { + [key: string]: unknown; +} +/** + * Generic options for the `Language` type. + */ +export interface LanguageTypeOptions { + LangOptions: LanguageOptions; + Code: SourceCode; + RootNode: unknown; + Node: unknown; +} +/** + * Represents a plugin language. + */ +export interface Language { + /** + * Indicates how ESLint should read the file. + */ + fileType: "text"; + /** + * First line number returned from the parser (text mode only). + */ + lineStart: 0 | 1; + /** + * First column number returned from the parser (text mode only). + */ + columnStart: 0 | 1; + /** + * The property to read the node type from. Used in selector querying. + */ + nodeTypeKey: string; + /** + * The traversal path that tools should take when evaluating the AST + */ + visitorKeys?: Record; + /** + * Default language options. User-defined options are merged with this object. + */ + defaultLanguageOptions?: LanguageOptions; + /** + * Validates languageOptions for this language. + */ + validateLanguageOptions(languageOptions: Options["LangOptions"]): void; + /** + * Normalizes languageOptions for this language. + */ + normalizeLanguageOptions?(languageOptions: Options["LangOptions"]): Options["LangOptions"]; + /** + * Helper for esquery that allows languages to match nodes against + * class. esquery currently has classes like `function` that will + * match all the various function nodes. This method allows languages + * to implement similar shorthands. + */ + matchesSelectorClass?(className: string, node: Options["Node"], ancestry: Options["Node"][]): boolean; + /** + * Parses the given file input into its component parts. This file should not + * throws errors for parsing errors but rather should return any parsing + * errors as parse of the ParseResult object. + */ + parse(file: File, context: LanguageContext): ParseResult; + /** + * Creates SourceCode object that ESLint uses to work with a file. + */ + createSourceCode(file: File, input: OkParseResult, context: LanguageContext): Options["Code"]; +} +/** + * Plugin-defined options for the language. + */ +export type LanguageOptions = Record; +/** + * The context object that is passed to the language plugin methods. + */ +export interface LanguageContext { + languageOptions: LangOptions; +} +/** + * Represents a file read by ESLint. + */ +export interface File { + /** + * The path that ESLint uses for this file. May be a virtual path + * if it was returned by a processor. + */ + path: string; + /** + * The path to the file on disk. This always maps directly to a file + * regardless of whether it was returned from a processor. + */ + physicalPath: string; + /** + * Indicates if the original source contained a byte-order marker. + * ESLint strips the BOM from the `body`, but this info is needed + * to correctly apply autofixing. + */ + bom: boolean; + /** + * The body of the file to parse. + */ + body: string | Uint8Array; +} +/** + * Represents the successful result of parsing a file. + */ +export interface OkParseResult { + /** + * Indicates if the parse was successful. If true, the parse was successful + * and ESLint should continue on to create a SourceCode object and run rules; + * if false, ESLint should just report the error(s) without doing anything + * else. + */ + ok: true; + /** + * The abstract syntax tree created by the parser. (only when ok: true) + */ + ast: RootNode; + /** + * Any additional data that the parser wants to provide. + */ + [key: string]: any; +} +/** + * Represents the unsuccessful result of parsing a file. + */ +export interface NotOkParseResult { + /** + * Indicates if the parse was successful. If true, the parse was successful + * and ESLint should continue on to create a SourceCode object and run rules; + * if false, ESLint should just report the error(s) without doing anything + * else. + */ + ok: false; + /** + * Any parsing errors, whether fatal or not. (only when ok: false) + */ + errors: FileError[]; + /** + * Any additional data that the parser wants to provide. + */ + [key: string]: any; +} +export type ParseResult = OkParseResult | NotOkParseResult; +/** + * Represents inline configuration found in the source code. + */ +interface InlineConfigElement { + /** + * The location of the inline config element. + */ + loc: SourceLocation; + /** + * The interpreted configuration from the inline config element. + */ + config: { + rules: RulesConfig; + }; +} +/** + * Generic options for the `SourceCodeBase` type. + */ +export interface SourceCodeBaseTypeOptions { + LangOptions: LanguageOptions; + RootNode: unknown; + SyntaxElementWithLoc: unknown; + ConfigNode: unknown; +} +/** + * Represents the basic interface for a source code object. + */ +interface SourceCodeBase { + /** + * Root of the AST. + */ + ast: Options["RootNode"]; + /** + * The traversal path that tools should take when evaluating the AST. + * When present, this overrides the `visitorKeys` on the language for + * just this source code object. + */ + visitorKeys?: Record; + /** + * Retrieves the equivalent of `loc` for a given node or token. + * @param syntaxElement The node or token to get the location for. + * @returns The location of the node or token. + */ + getLoc(syntaxElement: Options["SyntaxElementWithLoc"]): SourceLocation; + /** + * Retrieves the equivalent of `range` for a given node or token. + * @param syntaxElement The node or token to get the range for. + * @returns The range of the node or token. + */ + getRange(syntaxElement: Options["SyntaxElementWithLoc"]): SourceRange; + /** + * Traversal of AST. + */ + traverse(): Iterable; + /** + * Applies language options passed in from the ESLint core. + */ + applyLanguageOptions?(languageOptions: Options["LangOptions"]): void; + /** + * Return all of the inline areas where ESLint should be disabled/enabled + * along with any problems found in evaluating the directives. + */ + getDisableDirectives?(): { + directives: Directive[]; + problems: FileProblem[]; + }; + /** + * Returns an array of all inline configuration nodes found in the + * source code. + */ + getInlineConfigNodes?(): Options["ConfigNode"][]; + /** + * Applies configuration found inside of the source code. This method is only + * called when ESLint is running with inline configuration allowed. + */ + applyInlineConfig?(): { + configs: InlineConfigElement[]; + problems: FileProblem[]; + }; + /** + * Called by ESLint core to indicate that it has finished providing + * information. We now add in all the missing variables and ensure that + * state-changing methods cannot be called by rules. + * @returns {void} + */ + finalize?(): void; +} +/** + * Represents the source of a text file being linted. + */ +export interface TextSourceCode extends SourceCodeBase { + /** + * The body of the file that you'd like rule developers to access. + */ + text: string; +} +/** + * Represents the source of a binary file being linted. + */ +export interface BinarySourceCode extends SourceCodeBase { + /** + * The body of the file that you'd like rule developers to access. + */ + body: Uint8Array; +} +export type SourceCode = TextSourceCode | BinarySourceCode; +/** + * Represents a traversal step visiting the AST. + */ +export interface VisitTraversalStep { + kind: 1; + target: unknown; + phase: 1 | 2; + args: unknown[]; +} +/** + * Represents a traversal step calling a function. + */ +export interface CallTraversalStep { + kind: 2; + target: string; + phase?: string; + args: unknown[]; +} +export type TraversalStep = VisitTraversalStep | CallTraversalStep; +/** + * The type of disable directive. This determines how ESLint will disable rules. + */ +export type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line"; +/** + * Represents a disable directive. + */ +export interface Directive { + /** + * The type of directive. + */ + type: DirectiveType; + /** + * The node of the directive. May be in the AST or a comment/token. + */ + node: unknown; + /** + * The value of the directive. + */ + value: string; + /** + * The justification for the directive. + */ + justification?: string; +} +export {}; diff --git a/slider/node_modules/@eslint/core/dist/esm/types.d.ts b/slider/node_modules/@eslint/core/dist/esm/types.d.ts new file mode 100644 index 0000000..f573710 --- /dev/null +++ b/slider/node_modules/@eslint/core/dist/esm/types.d.ts @@ -0,0 +1,849 @@ +/** + * @fileoverview Shared types for ESLint Core. + */ +import type { JSONSchema4 } from "json-schema"; +/** + * Represents an error inside of a file. + */ +export interface FileError { + message: string; + line: number; + column: number; + endLine?: number; + endColumn?: number; +} +/** + * Represents a problem found in a file. + */ +export interface FileProblem { + ruleId: string | null; + message: string; + loc: SourceLocation; +} +/** + * Represents the start and end coordinates of a node inside the source. + */ +export interface SourceLocation { + start: Position; + end: Position; +} +/** + * Represents the start and end coordinates of a node inside the source with an offset. + */ +export interface SourceLocationWithOffset { + start: PositionWithOffset; + end: PositionWithOffset; +} +/** + * Represents a location coordinate inside the source. ESLint-style formats + * have just `line` and `column` while others may have `offset` as well. + */ +export interface Position { + line: number; + column: number; +} +/** + * Represents a location coordinate inside the source with an offset. + */ +export interface PositionWithOffset extends Position { + offset: number; +} +/** + * Represents a range of characters in the source. + */ +export type SourceRange = [number, number]; +/** + * What the rule is responsible for finding: + * - `problem` means the rule has noticed a potential error. + * - `suggestion` means the rule suggests an alternate or better approach. + * - `layout` means the rule is looking at spacing, indentation, etc. + */ +export type RuleType = "problem" | "suggestion" | "layout"; +/** + * The type of fix the rule can provide: + * - `code` means the rule can fix syntax. + * - `whitespace` means the rule can fix spacing and indentation. + */ +export type RuleFixType = "code" | "whitespace"; +/** + * An object containing visitor information for a rule. Each method is either the + * name of a node type or a selector, or is a method that will be called at specific + * times during the traversal. + */ +export type RuleVisitor = Record void) | undefined>; +/** + * Rule meta information used for documentation. + */ +export interface RulesMetaDocs { + /** + * A short description of the rule. + */ + description?: string | undefined; + /** + * The URL to the documentation for the rule. + */ + url?: string | undefined; + /** + * The category the rule falls under. + * @deprecated No longer used. + */ + category?: string | undefined; + /** + * Indicates if the rule is generally recommended for all users. + * + * Note - this will always be a boolean for core rules, but may be used in any way by plugins. + */ + recommended?: unknown; + /** + * Indicates if the rule is frozen (no longer accepting feature requests). + */ + frozen?: boolean | undefined; +} +/** + * Meta information about a rule. + */ +export interface RulesMeta { + /** + * Properties that are used when documenting the rule. + */ + docs?: (RulesMetaDocs & ExtRuleDocs) | undefined; + /** + * The type of rule. + */ + type?: RuleType | undefined; + /** + * The schema for the rule options. Required if the rule has options. + */ + schema?: JSONSchema4 | JSONSchema4[] | false | undefined; + /** + * Any default options to be recursively merged on top of any user-provided options. + **/ + defaultOptions?: RuleOptions; + /** + * The messages that the rule can report. + */ + messages?: Record; + /** + * Indicates whether the rule has been deprecated or provides additional metadata about the deprecation. Omit if not deprecated. + */ + deprecated?: boolean | DeprecatedInfo | undefined; + /** + * @deprecated Use deprecated.replacedBy instead. + * The name of the rule(s) this rule was replaced by, if it was deprecated. + */ + replacedBy?: readonly string[] | undefined; + /** + * Indicates if the rule is fixable, and if so, what type of fix it provides. + */ + fixable?: RuleFixType | undefined; + /** + * Indicates if the rule may provide suggestions. + */ + hasSuggestions?: boolean | undefined; + /** + * The language the rule is intended to lint. + */ + language?: string; + /** + * The dialects of `language` that the rule is intended to lint. + */ + dialects?: string[]; +} +/** + * Provides additional metadata about a deprecation. + */ +export interface DeprecatedInfo { + /** + * General message presented to the user, e.g. for the key rule why the rule + * is deprecated or for info how to replace the rule. + */ + message?: string; + /** + * URL to more information about this deprecation in general. + */ + url?: string; + /** + * An empty array explicitly states that there is no replacement. + */ + replacedBy?: ReplacedByInfo[]; + /** + * The package version since when the rule is deprecated (should use full + * semver without a leading "v"). + */ + deprecatedSince?: string; + /** + * The estimated version when the rule is removed (probably the next major + * version). null means the rule is "frozen" (will be available but will not + * be changed). + */ + availableUntil?: string | null; +} +/** + * Provides metadata about a replacement + */ +export interface ReplacedByInfo { + /** + * General message presented to the user, e.g. how to replace the rule + */ + message?: string; + /** + * URL to more information about this replacement in general + */ + url?: string; + /** + * Name should be "eslint" if the replacement is an ESLint core rule. Omit + * the property if the replacement is in the same plugin. + */ + plugin?: ExternalSpecifier; + /** + * Name and documentation of the replacement rule + */ + rule?: ExternalSpecifier; +} +/** + * Specifies the name and url of an external resource. At least one property + * should be set. + */ +export interface ExternalSpecifier { + /** + * Name of the referenced plugin / rule. + */ + name?: string; + /** + * URL pointing to documentation for the plugin / rule. + */ + url?: string; +} +/** + * Generic type for `RuleContext`. + */ +export interface RuleContextTypeOptions { + LangOptions: LanguageOptions; + Code: SourceCode; + RuleOptions: unknown[]; + Node: unknown; + MessageIds: string; +} +/** + * Represents the context object that is passed to a rule. This object contains + * information about the current state of the linting process and is the rule's + * view into the outside world. + */ +export interface RuleContext { + /** + * The current working directory for the session. + */ + cwd: string; + /** + * Returns the current working directory for the session. + * @deprecated Use `cwd` instead. + */ + getCwd(): string; + /** + * The filename of the file being linted. + */ + filename: string; + /** + * Returns the filename of the file being linted. + * @deprecated Use `filename` instead. + */ + getFilename(): string; + /** + * The physical filename of the file being linted. + */ + physicalFilename: string; + /** + * Returns the physical filename of the file being linted. + * @deprecated Use `physicalFilename` instead. + */ + getPhysicalFilename(): string; + /** + * The source code object that the rule is running on. + */ + sourceCode: Options["Code"]; + /** + * Returns the source code object that the rule is running on. + * @deprecated Use `sourceCode` instead. + */ + getSourceCode(): Options["Code"]; + /** + * Shared settings for the configuration. + */ + settings: SettingsConfig; + /** + * Parser-specific options for the configuration. + * @deprecated Use `languageOptions.parserOptions` instead. + */ + parserOptions: Record; + /** + * The language options for the configuration. + */ + languageOptions: Options["LangOptions"]; + /** + * The CommonJS path to the parser used while parsing this file. + * @deprecated No longer used. + */ + parserPath: string | undefined; + /** + * The rule ID. + */ + id: string; + /** + * The rule's configured options. + */ + options: Options["RuleOptions"]; + /** + * The report function that the rule should use to report problems. + * @param violation The violation to report. + */ + report(violation: ViolationReport): void; +} +/** + * Manager of text edits for a rule fix. + */ +export interface RuleTextEditor { + /** + * Inserts text after the specified node or token. + * @param syntaxElement The node or token to insert after. + * @param text The edit to insert after the node or token. + */ + insertTextAfter(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit; + /** + * Inserts text after the specified range. + * @param range The range to insert after. + * @param text The edit to insert after the range. + */ + insertTextAfterRange(range: SourceRange, text: string): RuleTextEdit; + /** + * Inserts text before the specified node or token. + * @param syntaxElement A syntax element with location information to insert before. + * @param text The edit to insert before the node or token. + */ + insertTextBefore(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit; + /** + * Inserts text before the specified range. + * @param range The range to insert before. + * @param text The edit to insert before the range. + */ + insertTextBeforeRange(range: SourceRange, text: string): RuleTextEdit; + /** + * Removes the specified node or token. + * @param syntaxElement A syntax element with location information to remove. + * @returns The edit to remove the node or token. + */ + remove(syntaxElement: EditableSyntaxElement): RuleTextEdit; + /** + * Removes the specified range. + * @param range The range to remove. + * @returns The edit to remove the range. + */ + removeRange(range: SourceRange): RuleTextEdit; + /** + * Replaces the specified node or token with the given text. + * @param syntaxElement A syntax element with location information to replace. + * @param text The text to replace the node or token with. + * @returns The edit to replace the node or token. + */ + replaceText(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit; + /** + * Replaces the specified range with the given text. + * @param range The range to replace. + * @param text The text to replace the range with. + * @returns The edit to replace the range. + */ + replaceTextRange(range: SourceRange, text: string): RuleTextEdit; +} +/** + * Represents a fix for a rule violation implemented as a text edit. + */ +export interface RuleTextEdit { + /** + * The range to replace. + */ + range: SourceRange; + /** + * The text to insert. + */ + text: string; +} +/** + * Fixes a violation. + * @param fixer The text editor to apply the fix. + * @returns The fix(es) for the violation. + */ +type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable | null; +interface ViolationReportBase { + /** + * The type of node that the violation is for. + * @deprecated May be removed in the future. + */ + nodeType?: string | undefined; + /** + * The data to insert into the message. + */ + data?: Record | undefined; + /** + * The fix to be applied for the violation. + */ + fix?: RuleFixer | null | undefined; + /** + * An array of suggested fixes for the problem. These fixes may change the + * behavior of the code, so they are not applied automatically. + */ + suggest?: SuggestedEdit[] | null | undefined; +} +type ViolationMessage = { + message: string; +} | { + messageId: MessageIds; +}; +type ViolationLocation = { + loc: SourceLocation | Position; +} | { + node: Node; +}; +export type ViolationReport = ViolationReportBase & ViolationMessage & ViolationLocation; +interface SuggestedEditBase { + /** + * The data to insert into the message. + */ + data?: Record | undefined; + /** + * The fix to be applied for the suggestion. + */ + fix?: RuleFixer | null | undefined; +} +type SuggestionMessage = { + desc: string; +} | { + messageId: string; +}; +/** + * A suggested edit for a rule violation. + */ +export type SuggestedEdit = SuggestedEditBase & SuggestionMessage; +/** + * Generic options for the `RuleDefinition` type. + */ +export interface RuleDefinitionTypeOptions { + LangOptions: LanguageOptions; + Code: SourceCode; + RuleOptions: unknown[]; + Visitor: RuleVisitor; + Node: unknown; + MessageIds: string; + ExtRuleDocs: unknown; +} +/** + * The definition of an ESLint rule. + */ +export interface RuleDefinition { + /** + * The meta information for the rule. + */ + meta?: RulesMeta; + /** + * Creates the visitor that ESLint uses to apply the rule during traversal. + * @param context The rule context. + * @returns The rule visitor. + */ + create(context: RuleContext<{ + LangOptions: Options["LangOptions"]; + Code: Options["Code"]; + RuleOptions: Options["RuleOptions"]; + Node: Options["Node"]; + MessageIds: Options["MessageIds"]; + }>): Options["Visitor"]; +} +/** + * Defaults for non-language-related `RuleDefinition` options. + */ +export interface CustomRuleTypeDefinitions { + RuleOptions: unknown[]; + MessageIds: string; + ExtRuleDocs: Record; +} +/** + * A helper type to define language specific specializations of the `RuleDefinition` type. + * + * @example + * ```ts + * type YourRuleDefinition< + * Options extends Partial = {}, + * > = CustomRuleDefinitionType< + * { + * LangOptions: YourLanguageOptions; + * Code: YourSourceCode; + * Visitor: YourRuleVisitor; + * Node: YourNode; + * }, + * Options + * >; + * ``` + */ +export type CustomRuleDefinitionType, Options extends Partial> = RuleDefinition>>; +/** + * The human readable severity level used in a configuration. + */ +export type SeverityName = "off" | "warn" | "error"; +/** + * The numeric severity level for a rule. + * + * - `0` means off. + * - `1` means warn. + * - `2` means error. + */ +export type SeverityLevel = 0 | 1 | 2; +/** + * The severity of a rule in a configuration. + */ +export type Severity = SeverityName | SeverityLevel; +/** + * Represents the configuration options for the core linter. + */ +export interface LinterOptionsConfig { + /** + * Indicates whether or not inline configuration is evaluated. + */ + noInlineConfig?: boolean; + /** + * Indicates what to do when an unused disable directive is found. + */ + reportUnusedDisableDirectives?: boolean | Severity; + /** + * A severity value indicating if and how unused inline configs should be + * tracked and reported. + */ + reportUnusedInlineConfigs?: Severity; +} +/** + * The configuration for a rule. + */ +export type RuleConfig = Severity | [Severity, ...Partial]; +/** + * A collection of rules and their configurations. + */ +export interface RulesConfig { + [key: string]: RuleConfig; +} +/** + * A collection of settings. + */ +export interface SettingsConfig { + [key: string]: unknown; +} +/** + * Generic options for the `Language` type. + */ +export interface LanguageTypeOptions { + LangOptions: LanguageOptions; + Code: SourceCode; + RootNode: unknown; + Node: unknown; +} +/** + * Represents a plugin language. + */ +export interface Language { + /** + * Indicates how ESLint should read the file. + */ + fileType: "text"; + /** + * First line number returned from the parser (text mode only). + */ + lineStart: 0 | 1; + /** + * First column number returned from the parser (text mode only). + */ + columnStart: 0 | 1; + /** + * The property to read the node type from. Used in selector querying. + */ + nodeTypeKey: string; + /** + * The traversal path that tools should take when evaluating the AST + */ + visitorKeys?: Record; + /** + * Default language options. User-defined options are merged with this object. + */ + defaultLanguageOptions?: LanguageOptions; + /** + * Validates languageOptions for this language. + */ + validateLanguageOptions(languageOptions: Options["LangOptions"]): void; + /** + * Normalizes languageOptions for this language. + */ + normalizeLanguageOptions?(languageOptions: Options["LangOptions"]): Options["LangOptions"]; + /** + * Helper for esquery that allows languages to match nodes against + * class. esquery currently has classes like `function` that will + * match all the various function nodes. This method allows languages + * to implement similar shorthands. + */ + matchesSelectorClass?(className: string, node: Options["Node"], ancestry: Options["Node"][]): boolean; + /** + * Parses the given file input into its component parts. This file should not + * throws errors for parsing errors but rather should return any parsing + * errors as parse of the ParseResult object. + */ + parse(file: File, context: LanguageContext): ParseResult; + /** + * Creates SourceCode object that ESLint uses to work with a file. + */ + createSourceCode(file: File, input: OkParseResult, context: LanguageContext): Options["Code"]; +} +/** + * Plugin-defined options for the language. + */ +export type LanguageOptions = Record; +/** + * The context object that is passed to the language plugin methods. + */ +export interface LanguageContext { + languageOptions: LangOptions; +} +/** + * Represents a file read by ESLint. + */ +export interface File { + /** + * The path that ESLint uses for this file. May be a virtual path + * if it was returned by a processor. + */ + path: string; + /** + * The path to the file on disk. This always maps directly to a file + * regardless of whether it was returned from a processor. + */ + physicalPath: string; + /** + * Indicates if the original source contained a byte-order marker. + * ESLint strips the BOM from the `body`, but this info is needed + * to correctly apply autofixing. + */ + bom: boolean; + /** + * The body of the file to parse. + */ + body: string | Uint8Array; +} +/** + * Represents the successful result of parsing a file. + */ +export interface OkParseResult { + /** + * Indicates if the parse was successful. If true, the parse was successful + * and ESLint should continue on to create a SourceCode object and run rules; + * if false, ESLint should just report the error(s) without doing anything + * else. + */ + ok: true; + /** + * The abstract syntax tree created by the parser. (only when ok: true) + */ + ast: RootNode; + /** + * Any additional data that the parser wants to provide. + */ + [key: string]: any; +} +/** + * Represents the unsuccessful result of parsing a file. + */ +export interface NotOkParseResult { + /** + * Indicates if the parse was successful. If true, the parse was successful + * and ESLint should continue on to create a SourceCode object and run rules; + * if false, ESLint should just report the error(s) without doing anything + * else. + */ + ok: false; + /** + * Any parsing errors, whether fatal or not. (only when ok: false) + */ + errors: FileError[]; + /** + * Any additional data that the parser wants to provide. + */ + [key: string]: any; +} +export type ParseResult = OkParseResult | NotOkParseResult; +/** + * Represents inline configuration found in the source code. + */ +interface InlineConfigElement { + /** + * The location of the inline config element. + */ + loc: SourceLocation; + /** + * The interpreted configuration from the inline config element. + */ + config: { + rules: RulesConfig; + }; +} +/** + * Generic options for the `SourceCodeBase` type. + */ +export interface SourceCodeBaseTypeOptions { + LangOptions: LanguageOptions; + RootNode: unknown; + SyntaxElementWithLoc: unknown; + ConfigNode: unknown; +} +/** + * Represents the basic interface for a source code object. + */ +interface SourceCodeBase { + /** + * Root of the AST. + */ + ast: Options["RootNode"]; + /** + * The traversal path that tools should take when evaluating the AST. + * When present, this overrides the `visitorKeys` on the language for + * just this source code object. + */ + visitorKeys?: Record; + /** + * Retrieves the equivalent of `loc` for a given node or token. + * @param syntaxElement The node or token to get the location for. + * @returns The location of the node or token. + */ + getLoc(syntaxElement: Options["SyntaxElementWithLoc"]): SourceLocation; + /** + * Retrieves the equivalent of `range` for a given node or token. + * @param syntaxElement The node or token to get the range for. + * @returns The range of the node or token. + */ + getRange(syntaxElement: Options["SyntaxElementWithLoc"]): SourceRange; + /** + * Traversal of AST. + */ + traverse(): Iterable; + /** + * Applies language options passed in from the ESLint core. + */ + applyLanguageOptions?(languageOptions: Options["LangOptions"]): void; + /** + * Return all of the inline areas where ESLint should be disabled/enabled + * along with any problems found in evaluating the directives. + */ + getDisableDirectives?(): { + directives: Directive[]; + problems: FileProblem[]; + }; + /** + * Returns an array of all inline configuration nodes found in the + * source code. + */ + getInlineConfigNodes?(): Options["ConfigNode"][]; + /** + * Applies configuration found inside of the source code. This method is only + * called when ESLint is running with inline configuration allowed. + */ + applyInlineConfig?(): { + configs: InlineConfigElement[]; + problems: FileProblem[]; + }; + /** + * Called by ESLint core to indicate that it has finished providing + * information. We now add in all the missing variables and ensure that + * state-changing methods cannot be called by rules. + * @returns {void} + */ + finalize?(): void; +} +/** + * Represents the source of a text file being linted. + */ +export interface TextSourceCode extends SourceCodeBase { + /** + * The body of the file that you'd like rule developers to access. + */ + text: string; +} +/** + * Represents the source of a binary file being linted. + */ +export interface BinarySourceCode extends SourceCodeBase { + /** + * The body of the file that you'd like rule developers to access. + */ + body: Uint8Array; +} +export type SourceCode = TextSourceCode | BinarySourceCode; +/** + * Represents a traversal step visiting the AST. + */ +export interface VisitTraversalStep { + kind: 1; + target: unknown; + phase: 1 | 2; + args: unknown[]; +} +/** + * Represents a traversal step calling a function. + */ +export interface CallTraversalStep { + kind: 2; + target: string; + phase?: string; + args: unknown[]; +} +export type TraversalStep = VisitTraversalStep | CallTraversalStep; +/** + * The type of disable directive. This determines how ESLint will disable rules. + */ +export type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line"; +/** + * Represents a disable directive. + */ +export interface Directive { + /** + * The type of directive. + */ + type: DirectiveType; + /** + * The node of the directive. May be in the AST or a comment/token. + */ + node: unknown; + /** + * The value of the directive. + */ + value: string; + /** + * The justification for the directive. + */ + justification?: string; +} +export {}; diff --git a/slider/node_modules/@eslint/core/package.json b/slider/node_modules/@eslint/core/package.json new file mode 100644 index 0000000..7231a98 --- /dev/null +++ b/slider/node_modules/@eslint/core/package.json @@ -0,0 +1,49 @@ +{ + "name": "@eslint/core", + "version": "0.15.2", + "description": "Runtime-agnostic core of ESLint", + "type": "module", + "types": "./dist/esm/types.d.ts", + "exports": { + "types": { + "import": "./dist/esm/types.d.ts", + "require": "./dist/cjs/types.d.cts" + } + }, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "build:cts": "node -e \"fs.cpSync('dist/esm/types.d.ts', 'dist/cjs/types.d.cts')\"", + "build": "tsc && npm run build:cts", + "test:jsr": "npx jsr@latest publish --dry-run", + "test:types": "tsc -p tests/types/tsconfig.json" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/rewrite.git", + "directory": "packages/core" + }, + "keywords": [ + "eslint", + "core" + ], + "author": "Nicholas C. Zakas", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/eslint/rewrite/issues" + }, + "homepage": "https://github.com/eslint/rewrite/tree/main/packages/core#readme", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "devDependencies": { + "json-schema": "^0.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } +} diff --git a/slider/node_modules/@eslint/eslintrc/LICENSE b/slider/node_modules/@eslint/eslintrc/LICENSE new file mode 100644 index 0000000..bef3698 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/LICENSE @@ -0,0 +1,19 @@ +Copyright OpenJS Foundation and other contributors, + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/slider/node_modules/@eslint/eslintrc/README.md b/slider/node_modules/@eslint/eslintrc/README.md new file mode 100644 index 0000000..a8b6ca6 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/README.md @@ -0,0 +1,128 @@ +# ESLintRC Library + +This repository contains the legacy ESLintRC configuration file format for ESLint. This package is not intended for use outside of the ESLint ecosystem. It is ESLint-specific and not intended for use in other programs. + +**Note:** This package is frozen except for critical bug fixes as ESLint moves to a new config system. + +## Installation + +You can install the package as follows: + +```shell +npm install @eslint/eslintrc -D +# or +yarn add @eslint/eslintrc -D +# or +pnpm install @eslint/eslintrc -D +# or +bun install @eslint/eslintrc -D +``` + +## Usage (ESM) + +The primary class in this package is `FlatCompat`, which is a utility to translate ESLintRC-style configs into flat configs. Here's how you use it inside of your `eslint.config.js` file: + +```js +import { FlatCompat } from "@eslint/eslintrc"; +import js from "@eslint/js"; +import path from "path"; +import { fileURLToPath } from "url"; + +// mimic CommonJS variables -- not needed if using CommonJS +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const compat = new FlatCompat({ + baseDirectory: __dirname, // optional; default: process.cwd() + resolvePluginsRelativeTo: __dirname, // optional + recommendedConfig: js.configs.recommended, // optional unless you're using "eslint:recommended" + allConfig: js.configs.all, // optional unless you're using "eslint:all" +}); + +export default [ + + // mimic ESLintRC-style extends + ...compat.extends("standard", "example", "plugin:react/recommended"), + + // mimic environments + ...compat.env({ + es2020: true, + node: true + }), + + // mimic plugins + ...compat.plugins("jsx-a11y", "react"), + + // translate an entire config + ...compat.config({ + plugins: ["jsx-a11y", "react"], + extends: "standard", + env: { + es2020: true, + node: true + }, + rules: { + semi: "error" + } + }) +]; +``` + +## Usage (CommonJS) + +Using `FlatCompat` in CommonJS files is similar to ESM, but you'll use `require()` and `module.exports` instead of `import` and `export`. Here's how you use it inside of your `eslint.config.js` CommonJS file: + +```js +const { FlatCompat } = require("@eslint/eslintrc"); +const js = require("@eslint/js"); + +const compat = new FlatCompat({ + baseDirectory: __dirname, // optional; default: process.cwd() + resolvePluginsRelativeTo: __dirname, // optional + recommendedConfig: js.configs.recommended, // optional unless using "eslint:recommended" + allConfig: js.configs.all, // optional unless using "eslint:all" +}); + +module.exports = [ + + // mimic ESLintRC-style extends + ...compat.extends("standard", "example", "plugin:react/recommended"), + + // mimic environments + ...compat.env({ + es2020: true, + node: true + }), + + // mimic plugins + ...compat.plugins("jsx-a11y", "react"), + + // translate an entire config + ...compat.config({ + plugins: ["jsx-a11y", "react"], + extends: "standard", + env: { + es2020: true, + node: true + }, + rules: { + semi: "error" + } + }) +]; +``` + +## Troubleshooting + +**TypeError: Missing parameter 'recommendedConfig' in FlatCompat constructor** + +The `recommendedConfig` option is required when any config uses `eslint:recommended`, including any config in an `extends` clause. To fix this, follow the example above using `@eslint/js` to provide the `eslint:recommended` config. + +**TypeError: Missing parameter 'allConfig' in FlatCompat constructor** + +The `allConfig` option is required when any config uses `eslint:all`, including any config in an `extends` clause. To fix this, follow the example above using `@eslint/js` to provide the `eslint:all` config. + + +## License + +MIT License diff --git a/slider/node_modules/@eslint/eslintrc/conf/config-schema.js b/slider/node_modules/@eslint/eslintrc/conf/config-schema.js new file mode 100644 index 0000000..eaa7a7e --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/conf/config-schema.js @@ -0,0 +1,79 @@ +/** + * @fileoverview Defines a schema for configs. + * @author Sylvan Mably + */ + +const baseConfigProperties = { + $schema: { type: "string" }, + env: { type: "object" }, + extends: { $ref: "#/definitions/stringOrStrings" }, + globals: { type: "object" }, + overrides: { + type: "array", + items: { $ref: "#/definitions/overrideConfig" }, + additionalItems: false + }, + parser: { type: ["string", "null"] }, + parserOptions: { type: "object" }, + plugins: { type: "array" }, + processor: { type: "string" }, + rules: { type: "object" }, + settings: { type: "object" }, + noInlineConfig: { type: "boolean" }, + reportUnusedDisableDirectives: { type: "boolean" }, + + ecmaFeatures: { type: "object" } // deprecated; logs a warning when used +}; + +const configSchema = { + definitions: { + stringOrStrings: { + oneOf: [ + { type: "string" }, + { + type: "array", + items: { type: "string" }, + additionalItems: false + } + ] + }, + stringOrStringsRequired: { + oneOf: [ + { type: "string" }, + { + type: "array", + items: { type: "string" }, + additionalItems: false, + minItems: 1 + } + ] + }, + + // Config at top-level. + objectConfig: { + type: "object", + properties: { + root: { type: "boolean" }, + ignorePatterns: { $ref: "#/definitions/stringOrStrings" }, + ...baseConfigProperties + }, + additionalProperties: false + }, + + // Config in `overrides`. + overrideConfig: { + type: "object", + properties: { + excludedFiles: { $ref: "#/definitions/stringOrStrings" }, + files: { $ref: "#/definitions/stringOrStringsRequired" }, + ...baseConfigProperties + }, + required: ["files"], + additionalProperties: false + } + }, + + $ref: "#/definitions/objectConfig" +}; + +export default configSchema; diff --git a/slider/node_modules/@eslint/eslintrc/conf/environments.js b/slider/node_modules/@eslint/eslintrc/conf/environments.js new file mode 100644 index 0000000..405f2a3 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/conf/environments.js @@ -0,0 +1,215 @@ +/** + * @fileoverview Defines environment settings and globals. + * @author Elan Shanker + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +import globals from "globals"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Get the object that has difference. + * @param {Record} current The newer object. + * @param {Record} prev The older object. + * @returns {Record} The difference object. + */ +function getDiff(current, prev) { + const retv = {}; + + for (const [key, value] of Object.entries(current)) { + if (!Object.hasOwn(prev, key)) { + retv[key] = value; + } + } + + return retv; +} + +const newGlobals2015 = getDiff(globals.es2015, globals.es5); // 19 variables such as Promise, Map, ... +const newGlobals2017 = { + Atomics: false, + SharedArrayBuffer: false +}; +const newGlobals2020 = { + BigInt: false, + BigInt64Array: false, + BigUint64Array: false, + globalThis: false +}; + +const newGlobals2021 = { + AggregateError: false, + FinalizationRegistry: false, + WeakRef: false +}; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** @type {Map} */ +export default new Map(Object.entries({ + + // Language + builtin: { + globals: globals.es5 + }, + es6: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 6 + } + }, + es2015: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 6 + } + }, + es2016: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 7 + } + }, + es2017: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 8 + } + }, + es2018: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 9 + } + }, + es2019: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 10 + } + }, + es2020: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 }, + parserOptions: { + ecmaVersion: 11 + } + }, + es2021: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 12 + } + }, + es2022: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 13 + } + }, + es2023: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 14 + } + }, + es2024: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 15 + } + }, + + // Platforms + browser: { + globals: globals.browser + }, + node: { + globals: globals.node, + parserOptions: { + ecmaFeatures: { + globalReturn: true + } + } + }, + "shared-node-browser": { + globals: globals["shared-node-browser"] + }, + worker: { + globals: globals.worker + }, + serviceworker: { + globals: globals.serviceworker + }, + + // Frameworks + commonjs: { + globals: globals.commonjs, + parserOptions: { + ecmaFeatures: { + globalReturn: true + } + } + }, + amd: { + globals: globals.amd + }, + mocha: { + globals: globals.mocha + }, + jasmine: { + globals: globals.jasmine + }, + jest: { + globals: globals.jest + }, + phantomjs: { + globals: globals.phantomjs + }, + jquery: { + globals: globals.jquery + }, + qunit: { + globals: globals.qunit + }, + prototypejs: { + globals: globals.prototypejs + }, + shelljs: { + globals: globals.shelljs + }, + meteor: { + globals: globals.meteor + }, + mongo: { + globals: globals.mongo + }, + protractor: { + globals: globals.protractor + }, + applescript: { + globals: globals.applescript + }, + nashorn: { + globals: globals.nashorn + }, + atomtest: { + globals: globals.atomtest + }, + embertest: { + globals: globals.embertest + }, + webextensions: { + globals: globals.webextensions + }, + greasemonkey: { + globals: globals.greasemonkey + } +})); diff --git a/slider/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs b/slider/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs new file mode 100644 index 0000000..a74e1a5 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs @@ -0,0 +1,1212 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var util = require('node:util'); +var path = require('node:path'); +var Ajv = require('ajv'); +var globals = require('globals'); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var util__default = /*#__PURE__*/_interopDefaultLegacy(util); +var path__default = /*#__PURE__*/_interopDefaultLegacy(path); +var Ajv__default = /*#__PURE__*/_interopDefaultLegacy(Ajv); +var globals__default = /*#__PURE__*/_interopDefaultLegacy(globals); + +/** + * @fileoverview Config file operations. This file must be usable in the browser, + * so no Node-specific code can be here. + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +const RULE_SEVERITY_STRINGS = ["off", "warn", "error"], + RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => { + map[value] = index; + return map; + }, {}), + VALID_SEVERITIES = new Set([0, 1, 2, "off", "warn", "error"]); + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Normalizes the severity value of a rule's configuration to a number + * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally + * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0), + * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array + * whose first element is one of the above values. Strings are matched case-insensitively. + * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0. + */ +function getRuleSeverity(ruleConfig) { + const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + + if (severityValue === 0 || severityValue === 1 || severityValue === 2) { + return severityValue; + } + + if (typeof severityValue === "string") { + return RULE_SEVERITY[severityValue.toLowerCase()] || 0; + } + + return 0; +} + +/** + * Converts old-style severity settings (0, 1, 2) into new-style + * severity settings (off, warn, error) for all rules. Assumption is that severity + * values have already been validated as correct. + * @param {Object} config The config object to normalize. + * @returns {void} + */ +function normalizeToStrings(config) { + + if (config.rules) { + Object.keys(config.rules).forEach(ruleId => { + const ruleConfig = config.rules[ruleId]; + + if (typeof ruleConfig === "number") { + config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0]; + } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") { + ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0]; + } + }); + } +} + +/** + * Determines if the severity for the given rule configuration represents an error. + * @param {int|string|Array} ruleConfig The configuration for an individual rule. + * @returns {boolean} True if the rule represents an error, false if not. + */ +function isErrorSeverity(ruleConfig) { + return getRuleSeverity(ruleConfig) === 2; +} + +/** + * Checks whether a given config has valid severity or not. + * @param {number|string|Array} ruleConfig The configuration for an individual rule. + * @returns {boolean} `true` if the configuration has valid severity. + */ +function isValidSeverity(ruleConfig) { + let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + + if (typeof severity === "string") { + severity = severity.toLowerCase(); + } + return VALID_SEVERITIES.has(severity); +} + +/** + * Checks whether every rule of a given config has valid severity or not. + * @param {Object} config The configuration for rules. + * @returns {boolean} `true` if the configuration has valid severity. + */ +function isEverySeverityValid(config) { + return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId])); +} + +/** + * Normalizes a value for a global in a config + * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in + * a global directive comment + * @returns {("readable"|"writeable"|"off")} The value normalized as a string + * @throws Error if global value is invalid + */ +function normalizeConfigGlobal(configuredValue) { + switch (configuredValue) { + case "off": + return "off"; + + case true: + case "true": + case "writeable": + case "writable": + return "writable"; + + case null: + case false: + case "false": + case "readable": + case "readonly": + return "readonly"; + + default: + throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`); + } +} + +var ConfigOps = { + __proto__: null, + getRuleSeverity: getRuleSeverity, + normalizeToStrings: normalizeToStrings, + isErrorSeverity: isErrorSeverity, + isValidSeverity: isValidSeverity, + isEverySeverityValid: isEverySeverityValid, + normalizeConfigGlobal: normalizeConfigGlobal +}; + +/** + * @fileoverview Provide the function that emits deprecation warnings. + * @author Toru Nagashima + */ + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +// Defitions for deprecation warnings. +const deprecationWarningMessages = { + ESLINT_LEGACY_ECMAFEATURES: + "The 'ecmaFeatures' config file property is deprecated and has no effect.", + ESLINT_PERSONAL_CONFIG_LOAD: + "'~/.eslintrc.*' config files have been deprecated. " + + "Please use a config file per project or the '--config' option.", + ESLINT_PERSONAL_CONFIG_SUPPRESS: + "'~/.eslintrc.*' config files have been deprecated. " + + "Please remove it or add 'root:true' to the config files in your " + + "projects in order to avoid loading '~/.eslintrc.*' accidentally." +}; + +const sourceFileErrorCache = new Set(); + +/** + * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted + * for each unique file path, but repeated invocations with the same file path have no effect. + * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active. + * @param {string} source The name of the configuration source to report the warning for. + * @param {string} errorCode The warning message to show. + * @returns {void} + */ +function emitDeprecationWarning(source, errorCode) { + const cacheKey = JSON.stringify({ source, errorCode }); + + if (sourceFileErrorCache.has(cacheKey)) { + return; + } + sourceFileErrorCache.add(cacheKey); + + const rel = path__default["default"].relative(process.cwd(), source); + const message = deprecationWarningMessages[errorCode]; + + process.emitWarning( + `${message} (found in "${rel}")`, + "DeprecationWarning", + errorCode + ); +} + +/** + * @fileoverview The instance of Ajv validator. + * @author Evgeny Poberezkin + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/* + * Copied from ajv/lib/refs/json-schema-draft-04.json + * The MIT License (MIT) + * Copyright (c) 2015-2017 Evgeny Poberezkin + */ +const metaSchema = { + id: "http://json-schema.org/draft-04/schema#", + $schema: "http://json-schema.org/draft-04/schema#", + description: "Core schema meta-schema", + definitions: { + schemaArray: { + type: "array", + minItems: 1, + items: { $ref: "#" } + }, + positiveInteger: { + type: "integer", + minimum: 0 + }, + positiveIntegerDefault0: { + allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }] + }, + simpleTypes: { + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + stringArray: { + type: "array", + items: { type: "string" }, + minItems: 1, + uniqueItems: true + } + }, + type: "object", + properties: { + id: { + type: "string" + }, + $schema: { + type: "string" + }, + title: { + type: "string" + }, + description: { + type: "string" + }, + default: { }, + multipleOf: { + type: "number", + minimum: 0, + exclusiveMinimum: true + }, + maximum: { + type: "number" + }, + exclusiveMaximum: { + type: "boolean", + default: false + }, + minimum: { + type: "number" + }, + exclusiveMinimum: { + type: "boolean", + default: false + }, + maxLength: { $ref: "#/definitions/positiveInteger" }, + minLength: { $ref: "#/definitions/positiveIntegerDefault0" }, + pattern: { + type: "string", + format: "regex" + }, + additionalItems: { + anyOf: [ + { type: "boolean" }, + { $ref: "#" } + ], + default: { } + }, + items: { + anyOf: [ + { $ref: "#" }, + { $ref: "#/definitions/schemaArray" } + ], + default: { } + }, + maxItems: { $ref: "#/definitions/positiveInteger" }, + minItems: { $ref: "#/definitions/positiveIntegerDefault0" }, + uniqueItems: { + type: "boolean", + default: false + }, + maxProperties: { $ref: "#/definitions/positiveInteger" }, + minProperties: { $ref: "#/definitions/positiveIntegerDefault0" }, + required: { $ref: "#/definitions/stringArray" }, + additionalProperties: { + anyOf: [ + { type: "boolean" }, + { $ref: "#" } + ], + default: { } + }, + definitions: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + properties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + patternProperties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + dependencies: { + type: "object", + additionalProperties: { + anyOf: [ + { $ref: "#" }, + { $ref: "#/definitions/stringArray" } + ] + } + }, + enum: { + type: "array", + minItems: 1, + uniqueItems: true + }, + type: { + anyOf: [ + { $ref: "#/definitions/simpleTypes" }, + { + type: "array", + items: { $ref: "#/definitions/simpleTypes" }, + minItems: 1, + uniqueItems: true + } + ] + }, + format: { type: "string" }, + allOf: { $ref: "#/definitions/schemaArray" }, + anyOf: { $ref: "#/definitions/schemaArray" }, + oneOf: { $ref: "#/definitions/schemaArray" }, + not: { $ref: "#" } + }, + dependencies: { + exclusiveMaximum: ["maximum"], + exclusiveMinimum: ["minimum"] + }, + default: { } +}; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +var ajvOrig = (additionalOptions = {}) => { + const ajv = new Ajv__default["default"]({ + meta: false, + useDefaults: true, + validateSchema: false, + missingRefs: "ignore", + verbose: true, + schemaId: "auto", + ...additionalOptions + }); + + ajv.addMetaSchema(metaSchema); + // eslint-disable-next-line no-underscore-dangle -- part of the API + ajv._opts.defaultMeta = metaSchema.id; + + return ajv; +}; + +/** + * @fileoverview Applies default rule options + * @author JoshuaKGoldberg + */ + +/** + * Check if the variable contains an object strictly rejecting arrays + * @param {unknown} value an object + * @returns {boolean} Whether value is an object + */ +function isObjectNotArray(value) { + return typeof value === "object" && value !== null && !Array.isArray(value); +} + +/** + * Deeply merges second on top of first, creating a new {} object if needed. + * @param {T} first Base, default value. + * @param {U} second User-specified value. + * @returns {T | U | (T & U)} Merged equivalent of second on top of first. + */ +function deepMergeObjects(first, second) { + if (second === void 0) { + return first; + } + + if (!isObjectNotArray(first) || !isObjectNotArray(second)) { + return second; + } + + const result = { ...first, ...second }; + + for (const key of Object.keys(second)) { + if (Object.prototype.propertyIsEnumerable.call(first, key)) { + result[key] = deepMergeObjects(first[key], second[key]); + } + } + + return result; +} + +/** + * Deeply merges second on top of first, creating a new [] array if needed. + * @param {T[] | undefined} first Base, default values. + * @param {U[] | undefined} second User-specified values. + * @returns {(T | U | (T & U))[]} Merged equivalent of second on top of first. + */ +function deepMergeArrays(first, second) { + if (!first || !second) { + return second || first || []; + } + + return [ + ...first.map((value, i) => deepMergeObjects(value, second[i])), + ...second.slice(first.length) + ]; +} + +/** + * @fileoverview Defines a schema for configs. + * @author Sylvan Mably + */ + +const baseConfigProperties = { + $schema: { type: "string" }, + env: { type: "object" }, + extends: { $ref: "#/definitions/stringOrStrings" }, + globals: { type: "object" }, + overrides: { + type: "array", + items: { $ref: "#/definitions/overrideConfig" }, + additionalItems: false + }, + parser: { type: ["string", "null"] }, + parserOptions: { type: "object" }, + plugins: { type: "array" }, + processor: { type: "string" }, + rules: { type: "object" }, + settings: { type: "object" }, + noInlineConfig: { type: "boolean" }, + reportUnusedDisableDirectives: { type: "boolean" }, + + ecmaFeatures: { type: "object" } // deprecated; logs a warning when used +}; + +const configSchema = { + definitions: { + stringOrStrings: { + oneOf: [ + { type: "string" }, + { + type: "array", + items: { type: "string" }, + additionalItems: false + } + ] + }, + stringOrStringsRequired: { + oneOf: [ + { type: "string" }, + { + type: "array", + items: { type: "string" }, + additionalItems: false, + minItems: 1 + } + ] + }, + + // Config at top-level. + objectConfig: { + type: "object", + properties: { + root: { type: "boolean" }, + ignorePatterns: { $ref: "#/definitions/stringOrStrings" }, + ...baseConfigProperties + }, + additionalProperties: false + }, + + // Config in `overrides`. + overrideConfig: { + type: "object", + properties: { + excludedFiles: { $ref: "#/definitions/stringOrStrings" }, + files: { $ref: "#/definitions/stringOrStringsRequired" }, + ...baseConfigProperties + }, + required: ["files"], + additionalProperties: false + } + }, + + $ref: "#/definitions/objectConfig" +}; + +/** + * @fileoverview Defines environment settings and globals. + * @author Elan Shanker + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Get the object that has difference. + * @param {Record} current The newer object. + * @param {Record} prev The older object. + * @returns {Record} The difference object. + */ +function getDiff(current, prev) { + const retv = {}; + + for (const [key, value] of Object.entries(current)) { + if (!Object.hasOwn(prev, key)) { + retv[key] = value; + } + } + + return retv; +} + +const newGlobals2015 = getDiff(globals__default["default"].es2015, globals__default["default"].es5); // 19 variables such as Promise, Map, ... +const newGlobals2017 = { + Atomics: false, + SharedArrayBuffer: false +}; +const newGlobals2020 = { + BigInt: false, + BigInt64Array: false, + BigUint64Array: false, + globalThis: false +}; + +const newGlobals2021 = { + AggregateError: false, + FinalizationRegistry: false, + WeakRef: false +}; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** @type {Map} */ +var environments = new Map(Object.entries({ + + // Language + builtin: { + globals: globals__default["default"].es5 + }, + es6: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 6 + } + }, + es2015: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 6 + } + }, + es2016: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 7 + } + }, + es2017: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 8 + } + }, + es2018: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 9 + } + }, + es2019: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 10 + } + }, + es2020: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 }, + parserOptions: { + ecmaVersion: 11 + } + }, + es2021: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 12 + } + }, + es2022: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 13 + } + }, + es2023: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 14 + } + }, + es2024: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 15 + } + }, + + // Platforms + browser: { + globals: globals__default["default"].browser + }, + node: { + globals: globals__default["default"].node, + parserOptions: { + ecmaFeatures: { + globalReturn: true + } + } + }, + "shared-node-browser": { + globals: globals__default["default"]["shared-node-browser"] + }, + worker: { + globals: globals__default["default"].worker + }, + serviceworker: { + globals: globals__default["default"].serviceworker + }, + + // Frameworks + commonjs: { + globals: globals__default["default"].commonjs, + parserOptions: { + ecmaFeatures: { + globalReturn: true + } + } + }, + amd: { + globals: globals__default["default"].amd + }, + mocha: { + globals: globals__default["default"].mocha + }, + jasmine: { + globals: globals__default["default"].jasmine + }, + jest: { + globals: globals__default["default"].jest + }, + phantomjs: { + globals: globals__default["default"].phantomjs + }, + jquery: { + globals: globals__default["default"].jquery + }, + qunit: { + globals: globals__default["default"].qunit + }, + prototypejs: { + globals: globals__default["default"].prototypejs + }, + shelljs: { + globals: globals__default["default"].shelljs + }, + meteor: { + globals: globals__default["default"].meteor + }, + mongo: { + globals: globals__default["default"].mongo + }, + protractor: { + globals: globals__default["default"].protractor + }, + applescript: { + globals: globals__default["default"].applescript + }, + nashorn: { + globals: globals__default["default"].nashorn + }, + atomtest: { + globals: globals__default["default"].atomtest + }, + embertest: { + globals: globals__default["default"].embertest + }, + webextensions: { + globals: globals__default["default"].webextensions + }, + greasemonkey: { + globals: globals__default["default"].greasemonkey + } +})); + +/** + * @fileoverview Validates configs. + * @author Brandon Mills + */ + +const ajv = ajvOrig(); + +const ruleValidators = new WeakMap(); +const noop = Function.prototype; + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ +let validateSchema; +const severityMap = { + error: 2, + warn: 1, + off: 0 +}; + +const validated = new WeakSet(); + +// JSON schema that disallows passing any options +const noOptionsSchema = Object.freeze({ + type: "array", + minItems: 0, + maxItems: 0 +}); + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * Validator for configuration objects. + */ +class ConfigValidator { + constructor({ builtInRules = new Map() } = {}) { + this.builtInRules = builtInRules; + } + + /** + * Gets a complete options schema for a rule. + * @param {Rule} rule A rule object + * @throws {TypeError} If `meta.schema` is specified but is not an array, object or `false`. + * @returns {Object|null} JSON Schema for the rule's options. + * `null` if rule wasn't passed or its `meta.schema` is `false`. + */ + getRuleOptionsSchema(rule) { + if (!rule) { + return null; + } + + if (!rule.meta) { + return { ...noOptionsSchema }; // default if `meta.schema` is not specified + } + + const schema = rule.meta.schema; + + if (typeof schema === "undefined") { + return { ...noOptionsSchema }; // default if `meta.schema` is not specified + } + + // `schema:false` is an allowed explicit opt-out of options validation for the rule + if (schema === false) { + return null; + } + + if (typeof schema !== "object" || schema === null) { + throw new TypeError("Rule's `meta.schema` must be an array or object"); + } + + // ESLint-specific array form needs to be converted into a valid JSON Schema definition + if (Array.isArray(schema)) { + if (schema.length) { + return { + type: "array", + items: schema, + minItems: 0, + maxItems: schema.length + }; + } + + // `schema:[]` is an explicit way to specify that the rule does not accept any options + return { ...noOptionsSchema }; + } + + // `schema:` is assumed to be a valid JSON Schema definition + return schema; + } + + /** + * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid. + * @param {options} options The given options for the rule. + * @returns {number|string} The rule's severity value + * @throws {Error} If the severity is invalid. + */ + validateRuleSeverity(options) { + const severity = Array.isArray(options) ? options[0] : options; + const normSeverity = typeof severity === "string" ? severityMap[severity.toLowerCase()] : severity; + + if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) { + return normSeverity; + } + + throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util__default["default"].inspect(severity).replace(/'/gu, "\"").replace(/\n/gu, "")}').\n`); + + } + + /** + * Validates the non-severity options passed to a rule, based on its schema. + * @param {{create: Function}} rule The rule to validate + * @param {Array} localOptions The options for the rule, excluding severity + * @returns {void} + * @throws {Error} If the options are invalid. + */ + validateRuleSchema(rule, localOptions) { + if (!ruleValidators.has(rule)) { + try { + const schema = this.getRuleOptionsSchema(rule); + + if (schema) { + ruleValidators.set(rule, ajv.compile(schema)); + } + } catch (err) { + const errorWithCode = new Error(err.message, { cause: err }); + + errorWithCode.code = "ESLINT_INVALID_RULE_OPTIONS_SCHEMA"; + + throw errorWithCode; + } + } + + const validateRule = ruleValidators.get(rule); + + if (validateRule) { + const mergedOptions = deepMergeArrays(rule.meta?.defaultOptions, localOptions); + + validateRule(mergedOptions); + + if (validateRule.errors) { + throw new Error(validateRule.errors.map( + error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n` + ).join("")); + } + } + } + + /** + * Validates a rule's options against its schema. + * @param {{create: Function}|null} rule The rule that the config is being validated for + * @param {string} ruleId The rule's unique name. + * @param {Array|number} options The given options for the rule. + * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined, + * no source is prepended to the message. + * @returns {void} + * @throws {Error} If the options are invalid. + */ + validateRuleOptions(rule, ruleId, options, source = null) { + try { + const severity = this.validateRuleSeverity(options); + + if (severity !== 0) { + this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []); + } + } catch (err) { + let enhancedMessage = err.code === "ESLINT_INVALID_RULE_OPTIONS_SCHEMA" + ? `Error while processing options validation schema of rule '${ruleId}': ${err.message}` + : `Configuration for rule "${ruleId}" is invalid:\n${err.message}`; + + if (typeof source === "string") { + enhancedMessage = `${source}:\n\t${enhancedMessage}`; + } + + const enhancedError = new Error(enhancedMessage, { cause: err }); + + if (err.code) { + enhancedError.code = err.code; + } + + throw enhancedError; + } + } + + /** + * Validates an environment object + * @param {Object} environment The environment config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {(envId:string) => Object} [getAdditionalEnv] A map from strings to loaded environments. + * @returns {void} + * @throws {Error} If the environment is invalid. + */ + validateEnvironment( + environment, + source, + getAdditionalEnv = noop + ) { + + // not having an environment is ok + if (!environment) { + return; + } + + Object.keys(environment).forEach(id => { + const env = getAdditionalEnv(id) || environments.get(id) || null; + + if (!env) { + const message = `${source}:\n\tEnvironment key "${id}" is unknown\n`; + + throw new Error(message); + } + }); + } + + /** + * Validates a rules config object + * @param {Object} rulesConfig The rules config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {(ruleId:string) => Object} getAdditionalRule A map from strings to loaded rules + * @returns {void} + */ + validateRules( + rulesConfig, + source, + getAdditionalRule = noop + ) { + if (!rulesConfig) { + return; + } + + Object.keys(rulesConfig).forEach(id => { + const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null; + + this.validateRuleOptions(rule, id, rulesConfig[id], source); + }); + } + + /** + * Validates a `globals` section of a config file + * @param {Object} globalsConfig The `globals` section + * @param {string|null} source The name of the configuration source to report in the event of an error. + * @returns {void} + */ + validateGlobals(globalsConfig, source = null) { + if (!globalsConfig) { + return; + } + + Object.entries(globalsConfig) + .forEach(([configuredGlobal, configuredValue]) => { + try { + normalizeConfigGlobal(configuredValue); + } catch (err) { + throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`); + } + }); + } + + /** + * Validate `processor` configuration. + * @param {string|undefined} processorName The processor name. + * @param {string} source The name of config file. + * @param {(id:string) => Processor} getProcessor The getter of defined processors. + * @returns {void} + * @throws {Error} If the processor is invalid. + */ + validateProcessor(processorName, source, getProcessor) { + if (processorName && !getProcessor(processorName)) { + throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`); + } + } + + /** + * Formats an array of schema validation errors. + * @param {Array} errors An array of error messages to format. + * @returns {string} Formatted error message + */ + formatErrors(errors) { + return errors.map(error => { + if (error.keyword === "additionalProperties") { + const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty; + + return `Unexpected top-level property "${formattedPropertyPath}"`; + } + if (error.keyword === "type") { + const formattedField = error.dataPath.slice(1); + const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join("/") : error.schema; + const formattedValue = JSON.stringify(error.data); + + return `Property "${formattedField}" is the wrong type (expected ${formattedExpectedType} but got \`${formattedValue}\`)`; + } + + const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath; + + return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`; + }).map(message => `\t- ${message}.\n`).join(""); + } + + /** + * Validates the top level properties of the config object. + * @param {Object} config The config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @returns {void} + * @throws {Error} If the config is invalid. + */ + validateConfigSchema(config, source = null) { + validateSchema = validateSchema || ajv.compile(configSchema); + + if (!validateSchema(config)) { + throw new Error(`ESLint configuration in ${source} is invalid:\n${this.formatErrors(validateSchema.errors)}`); + } + + if (Object.hasOwn(config, "ecmaFeatures")) { + emitDeprecationWarning(source, "ESLINT_LEGACY_ECMAFEATURES"); + } + } + + /** + * Validates an entire config object. + * @param {Object} config The config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {(ruleId:string) => Object} [getAdditionalRule] A map from strings to loaded rules. + * @param {(envId:string) => Object} [getAdditionalEnv] A map from strings to loaded envs. + * @returns {void} + */ + validate(config, source, getAdditionalRule, getAdditionalEnv) { + this.validateConfigSchema(config, source); + this.validateRules(config.rules, source, getAdditionalRule); + this.validateEnvironment(config.env, source, getAdditionalEnv); + this.validateGlobals(config.globals, source); + + for (const override of config.overrides || []) { + this.validateRules(override.rules, source, getAdditionalRule); + this.validateEnvironment(override.env, source, getAdditionalEnv); + this.validateGlobals(config.globals, source); + } + } + + /** + * Validate config array object. + * @param {ConfigArray} configArray The config array to validate. + * @returns {void} + */ + validateConfigArray(configArray) { + const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments); + const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors); + const getPluginRule = Map.prototype.get.bind(configArray.pluginRules); + + // Validate. + for (const element of configArray) { + if (validated.has(element)) { + continue; + } + validated.add(element); + + this.validateEnvironment(element.env, element.name, getPluginEnv); + this.validateGlobals(element.globals, element.name); + this.validateProcessor(element.processor, element.name, getPluginProcessor); + this.validateRules(element.rules, element.name, getPluginRule); + } + } + +} + +/** + * @fileoverview Common helpers for naming of plugins, formatters and configs + */ + +const NAMESPACE_REGEX = /^@.*\//iu; + +/** + * Brings package name to correct format based on prefix + * @param {string} name The name of the package. + * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter" + * @returns {string} Normalized name of the package + * @private + */ +function normalizePackageName(name, prefix) { + let normalizedName = name; + + /** + * On Windows, name can come in with Windows slashes instead of Unix slashes. + * Normalize to Unix first to avoid errors later on. + * https://github.com/eslint/eslint/issues/5644 + */ + if (normalizedName.includes("\\")) { + normalizedName = normalizedName.replace(/\\/gu, "/"); + } + + if (normalizedName.charAt(0) === "@") { + + /** + * it's a scoped package + * package name is the prefix, or just a username + */ + const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, "u"), + scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, "u"); + + if (scopedPackageShortcutRegex.test(normalizedName)) { + normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`); + } else if (!scopedPackageNameRegex.test(normalizedName.split("/")[1])) { + + /** + * for scoped packages, insert the prefix after the first / unless + * the path is already @scope/eslint or @scope/eslint-xxx-yyy + */ + normalizedName = normalizedName.replace(/^@([^/]+)\/(.*)$/u, `@$1/${prefix}-$2`); + } + } else if (!normalizedName.startsWith(`${prefix}-`)) { + normalizedName = `${prefix}-${normalizedName}`; + } + + return normalizedName; +} + +/** + * Removes the prefix from a fullname. + * @param {string} fullname The term which may have the prefix. + * @param {string} prefix The prefix to remove. + * @returns {string} The term without prefix. + */ +function getShorthandName(fullname, prefix) { + if (fullname[0] === "@") { + let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(fullname); + + if (matchResult) { + return matchResult[1]; + } + + matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec(fullname); + if (matchResult) { + return `${matchResult[1]}/${matchResult[2]}`; + } + } else if (fullname.startsWith(`${prefix}-`)) { + return fullname.slice(prefix.length + 1); + } + + return fullname; +} + +/** + * Gets the scope (namespace) of a term. + * @param {string} term The term which may have the namespace. + * @returns {string} The namespace of the term if it has one. + */ +function getNamespaceFromTerm(term) { + const match = term.match(NAMESPACE_REGEX); + + return match ? match[0] : ""; +} + +var naming = { + __proto__: null, + normalizePackageName: normalizePackageName, + getShorthandName: getShorthandName, + getNamespaceFromTerm: getNamespaceFromTerm +}; + +/** + * @fileoverview Package exports for @eslint/eslintrc + * @author Nicholas C. Zakas + */ + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +const Legacy = { + environments, + + // shared + ConfigOps, + ConfigValidator, + naming +}; + +exports.Legacy = Legacy; +//# sourceMappingURL=eslintrc-universal.cjs.map diff --git a/slider/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map b/slider/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map new file mode 100644 index 0000000..65875a1 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map @@ -0,0 +1 @@ +{"version":3,"file":"eslintrc-universal.cjs","sources":["../lib/shared/config-ops.js","../lib/shared/deprecation-warnings.js","../lib/shared/ajv.js","../lib/shared/deep-merge-arrays.js","../conf/config-schema.js","../conf/environments.js","../lib/shared/config-validator.js","../lib/shared/naming.js","../lib/index-universal.js"],"sourcesContent":["/**\n * @fileoverview Config file operations. This file must be usable in the browser,\n * so no Node-specific code can be here.\n * @author Nicholas C. Zakas\n */\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\nconst RULE_SEVERITY_STRINGS = [\"off\", \"warn\", \"error\"],\n RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {\n map[value] = index;\n return map;\n }, {}),\n VALID_SEVERITIES = new Set([0, 1, 2, \"off\", \"warn\", \"error\"]);\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/**\n * Normalizes the severity value of a rule's configuration to a number\n * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally\n * received from the user. A valid config value is either 0, 1, 2, the string \"off\" (treated the same as 0),\n * the string \"warn\" (treated the same as 1), the string \"error\" (treated the same as 2), or an array\n * whose first element is one of the above values. Strings are matched case-insensitively.\n * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.\n */\nfunction getRuleSeverity(ruleConfig) {\n const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (severityValue === 0 || severityValue === 1 || severityValue === 2) {\n return severityValue;\n }\n\n if (typeof severityValue === \"string\") {\n return RULE_SEVERITY[severityValue.toLowerCase()] || 0;\n }\n\n return 0;\n}\n\n/**\n * Converts old-style severity settings (0, 1, 2) into new-style\n * severity settings (off, warn, error) for all rules. Assumption is that severity\n * values have already been validated as correct.\n * @param {Object} config The config object to normalize.\n * @returns {void}\n */\nfunction normalizeToStrings(config) {\n\n if (config.rules) {\n Object.keys(config.rules).forEach(ruleId => {\n const ruleConfig = config.rules[ruleId];\n\n if (typeof ruleConfig === \"number\") {\n config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];\n } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === \"number\") {\n ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];\n }\n });\n }\n}\n\n/**\n * Determines if the severity for the given rule configuration represents an error.\n * @param {int|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} True if the rule represents an error, false if not.\n */\nfunction isErrorSeverity(ruleConfig) {\n return getRuleSeverity(ruleConfig) === 2;\n}\n\n/**\n * Checks whether a given config has valid severity or not.\n * @param {number|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isValidSeverity(ruleConfig) {\n let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (typeof severity === \"string\") {\n severity = severity.toLowerCase();\n }\n return VALID_SEVERITIES.has(severity);\n}\n\n/**\n * Checks whether every rule of a given config has valid severity or not.\n * @param {Object} config The configuration for rules.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isEverySeverityValid(config) {\n return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId]));\n}\n\n/**\n * Normalizes a value for a global in a config\n * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in\n * a global directive comment\n * @returns {(\"readable\"|\"writeable\"|\"off\")} The value normalized as a string\n * @throws Error if global value is invalid\n */\nfunction normalizeConfigGlobal(configuredValue) {\n switch (configuredValue) {\n case \"off\":\n return \"off\";\n\n case true:\n case \"true\":\n case \"writeable\":\n case \"writable\":\n return \"writable\";\n\n case null:\n case false:\n case \"false\":\n case \"readable\":\n case \"readonly\":\n return \"readonly\";\n\n default:\n throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`);\n }\n}\n\nexport {\n getRuleSeverity,\n normalizeToStrings,\n isErrorSeverity,\n isValidSeverity,\n isEverySeverityValid,\n normalizeConfigGlobal\n};\n","/**\n * @fileoverview Provide the function that emits deprecation warnings.\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport path from \"node:path\";\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\n// Defitions for deprecation warnings.\nconst deprecationWarningMessages = {\n ESLINT_LEGACY_ECMAFEATURES:\n \"The 'ecmaFeatures' config file property is deprecated and has no effect.\",\n ESLINT_PERSONAL_CONFIG_LOAD:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please use a config file per project or the '--config' option.\",\n ESLINT_PERSONAL_CONFIG_SUPPRESS:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please remove it or add 'root:true' to the config files in your \" +\n \"projects in order to avoid loading '~/.eslintrc.*' accidentally.\"\n};\n\nconst sourceFileErrorCache = new Set();\n\n/**\n * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted\n * for each unique file path, but repeated invocations with the same file path have no effect.\n * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.\n * @param {string} source The name of the configuration source to report the warning for.\n * @param {string} errorCode The warning message to show.\n * @returns {void}\n */\nfunction emitDeprecationWarning(source, errorCode) {\n const cacheKey = JSON.stringify({ source, errorCode });\n\n if (sourceFileErrorCache.has(cacheKey)) {\n return;\n }\n sourceFileErrorCache.add(cacheKey);\n\n const rel = path.relative(process.cwd(), source);\n const message = deprecationWarningMessages[errorCode];\n\n process.emitWarning(\n `${message} (found in \"${rel}\")`,\n \"DeprecationWarning\",\n errorCode\n );\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n emitDeprecationWarning\n};\n","/**\n * @fileoverview The instance of Ajv validator.\n * @author Evgeny Poberezkin\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport Ajv from \"ajv\";\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\n/*\n * Copied from ajv/lib/refs/json-schema-draft-04.json\n * The MIT License (MIT)\n * Copyright (c) 2015-2017 Evgeny Poberezkin\n */\nconst metaSchema = {\n id: \"http://json-schema.org/draft-04/schema#\",\n $schema: \"http://json-schema.org/draft-04/schema#\",\n description: \"Core schema meta-schema\",\n definitions: {\n schemaArray: {\n type: \"array\",\n minItems: 1,\n items: { $ref: \"#\" }\n },\n positiveInteger: {\n type: \"integer\",\n minimum: 0\n },\n positiveIntegerDefault0: {\n allOf: [{ $ref: \"#/definitions/positiveInteger\" }, { default: 0 }]\n },\n simpleTypes: {\n enum: [\"array\", \"boolean\", \"integer\", \"null\", \"number\", \"object\", \"string\"]\n },\n stringArray: {\n type: \"array\",\n items: { type: \"string\" },\n minItems: 1,\n uniqueItems: true\n }\n },\n type: \"object\",\n properties: {\n id: {\n type: \"string\"\n },\n $schema: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n default: { },\n multipleOf: {\n type: \"number\",\n minimum: 0,\n exclusiveMinimum: true\n },\n maximum: {\n type: \"number\"\n },\n exclusiveMaximum: {\n type: \"boolean\",\n default: false\n },\n minimum: {\n type: \"number\"\n },\n exclusiveMinimum: {\n type: \"boolean\",\n default: false\n },\n maxLength: { $ref: \"#/definitions/positiveInteger\" },\n minLength: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n pattern: {\n type: \"string\",\n format: \"regex\"\n },\n additionalItems: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n items: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/schemaArray\" }\n ],\n default: { }\n },\n maxItems: { $ref: \"#/definitions/positiveInteger\" },\n minItems: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n uniqueItems: {\n type: \"boolean\",\n default: false\n },\n maxProperties: { $ref: \"#/definitions/positiveInteger\" },\n minProperties: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n required: { $ref: \"#/definitions/stringArray\" },\n additionalProperties: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n definitions: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n properties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n patternProperties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n dependencies: {\n type: \"object\",\n additionalProperties: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/stringArray\" }\n ]\n }\n },\n enum: {\n type: \"array\",\n minItems: 1,\n uniqueItems: true\n },\n type: {\n anyOf: [\n { $ref: \"#/definitions/simpleTypes\" },\n {\n type: \"array\",\n items: { $ref: \"#/definitions/simpleTypes\" },\n minItems: 1,\n uniqueItems: true\n }\n ]\n },\n format: { type: \"string\" },\n allOf: { $ref: \"#/definitions/schemaArray\" },\n anyOf: { $ref: \"#/definitions/schemaArray\" },\n oneOf: { $ref: \"#/definitions/schemaArray\" },\n not: { $ref: \"#\" }\n },\n dependencies: {\n exclusiveMaximum: [\"maximum\"],\n exclusiveMinimum: [\"minimum\"]\n },\n default: { }\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport default (additionalOptions = {}) => {\n const ajv = new Ajv({\n meta: false,\n useDefaults: true,\n validateSchema: false,\n missingRefs: \"ignore\",\n verbose: true,\n schemaId: \"auto\",\n ...additionalOptions\n });\n\n ajv.addMetaSchema(metaSchema);\n // eslint-disable-next-line no-underscore-dangle -- part of the API\n ajv._opts.defaultMeta = metaSchema.id;\n\n return ajv;\n};\n","/**\n * @fileoverview Applies default rule options\n * @author JoshuaKGoldberg\n */\n\n/**\n * Check if the variable contains an object strictly rejecting arrays\n * @param {unknown} value an object\n * @returns {boolean} Whether value is an object\n */\nfunction isObjectNotArray(value) {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n/**\n * Deeply merges second on top of first, creating a new {} object if needed.\n * @param {T} first Base, default value.\n * @param {U} second User-specified value.\n * @returns {T | U | (T & U)} Merged equivalent of second on top of first.\n */\nfunction deepMergeObjects(first, second) {\n if (second === void 0) {\n return first;\n }\n\n if (!isObjectNotArray(first) || !isObjectNotArray(second)) {\n return second;\n }\n\n const result = { ...first, ...second };\n\n for (const key of Object.keys(second)) {\n if (Object.prototype.propertyIsEnumerable.call(first, key)) {\n result[key] = deepMergeObjects(first[key], second[key]);\n }\n }\n\n return result;\n}\n\n/**\n * Deeply merges second on top of first, creating a new [] array if needed.\n * @param {T[] | undefined} first Base, default values.\n * @param {U[] | undefined} second User-specified values.\n * @returns {(T | U | (T & U))[]} Merged equivalent of second on top of first.\n */\nfunction deepMergeArrays(first, second) {\n if (!first || !second) {\n return second || first || [];\n }\n\n return [\n ...first.map((value, i) => deepMergeObjects(value, second[i])),\n ...second.slice(first.length)\n ];\n}\n\nexport { deepMergeArrays };\n","/**\n * @fileoverview Defines a schema for configs.\n * @author Sylvan Mably\n */\n\nconst baseConfigProperties = {\n $schema: { type: \"string\" },\n env: { type: \"object\" },\n extends: { $ref: \"#/definitions/stringOrStrings\" },\n globals: { type: \"object\" },\n overrides: {\n type: \"array\",\n items: { $ref: \"#/definitions/overrideConfig\" },\n additionalItems: false\n },\n parser: { type: [\"string\", \"null\"] },\n parserOptions: { type: \"object\" },\n plugins: { type: \"array\" },\n processor: { type: \"string\" },\n rules: { type: \"object\" },\n settings: { type: \"object\" },\n noInlineConfig: { type: \"boolean\" },\n reportUnusedDisableDirectives: { type: \"boolean\" },\n\n ecmaFeatures: { type: \"object\" } // deprecated; logs a warning when used\n};\n\nconst configSchema = {\n definitions: {\n stringOrStrings: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false\n }\n ]\n },\n stringOrStringsRequired: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false,\n minItems: 1\n }\n ]\n },\n\n // Config at top-level.\n objectConfig: {\n type: \"object\",\n properties: {\n root: { type: \"boolean\" },\n ignorePatterns: { $ref: \"#/definitions/stringOrStrings\" },\n ...baseConfigProperties\n },\n additionalProperties: false\n },\n\n // Config in `overrides`.\n overrideConfig: {\n type: \"object\",\n properties: {\n excludedFiles: { $ref: \"#/definitions/stringOrStrings\" },\n files: { $ref: \"#/definitions/stringOrStringsRequired\" },\n ...baseConfigProperties\n },\n required: [\"files\"],\n additionalProperties: false\n }\n },\n\n $ref: \"#/definitions/objectConfig\"\n};\n\nexport default configSchema;\n","/**\n * @fileoverview Defines environment settings and globals.\n * @author Elan Shanker\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport globals from \"globals\";\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Get the object that has difference.\n * @param {Record} current The newer object.\n * @param {Record} prev The older object.\n * @returns {Record} The difference object.\n */\nfunction getDiff(current, prev) {\n const retv = {};\n\n for (const [key, value] of Object.entries(current)) {\n if (!Object.hasOwn(prev, key)) {\n retv[key] = value;\n }\n }\n\n return retv;\n}\n\nconst newGlobals2015 = getDiff(globals.es2015, globals.es5); // 19 variables such as Promise, Map, ...\nconst newGlobals2017 = {\n Atomics: false,\n SharedArrayBuffer: false\n};\nconst newGlobals2020 = {\n BigInt: false,\n BigInt64Array: false,\n BigUint64Array: false,\n globalThis: false\n};\n\nconst newGlobals2021 = {\n AggregateError: false,\n FinalizationRegistry: false,\n WeakRef: false\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/** @type {Map} */\nexport default new Map(Object.entries({\n\n // Language\n builtin: {\n globals: globals.es5\n },\n es6: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2015: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2016: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 7\n }\n },\n es2017: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 8\n }\n },\n es2018: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 9\n }\n },\n es2019: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 10\n }\n },\n es2020: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },\n parserOptions: {\n ecmaVersion: 11\n }\n },\n es2021: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 12\n }\n },\n es2022: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 13\n }\n },\n es2023: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 14\n }\n },\n es2024: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 15\n }\n },\n\n // Platforms\n browser: {\n globals: globals.browser\n },\n node: {\n globals: globals.node,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n \"shared-node-browser\": {\n globals: globals[\"shared-node-browser\"]\n },\n worker: {\n globals: globals.worker\n },\n serviceworker: {\n globals: globals.serviceworker\n },\n\n // Frameworks\n commonjs: {\n globals: globals.commonjs,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n amd: {\n globals: globals.amd\n },\n mocha: {\n globals: globals.mocha\n },\n jasmine: {\n globals: globals.jasmine\n },\n jest: {\n globals: globals.jest\n },\n phantomjs: {\n globals: globals.phantomjs\n },\n jquery: {\n globals: globals.jquery\n },\n qunit: {\n globals: globals.qunit\n },\n prototypejs: {\n globals: globals.prototypejs\n },\n shelljs: {\n globals: globals.shelljs\n },\n meteor: {\n globals: globals.meteor\n },\n mongo: {\n globals: globals.mongo\n },\n protractor: {\n globals: globals.protractor\n },\n applescript: {\n globals: globals.applescript\n },\n nashorn: {\n globals: globals.nashorn\n },\n atomtest: {\n globals: globals.atomtest\n },\n embertest: {\n globals: globals.embertest\n },\n webextensions: {\n globals: globals.webextensions\n },\n greasemonkey: {\n globals: globals.greasemonkey\n }\n}));\n","/**\n * @fileoverview Validates configs.\n * @author Brandon Mills\n */\n\n/* eslint class-methods-use-this: \"off\" -- not needed in this file */\n\n//------------------------------------------------------------------------------\n// Typedefs\n//------------------------------------------------------------------------------\n\n/** @typedef {import(\"../shared/types\").Rule} Rule */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport util from \"node:util\";\nimport * as ConfigOps from \"./config-ops.js\";\nimport { emitDeprecationWarning } from \"./deprecation-warnings.js\";\nimport ajvOrig from \"./ajv.js\";\nimport { deepMergeArrays } from \"./deep-merge-arrays.js\";\nimport configSchema from \"../../conf/config-schema.js\";\nimport BuiltInEnvironments from \"../../conf/environments.js\";\n\nconst ajv = ajvOrig();\n\nconst ruleValidators = new WeakMap();\nconst noop = Function.prototype;\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\nlet validateSchema;\nconst severityMap = {\n error: 2,\n warn: 1,\n off: 0\n};\n\nconst validated = new WeakSet();\n\n// JSON schema that disallows passing any options\nconst noOptionsSchema = Object.freeze({\n type: \"array\",\n minItems: 0,\n maxItems: 0\n});\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\n/**\n * Validator for configuration objects.\n */\nexport default class ConfigValidator {\n constructor({ builtInRules = new Map() } = {}) {\n this.builtInRules = builtInRules;\n }\n\n /**\n * Gets a complete options schema for a rule.\n * @param {Rule} rule A rule object\n * @throws {TypeError} If `meta.schema` is specified but is not an array, object or `false`.\n * @returns {Object|null} JSON Schema for the rule's options.\n * `null` if rule wasn't passed or its `meta.schema` is `false`.\n */\n getRuleOptionsSchema(rule) {\n if (!rule) {\n return null;\n }\n\n if (!rule.meta) {\n return { ...noOptionsSchema }; // default if `meta.schema` is not specified\n }\n\n const schema = rule.meta.schema;\n\n if (typeof schema === \"undefined\") {\n return { ...noOptionsSchema }; // default if `meta.schema` is not specified\n }\n\n // `schema:false` is an allowed explicit opt-out of options validation for the rule\n if (schema === false) {\n return null;\n }\n\n if (typeof schema !== \"object\" || schema === null) {\n throw new TypeError(\"Rule's `meta.schema` must be an array or object\");\n }\n\n // ESLint-specific array form needs to be converted into a valid JSON Schema definition\n if (Array.isArray(schema)) {\n if (schema.length) {\n return {\n type: \"array\",\n items: schema,\n minItems: 0,\n maxItems: schema.length\n };\n }\n\n // `schema:[]` is an explicit way to specify that the rule does not accept any options\n return { ...noOptionsSchema };\n }\n\n // `schema:` is assumed to be a valid JSON Schema definition\n return schema;\n }\n\n /**\n * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.\n * @param {options} options The given options for the rule.\n * @returns {number|string} The rule's severity value\n * @throws {Error} If the severity is invalid.\n */\n validateRuleSeverity(options) {\n const severity = Array.isArray(options) ? options[0] : options;\n const normSeverity = typeof severity === \"string\" ? severityMap[severity.toLowerCase()] : severity;\n\n if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) {\n return normSeverity;\n }\n\n throw new Error(`\\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util.inspect(severity).replace(/'/gu, \"\\\"\").replace(/\\n/gu, \"\")}').\\n`);\n\n }\n\n /**\n * Validates the non-severity options passed to a rule, based on its schema.\n * @param {{create: Function}} rule The rule to validate\n * @param {Array} localOptions The options for the rule, excluding severity\n * @returns {void}\n * @throws {Error} If the options are invalid.\n */\n validateRuleSchema(rule, localOptions) {\n if (!ruleValidators.has(rule)) {\n try {\n const schema = this.getRuleOptionsSchema(rule);\n\n if (schema) {\n ruleValidators.set(rule, ajv.compile(schema));\n }\n } catch (err) {\n const errorWithCode = new Error(err.message, { cause: err });\n\n errorWithCode.code = \"ESLINT_INVALID_RULE_OPTIONS_SCHEMA\";\n\n throw errorWithCode;\n }\n }\n\n const validateRule = ruleValidators.get(rule);\n\n if (validateRule) {\n const mergedOptions = deepMergeArrays(rule.meta?.defaultOptions, localOptions);\n\n validateRule(mergedOptions);\n\n if (validateRule.errors) {\n throw new Error(validateRule.errors.map(\n error => `\\tValue ${JSON.stringify(error.data)} ${error.message}.\\n`\n ).join(\"\"));\n }\n }\n }\n\n /**\n * Validates a rule's options against its schema.\n * @param {{create: Function}|null} rule The rule that the config is being validated for\n * @param {string} ruleId The rule's unique name.\n * @param {Array|number} options The given options for the rule.\n * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,\n * no source is prepended to the message.\n * @returns {void}\n * @throws {Error} If the options are invalid.\n */\n validateRuleOptions(rule, ruleId, options, source = null) {\n try {\n const severity = this.validateRuleSeverity(options);\n\n if (severity !== 0) {\n this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);\n }\n } catch (err) {\n let enhancedMessage = err.code === \"ESLINT_INVALID_RULE_OPTIONS_SCHEMA\"\n ? `Error while processing options validation schema of rule '${ruleId}': ${err.message}`\n : `Configuration for rule \"${ruleId}\" is invalid:\\n${err.message}`;\n\n if (typeof source === \"string\") {\n enhancedMessage = `${source}:\\n\\t${enhancedMessage}`;\n }\n\n const enhancedError = new Error(enhancedMessage, { cause: err });\n\n if (err.code) {\n enhancedError.code = err.code;\n }\n\n throw enhancedError;\n }\n }\n\n /**\n * Validates an environment object\n * @param {Object} environment The environment config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {(envId:string) => Object} [getAdditionalEnv] A map from strings to loaded environments.\n * @returns {void}\n * @throws {Error} If the environment is invalid.\n */\n validateEnvironment(\n environment,\n source,\n getAdditionalEnv = noop\n ) {\n\n // not having an environment is ok\n if (!environment) {\n return;\n }\n\n Object.keys(environment).forEach(id => {\n const env = getAdditionalEnv(id) || BuiltInEnvironments.get(id) || null;\n\n if (!env) {\n const message = `${source}:\\n\\tEnvironment key \"${id}\" is unknown\\n`;\n\n throw new Error(message);\n }\n });\n }\n\n /**\n * Validates a rules config object\n * @param {Object} rulesConfig The rules config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {(ruleId:string) => Object} getAdditionalRule A map from strings to loaded rules\n * @returns {void}\n */\n validateRules(\n rulesConfig,\n source,\n getAdditionalRule = noop\n ) {\n if (!rulesConfig) {\n return;\n }\n\n Object.keys(rulesConfig).forEach(id => {\n const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null;\n\n this.validateRuleOptions(rule, id, rulesConfig[id], source);\n });\n }\n\n /**\n * Validates a `globals` section of a config file\n * @param {Object} globalsConfig The `globals` section\n * @param {string|null} source The name of the configuration source to report in the event of an error.\n * @returns {void}\n */\n validateGlobals(globalsConfig, source = null) {\n if (!globalsConfig) {\n return;\n }\n\n Object.entries(globalsConfig)\n .forEach(([configuredGlobal, configuredValue]) => {\n try {\n ConfigOps.normalizeConfigGlobal(configuredValue);\n } catch (err) {\n throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\\n${err.message}`);\n }\n });\n }\n\n /**\n * Validate `processor` configuration.\n * @param {string|undefined} processorName The processor name.\n * @param {string} source The name of config file.\n * @param {(id:string) => Processor} getProcessor The getter of defined processors.\n * @returns {void}\n * @throws {Error} If the processor is invalid.\n */\n validateProcessor(processorName, source, getProcessor) {\n if (processorName && !getProcessor(processorName)) {\n throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`);\n }\n }\n\n /**\n * Formats an array of schema validation errors.\n * @param {Array} errors An array of error messages to format.\n * @returns {string} Formatted error message\n */\n formatErrors(errors) {\n return errors.map(error => {\n if (error.keyword === \"additionalProperties\") {\n const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;\n\n return `Unexpected top-level property \"${formattedPropertyPath}\"`;\n }\n if (error.keyword === \"type\") {\n const formattedField = error.dataPath.slice(1);\n const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join(\"/\") : error.schema;\n const formattedValue = JSON.stringify(error.data);\n\n return `Property \"${formattedField}\" is the wrong type (expected ${formattedExpectedType} but got \\`${formattedValue}\\`)`;\n }\n\n const field = error.dataPath[0] === \".\" ? error.dataPath.slice(1) : error.dataPath;\n\n return `\"${field}\" ${error.message}. Value: ${JSON.stringify(error.data)}`;\n }).map(message => `\\t- ${message}.\\n`).join(\"\");\n }\n\n /**\n * Validates the top level properties of the config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @returns {void}\n * @throws {Error} If the config is invalid.\n */\n validateConfigSchema(config, source = null) {\n validateSchema = validateSchema || ajv.compile(configSchema);\n\n if (!validateSchema(config)) {\n throw new Error(`ESLint configuration in ${source} is invalid:\\n${this.formatErrors(validateSchema.errors)}`);\n }\n\n if (Object.hasOwn(config, \"ecmaFeatures\")) {\n emitDeprecationWarning(source, \"ESLINT_LEGACY_ECMAFEATURES\");\n }\n }\n\n /**\n * Validates an entire config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {(ruleId:string) => Object} [getAdditionalRule] A map from strings to loaded rules.\n * @param {(envId:string) => Object} [getAdditionalEnv] A map from strings to loaded envs.\n * @returns {void}\n */\n validate(config, source, getAdditionalRule, getAdditionalEnv) {\n this.validateConfigSchema(config, source);\n this.validateRules(config.rules, source, getAdditionalRule);\n this.validateEnvironment(config.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n\n for (const override of config.overrides || []) {\n this.validateRules(override.rules, source, getAdditionalRule);\n this.validateEnvironment(override.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n }\n }\n\n /**\n * Validate config array object.\n * @param {ConfigArray} configArray The config array to validate.\n * @returns {void}\n */\n validateConfigArray(configArray) {\n const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments);\n const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors);\n const getPluginRule = Map.prototype.get.bind(configArray.pluginRules);\n\n // Validate.\n for (const element of configArray) {\n if (validated.has(element)) {\n continue;\n }\n validated.add(element);\n\n this.validateEnvironment(element.env, element.name, getPluginEnv);\n this.validateGlobals(element.globals, element.name);\n this.validateProcessor(element.processor, element.name, getPluginProcessor);\n this.validateRules(element.rules, element.name, getPluginRule);\n }\n }\n\n}\n","/**\n * @fileoverview Common helpers for naming of plugins, formatters and configs\n */\n\nconst NAMESPACE_REGEX = /^@.*\\//iu;\n\n/**\n * Brings package name to correct format based on prefix\n * @param {string} name The name of the package.\n * @param {string} prefix Can be either \"eslint-plugin\", \"eslint-config\" or \"eslint-formatter\"\n * @returns {string} Normalized name of the package\n * @private\n */\nfunction normalizePackageName(name, prefix) {\n let normalizedName = name;\n\n /**\n * On Windows, name can come in with Windows slashes instead of Unix slashes.\n * Normalize to Unix first to avoid errors later on.\n * https://github.com/eslint/eslint/issues/5644\n */\n if (normalizedName.includes(\"\\\\\")) {\n normalizedName = normalizedName.replace(/\\\\/gu, \"/\");\n }\n\n if (normalizedName.charAt(0) === \"@\") {\n\n /**\n * it's a scoped package\n * package name is the prefix, or just a username\n */\n const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, \"u\"),\n scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, \"u\");\n\n if (scopedPackageShortcutRegex.test(normalizedName)) {\n normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`);\n } else if (!scopedPackageNameRegex.test(normalizedName.split(\"/\")[1])) {\n\n /**\n * for scoped packages, insert the prefix after the first / unless\n * the path is already @scope/eslint or @scope/eslint-xxx-yyy\n */\n normalizedName = normalizedName.replace(/^@([^/]+)\\/(.*)$/u, `@$1/${prefix}-$2`);\n }\n } else if (!normalizedName.startsWith(`${prefix}-`)) {\n normalizedName = `${prefix}-${normalizedName}`;\n }\n\n return normalizedName;\n}\n\n/**\n * Removes the prefix from a fullname.\n * @param {string} fullname The term which may have the prefix.\n * @param {string} prefix The prefix to remove.\n * @returns {string} The term without prefix.\n */\nfunction getShorthandName(fullname, prefix) {\n if (fullname[0] === \"@\") {\n let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, \"u\").exec(fullname);\n\n if (matchResult) {\n return matchResult[1];\n }\n\n matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, \"u\").exec(fullname);\n if (matchResult) {\n return `${matchResult[1]}/${matchResult[2]}`;\n }\n } else if (fullname.startsWith(`${prefix}-`)) {\n return fullname.slice(prefix.length + 1);\n }\n\n return fullname;\n}\n\n/**\n * Gets the scope (namespace) of a term.\n * @param {string} term The term which may have the namespace.\n * @returns {string} The namespace of the term if it has one.\n */\nfunction getNamespaceFromTerm(term) {\n const match = term.match(NAMESPACE_REGEX);\n\n return match ? match[0] : \"\";\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n normalizePackageName,\n getShorthandName,\n getNamespaceFromTerm\n};\n","/**\n * @fileoverview Package exports for @eslint/eslintrc\n * @author Nicholas C. Zakas\n */\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport * as ConfigOps from \"./shared/config-ops.js\";\nimport ConfigValidator from \"./shared/config-validator.js\";\nimport * as naming from \"./shared/naming.js\";\nimport environments from \"../conf/environments.js\";\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\nconst Legacy = {\n environments,\n\n // shared\n ConfigOps,\n ConfigValidator,\n naming\n};\n\nexport {\n Legacy\n};\n"],"names":["path","Ajv","globals","util","BuiltInEnvironments","ConfigOps.normalizeConfigGlobal"],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC;AACtD,IAAI,aAAa,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,KAAK;AACxE,QAAQ,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AAC3B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK,EAAE,EAAE,CAAC;AACV,IAAI,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,eAAe,CAAC,UAAU,EAAE;AACrC,IAAI,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC;AACjF;AACA,IAAI,IAAI,aAAa,KAAK,CAAC,IAAI,aAAa,KAAK,CAAC,IAAI,aAAa,KAAK,CAAC,EAAE;AAC3E,QAAQ,OAAO,aAAa,CAAC;AAC7B,KAAK;AACL;AACA,IAAI,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;AAC3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M,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;AAClD,QAAQ,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACjD,KAAK;AACL;AACA,IAAI,OAAO,QAAQ,CAAC;AACpB,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,oBAAoB,CAAC,IAAI,EAAE;AACpC,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;AAC9C;AACA,IAAI,OAAO,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AACjC;;;;;;;;;ACrFA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACK,MAAC,MAAM,GAAG;AACf,IAAI,YAAY;AAChB;AACA;AACA,IAAI,SAAS;AACb,IAAI,eAAe;AACnB,IAAI,MAAM;AACV;;;;"} \ No newline at end of file diff --git a/slider/node_modules/@eslint/eslintrc/dist/eslintrc.cjs b/slider/node_modules/@eslint/eslintrc/dist/eslintrc.cjs new file mode 100644 index 0000000..1e7db98 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/dist/eslintrc.cjs @@ -0,0 +1,4456 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var debugOrig = require('debug'); +var fs = require('node:fs'); +var importFresh = require('import-fresh'); +var Module = require('node:module'); +var path = require('node:path'); +var stripComments = require('strip-json-comments'); +var assert = require('node:assert'); +var ignore = require('ignore'); +var util = require('node:util'); +var minimatch = require('minimatch'); +var Ajv = require('ajv'); +var globals = require('globals'); +var os = require('node:os'); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var debugOrig__default = /*#__PURE__*/_interopDefaultLegacy(debugOrig); +var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs); +var importFresh__default = /*#__PURE__*/_interopDefaultLegacy(importFresh); +var Module__default = /*#__PURE__*/_interopDefaultLegacy(Module); +var path__default = /*#__PURE__*/_interopDefaultLegacy(path); +var stripComments__default = /*#__PURE__*/_interopDefaultLegacy(stripComments); +var assert__default = /*#__PURE__*/_interopDefaultLegacy(assert); +var ignore__default = /*#__PURE__*/_interopDefaultLegacy(ignore); +var util__default = /*#__PURE__*/_interopDefaultLegacy(util); +var minimatch__default = /*#__PURE__*/_interopDefaultLegacy(minimatch); +var Ajv__default = /*#__PURE__*/_interopDefaultLegacy(Ajv); +var globals__default = /*#__PURE__*/_interopDefaultLegacy(globals); +var os__default = /*#__PURE__*/_interopDefaultLegacy(os); + +/** + * @fileoverview `IgnorePattern` class. + * + * `IgnorePattern` class has the set of glob patterns and the base path. + * + * It provides two static methods. + * + * - `IgnorePattern.createDefaultIgnore(cwd)` + * Create the default predicate function. + * - `IgnorePattern.createIgnore(ignorePatterns)` + * Create the predicate function from multiple `IgnorePattern` objects. + * + * It provides two properties and a method. + * + * - `patterns` + * The glob patterns that ignore to lint. + * - `basePath` + * The base path of the glob patterns. If absolute paths existed in the + * glob patterns, those are handled as relative paths to the base path. + * - `getPatternsRelativeTo(basePath)` + * Get `patterns` as modified for a given base path. It modifies the + * absolute paths in the patterns as prepending the difference of two base + * paths. + * + * `ConfigArrayFactory` creates `IgnorePattern` objects when it processes + * `ignorePatterns` properties. + * + * @author Toru Nagashima + */ + +const debug$3 = debugOrig__default["default"]("eslintrc:ignore-pattern"); + +/** @typedef {ReturnType} Ignore */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Get the path to the common ancestor directory of given paths. + * @param {string[]} sourcePaths The paths to calculate the common ancestor. + * @returns {string} The path to the common ancestor directory. + */ +function getCommonAncestorPath(sourcePaths) { + let result = sourcePaths[0]; + + for (let i = 1; i < sourcePaths.length; ++i) { + const a = result; + const b = sourcePaths[i]; + + // Set the shorter one (it's the common ancestor if one includes the other). + result = a.length < b.length ? a : b; + + // Set the common ancestor. + for (let j = 0, lastSepPos = 0; j < a.length && j < b.length; ++j) { + if (a[j] !== b[j]) { + result = a.slice(0, lastSepPos); + break; + } + if (a[j] === path__default["default"].sep) { + lastSepPos = j; + } + } + } + + let resolvedResult = result || path__default["default"].sep; + + // if Windows common ancestor is root of drive must have trailing slash to be absolute. + if (resolvedResult && resolvedResult.endsWith(":") && process.platform === "win32") { + resolvedResult += path__default["default"].sep; + } + return resolvedResult; +} + +/** + * Make relative path. + * @param {string} from The source path to get relative path. + * @param {string} to The destination path to get relative path. + * @returns {string} The relative path. + */ +function relative(from, to) { + const relPath = path__default["default"].relative(from, to); + + if (path__default["default"].sep === "/") { + return relPath; + } + return relPath.split(path__default["default"].sep).join("/"); +} + +/** + * Get the trailing slash if existed. + * @param {string} filePath The path to check. + * @returns {string} The trailing slash if existed. + */ +function dirSuffix(filePath) { + const isDir = ( + filePath.endsWith(path__default["default"].sep) || + (process.platform === "win32" && filePath.endsWith("/")) + ); + + return isDir ? "/" : ""; +} + +const DefaultPatterns = Object.freeze(["/**/node_modules/*"]); +const DotPatterns = Object.freeze([".*", "!.eslintrc.*", "!../"]); + +//------------------------------------------------------------------------------ +// Public +//------------------------------------------------------------------------------ + +/** + * Represents a set of glob patterns to ignore against a base path. + */ +class IgnorePattern { + + /** + * The default patterns. + * @type {string[]} + */ + static get DefaultPatterns() { + return DefaultPatterns; + } + + /** + * Create the default predicate function. + * @param {string} cwd The current working directory. + * @returns {((filePath:string, dot:boolean) => boolean) & {basePath:string; patterns:string[]}} + * The preficate function. + * The first argument is an absolute path that is checked. + * The second argument is the flag to not ignore dotfiles. + * If the predicate function returned `true`, it means the path should be ignored. + */ + static createDefaultIgnore(cwd) { + return this.createIgnore([new IgnorePattern(DefaultPatterns, cwd)]); + } + + /** + * Create the predicate function from multiple `IgnorePattern` objects. + * @param {IgnorePattern[]} ignorePatterns The list of ignore patterns. + * @returns {((filePath:string, dot?:boolean) => boolean) & {basePath:string; patterns:string[]}} + * The preficate function. + * The first argument is an absolute path that is checked. + * The second argument is the flag to not ignore dotfiles. + * If the predicate function returned `true`, it means the path should be ignored. + */ + static createIgnore(ignorePatterns) { + debug$3("Create with: %o", ignorePatterns); + + const basePath = getCommonAncestorPath(ignorePatterns.map(p => p.basePath)); + const patterns = ignorePatterns.flatMap(p => p.getPatternsRelativeTo(basePath)); + const ig = ignore__default["default"]({ allowRelativePaths: true }).add([...DotPatterns, ...patterns]); + const dotIg = ignore__default["default"]({ allowRelativePaths: true }).add(patterns); + + debug$3(" processed: %o", { basePath, patterns }); + + return Object.assign( + (filePath, dot = false) => { + assert__default["default"](path__default["default"].isAbsolute(filePath), "'filePath' should be an absolute path."); + const relPathRaw = relative(basePath, filePath); + const relPath = relPathRaw && (relPathRaw + dirSuffix(filePath)); + const adoptedIg = dot ? dotIg : ig; + const result = relPath !== "" && adoptedIg.ignores(relPath); + + debug$3("Check", { filePath, dot, relativePath: relPath, result }); + return result; + }, + { basePath, patterns } + ); + } + + /** + * Initialize a new `IgnorePattern` instance. + * @param {string[]} patterns The glob patterns that ignore to lint. + * @param {string} basePath The base path of `patterns`. + */ + constructor(patterns, basePath) { + assert__default["default"](path__default["default"].isAbsolute(basePath), "'basePath' should be an absolute path."); + + /** + * The glob patterns that ignore to lint. + * @type {string[]} + */ + this.patterns = patterns; + + /** + * The base path of `patterns`. + * @type {string} + */ + this.basePath = basePath; + + /** + * If `true` then patterns which don't start with `/` will match the paths to the outside of `basePath`. Defaults to `false`. + * + * It's set `true` for `.eslintignore`, `package.json`, and `--ignore-path` for backward compatibility. + * It's `false` as-is for `ignorePatterns` property in config files. + * @type {boolean} + */ + this.loose = false; + } + + /** + * Get `patterns` as modified for a given base path. It modifies the + * absolute paths in the patterns as prepending the difference of two base + * paths. + * @param {string} newBasePath The base path. + * @returns {string[]} Modifired patterns. + */ + getPatternsRelativeTo(newBasePath) { + assert__default["default"](path__default["default"].isAbsolute(newBasePath), "'newBasePath' should be an absolute path."); + const { basePath, loose, patterns } = this; + + if (newBasePath === basePath) { + return patterns; + } + const prefix = `/${relative(newBasePath, basePath)}`; + + return patterns.map(pattern => { + const negative = pattern.startsWith("!"); + const head = negative ? "!" : ""; + const body = negative ? pattern.slice(1) : pattern; + + if (body.startsWith("/") || body.startsWith("../")) { + return `${head}${prefix}${body}`; + } + return loose ? pattern : `${head}${prefix}/**/${body}`; + }); + } +} + +/** + * @fileoverview `ExtractedConfig` class. + * + * `ExtractedConfig` class expresses a final configuration for a specific file. + * + * It provides one method. + * + * - `toCompatibleObjectAsConfigFileContent()` + * Convert this configuration to the compatible object as the content of + * config files. It converts the loaded parser and plugins to strings. + * `CLIEngine#getConfigForFile(filePath)` method uses this method. + * + * `ConfigArray#extractConfig(filePath)` creates a `ExtractedConfig` instance. + * + * @author Toru Nagashima + */ + +// For VSCode intellisense +/** @typedef {import("../../shared/types").ConfigData} ConfigData */ +/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */ +/** @typedef {import("../../shared/types").SeverityConf} SeverityConf */ +/** @typedef {import("./config-dependency").DependentParser} DependentParser */ +/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */ + +/** + * Check if `xs` starts with `ys`. + * @template T + * @param {T[]} xs The array to check. + * @param {T[]} ys The array that may be the first part of `xs`. + * @returns {boolean} `true` if `xs` starts with `ys`. + */ +function startsWith(xs, ys) { + return xs.length >= ys.length && ys.every((y, i) => y === xs[i]); +} + +/** + * The class for extracted config data. + */ +class ExtractedConfig { + constructor() { + + /** + * The config name what `noInlineConfig` setting came from. + * @type {string} + */ + this.configNameOfNoInlineConfig = ""; + + /** + * Environments. + * @type {Record} + */ + this.env = {}; + + /** + * Global variables. + * @type {Record} + */ + this.globals = {}; + + /** + * The glob patterns that ignore to lint. + * @type {(((filePath:string, dot?:boolean) => boolean) & { basePath:string; patterns:string[] }) | undefined} + */ + this.ignores = void 0; + + /** + * The flag that disables directive comments. + * @type {boolean|undefined} + */ + this.noInlineConfig = void 0; + + /** + * Parser definition. + * @type {DependentParser|null} + */ + this.parser = null; + + /** + * Options for the parser. + * @type {Object} + */ + this.parserOptions = {}; + + /** + * Plugin definitions. + * @type {Record} + */ + this.plugins = {}; + + /** + * Processor ID. + * @type {string|null} + */ + this.processor = null; + + /** + * The flag that reports unused `eslint-disable` directive comments. + * @type {boolean|undefined} + */ + this.reportUnusedDisableDirectives = void 0; + + /** + * Rule settings. + * @type {Record} + */ + this.rules = {}; + + /** + * Shared settings. + * @type {Object} + */ + this.settings = {}; + } + + /** + * Convert this config to the compatible object as a config file content. + * @returns {ConfigData} The converted object. + */ + toCompatibleObjectAsConfigFileContent() { + const { + /* eslint-disable no-unused-vars -- needed to make `config` correct */ + configNameOfNoInlineConfig: _ignore1, + processor: _ignore2, + /* eslint-enable no-unused-vars -- needed to make `config` correct */ + ignores, + ...config + } = this; + + config.parser = config.parser && config.parser.filePath; + config.plugins = Object.keys(config.plugins).filter(Boolean).reverse(); + config.ignorePatterns = ignores ? ignores.patterns : []; + + // Strip the default patterns from `ignorePatterns`. + if (startsWith(config.ignorePatterns, IgnorePattern.DefaultPatterns)) { + config.ignorePatterns = + config.ignorePatterns.slice(IgnorePattern.DefaultPatterns.length); + } + + return config; + } +} + +/** + * @fileoverview `ConfigArray` class. + * + * `ConfigArray` class expresses the full of a configuration. It has the entry + * config file, base config files that were extended, loaded parsers, and loaded + * plugins. + * + * `ConfigArray` class provides three properties and two methods. + * + * - `pluginEnvironments` + * - `pluginProcessors` + * - `pluginRules` + * The `Map` objects that contain the members of all plugins that this + * config array contains. Those map objects don't have mutation methods. + * Those keys are the member ID such as `pluginId/memberName`. + * - `isRoot()` + * If `true` then this configuration has `root:true` property. + * - `extractConfig(filePath)` + * Extract the final configuration for a given file. This means merging + * every config array element which that `criteria` property matched. The + * `filePath` argument must be an absolute path. + * + * `ConfigArrayFactory` provides the loading logic of config files. + * + * @author Toru Nagashima + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +// Define types for VSCode IntelliSense. +/** @typedef {import("../../shared/types").Environment} Environment */ +/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */ +/** @typedef {import("../../shared/types").RuleConf} RuleConf */ +/** @typedef {import("../../shared/types").Rule} Rule */ +/** @typedef {import("../../shared/types").Plugin} Plugin */ +/** @typedef {import("../../shared/types").Processor} Processor */ +/** @typedef {import("./config-dependency").DependentParser} DependentParser */ +/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */ +/** @typedef {import("./override-tester")["OverrideTester"]} OverrideTester */ + +/** + * @typedef {Object} ConfigArrayElement + * @property {string} name The name of this config element. + * @property {string} filePath The path to the source file of this config element. + * @property {InstanceType|null} criteria The tester for the `files` and `excludedFiles` of this config element. + * @property {Record|undefined} env The environment settings. + * @property {Record|undefined} globals The global variable settings. + * @property {IgnorePattern|undefined} ignorePattern The ignore patterns. + * @property {boolean|undefined} noInlineConfig The flag that disables directive comments. + * @property {DependentParser|undefined} parser The parser loader. + * @property {Object|undefined} parserOptions The parser options. + * @property {Record|undefined} plugins The plugin loaders. + * @property {string|undefined} processor The processor name to refer plugin's processor. + * @property {boolean|undefined} reportUnusedDisableDirectives The flag to report unused `eslint-disable` comments. + * @property {boolean|undefined} root The flag to express root. + * @property {Record|undefined} rules The rule settings + * @property {Object|undefined} settings The shared settings. + * @property {"config" | "ignore" | "implicit-processor"} type The element type. + */ + +/** + * @typedef {Object} ConfigArrayInternalSlots + * @property {Map} cache The cache to extract configs. + * @property {ReadonlyMap|null} envMap The map from environment ID to environment definition. + * @property {ReadonlyMap|null} processorMap The map from processor ID to environment definition. + * @property {ReadonlyMap|null} ruleMap The map from rule ID to rule definition. + */ + +/** @type {WeakMap} */ +const internalSlotsMap$2 = new class extends WeakMap { + get(key) { + let value = super.get(key); + + if (!value) { + value = { + cache: new Map(), + envMap: null, + processorMap: null, + ruleMap: null + }; + super.set(key, value); + } + + return value; + } +}(); + +/** + * Get the indices which are matched to a given file. + * @param {ConfigArrayElement[]} elements The elements. + * @param {string} filePath The path to a target file. + * @returns {number[]} The indices. + */ +function getMatchedIndices(elements, filePath) { + const indices = []; + + for (let i = elements.length - 1; i >= 0; --i) { + const element = elements[i]; + + if (!element.criteria || (filePath && element.criteria.test(filePath))) { + indices.push(i); + } + } + + return indices; +} + +/** + * Check if a value is a non-null object. + * @param {any} x The value to check. + * @returns {boolean} `true` if the value is a non-null object. + */ +function isNonNullObject(x) { + return typeof x === "object" && x !== null; +} + +/** + * Merge two objects. + * + * Assign every property values of `y` to `x` if `x` doesn't have the property. + * If `x`'s property value is an object, it does recursive. + * @param {Object} target The destination to merge + * @param {Object|undefined} source The source to merge. + * @returns {void} + */ +function mergeWithoutOverwrite(target, source) { + if (!isNonNullObject(source)) { + return; + } + + for (const key of Object.keys(source)) { + if (key === "__proto__") { + continue; + } + + if (isNonNullObject(target[key])) { + mergeWithoutOverwrite(target[key], source[key]); + } else if (target[key] === void 0) { + if (isNonNullObject(source[key])) { + target[key] = Array.isArray(source[key]) ? [] : {}; + mergeWithoutOverwrite(target[key], source[key]); + } else if (source[key] !== void 0) { + target[key] = source[key]; + } + } + } +} + +/** + * The error for plugin conflicts. + */ +class PluginConflictError extends Error { + + /** + * Initialize this error object. + * @param {string} pluginId The plugin ID. + * @param {{filePath:string, importerName:string}[]} plugins The resolved plugins. + */ + constructor(pluginId, plugins) { + super(`Plugin "${pluginId}" was conflicted between ${plugins.map(p => `"${p.importerName}"`).join(" and ")}.`); + this.messageTemplate = "plugin-conflict"; + this.messageData = { pluginId, plugins }; + } +} + +/** + * Merge plugins. + * `target`'s definition is prior to `source`'s. + * @param {Record} target The destination to merge + * @param {Record|undefined} source The source to merge. + * @returns {void} + * @throws {PluginConflictError} When a plugin was conflicted. + */ +function mergePlugins(target, source) { + if (!isNonNullObject(source)) { + return; + } + + for (const key of Object.keys(source)) { + if (key === "__proto__") { + continue; + } + const targetValue = target[key]; + const sourceValue = source[key]; + + // Adopt the plugin which was found at first. + if (targetValue === void 0) { + if (sourceValue.error) { + throw sourceValue.error; + } + target[key] = sourceValue; + } else if (sourceValue.filePath !== targetValue.filePath) { + throw new PluginConflictError(key, [ + { + filePath: targetValue.filePath, + importerName: targetValue.importerName + }, + { + filePath: sourceValue.filePath, + importerName: sourceValue.importerName + } + ]); + } + } +} + +/** + * Merge rule configs. + * `target`'s definition is prior to `source`'s. + * @param {Record} target The destination to merge + * @param {Record|undefined} source The source to merge. + * @returns {void} + */ +function mergeRuleConfigs(target, source) { + if (!isNonNullObject(source)) { + return; + } + + for (const key of Object.keys(source)) { + if (key === "__proto__") { + continue; + } + const targetDef = target[key]; + const sourceDef = source[key]; + + // Adopt the rule config which was found at first. + if (targetDef === void 0) { + if (Array.isArray(sourceDef)) { + target[key] = [...sourceDef]; + } else { + target[key] = [sourceDef]; + } + + /* + * If the first found rule config is severity only and the current rule + * config has options, merge the severity and the options. + */ + } else if ( + targetDef.length === 1 && + Array.isArray(sourceDef) && + sourceDef.length >= 2 + ) { + targetDef.push(...sourceDef.slice(1)); + } + } +} + +/** + * Create the extracted config. + * @param {ConfigArray} instance The config elements. + * @param {number[]} indices The indices to use. + * @returns {ExtractedConfig} The extracted config. + * @throws {Error} When a plugin is conflicted. + */ +function createConfig(instance, indices) { + const config = new ExtractedConfig(); + const ignorePatterns = []; + + // Merge elements. + for (const index of indices) { + const element = instance[index]; + + // Adopt the parser which was found at first. + if (!config.parser && element.parser) { + if (element.parser.error) { + throw element.parser.error; + } + config.parser = element.parser; + } + + // Adopt the processor which was found at first. + if (!config.processor && element.processor) { + config.processor = element.processor; + } + + // Adopt the noInlineConfig which was found at first. + if (config.noInlineConfig === void 0 && element.noInlineConfig !== void 0) { + config.noInlineConfig = element.noInlineConfig; + config.configNameOfNoInlineConfig = element.name; + } + + // Adopt the reportUnusedDisableDirectives which was found at first. + if (config.reportUnusedDisableDirectives === void 0 && element.reportUnusedDisableDirectives !== void 0) { + config.reportUnusedDisableDirectives = element.reportUnusedDisableDirectives; + } + + // Collect ignorePatterns + if (element.ignorePattern) { + ignorePatterns.push(element.ignorePattern); + } + + // Merge others. + mergeWithoutOverwrite(config.env, element.env); + mergeWithoutOverwrite(config.globals, element.globals); + mergeWithoutOverwrite(config.parserOptions, element.parserOptions); + mergeWithoutOverwrite(config.settings, element.settings); + mergePlugins(config.plugins, element.plugins); + mergeRuleConfigs(config.rules, element.rules); + } + + // Create the predicate function for ignore patterns. + if (ignorePatterns.length > 0) { + config.ignores = IgnorePattern.createIgnore(ignorePatterns.reverse()); + } + + return config; +} + +/** + * Collect definitions. + * @template T, U + * @param {string} pluginId The plugin ID for prefix. + * @param {Record} defs The definitions to collect. + * @param {Map} map The map to output. + * @returns {void} + */ +function collect(pluginId, defs, map) { + if (defs) { + const prefix = pluginId && `${pluginId}/`; + + for (const [key, value] of Object.entries(defs)) { + map.set(`${prefix}${key}`, value); + } + } +} + +/** + * Delete the mutation methods from a given map. + * @param {Map} map The map object to delete. + * @returns {void} + */ +function deleteMutationMethods(map) { + Object.defineProperties(map, { + clear: { configurable: true, value: void 0 }, + delete: { configurable: true, value: void 0 }, + set: { configurable: true, value: void 0 } + }); +} + +/** + * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array. + * @param {ConfigArrayElement[]} elements The config elements. + * @param {ConfigArrayInternalSlots} slots The internal slots. + * @returns {void} + */ +function initPluginMemberMaps(elements, slots) { + const processed = new Set(); + + slots.envMap = new Map(); + slots.processorMap = new Map(); + slots.ruleMap = new Map(); + + for (const element of elements) { + if (!element.plugins) { + continue; + } + + for (const [pluginId, value] of Object.entries(element.plugins)) { + const plugin = value.definition; + + if (!plugin || processed.has(pluginId)) { + continue; + } + processed.add(pluginId); + + collect(pluginId, plugin.environments, slots.envMap); + collect(pluginId, plugin.processors, slots.processorMap); + collect(pluginId, plugin.rules, slots.ruleMap); + } + } + + deleteMutationMethods(slots.envMap); + deleteMutationMethods(slots.processorMap); + deleteMutationMethods(slots.ruleMap); +} + +/** + * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array. + * @param {ConfigArray} instance The config elements. + * @returns {ConfigArrayInternalSlots} The extracted config. + */ +function ensurePluginMemberMaps(instance) { + const slots = internalSlotsMap$2.get(instance); + + if (!slots.ruleMap) { + initPluginMemberMaps(instance, slots); + } + + return slots; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * The Config Array. + * + * `ConfigArray` instance contains all settings, parsers, and plugins. + * You need to call `ConfigArray#extractConfig(filePath)` method in order to + * extract, merge and get only the config data which is related to an arbitrary + * file. + * @extends {Array} + */ +class ConfigArray extends Array { + + /** + * Get the plugin environments. + * The returned map cannot be mutated. + * @type {ReadonlyMap} The plugin environments. + */ + get pluginEnvironments() { + return ensurePluginMemberMaps(this).envMap; + } + + /** + * Get the plugin processors. + * The returned map cannot be mutated. + * @type {ReadonlyMap} The plugin processors. + */ + get pluginProcessors() { + return ensurePluginMemberMaps(this).processorMap; + } + + /** + * Get the plugin rules. + * The returned map cannot be mutated. + * @returns {ReadonlyMap} The plugin rules. + */ + get pluginRules() { + return ensurePluginMemberMaps(this).ruleMap; + } + + /** + * Check if this config has `root` flag. + * @returns {boolean} `true` if this config array is root. + */ + isRoot() { + for (let i = this.length - 1; i >= 0; --i) { + const root = this[i].root; + + if (typeof root === "boolean") { + return root; + } + } + return false; + } + + /** + * Extract the config data which is related to a given file. + * @param {string} filePath The absolute path to the target file. + * @returns {ExtractedConfig} The extracted config data. + */ + extractConfig(filePath) { + const { cache } = internalSlotsMap$2.get(this); + const indices = getMatchedIndices(this, filePath); + const cacheKey = indices.join(","); + + if (!cache.has(cacheKey)) { + cache.set(cacheKey, createConfig(this, indices)); + } + + return cache.get(cacheKey); + } + + /** + * Check if a given path is an additional lint target. + * @param {string} filePath The absolute path to the target file. + * @returns {boolean} `true` if the file is an additional lint target. + */ + isAdditionalTargetPath(filePath) { + for (const { criteria, type } of this) { + if ( + type === "config" && + criteria && + !criteria.endsWithWildcard && + criteria.test(filePath) + ) { + return true; + } + } + return false; + } +} + +/** + * Get the used extracted configs. + * CLIEngine will use this method to collect used deprecated rules. + * @param {ConfigArray} instance The config array object to get. + * @returns {ExtractedConfig[]} The used extracted configs. + * @private + */ +function getUsedExtractedConfigs(instance) { + const { cache } = internalSlotsMap$2.get(instance); + + return Array.from(cache.values()); +} + +/** + * @fileoverview `ConfigDependency` class. + * + * `ConfigDependency` class expresses a loaded parser or plugin. + * + * If the parser or plugin was loaded successfully, it has `definition` property + * and `filePath` property. Otherwise, it has `error` property. + * + * When `JSON.stringify()` converted a `ConfigDependency` object to a JSON, it + * omits `definition` property. + * + * `ConfigArrayFactory` creates `ConfigDependency` objects when it loads parsers + * or plugins. + * + * @author Toru Nagashima + */ + +/** + * The class is to store parsers or plugins. + * This class hides the loaded object from `JSON.stringify()` and `console.log`. + * @template T + */ +class ConfigDependency { + + /** + * Initialize this instance. + * @param {Object} data The dependency data. + * @param {T} [data.definition] The dependency if the loading succeeded. + * @param {T} [data.original] The original, non-normalized dependency if the loading succeeded. + * @param {Error} [data.error] The error object if the loading failed. + * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded. + * @param {string} data.id The ID of this dependency. + * @param {string} data.importerName The name of the config file which loads this dependency. + * @param {string} data.importerPath The path to the config file which loads this dependency. + */ + constructor({ + definition = null, + original = null, + error = null, + filePath = null, + id, + importerName, + importerPath + }) { + + /** + * The loaded dependency if the loading succeeded. + * @type {T|null} + */ + this.definition = definition; + + /** + * The original dependency as loaded directly from disk if the loading succeeded. + * @type {T|null} + */ + this.original = original; + + /** + * The error object if the loading failed. + * @type {Error|null} + */ + this.error = error; + + /** + * The loaded dependency if the loading succeeded. + * @type {string|null} + */ + this.filePath = filePath; + + /** + * The ID of this dependency. + * @type {string} + */ + this.id = id; + + /** + * The name of the config file which loads this dependency. + * @type {string} + */ + this.importerName = importerName; + + /** + * The path to the config file which loads this dependency. + * @type {string} + */ + this.importerPath = importerPath; + } + + /** + * Converts this instance to a JSON compatible object. + * @returns {Object} a JSON compatible object. + */ + toJSON() { + const obj = this[util__default["default"].inspect.custom](); + + // Display `error.message` (`Error#message` is unenumerable). + if (obj.error instanceof Error) { + obj.error = { ...obj.error, message: obj.error.message }; + } + + return obj; + } + + /** + * Custom inspect method for Node.js `console.log()`. + * @returns {Object} an object to display by `console.log()`. + */ + [util__default["default"].inspect.custom]() { + const { + definition: _ignore1, // eslint-disable-line no-unused-vars -- needed to make `obj` correct + original: _ignore2, // eslint-disable-line no-unused-vars -- needed to make `obj` correct + ...obj + } = this; + + return obj; + } +} + +/** + * @fileoverview `OverrideTester` class. + * + * `OverrideTester` class handles `files` property and `excludedFiles` property + * of `overrides` config. + * + * It provides one method. + * + * - `test(filePath)` + * Test if a file path matches the pair of `files` property and + * `excludedFiles` property. The `filePath` argument must be an absolute + * path. + * + * `ConfigArrayFactory` creates `OverrideTester` objects when it processes + * `overrides` properties. + * + * @author Toru Nagashima + */ + +const { Minimatch } = minimatch__default["default"]; + +const minimatchOpts = { dot: true, matchBase: true }; + +/** + * @typedef {Object} Pattern + * @property {InstanceType[] | null} includes The positive matchers. + * @property {InstanceType[] | null} excludes The negative matchers. + */ + +/** + * Normalize a given pattern to an array. + * @param {string|string[]|undefined} patterns A glob pattern or an array of glob patterns. + * @returns {string[]|null} Normalized patterns. + * @private + */ +function normalizePatterns(patterns) { + if (Array.isArray(patterns)) { + return patterns.filter(Boolean); + } + if (typeof patterns === "string" && patterns) { + return [patterns]; + } + return []; +} + +/** + * Create the matchers of given patterns. + * @param {string[]} patterns The patterns. + * @returns {InstanceType[] | null} The matchers. + */ +function toMatcher(patterns) { + if (patterns.length === 0) { + return null; + } + return patterns.map(pattern => { + if (/^\.[/\\]/u.test(pattern)) { + return new Minimatch( + pattern.slice(2), + + // `./*.js` should not match with `subdir/foo.js` + { ...minimatchOpts, matchBase: false } + ); + } + return new Minimatch(pattern, minimatchOpts); + }); +} + +/** + * Convert a given matcher to string. + * @param {Pattern} matchers The matchers. + * @returns {string} The string expression of the matcher. + */ +function patternToJson({ includes, excludes }) { + return { + includes: includes && includes.map(m => m.pattern), + excludes: excludes && excludes.map(m => m.pattern) + }; +} + +/** + * The class to test given paths are matched by the patterns. + */ +class OverrideTester { + + /** + * Create a tester with given criteria. + * If there are no criteria, returns `null`. + * @param {string|string[]} files The glob patterns for included files. + * @param {string|string[]} excludedFiles The glob patterns for excluded files. + * @param {string} basePath The path to the base directory to test paths. + * @returns {OverrideTester|null} The created instance or `null`. + * @throws {Error} When invalid patterns are given. + */ + static create(files, excludedFiles, basePath) { + const includePatterns = normalizePatterns(files); + const excludePatterns = normalizePatterns(excludedFiles); + let endsWithWildcard = false; + + if (includePatterns.length === 0) { + return null; + } + + // Rejects absolute paths or relative paths to parents. + for (const pattern of includePatterns) { + if (path__default["default"].isAbsolute(pattern) || pattern.includes("..")) { + throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`); + } + if (pattern.endsWith("*")) { + endsWithWildcard = true; + } + } + for (const pattern of excludePatterns) { + if (path__default["default"].isAbsolute(pattern) || pattern.includes("..")) { + throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`); + } + } + + const includes = toMatcher(includePatterns); + const excludes = toMatcher(excludePatterns); + + return new OverrideTester( + [{ includes, excludes }], + basePath, + endsWithWildcard + ); + } + + /** + * Combine two testers by logical and. + * If either of the testers was `null`, returns the other tester. + * The `basePath` property of the two must be the same value. + * @param {OverrideTester|null} a A tester. + * @param {OverrideTester|null} b Another tester. + * @returns {OverrideTester|null} Combined tester. + */ + static and(a, b) { + if (!b) { + return a && new OverrideTester( + a.patterns, + a.basePath, + a.endsWithWildcard + ); + } + if (!a) { + return new OverrideTester( + b.patterns, + b.basePath, + b.endsWithWildcard + ); + } + + assert__default["default"].strictEqual(a.basePath, b.basePath); + return new OverrideTester( + a.patterns.concat(b.patterns), + a.basePath, + a.endsWithWildcard || b.endsWithWildcard + ); + } + + /** + * Initialize this instance. + * @param {Pattern[]} patterns The matchers. + * @param {string} basePath The base path. + * @param {boolean} endsWithWildcard If `true` then a pattern ends with `*`. + */ + constructor(patterns, basePath, endsWithWildcard = false) { + + /** @type {Pattern[]} */ + this.patterns = patterns; + + /** @type {string} */ + this.basePath = basePath; + + /** @type {boolean} */ + this.endsWithWildcard = endsWithWildcard; + } + + /** + * Test if a given path is matched or not. + * @param {string} filePath The absolute path to the target file. + * @returns {boolean} `true` if the path was matched. + * @throws {Error} When invalid `filePath` is given. + */ + test(filePath) { + if (typeof filePath !== "string" || !path__default["default"].isAbsolute(filePath)) { + throw new Error(`'filePath' should be an absolute path, but got ${filePath}.`); + } + const relativePath = path__default["default"].relative(this.basePath, filePath); + + return this.patterns.every(({ includes, excludes }) => ( + (!includes || includes.some(m => m.match(relativePath))) && + (!excludes || !excludes.some(m => m.match(relativePath))) + )); + } + + /** + * Converts this instance to a JSON compatible object. + * @returns {Object} a JSON compatible object. + */ + toJSON() { + if (this.patterns.length === 1) { + return { + ...patternToJson(this.patterns[0]), + basePath: this.basePath + }; + } + return { + AND: this.patterns.map(patternToJson), + basePath: this.basePath + }; + } + + /** + * Custom inspect method for Node.js `console.log()`. + * @returns {Object} an object to display by `console.log()`. + */ + [util__default["default"].inspect.custom]() { + return this.toJSON(); + } +} + +/** + * @fileoverview `ConfigArray` class. + * @author Toru Nagashima + */ + +/** + * @fileoverview Config file operations. This file must be usable in the browser, + * so no Node-specific code can be here. + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +const RULE_SEVERITY_STRINGS = ["off", "warn", "error"], + RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => { + map[value] = index; + return map; + }, {}), + VALID_SEVERITIES = new Set([0, 1, 2, "off", "warn", "error"]); + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Normalizes the severity value of a rule's configuration to a number + * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally + * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0), + * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array + * whose first element is one of the above values. Strings are matched case-insensitively. + * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0. + */ +function getRuleSeverity(ruleConfig) { + const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + + if (severityValue === 0 || severityValue === 1 || severityValue === 2) { + return severityValue; + } + + if (typeof severityValue === "string") { + return RULE_SEVERITY[severityValue.toLowerCase()] || 0; + } + + return 0; +} + +/** + * Converts old-style severity settings (0, 1, 2) into new-style + * severity settings (off, warn, error) for all rules. Assumption is that severity + * values have already been validated as correct. + * @param {Object} config The config object to normalize. + * @returns {void} + */ +function normalizeToStrings(config) { + + if (config.rules) { + Object.keys(config.rules).forEach(ruleId => { + const ruleConfig = config.rules[ruleId]; + + if (typeof ruleConfig === "number") { + config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0]; + } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") { + ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0]; + } + }); + } +} + +/** + * Determines if the severity for the given rule configuration represents an error. + * @param {int|string|Array} ruleConfig The configuration for an individual rule. + * @returns {boolean} True if the rule represents an error, false if not. + */ +function isErrorSeverity(ruleConfig) { + return getRuleSeverity(ruleConfig) === 2; +} + +/** + * Checks whether a given config has valid severity or not. + * @param {number|string|Array} ruleConfig The configuration for an individual rule. + * @returns {boolean} `true` if the configuration has valid severity. + */ +function isValidSeverity(ruleConfig) { + let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + + if (typeof severity === "string") { + severity = severity.toLowerCase(); + } + return VALID_SEVERITIES.has(severity); +} + +/** + * Checks whether every rule of a given config has valid severity or not. + * @param {Object} config The configuration for rules. + * @returns {boolean} `true` if the configuration has valid severity. + */ +function isEverySeverityValid(config) { + return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId])); +} + +/** + * Normalizes a value for a global in a config + * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in + * a global directive comment + * @returns {("readable"|"writeable"|"off")} The value normalized as a string + * @throws Error if global value is invalid + */ +function normalizeConfigGlobal(configuredValue) { + switch (configuredValue) { + case "off": + return "off"; + + case true: + case "true": + case "writeable": + case "writable": + return "writable"; + + case null: + case false: + case "false": + case "readable": + case "readonly": + return "readonly"; + + default: + throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`); + } +} + +var ConfigOps = { + __proto__: null, + getRuleSeverity: getRuleSeverity, + normalizeToStrings: normalizeToStrings, + isErrorSeverity: isErrorSeverity, + isValidSeverity: isValidSeverity, + isEverySeverityValid: isEverySeverityValid, + normalizeConfigGlobal: normalizeConfigGlobal +}; + +/** + * @fileoverview Provide the function that emits deprecation warnings. + * @author Toru Nagashima + */ + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +// Defitions for deprecation warnings. +const deprecationWarningMessages = { + ESLINT_LEGACY_ECMAFEATURES: + "The 'ecmaFeatures' config file property is deprecated and has no effect.", + ESLINT_PERSONAL_CONFIG_LOAD: + "'~/.eslintrc.*' config files have been deprecated. " + + "Please use a config file per project or the '--config' option.", + ESLINT_PERSONAL_CONFIG_SUPPRESS: + "'~/.eslintrc.*' config files have been deprecated. " + + "Please remove it or add 'root:true' to the config files in your " + + "projects in order to avoid loading '~/.eslintrc.*' accidentally." +}; + +const sourceFileErrorCache = new Set(); + +/** + * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted + * for each unique file path, but repeated invocations with the same file path have no effect. + * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active. + * @param {string} source The name of the configuration source to report the warning for. + * @param {string} errorCode The warning message to show. + * @returns {void} + */ +function emitDeprecationWarning(source, errorCode) { + const cacheKey = JSON.stringify({ source, errorCode }); + + if (sourceFileErrorCache.has(cacheKey)) { + return; + } + sourceFileErrorCache.add(cacheKey); + + const rel = path__default["default"].relative(process.cwd(), source); + const message = deprecationWarningMessages[errorCode]; + + process.emitWarning( + `${message} (found in "${rel}")`, + "DeprecationWarning", + errorCode + ); +} + +/** + * @fileoverview The instance of Ajv validator. + * @author Evgeny Poberezkin + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/* + * Copied from ajv/lib/refs/json-schema-draft-04.json + * The MIT License (MIT) + * Copyright (c) 2015-2017 Evgeny Poberezkin + */ +const metaSchema = { + id: "http://json-schema.org/draft-04/schema#", + $schema: "http://json-schema.org/draft-04/schema#", + description: "Core schema meta-schema", + definitions: { + schemaArray: { + type: "array", + minItems: 1, + items: { $ref: "#" } + }, + positiveInteger: { + type: "integer", + minimum: 0 + }, + positiveIntegerDefault0: { + allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }] + }, + simpleTypes: { + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + stringArray: { + type: "array", + items: { type: "string" }, + minItems: 1, + uniqueItems: true + } + }, + type: "object", + properties: { + id: { + type: "string" + }, + $schema: { + type: "string" + }, + title: { + type: "string" + }, + description: { + type: "string" + }, + default: { }, + multipleOf: { + type: "number", + minimum: 0, + exclusiveMinimum: true + }, + maximum: { + type: "number" + }, + exclusiveMaximum: { + type: "boolean", + default: false + }, + minimum: { + type: "number" + }, + exclusiveMinimum: { + type: "boolean", + default: false + }, + maxLength: { $ref: "#/definitions/positiveInteger" }, + minLength: { $ref: "#/definitions/positiveIntegerDefault0" }, + pattern: { + type: "string", + format: "regex" + }, + additionalItems: { + anyOf: [ + { type: "boolean" }, + { $ref: "#" } + ], + default: { } + }, + items: { + anyOf: [ + { $ref: "#" }, + { $ref: "#/definitions/schemaArray" } + ], + default: { } + }, + maxItems: { $ref: "#/definitions/positiveInteger" }, + minItems: { $ref: "#/definitions/positiveIntegerDefault0" }, + uniqueItems: { + type: "boolean", + default: false + }, + maxProperties: { $ref: "#/definitions/positiveInteger" }, + minProperties: { $ref: "#/definitions/positiveIntegerDefault0" }, + required: { $ref: "#/definitions/stringArray" }, + additionalProperties: { + anyOf: [ + { type: "boolean" }, + { $ref: "#" } + ], + default: { } + }, + definitions: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + properties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + patternProperties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + dependencies: { + type: "object", + additionalProperties: { + anyOf: [ + { $ref: "#" }, + { $ref: "#/definitions/stringArray" } + ] + } + }, + enum: { + type: "array", + minItems: 1, + uniqueItems: true + }, + type: { + anyOf: [ + { $ref: "#/definitions/simpleTypes" }, + { + type: "array", + items: { $ref: "#/definitions/simpleTypes" }, + minItems: 1, + uniqueItems: true + } + ] + }, + format: { type: "string" }, + allOf: { $ref: "#/definitions/schemaArray" }, + anyOf: { $ref: "#/definitions/schemaArray" }, + oneOf: { $ref: "#/definitions/schemaArray" }, + not: { $ref: "#" } + }, + dependencies: { + exclusiveMaximum: ["maximum"], + exclusiveMinimum: ["minimum"] + }, + default: { } +}; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +var ajvOrig = (additionalOptions = {}) => { + const ajv = new Ajv__default["default"]({ + meta: false, + useDefaults: true, + validateSchema: false, + missingRefs: "ignore", + verbose: true, + schemaId: "auto", + ...additionalOptions + }); + + ajv.addMetaSchema(metaSchema); + // eslint-disable-next-line no-underscore-dangle -- part of the API + ajv._opts.defaultMeta = metaSchema.id; + + return ajv; +}; + +/** + * @fileoverview Applies default rule options + * @author JoshuaKGoldberg + */ + +/** + * Check if the variable contains an object strictly rejecting arrays + * @param {unknown} value an object + * @returns {boolean} Whether value is an object + */ +function isObjectNotArray(value) { + return typeof value === "object" && value !== null && !Array.isArray(value); +} + +/** + * Deeply merges second on top of first, creating a new {} object if needed. + * @param {T} first Base, default value. + * @param {U} second User-specified value. + * @returns {T | U | (T & U)} Merged equivalent of second on top of first. + */ +function deepMergeObjects(first, second) { + if (second === void 0) { + return first; + } + + if (!isObjectNotArray(first) || !isObjectNotArray(second)) { + return second; + } + + const result = { ...first, ...second }; + + for (const key of Object.keys(second)) { + if (Object.prototype.propertyIsEnumerable.call(first, key)) { + result[key] = deepMergeObjects(first[key], second[key]); + } + } + + return result; +} + +/** + * Deeply merges second on top of first, creating a new [] array if needed. + * @param {T[] | undefined} first Base, default values. + * @param {U[] | undefined} second User-specified values. + * @returns {(T | U | (T & U))[]} Merged equivalent of second on top of first. + */ +function deepMergeArrays(first, second) { + if (!first || !second) { + return second || first || []; + } + + return [ + ...first.map((value, i) => deepMergeObjects(value, second[i])), + ...second.slice(first.length) + ]; +} + +/** + * @fileoverview Defines a schema for configs. + * @author Sylvan Mably + */ + +const baseConfigProperties = { + $schema: { type: "string" }, + env: { type: "object" }, + extends: { $ref: "#/definitions/stringOrStrings" }, + globals: { type: "object" }, + overrides: { + type: "array", + items: { $ref: "#/definitions/overrideConfig" }, + additionalItems: false + }, + parser: { type: ["string", "null"] }, + parserOptions: { type: "object" }, + plugins: { type: "array" }, + processor: { type: "string" }, + rules: { type: "object" }, + settings: { type: "object" }, + noInlineConfig: { type: "boolean" }, + reportUnusedDisableDirectives: { type: "boolean" }, + + ecmaFeatures: { type: "object" } // deprecated; logs a warning when used +}; + +const configSchema = { + definitions: { + stringOrStrings: { + oneOf: [ + { type: "string" }, + { + type: "array", + items: { type: "string" }, + additionalItems: false + } + ] + }, + stringOrStringsRequired: { + oneOf: [ + { type: "string" }, + { + type: "array", + items: { type: "string" }, + additionalItems: false, + minItems: 1 + } + ] + }, + + // Config at top-level. + objectConfig: { + type: "object", + properties: { + root: { type: "boolean" }, + ignorePatterns: { $ref: "#/definitions/stringOrStrings" }, + ...baseConfigProperties + }, + additionalProperties: false + }, + + // Config in `overrides`. + overrideConfig: { + type: "object", + properties: { + excludedFiles: { $ref: "#/definitions/stringOrStrings" }, + files: { $ref: "#/definitions/stringOrStringsRequired" }, + ...baseConfigProperties + }, + required: ["files"], + additionalProperties: false + } + }, + + $ref: "#/definitions/objectConfig" +}; + +/** + * @fileoverview Defines environment settings and globals. + * @author Elan Shanker + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Get the object that has difference. + * @param {Record} current The newer object. + * @param {Record} prev The older object. + * @returns {Record} The difference object. + */ +function getDiff(current, prev) { + const retv = {}; + + for (const [key, value] of Object.entries(current)) { + if (!Object.hasOwn(prev, key)) { + retv[key] = value; + } + } + + return retv; +} + +const newGlobals2015 = getDiff(globals__default["default"].es2015, globals__default["default"].es5); // 19 variables such as Promise, Map, ... +const newGlobals2017 = { + Atomics: false, + SharedArrayBuffer: false +}; +const newGlobals2020 = { + BigInt: false, + BigInt64Array: false, + BigUint64Array: false, + globalThis: false +}; + +const newGlobals2021 = { + AggregateError: false, + FinalizationRegistry: false, + WeakRef: false +}; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** @type {Map} */ +var environments = new Map(Object.entries({ + + // Language + builtin: { + globals: globals__default["default"].es5 + }, + es6: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 6 + } + }, + es2015: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 6 + } + }, + es2016: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 7 + } + }, + es2017: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 8 + } + }, + es2018: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 9 + } + }, + es2019: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 10 + } + }, + es2020: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 }, + parserOptions: { + ecmaVersion: 11 + } + }, + es2021: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 12 + } + }, + es2022: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 13 + } + }, + es2023: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 14 + } + }, + es2024: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 15 + } + }, + + // Platforms + browser: { + globals: globals__default["default"].browser + }, + node: { + globals: globals__default["default"].node, + parserOptions: { + ecmaFeatures: { + globalReturn: true + } + } + }, + "shared-node-browser": { + globals: globals__default["default"]["shared-node-browser"] + }, + worker: { + globals: globals__default["default"].worker + }, + serviceworker: { + globals: globals__default["default"].serviceworker + }, + + // Frameworks + commonjs: { + globals: globals__default["default"].commonjs, + parserOptions: { + ecmaFeatures: { + globalReturn: true + } + } + }, + amd: { + globals: globals__default["default"].amd + }, + mocha: { + globals: globals__default["default"].mocha + }, + jasmine: { + globals: globals__default["default"].jasmine + }, + jest: { + globals: globals__default["default"].jest + }, + phantomjs: { + globals: globals__default["default"].phantomjs + }, + jquery: { + globals: globals__default["default"].jquery + }, + qunit: { + globals: globals__default["default"].qunit + }, + prototypejs: { + globals: globals__default["default"].prototypejs + }, + shelljs: { + globals: globals__default["default"].shelljs + }, + meteor: { + globals: globals__default["default"].meteor + }, + mongo: { + globals: globals__default["default"].mongo + }, + protractor: { + globals: globals__default["default"].protractor + }, + applescript: { + globals: globals__default["default"].applescript + }, + nashorn: { + globals: globals__default["default"].nashorn + }, + atomtest: { + globals: globals__default["default"].atomtest + }, + embertest: { + globals: globals__default["default"].embertest + }, + webextensions: { + globals: globals__default["default"].webextensions + }, + greasemonkey: { + globals: globals__default["default"].greasemonkey + } +})); + +/** + * @fileoverview Validates configs. + * @author Brandon Mills + */ + +const ajv = ajvOrig(); + +const ruleValidators = new WeakMap(); +const noop = Function.prototype; + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ +let validateSchema; +const severityMap = { + error: 2, + warn: 1, + off: 0 +}; + +const validated = new WeakSet(); + +// JSON schema that disallows passing any options +const noOptionsSchema = Object.freeze({ + type: "array", + minItems: 0, + maxItems: 0 +}); + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * Validator for configuration objects. + */ +class ConfigValidator { + constructor({ builtInRules = new Map() } = {}) { + this.builtInRules = builtInRules; + } + + /** + * Gets a complete options schema for a rule. + * @param {Rule} rule A rule object + * @throws {TypeError} If `meta.schema` is specified but is not an array, object or `false`. + * @returns {Object|null} JSON Schema for the rule's options. + * `null` if rule wasn't passed or its `meta.schema` is `false`. + */ + getRuleOptionsSchema(rule) { + if (!rule) { + return null; + } + + if (!rule.meta) { + return { ...noOptionsSchema }; // default if `meta.schema` is not specified + } + + const schema = rule.meta.schema; + + if (typeof schema === "undefined") { + return { ...noOptionsSchema }; // default if `meta.schema` is not specified + } + + // `schema:false` is an allowed explicit opt-out of options validation for the rule + if (schema === false) { + return null; + } + + if (typeof schema !== "object" || schema === null) { + throw new TypeError("Rule's `meta.schema` must be an array or object"); + } + + // ESLint-specific array form needs to be converted into a valid JSON Schema definition + if (Array.isArray(schema)) { + if (schema.length) { + return { + type: "array", + items: schema, + minItems: 0, + maxItems: schema.length + }; + } + + // `schema:[]` is an explicit way to specify that the rule does not accept any options + return { ...noOptionsSchema }; + } + + // `schema:` is assumed to be a valid JSON Schema definition + return schema; + } + + /** + * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid. + * @param {options} options The given options for the rule. + * @returns {number|string} The rule's severity value + * @throws {Error} If the severity is invalid. + */ + validateRuleSeverity(options) { + const severity = Array.isArray(options) ? options[0] : options; + const normSeverity = typeof severity === "string" ? severityMap[severity.toLowerCase()] : severity; + + if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) { + return normSeverity; + } + + throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util__default["default"].inspect(severity).replace(/'/gu, "\"").replace(/\n/gu, "")}').\n`); + + } + + /** + * Validates the non-severity options passed to a rule, based on its schema. + * @param {{create: Function}} rule The rule to validate + * @param {Array} localOptions The options for the rule, excluding severity + * @returns {void} + * @throws {Error} If the options are invalid. + */ + validateRuleSchema(rule, localOptions) { + if (!ruleValidators.has(rule)) { + try { + const schema = this.getRuleOptionsSchema(rule); + + if (schema) { + ruleValidators.set(rule, ajv.compile(schema)); + } + } catch (err) { + const errorWithCode = new Error(err.message, { cause: err }); + + errorWithCode.code = "ESLINT_INVALID_RULE_OPTIONS_SCHEMA"; + + throw errorWithCode; + } + } + + const validateRule = ruleValidators.get(rule); + + if (validateRule) { + const mergedOptions = deepMergeArrays(rule.meta?.defaultOptions, localOptions); + + validateRule(mergedOptions); + + if (validateRule.errors) { + throw new Error(validateRule.errors.map( + error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n` + ).join("")); + } + } + } + + /** + * Validates a rule's options against its schema. + * @param {{create: Function}|null} rule The rule that the config is being validated for + * @param {string} ruleId The rule's unique name. + * @param {Array|number} options The given options for the rule. + * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined, + * no source is prepended to the message. + * @returns {void} + * @throws {Error} If the options are invalid. + */ + validateRuleOptions(rule, ruleId, options, source = null) { + try { + const severity = this.validateRuleSeverity(options); + + if (severity !== 0) { + this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []); + } + } catch (err) { + let enhancedMessage = err.code === "ESLINT_INVALID_RULE_OPTIONS_SCHEMA" + ? `Error while processing options validation schema of rule '${ruleId}': ${err.message}` + : `Configuration for rule "${ruleId}" is invalid:\n${err.message}`; + + if (typeof source === "string") { + enhancedMessage = `${source}:\n\t${enhancedMessage}`; + } + + const enhancedError = new Error(enhancedMessage, { cause: err }); + + if (err.code) { + enhancedError.code = err.code; + } + + throw enhancedError; + } + } + + /** + * Validates an environment object + * @param {Object} environment The environment config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {(envId:string) => Object} [getAdditionalEnv] A map from strings to loaded environments. + * @returns {void} + * @throws {Error} If the environment is invalid. + */ + validateEnvironment( + environment, + source, + getAdditionalEnv = noop + ) { + + // not having an environment is ok + if (!environment) { + return; + } + + Object.keys(environment).forEach(id => { + const env = getAdditionalEnv(id) || environments.get(id) || null; + + if (!env) { + const message = `${source}:\n\tEnvironment key "${id}" is unknown\n`; + + throw new Error(message); + } + }); + } + + /** + * Validates a rules config object + * @param {Object} rulesConfig The rules config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {(ruleId:string) => Object} getAdditionalRule A map from strings to loaded rules + * @returns {void} + */ + validateRules( + rulesConfig, + source, + getAdditionalRule = noop + ) { + if (!rulesConfig) { + return; + } + + Object.keys(rulesConfig).forEach(id => { + const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null; + + this.validateRuleOptions(rule, id, rulesConfig[id], source); + }); + } + + /** + * Validates a `globals` section of a config file + * @param {Object} globalsConfig The `globals` section + * @param {string|null} source The name of the configuration source to report in the event of an error. + * @returns {void} + */ + validateGlobals(globalsConfig, source = null) { + if (!globalsConfig) { + return; + } + + Object.entries(globalsConfig) + .forEach(([configuredGlobal, configuredValue]) => { + try { + normalizeConfigGlobal(configuredValue); + } catch (err) { + throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`); + } + }); + } + + /** + * Validate `processor` configuration. + * @param {string|undefined} processorName The processor name. + * @param {string} source The name of config file. + * @param {(id:string) => Processor} getProcessor The getter of defined processors. + * @returns {void} + * @throws {Error} If the processor is invalid. + */ + validateProcessor(processorName, source, getProcessor) { + if (processorName && !getProcessor(processorName)) { + throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`); + } + } + + /** + * Formats an array of schema validation errors. + * @param {Array} errors An array of error messages to format. + * @returns {string} Formatted error message + */ + formatErrors(errors) { + return errors.map(error => { + if (error.keyword === "additionalProperties") { + const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty; + + return `Unexpected top-level property "${formattedPropertyPath}"`; + } + if (error.keyword === "type") { + const formattedField = error.dataPath.slice(1); + const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join("/") : error.schema; + const formattedValue = JSON.stringify(error.data); + + return `Property "${formattedField}" is the wrong type (expected ${formattedExpectedType} but got \`${formattedValue}\`)`; + } + + const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath; + + return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`; + }).map(message => `\t- ${message}.\n`).join(""); + } + + /** + * Validates the top level properties of the config object. + * @param {Object} config The config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @returns {void} + * @throws {Error} If the config is invalid. + */ + validateConfigSchema(config, source = null) { + validateSchema = validateSchema || ajv.compile(configSchema); + + if (!validateSchema(config)) { + throw new Error(`ESLint configuration in ${source} is invalid:\n${this.formatErrors(validateSchema.errors)}`); + } + + if (Object.hasOwn(config, "ecmaFeatures")) { + emitDeprecationWarning(source, "ESLINT_LEGACY_ECMAFEATURES"); + } + } + + /** + * Validates an entire config object. + * @param {Object} config The config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {(ruleId:string) => Object} [getAdditionalRule] A map from strings to loaded rules. + * @param {(envId:string) => Object} [getAdditionalEnv] A map from strings to loaded envs. + * @returns {void} + */ + validate(config, source, getAdditionalRule, getAdditionalEnv) { + this.validateConfigSchema(config, source); + this.validateRules(config.rules, source, getAdditionalRule); + this.validateEnvironment(config.env, source, getAdditionalEnv); + this.validateGlobals(config.globals, source); + + for (const override of config.overrides || []) { + this.validateRules(override.rules, source, getAdditionalRule); + this.validateEnvironment(override.env, source, getAdditionalEnv); + this.validateGlobals(config.globals, source); + } + } + + /** + * Validate config array object. + * @param {ConfigArray} configArray The config array to validate. + * @returns {void} + */ + validateConfigArray(configArray) { + const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments); + const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors); + const getPluginRule = Map.prototype.get.bind(configArray.pluginRules); + + // Validate. + for (const element of configArray) { + if (validated.has(element)) { + continue; + } + validated.add(element); + + this.validateEnvironment(element.env, element.name, getPluginEnv); + this.validateGlobals(element.globals, element.name); + this.validateProcessor(element.processor, element.name, getPluginProcessor); + this.validateRules(element.rules, element.name, getPluginRule); + } + } + +} + +/** + * @fileoverview Common helpers for naming of plugins, formatters and configs + */ + +const NAMESPACE_REGEX = /^@.*\//iu; + +/** + * Brings package name to correct format based on prefix + * @param {string} name The name of the package. + * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter" + * @returns {string} Normalized name of the package + * @private + */ +function normalizePackageName(name, prefix) { + let normalizedName = name; + + /** + * On Windows, name can come in with Windows slashes instead of Unix slashes. + * Normalize to Unix first to avoid errors later on. + * https://github.com/eslint/eslint/issues/5644 + */ + if (normalizedName.includes("\\")) { + normalizedName = normalizedName.replace(/\\/gu, "/"); + } + + if (normalizedName.charAt(0) === "@") { + + /** + * it's a scoped package + * package name is the prefix, or just a username + */ + const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, "u"), + scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, "u"); + + if (scopedPackageShortcutRegex.test(normalizedName)) { + normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`); + } else if (!scopedPackageNameRegex.test(normalizedName.split("/")[1])) { + + /** + * for scoped packages, insert the prefix after the first / unless + * the path is already @scope/eslint or @scope/eslint-xxx-yyy + */ + normalizedName = normalizedName.replace(/^@([^/]+)\/(.*)$/u, `@$1/${prefix}-$2`); + } + } else if (!normalizedName.startsWith(`${prefix}-`)) { + normalizedName = `${prefix}-${normalizedName}`; + } + + return normalizedName; +} + +/** + * Removes the prefix from a fullname. + * @param {string} fullname The term which may have the prefix. + * @param {string} prefix The prefix to remove. + * @returns {string} The term without prefix. + */ +function getShorthandName(fullname, prefix) { + if (fullname[0] === "@") { + let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(fullname); + + if (matchResult) { + return matchResult[1]; + } + + matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec(fullname); + if (matchResult) { + return `${matchResult[1]}/${matchResult[2]}`; + } + } else if (fullname.startsWith(`${prefix}-`)) { + return fullname.slice(prefix.length + 1); + } + + return fullname; +} + +/** + * Gets the scope (namespace) of a term. + * @param {string} term The term which may have the namespace. + * @returns {string} The namespace of the term if it has one. + */ +function getNamespaceFromTerm(term) { + const match = term.match(NAMESPACE_REGEX); + + return match ? match[0] : ""; +} + +var naming = { + __proto__: null, + normalizePackageName: normalizePackageName, + getShorthandName: getShorthandName, + getNamespaceFromTerm: getNamespaceFromTerm +}; + +/** + * Utility for resolving a module relative to another module + * @author Teddy Katz + */ + +/* + * `Module.createRequire` is added in v12.2.0. It supports URL as well. + * We only support the case where the argument is a filepath, not a URL. + */ +const createRequire = Module__default["default"].createRequire; + +/** + * Resolves a Node module relative to another module + * @param {string} moduleName The name of a Node module, or a path to a Node module. + * @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be + * a file rather than a directory, but the file need not actually exist. + * @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath` + * @throws {Error} When the module cannot be resolved. + */ +function resolve(moduleName, relativeToPath) { + try { + return createRequire(relativeToPath).resolve(moduleName); + } catch (error) { + + // This `if` block is for older Node.js than 12.0.0. We can remove this block in the future. + if ( + typeof error === "object" && + error !== null && + error.code === "MODULE_NOT_FOUND" && + !error.requireStack && + error.message.includes(moduleName) + ) { + error.message += `\nRequire stack:\n- ${relativeToPath}`; + } + throw error; + } +} + +var ModuleResolver = { + __proto__: null, + resolve: resolve +}; + +/** + * @fileoverview The factory of `ConfigArray` objects. + * + * This class provides methods to create `ConfigArray` instance. + * + * - `create(configData, options)` + * Create a `ConfigArray` instance from a config data. This is to handle CLI + * options except `--config`. + * - `loadFile(filePath, options)` + * Create a `ConfigArray` instance from a config file. This is to handle + * `--config` option. If the file was not found, throws the following error: + * - If the filename was `*.js`, a `MODULE_NOT_FOUND` error. + * - If the filename was `package.json`, an IO error or an + * `ESLINT_CONFIG_FIELD_NOT_FOUND` error. + * - Otherwise, an IO error such as `ENOENT`. + * - `loadInDirectory(directoryPath, options)` + * Create a `ConfigArray` instance from a config file which is on a given + * directory. This tries to load `.eslintrc.*` or `package.json`. If not + * found, returns an empty `ConfigArray`. + * - `loadESLintIgnore(filePath)` + * Create a `ConfigArray` instance from a config file that is `.eslintignore` + * format. This is to handle `--ignore-path` option. + * - `loadDefaultESLintIgnore()` + * Create a `ConfigArray` instance from `.eslintignore` or `package.json` in + * the current working directory. + * + * `ConfigArrayFactory` class has the responsibility that loads configuration + * files, including loading `extends`, `parser`, and `plugins`. The created + * `ConfigArray` instance has the loaded `extends`, `parser`, and `plugins`. + * + * But this class doesn't handle cascading. `CascadingConfigArrayFactory` class + * handles cascading and hierarchy. + * + * @author Toru Nagashima + */ + +const require$1 = Module.createRequire(require('url').pathToFileURL(__filename).toString()); + +const debug$2 = debugOrig__default["default"]("eslintrc:config-array-factory"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const configFilenames = [ + ".eslintrc.js", + ".eslintrc.cjs", + ".eslintrc.yaml", + ".eslintrc.yml", + ".eslintrc.json", + ".eslintrc", + "package.json" +]; + +// Define types for VSCode IntelliSense. +/** @typedef {import("./shared/types").ConfigData} ConfigData */ +/** @typedef {import("./shared/types").OverrideConfigData} OverrideConfigData */ +/** @typedef {import("./shared/types").Parser} Parser */ +/** @typedef {import("./shared/types").Plugin} Plugin */ +/** @typedef {import("./shared/types").Rule} Rule */ +/** @typedef {import("./config-array/config-dependency").DependentParser} DependentParser */ +/** @typedef {import("./config-array/config-dependency").DependentPlugin} DependentPlugin */ +/** @typedef {ConfigArray[0]} ConfigArrayElement */ + +/** + * @typedef {Object} ConfigArrayFactoryOptions + * @property {Map} [additionalPluginPool] The map for additional plugins. + * @property {string} [cwd] The path to the current working directory. + * @property {string} [resolvePluginsRelativeTo] A path to the directory that plugins should be resolved from. Defaults to `cwd`. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. + */ + +/** + * @typedef {Object} ConfigArrayFactoryInternalSlots + * @property {Map} additionalPluginPool The map for additional plugins. + * @property {string} cwd The path to the current working directory. + * @property {string | undefined} resolvePluginsRelativeTo An absolute path the the directory that plugins should be resolved from. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. + */ + +/** + * @typedef {Object} ConfigArrayFactoryLoadingContext + * @property {string} filePath The path to the current configuration. + * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @property {string} name The name of the current configuration. + * @property {string} pluginBasePath The base path to resolve plugins. + * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors. + */ + +/** + * @typedef {Object} ConfigArrayFactoryLoadingContext + * @property {string} filePath The path to the current configuration. + * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @property {string} name The name of the current configuration. + * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors. + */ + +/** @type {WeakMap} */ +const internalSlotsMap$1 = new WeakMap(); + +/** @type {WeakMap} */ +const normalizedPlugins = new WeakMap(); + +/** + * Check if a given string is a file path. + * @param {string} nameOrPath A module name or file path. + * @returns {boolean} `true` if the `nameOrPath` is a file path. + */ +function isFilePath(nameOrPath) { + return ( + /^\.{1,2}[/\\]/u.test(nameOrPath) || + path__default["default"].isAbsolute(nameOrPath) + ); +} + +/** + * Convenience wrapper for synchronously reading file contents. + * @param {string} filePath The filename to read. + * @returns {string} The file contents, with the BOM removed. + * @private + */ +function readFile(filePath) { + return fs__default["default"].readFileSync(filePath, "utf8").replace(/^\ufeff/u, ""); +} + +/** + * Loads a YAML configuration from a file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadYAMLConfigFile(filePath) { + debug$2(`Loading YAML config file: ${filePath}`); + + // lazy load YAML to improve performance when not used + const yaml = require$1("js-yaml"); + + try { + + // empty YAML file can be null, so always use + return yaml.load(readFile(filePath)) || {}; + } catch (e) { + debug$2(`Error reading YAML file: ${filePath}`); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Loads a JSON configuration from a file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadJSONConfigFile(filePath) { + debug$2(`Loading JSON config file: ${filePath}`); + + try { + return JSON.parse(stripComments__default["default"](readFile(filePath))); + } catch (e) { + debug$2(`Error reading JSON file: ${filePath}`); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + e.messageTemplate = "failed-to-read-json"; + e.messageData = { + path: filePath, + message: e.message + }; + throw e; + } +} + +/** + * Loads a legacy (.eslintrc) configuration from a file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadLegacyConfigFile(filePath) { + debug$2(`Loading legacy config file: ${filePath}`); + + // lazy load YAML to improve performance when not used + const yaml = require$1("js-yaml"); + + try { + return yaml.load(stripComments__default["default"](readFile(filePath))) || /* istanbul ignore next */ {}; + } catch (e) { + debug$2("Error reading YAML file: %s\n%o", filePath, e); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Loads a JavaScript configuration from a file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadJSConfigFile(filePath) { + debug$2(`Loading JS config file: ${filePath}`); + try { + return importFresh__default["default"](filePath); + } catch (e) { + debug$2(`Error reading JavaScript file: ${filePath}`); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Loads a configuration from a package.json file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadPackageJSONConfigFile(filePath) { + debug$2(`Loading package.json config file: ${filePath}`); + try { + const packageData = loadJSONConfigFile(filePath); + + if (!Object.hasOwn(packageData, "eslintConfig")) { + throw Object.assign( + new Error("package.json file doesn't have 'eslintConfig' field."), + { code: "ESLINT_CONFIG_FIELD_NOT_FOUND" } + ); + } + + return packageData.eslintConfig; + } catch (e) { + debug$2(`Error reading package.json file: ${filePath}`); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Loads a `.eslintignore` from a file. + * @param {string} filePath The filename to load. + * @returns {string[]} The ignore patterns from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadESLintIgnoreFile(filePath) { + debug$2(`Loading .eslintignore file: ${filePath}`); + + try { + return readFile(filePath) + .split(/\r?\n/gu) + .filter(line => line.trim() !== "" && !line.startsWith("#")); + } catch (e) { + debug$2(`Error reading .eslintignore file: ${filePath}`); + e.message = `Cannot read .eslintignore file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Creates an error to notify about a missing config to extend from. + * @param {string} configName The name of the missing config. + * @param {string} importerName The name of the config that imported the missing config + * @param {string} messageTemplate The text template to source error strings from. + * @returns {Error} The error object to throw + * @private + */ +function configInvalidError(configName, importerName, messageTemplate) { + return Object.assign( + new Error(`Failed to load config "${configName}" to extend from.`), + { + messageTemplate, + messageData: { configName, importerName } + } + ); +} + +/** + * Loads a configuration file regardless of the source. Inspects the file path + * to determine the correctly way to load the config file. + * @param {string} filePath The path to the configuration. + * @returns {ConfigData|null} The configuration information. + * @private + */ +function loadConfigFile(filePath) { + switch (path__default["default"].extname(filePath)) { + case ".js": + case ".cjs": + return loadJSConfigFile(filePath); + + case ".json": + if (path__default["default"].basename(filePath) === "package.json") { + return loadPackageJSONConfigFile(filePath); + } + return loadJSONConfigFile(filePath); + + case ".yaml": + case ".yml": + return loadYAMLConfigFile(filePath); + + default: + return loadLegacyConfigFile(filePath); + } +} + +/** + * Write debug log. + * @param {string} request The requested module name. + * @param {string} relativeTo The file path to resolve the request relative to. + * @param {string} filePath The resolved file path. + * @returns {void} + */ +function writeDebugLogForLoading(request, relativeTo, filePath) { + /* istanbul ignore next */ + if (debug$2.enabled) { + let nameAndVersion = null; // eslint-disable-line no-useless-assignment -- known bug in the rule + + try { + const packageJsonPath = resolve( + `${request}/package.json`, + relativeTo + ); + const { version = "unknown" } = require$1(packageJsonPath); + + nameAndVersion = `${request}@${version}`; + } catch (error) { + debug$2("package.json was not found:", error.message); + nameAndVersion = request; + } + + debug$2("Loaded: %s (%s)", nameAndVersion, filePath); + } +} + +/** + * Create a new context with default values. + * @param {ConfigArrayFactoryInternalSlots} slots The internal slots. + * @param {"config" | "ignore" | "implicit-processor" | undefined} providedType The type of the current configuration. Default is `"config"`. + * @param {string | undefined} providedName The name of the current configuration. Default is the relative path from `cwd` to `filePath`. + * @param {string | undefined} providedFilePath The path to the current configuration. Default is empty string. + * @param {string | undefined} providedMatchBasePath The type of the current configuration. Default is the directory of `filePath` or `cwd`. + * @returns {ConfigArrayFactoryLoadingContext} The created context. + */ +function createContext( + { cwd, resolvePluginsRelativeTo }, + providedType, + providedName, + providedFilePath, + providedMatchBasePath +) { + const filePath = providedFilePath + ? path__default["default"].resolve(cwd, providedFilePath) + : ""; + const matchBasePath = + (providedMatchBasePath && path__default["default"].resolve(cwd, providedMatchBasePath)) || + (filePath && path__default["default"].dirname(filePath)) || + cwd; + const name = + providedName || + (filePath && path__default["default"].relative(cwd, filePath)) || + ""; + const pluginBasePath = + resolvePluginsRelativeTo || + (filePath && path__default["default"].dirname(filePath)) || + cwd; + const type = providedType || "config"; + + return { filePath, matchBasePath, name, pluginBasePath, type }; +} + +/** + * Normalize a given plugin. + * - Ensure the object to have four properties: configs, environments, processors, and rules. + * - Ensure the object to not have other properties. + * @param {Plugin} plugin The plugin to normalize. + * @returns {Plugin} The normalized plugin. + */ +function normalizePlugin(plugin) { + + // first check the cache + let normalizedPlugin = normalizedPlugins.get(plugin); + + if (normalizedPlugin) { + return normalizedPlugin; + } + + normalizedPlugin = { + configs: plugin.configs || {}, + environments: plugin.environments || {}, + processors: plugin.processors || {}, + rules: plugin.rules || {} + }; + + // save the reference for later + normalizedPlugins.set(plugin, normalizedPlugin); + + return normalizedPlugin; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * The factory of `ConfigArray` objects. + */ +class ConfigArrayFactory { + + /** + * Initialize this instance. + * @param {ConfigArrayFactoryOptions} [options] The map for additional plugins. + */ + constructor({ + additionalPluginPool = new Map(), + cwd = process.cwd(), + resolvePluginsRelativeTo, + builtInRules, + resolver = ModuleResolver, + eslintAllPath, + getEslintAllConfig, + eslintRecommendedPath, + getEslintRecommendedConfig + } = {}) { + internalSlotsMap$1.set(this, { + additionalPluginPool, + cwd, + resolvePluginsRelativeTo: + resolvePluginsRelativeTo && + path__default["default"].resolve(cwd, resolvePluginsRelativeTo), + builtInRules, + resolver, + eslintAllPath, + getEslintAllConfig, + eslintRecommendedPath, + getEslintRecommendedConfig + }); + } + + /** + * Create `ConfigArray` instance from a config data. + * @param {ConfigData|null} configData The config data to create. + * @param {Object} [options] The options. + * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @param {string} [options.filePath] The path to this config data. + * @param {string} [options.name] The config name. + * @returns {ConfigArray} Loaded config. + */ + create(configData, { basePath, filePath, name } = {}) { + if (!configData) { + return new ConfigArray(); + } + + const slots = internalSlotsMap$1.get(this); + const ctx = createContext(slots, "config", name, filePath, basePath); + const elements = this._normalizeConfigData(configData, ctx); + + return new ConfigArray(...elements); + } + + /** + * Load a config file. + * @param {string} filePath The path to a config file. + * @param {Object} [options] The options. + * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @param {string} [options.name] The config name. + * @returns {ConfigArray} Loaded config. + */ + loadFile(filePath, { basePath, name } = {}) { + const slots = internalSlotsMap$1.get(this); + const ctx = createContext(slots, "config", name, filePath, basePath); + + return new ConfigArray(...this._loadConfigData(ctx)); + } + + /** + * Load the config file on a given directory if exists. + * @param {string} directoryPath The path to a directory. + * @param {Object} [options] The options. + * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @param {string} [options.name] The config name. + * @throws {Error} If the config file is invalid. + * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist. + */ + loadInDirectory(directoryPath, { basePath, name } = {}) { + const slots = internalSlotsMap$1.get(this); + + for (const filename of configFilenames) { + const ctx = createContext( + slots, + "config", + name, + path__default["default"].join(directoryPath, filename), + basePath + ); + + if (fs__default["default"].existsSync(ctx.filePath) && fs__default["default"].statSync(ctx.filePath).isFile()) { + let configData; + + try { + configData = loadConfigFile(ctx.filePath); + } catch (error) { + if (!error || error.code !== "ESLINT_CONFIG_FIELD_NOT_FOUND") { + throw error; + } + } + + if (configData) { + debug$2(`Config file found: ${ctx.filePath}`); + return new ConfigArray( + ...this._normalizeConfigData(configData, ctx) + ); + } + } + } + + debug$2(`Config file not found on ${directoryPath}`); + return new ConfigArray(); + } + + /** + * Check if a config file on a given directory exists or not. + * @param {string} directoryPath The path to a directory. + * @returns {string | null} The path to the found config file. If not found then null. + */ + static getPathToConfigFileInDirectory(directoryPath) { + for (const filename of configFilenames) { + const filePath = path__default["default"].join(directoryPath, filename); + + if (fs__default["default"].existsSync(filePath)) { + if (filename === "package.json") { + try { + loadPackageJSONConfigFile(filePath); + return filePath; + } catch { /* ignore */ } + } else { + return filePath; + } + } + } + return null; + } + + /** + * Load `.eslintignore` file. + * @param {string} filePath The path to a `.eslintignore` file to load. + * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist. + */ + loadESLintIgnore(filePath) { + const slots = internalSlotsMap$1.get(this); + const ctx = createContext( + slots, + "ignore", + void 0, + filePath, + slots.cwd + ); + const ignorePatterns = loadESLintIgnoreFile(ctx.filePath); + + return new ConfigArray( + ...this._normalizeESLintIgnoreData(ignorePatterns, ctx) + ); + } + + /** + * Load `.eslintignore` file in the current working directory. + * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist. + * @throws {Error} If the ignore file is invalid. + */ + loadDefaultESLintIgnore() { + const slots = internalSlotsMap$1.get(this); + const eslintIgnorePath = path__default["default"].resolve(slots.cwd, ".eslintignore"); + const packageJsonPath = path__default["default"].resolve(slots.cwd, "package.json"); + + if (fs__default["default"].existsSync(eslintIgnorePath)) { + return this.loadESLintIgnore(eslintIgnorePath); + } + if (fs__default["default"].existsSync(packageJsonPath)) { + const data = loadJSONConfigFile(packageJsonPath); + + if (Object.hasOwn(data, "eslintIgnore")) { + if (!Array.isArray(data.eslintIgnore)) { + throw new Error("Package.json eslintIgnore property requires an array of paths"); + } + const ctx = createContext( + slots, + "ignore", + "eslintIgnore in package.json", + packageJsonPath, + slots.cwd + ); + + return new ConfigArray( + ...this._normalizeESLintIgnoreData(data.eslintIgnore, ctx) + ); + } + } + + return new ConfigArray(); + } + + /** + * Load a given config file. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} Loaded config. + * @private + */ + _loadConfigData(ctx) { + return this._normalizeConfigData(loadConfigFile(ctx.filePath), ctx); + } + + /** + * Normalize a given `.eslintignore` data to config array elements. + * @param {string[]} ignorePatterns The patterns to ignore files. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + *_normalizeESLintIgnoreData(ignorePatterns, ctx) { + const elements = this._normalizeObjectConfigData( + { ignorePatterns }, + ctx + ); + + // Set `ignorePattern.loose` flag for backward compatibility. + for (const element of elements) { + if (element.ignorePattern) { + element.ignorePattern.loose = true; + } + yield element; + } + } + + /** + * Normalize a given config to an array. + * @param {ConfigData} configData The config data to normalize. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + _normalizeConfigData(configData, ctx) { + const validator = new ConfigValidator(); + + validator.validateConfigSchema(configData, ctx.name || ctx.filePath); + return this._normalizeObjectConfigData(configData, ctx); + } + + /** + * Normalize a given config to an array. + * @param {ConfigData|OverrideConfigData} configData The config data to normalize. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + *_normalizeObjectConfigData(configData, ctx) { + const { files, excludedFiles, ...configBody } = configData; + const criteria = OverrideTester.create( + files, + excludedFiles, + ctx.matchBasePath + ); + const elements = this._normalizeObjectConfigDataBody(configBody, ctx); + + // Apply the criteria to every element. + for (const element of elements) { + + /* + * Merge the criteria. + * This is for the `overrides` entries that came from the + * configurations of `overrides[].extends`. + */ + element.criteria = OverrideTester.and(criteria, element.criteria); + + /* + * Remove `root` property to ignore `root` settings which came from + * `extends` in `overrides`. + */ + if (element.criteria) { + element.root = void 0; + } + + yield element; + } + } + + /** + * Normalize a given config to an array. + * @param {ConfigData} configData The config data to normalize. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + *_normalizeObjectConfigDataBody( + { + env, + extends: extend, + globals, + ignorePatterns, + noInlineConfig, + parser: parserName, + parserOptions, + plugins: pluginList, + processor, + reportUnusedDisableDirectives, + root, + rules, + settings, + overrides: overrideList = [] + }, + ctx + ) { + const extendList = Array.isArray(extend) ? extend : [extend]; + const ignorePattern = ignorePatterns && new IgnorePattern( + Array.isArray(ignorePatterns) ? ignorePatterns : [ignorePatterns], + ctx.matchBasePath + ); + + // Flatten `extends`. + for (const extendName of extendList.filter(Boolean)) { + yield* this._loadExtends(extendName, ctx); + } + + // Load parser & plugins. + const parser = parserName && this._loadParser(parserName, ctx); + const plugins = pluginList && this._loadPlugins(pluginList, ctx); + + // Yield pseudo config data for file extension processors. + if (plugins) { + yield* this._takeFileExtensionProcessors(plugins, ctx); + } + + // Yield the config data except `extends` and `overrides`. + yield { + + // Debug information. + type: ctx.type, + name: ctx.name, + filePath: ctx.filePath, + + // Config data. + criteria: null, + env, + globals, + ignorePattern, + noInlineConfig, + parser, + parserOptions, + plugins, + processor, + reportUnusedDisableDirectives, + root, + rules, + settings + }; + + // Flatten `overries`. + for (let i = 0; i < overrideList.length; ++i) { + yield* this._normalizeObjectConfigData( + overrideList[i], + { ...ctx, name: `${ctx.name}#overrides[${i}]` } + ); + } + } + + /** + * Load configs of an element in `extends`. + * @param {string} extendName The name of a base config. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @throws {Error} If the extended config file can't be loaded. + * @private + */ + _loadExtends(extendName, ctx) { + debug$2("Loading {extends:%j} relative to %s", extendName, ctx.filePath); + try { + if (extendName.startsWith("eslint:")) { + return this._loadExtendedBuiltInConfig(extendName, ctx); + } + if (extendName.startsWith("plugin:")) { + return this._loadExtendedPluginConfig(extendName, ctx); + } + return this._loadExtendedShareableConfig(extendName, ctx); + } catch (error) { + error.message += `\nReferenced from: ${ctx.filePath || ctx.name}`; + throw error; + } + } + + /** + * Load configs of an element in `extends`. + * @param {string} extendName The name of a base config. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @throws {Error} If the extended config file can't be loaded. + * @private + */ + _loadExtendedBuiltInConfig(extendName, ctx) { + const { + eslintAllPath, + getEslintAllConfig, + eslintRecommendedPath, + getEslintRecommendedConfig + } = internalSlotsMap$1.get(this); + + if (extendName === "eslint:recommended") { + const name = `${ctx.name} » ${extendName}`; + + if (getEslintRecommendedConfig) { + if (typeof getEslintRecommendedConfig !== "function") { + throw new Error(`getEslintRecommendedConfig must be a function instead of '${getEslintRecommendedConfig}'`); + } + return this._normalizeConfigData(getEslintRecommendedConfig(), { ...ctx, name, filePath: "" }); + } + return this._loadConfigData({ + ...ctx, + name, + filePath: eslintRecommendedPath + }); + } + if (extendName === "eslint:all") { + const name = `${ctx.name} » ${extendName}`; + + if (getEslintAllConfig) { + if (typeof getEslintAllConfig !== "function") { + throw new Error(`getEslintAllConfig must be a function instead of '${getEslintAllConfig}'`); + } + return this._normalizeConfigData(getEslintAllConfig(), { ...ctx, name, filePath: "" }); + } + return this._loadConfigData({ + ...ctx, + name, + filePath: eslintAllPath + }); + } + + throw configInvalidError(extendName, ctx.name, "extend-config-missing"); + } + + /** + * Load configs of an element in `extends`. + * @param {string} extendName The name of a base config. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @throws {Error} If the extended config file can't be loaded. + * @private + */ + _loadExtendedPluginConfig(extendName, ctx) { + const slashIndex = extendName.lastIndexOf("/"); + + if (slashIndex === -1) { + throw configInvalidError(extendName, ctx.filePath, "plugin-invalid"); + } + + const pluginName = extendName.slice("plugin:".length, slashIndex); + const configName = extendName.slice(slashIndex + 1); + + if (isFilePath(pluginName)) { + throw new Error("'extends' cannot use a file path for plugins."); + } + + const plugin = this._loadPlugin(pluginName, ctx); + const configData = + plugin.definition && + plugin.definition.configs[configName]; + + if (configData) { + return this._normalizeConfigData(configData, { + ...ctx, + filePath: plugin.filePath || ctx.filePath, + name: `${ctx.name} » plugin:${plugin.id}/${configName}` + }); + } + + throw plugin.error || configInvalidError(extendName, ctx.filePath, "extend-config-missing"); + } + + /** + * Load configs of an element in `extends`. + * @param {string} extendName The name of a base config. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @throws {Error} If the extended config file can't be loaded. + * @private + */ + _loadExtendedShareableConfig(extendName, ctx) { + const { cwd, resolver } = internalSlotsMap$1.get(this); + const relativeTo = ctx.filePath || path__default["default"].join(cwd, "__placeholder__.js"); + let request; + + if (isFilePath(extendName)) { + request = extendName; + } else if (extendName.startsWith(".")) { + request = `./${extendName}`; // For backward compatibility. A ton of tests depended on this behavior. + } else { + request = normalizePackageName( + extendName, + "eslint-config" + ); + } + + let filePath; + + try { + filePath = resolver.resolve(request, relativeTo); + } catch (error) { + /* istanbul ignore else */ + if (error && error.code === "MODULE_NOT_FOUND") { + throw configInvalidError(extendName, ctx.filePath, "extend-config-missing"); + } + throw error; + } + + writeDebugLogForLoading(request, relativeTo, filePath); + return this._loadConfigData({ + ...ctx, + filePath, + name: `${ctx.name} » ${request}` + }); + } + + /** + * Load given plugins. + * @param {string[]} names The plugin names to load. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {Record} The loaded parser. + * @private + */ + _loadPlugins(names, ctx) { + return names.reduce((map, name) => { + if (isFilePath(name)) { + throw new Error("Plugins array cannot includes file paths."); + } + const plugin = this._loadPlugin(name, ctx); + + map[plugin.id] = plugin; + + return map; + }, {}); + } + + /** + * Load a given parser. + * @param {string} nameOrPath The package name or the path to a parser file. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {DependentParser} The loaded parser. + */ + _loadParser(nameOrPath, ctx) { + debug$2("Loading parser %j from %s", nameOrPath, ctx.filePath); + + const { cwd, resolver } = internalSlotsMap$1.get(this); + const relativeTo = ctx.filePath || path__default["default"].join(cwd, "__placeholder__.js"); + + try { + const filePath = resolver.resolve(nameOrPath, relativeTo); + + writeDebugLogForLoading(nameOrPath, relativeTo, filePath); + + return new ConfigDependency({ + definition: require$1(filePath), + filePath, + id: nameOrPath, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } catch (error) { + + // If the parser name is "espree", load the espree of ESLint. + if (nameOrPath === "espree") { + debug$2("Fallback espree."); + return new ConfigDependency({ + definition: require$1("espree"), + filePath: require$1.resolve("espree"), + id: nameOrPath, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + + debug$2("Failed to load parser '%s' declared in '%s'.", nameOrPath, ctx.name); + error.message = `Failed to load parser '${nameOrPath}' declared in '${ctx.name}': ${error.message}`; + + return new ConfigDependency({ + error, + id: nameOrPath, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + } + + /** + * Load a given plugin. + * @param {string} name The plugin name to load. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {DependentPlugin} The loaded plugin. + * @private + */ + _loadPlugin(name, ctx) { + debug$2("Loading plugin %j from %s", name, ctx.filePath); + + const { additionalPluginPool, resolver } = internalSlotsMap$1.get(this); + const request = normalizePackageName(name, "eslint-plugin"); + const id = getShorthandName(request, "eslint-plugin"); + const relativeTo = path__default["default"].join(ctx.pluginBasePath, "__placeholder__.js"); + + if (name.match(/\s+/u)) { + const error = Object.assign( + new Error(`Whitespace found in plugin name '${name}'`), + { + messageTemplate: "whitespace-found", + messageData: { pluginName: request } + } + ); + + return new ConfigDependency({ + error, + id, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + + // Check for additional pool. + const plugin = + additionalPluginPool.get(request) || + additionalPluginPool.get(id); + + if (plugin) { + return new ConfigDependency({ + definition: normalizePlugin(plugin), + original: plugin, + filePath: "", // It's unknown where the plugin came from. + id, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + + let filePath; + let error; + + try { + filePath = resolver.resolve(request, relativeTo); + } catch (resolveError) { + error = resolveError; + /* istanbul ignore else */ + if (error && error.code === "MODULE_NOT_FOUND") { + error.messageTemplate = "plugin-missing"; + error.messageData = { + pluginName: request, + resolvePluginsRelativeTo: ctx.pluginBasePath, + importerName: ctx.name + }; + } + } + + if (filePath) { + try { + writeDebugLogForLoading(request, relativeTo, filePath); + + const startTime = Date.now(); + const pluginDefinition = require$1(filePath); + + debug$2(`Plugin ${filePath} loaded in: ${Date.now() - startTime}ms`); + + return new ConfigDependency({ + definition: normalizePlugin(pluginDefinition), + original: pluginDefinition, + filePath, + id, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } catch (loadError) { + error = loadError; + } + } + + debug$2("Failed to load plugin '%s' declared in '%s'.", name, ctx.name); + error.message = `Failed to load plugin '${name}' declared in '${ctx.name}': ${error.message}`; + return new ConfigDependency({ + error, + id, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + + /** + * Take file expression processors as config array elements. + * @param {Record} plugins The plugin definitions. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The config array elements of file expression processors. + * @private + */ + *_takeFileExtensionProcessors(plugins, ctx) { + for (const pluginId of Object.keys(plugins)) { + const processors = + plugins[pluginId] && + plugins[pluginId].definition && + plugins[pluginId].definition.processors; + + if (!processors) { + continue; + } + + for (const processorId of Object.keys(processors)) { + if (processorId.startsWith(".")) { + yield* this._normalizeObjectConfigData( + { + files: [`*${processorId}`], + processor: `${pluginId}/${processorId}` + }, + { + ...ctx, + type: "implicit-processor", + name: `${ctx.name}#processors["${pluginId}/${processorId}"]` + } + ); + } + } + } + } +} + +/** + * @fileoverview `CascadingConfigArrayFactory` class. + * + * `CascadingConfigArrayFactory` class has a responsibility: + * + * 1. Handles cascading of config files. + * + * It provides two methods: + * + * - `getConfigArrayForFile(filePath)` + * Get the corresponded configuration of a given file. This method doesn't + * throw even if the given file didn't exist. + * - `clearCache()` + * Clear the internal cache. You have to call this method when + * `additionalPluginPool` was updated if `baseConfig` or `cliConfig` depends + * on the additional plugins. (`CLIEngine#addPlugin()` method calls this.) + * + * @author Toru Nagashima + */ + +const debug$1 = debugOrig__default["default"]("eslintrc:cascading-config-array-factory"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +// Define types for VSCode IntelliSense. +/** @typedef {import("./shared/types").ConfigData} ConfigData */ +/** @typedef {import("./shared/types").Parser} Parser */ +/** @typedef {import("./shared/types").Plugin} Plugin */ +/** @typedef {import("./shared/types").Rule} Rule */ +/** @typedef {ReturnType} ConfigArray */ + +/** + * @typedef {Object} CascadingConfigArrayFactoryOptions + * @property {Map} [additionalPluginPool] The map for additional plugins. + * @property {ConfigData} [baseConfig] The config by `baseConfig` option. + * @property {ConfigData} [cliConfig] The config by CLI options (`--env`, `--global`, `--ignore-pattern`, `--parser`, `--parser-options`, `--plugin`, and `--rule`). CLI options overwrite the setting in config files. + * @property {string} [cwd] The base directory to start lookup. + * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`. + * @property {string[]} [rulePaths] The value of `--rulesdir` option. + * @property {string} [specificConfigPath] The value of `--config` option. + * @property {boolean} [useEslintrc] if `false` then it doesn't load config files. + * @property {Function} loadRules The function to use to load rules. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. + */ + +/** + * @typedef {Object} CascadingConfigArrayFactoryInternalSlots + * @property {ConfigArray} baseConfigArray The config array of `baseConfig` option. + * @property {ConfigData} baseConfigData The config data of `baseConfig` option. This is used to reset `baseConfigArray`. + * @property {ConfigArray} cliConfigArray The config array of CLI options. + * @property {ConfigData} cliConfigData The config data of CLI options. This is used to reset `cliConfigArray`. + * @property {ConfigArrayFactory} configArrayFactory The factory for config arrays. + * @property {Map} configCache The cache from directory paths to config arrays. + * @property {string} cwd The base directory to start lookup. + * @property {WeakMap} finalizeCache The cache from config arrays to finalized config arrays. + * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`. + * @property {string[]|null} rulePaths The value of `--rulesdir` option. This is used to reset `baseConfigArray`. + * @property {string|null} specificConfigPath The value of `--config` option. This is used to reset `cliConfigArray`. + * @property {boolean} useEslintrc if `false` then it doesn't load config files. + * @property {Function} loadRules The function to use to load rules. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. + */ + +/** @type {WeakMap} */ +const internalSlotsMap = new WeakMap(); + +/** + * Create the config array from `baseConfig` and `rulePaths`. + * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots. + * @returns {ConfigArray} The config array of the base configs. + */ +function createBaseConfigArray({ + configArrayFactory, + baseConfigData, + rulePaths, + cwd, + loadRules +}) { + const baseConfigArray = configArrayFactory.create( + baseConfigData, + { name: "BaseConfig" } + ); + + /* + * Create the config array element for the default ignore patterns. + * This element has `ignorePattern` property that ignores the default + * patterns in the current working directory. + */ + baseConfigArray.unshift(configArrayFactory.create( + { ignorePatterns: IgnorePattern.DefaultPatterns }, + { name: "DefaultIgnorePattern" } + )[0]); + + /* + * Load rules `--rulesdir` option as a pseudo plugin. + * Use a pseudo plugin to define rules of `--rulesdir`, so we can validate + * the rule's options with only information in the config array. + */ + if (rulePaths && rulePaths.length > 0) { + baseConfigArray.push({ + type: "config", + name: "--rulesdir", + filePath: "", + plugins: { + "": new ConfigDependency({ + definition: { + rules: rulePaths.reduce( + (map, rulesPath) => Object.assign( + map, + loadRules(rulesPath, cwd) + ), + {} + ) + }, + filePath: "", + id: "", + importerName: "--rulesdir", + importerPath: "" + }) + } + }); + } + + return baseConfigArray; +} + +/** + * Create the config array from CLI options. + * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots. + * @returns {ConfigArray} The config array of the base configs. + */ +function createCLIConfigArray({ + cliConfigData, + configArrayFactory, + cwd, + ignorePath, + specificConfigPath +}) { + const cliConfigArray = configArrayFactory.create( + cliConfigData, + { name: "CLIOptions" } + ); + + cliConfigArray.unshift( + ...(ignorePath + ? configArrayFactory.loadESLintIgnore(ignorePath) + : configArrayFactory.loadDefaultESLintIgnore()) + ); + + if (specificConfigPath) { + cliConfigArray.unshift( + ...configArrayFactory.loadFile( + specificConfigPath, + { name: "--config", basePath: cwd } + ) + ); + } + + return cliConfigArray; +} + +/** + * The error type when there are files matched by a glob, but all of them have been ignored. + */ +class ConfigurationNotFoundError extends Error { + + + /** + * @param {string} directoryPath The directory path. + */ + constructor(directoryPath) { + super(`No ESLint configuration found in ${directoryPath}.`); + this.messageTemplate = "no-config-found"; + this.messageData = { directoryPath }; + } +} + +/** + * This class provides the functionality that enumerates every file which is + * matched by given glob patterns and that configuration. + */ +class CascadingConfigArrayFactory { + + /** + * Initialize this enumerator. + * @param {CascadingConfigArrayFactoryOptions} options The options. + */ + constructor({ + additionalPluginPool = new Map(), + baseConfig: baseConfigData = null, + cliConfig: cliConfigData = null, + cwd = process.cwd(), + ignorePath, + resolvePluginsRelativeTo, + rulePaths = [], + specificConfigPath = null, + useEslintrc = true, + builtInRules = new Map(), + loadRules, + resolver, + eslintRecommendedPath, + getEslintRecommendedConfig, + eslintAllPath, + getEslintAllConfig + } = {}) { + const configArrayFactory = new ConfigArrayFactory({ + additionalPluginPool, + cwd, + resolvePluginsRelativeTo, + builtInRules, + resolver, + eslintRecommendedPath, + getEslintRecommendedConfig, + eslintAllPath, + getEslintAllConfig + }); + + internalSlotsMap.set(this, { + baseConfigArray: createBaseConfigArray({ + baseConfigData, + configArrayFactory, + cwd, + rulePaths, + loadRules + }), + baseConfigData, + cliConfigArray: createCLIConfigArray({ + cliConfigData, + configArrayFactory, + cwd, + ignorePath, + specificConfigPath + }), + cliConfigData, + configArrayFactory, + configCache: new Map(), + cwd, + finalizeCache: new WeakMap(), + ignorePath, + rulePaths, + specificConfigPath, + useEslintrc, + builtInRules, + loadRules + }); + } + + /** + * The path to the current working directory. + * This is used by tests. + * @type {string} + */ + get cwd() { + const { cwd } = internalSlotsMap.get(this); + + return cwd; + } + + /** + * Get the config array of a given file. + * If `filePath` was not given, it returns the config which contains only + * `baseConfigData` and `cliConfigData`. + * @param {string} [filePath] The file path to a file. + * @param {Object} [options] The options. + * @param {boolean} [options.ignoreNotFoundError] If `true` then it doesn't throw `ConfigurationNotFoundError`. + * @returns {ConfigArray} The config array of the file. + */ + getConfigArrayForFile(filePath, { ignoreNotFoundError = false } = {}) { + const { + baseConfigArray, + cliConfigArray, + cwd + } = internalSlotsMap.get(this); + + if (!filePath) { + return new ConfigArray(...baseConfigArray, ...cliConfigArray); + } + + const directoryPath = path__default["default"].dirname(path__default["default"].resolve(cwd, filePath)); + + debug$1(`Load config files for ${directoryPath}.`); + + return this._finalizeConfigArray( + this._loadConfigInAncestors(directoryPath), + directoryPath, + ignoreNotFoundError + ); + } + + /** + * Set the config data to override all configs. + * Require to call `clearCache()` method after this method is called. + * @param {ConfigData} configData The config data to override all configs. + * @returns {void} + */ + setOverrideConfig(configData) { + const slots = internalSlotsMap.get(this); + + slots.cliConfigData = configData; + } + + /** + * Clear config cache. + * @returns {void} + */ + clearCache() { + const slots = internalSlotsMap.get(this); + + slots.baseConfigArray = createBaseConfigArray(slots); + slots.cliConfigArray = createCLIConfigArray(slots); + slots.configCache.clear(); + } + + /** + * Load and normalize config files from the ancestor directories. + * @param {string} directoryPath The path to a leaf directory. + * @param {boolean} configsExistInSubdirs `true` if configurations exist in subdirectories. + * @returns {ConfigArray} The loaded config. + * @throws {Error} If a config file is invalid. + * @private + */ + _loadConfigInAncestors(directoryPath, configsExistInSubdirs = false) { + const { + baseConfigArray, + configArrayFactory, + configCache, + cwd, + useEslintrc + } = internalSlotsMap.get(this); + + if (!useEslintrc) { + return baseConfigArray; + } + + let configArray = configCache.get(directoryPath); + + // Hit cache. + if (configArray) { + debug$1(`Cache hit: ${directoryPath}.`); + return configArray; + } + debug$1(`No cache found: ${directoryPath}.`); + + const homePath = os__default["default"].homedir(); + + // Consider this is root. + if (directoryPath === homePath && cwd !== homePath) { + debug$1("Stop traversing because of considered root."); + if (configsExistInSubdirs) { + const filePath = ConfigArrayFactory.getPathToConfigFileInDirectory(directoryPath); + + if (filePath) { + emitDeprecationWarning( + filePath, + "ESLINT_PERSONAL_CONFIG_SUPPRESS" + ); + } + } + return this._cacheConfig(directoryPath, baseConfigArray); + } + + // Load the config on this directory. + try { + configArray = configArrayFactory.loadInDirectory(directoryPath); + } catch (error) { + /* istanbul ignore next */ + if (error.code === "EACCES") { + debug$1("Stop traversing because of 'EACCES' error."); + return this._cacheConfig(directoryPath, baseConfigArray); + } + throw error; + } + + if (configArray.length > 0 && configArray.isRoot()) { + debug$1("Stop traversing because of 'root:true'."); + configArray.unshift(...baseConfigArray); + return this._cacheConfig(directoryPath, configArray); + } + + // Load from the ancestors and merge it. + const parentPath = path__default["default"].dirname(directoryPath); + const parentConfigArray = parentPath && parentPath !== directoryPath + ? this._loadConfigInAncestors( + parentPath, + configsExistInSubdirs || configArray.length > 0 + ) + : baseConfigArray; + + if (configArray.length > 0) { + configArray.unshift(...parentConfigArray); + } else { + configArray = parentConfigArray; + } + + // Cache and return. + return this._cacheConfig(directoryPath, configArray); + } + + /** + * Freeze and cache a given config. + * @param {string} directoryPath The path to a directory as a cache key. + * @param {ConfigArray} configArray The config array as a cache value. + * @returns {ConfigArray} The `configArray` (frozen). + */ + _cacheConfig(directoryPath, configArray) { + const { configCache } = internalSlotsMap.get(this); + + Object.freeze(configArray); + configCache.set(directoryPath, configArray); + + return configArray; + } + + /** + * Finalize a given config array. + * Concatenate `--config` and other CLI options. + * @param {ConfigArray} configArray The parent config array. + * @param {string} directoryPath The path to the leaf directory to find config files. + * @param {boolean} ignoreNotFoundError If `true` then it doesn't throw `ConfigurationNotFoundError`. + * @returns {ConfigArray} The loaded config. + * @throws {Error} If a config file is invalid. + * @private + */ + _finalizeConfigArray(configArray, directoryPath, ignoreNotFoundError) { + const { + cliConfigArray, + configArrayFactory, + finalizeCache, + useEslintrc, + builtInRules + } = internalSlotsMap.get(this); + + let finalConfigArray = finalizeCache.get(configArray); + + if (!finalConfigArray) { + finalConfigArray = configArray; + + // Load the personal config if there are no regular config files. + if ( + useEslintrc && + configArray.every(c => !c.filePath) && + cliConfigArray.every(c => !c.filePath) // `--config` option can be a file. + ) { + const homePath = os__default["default"].homedir(); + + debug$1("Loading the config file of the home directory:", homePath); + + const personalConfigArray = configArrayFactory.loadInDirectory( + homePath, + { name: "PersonalConfig" } + ); + + if ( + personalConfigArray.length > 0 && + !directoryPath.startsWith(homePath) + ) { + const lastElement = + personalConfigArray.at(-1); + + emitDeprecationWarning( + lastElement.filePath, + "ESLINT_PERSONAL_CONFIG_LOAD" + ); + } + + finalConfigArray = finalConfigArray.concat(personalConfigArray); + } + + // Apply CLI options. + if (cliConfigArray.length > 0) { + finalConfigArray = finalConfigArray.concat(cliConfigArray); + } + + // Validate rule settings and environments. + const validator = new ConfigValidator({ + builtInRules + }); + + validator.validateConfigArray(finalConfigArray); + + // Cache it. + Object.freeze(finalConfigArray); + finalizeCache.set(configArray, finalConfigArray); + + debug$1( + "Configuration was determined: %o on %s", + finalConfigArray, + directoryPath + ); + } + + // At least one element (the default ignore patterns) exists. + if (!ignoreNotFoundError && useEslintrc && finalConfigArray.length <= 1) { + throw new ConfigurationNotFoundError(directoryPath); + } + + return finalConfigArray; + } +} + +/** + * @fileoverview Compatibility class for flat config. + * @author Nicholas C. Zakas + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/** @typedef {import("../../shared/types").Environment} Environment */ +/** @typedef {import("../../shared/types").Processor} Processor */ + +const debug = debugOrig__default["default"]("eslintrc:flat-compat"); +const cafactory = Symbol("cafactory"); + +/** + * Translates an ESLintRC-style config object into a flag-config-style config + * object. + * @param {Object} eslintrcConfig An ESLintRC-style config object. + * @param {Object} options Options to help translate the config. + * @param {string} options.resolveConfigRelativeTo To the directory to resolve + * configs from. + * @param {string} options.resolvePluginsRelativeTo The directory to resolve + * plugins from. + * @param {ReadOnlyMap} options.pluginEnvironments A map of plugin environment + * names to objects. + * @param {ReadOnlyMap} options.pluginProcessors A map of plugin processor + * names to objects. + * @returns {Object} A flag-config-style config object. + * @throws {Error} If a plugin or environment cannot be resolved. + */ +function translateESLintRC(eslintrcConfig, { + resolveConfigRelativeTo, + resolvePluginsRelativeTo, + pluginEnvironments, + pluginProcessors +}) { + + const flatConfig = {}; + const configs = []; + const languageOptions = {}; + const linterOptions = {}; + const keysToCopy = ["settings", "rules", "processor"]; + const languageOptionsKeysToCopy = ["globals", "parser", "parserOptions"]; + const linterOptionsKeysToCopy = ["noInlineConfig", "reportUnusedDisableDirectives"]; + + // copy over simple translations + for (const key of keysToCopy) { + if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") { + flatConfig[key] = eslintrcConfig[key]; + } + } + + // copy over languageOptions + for (const key of languageOptionsKeysToCopy) { + if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") { + + // create the languageOptions key in the flat config + flatConfig.languageOptions = languageOptions; + + if (key === "parser") { + debug(`Resolving parser '${languageOptions[key]}' relative to ${resolveConfigRelativeTo}`); + + if (eslintrcConfig[key].error) { + throw eslintrcConfig[key].error; + } + + languageOptions[key] = eslintrcConfig[key].definition; + continue; + } + + // clone any object values that are in the eslintrc config + if (eslintrcConfig[key] && typeof eslintrcConfig[key] === "object") { + languageOptions[key] = { + ...eslintrcConfig[key] + }; + } else { + languageOptions[key] = eslintrcConfig[key]; + } + } + } + + // copy over linterOptions + for (const key of linterOptionsKeysToCopy) { + if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") { + flatConfig.linterOptions = linterOptions; + linterOptions[key] = eslintrcConfig[key]; + } + } + + // move ecmaVersion a level up + if (languageOptions.parserOptions) { + + if ("ecmaVersion" in languageOptions.parserOptions) { + languageOptions.ecmaVersion = languageOptions.parserOptions.ecmaVersion; + delete languageOptions.parserOptions.ecmaVersion; + } + + if ("sourceType" in languageOptions.parserOptions) { + languageOptions.sourceType = languageOptions.parserOptions.sourceType; + delete languageOptions.parserOptions.sourceType; + } + + // check to see if we even need parserOptions anymore and remove it if not + if (Object.keys(languageOptions.parserOptions).length === 0) { + delete languageOptions.parserOptions; + } + } + + // overrides + if (eslintrcConfig.criteria) { + flatConfig.files = [absoluteFilePath => eslintrcConfig.criteria.test(absoluteFilePath)]; + } + + // translate plugins + if (eslintrcConfig.plugins && typeof eslintrcConfig.plugins === "object") { + debug(`Translating plugins: ${eslintrcConfig.plugins}`); + + flatConfig.plugins = {}; + + for (const pluginName of Object.keys(eslintrcConfig.plugins)) { + + debug(`Translating plugin: ${pluginName}`); + debug(`Resolving plugin '${pluginName} relative to ${resolvePluginsRelativeTo}`); + + const { original: plugin, error } = eslintrcConfig.plugins[pluginName]; + + if (error) { + throw error; + } + + flatConfig.plugins[pluginName] = plugin; + + // create a config for any processors + if (plugin.processors) { + for (const processorName of Object.keys(plugin.processors)) { + if (processorName.startsWith(".")) { + debug(`Assigning processor: ${pluginName}/${processorName}`); + + configs.unshift({ + files: [`**/*${processorName}`], + processor: pluginProcessors.get(`${pluginName}/${processorName}`) + }); + } + + } + } + } + } + + // translate env - must come after plugins + if (eslintrcConfig.env && typeof eslintrcConfig.env === "object") { + for (const envName of Object.keys(eslintrcConfig.env)) { + + // only add environments that are true + if (eslintrcConfig.env[envName]) { + debug(`Translating environment: ${envName}`); + + if (environments.has(envName)) { + + // built-in environments should be defined first + configs.unshift(...translateESLintRC({ + criteria: eslintrcConfig.criteria, + ...environments.get(envName) + }, { + resolveConfigRelativeTo, + resolvePluginsRelativeTo + })); + } else if (pluginEnvironments.has(envName)) { + + // if the environment comes from a plugin, it should come after the plugin config + configs.push(...translateESLintRC({ + criteria: eslintrcConfig.criteria, + ...pluginEnvironments.get(envName) + }, { + resolveConfigRelativeTo, + resolvePluginsRelativeTo + })); + } + } + } + } + + // only add if there are actually keys in the config + if (Object.keys(flatConfig).length > 0) { + configs.push(flatConfig); + } + + return configs; +} + + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * A compatibility class for working with configs. + */ +class FlatCompat { + + constructor({ + baseDirectory = process.cwd(), + resolvePluginsRelativeTo = baseDirectory, + recommendedConfig, + allConfig + } = {}) { + this.baseDirectory = baseDirectory; + this.resolvePluginsRelativeTo = resolvePluginsRelativeTo; + this[cafactory] = new ConfigArrayFactory({ + cwd: baseDirectory, + resolvePluginsRelativeTo, + getEslintAllConfig() { + + if (!allConfig) { + throw new TypeError("Missing parameter 'allConfig' in FlatCompat constructor."); + } + + return allConfig; + }, + getEslintRecommendedConfig() { + + if (!recommendedConfig) { + throw new TypeError("Missing parameter 'recommendedConfig' in FlatCompat constructor."); + } + + return recommendedConfig; + } + }); + } + + /** + * Translates an ESLintRC-style config into a flag-config-style config. + * @param {Object} eslintrcConfig The ESLintRC-style config object. + * @returns {Object} A flag-config-style config object. + */ + config(eslintrcConfig) { + const eslintrcArray = this[cafactory].create(eslintrcConfig, { + basePath: this.baseDirectory + }); + + const flatArray = []; + let hasIgnorePatterns = false; + + eslintrcArray.forEach(configData => { + if (configData.type === "config") { + hasIgnorePatterns = hasIgnorePatterns || configData.ignorePattern; + flatArray.push(...translateESLintRC(configData, { + resolveConfigRelativeTo: path__default["default"].join(this.baseDirectory, "__placeholder.js"), + resolvePluginsRelativeTo: path__default["default"].join(this.resolvePluginsRelativeTo, "__placeholder.js"), + pluginEnvironments: eslintrcArray.pluginEnvironments, + pluginProcessors: eslintrcArray.pluginProcessors + })); + } + }); + + // combine ignorePatterns to emulate ESLintRC behavior better + if (hasIgnorePatterns) { + flatArray.unshift({ + ignores: [filePath => { + + // Compute the final config for this file. + // This filters config array elements by `files`/`excludedFiles` then merges the elements. + const finalConfig = eslintrcArray.extractConfig(filePath); + + // Test the `ignorePattern` properties of the final config. + return Boolean(finalConfig.ignores) && finalConfig.ignores(filePath); + }] + }); + } + + return flatArray; + } + + /** + * Translates the `env` section of an ESLintRC-style config. + * @param {Object} envConfig The `env` section of an ESLintRC config. + * @returns {Object[]} An array of flag-config objects representing the environments. + */ + env(envConfig) { + return this.config({ + env: envConfig + }); + } + + /** + * Translates the `extends` section of an ESLintRC-style config. + * @param {...string} configsToExtend The names of the configs to load. + * @returns {Object[]} An array of flag-config objects representing the config. + */ + extends(...configsToExtend) { + return this.config({ + extends: configsToExtend + }); + } + + /** + * Translates the `plugins` section of an ESLintRC-style config. + * @param {...string} plugins The names of the plugins to load. + * @returns {Object[]} An array of flag-config objects representing the plugins. + */ + plugins(...plugins) { + return this.config({ + plugins + }); + } +} + +/** + * @fileoverview Package exports for @eslint/eslintrc + * @author Nicholas C. Zakas + */ + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +const Legacy = { + ConfigArray, + createConfigArrayFactoryContext: createContext, + CascadingConfigArrayFactory, + ConfigArrayFactory, + ConfigDependency, + ExtractedConfig, + IgnorePattern, + OverrideTester, + getUsedExtractedConfigs, + environments, + loadConfigFile, + + // shared + ConfigOps, + ConfigValidator, + ModuleResolver, + naming +}; + +exports.FlatCompat = FlatCompat; +exports.Legacy = Legacy; +//# sourceMappingURL=eslintrc.cjs.map diff --git a/slider/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map b/slider/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map new file mode 100644 index 0000000..b01ef46 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map @@ -0,0 +1 @@ +{"version":3,"file":"eslintrc.cjs","sources":["../lib/config-array/ignore-pattern.js","../lib/config-array/extracted-config.js","../lib/config-array/config-array.js","../lib/config-array/config-dependency.js","../lib/config-array/override-tester.js","../lib/config-array/index.js","../lib/shared/config-ops.js","../lib/shared/deprecation-warnings.js","../lib/shared/ajv.js","../lib/shared/deep-merge-arrays.js","../conf/config-schema.js","../conf/environments.js","../lib/shared/config-validator.js","../lib/shared/naming.js","../lib/shared/relative-module-resolver.js","../lib/config-array-factory.js","../lib/cascading-config-array-factory.js","../lib/flat-compat.js","../lib/index.js"],"sourcesContent":["/**\n * @fileoverview `IgnorePattern` class.\n *\n * `IgnorePattern` class has the set of glob patterns and the base path.\n *\n * It provides two static methods.\n *\n * - `IgnorePattern.createDefaultIgnore(cwd)`\n * Create the default predicate function.\n * - `IgnorePattern.createIgnore(ignorePatterns)`\n * Create the predicate function from multiple `IgnorePattern` objects.\n *\n * It provides two properties and a method.\n *\n * - `patterns`\n * The glob patterns that ignore to lint.\n * - `basePath`\n * The base path of the glob patterns. If absolute paths existed in the\n * glob patterns, those are handled as relative paths to the base path.\n * - `getPatternsRelativeTo(basePath)`\n * Get `patterns` as modified for a given base path. It modifies the\n * absolute paths in the patterns as prepending the difference of two base\n * paths.\n *\n * `ConfigArrayFactory` creates `IgnorePattern` objects when it processes\n * `ignorePatterns` properties.\n *\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport assert from \"node:assert\";\nimport path from \"node:path\";\nimport ignore from \"ignore\";\nimport debugOrig from \"debug\";\n\nconst debug = debugOrig(\"eslintrc:ignore-pattern\");\n\n/** @typedef {ReturnType} Ignore */\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Get the path to the common ancestor directory of given paths.\n * @param {string[]} sourcePaths The paths to calculate the common ancestor.\n * @returns {string} The path to the common ancestor directory.\n */\nfunction getCommonAncestorPath(sourcePaths) {\n let result = sourcePaths[0];\n\n for (let i = 1; i < sourcePaths.length; ++i) {\n const a = result;\n const b = sourcePaths[i];\n\n // Set the shorter one (it's the common ancestor if one includes the other).\n result = a.length < b.length ? a : b;\n\n // Set the common ancestor.\n for (let j = 0, lastSepPos = 0; j < a.length && j < b.length; ++j) {\n if (a[j] !== b[j]) {\n result = a.slice(0, lastSepPos);\n break;\n }\n if (a[j] === path.sep) {\n lastSepPos = j;\n }\n }\n }\n\n let resolvedResult = result || path.sep;\n\n // if Windows common ancestor is root of drive must have trailing slash to be absolute.\n if (resolvedResult && resolvedResult.endsWith(\":\") && process.platform === \"win32\") {\n resolvedResult += path.sep;\n }\n return resolvedResult;\n}\n\n/**\n * Make relative path.\n * @param {string} from The source path to get relative path.\n * @param {string} to The destination path to get relative path.\n * @returns {string} The relative path.\n */\nfunction relative(from, to) {\n const relPath = path.relative(from, to);\n\n if (path.sep === \"/\") {\n return relPath;\n }\n return relPath.split(path.sep).join(\"/\");\n}\n\n/**\n * Get the trailing slash if existed.\n * @param {string} filePath The path to check.\n * @returns {string} The trailing slash if existed.\n */\nfunction dirSuffix(filePath) {\n const isDir = (\n filePath.endsWith(path.sep) ||\n (process.platform === \"win32\" && filePath.endsWith(\"/\"))\n );\n\n return isDir ? \"/\" : \"\";\n}\n\nconst DefaultPatterns = Object.freeze([\"/**/node_modules/*\"]);\nconst DotPatterns = Object.freeze([\".*\", \"!.eslintrc.*\", \"!../\"]);\n\n//------------------------------------------------------------------------------\n// Public\n//------------------------------------------------------------------------------\n\n/**\n * Represents a set of glob patterns to ignore against a base path.\n */\nclass IgnorePattern {\n\n /**\n * The default patterns.\n * @type {string[]}\n */\n static get DefaultPatterns() {\n return DefaultPatterns;\n }\n\n /**\n * Create the default predicate function.\n * @param {string} cwd The current working directory.\n * @returns {((filePath:string, dot:boolean) => boolean) & {basePath:string; patterns:string[]}}\n * The preficate function.\n * The first argument is an absolute path that is checked.\n * The second argument is the flag to not ignore dotfiles.\n * If the predicate function returned `true`, it means the path should be ignored.\n */\n static createDefaultIgnore(cwd) {\n return this.createIgnore([new IgnorePattern(DefaultPatterns, cwd)]);\n }\n\n /**\n * Create the predicate function from multiple `IgnorePattern` objects.\n * @param {IgnorePattern[]} ignorePatterns The list of ignore patterns.\n * @returns {((filePath:string, dot?:boolean) => boolean) & {basePath:string; patterns:string[]}}\n * The preficate function.\n * The first argument is an absolute path that is checked.\n * The second argument is the flag to not ignore dotfiles.\n * If the predicate function returned `true`, it means the path should be ignored.\n */\n static createIgnore(ignorePatterns) {\n debug(\"Create with: %o\", ignorePatterns);\n\n const basePath = getCommonAncestorPath(ignorePatterns.map(p => p.basePath));\n const patterns = ignorePatterns.flatMap(p => p.getPatternsRelativeTo(basePath));\n const ig = ignore({ allowRelativePaths: true }).add([...DotPatterns, ...patterns]);\n const dotIg = ignore({ allowRelativePaths: true }).add(patterns);\n\n debug(\" processed: %o\", { basePath, patterns });\n\n return Object.assign(\n (filePath, dot = false) => {\n assert(path.isAbsolute(filePath), \"'filePath' should be an absolute path.\");\n const relPathRaw = relative(basePath, filePath);\n const relPath = relPathRaw && (relPathRaw + dirSuffix(filePath));\n const adoptedIg = dot ? dotIg : ig;\n const result = relPath !== \"\" && adoptedIg.ignores(relPath);\n\n debug(\"Check\", { filePath, dot, relativePath: relPath, result });\n return result;\n },\n { basePath, patterns }\n );\n }\n\n /**\n * Initialize a new `IgnorePattern` instance.\n * @param {string[]} patterns The glob patterns that ignore to lint.\n * @param {string} basePath The base path of `patterns`.\n */\n constructor(patterns, basePath) {\n assert(path.isAbsolute(basePath), \"'basePath' should be an absolute path.\");\n\n /**\n * The glob patterns that ignore to lint.\n * @type {string[]}\n */\n this.patterns = patterns;\n\n /**\n * The base path of `patterns`.\n * @type {string}\n */\n this.basePath = basePath;\n\n /**\n * If `true` then patterns which don't start with `/` will match the paths to the outside of `basePath`. Defaults to `false`.\n *\n * It's set `true` for `.eslintignore`, `package.json`, and `--ignore-path` for backward compatibility.\n * It's `false` as-is for `ignorePatterns` property in config files.\n * @type {boolean}\n */\n this.loose = false;\n }\n\n /**\n * Get `patterns` as modified for a given base path. It modifies the\n * absolute paths in the patterns as prepending the difference of two base\n * paths.\n * @param {string} newBasePath The base path.\n * @returns {string[]} Modifired patterns.\n */\n getPatternsRelativeTo(newBasePath) {\n assert(path.isAbsolute(newBasePath), \"'newBasePath' should be an absolute path.\");\n const { basePath, loose, patterns } = this;\n\n if (newBasePath === basePath) {\n return patterns;\n }\n const prefix = `/${relative(newBasePath, basePath)}`;\n\n return patterns.map(pattern => {\n const negative = pattern.startsWith(\"!\");\n const head = negative ? \"!\" : \"\";\n const body = negative ? pattern.slice(1) : pattern;\n\n if (body.startsWith(\"/\") || body.startsWith(\"../\")) {\n return `${head}${prefix}${body}`;\n }\n return loose ? pattern : `${head}${prefix}/**/${body}`;\n });\n }\n}\n\nexport { IgnorePattern };\n","/**\n * @fileoverview `ExtractedConfig` class.\n *\n * `ExtractedConfig` class expresses a final configuration for a specific file.\n *\n * It provides one method.\n *\n * - `toCompatibleObjectAsConfigFileContent()`\n * Convert this configuration to the compatible object as the content of\n * config files. It converts the loaded parser and plugins to strings.\n * `CLIEngine#getConfigForFile(filePath)` method uses this method.\n *\n * `ConfigArray#extractConfig(filePath)` creates a `ExtractedConfig` instance.\n *\n * @author Toru Nagashima \n */\n\nimport { IgnorePattern } from \"./ignore-pattern.js\";\n\n// For VSCode intellisense\n/** @typedef {import(\"../../shared/types\").ConfigData} ConfigData */\n/** @typedef {import(\"../../shared/types\").GlobalConf} GlobalConf */\n/** @typedef {import(\"../../shared/types\").SeverityConf} SeverityConf */\n/** @typedef {import(\"./config-dependency\").DependentParser} DependentParser */\n/** @typedef {import(\"./config-dependency\").DependentPlugin} DependentPlugin */\n\n/**\n * Check if `xs` starts with `ys`.\n * @template T\n * @param {T[]} xs The array to check.\n * @param {T[]} ys The array that may be the first part of `xs`.\n * @returns {boolean} `true` if `xs` starts with `ys`.\n */\nfunction startsWith(xs, ys) {\n return xs.length >= ys.length && ys.every((y, i) => y === xs[i]);\n}\n\n/**\n * The class for extracted config data.\n */\nclass ExtractedConfig {\n constructor() {\n\n /**\n * The config name what `noInlineConfig` setting came from.\n * @type {string}\n */\n this.configNameOfNoInlineConfig = \"\";\n\n /**\n * Environments.\n * @type {Record}\n */\n this.env = {};\n\n /**\n * Global variables.\n * @type {Record}\n */\n this.globals = {};\n\n /**\n * The glob patterns that ignore to lint.\n * @type {(((filePath:string, dot?:boolean) => boolean) & { basePath:string; patterns:string[] }) | undefined}\n */\n this.ignores = void 0;\n\n /**\n * The flag that disables directive comments.\n * @type {boolean|undefined}\n */\n this.noInlineConfig = void 0;\n\n /**\n * Parser definition.\n * @type {DependentParser|null}\n */\n this.parser = null;\n\n /**\n * Options for the parser.\n * @type {Object}\n */\n this.parserOptions = {};\n\n /**\n * Plugin definitions.\n * @type {Record}\n */\n this.plugins = {};\n\n /**\n * Processor ID.\n * @type {string|null}\n */\n this.processor = null;\n\n /**\n * The flag that reports unused `eslint-disable` directive comments.\n * @type {boolean|undefined}\n */\n this.reportUnusedDisableDirectives = void 0;\n\n /**\n * Rule settings.\n * @type {Record}\n */\n this.rules = {};\n\n /**\n * Shared settings.\n * @type {Object}\n */\n this.settings = {};\n }\n\n /**\n * Convert this config to the compatible object as a config file content.\n * @returns {ConfigData} The converted object.\n */\n toCompatibleObjectAsConfigFileContent() {\n const {\n /* eslint-disable no-unused-vars -- needed to make `config` correct */\n configNameOfNoInlineConfig: _ignore1,\n processor: _ignore2,\n /* eslint-enable no-unused-vars -- needed to make `config` correct */\n ignores,\n ...config\n } = this;\n\n config.parser = config.parser && config.parser.filePath;\n config.plugins = Object.keys(config.plugins).filter(Boolean).reverse();\n config.ignorePatterns = ignores ? ignores.patterns : [];\n\n // Strip the default patterns from `ignorePatterns`.\n if (startsWith(config.ignorePatterns, IgnorePattern.DefaultPatterns)) {\n config.ignorePatterns =\n config.ignorePatterns.slice(IgnorePattern.DefaultPatterns.length);\n }\n\n return config;\n }\n}\n\nexport { ExtractedConfig };\n","/**\n * @fileoverview `ConfigArray` class.\n *\n * `ConfigArray` class expresses the full of a configuration. It has the entry\n * config file, base config files that were extended, loaded parsers, and loaded\n * plugins.\n *\n * `ConfigArray` class provides three properties and two methods.\n *\n * - `pluginEnvironments`\n * - `pluginProcessors`\n * - `pluginRules`\n * The `Map` objects that contain the members of all plugins that this\n * config array contains. Those map objects don't have mutation methods.\n * Those keys are the member ID such as `pluginId/memberName`.\n * - `isRoot()`\n * If `true` then this configuration has `root:true` property.\n * - `extractConfig(filePath)`\n * Extract the final configuration for a given file. This means merging\n * every config array element which that `criteria` property matched. The\n * `filePath` argument must be an absolute path.\n *\n * `ConfigArrayFactory` provides the loading logic of config files.\n *\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport { ExtractedConfig } from \"./extracted-config.js\";\nimport { IgnorePattern } from \"./ignore-pattern.js\";\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n// Define types for VSCode IntelliSense.\n/** @typedef {import(\"../../shared/types\").Environment} Environment */\n/** @typedef {import(\"../../shared/types\").GlobalConf} GlobalConf */\n/** @typedef {import(\"../../shared/types\").RuleConf} RuleConf */\n/** @typedef {import(\"../../shared/types\").Rule} Rule */\n/** @typedef {import(\"../../shared/types\").Plugin} Plugin */\n/** @typedef {import(\"../../shared/types\").Processor} Processor */\n/** @typedef {import(\"./config-dependency\").DependentParser} DependentParser */\n/** @typedef {import(\"./config-dependency\").DependentPlugin} DependentPlugin */\n/** @typedef {import(\"./override-tester\")[\"OverrideTester\"]} OverrideTester */\n\n/**\n * @typedef {Object} ConfigArrayElement\n * @property {string} name The name of this config element.\n * @property {string} filePath The path to the source file of this config element.\n * @property {InstanceType|null} criteria The tester for the `files` and `excludedFiles` of this config element.\n * @property {Record|undefined} env The environment settings.\n * @property {Record|undefined} globals The global variable settings.\n * @property {IgnorePattern|undefined} ignorePattern The ignore patterns.\n * @property {boolean|undefined} noInlineConfig The flag that disables directive comments.\n * @property {DependentParser|undefined} parser The parser loader.\n * @property {Object|undefined} parserOptions The parser options.\n * @property {Record|undefined} plugins The plugin loaders.\n * @property {string|undefined} processor The processor name to refer plugin's processor.\n * @property {boolean|undefined} reportUnusedDisableDirectives The flag to report unused `eslint-disable` comments.\n * @property {boolean|undefined} root The flag to express root.\n * @property {Record|undefined} rules The rule settings\n * @property {Object|undefined} settings The shared settings.\n * @property {\"config\" | \"ignore\" | \"implicit-processor\"} type The element type.\n */\n\n/**\n * @typedef {Object} ConfigArrayInternalSlots\n * @property {Map} cache The cache to extract configs.\n * @property {ReadonlyMap|null} envMap The map from environment ID to environment definition.\n * @property {ReadonlyMap|null} processorMap The map from processor ID to environment definition.\n * @property {ReadonlyMap|null} ruleMap The map from rule ID to rule definition.\n */\n\n/** @type {WeakMap} */\nconst internalSlotsMap = new class extends WeakMap {\n get(key) {\n let value = super.get(key);\n\n if (!value) {\n value = {\n cache: new Map(),\n envMap: null,\n processorMap: null,\n ruleMap: null\n };\n super.set(key, value);\n }\n\n return value;\n }\n}();\n\n/**\n * Get the indices which are matched to a given file.\n * @param {ConfigArrayElement[]} elements The elements.\n * @param {string} filePath The path to a target file.\n * @returns {number[]} The indices.\n */\nfunction getMatchedIndices(elements, filePath) {\n const indices = [];\n\n for (let i = elements.length - 1; i >= 0; --i) {\n const element = elements[i];\n\n if (!element.criteria || (filePath && element.criteria.test(filePath))) {\n indices.push(i);\n }\n }\n\n return indices;\n}\n\n/**\n * Check if a value is a non-null object.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is a non-null object.\n */\nfunction isNonNullObject(x) {\n return typeof x === \"object\" && x !== null;\n}\n\n/**\n * Merge two objects.\n *\n * Assign every property values of `y` to `x` if `x` doesn't have the property.\n * If `x`'s property value is an object, it does recursive.\n * @param {Object} target The destination to merge\n * @param {Object|undefined} source The source to merge.\n * @returns {void}\n */\nfunction mergeWithoutOverwrite(target, source) {\n if (!isNonNullObject(source)) {\n return;\n }\n\n for (const key of Object.keys(source)) {\n if (key === \"__proto__\") {\n continue;\n }\n\n if (isNonNullObject(target[key])) {\n mergeWithoutOverwrite(target[key], source[key]);\n } else if (target[key] === void 0) {\n if (isNonNullObject(source[key])) {\n target[key] = Array.isArray(source[key]) ? [] : {};\n mergeWithoutOverwrite(target[key], source[key]);\n } else if (source[key] !== void 0) {\n target[key] = source[key];\n }\n }\n }\n}\n\n/**\n * The error for plugin conflicts.\n */\nclass PluginConflictError extends Error {\n\n /**\n * Initialize this error object.\n * @param {string} pluginId The plugin ID.\n * @param {{filePath:string, importerName:string}[]} plugins The resolved plugins.\n */\n constructor(pluginId, plugins) {\n super(`Plugin \"${pluginId}\" was conflicted between ${plugins.map(p => `\"${p.importerName}\"`).join(\" and \")}.`);\n this.messageTemplate = \"plugin-conflict\";\n this.messageData = { pluginId, plugins };\n }\n}\n\n/**\n * Merge plugins.\n * `target`'s definition is prior to `source`'s.\n * @param {Record} target The destination to merge\n * @param {Record|undefined} source The source to merge.\n * @returns {void}\n * @throws {PluginConflictError} When a plugin was conflicted.\n */\nfunction mergePlugins(target, source) {\n if (!isNonNullObject(source)) {\n return;\n }\n\n for (const key of Object.keys(source)) {\n if (key === \"__proto__\") {\n continue;\n }\n const targetValue = target[key];\n const sourceValue = source[key];\n\n // Adopt the plugin which was found at first.\n if (targetValue === void 0) {\n if (sourceValue.error) {\n throw sourceValue.error;\n }\n target[key] = sourceValue;\n } else if (sourceValue.filePath !== targetValue.filePath) {\n throw new PluginConflictError(key, [\n {\n filePath: targetValue.filePath,\n importerName: targetValue.importerName\n },\n {\n filePath: sourceValue.filePath,\n importerName: sourceValue.importerName\n }\n ]);\n }\n }\n}\n\n/**\n * Merge rule configs.\n * `target`'s definition is prior to `source`'s.\n * @param {Record} target The destination to merge\n * @param {Record|undefined} source The source to merge.\n * @returns {void}\n */\nfunction mergeRuleConfigs(target, source) {\n if (!isNonNullObject(source)) {\n return;\n }\n\n for (const key of Object.keys(source)) {\n if (key === \"__proto__\") {\n continue;\n }\n const targetDef = target[key];\n const sourceDef = source[key];\n\n // Adopt the rule config which was found at first.\n if (targetDef === void 0) {\n if (Array.isArray(sourceDef)) {\n target[key] = [...sourceDef];\n } else {\n target[key] = [sourceDef];\n }\n\n /*\n * If the first found rule config is severity only and the current rule\n * config has options, merge the severity and the options.\n */\n } else if (\n targetDef.length === 1 &&\n Array.isArray(sourceDef) &&\n sourceDef.length >= 2\n ) {\n targetDef.push(...sourceDef.slice(1));\n }\n }\n}\n\n/**\n * Create the extracted config.\n * @param {ConfigArray} instance The config elements.\n * @param {number[]} indices The indices to use.\n * @returns {ExtractedConfig} The extracted config.\n * @throws {Error} When a plugin is conflicted.\n */\nfunction createConfig(instance, indices) {\n const config = new ExtractedConfig();\n const ignorePatterns = [];\n\n // Merge elements.\n for (const index of indices) {\n const element = instance[index];\n\n // Adopt the parser which was found at first.\n if (!config.parser && element.parser) {\n if (element.parser.error) {\n throw element.parser.error;\n }\n config.parser = element.parser;\n }\n\n // Adopt the processor which was found at first.\n if (!config.processor && element.processor) {\n config.processor = element.processor;\n }\n\n // Adopt the noInlineConfig which was found at first.\n if (config.noInlineConfig === void 0 && element.noInlineConfig !== void 0) {\n config.noInlineConfig = element.noInlineConfig;\n config.configNameOfNoInlineConfig = element.name;\n }\n\n // Adopt the reportUnusedDisableDirectives which was found at first.\n if (config.reportUnusedDisableDirectives === void 0 && element.reportUnusedDisableDirectives !== void 0) {\n config.reportUnusedDisableDirectives = element.reportUnusedDisableDirectives;\n }\n\n // Collect ignorePatterns\n if (element.ignorePattern) {\n ignorePatterns.push(element.ignorePattern);\n }\n\n // Merge others.\n mergeWithoutOverwrite(config.env, element.env);\n mergeWithoutOverwrite(config.globals, element.globals);\n mergeWithoutOverwrite(config.parserOptions, element.parserOptions);\n mergeWithoutOverwrite(config.settings, element.settings);\n mergePlugins(config.plugins, element.plugins);\n mergeRuleConfigs(config.rules, element.rules);\n }\n\n // Create the predicate function for ignore patterns.\n if (ignorePatterns.length > 0) {\n config.ignores = IgnorePattern.createIgnore(ignorePatterns.reverse());\n }\n\n return config;\n}\n\n/**\n * Collect definitions.\n * @template T, U\n * @param {string} pluginId The plugin ID for prefix.\n * @param {Record} defs The definitions to collect.\n * @param {Map} map The map to output.\n * @returns {void}\n */\nfunction collect(pluginId, defs, map) {\n if (defs) {\n const prefix = pluginId && `${pluginId}/`;\n\n for (const [key, value] of Object.entries(defs)) {\n map.set(`${prefix}${key}`, value);\n }\n }\n}\n\n/**\n * Delete the mutation methods from a given map.\n * @param {Map} map The map object to delete.\n * @returns {void}\n */\nfunction deleteMutationMethods(map) {\n Object.defineProperties(map, {\n clear: { configurable: true, value: void 0 },\n delete: { configurable: true, value: void 0 },\n set: { configurable: true, value: void 0 }\n });\n}\n\n/**\n * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.\n * @param {ConfigArrayElement[]} elements The config elements.\n * @param {ConfigArrayInternalSlots} slots The internal slots.\n * @returns {void}\n */\nfunction initPluginMemberMaps(elements, slots) {\n const processed = new Set();\n\n slots.envMap = new Map();\n slots.processorMap = new Map();\n slots.ruleMap = new Map();\n\n for (const element of elements) {\n if (!element.plugins) {\n continue;\n }\n\n for (const [pluginId, value] of Object.entries(element.plugins)) {\n const plugin = value.definition;\n\n if (!plugin || processed.has(pluginId)) {\n continue;\n }\n processed.add(pluginId);\n\n collect(pluginId, plugin.environments, slots.envMap);\n collect(pluginId, plugin.processors, slots.processorMap);\n collect(pluginId, plugin.rules, slots.ruleMap);\n }\n }\n\n deleteMutationMethods(slots.envMap);\n deleteMutationMethods(slots.processorMap);\n deleteMutationMethods(slots.ruleMap);\n}\n\n/**\n * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.\n * @param {ConfigArray} instance The config elements.\n * @returns {ConfigArrayInternalSlots} The extracted config.\n */\nfunction ensurePluginMemberMaps(instance) {\n const slots = internalSlotsMap.get(instance);\n\n if (!slots.ruleMap) {\n initPluginMemberMaps(instance, slots);\n }\n\n return slots;\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/**\n * The Config Array.\n *\n * `ConfigArray` instance contains all settings, parsers, and plugins.\n * You need to call `ConfigArray#extractConfig(filePath)` method in order to\n * extract, merge and get only the config data which is related to an arbitrary\n * file.\n * @extends {Array}\n */\nclass ConfigArray extends Array {\n\n /**\n * Get the plugin environments.\n * The returned map cannot be mutated.\n * @type {ReadonlyMap} The plugin environments.\n */\n get pluginEnvironments() {\n return ensurePluginMemberMaps(this).envMap;\n }\n\n /**\n * Get the plugin processors.\n * The returned map cannot be mutated.\n * @type {ReadonlyMap} The plugin processors.\n */\n get pluginProcessors() {\n return ensurePluginMemberMaps(this).processorMap;\n }\n\n /**\n * Get the plugin rules.\n * The returned map cannot be mutated.\n * @returns {ReadonlyMap} The plugin rules.\n */\n get pluginRules() {\n return ensurePluginMemberMaps(this).ruleMap;\n }\n\n /**\n * Check if this config has `root` flag.\n * @returns {boolean} `true` if this config array is root.\n */\n isRoot() {\n for (let i = this.length - 1; i >= 0; --i) {\n const root = this[i].root;\n\n if (typeof root === \"boolean\") {\n return root;\n }\n }\n return false;\n }\n\n /**\n * Extract the config data which is related to a given file.\n * @param {string} filePath The absolute path to the target file.\n * @returns {ExtractedConfig} The extracted config data.\n */\n extractConfig(filePath) {\n const { cache } = internalSlotsMap.get(this);\n const indices = getMatchedIndices(this, filePath);\n const cacheKey = indices.join(\",\");\n\n if (!cache.has(cacheKey)) {\n cache.set(cacheKey, createConfig(this, indices));\n }\n\n return cache.get(cacheKey);\n }\n\n /**\n * Check if a given path is an additional lint target.\n * @param {string} filePath The absolute path to the target file.\n * @returns {boolean} `true` if the file is an additional lint target.\n */\n isAdditionalTargetPath(filePath) {\n for (const { criteria, type } of this) {\n if (\n type === \"config\" &&\n criteria &&\n !criteria.endsWithWildcard &&\n criteria.test(filePath)\n ) {\n return true;\n }\n }\n return false;\n }\n}\n\n/**\n * Get the used extracted configs.\n * CLIEngine will use this method to collect used deprecated rules.\n * @param {ConfigArray} instance The config array object to get.\n * @returns {ExtractedConfig[]} The used extracted configs.\n * @private\n */\nfunction getUsedExtractedConfigs(instance) {\n const { cache } = internalSlotsMap.get(instance);\n\n return Array.from(cache.values());\n}\n\n\nexport {\n ConfigArray,\n getUsedExtractedConfigs\n};\n","/**\n * @fileoverview `ConfigDependency` class.\n *\n * `ConfigDependency` class expresses a loaded parser or plugin.\n *\n * If the parser or plugin was loaded successfully, it has `definition` property\n * and `filePath` property. Otherwise, it has `error` property.\n *\n * When `JSON.stringify()` converted a `ConfigDependency` object to a JSON, it\n * omits `definition` property.\n *\n * `ConfigArrayFactory` creates `ConfigDependency` objects when it loads parsers\n * or plugins.\n *\n * @author Toru Nagashima \n */\n\nimport util from \"node:util\";\n\n/**\n * The class is to store parsers or plugins.\n * This class hides the loaded object from `JSON.stringify()` and `console.log`.\n * @template T\n */\nclass ConfigDependency {\n\n /**\n * Initialize this instance.\n * @param {Object} data The dependency data.\n * @param {T} [data.definition] The dependency if the loading succeeded.\n * @param {T} [data.original] The original, non-normalized dependency if the loading succeeded.\n * @param {Error} [data.error] The error object if the loading failed.\n * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded.\n * @param {string} data.id The ID of this dependency.\n * @param {string} data.importerName The name of the config file which loads this dependency.\n * @param {string} data.importerPath The path to the config file which loads this dependency.\n */\n constructor({\n definition = null,\n original = null,\n error = null,\n filePath = null,\n id,\n importerName,\n importerPath\n }) {\n\n /**\n * The loaded dependency if the loading succeeded.\n * @type {T|null}\n */\n this.definition = definition;\n\n /**\n * The original dependency as loaded directly from disk if the loading succeeded.\n * @type {T|null}\n */\n this.original = original;\n\n /**\n * The error object if the loading failed.\n * @type {Error|null}\n */\n this.error = error;\n\n /**\n * The loaded dependency if the loading succeeded.\n * @type {string|null}\n */\n this.filePath = filePath;\n\n /**\n * The ID of this dependency.\n * @type {string}\n */\n this.id = id;\n\n /**\n * The name of the config file which loads this dependency.\n * @type {string}\n */\n this.importerName = importerName;\n\n /**\n * The path to the config file which loads this dependency.\n * @type {string}\n */\n this.importerPath = importerPath;\n }\n\n /**\n * Converts this instance to a JSON compatible object.\n * @returns {Object} a JSON compatible object.\n */\n toJSON() {\n const obj = this[util.inspect.custom]();\n\n // Display `error.message` (`Error#message` is unenumerable).\n if (obj.error instanceof Error) {\n obj.error = { ...obj.error, message: obj.error.message };\n }\n\n return obj;\n }\n\n /**\n * Custom inspect method for Node.js `console.log()`.\n * @returns {Object} an object to display by `console.log()`.\n */\n [util.inspect.custom]() {\n const {\n definition: _ignore1, // eslint-disable-line no-unused-vars -- needed to make `obj` correct\n original: _ignore2, // eslint-disable-line no-unused-vars -- needed to make `obj` correct\n ...obj\n } = this;\n\n return obj;\n }\n}\n\n/** @typedef {ConfigDependency} DependentParser */\n/** @typedef {ConfigDependency} DependentPlugin */\n\nexport { ConfigDependency };\n","/**\n * @fileoverview `OverrideTester` class.\n *\n * `OverrideTester` class handles `files` property and `excludedFiles` property\n * of `overrides` config.\n *\n * It provides one method.\n *\n * - `test(filePath)`\n * Test if a file path matches the pair of `files` property and\n * `excludedFiles` property. The `filePath` argument must be an absolute\n * path.\n *\n * `ConfigArrayFactory` creates `OverrideTester` objects when it processes\n * `overrides` properties.\n *\n * @author Toru Nagashima \n */\n\nimport assert from \"node:assert\";\nimport path from \"node:path\";\nimport util from \"node:util\";\nimport minimatch from \"minimatch\";\n\nconst { Minimatch } = minimatch;\n\nconst minimatchOpts = { dot: true, matchBase: true };\n\n/**\n * @typedef {Object} Pattern\n * @property {InstanceType[] | null} includes The positive matchers.\n * @property {InstanceType[] | null} excludes The negative matchers.\n */\n\n/**\n * Normalize a given pattern to an array.\n * @param {string|string[]|undefined} patterns A glob pattern or an array of glob patterns.\n * @returns {string[]|null} Normalized patterns.\n * @private\n */\nfunction normalizePatterns(patterns) {\n if (Array.isArray(patterns)) {\n return patterns.filter(Boolean);\n }\n if (typeof patterns === \"string\" && patterns) {\n return [patterns];\n }\n return [];\n}\n\n/**\n * Create the matchers of given patterns.\n * @param {string[]} patterns The patterns.\n * @returns {InstanceType[] | null} The matchers.\n */\nfunction toMatcher(patterns) {\n if (patterns.length === 0) {\n return null;\n }\n return patterns.map(pattern => {\n if (/^\\.[/\\\\]/u.test(pattern)) {\n return new Minimatch(\n pattern.slice(2),\n\n // `./*.js` should not match with `subdir/foo.js`\n { ...minimatchOpts, matchBase: false }\n );\n }\n return new Minimatch(pattern, minimatchOpts);\n });\n}\n\n/**\n * Convert a given matcher to string.\n * @param {Pattern} matchers The matchers.\n * @returns {string} The string expression of the matcher.\n */\nfunction patternToJson({ includes, excludes }) {\n return {\n includes: includes && includes.map(m => m.pattern),\n excludes: excludes && excludes.map(m => m.pattern)\n };\n}\n\n/**\n * The class to test given paths are matched by the patterns.\n */\nclass OverrideTester {\n\n /**\n * Create a tester with given criteria.\n * If there are no criteria, returns `null`.\n * @param {string|string[]} files The glob patterns for included files.\n * @param {string|string[]} excludedFiles The glob patterns for excluded files.\n * @param {string} basePath The path to the base directory to test paths.\n * @returns {OverrideTester|null} The created instance or `null`.\n * @throws {Error} When invalid patterns are given.\n */\n static create(files, excludedFiles, basePath) {\n const includePatterns = normalizePatterns(files);\n const excludePatterns = normalizePatterns(excludedFiles);\n let endsWithWildcard = false;\n\n if (includePatterns.length === 0) {\n return null;\n }\n\n // Rejects absolute paths or relative paths to parents.\n for (const pattern of includePatterns) {\n if (path.isAbsolute(pattern) || pattern.includes(\"..\")) {\n throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);\n }\n if (pattern.endsWith(\"*\")) {\n endsWithWildcard = true;\n }\n }\n for (const pattern of excludePatterns) {\n if (path.isAbsolute(pattern) || pattern.includes(\"..\")) {\n throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);\n }\n }\n\n const includes = toMatcher(includePatterns);\n const excludes = toMatcher(excludePatterns);\n\n return new OverrideTester(\n [{ includes, excludes }],\n basePath,\n endsWithWildcard\n );\n }\n\n /**\n * Combine two testers by logical and.\n * If either of the testers was `null`, returns the other tester.\n * The `basePath` property of the two must be the same value.\n * @param {OverrideTester|null} a A tester.\n * @param {OverrideTester|null} b Another tester.\n * @returns {OverrideTester|null} Combined tester.\n */\n static and(a, b) {\n if (!b) {\n return a && new OverrideTester(\n a.patterns,\n a.basePath,\n a.endsWithWildcard\n );\n }\n if (!a) {\n return new OverrideTester(\n b.patterns,\n b.basePath,\n b.endsWithWildcard\n );\n }\n\n assert.strictEqual(a.basePath, b.basePath);\n return new OverrideTester(\n a.patterns.concat(b.patterns),\n a.basePath,\n a.endsWithWildcard || b.endsWithWildcard\n );\n }\n\n /**\n * Initialize this instance.\n * @param {Pattern[]} patterns The matchers.\n * @param {string} basePath The base path.\n * @param {boolean} endsWithWildcard If `true` then a pattern ends with `*`.\n */\n constructor(patterns, basePath, endsWithWildcard = false) {\n\n /** @type {Pattern[]} */\n this.patterns = patterns;\n\n /** @type {string} */\n this.basePath = basePath;\n\n /** @type {boolean} */\n this.endsWithWildcard = endsWithWildcard;\n }\n\n /**\n * Test if a given path is matched or not.\n * @param {string} filePath The absolute path to the target file.\n * @returns {boolean} `true` if the path was matched.\n * @throws {Error} When invalid `filePath` is given.\n */\n test(filePath) {\n if (typeof filePath !== \"string\" || !path.isAbsolute(filePath)) {\n throw new Error(`'filePath' should be an absolute path, but got ${filePath}.`);\n }\n const relativePath = path.relative(this.basePath, filePath);\n\n return this.patterns.every(({ includes, excludes }) => (\n (!includes || includes.some(m => m.match(relativePath))) &&\n (!excludes || !excludes.some(m => m.match(relativePath)))\n ));\n }\n\n /**\n * Converts this instance to a JSON compatible object.\n * @returns {Object} a JSON compatible object.\n */\n toJSON() {\n if (this.patterns.length === 1) {\n return {\n ...patternToJson(this.patterns[0]),\n basePath: this.basePath\n };\n }\n return {\n AND: this.patterns.map(patternToJson),\n basePath: this.basePath\n };\n }\n\n /**\n * Custom inspect method for Node.js `console.log()`.\n * @returns {Object} an object to display by `console.log()`.\n */\n [util.inspect.custom]() {\n return this.toJSON();\n }\n}\n\nexport { OverrideTester };\n","/**\n * @fileoverview `ConfigArray` class.\n * @author Toru Nagashima \n */\n\nimport { ConfigArray, getUsedExtractedConfigs } from \"./config-array.js\";\nimport { ConfigDependency } from \"./config-dependency.js\";\nimport { ExtractedConfig } from \"./extracted-config.js\";\nimport { IgnorePattern } from \"./ignore-pattern.js\";\nimport { OverrideTester } from \"./override-tester.js\";\n\nexport {\n ConfigArray,\n ConfigDependency,\n ExtractedConfig,\n IgnorePattern,\n OverrideTester,\n getUsedExtractedConfigs\n};\n","/**\n * @fileoverview Config file operations. This file must be usable in the browser,\n * so no Node-specific code can be here.\n * @author Nicholas C. Zakas\n */\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\nconst RULE_SEVERITY_STRINGS = [\"off\", \"warn\", \"error\"],\n RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {\n map[value] = index;\n return map;\n }, {}),\n VALID_SEVERITIES = new Set([0, 1, 2, \"off\", \"warn\", \"error\"]);\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/**\n * Normalizes the severity value of a rule's configuration to a number\n * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally\n * received from the user. A valid config value is either 0, 1, 2, the string \"off\" (treated the same as 0),\n * the string \"warn\" (treated the same as 1), the string \"error\" (treated the same as 2), or an array\n * whose first element is one of the above values. Strings are matched case-insensitively.\n * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.\n */\nfunction getRuleSeverity(ruleConfig) {\n const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (severityValue === 0 || severityValue === 1 || severityValue === 2) {\n return severityValue;\n }\n\n if (typeof severityValue === \"string\") {\n return RULE_SEVERITY[severityValue.toLowerCase()] || 0;\n }\n\n return 0;\n}\n\n/**\n * Converts old-style severity settings (0, 1, 2) into new-style\n * severity settings (off, warn, error) for all rules. Assumption is that severity\n * values have already been validated as correct.\n * @param {Object} config The config object to normalize.\n * @returns {void}\n */\nfunction normalizeToStrings(config) {\n\n if (config.rules) {\n Object.keys(config.rules).forEach(ruleId => {\n const ruleConfig = config.rules[ruleId];\n\n if (typeof ruleConfig === \"number\") {\n config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];\n } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === \"number\") {\n ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];\n }\n });\n }\n}\n\n/**\n * Determines if the severity for the given rule configuration represents an error.\n * @param {int|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} True if the rule represents an error, false if not.\n */\nfunction isErrorSeverity(ruleConfig) {\n return getRuleSeverity(ruleConfig) === 2;\n}\n\n/**\n * Checks whether a given config has valid severity or not.\n * @param {number|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isValidSeverity(ruleConfig) {\n let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (typeof severity === \"string\") {\n severity = severity.toLowerCase();\n }\n return VALID_SEVERITIES.has(severity);\n}\n\n/**\n * Checks whether every rule of a given config has valid severity or not.\n * @param {Object} config The configuration for rules.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isEverySeverityValid(config) {\n return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId]));\n}\n\n/**\n * Normalizes a value for a global in a config\n * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in\n * a global directive comment\n * @returns {(\"readable\"|\"writeable\"|\"off\")} The value normalized as a string\n * @throws Error if global value is invalid\n */\nfunction normalizeConfigGlobal(configuredValue) {\n switch (configuredValue) {\n case \"off\":\n return \"off\";\n\n case true:\n case \"true\":\n case \"writeable\":\n case \"writable\":\n return \"writable\";\n\n case null:\n case false:\n case \"false\":\n case \"readable\":\n case \"readonly\":\n return \"readonly\";\n\n default:\n throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`);\n }\n}\n\nexport {\n getRuleSeverity,\n normalizeToStrings,\n isErrorSeverity,\n isValidSeverity,\n isEverySeverityValid,\n normalizeConfigGlobal\n};\n","/**\n * @fileoverview Provide the function that emits deprecation warnings.\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport path from \"node:path\";\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\n// Defitions for deprecation warnings.\nconst deprecationWarningMessages = {\n ESLINT_LEGACY_ECMAFEATURES:\n \"The 'ecmaFeatures' config file property is deprecated and has no effect.\",\n ESLINT_PERSONAL_CONFIG_LOAD:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please use a config file per project or the '--config' option.\",\n ESLINT_PERSONAL_CONFIG_SUPPRESS:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please remove it or add 'root:true' to the config files in your \" +\n \"projects in order to avoid loading '~/.eslintrc.*' accidentally.\"\n};\n\nconst sourceFileErrorCache = new Set();\n\n/**\n * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted\n * for each unique file path, but repeated invocations with the same file path have no effect.\n * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.\n * @param {string} source The name of the configuration source to report the warning for.\n * @param {string} errorCode The warning message to show.\n * @returns {void}\n */\nfunction emitDeprecationWarning(source, errorCode) {\n const cacheKey = JSON.stringify({ source, errorCode });\n\n if (sourceFileErrorCache.has(cacheKey)) {\n return;\n }\n sourceFileErrorCache.add(cacheKey);\n\n const rel = path.relative(process.cwd(), source);\n const message = deprecationWarningMessages[errorCode];\n\n process.emitWarning(\n `${message} (found in \"${rel}\")`,\n \"DeprecationWarning\",\n errorCode\n );\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n emitDeprecationWarning\n};\n","/**\n * @fileoverview The instance of Ajv validator.\n * @author Evgeny Poberezkin\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport Ajv from \"ajv\";\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\n/*\n * Copied from ajv/lib/refs/json-schema-draft-04.json\n * The MIT License (MIT)\n * Copyright (c) 2015-2017 Evgeny Poberezkin\n */\nconst metaSchema = {\n id: \"http://json-schema.org/draft-04/schema#\",\n $schema: \"http://json-schema.org/draft-04/schema#\",\n description: \"Core schema meta-schema\",\n definitions: {\n schemaArray: {\n type: \"array\",\n minItems: 1,\n items: { $ref: \"#\" }\n },\n positiveInteger: {\n type: \"integer\",\n minimum: 0\n },\n positiveIntegerDefault0: {\n allOf: [{ $ref: \"#/definitions/positiveInteger\" }, { default: 0 }]\n },\n simpleTypes: {\n enum: [\"array\", \"boolean\", \"integer\", \"null\", \"number\", \"object\", \"string\"]\n },\n stringArray: {\n type: \"array\",\n items: { type: \"string\" },\n minItems: 1,\n uniqueItems: true\n }\n },\n type: \"object\",\n properties: {\n id: {\n type: \"string\"\n },\n $schema: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n default: { },\n multipleOf: {\n type: \"number\",\n minimum: 0,\n exclusiveMinimum: true\n },\n maximum: {\n type: \"number\"\n },\n exclusiveMaximum: {\n type: \"boolean\",\n default: false\n },\n minimum: {\n type: \"number\"\n },\n exclusiveMinimum: {\n type: \"boolean\",\n default: false\n },\n maxLength: { $ref: \"#/definitions/positiveInteger\" },\n minLength: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n pattern: {\n type: \"string\",\n format: \"regex\"\n },\n additionalItems: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n items: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/schemaArray\" }\n ],\n default: { }\n },\n maxItems: { $ref: \"#/definitions/positiveInteger\" },\n minItems: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n uniqueItems: {\n type: \"boolean\",\n default: false\n },\n maxProperties: { $ref: \"#/definitions/positiveInteger\" },\n minProperties: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n required: { $ref: \"#/definitions/stringArray\" },\n additionalProperties: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n definitions: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n properties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n patternProperties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n dependencies: {\n type: \"object\",\n additionalProperties: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/stringArray\" }\n ]\n }\n },\n enum: {\n type: \"array\",\n minItems: 1,\n uniqueItems: true\n },\n type: {\n anyOf: [\n { $ref: \"#/definitions/simpleTypes\" },\n {\n type: \"array\",\n items: { $ref: \"#/definitions/simpleTypes\" },\n minItems: 1,\n uniqueItems: true\n }\n ]\n },\n format: { type: \"string\" },\n allOf: { $ref: \"#/definitions/schemaArray\" },\n anyOf: { $ref: \"#/definitions/schemaArray\" },\n oneOf: { $ref: \"#/definitions/schemaArray\" },\n not: { $ref: \"#\" }\n },\n dependencies: {\n exclusiveMaximum: [\"maximum\"],\n exclusiveMinimum: [\"minimum\"]\n },\n default: { }\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport default (additionalOptions = {}) => {\n const ajv = new Ajv({\n meta: false,\n useDefaults: true,\n validateSchema: false,\n missingRefs: \"ignore\",\n verbose: true,\n schemaId: \"auto\",\n ...additionalOptions\n });\n\n ajv.addMetaSchema(metaSchema);\n // eslint-disable-next-line no-underscore-dangle -- part of the API\n ajv._opts.defaultMeta = metaSchema.id;\n\n return ajv;\n};\n","/**\n * @fileoverview Applies default rule options\n * @author JoshuaKGoldberg\n */\n\n/**\n * Check if the variable contains an object strictly rejecting arrays\n * @param {unknown} value an object\n * @returns {boolean} Whether value is an object\n */\nfunction isObjectNotArray(value) {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n/**\n * Deeply merges second on top of first, creating a new {} object if needed.\n * @param {T} first Base, default value.\n * @param {U} second User-specified value.\n * @returns {T | U | (T & U)} Merged equivalent of second on top of first.\n */\nfunction deepMergeObjects(first, second) {\n if (second === void 0) {\n return first;\n }\n\n if (!isObjectNotArray(first) || !isObjectNotArray(second)) {\n return second;\n }\n\n const result = { ...first, ...second };\n\n for (const key of Object.keys(second)) {\n if (Object.prototype.propertyIsEnumerable.call(first, key)) {\n result[key] = deepMergeObjects(first[key], second[key]);\n }\n }\n\n return result;\n}\n\n/**\n * Deeply merges second on top of first, creating a new [] array if needed.\n * @param {T[] | undefined} first Base, default values.\n * @param {U[] | undefined} second User-specified values.\n * @returns {(T | U | (T & U))[]} Merged equivalent of second on top of first.\n */\nfunction deepMergeArrays(first, second) {\n if (!first || !second) {\n return second || first || [];\n }\n\n return [\n ...first.map((value, i) => deepMergeObjects(value, second[i])),\n ...second.slice(first.length)\n ];\n}\n\nexport { deepMergeArrays };\n","/**\n * @fileoverview Defines a schema for configs.\n * @author Sylvan Mably\n */\n\nconst baseConfigProperties = {\n $schema: { type: \"string\" },\n env: { type: \"object\" },\n extends: { $ref: \"#/definitions/stringOrStrings\" },\n globals: { type: \"object\" },\n overrides: {\n type: \"array\",\n items: { $ref: \"#/definitions/overrideConfig\" },\n additionalItems: false\n },\n parser: { type: [\"string\", \"null\"] },\n parserOptions: { type: \"object\" },\n plugins: { type: \"array\" },\n processor: { type: \"string\" },\n rules: { type: \"object\" },\n settings: { type: \"object\" },\n noInlineConfig: { type: \"boolean\" },\n reportUnusedDisableDirectives: { type: \"boolean\" },\n\n ecmaFeatures: { type: \"object\" } // deprecated; logs a warning when used\n};\n\nconst configSchema = {\n definitions: {\n stringOrStrings: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false\n }\n ]\n },\n stringOrStringsRequired: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false,\n minItems: 1\n }\n ]\n },\n\n // Config at top-level.\n objectConfig: {\n type: \"object\",\n properties: {\n root: { type: \"boolean\" },\n ignorePatterns: { $ref: \"#/definitions/stringOrStrings\" },\n ...baseConfigProperties\n },\n additionalProperties: false\n },\n\n // Config in `overrides`.\n overrideConfig: {\n type: \"object\",\n properties: {\n excludedFiles: { $ref: \"#/definitions/stringOrStrings\" },\n files: { $ref: \"#/definitions/stringOrStringsRequired\" },\n ...baseConfigProperties\n },\n required: [\"files\"],\n additionalProperties: false\n }\n },\n\n $ref: \"#/definitions/objectConfig\"\n};\n\nexport default configSchema;\n","/**\n * @fileoverview Defines environment settings and globals.\n * @author Elan Shanker\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport globals from \"globals\";\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Get the object that has difference.\n * @param {Record} current The newer object.\n * @param {Record} prev The older object.\n * @returns {Record} The difference object.\n */\nfunction getDiff(current, prev) {\n const retv = {};\n\n for (const [key, value] of Object.entries(current)) {\n if (!Object.hasOwn(prev, key)) {\n retv[key] = value;\n }\n }\n\n return retv;\n}\n\nconst newGlobals2015 = getDiff(globals.es2015, globals.es5); // 19 variables such as Promise, Map, ...\nconst newGlobals2017 = {\n Atomics: false,\n SharedArrayBuffer: false\n};\nconst newGlobals2020 = {\n BigInt: false,\n BigInt64Array: false,\n BigUint64Array: false,\n globalThis: false\n};\n\nconst newGlobals2021 = {\n AggregateError: false,\n FinalizationRegistry: false,\n WeakRef: false\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/** @type {Map} */\nexport default new Map(Object.entries({\n\n // Language\n builtin: {\n globals: globals.es5\n },\n es6: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2015: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2016: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 7\n }\n },\n es2017: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 8\n }\n },\n es2018: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 9\n }\n },\n es2019: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 10\n }\n },\n es2020: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },\n parserOptions: {\n ecmaVersion: 11\n }\n },\n es2021: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 12\n }\n },\n es2022: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 13\n }\n },\n es2023: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 14\n }\n },\n es2024: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 15\n }\n },\n\n // Platforms\n browser: {\n globals: globals.browser\n },\n node: {\n globals: globals.node,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n \"shared-node-browser\": {\n globals: globals[\"shared-node-browser\"]\n },\n worker: {\n globals: globals.worker\n },\n serviceworker: {\n globals: globals.serviceworker\n },\n\n // Frameworks\n commonjs: {\n globals: globals.commonjs,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n amd: {\n globals: globals.amd\n },\n mocha: {\n globals: globals.mocha\n },\n jasmine: {\n globals: globals.jasmine\n },\n jest: {\n globals: globals.jest\n },\n phantomjs: {\n globals: globals.phantomjs\n },\n jquery: {\n globals: globals.jquery\n },\n qunit: {\n globals: globals.qunit\n },\n prototypejs: {\n globals: globals.prototypejs\n },\n shelljs: {\n globals: globals.shelljs\n },\n meteor: {\n globals: globals.meteor\n },\n mongo: {\n globals: globals.mongo\n },\n protractor: {\n globals: globals.protractor\n },\n applescript: {\n globals: globals.applescript\n },\n nashorn: {\n globals: globals.nashorn\n },\n atomtest: {\n globals: globals.atomtest\n },\n embertest: {\n globals: globals.embertest\n },\n webextensions: {\n globals: globals.webextensions\n },\n greasemonkey: {\n globals: globals.greasemonkey\n }\n}));\n","/**\n * @fileoverview Validates configs.\n * @author Brandon Mills\n */\n\n/* eslint class-methods-use-this: \"off\" -- not needed in this file */\n\n//------------------------------------------------------------------------------\n// Typedefs\n//------------------------------------------------------------------------------\n\n/** @typedef {import(\"../shared/types\").Rule} Rule */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport util from \"node:util\";\nimport * as ConfigOps from \"./config-ops.js\";\nimport { emitDeprecationWarning } from \"./deprecation-warnings.js\";\nimport ajvOrig from \"./ajv.js\";\nimport { deepMergeArrays } from \"./deep-merge-arrays.js\";\nimport configSchema from \"../../conf/config-schema.js\";\nimport BuiltInEnvironments from \"../../conf/environments.js\";\n\nconst ajv = ajvOrig();\n\nconst ruleValidators = new WeakMap();\nconst noop = Function.prototype;\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\nlet validateSchema;\nconst severityMap = {\n error: 2,\n warn: 1,\n off: 0\n};\n\nconst validated = new WeakSet();\n\n// JSON schema that disallows passing any options\nconst noOptionsSchema = Object.freeze({\n type: \"array\",\n minItems: 0,\n maxItems: 0\n});\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\n/**\n * Validator for configuration objects.\n */\nexport default class ConfigValidator {\n constructor({ builtInRules = new Map() } = {}) {\n this.builtInRules = builtInRules;\n }\n\n /**\n * Gets a complete options schema for a rule.\n * @param {Rule} rule A rule object\n * @throws {TypeError} If `meta.schema` is specified but is not an array, object or `false`.\n * @returns {Object|null} JSON Schema for the rule's options.\n * `null` if rule wasn't passed or its `meta.schema` is `false`.\n */\n getRuleOptionsSchema(rule) {\n if (!rule) {\n return null;\n }\n\n if (!rule.meta) {\n return { ...noOptionsSchema }; // default if `meta.schema` is not specified\n }\n\n const schema = rule.meta.schema;\n\n if (typeof schema === \"undefined\") {\n return { ...noOptionsSchema }; // default if `meta.schema` is not specified\n }\n\n // `schema:false` is an allowed explicit opt-out of options validation for the rule\n if (schema === false) {\n return null;\n }\n\n if (typeof schema !== \"object\" || schema === null) {\n throw new TypeError(\"Rule's `meta.schema` must be an array or object\");\n }\n\n // ESLint-specific array form needs to be converted into a valid JSON Schema definition\n if (Array.isArray(schema)) {\n if (schema.length) {\n return {\n type: \"array\",\n items: schema,\n minItems: 0,\n maxItems: schema.length\n };\n }\n\n // `schema:[]` is an explicit way to specify that the rule does not accept any options\n return { ...noOptionsSchema };\n }\n\n // `schema:` is assumed to be a valid JSON Schema definition\n return schema;\n }\n\n /**\n * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.\n * @param {options} options The given options for the rule.\n * @returns {number|string} The rule's severity value\n * @throws {Error} If the severity is invalid.\n */\n validateRuleSeverity(options) {\n const severity = Array.isArray(options) ? options[0] : options;\n const normSeverity = typeof severity === \"string\" ? severityMap[severity.toLowerCase()] : severity;\n\n if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) {\n return normSeverity;\n }\n\n throw new Error(`\\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util.inspect(severity).replace(/'/gu, \"\\\"\").replace(/\\n/gu, \"\")}').\\n`);\n\n }\n\n /**\n * Validates the non-severity options passed to a rule, based on its schema.\n * @param {{create: Function}} rule The rule to validate\n * @param {Array} localOptions The options for the rule, excluding severity\n * @returns {void}\n * @throws {Error} If the options are invalid.\n */\n validateRuleSchema(rule, localOptions) {\n if (!ruleValidators.has(rule)) {\n try {\n const schema = this.getRuleOptionsSchema(rule);\n\n if (schema) {\n ruleValidators.set(rule, ajv.compile(schema));\n }\n } catch (err) {\n const errorWithCode = new Error(err.message, { cause: err });\n\n errorWithCode.code = \"ESLINT_INVALID_RULE_OPTIONS_SCHEMA\";\n\n throw errorWithCode;\n }\n }\n\n const validateRule = ruleValidators.get(rule);\n\n if (validateRule) {\n const mergedOptions = deepMergeArrays(rule.meta?.defaultOptions, localOptions);\n\n validateRule(mergedOptions);\n\n if (validateRule.errors) {\n throw new Error(validateRule.errors.map(\n error => `\\tValue ${JSON.stringify(error.data)} ${error.message}.\\n`\n ).join(\"\"));\n }\n }\n }\n\n /**\n * Validates a rule's options against its schema.\n * @param {{create: Function}|null} rule The rule that the config is being validated for\n * @param {string} ruleId The rule's unique name.\n * @param {Array|number} options The given options for the rule.\n * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,\n * no source is prepended to the message.\n * @returns {void}\n * @throws {Error} If the options are invalid.\n */\n validateRuleOptions(rule, ruleId, options, source = null) {\n try {\n const severity = this.validateRuleSeverity(options);\n\n if (severity !== 0) {\n this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);\n }\n } catch (err) {\n let enhancedMessage = err.code === \"ESLINT_INVALID_RULE_OPTIONS_SCHEMA\"\n ? `Error while processing options validation schema of rule '${ruleId}': ${err.message}`\n : `Configuration for rule \"${ruleId}\" is invalid:\\n${err.message}`;\n\n if (typeof source === \"string\") {\n enhancedMessage = `${source}:\\n\\t${enhancedMessage}`;\n }\n\n const enhancedError = new Error(enhancedMessage, { cause: err });\n\n if (err.code) {\n enhancedError.code = err.code;\n }\n\n throw enhancedError;\n }\n }\n\n /**\n * Validates an environment object\n * @param {Object} environment The environment config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {(envId:string) => Object} [getAdditionalEnv] A map from strings to loaded environments.\n * @returns {void}\n * @throws {Error} If the environment is invalid.\n */\n validateEnvironment(\n environment,\n source,\n getAdditionalEnv = noop\n ) {\n\n // not having an environment is ok\n if (!environment) {\n return;\n }\n\n Object.keys(environment).forEach(id => {\n const env = getAdditionalEnv(id) || BuiltInEnvironments.get(id) || null;\n\n if (!env) {\n const message = `${source}:\\n\\tEnvironment key \"${id}\" is unknown\\n`;\n\n throw new Error(message);\n }\n });\n }\n\n /**\n * Validates a rules config object\n * @param {Object} rulesConfig The rules config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {(ruleId:string) => Object} getAdditionalRule A map from strings to loaded rules\n * @returns {void}\n */\n validateRules(\n rulesConfig,\n source,\n getAdditionalRule = noop\n ) {\n if (!rulesConfig) {\n return;\n }\n\n Object.keys(rulesConfig).forEach(id => {\n const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null;\n\n this.validateRuleOptions(rule, id, rulesConfig[id], source);\n });\n }\n\n /**\n * Validates a `globals` section of a config file\n * @param {Object} globalsConfig The `globals` section\n * @param {string|null} source The name of the configuration source to report in the event of an error.\n * @returns {void}\n */\n validateGlobals(globalsConfig, source = null) {\n if (!globalsConfig) {\n return;\n }\n\n Object.entries(globalsConfig)\n .forEach(([configuredGlobal, configuredValue]) => {\n try {\n ConfigOps.normalizeConfigGlobal(configuredValue);\n } catch (err) {\n throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\\n${err.message}`);\n }\n });\n }\n\n /**\n * Validate `processor` configuration.\n * @param {string|undefined} processorName The processor name.\n * @param {string} source The name of config file.\n * @param {(id:string) => Processor} getProcessor The getter of defined processors.\n * @returns {void}\n * @throws {Error} If the processor is invalid.\n */\n validateProcessor(processorName, source, getProcessor) {\n if (processorName && !getProcessor(processorName)) {\n throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`);\n }\n }\n\n /**\n * Formats an array of schema validation errors.\n * @param {Array} errors An array of error messages to format.\n * @returns {string} Formatted error message\n */\n formatErrors(errors) {\n return errors.map(error => {\n if (error.keyword === \"additionalProperties\") {\n const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;\n\n return `Unexpected top-level property \"${formattedPropertyPath}\"`;\n }\n if (error.keyword === \"type\") {\n const formattedField = error.dataPath.slice(1);\n const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join(\"/\") : error.schema;\n const formattedValue = JSON.stringify(error.data);\n\n return `Property \"${formattedField}\" is the wrong type (expected ${formattedExpectedType} but got \\`${formattedValue}\\`)`;\n }\n\n const field = error.dataPath[0] === \".\" ? error.dataPath.slice(1) : error.dataPath;\n\n return `\"${field}\" ${error.message}. Value: ${JSON.stringify(error.data)}`;\n }).map(message => `\\t- ${message}.\\n`).join(\"\");\n }\n\n /**\n * Validates the top level properties of the config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @returns {void}\n * @throws {Error} If the config is invalid.\n */\n validateConfigSchema(config, source = null) {\n validateSchema = validateSchema || ajv.compile(configSchema);\n\n if (!validateSchema(config)) {\n throw new Error(`ESLint configuration in ${source} is invalid:\\n${this.formatErrors(validateSchema.errors)}`);\n }\n\n if (Object.hasOwn(config, \"ecmaFeatures\")) {\n emitDeprecationWarning(source, \"ESLINT_LEGACY_ECMAFEATURES\");\n }\n }\n\n /**\n * Validates an entire config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {(ruleId:string) => Object} [getAdditionalRule] A map from strings to loaded rules.\n * @param {(envId:string) => Object} [getAdditionalEnv] A map from strings to loaded envs.\n * @returns {void}\n */\n validate(config, source, getAdditionalRule, getAdditionalEnv) {\n this.validateConfigSchema(config, source);\n this.validateRules(config.rules, source, getAdditionalRule);\n this.validateEnvironment(config.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n\n for (const override of config.overrides || []) {\n this.validateRules(override.rules, source, getAdditionalRule);\n this.validateEnvironment(override.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n }\n }\n\n /**\n * Validate config array object.\n * @param {ConfigArray} configArray The config array to validate.\n * @returns {void}\n */\n validateConfigArray(configArray) {\n const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments);\n const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors);\n const getPluginRule = Map.prototype.get.bind(configArray.pluginRules);\n\n // Validate.\n for (const element of configArray) {\n if (validated.has(element)) {\n continue;\n }\n validated.add(element);\n\n this.validateEnvironment(element.env, element.name, getPluginEnv);\n this.validateGlobals(element.globals, element.name);\n this.validateProcessor(element.processor, element.name, getPluginProcessor);\n this.validateRules(element.rules, element.name, getPluginRule);\n }\n }\n\n}\n","/**\n * @fileoverview Common helpers for naming of plugins, formatters and configs\n */\n\nconst NAMESPACE_REGEX = /^@.*\\//iu;\n\n/**\n * Brings package name to correct format based on prefix\n * @param {string} name The name of the package.\n * @param {string} prefix Can be either \"eslint-plugin\", \"eslint-config\" or \"eslint-formatter\"\n * @returns {string} Normalized name of the package\n * @private\n */\nfunction normalizePackageName(name, prefix) {\n let normalizedName = name;\n\n /**\n * On Windows, name can come in with Windows slashes instead of Unix slashes.\n * Normalize to Unix first to avoid errors later on.\n * https://github.com/eslint/eslint/issues/5644\n */\n if (normalizedName.includes(\"\\\\\")) {\n normalizedName = normalizedName.replace(/\\\\/gu, \"/\");\n }\n\n if (normalizedName.charAt(0) === \"@\") {\n\n /**\n * it's a scoped package\n * package name is the prefix, or just a username\n */\n const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, \"u\"),\n scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, \"u\");\n\n if (scopedPackageShortcutRegex.test(normalizedName)) {\n normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`);\n } else if (!scopedPackageNameRegex.test(normalizedName.split(\"/\")[1])) {\n\n /**\n * for scoped packages, insert the prefix after the first / unless\n * the path is already @scope/eslint or @scope/eslint-xxx-yyy\n */\n normalizedName = normalizedName.replace(/^@([^/]+)\\/(.*)$/u, `@$1/${prefix}-$2`);\n }\n } else if (!normalizedName.startsWith(`${prefix}-`)) {\n normalizedName = `${prefix}-${normalizedName}`;\n }\n\n return normalizedName;\n}\n\n/**\n * Removes the prefix from a fullname.\n * @param {string} fullname The term which may have the prefix.\n * @param {string} prefix The prefix to remove.\n * @returns {string} The term without prefix.\n */\nfunction getShorthandName(fullname, prefix) {\n if (fullname[0] === \"@\") {\n let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, \"u\").exec(fullname);\n\n if (matchResult) {\n return matchResult[1];\n }\n\n matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, \"u\").exec(fullname);\n if (matchResult) {\n return `${matchResult[1]}/${matchResult[2]}`;\n }\n } else if (fullname.startsWith(`${prefix}-`)) {\n return fullname.slice(prefix.length + 1);\n }\n\n return fullname;\n}\n\n/**\n * Gets the scope (namespace) of a term.\n * @param {string} term The term which may have the namespace.\n * @returns {string} The namespace of the term if it has one.\n */\nfunction getNamespaceFromTerm(term) {\n const match = term.match(NAMESPACE_REGEX);\n\n return match ? match[0] : \"\";\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n normalizePackageName,\n getShorthandName,\n getNamespaceFromTerm\n};\n","/**\n * Utility for resolving a module relative to another module\n * @author Teddy Katz\n */\n\nimport Module from \"node:module\";\n\n/*\n * `Module.createRequire` is added in v12.2.0. It supports URL as well.\n * We only support the case where the argument is a filepath, not a URL.\n */\nconst createRequire = Module.createRequire;\n\n/**\n * Resolves a Node module relative to another module\n * @param {string} moduleName The name of a Node module, or a path to a Node module.\n * @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be\n * a file rather than a directory, but the file need not actually exist.\n * @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath`\n * @throws {Error} When the module cannot be resolved.\n */\nfunction resolve(moduleName, relativeToPath) {\n try {\n return createRequire(relativeToPath).resolve(moduleName);\n } catch (error) {\n\n // This `if` block is for older Node.js than 12.0.0. We can remove this block in the future.\n if (\n typeof error === \"object\" &&\n error !== null &&\n error.code === \"MODULE_NOT_FOUND\" &&\n !error.requireStack &&\n error.message.includes(moduleName)\n ) {\n error.message += `\\nRequire stack:\\n- ${relativeToPath}`;\n }\n throw error;\n }\n}\n\nexport {\n resolve\n};\n","/**\n * @fileoverview The factory of `ConfigArray` objects.\n *\n * This class provides methods to create `ConfigArray` instance.\n *\n * - `create(configData, options)`\n * Create a `ConfigArray` instance from a config data. This is to handle CLI\n * options except `--config`.\n * - `loadFile(filePath, options)`\n * Create a `ConfigArray` instance from a config file. This is to handle\n * `--config` option. If the file was not found, throws the following error:\n * - If the filename was `*.js`, a `MODULE_NOT_FOUND` error.\n * - If the filename was `package.json`, an IO error or an\n * `ESLINT_CONFIG_FIELD_NOT_FOUND` error.\n * - Otherwise, an IO error such as `ENOENT`.\n * - `loadInDirectory(directoryPath, options)`\n * Create a `ConfigArray` instance from a config file which is on a given\n * directory. This tries to load `.eslintrc.*` or `package.json`. If not\n * found, returns an empty `ConfigArray`.\n * - `loadESLintIgnore(filePath)`\n * Create a `ConfigArray` instance from a config file that is `.eslintignore`\n * format. This is to handle `--ignore-path` option.\n * - `loadDefaultESLintIgnore()`\n * Create a `ConfigArray` instance from `.eslintignore` or `package.json` in\n * the current working directory.\n *\n * `ConfigArrayFactory` class has the responsibility that loads configuration\n * files, including loading `extends`, `parser`, and `plugins`. The created\n * `ConfigArray` instance has the loaded `extends`, `parser`, and `plugins`.\n *\n * But this class doesn't handle cascading. `CascadingConfigArrayFactory` class\n * handles cascading and hierarchy.\n *\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport debugOrig from \"debug\";\nimport fs from \"node:fs\";\nimport importFresh from \"import-fresh\";\nimport { createRequire } from \"node:module\";\nimport path from \"node:path\";\nimport stripComments from \"strip-json-comments\";\n\nimport {\n ConfigArray,\n ConfigDependency,\n IgnorePattern,\n OverrideTester\n} from \"./config-array/index.js\";\nimport ConfigValidator from \"./shared/config-validator.js\";\nimport * as naming from \"./shared/naming.js\";\nimport * as ModuleResolver from \"./shared/relative-module-resolver.js\";\n\nconst require = createRequire(import.meta.url);\n\nconst debug = debugOrig(\"eslintrc:config-array-factory\");\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\nconst configFilenames = [\n \".eslintrc.js\",\n \".eslintrc.cjs\",\n \".eslintrc.yaml\",\n \".eslintrc.yml\",\n \".eslintrc.json\",\n \".eslintrc\",\n \"package.json\"\n];\n\n// Define types for VSCode IntelliSense.\n/** @typedef {import(\"./shared/types\").ConfigData} ConfigData */\n/** @typedef {import(\"./shared/types\").OverrideConfigData} OverrideConfigData */\n/** @typedef {import(\"./shared/types\").Parser} Parser */\n/** @typedef {import(\"./shared/types\").Plugin} Plugin */\n/** @typedef {import(\"./shared/types\").Rule} Rule */\n/** @typedef {import(\"./config-array/config-dependency\").DependentParser} DependentParser */\n/** @typedef {import(\"./config-array/config-dependency\").DependentPlugin} DependentPlugin */\n/** @typedef {ConfigArray[0]} ConfigArrayElement */\n\n/**\n * @typedef {Object} ConfigArrayFactoryOptions\n * @property {Map} [additionalPluginPool] The map for additional plugins.\n * @property {string} [cwd] The path to the current working directory.\n * @property {string} [resolvePluginsRelativeTo] A path to the directory that plugins should be resolved from. Defaults to `cwd`.\n * @property {Map} builtInRules The rules that are built in to ESLint.\n * @property {Object} [resolver=ModuleResolver] The module resolver object.\n * @property {string} eslintAllPath The path to the definitions for eslint:all.\n * @property {Function} getEslintAllConfig Returns the config data for eslint:all.\n * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.\n * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.\n */\n\n/**\n * @typedef {Object} ConfigArrayFactoryInternalSlots\n * @property {Map} additionalPluginPool The map for additional plugins.\n * @property {string} cwd The path to the current working directory.\n * @property {string | undefined} resolvePluginsRelativeTo An absolute path the the directory that plugins should be resolved from.\n * @property {Map} builtInRules The rules that are built in to ESLint.\n * @property {Object} [resolver=ModuleResolver] The module resolver object.\n * @property {string} eslintAllPath The path to the definitions for eslint:all.\n * @property {Function} getEslintAllConfig Returns the config data for eslint:all.\n * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.\n * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.\n */\n\n/**\n * @typedef {Object} ConfigArrayFactoryLoadingContext\n * @property {string} filePath The path to the current configuration.\n * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @property {string} name The name of the current configuration.\n * @property {string} pluginBasePath The base path to resolve plugins.\n * @property {\"config\" | \"ignore\" | \"implicit-processor\"} type The type of the current configuration. This is `\"config\"` in normal. This is `\"ignore\"` if it came from `.eslintignore`. This is `\"implicit-processor\"` if it came from legacy file-extension processors.\n */\n\n/**\n * @typedef {Object} ConfigArrayFactoryLoadingContext\n * @property {string} filePath The path to the current configuration.\n * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @property {string} name The name of the current configuration.\n * @property {\"config\" | \"ignore\" | \"implicit-processor\"} type The type of the current configuration. This is `\"config\"` in normal. This is `\"ignore\"` if it came from `.eslintignore`. This is `\"implicit-processor\"` if it came from legacy file-extension processors.\n */\n\n/** @type {WeakMap} */\nconst internalSlotsMap = new WeakMap();\n\n/** @type {WeakMap} */\nconst normalizedPlugins = new WeakMap();\n\n/**\n * Check if a given string is a file path.\n * @param {string} nameOrPath A module name or file path.\n * @returns {boolean} `true` if the `nameOrPath` is a file path.\n */\nfunction isFilePath(nameOrPath) {\n return (\n /^\\.{1,2}[/\\\\]/u.test(nameOrPath) ||\n path.isAbsolute(nameOrPath)\n );\n}\n\n/**\n * Convenience wrapper for synchronously reading file contents.\n * @param {string} filePath The filename to read.\n * @returns {string} The file contents, with the BOM removed.\n * @private\n */\nfunction readFile(filePath) {\n return fs.readFileSync(filePath, \"utf8\").replace(/^\\ufeff/u, \"\");\n}\n\n/**\n * Loads a YAML configuration from a file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadYAMLConfigFile(filePath) {\n debug(`Loading YAML config file: ${filePath}`);\n\n // lazy load YAML to improve performance when not used\n const yaml = require(\"js-yaml\");\n\n try {\n\n // empty YAML file can be null, so always use\n return yaml.load(readFile(filePath)) || {};\n } catch (e) {\n debug(`Error reading YAML file: ${filePath}`);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Loads a JSON configuration from a file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadJSONConfigFile(filePath) {\n debug(`Loading JSON config file: ${filePath}`);\n\n try {\n return JSON.parse(stripComments(readFile(filePath)));\n } catch (e) {\n debug(`Error reading JSON file: ${filePath}`);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n e.messageTemplate = \"failed-to-read-json\";\n e.messageData = {\n path: filePath,\n message: e.message\n };\n throw e;\n }\n}\n\n/**\n * Loads a legacy (.eslintrc) configuration from a file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadLegacyConfigFile(filePath) {\n debug(`Loading legacy config file: ${filePath}`);\n\n // lazy load YAML to improve performance when not used\n const yaml = require(\"js-yaml\");\n\n try {\n return yaml.load(stripComments(readFile(filePath))) || /* istanbul ignore next */ {};\n } catch (e) {\n debug(\"Error reading YAML file: %s\\n%o\", filePath, e);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Loads a JavaScript configuration from a file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadJSConfigFile(filePath) {\n debug(`Loading JS config file: ${filePath}`);\n try {\n return importFresh(filePath);\n } catch (e) {\n debug(`Error reading JavaScript file: ${filePath}`);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Loads a configuration from a package.json file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadPackageJSONConfigFile(filePath) {\n debug(`Loading package.json config file: ${filePath}`);\n try {\n const packageData = loadJSONConfigFile(filePath);\n\n if (!Object.hasOwn(packageData, \"eslintConfig\")) {\n throw Object.assign(\n new Error(\"package.json file doesn't have 'eslintConfig' field.\"),\n { code: \"ESLINT_CONFIG_FIELD_NOT_FOUND\" }\n );\n }\n\n return packageData.eslintConfig;\n } catch (e) {\n debug(`Error reading package.json file: ${filePath}`);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Loads a `.eslintignore` from a file.\n * @param {string} filePath The filename to load.\n * @returns {string[]} The ignore patterns from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadESLintIgnoreFile(filePath) {\n debug(`Loading .eslintignore file: ${filePath}`);\n\n try {\n return readFile(filePath)\n .split(/\\r?\\n/gu)\n .filter(line => line.trim() !== \"\" && !line.startsWith(\"#\"));\n } catch (e) {\n debug(`Error reading .eslintignore file: ${filePath}`);\n e.message = `Cannot read .eslintignore file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Creates an error to notify about a missing config to extend from.\n * @param {string} configName The name of the missing config.\n * @param {string} importerName The name of the config that imported the missing config\n * @param {string} messageTemplate The text template to source error strings from.\n * @returns {Error} The error object to throw\n * @private\n */\nfunction configInvalidError(configName, importerName, messageTemplate) {\n return Object.assign(\n new Error(`Failed to load config \"${configName}\" to extend from.`),\n {\n messageTemplate,\n messageData: { configName, importerName }\n }\n );\n}\n\n/**\n * Loads a configuration file regardless of the source. Inspects the file path\n * to determine the correctly way to load the config file.\n * @param {string} filePath The path to the configuration.\n * @returns {ConfigData|null} The configuration information.\n * @private\n */\nfunction loadConfigFile(filePath) {\n switch (path.extname(filePath)) {\n case \".js\":\n case \".cjs\":\n return loadJSConfigFile(filePath);\n\n case \".json\":\n if (path.basename(filePath) === \"package.json\") {\n return loadPackageJSONConfigFile(filePath);\n }\n return loadJSONConfigFile(filePath);\n\n case \".yaml\":\n case \".yml\":\n return loadYAMLConfigFile(filePath);\n\n default:\n return loadLegacyConfigFile(filePath);\n }\n}\n\n/**\n * Write debug log.\n * @param {string} request The requested module name.\n * @param {string} relativeTo The file path to resolve the request relative to.\n * @param {string} filePath The resolved file path.\n * @returns {void}\n */\nfunction writeDebugLogForLoading(request, relativeTo, filePath) {\n /* istanbul ignore next */\n if (debug.enabled) {\n let nameAndVersion = null; // eslint-disable-line no-useless-assignment -- known bug in the rule\n\n try {\n const packageJsonPath = ModuleResolver.resolve(\n `${request}/package.json`,\n relativeTo\n );\n const { version = \"unknown\" } = require(packageJsonPath);\n\n nameAndVersion = `${request}@${version}`;\n } catch (error) {\n debug(\"package.json was not found:\", error.message);\n nameAndVersion = request;\n }\n\n debug(\"Loaded: %s (%s)\", nameAndVersion, filePath);\n }\n}\n\n/**\n * Create a new context with default values.\n * @param {ConfigArrayFactoryInternalSlots} slots The internal slots.\n * @param {\"config\" | \"ignore\" | \"implicit-processor\" | undefined} providedType The type of the current configuration. Default is `\"config\"`.\n * @param {string | undefined} providedName The name of the current configuration. Default is the relative path from `cwd` to `filePath`.\n * @param {string | undefined} providedFilePath The path to the current configuration. Default is empty string.\n * @param {string | undefined} providedMatchBasePath The type of the current configuration. Default is the directory of `filePath` or `cwd`.\n * @returns {ConfigArrayFactoryLoadingContext} The created context.\n */\nfunction createContext(\n { cwd, resolvePluginsRelativeTo },\n providedType,\n providedName,\n providedFilePath,\n providedMatchBasePath\n) {\n const filePath = providedFilePath\n ? path.resolve(cwd, providedFilePath)\n : \"\";\n const matchBasePath =\n (providedMatchBasePath && path.resolve(cwd, providedMatchBasePath)) ||\n (filePath && path.dirname(filePath)) ||\n cwd;\n const name =\n providedName ||\n (filePath && path.relative(cwd, filePath)) ||\n \"\";\n const pluginBasePath =\n resolvePluginsRelativeTo ||\n (filePath && path.dirname(filePath)) ||\n cwd;\n const type = providedType || \"config\";\n\n return { filePath, matchBasePath, name, pluginBasePath, type };\n}\n\n/**\n * Normalize a given plugin.\n * - Ensure the object to have four properties: configs, environments, processors, and rules.\n * - Ensure the object to not have other properties.\n * @param {Plugin} plugin The plugin to normalize.\n * @returns {Plugin} The normalized plugin.\n */\nfunction normalizePlugin(plugin) {\n\n // first check the cache\n let normalizedPlugin = normalizedPlugins.get(plugin);\n\n if (normalizedPlugin) {\n return normalizedPlugin;\n }\n\n normalizedPlugin = {\n configs: plugin.configs || {},\n environments: plugin.environments || {},\n processors: plugin.processors || {},\n rules: plugin.rules || {}\n };\n\n // save the reference for later\n normalizedPlugins.set(plugin, normalizedPlugin);\n\n return normalizedPlugin;\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/**\n * The factory of `ConfigArray` objects.\n */\nclass ConfigArrayFactory {\n\n /**\n * Initialize this instance.\n * @param {ConfigArrayFactoryOptions} [options] The map for additional plugins.\n */\n constructor({\n additionalPluginPool = new Map(),\n cwd = process.cwd(),\n resolvePluginsRelativeTo,\n builtInRules,\n resolver = ModuleResolver,\n eslintAllPath,\n getEslintAllConfig,\n eslintRecommendedPath,\n getEslintRecommendedConfig\n } = {}) {\n internalSlotsMap.set(this, {\n additionalPluginPool,\n cwd,\n resolvePluginsRelativeTo:\n resolvePluginsRelativeTo &&\n path.resolve(cwd, resolvePluginsRelativeTo),\n builtInRules,\n resolver,\n eslintAllPath,\n getEslintAllConfig,\n eslintRecommendedPath,\n getEslintRecommendedConfig\n });\n }\n\n /**\n * Create `ConfigArray` instance from a config data.\n * @param {ConfigData|null} configData The config data to create.\n * @param {Object} [options] The options.\n * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @param {string} [options.filePath] The path to this config data.\n * @param {string} [options.name] The config name.\n * @returns {ConfigArray} Loaded config.\n */\n create(configData, { basePath, filePath, name } = {}) {\n if (!configData) {\n return new ConfigArray();\n }\n\n const slots = internalSlotsMap.get(this);\n const ctx = createContext(slots, \"config\", name, filePath, basePath);\n const elements = this._normalizeConfigData(configData, ctx);\n\n return new ConfigArray(...elements);\n }\n\n /**\n * Load a config file.\n * @param {string} filePath The path to a config file.\n * @param {Object} [options] The options.\n * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @param {string} [options.name] The config name.\n * @returns {ConfigArray} Loaded config.\n */\n loadFile(filePath, { basePath, name } = {}) {\n const slots = internalSlotsMap.get(this);\n const ctx = createContext(slots, \"config\", name, filePath, basePath);\n\n return new ConfigArray(...this._loadConfigData(ctx));\n }\n\n /**\n * Load the config file on a given directory if exists.\n * @param {string} directoryPath The path to a directory.\n * @param {Object} [options] The options.\n * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @param {string} [options.name] The config name.\n * @throws {Error} If the config file is invalid.\n * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.\n */\n loadInDirectory(directoryPath, { basePath, name } = {}) {\n const slots = internalSlotsMap.get(this);\n\n for (const filename of configFilenames) {\n const ctx = createContext(\n slots,\n \"config\",\n name,\n path.join(directoryPath, filename),\n basePath\n );\n\n if (fs.existsSync(ctx.filePath) && fs.statSync(ctx.filePath).isFile()) {\n let configData;\n\n try {\n configData = loadConfigFile(ctx.filePath);\n } catch (error) {\n if (!error || error.code !== \"ESLINT_CONFIG_FIELD_NOT_FOUND\") {\n throw error;\n }\n }\n\n if (configData) {\n debug(`Config file found: ${ctx.filePath}`);\n return new ConfigArray(\n ...this._normalizeConfigData(configData, ctx)\n );\n }\n }\n }\n\n debug(`Config file not found on ${directoryPath}`);\n return new ConfigArray();\n }\n\n /**\n * Check if a config file on a given directory exists or not.\n * @param {string} directoryPath The path to a directory.\n * @returns {string | null} The path to the found config file. If not found then null.\n */\n static getPathToConfigFileInDirectory(directoryPath) {\n for (const filename of configFilenames) {\n const filePath = path.join(directoryPath, filename);\n\n if (fs.existsSync(filePath)) {\n if (filename === \"package.json\") {\n try {\n loadPackageJSONConfigFile(filePath);\n return filePath;\n } catch { /* ignore */ }\n } else {\n return filePath;\n }\n }\n }\n return null;\n }\n\n /**\n * Load `.eslintignore` file.\n * @param {string} filePath The path to a `.eslintignore` file to load.\n * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.\n */\n loadESLintIgnore(filePath) {\n const slots = internalSlotsMap.get(this);\n const ctx = createContext(\n slots,\n \"ignore\",\n void 0,\n filePath,\n slots.cwd\n );\n const ignorePatterns = loadESLintIgnoreFile(ctx.filePath);\n\n return new ConfigArray(\n ...this._normalizeESLintIgnoreData(ignorePatterns, ctx)\n );\n }\n\n /**\n * Load `.eslintignore` file in the current working directory.\n * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.\n * @throws {Error} If the ignore file is invalid.\n */\n loadDefaultESLintIgnore() {\n const slots = internalSlotsMap.get(this);\n const eslintIgnorePath = path.resolve(slots.cwd, \".eslintignore\");\n const packageJsonPath = path.resolve(slots.cwd, \"package.json\");\n\n if (fs.existsSync(eslintIgnorePath)) {\n return this.loadESLintIgnore(eslintIgnorePath);\n }\n if (fs.existsSync(packageJsonPath)) {\n const data = loadJSONConfigFile(packageJsonPath);\n\n if (Object.hasOwn(data, \"eslintIgnore\")) {\n if (!Array.isArray(data.eslintIgnore)) {\n throw new Error(\"Package.json eslintIgnore property requires an array of paths\");\n }\n const ctx = createContext(\n slots,\n \"ignore\",\n \"eslintIgnore in package.json\",\n packageJsonPath,\n slots.cwd\n );\n\n return new ConfigArray(\n ...this._normalizeESLintIgnoreData(data.eslintIgnore, ctx)\n );\n }\n }\n\n return new ConfigArray();\n }\n\n /**\n * Load a given config file.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} Loaded config.\n * @private\n */\n _loadConfigData(ctx) {\n return this._normalizeConfigData(loadConfigFile(ctx.filePath), ctx);\n }\n\n /**\n * Normalize a given `.eslintignore` data to config array elements.\n * @param {string[]} ignorePatterns The patterns to ignore files.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n *_normalizeESLintIgnoreData(ignorePatterns, ctx) {\n const elements = this._normalizeObjectConfigData(\n { ignorePatterns },\n ctx\n );\n\n // Set `ignorePattern.loose` flag for backward compatibility.\n for (const element of elements) {\n if (element.ignorePattern) {\n element.ignorePattern.loose = true;\n }\n yield element;\n }\n }\n\n /**\n * Normalize a given config to an array.\n * @param {ConfigData} configData The config data to normalize.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n _normalizeConfigData(configData, ctx) {\n const validator = new ConfigValidator();\n\n validator.validateConfigSchema(configData, ctx.name || ctx.filePath);\n return this._normalizeObjectConfigData(configData, ctx);\n }\n\n /**\n * Normalize a given config to an array.\n * @param {ConfigData|OverrideConfigData} configData The config data to normalize.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n *_normalizeObjectConfigData(configData, ctx) {\n const { files, excludedFiles, ...configBody } = configData;\n const criteria = OverrideTester.create(\n files,\n excludedFiles,\n ctx.matchBasePath\n );\n const elements = this._normalizeObjectConfigDataBody(configBody, ctx);\n\n // Apply the criteria to every element.\n for (const element of elements) {\n\n /*\n * Merge the criteria.\n * This is for the `overrides` entries that came from the\n * configurations of `overrides[].extends`.\n */\n element.criteria = OverrideTester.and(criteria, element.criteria);\n\n /*\n * Remove `root` property to ignore `root` settings which came from\n * `extends` in `overrides`.\n */\n if (element.criteria) {\n element.root = void 0;\n }\n\n yield element;\n }\n }\n\n /**\n * Normalize a given config to an array.\n * @param {ConfigData} configData The config data to normalize.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n *_normalizeObjectConfigDataBody(\n {\n env,\n extends: extend,\n globals,\n ignorePatterns,\n noInlineConfig,\n parser: parserName,\n parserOptions,\n plugins: pluginList,\n processor,\n reportUnusedDisableDirectives,\n root,\n rules,\n settings,\n overrides: overrideList = []\n },\n ctx\n ) {\n const extendList = Array.isArray(extend) ? extend : [extend];\n const ignorePattern = ignorePatterns && new IgnorePattern(\n Array.isArray(ignorePatterns) ? ignorePatterns : [ignorePatterns],\n ctx.matchBasePath\n );\n\n // Flatten `extends`.\n for (const extendName of extendList.filter(Boolean)) {\n yield* this._loadExtends(extendName, ctx);\n }\n\n // Load parser & plugins.\n const parser = parserName && this._loadParser(parserName, ctx);\n const plugins = pluginList && this._loadPlugins(pluginList, ctx);\n\n // Yield pseudo config data for file extension processors.\n if (plugins) {\n yield* this._takeFileExtensionProcessors(plugins, ctx);\n }\n\n // Yield the config data except `extends` and `overrides`.\n yield {\n\n // Debug information.\n type: ctx.type,\n name: ctx.name,\n filePath: ctx.filePath,\n\n // Config data.\n criteria: null,\n env,\n globals,\n ignorePattern,\n noInlineConfig,\n parser,\n parserOptions,\n plugins,\n processor,\n reportUnusedDisableDirectives,\n root,\n rules,\n settings\n };\n\n // Flatten `overries`.\n for (let i = 0; i < overrideList.length; ++i) {\n yield* this._normalizeObjectConfigData(\n overrideList[i],\n { ...ctx, name: `${ctx.name}#overrides[${i}]` }\n );\n }\n }\n\n /**\n * Load configs of an element in `extends`.\n * @param {string} extendName The name of a base config.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @throws {Error} If the extended config file can't be loaded.\n * @private\n */\n _loadExtends(extendName, ctx) {\n debug(\"Loading {extends:%j} relative to %s\", extendName, ctx.filePath);\n try {\n if (extendName.startsWith(\"eslint:\")) {\n return this._loadExtendedBuiltInConfig(extendName, ctx);\n }\n if (extendName.startsWith(\"plugin:\")) {\n return this._loadExtendedPluginConfig(extendName, ctx);\n }\n return this._loadExtendedShareableConfig(extendName, ctx);\n } catch (error) {\n error.message += `\\nReferenced from: ${ctx.filePath || ctx.name}`;\n throw error;\n }\n }\n\n /**\n * Load configs of an element in `extends`.\n * @param {string} extendName The name of a base config.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @throws {Error} If the extended config file can't be loaded.\n * @private\n */\n _loadExtendedBuiltInConfig(extendName, ctx) {\n const {\n eslintAllPath,\n getEslintAllConfig,\n eslintRecommendedPath,\n getEslintRecommendedConfig\n } = internalSlotsMap.get(this);\n\n if (extendName === \"eslint:recommended\") {\n const name = `${ctx.name} » ${extendName}`;\n\n if (getEslintRecommendedConfig) {\n if (typeof getEslintRecommendedConfig !== \"function\") {\n throw new Error(`getEslintRecommendedConfig must be a function instead of '${getEslintRecommendedConfig}'`);\n }\n return this._normalizeConfigData(getEslintRecommendedConfig(), { ...ctx, name, filePath: \"\" });\n }\n return this._loadConfigData({\n ...ctx,\n name,\n filePath: eslintRecommendedPath\n });\n }\n if (extendName === \"eslint:all\") {\n const name = `${ctx.name} » ${extendName}`;\n\n if (getEslintAllConfig) {\n if (typeof getEslintAllConfig !== \"function\") {\n throw new Error(`getEslintAllConfig must be a function instead of '${getEslintAllConfig}'`);\n }\n return this._normalizeConfigData(getEslintAllConfig(), { ...ctx, name, filePath: \"\" });\n }\n return this._loadConfigData({\n ...ctx,\n name,\n filePath: eslintAllPath\n });\n }\n\n throw configInvalidError(extendName, ctx.name, \"extend-config-missing\");\n }\n\n /**\n * Load configs of an element in `extends`.\n * @param {string} extendName The name of a base config.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @throws {Error} If the extended config file can't be loaded.\n * @private\n */\n _loadExtendedPluginConfig(extendName, ctx) {\n const slashIndex = extendName.lastIndexOf(\"/\");\n\n if (slashIndex === -1) {\n throw configInvalidError(extendName, ctx.filePath, \"plugin-invalid\");\n }\n\n const pluginName = extendName.slice(\"plugin:\".length, slashIndex);\n const configName = extendName.slice(slashIndex + 1);\n\n if (isFilePath(pluginName)) {\n throw new Error(\"'extends' cannot use a file path for plugins.\");\n }\n\n const plugin = this._loadPlugin(pluginName, ctx);\n const configData =\n plugin.definition &&\n plugin.definition.configs[configName];\n\n if (configData) {\n return this._normalizeConfigData(configData, {\n ...ctx,\n filePath: plugin.filePath || ctx.filePath,\n name: `${ctx.name} » plugin:${plugin.id}/${configName}`\n });\n }\n\n throw plugin.error || configInvalidError(extendName, ctx.filePath, \"extend-config-missing\");\n }\n\n /**\n * Load configs of an element in `extends`.\n * @param {string} extendName The name of a base config.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @throws {Error} If the extended config file can't be loaded.\n * @private\n */\n _loadExtendedShareableConfig(extendName, ctx) {\n const { cwd, resolver } = internalSlotsMap.get(this);\n const relativeTo = ctx.filePath || path.join(cwd, \"__placeholder__.js\");\n let request;\n\n if (isFilePath(extendName)) {\n request = extendName;\n } else if (extendName.startsWith(\".\")) {\n request = `./${extendName}`; // For backward compatibility. A ton of tests depended on this behavior.\n } else {\n request = naming.normalizePackageName(\n extendName,\n \"eslint-config\"\n );\n }\n\n let filePath;\n\n try {\n filePath = resolver.resolve(request, relativeTo);\n } catch (error) {\n /* istanbul ignore else */\n if (error && error.code === \"MODULE_NOT_FOUND\") {\n throw configInvalidError(extendName, ctx.filePath, \"extend-config-missing\");\n }\n throw error;\n }\n\n writeDebugLogForLoading(request, relativeTo, filePath);\n return this._loadConfigData({\n ...ctx,\n filePath,\n name: `${ctx.name} » ${request}`\n });\n }\n\n /**\n * Load given plugins.\n * @param {string[]} names The plugin names to load.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {Record} The loaded parser.\n * @private\n */\n _loadPlugins(names, ctx) {\n return names.reduce((map, name) => {\n if (isFilePath(name)) {\n throw new Error(\"Plugins array cannot includes file paths.\");\n }\n const plugin = this._loadPlugin(name, ctx);\n\n map[plugin.id] = plugin;\n\n return map;\n }, {});\n }\n\n /**\n * Load a given parser.\n * @param {string} nameOrPath The package name or the path to a parser file.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {DependentParser} The loaded parser.\n */\n _loadParser(nameOrPath, ctx) {\n debug(\"Loading parser %j from %s\", nameOrPath, ctx.filePath);\n\n const { cwd, resolver } = internalSlotsMap.get(this);\n const relativeTo = ctx.filePath || path.join(cwd, \"__placeholder__.js\");\n\n try {\n const filePath = resolver.resolve(nameOrPath, relativeTo);\n\n writeDebugLogForLoading(nameOrPath, relativeTo, filePath);\n\n return new ConfigDependency({\n definition: require(filePath),\n filePath,\n id: nameOrPath,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n } catch (error) {\n\n // If the parser name is \"espree\", load the espree of ESLint.\n if (nameOrPath === \"espree\") {\n debug(\"Fallback espree.\");\n return new ConfigDependency({\n definition: require(\"espree\"),\n filePath: require.resolve(\"espree\"),\n id: nameOrPath,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n\n debug(\"Failed to load parser '%s' declared in '%s'.\", nameOrPath, ctx.name);\n error.message = `Failed to load parser '${nameOrPath}' declared in '${ctx.name}': ${error.message}`;\n\n return new ConfigDependency({\n error,\n id: nameOrPath,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n }\n\n /**\n * Load a given plugin.\n * @param {string} name The plugin name to load.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {DependentPlugin} The loaded plugin.\n * @private\n */\n _loadPlugin(name, ctx) {\n debug(\"Loading plugin %j from %s\", name, ctx.filePath);\n\n const { additionalPluginPool, resolver } = internalSlotsMap.get(this);\n const request = naming.normalizePackageName(name, \"eslint-plugin\");\n const id = naming.getShorthandName(request, \"eslint-plugin\");\n const relativeTo = path.join(ctx.pluginBasePath, \"__placeholder__.js\");\n\n if (name.match(/\\s+/u)) {\n const error = Object.assign(\n new Error(`Whitespace found in plugin name '${name}'`),\n {\n messageTemplate: \"whitespace-found\",\n messageData: { pluginName: request }\n }\n );\n\n return new ConfigDependency({\n error,\n id,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n\n // Check for additional pool.\n const plugin =\n additionalPluginPool.get(request) ||\n additionalPluginPool.get(id);\n\n if (plugin) {\n return new ConfigDependency({\n definition: normalizePlugin(plugin),\n original: plugin,\n filePath: \"\", // It's unknown where the plugin came from.\n id,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n\n let filePath;\n let error;\n\n try {\n filePath = resolver.resolve(request, relativeTo);\n } catch (resolveError) {\n error = resolveError;\n /* istanbul ignore else */\n if (error && error.code === \"MODULE_NOT_FOUND\") {\n error.messageTemplate = \"plugin-missing\";\n error.messageData = {\n pluginName: request,\n resolvePluginsRelativeTo: ctx.pluginBasePath,\n importerName: ctx.name\n };\n }\n }\n\n if (filePath) {\n try {\n writeDebugLogForLoading(request, relativeTo, filePath);\n\n const startTime = Date.now();\n const pluginDefinition = require(filePath);\n\n debug(`Plugin ${filePath} loaded in: ${Date.now() - startTime}ms`);\n\n return new ConfigDependency({\n definition: normalizePlugin(pluginDefinition),\n original: pluginDefinition,\n filePath,\n id,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n } catch (loadError) {\n error = loadError;\n }\n }\n\n debug(\"Failed to load plugin '%s' declared in '%s'.\", name, ctx.name);\n error.message = `Failed to load plugin '${name}' declared in '${ctx.name}': ${error.message}`;\n return new ConfigDependency({\n error,\n id,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n\n /**\n * Take file expression processors as config array elements.\n * @param {Record} plugins The plugin definitions.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The config array elements of file expression processors.\n * @private\n */\n *_takeFileExtensionProcessors(plugins, ctx) {\n for (const pluginId of Object.keys(plugins)) {\n const processors =\n plugins[pluginId] &&\n plugins[pluginId].definition &&\n plugins[pluginId].definition.processors;\n\n if (!processors) {\n continue;\n }\n\n for (const processorId of Object.keys(processors)) {\n if (processorId.startsWith(\".\")) {\n yield* this._normalizeObjectConfigData(\n {\n files: [`*${processorId}`],\n processor: `${pluginId}/${processorId}`\n },\n {\n ...ctx,\n type: \"implicit-processor\",\n name: `${ctx.name}#processors[\"${pluginId}/${processorId}\"]`\n }\n );\n }\n }\n }\n }\n}\n\nexport {\n ConfigArrayFactory,\n createContext,\n loadConfigFile\n};\n","/**\n * @fileoverview `CascadingConfigArrayFactory` class.\n *\n * `CascadingConfigArrayFactory` class has a responsibility:\n *\n * 1. Handles cascading of config files.\n *\n * It provides two methods:\n *\n * - `getConfigArrayForFile(filePath)`\n * Get the corresponded configuration of a given file. This method doesn't\n * throw even if the given file didn't exist.\n * - `clearCache()`\n * Clear the internal cache. You have to call this method when\n * `additionalPluginPool` was updated if `baseConfig` or `cliConfig` depends\n * on the additional plugins. (`CLIEngine#addPlugin()` method calls this.)\n *\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport debugOrig from \"debug\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport { ConfigArrayFactory } from \"./config-array-factory.js\";\nimport {\n ConfigArray,\n ConfigDependency,\n IgnorePattern\n} from \"./config-array/index.js\";\nimport ConfigValidator from \"./shared/config-validator.js\";\nimport { emitDeprecationWarning } from \"./shared/deprecation-warnings.js\";\n\nconst debug = debugOrig(\"eslintrc:cascading-config-array-factory\");\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n// Define types for VSCode IntelliSense.\n/** @typedef {import(\"./shared/types\").ConfigData} ConfigData */\n/** @typedef {import(\"./shared/types\").Parser} Parser */\n/** @typedef {import(\"./shared/types\").Plugin} Plugin */\n/** @typedef {import(\"./shared/types\").Rule} Rule */\n/** @typedef {ReturnType} ConfigArray */\n\n/**\n * @typedef {Object} CascadingConfigArrayFactoryOptions\n * @property {Map} [additionalPluginPool] The map for additional plugins.\n * @property {ConfigData} [baseConfig] The config by `baseConfig` option.\n * @property {ConfigData} [cliConfig] The config by CLI options (`--env`, `--global`, `--ignore-pattern`, `--parser`, `--parser-options`, `--plugin`, and `--rule`). CLI options overwrite the setting in config files.\n * @property {string} [cwd] The base directory to start lookup.\n * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.\n * @property {string[]} [rulePaths] The value of `--rulesdir` option.\n * @property {string} [specificConfigPath] The value of `--config` option.\n * @property {boolean} [useEslintrc] if `false` then it doesn't load config files.\n * @property {Function} loadRules The function to use to load rules.\n * @property {Map} builtInRules The rules that are built in to ESLint.\n * @property {Object} [resolver=ModuleResolver] The module resolver object.\n * @property {string} eslintAllPath The path to the definitions for eslint:all.\n * @property {Function} getEslintAllConfig Returns the config data for eslint:all.\n * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.\n * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.\n */\n\n/**\n * @typedef {Object} CascadingConfigArrayFactoryInternalSlots\n * @property {ConfigArray} baseConfigArray The config array of `baseConfig` option.\n * @property {ConfigData} baseConfigData The config data of `baseConfig` option. This is used to reset `baseConfigArray`.\n * @property {ConfigArray} cliConfigArray The config array of CLI options.\n * @property {ConfigData} cliConfigData The config data of CLI options. This is used to reset `cliConfigArray`.\n * @property {ConfigArrayFactory} configArrayFactory The factory for config arrays.\n * @property {Map} configCache The cache from directory paths to config arrays.\n * @property {string} cwd The base directory to start lookup.\n * @property {WeakMap} finalizeCache The cache from config arrays to finalized config arrays.\n * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.\n * @property {string[]|null} rulePaths The value of `--rulesdir` option. This is used to reset `baseConfigArray`.\n * @property {string|null} specificConfigPath The value of `--config` option. This is used to reset `cliConfigArray`.\n * @property {boolean} useEslintrc if `false` then it doesn't load config files.\n * @property {Function} loadRules The function to use to load rules.\n * @property {Map} builtInRules The rules that are built in to ESLint.\n * @property {Object} [resolver=ModuleResolver] The module resolver object.\n * @property {string} eslintAllPath The path to the definitions for eslint:all.\n * @property {Function} getEslintAllConfig Returns the config data for eslint:all.\n * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.\n * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.\n */\n\n/** @type {WeakMap} */\nconst internalSlotsMap = new WeakMap();\n\n/**\n * Create the config array from `baseConfig` and `rulePaths`.\n * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.\n * @returns {ConfigArray} The config array of the base configs.\n */\nfunction createBaseConfigArray({\n configArrayFactory,\n baseConfigData,\n rulePaths,\n cwd,\n loadRules\n}) {\n const baseConfigArray = configArrayFactory.create(\n baseConfigData,\n { name: \"BaseConfig\" }\n );\n\n /*\n * Create the config array element for the default ignore patterns.\n * This element has `ignorePattern` property that ignores the default\n * patterns in the current working directory.\n */\n baseConfigArray.unshift(configArrayFactory.create(\n { ignorePatterns: IgnorePattern.DefaultPatterns },\n { name: \"DefaultIgnorePattern\" }\n )[0]);\n\n /*\n * Load rules `--rulesdir` option as a pseudo plugin.\n * Use a pseudo plugin to define rules of `--rulesdir`, so we can validate\n * the rule's options with only information in the config array.\n */\n if (rulePaths && rulePaths.length > 0) {\n baseConfigArray.push({\n type: \"config\",\n name: \"--rulesdir\",\n filePath: \"\",\n plugins: {\n \"\": new ConfigDependency({\n definition: {\n rules: rulePaths.reduce(\n (map, rulesPath) => Object.assign(\n map,\n loadRules(rulesPath, cwd)\n ),\n {}\n )\n },\n filePath: \"\",\n id: \"\",\n importerName: \"--rulesdir\",\n importerPath: \"\"\n })\n }\n });\n }\n\n return baseConfigArray;\n}\n\n/**\n * Create the config array from CLI options.\n * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.\n * @returns {ConfigArray} The config array of the base configs.\n */\nfunction createCLIConfigArray({\n cliConfigData,\n configArrayFactory,\n cwd,\n ignorePath,\n specificConfigPath\n}) {\n const cliConfigArray = configArrayFactory.create(\n cliConfigData,\n { name: \"CLIOptions\" }\n );\n\n cliConfigArray.unshift(\n ...(ignorePath\n ? configArrayFactory.loadESLintIgnore(ignorePath)\n : configArrayFactory.loadDefaultESLintIgnore())\n );\n\n if (specificConfigPath) {\n cliConfigArray.unshift(\n ...configArrayFactory.loadFile(\n specificConfigPath,\n { name: \"--config\", basePath: cwd }\n )\n );\n }\n\n return cliConfigArray;\n}\n\n/**\n * The error type when there are files matched by a glob, but all of them have been ignored.\n */\nclass ConfigurationNotFoundError extends Error {\n\n\n /**\n * @param {string} directoryPath The directory path.\n */\n constructor(directoryPath) {\n super(`No ESLint configuration found in ${directoryPath}.`);\n this.messageTemplate = \"no-config-found\";\n this.messageData = { directoryPath };\n }\n}\n\n/**\n * This class provides the functionality that enumerates every file which is\n * matched by given glob patterns and that configuration.\n */\nclass CascadingConfigArrayFactory {\n\n /**\n * Initialize this enumerator.\n * @param {CascadingConfigArrayFactoryOptions} options The options.\n */\n constructor({\n additionalPluginPool = new Map(),\n baseConfig: baseConfigData = null,\n cliConfig: cliConfigData = null,\n cwd = process.cwd(),\n ignorePath,\n resolvePluginsRelativeTo,\n rulePaths = [],\n specificConfigPath = null,\n useEslintrc = true,\n builtInRules = new Map(),\n loadRules,\n resolver,\n eslintRecommendedPath,\n getEslintRecommendedConfig,\n eslintAllPath,\n getEslintAllConfig\n } = {}) {\n const configArrayFactory = new ConfigArrayFactory({\n additionalPluginPool,\n cwd,\n resolvePluginsRelativeTo,\n builtInRules,\n resolver,\n eslintRecommendedPath,\n getEslintRecommendedConfig,\n eslintAllPath,\n getEslintAllConfig\n });\n\n internalSlotsMap.set(this, {\n baseConfigArray: createBaseConfigArray({\n baseConfigData,\n configArrayFactory,\n cwd,\n rulePaths,\n loadRules\n }),\n baseConfigData,\n cliConfigArray: createCLIConfigArray({\n cliConfigData,\n configArrayFactory,\n cwd,\n ignorePath,\n specificConfigPath\n }),\n cliConfigData,\n configArrayFactory,\n configCache: new Map(),\n cwd,\n finalizeCache: new WeakMap(),\n ignorePath,\n rulePaths,\n specificConfigPath,\n useEslintrc,\n builtInRules,\n loadRules\n });\n }\n\n /**\n * The path to the current working directory.\n * This is used by tests.\n * @type {string}\n */\n get cwd() {\n const { cwd } = internalSlotsMap.get(this);\n\n return cwd;\n }\n\n /**\n * Get the config array of a given file.\n * If `filePath` was not given, it returns the config which contains only\n * `baseConfigData` and `cliConfigData`.\n * @param {string} [filePath] The file path to a file.\n * @param {Object} [options] The options.\n * @param {boolean} [options.ignoreNotFoundError] If `true` then it doesn't throw `ConfigurationNotFoundError`.\n * @returns {ConfigArray} The config array of the file.\n */\n getConfigArrayForFile(filePath, { ignoreNotFoundError = false } = {}) {\n const {\n baseConfigArray,\n cliConfigArray,\n cwd\n } = internalSlotsMap.get(this);\n\n if (!filePath) {\n return new ConfigArray(...baseConfigArray, ...cliConfigArray);\n }\n\n const directoryPath = path.dirname(path.resolve(cwd, filePath));\n\n debug(`Load config files for ${directoryPath}.`);\n\n return this._finalizeConfigArray(\n this._loadConfigInAncestors(directoryPath),\n directoryPath,\n ignoreNotFoundError\n );\n }\n\n /**\n * Set the config data to override all configs.\n * Require to call `clearCache()` method after this method is called.\n * @param {ConfigData} configData The config data to override all configs.\n * @returns {void}\n */\n setOverrideConfig(configData) {\n const slots = internalSlotsMap.get(this);\n\n slots.cliConfigData = configData;\n }\n\n /**\n * Clear config cache.\n * @returns {void}\n */\n clearCache() {\n const slots = internalSlotsMap.get(this);\n\n slots.baseConfigArray = createBaseConfigArray(slots);\n slots.cliConfigArray = createCLIConfigArray(slots);\n slots.configCache.clear();\n }\n\n /**\n * Load and normalize config files from the ancestor directories.\n * @param {string} directoryPath The path to a leaf directory.\n * @param {boolean} configsExistInSubdirs `true` if configurations exist in subdirectories.\n * @returns {ConfigArray} The loaded config.\n * @throws {Error} If a config file is invalid.\n * @private\n */\n _loadConfigInAncestors(directoryPath, configsExistInSubdirs = false) {\n const {\n baseConfigArray,\n configArrayFactory,\n configCache,\n cwd,\n useEslintrc\n } = internalSlotsMap.get(this);\n\n if (!useEslintrc) {\n return baseConfigArray;\n }\n\n let configArray = configCache.get(directoryPath);\n\n // Hit cache.\n if (configArray) {\n debug(`Cache hit: ${directoryPath}.`);\n return configArray;\n }\n debug(`No cache found: ${directoryPath}.`);\n\n const homePath = os.homedir();\n\n // Consider this is root.\n if (directoryPath === homePath && cwd !== homePath) {\n debug(\"Stop traversing because of considered root.\");\n if (configsExistInSubdirs) {\n const filePath = ConfigArrayFactory.getPathToConfigFileInDirectory(directoryPath);\n\n if (filePath) {\n emitDeprecationWarning(\n filePath,\n \"ESLINT_PERSONAL_CONFIG_SUPPRESS\"\n );\n }\n }\n return this._cacheConfig(directoryPath, baseConfigArray);\n }\n\n // Load the config on this directory.\n try {\n configArray = configArrayFactory.loadInDirectory(directoryPath);\n } catch (error) {\n /* istanbul ignore next */\n if (error.code === \"EACCES\") {\n debug(\"Stop traversing because of 'EACCES' error.\");\n return this._cacheConfig(directoryPath, baseConfigArray);\n }\n throw error;\n }\n\n if (configArray.length > 0 && configArray.isRoot()) {\n debug(\"Stop traversing because of 'root:true'.\");\n configArray.unshift(...baseConfigArray);\n return this._cacheConfig(directoryPath, configArray);\n }\n\n // Load from the ancestors and merge it.\n const parentPath = path.dirname(directoryPath);\n const parentConfigArray = parentPath && parentPath !== directoryPath\n ? this._loadConfigInAncestors(\n parentPath,\n configsExistInSubdirs || configArray.length > 0\n )\n : baseConfigArray;\n\n if (configArray.length > 0) {\n configArray.unshift(...parentConfigArray);\n } else {\n configArray = parentConfigArray;\n }\n\n // Cache and return.\n return this._cacheConfig(directoryPath, configArray);\n }\n\n /**\n * Freeze and cache a given config.\n * @param {string} directoryPath The path to a directory as a cache key.\n * @param {ConfigArray} configArray The config array as a cache value.\n * @returns {ConfigArray} The `configArray` (frozen).\n */\n _cacheConfig(directoryPath, configArray) {\n const { configCache } = internalSlotsMap.get(this);\n\n Object.freeze(configArray);\n configCache.set(directoryPath, configArray);\n\n return configArray;\n }\n\n /**\n * Finalize a given config array.\n * Concatenate `--config` and other CLI options.\n * @param {ConfigArray} configArray The parent config array.\n * @param {string} directoryPath The path to the leaf directory to find config files.\n * @param {boolean} ignoreNotFoundError If `true` then it doesn't throw `ConfigurationNotFoundError`.\n * @returns {ConfigArray} The loaded config.\n * @throws {Error} If a config file is invalid.\n * @private\n */\n _finalizeConfigArray(configArray, directoryPath, ignoreNotFoundError) {\n const {\n cliConfigArray,\n configArrayFactory,\n finalizeCache,\n useEslintrc,\n builtInRules\n } = internalSlotsMap.get(this);\n\n let finalConfigArray = finalizeCache.get(configArray);\n\n if (!finalConfigArray) {\n finalConfigArray = configArray;\n\n // Load the personal config if there are no regular config files.\n if (\n useEslintrc &&\n configArray.every(c => !c.filePath) &&\n cliConfigArray.every(c => !c.filePath) // `--config` option can be a file.\n ) {\n const homePath = os.homedir();\n\n debug(\"Loading the config file of the home directory:\", homePath);\n\n const personalConfigArray = configArrayFactory.loadInDirectory(\n homePath,\n { name: \"PersonalConfig\" }\n );\n\n if (\n personalConfigArray.length > 0 &&\n !directoryPath.startsWith(homePath)\n ) {\n const lastElement =\n personalConfigArray.at(-1);\n\n emitDeprecationWarning(\n lastElement.filePath,\n \"ESLINT_PERSONAL_CONFIG_LOAD\"\n );\n }\n\n finalConfigArray = finalConfigArray.concat(personalConfigArray);\n }\n\n // Apply CLI options.\n if (cliConfigArray.length > 0) {\n finalConfigArray = finalConfigArray.concat(cliConfigArray);\n }\n\n // Validate rule settings and environments.\n const validator = new ConfigValidator({\n builtInRules\n });\n\n validator.validateConfigArray(finalConfigArray);\n\n // Cache it.\n Object.freeze(finalConfigArray);\n finalizeCache.set(configArray, finalConfigArray);\n\n debug(\n \"Configuration was determined: %o on %s\",\n finalConfigArray,\n directoryPath\n );\n }\n\n // At least one element (the default ignore patterns) exists.\n if (!ignoreNotFoundError && useEslintrc && finalConfigArray.length <= 1) {\n throw new ConfigurationNotFoundError(directoryPath);\n }\n\n return finalConfigArray;\n }\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport { CascadingConfigArrayFactory };\n","/**\n * @fileoverview Compatibility class for flat config.\n * @author Nicholas C. Zakas\n */\n\n//-----------------------------------------------------------------------------\n// Requirements\n//-----------------------------------------------------------------------------\n\nimport createDebug from \"debug\";\nimport path from \"node:path\";\n\nimport environments from \"../conf/environments.js\";\nimport { ConfigArrayFactory } from \"./config-array-factory.js\";\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\n/** @typedef {import(\"../../shared/types\").Environment} Environment */\n/** @typedef {import(\"../../shared/types\").Processor} Processor */\n\nconst debug = createDebug(\"eslintrc:flat-compat\");\nconst cafactory = Symbol(\"cafactory\");\n\n/**\n * Translates an ESLintRC-style config object into a flag-config-style config\n * object.\n * @param {Object} eslintrcConfig An ESLintRC-style config object.\n * @param {Object} options Options to help translate the config.\n * @param {string} options.resolveConfigRelativeTo To the directory to resolve\n * configs from.\n * @param {string} options.resolvePluginsRelativeTo The directory to resolve\n * plugins from.\n * @param {ReadOnlyMap} options.pluginEnvironments A map of plugin environment\n * names to objects.\n * @param {ReadOnlyMap} options.pluginProcessors A map of plugin processor\n * names to objects.\n * @returns {Object} A flag-config-style config object.\n * @throws {Error} If a plugin or environment cannot be resolved.\n */\nfunction translateESLintRC(eslintrcConfig, {\n resolveConfigRelativeTo,\n resolvePluginsRelativeTo,\n pluginEnvironments,\n pluginProcessors\n}) {\n\n const flatConfig = {};\n const configs = [];\n const languageOptions = {};\n const linterOptions = {};\n const keysToCopy = [\"settings\", \"rules\", \"processor\"];\n const languageOptionsKeysToCopy = [\"globals\", \"parser\", \"parserOptions\"];\n const linterOptionsKeysToCopy = [\"noInlineConfig\", \"reportUnusedDisableDirectives\"];\n\n // copy over simple translations\n for (const key of keysToCopy) {\n if (key in eslintrcConfig && typeof eslintrcConfig[key] !== \"undefined\") {\n flatConfig[key] = eslintrcConfig[key];\n }\n }\n\n // copy over languageOptions\n for (const key of languageOptionsKeysToCopy) {\n if (key in eslintrcConfig && typeof eslintrcConfig[key] !== \"undefined\") {\n\n // create the languageOptions key in the flat config\n flatConfig.languageOptions = languageOptions;\n\n if (key === \"parser\") {\n debug(`Resolving parser '${languageOptions[key]}' relative to ${resolveConfigRelativeTo}`);\n\n if (eslintrcConfig[key].error) {\n throw eslintrcConfig[key].error;\n }\n\n languageOptions[key] = eslintrcConfig[key].definition;\n continue;\n }\n\n // clone any object values that are in the eslintrc config\n if (eslintrcConfig[key] && typeof eslintrcConfig[key] === \"object\") {\n languageOptions[key] = {\n ...eslintrcConfig[key]\n };\n } else {\n languageOptions[key] = eslintrcConfig[key];\n }\n }\n }\n\n // copy over linterOptions\n for (const key of linterOptionsKeysToCopy) {\n if (key in eslintrcConfig && typeof eslintrcConfig[key] !== \"undefined\") {\n flatConfig.linterOptions = linterOptions;\n linterOptions[key] = eslintrcConfig[key];\n }\n }\n\n // move ecmaVersion a level up\n if (languageOptions.parserOptions) {\n\n if (\"ecmaVersion\" in languageOptions.parserOptions) {\n languageOptions.ecmaVersion = languageOptions.parserOptions.ecmaVersion;\n delete languageOptions.parserOptions.ecmaVersion;\n }\n\n if (\"sourceType\" in languageOptions.parserOptions) {\n languageOptions.sourceType = languageOptions.parserOptions.sourceType;\n delete languageOptions.parserOptions.sourceType;\n }\n\n // check to see if we even need parserOptions anymore and remove it if not\n if (Object.keys(languageOptions.parserOptions).length === 0) {\n delete languageOptions.parserOptions;\n }\n }\n\n // overrides\n if (eslintrcConfig.criteria) {\n flatConfig.files = [absoluteFilePath => eslintrcConfig.criteria.test(absoluteFilePath)];\n }\n\n // translate plugins\n if (eslintrcConfig.plugins && typeof eslintrcConfig.plugins === \"object\") {\n debug(`Translating plugins: ${eslintrcConfig.plugins}`);\n\n flatConfig.plugins = {};\n\n for (const pluginName of Object.keys(eslintrcConfig.plugins)) {\n\n debug(`Translating plugin: ${pluginName}`);\n debug(`Resolving plugin '${pluginName} relative to ${resolvePluginsRelativeTo}`);\n\n const { original: plugin, error } = eslintrcConfig.plugins[pluginName];\n\n if (error) {\n throw error;\n }\n\n flatConfig.plugins[pluginName] = plugin;\n\n // create a config for any processors\n if (plugin.processors) {\n for (const processorName of Object.keys(plugin.processors)) {\n if (processorName.startsWith(\".\")) {\n debug(`Assigning processor: ${pluginName}/${processorName}`);\n\n configs.unshift({\n files: [`**/*${processorName}`],\n processor: pluginProcessors.get(`${pluginName}/${processorName}`)\n });\n }\n\n }\n }\n }\n }\n\n // translate env - must come after plugins\n if (eslintrcConfig.env && typeof eslintrcConfig.env === \"object\") {\n for (const envName of Object.keys(eslintrcConfig.env)) {\n\n // only add environments that are true\n if (eslintrcConfig.env[envName]) {\n debug(`Translating environment: ${envName}`);\n\n if (environments.has(envName)) {\n\n // built-in environments should be defined first\n configs.unshift(...translateESLintRC({\n criteria: eslintrcConfig.criteria,\n ...environments.get(envName)\n }, {\n resolveConfigRelativeTo,\n resolvePluginsRelativeTo\n }));\n } else if (pluginEnvironments.has(envName)) {\n\n // if the environment comes from a plugin, it should come after the plugin config\n configs.push(...translateESLintRC({\n criteria: eslintrcConfig.criteria,\n ...pluginEnvironments.get(envName)\n }, {\n resolveConfigRelativeTo,\n resolvePluginsRelativeTo\n }));\n }\n }\n }\n }\n\n // only add if there are actually keys in the config\n if (Object.keys(flatConfig).length > 0) {\n configs.push(flatConfig);\n }\n\n return configs;\n}\n\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\n/**\n * A compatibility class for working with configs.\n */\nclass FlatCompat {\n\n constructor({\n baseDirectory = process.cwd(),\n resolvePluginsRelativeTo = baseDirectory,\n recommendedConfig,\n allConfig\n } = {}) {\n this.baseDirectory = baseDirectory;\n this.resolvePluginsRelativeTo = resolvePluginsRelativeTo;\n this[cafactory] = new ConfigArrayFactory({\n cwd: baseDirectory,\n resolvePluginsRelativeTo,\n getEslintAllConfig() {\n\n if (!allConfig) {\n throw new TypeError(\"Missing parameter 'allConfig' in FlatCompat constructor.\");\n }\n\n return allConfig;\n },\n getEslintRecommendedConfig() {\n\n if (!recommendedConfig) {\n throw new TypeError(\"Missing parameter 'recommendedConfig' in FlatCompat constructor.\");\n }\n\n return recommendedConfig;\n }\n });\n }\n\n /**\n * Translates an ESLintRC-style config into a flag-config-style config.\n * @param {Object} eslintrcConfig The ESLintRC-style config object.\n * @returns {Object} A flag-config-style config object.\n */\n config(eslintrcConfig) {\n const eslintrcArray = this[cafactory].create(eslintrcConfig, {\n basePath: this.baseDirectory\n });\n\n const flatArray = [];\n let hasIgnorePatterns = false;\n\n eslintrcArray.forEach(configData => {\n if (configData.type === \"config\") {\n hasIgnorePatterns = hasIgnorePatterns || configData.ignorePattern;\n flatArray.push(...translateESLintRC(configData, {\n resolveConfigRelativeTo: path.join(this.baseDirectory, \"__placeholder.js\"),\n resolvePluginsRelativeTo: path.join(this.resolvePluginsRelativeTo, \"__placeholder.js\"),\n pluginEnvironments: eslintrcArray.pluginEnvironments,\n pluginProcessors: eslintrcArray.pluginProcessors\n }));\n }\n });\n\n // combine ignorePatterns to emulate ESLintRC behavior better\n if (hasIgnorePatterns) {\n flatArray.unshift({\n ignores: [filePath => {\n\n // Compute the final config for this file.\n // This filters config array elements by `files`/`excludedFiles` then merges the elements.\n const finalConfig = eslintrcArray.extractConfig(filePath);\n\n // Test the `ignorePattern` properties of the final config.\n return Boolean(finalConfig.ignores) && finalConfig.ignores(filePath);\n }]\n });\n }\n\n return flatArray;\n }\n\n /**\n * Translates the `env` section of an ESLintRC-style config.\n * @param {Object} envConfig The `env` section of an ESLintRC config.\n * @returns {Object[]} An array of flag-config objects representing the environments.\n */\n env(envConfig) {\n return this.config({\n env: envConfig\n });\n }\n\n /**\n * Translates the `extends` section of an ESLintRC-style config.\n * @param {...string} configsToExtend The names of the configs to load.\n * @returns {Object[]} An array of flag-config objects representing the config.\n */\n extends(...configsToExtend) {\n return this.config({\n extends: configsToExtend\n });\n }\n\n /**\n * Translates the `plugins` section of an ESLintRC-style config.\n * @param {...string} plugins The names of the plugins to load.\n * @returns {Object[]} An array of flag-config objects representing the plugins.\n */\n plugins(...plugins) {\n return this.config({\n plugins\n });\n }\n}\n\nexport { FlatCompat };\n","/**\n * @fileoverview Package exports for @eslint/eslintrc\n * @author Nicholas C. Zakas\n */\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport {\n ConfigArrayFactory,\n createContext as createConfigArrayFactoryContext,\n loadConfigFile\n} from \"./config-array-factory.js\";\n\nimport { CascadingConfigArrayFactory } from \"./cascading-config-array-factory.js\";\nimport * as ModuleResolver from \"./shared/relative-module-resolver.js\";\nimport { ConfigArray, getUsedExtractedConfigs } from \"./config-array/index.js\";\nimport { ConfigDependency } from \"./config-array/config-dependency.js\";\nimport { ExtractedConfig } from \"./config-array/extracted-config.js\";\nimport { IgnorePattern } from \"./config-array/ignore-pattern.js\";\nimport { OverrideTester } from \"./config-array/override-tester.js\";\nimport * as ConfigOps from \"./shared/config-ops.js\";\nimport ConfigValidator from \"./shared/config-validator.js\";\nimport * as naming from \"./shared/naming.js\";\nimport { FlatCompat } from \"./flat-compat.js\";\nimport environments from \"../conf/environments.js\";\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\nconst Legacy = {\n ConfigArray,\n createConfigArrayFactoryContext,\n CascadingConfigArrayFactory,\n ConfigArrayFactory,\n ConfigDependency,\n ExtractedConfig,\n IgnorePattern,\n OverrideTester,\n getUsedExtractedConfigs,\n environments,\n loadConfigFile,\n\n // shared\n ConfigOps,\n ConfigValidator,\n ModuleResolver,\n naming\n};\n\nexport {\n\n Legacy,\n\n FlatCompat\n\n};\n"],"names":["debug","debugOrig","path","ignore","assert","internalSlotsMap","util","minimatch","Ajv","globals","BuiltInEnvironments","ConfigOps.normalizeConfigGlobal","Module","require","createRequire","fs","stripComments","importFresh","ModuleResolver.resolve","naming.normalizePackageName","naming.getShorthandName","os","createDebug","createConfigArrayFactoryContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA,MAAMA,OAAK,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C,IAAI,2BAA2B;AAC/B,IAAI,kBAAkB;AACtB,IAAI,gBAAgB;AACpB,IAAI,eAAe;AACnB,IAAI,aAAa;AACjB,IAAI,cAAc;AAClB,IAAI,uBAAuB;AAC3B,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB;AACA;AACA,IAAI,SAAS;AACb,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,IAAI,MAAM;AACV;;;;;"} \ No newline at end of file diff --git a/slider/node_modules/@eslint/eslintrc/dist/eslintrc.d.cts b/slider/node_modules/@eslint/eslintrc/dist/eslintrc.d.cts new file mode 100644 index 0000000..f723ae6 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/dist/eslintrc.d.cts @@ -0,0 +1,76 @@ +/** + * @fileoverview This file contains the core types for ESLint. It was initially extracted + * from the `@types/eslint__eslintrc` package. + */ + +/* + * MIT License + * Copyright (c) Microsoft Corporation. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE + */ + +import type { Linter } from "eslint"; + +/** + * A compatibility class for working with configs. + */ +export class FlatCompat { + constructor({ + baseDirectory, + resolvePluginsRelativeTo, + recommendedConfig, + allConfig, + }?: { + /** + * default: process.cwd() + */ + baseDirectory?: string; + resolvePluginsRelativeTo?: string; + recommendedConfig?: Linter.LegacyConfig; + allConfig?: Linter.LegacyConfig; + }); + + /** + * Translates an ESLintRC-style config into a flag-config-style config. + * @param eslintrcConfig The ESLintRC-style config object. + * @returns A flag-config-style config object. + */ + config(eslintrcConfig: Linter.LegacyConfig): Linter.Config[]; + + /** + * Translates the `env` section of an ESLintRC-style config. + * @param envConfig The `env` section of an ESLintRC config. + * @returns An array of flag-config objects representing the environments. + */ + env(envConfig: { [name: string]: boolean }): Linter.Config[]; + + /** + * Translates the `extends` section of an ESLintRC-style config. + * @param configsToExtend The names of the configs to load. + * @returns An array of flag-config objects representing the config. + */ + extends(...configsToExtend: string[]): Linter.Config[]; + + /** + * Translates the `plugins` section of an ESLintRC-style config. + * @param plugins The names of the plugins to load. + * @returns An array of flag-config objects representing the plugins. + */ + plugins(...plugins: string[]): Linter.Config[]; +} diff --git a/slider/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js b/slider/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js new file mode 100644 index 0000000..06110a1 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js @@ -0,0 +1,534 @@ +/** + * @fileoverview `CascadingConfigArrayFactory` class. + * + * `CascadingConfigArrayFactory` class has a responsibility: + * + * 1. Handles cascading of config files. + * + * It provides two methods: + * + * - `getConfigArrayForFile(filePath)` + * Get the corresponded configuration of a given file. This method doesn't + * throw even if the given file didn't exist. + * - `clearCache()` + * Clear the internal cache. You have to call this method when + * `additionalPluginPool` was updated if `baseConfig` or `cliConfig` depends + * on the additional plugins. (`CLIEngine#addPlugin()` method calls this.) + * + * @author Toru Nagashima + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +import debugOrig from "debug"; +import os from "node:os"; +import path from "node:path"; + +import { ConfigArrayFactory } from "./config-array-factory.js"; +import { + ConfigArray, + ConfigDependency, + IgnorePattern +} from "./config-array/index.js"; +import ConfigValidator from "./shared/config-validator.js"; +import { emitDeprecationWarning } from "./shared/deprecation-warnings.js"; + +const debug = debugOrig("eslintrc:cascading-config-array-factory"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +// Define types for VSCode IntelliSense. +/** @typedef {import("./shared/types").ConfigData} ConfigData */ +/** @typedef {import("./shared/types").Parser} Parser */ +/** @typedef {import("./shared/types").Plugin} Plugin */ +/** @typedef {import("./shared/types").Rule} Rule */ +/** @typedef {ReturnType} ConfigArray */ + +/** + * @typedef {Object} CascadingConfigArrayFactoryOptions + * @property {Map} [additionalPluginPool] The map for additional plugins. + * @property {ConfigData} [baseConfig] The config by `baseConfig` option. + * @property {ConfigData} [cliConfig] The config by CLI options (`--env`, `--global`, `--ignore-pattern`, `--parser`, `--parser-options`, `--plugin`, and `--rule`). CLI options overwrite the setting in config files. + * @property {string} [cwd] The base directory to start lookup. + * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`. + * @property {string[]} [rulePaths] The value of `--rulesdir` option. + * @property {string} [specificConfigPath] The value of `--config` option. + * @property {boolean} [useEslintrc] if `false` then it doesn't load config files. + * @property {Function} loadRules The function to use to load rules. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. + */ + +/** + * @typedef {Object} CascadingConfigArrayFactoryInternalSlots + * @property {ConfigArray} baseConfigArray The config array of `baseConfig` option. + * @property {ConfigData} baseConfigData The config data of `baseConfig` option. This is used to reset `baseConfigArray`. + * @property {ConfigArray} cliConfigArray The config array of CLI options. + * @property {ConfigData} cliConfigData The config data of CLI options. This is used to reset `cliConfigArray`. + * @property {ConfigArrayFactory} configArrayFactory The factory for config arrays. + * @property {Map} configCache The cache from directory paths to config arrays. + * @property {string} cwd The base directory to start lookup. + * @property {WeakMap} finalizeCache The cache from config arrays to finalized config arrays. + * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`. + * @property {string[]|null} rulePaths The value of `--rulesdir` option. This is used to reset `baseConfigArray`. + * @property {string|null} specificConfigPath The value of `--config` option. This is used to reset `cliConfigArray`. + * @property {boolean} useEslintrc if `false` then it doesn't load config files. + * @property {Function} loadRules The function to use to load rules. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. + */ + +/** @type {WeakMap} */ +const internalSlotsMap = new WeakMap(); + +/** + * Create the config array from `baseConfig` and `rulePaths`. + * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots. + * @returns {ConfigArray} The config array of the base configs. + */ +function createBaseConfigArray({ + configArrayFactory, + baseConfigData, + rulePaths, + cwd, + loadRules +}) { + const baseConfigArray = configArrayFactory.create( + baseConfigData, + { name: "BaseConfig" } + ); + + /* + * Create the config array element for the default ignore patterns. + * This element has `ignorePattern` property that ignores the default + * patterns in the current working directory. + */ + baseConfigArray.unshift(configArrayFactory.create( + { ignorePatterns: IgnorePattern.DefaultPatterns }, + { name: "DefaultIgnorePattern" } + )[0]); + + /* + * Load rules `--rulesdir` option as a pseudo plugin. + * Use a pseudo plugin to define rules of `--rulesdir`, so we can validate + * the rule's options with only information in the config array. + */ + if (rulePaths && rulePaths.length > 0) { + baseConfigArray.push({ + type: "config", + name: "--rulesdir", + filePath: "", + plugins: { + "": new ConfigDependency({ + definition: { + rules: rulePaths.reduce( + (map, rulesPath) => Object.assign( + map, + loadRules(rulesPath, cwd) + ), + {} + ) + }, + filePath: "", + id: "", + importerName: "--rulesdir", + importerPath: "" + }) + } + }); + } + + return baseConfigArray; +} + +/** + * Create the config array from CLI options. + * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots. + * @returns {ConfigArray} The config array of the base configs. + */ +function createCLIConfigArray({ + cliConfigData, + configArrayFactory, + cwd, + ignorePath, + specificConfigPath +}) { + const cliConfigArray = configArrayFactory.create( + cliConfigData, + { name: "CLIOptions" } + ); + + cliConfigArray.unshift( + ...(ignorePath + ? configArrayFactory.loadESLintIgnore(ignorePath) + : configArrayFactory.loadDefaultESLintIgnore()) + ); + + if (specificConfigPath) { + cliConfigArray.unshift( + ...configArrayFactory.loadFile( + specificConfigPath, + { name: "--config", basePath: cwd } + ) + ); + } + + return cliConfigArray; +} + +/** + * The error type when there are files matched by a glob, but all of them have been ignored. + */ +class ConfigurationNotFoundError extends Error { + + + /** + * @param {string} directoryPath The directory path. + */ + constructor(directoryPath) { + super(`No ESLint configuration found in ${directoryPath}.`); + this.messageTemplate = "no-config-found"; + this.messageData = { directoryPath }; + } +} + +/** + * This class provides the functionality that enumerates every file which is + * matched by given glob patterns and that configuration. + */ +class CascadingConfigArrayFactory { + + /** + * Initialize this enumerator. + * @param {CascadingConfigArrayFactoryOptions} options The options. + */ + constructor({ + additionalPluginPool = new Map(), + baseConfig: baseConfigData = null, + cliConfig: cliConfigData = null, + cwd = process.cwd(), + ignorePath, + resolvePluginsRelativeTo, + rulePaths = [], + specificConfigPath = null, + useEslintrc = true, + builtInRules = new Map(), + loadRules, + resolver, + eslintRecommendedPath, + getEslintRecommendedConfig, + eslintAllPath, + getEslintAllConfig + } = {}) { + const configArrayFactory = new ConfigArrayFactory({ + additionalPluginPool, + cwd, + resolvePluginsRelativeTo, + builtInRules, + resolver, + eslintRecommendedPath, + getEslintRecommendedConfig, + eslintAllPath, + getEslintAllConfig + }); + + internalSlotsMap.set(this, { + baseConfigArray: createBaseConfigArray({ + baseConfigData, + configArrayFactory, + cwd, + rulePaths, + loadRules + }), + baseConfigData, + cliConfigArray: createCLIConfigArray({ + cliConfigData, + configArrayFactory, + cwd, + ignorePath, + specificConfigPath + }), + cliConfigData, + configArrayFactory, + configCache: new Map(), + cwd, + finalizeCache: new WeakMap(), + ignorePath, + rulePaths, + specificConfigPath, + useEslintrc, + builtInRules, + loadRules + }); + } + + /** + * The path to the current working directory. + * This is used by tests. + * @type {string} + */ + get cwd() { + const { cwd } = internalSlotsMap.get(this); + + return cwd; + } + + /** + * Get the config array of a given file. + * If `filePath` was not given, it returns the config which contains only + * `baseConfigData` and `cliConfigData`. + * @param {string} [filePath] The file path to a file. + * @param {Object} [options] The options. + * @param {boolean} [options.ignoreNotFoundError] If `true` then it doesn't throw `ConfigurationNotFoundError`. + * @returns {ConfigArray} The config array of the file. + */ + getConfigArrayForFile(filePath, { ignoreNotFoundError = false } = {}) { + const { + baseConfigArray, + cliConfigArray, + cwd + } = internalSlotsMap.get(this); + + if (!filePath) { + return new ConfigArray(...baseConfigArray, ...cliConfigArray); + } + + const directoryPath = path.dirname(path.resolve(cwd, filePath)); + + debug(`Load config files for ${directoryPath}.`); + + return this._finalizeConfigArray( + this._loadConfigInAncestors(directoryPath), + directoryPath, + ignoreNotFoundError + ); + } + + /** + * Set the config data to override all configs. + * Require to call `clearCache()` method after this method is called. + * @param {ConfigData} configData The config data to override all configs. + * @returns {void} + */ + setOverrideConfig(configData) { + const slots = internalSlotsMap.get(this); + + slots.cliConfigData = configData; + } + + /** + * Clear config cache. + * @returns {void} + */ + clearCache() { + const slots = internalSlotsMap.get(this); + + slots.baseConfigArray = createBaseConfigArray(slots); + slots.cliConfigArray = createCLIConfigArray(slots); + slots.configCache.clear(); + } + + /** + * Load and normalize config files from the ancestor directories. + * @param {string} directoryPath The path to a leaf directory. + * @param {boolean} configsExistInSubdirs `true` if configurations exist in subdirectories. + * @returns {ConfigArray} The loaded config. + * @throws {Error} If a config file is invalid. + * @private + */ + _loadConfigInAncestors(directoryPath, configsExistInSubdirs = false) { + const { + baseConfigArray, + configArrayFactory, + configCache, + cwd, + useEslintrc + } = internalSlotsMap.get(this); + + if (!useEslintrc) { + return baseConfigArray; + } + + let configArray = configCache.get(directoryPath); + + // Hit cache. + if (configArray) { + debug(`Cache hit: ${directoryPath}.`); + return configArray; + } + debug(`No cache found: ${directoryPath}.`); + + const homePath = os.homedir(); + + // Consider this is root. + if (directoryPath === homePath && cwd !== homePath) { + debug("Stop traversing because of considered root."); + if (configsExistInSubdirs) { + const filePath = ConfigArrayFactory.getPathToConfigFileInDirectory(directoryPath); + + if (filePath) { + emitDeprecationWarning( + filePath, + "ESLINT_PERSONAL_CONFIG_SUPPRESS" + ); + } + } + return this._cacheConfig(directoryPath, baseConfigArray); + } + + // Load the config on this directory. + try { + configArray = configArrayFactory.loadInDirectory(directoryPath); + } catch (error) { + /* istanbul ignore next */ + if (error.code === "EACCES") { + debug("Stop traversing because of 'EACCES' error."); + return this._cacheConfig(directoryPath, baseConfigArray); + } + throw error; + } + + if (configArray.length > 0 && configArray.isRoot()) { + debug("Stop traversing because of 'root:true'."); + configArray.unshift(...baseConfigArray); + return this._cacheConfig(directoryPath, configArray); + } + + // Load from the ancestors and merge it. + const parentPath = path.dirname(directoryPath); + const parentConfigArray = parentPath && parentPath !== directoryPath + ? this._loadConfigInAncestors( + parentPath, + configsExistInSubdirs || configArray.length > 0 + ) + : baseConfigArray; + + if (configArray.length > 0) { + configArray.unshift(...parentConfigArray); + } else { + configArray = parentConfigArray; + } + + // Cache and return. + return this._cacheConfig(directoryPath, configArray); + } + + /** + * Freeze and cache a given config. + * @param {string} directoryPath The path to a directory as a cache key. + * @param {ConfigArray} configArray The config array as a cache value. + * @returns {ConfigArray} The `configArray` (frozen). + */ + _cacheConfig(directoryPath, configArray) { + const { configCache } = internalSlotsMap.get(this); + + Object.freeze(configArray); + configCache.set(directoryPath, configArray); + + return configArray; + } + + /** + * Finalize a given config array. + * Concatenate `--config` and other CLI options. + * @param {ConfigArray} configArray The parent config array. + * @param {string} directoryPath The path to the leaf directory to find config files. + * @param {boolean} ignoreNotFoundError If `true` then it doesn't throw `ConfigurationNotFoundError`. + * @returns {ConfigArray} The loaded config. + * @throws {Error} If a config file is invalid. + * @private + */ + _finalizeConfigArray(configArray, directoryPath, ignoreNotFoundError) { + const { + cliConfigArray, + configArrayFactory, + finalizeCache, + useEslintrc, + builtInRules + } = internalSlotsMap.get(this); + + let finalConfigArray = finalizeCache.get(configArray); + + if (!finalConfigArray) { + finalConfigArray = configArray; + + // Load the personal config if there are no regular config files. + if ( + useEslintrc && + configArray.every(c => !c.filePath) && + cliConfigArray.every(c => !c.filePath) // `--config` option can be a file. + ) { + const homePath = os.homedir(); + + debug("Loading the config file of the home directory:", homePath); + + const personalConfigArray = configArrayFactory.loadInDirectory( + homePath, + { name: "PersonalConfig" } + ); + + if ( + personalConfigArray.length > 0 && + !directoryPath.startsWith(homePath) + ) { + const lastElement = + personalConfigArray.at(-1); + + emitDeprecationWarning( + lastElement.filePath, + "ESLINT_PERSONAL_CONFIG_LOAD" + ); + } + + finalConfigArray = finalConfigArray.concat(personalConfigArray); + } + + // Apply CLI options. + if (cliConfigArray.length > 0) { + finalConfigArray = finalConfigArray.concat(cliConfigArray); + } + + // Validate rule settings and environments. + const validator = new ConfigValidator({ + builtInRules + }); + + validator.validateConfigArray(finalConfigArray); + + // Cache it. + Object.freeze(finalConfigArray); + finalizeCache.set(configArray, finalConfigArray); + + debug( + "Configuration was determined: %o on %s", + finalConfigArray, + directoryPath + ); + } + + // At least one element (the default ignore patterns) exists. + if (!ignoreNotFoundError && useEslintrc && finalConfigArray.length <= 1) { + throw new ConfigurationNotFoundError(directoryPath); + } + + return finalConfigArray; + } +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +export { CascadingConfigArrayFactory }; diff --git a/slider/node_modules/@eslint/eslintrc/lib/config-array-factory.js b/slider/node_modules/@eslint/eslintrc/lib/config-array-factory.js new file mode 100644 index 0000000..e33627c --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/config-array-factory.js @@ -0,0 +1,1162 @@ +/** + * @fileoverview The factory of `ConfigArray` objects. + * + * This class provides methods to create `ConfigArray` instance. + * + * - `create(configData, options)` + * Create a `ConfigArray` instance from a config data. This is to handle CLI + * options except `--config`. + * - `loadFile(filePath, options)` + * Create a `ConfigArray` instance from a config file. This is to handle + * `--config` option. If the file was not found, throws the following error: + * - If the filename was `*.js`, a `MODULE_NOT_FOUND` error. + * - If the filename was `package.json`, an IO error or an + * `ESLINT_CONFIG_FIELD_NOT_FOUND` error. + * - Otherwise, an IO error such as `ENOENT`. + * - `loadInDirectory(directoryPath, options)` + * Create a `ConfigArray` instance from a config file which is on a given + * directory. This tries to load `.eslintrc.*` or `package.json`. If not + * found, returns an empty `ConfigArray`. + * - `loadESLintIgnore(filePath)` + * Create a `ConfigArray` instance from a config file that is `.eslintignore` + * format. This is to handle `--ignore-path` option. + * - `loadDefaultESLintIgnore()` + * Create a `ConfigArray` instance from `.eslintignore` or `package.json` in + * the current working directory. + * + * `ConfigArrayFactory` class has the responsibility that loads configuration + * files, including loading `extends`, `parser`, and `plugins`. The created + * `ConfigArray` instance has the loaded `extends`, `parser`, and `plugins`. + * + * But this class doesn't handle cascading. `CascadingConfigArrayFactory` class + * handles cascading and hierarchy. + * + * @author Toru Nagashima + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +import debugOrig from "debug"; +import fs from "node:fs"; +import importFresh from "import-fresh"; +import { createRequire } from "node:module"; +import path from "node:path"; +import stripComments from "strip-json-comments"; + +import { + ConfigArray, + ConfigDependency, + IgnorePattern, + OverrideTester +} from "./config-array/index.js"; +import ConfigValidator from "./shared/config-validator.js"; +import * as naming from "./shared/naming.js"; +import * as ModuleResolver from "./shared/relative-module-resolver.js"; + +const require = createRequire(import.meta.url); + +const debug = debugOrig("eslintrc:config-array-factory"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const configFilenames = [ + ".eslintrc.js", + ".eslintrc.cjs", + ".eslintrc.yaml", + ".eslintrc.yml", + ".eslintrc.json", + ".eslintrc", + "package.json" +]; + +// Define types for VSCode IntelliSense. +/** @typedef {import("./shared/types").ConfigData} ConfigData */ +/** @typedef {import("./shared/types").OverrideConfigData} OverrideConfigData */ +/** @typedef {import("./shared/types").Parser} Parser */ +/** @typedef {import("./shared/types").Plugin} Plugin */ +/** @typedef {import("./shared/types").Rule} Rule */ +/** @typedef {import("./config-array/config-dependency").DependentParser} DependentParser */ +/** @typedef {import("./config-array/config-dependency").DependentPlugin} DependentPlugin */ +/** @typedef {ConfigArray[0]} ConfigArrayElement */ + +/** + * @typedef {Object} ConfigArrayFactoryOptions + * @property {Map} [additionalPluginPool] The map for additional plugins. + * @property {string} [cwd] The path to the current working directory. + * @property {string} [resolvePluginsRelativeTo] A path to the directory that plugins should be resolved from. Defaults to `cwd`. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. + */ + +/** + * @typedef {Object} ConfigArrayFactoryInternalSlots + * @property {Map} additionalPluginPool The map for additional plugins. + * @property {string} cwd The path to the current working directory. + * @property {string | undefined} resolvePluginsRelativeTo An absolute path the the directory that plugins should be resolved from. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. + */ + +/** + * @typedef {Object} ConfigArrayFactoryLoadingContext + * @property {string} filePath The path to the current configuration. + * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @property {string} name The name of the current configuration. + * @property {string} pluginBasePath The base path to resolve plugins. + * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors. + */ + +/** + * @typedef {Object} ConfigArrayFactoryLoadingContext + * @property {string} filePath The path to the current configuration. + * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @property {string} name The name of the current configuration. + * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors. + */ + +/** @type {WeakMap} */ +const internalSlotsMap = new WeakMap(); + +/** @type {WeakMap} */ +const normalizedPlugins = new WeakMap(); + +/** + * Check if a given string is a file path. + * @param {string} nameOrPath A module name or file path. + * @returns {boolean} `true` if the `nameOrPath` is a file path. + */ +function isFilePath(nameOrPath) { + return ( + /^\.{1,2}[/\\]/u.test(nameOrPath) || + path.isAbsolute(nameOrPath) + ); +} + +/** + * Convenience wrapper for synchronously reading file contents. + * @param {string} filePath The filename to read. + * @returns {string} The file contents, with the BOM removed. + * @private + */ +function readFile(filePath) { + return fs.readFileSync(filePath, "utf8").replace(/^\ufeff/u, ""); +} + +/** + * Loads a YAML configuration from a file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadYAMLConfigFile(filePath) { + debug(`Loading YAML config file: ${filePath}`); + + // lazy load YAML to improve performance when not used + const yaml = require("js-yaml"); + + try { + + // empty YAML file can be null, so always use + return yaml.load(readFile(filePath)) || {}; + } catch (e) { + debug(`Error reading YAML file: ${filePath}`); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Loads a JSON configuration from a file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadJSONConfigFile(filePath) { + debug(`Loading JSON config file: ${filePath}`); + + try { + return JSON.parse(stripComments(readFile(filePath))); + } catch (e) { + debug(`Error reading JSON file: ${filePath}`); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + e.messageTemplate = "failed-to-read-json"; + e.messageData = { + path: filePath, + message: e.message + }; + throw e; + } +} + +/** + * Loads a legacy (.eslintrc) configuration from a file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadLegacyConfigFile(filePath) { + debug(`Loading legacy config file: ${filePath}`); + + // lazy load YAML to improve performance when not used + const yaml = require("js-yaml"); + + try { + return yaml.load(stripComments(readFile(filePath))) || /* istanbul ignore next */ {}; + } catch (e) { + debug("Error reading YAML file: %s\n%o", filePath, e); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Loads a JavaScript configuration from a file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadJSConfigFile(filePath) { + debug(`Loading JS config file: ${filePath}`); + try { + return importFresh(filePath); + } catch (e) { + debug(`Error reading JavaScript file: ${filePath}`); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Loads a configuration from a package.json file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadPackageJSONConfigFile(filePath) { + debug(`Loading package.json config file: ${filePath}`); + try { + const packageData = loadJSONConfigFile(filePath); + + if (!Object.hasOwn(packageData, "eslintConfig")) { + throw Object.assign( + new Error("package.json file doesn't have 'eslintConfig' field."), + { code: "ESLINT_CONFIG_FIELD_NOT_FOUND" } + ); + } + + return packageData.eslintConfig; + } catch (e) { + debug(`Error reading package.json file: ${filePath}`); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Loads a `.eslintignore` from a file. + * @param {string} filePath The filename to load. + * @returns {string[]} The ignore patterns from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadESLintIgnoreFile(filePath) { + debug(`Loading .eslintignore file: ${filePath}`); + + try { + return readFile(filePath) + .split(/\r?\n/gu) + .filter(line => line.trim() !== "" && !line.startsWith("#")); + } catch (e) { + debug(`Error reading .eslintignore file: ${filePath}`); + e.message = `Cannot read .eslintignore file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Creates an error to notify about a missing config to extend from. + * @param {string} configName The name of the missing config. + * @param {string} importerName The name of the config that imported the missing config + * @param {string} messageTemplate The text template to source error strings from. + * @returns {Error} The error object to throw + * @private + */ +function configInvalidError(configName, importerName, messageTemplate) { + return Object.assign( + new Error(`Failed to load config "${configName}" to extend from.`), + { + messageTemplate, + messageData: { configName, importerName } + } + ); +} + +/** + * Loads a configuration file regardless of the source. Inspects the file path + * to determine the correctly way to load the config file. + * @param {string} filePath The path to the configuration. + * @returns {ConfigData|null} The configuration information. + * @private + */ +function loadConfigFile(filePath) { + switch (path.extname(filePath)) { + case ".js": + case ".cjs": + return loadJSConfigFile(filePath); + + case ".json": + if (path.basename(filePath) === "package.json") { + return loadPackageJSONConfigFile(filePath); + } + return loadJSONConfigFile(filePath); + + case ".yaml": + case ".yml": + return loadYAMLConfigFile(filePath); + + default: + return loadLegacyConfigFile(filePath); + } +} + +/** + * Write debug log. + * @param {string} request The requested module name. + * @param {string} relativeTo The file path to resolve the request relative to. + * @param {string} filePath The resolved file path. + * @returns {void} + */ +function writeDebugLogForLoading(request, relativeTo, filePath) { + /* istanbul ignore next */ + if (debug.enabled) { + let nameAndVersion = null; // eslint-disable-line no-useless-assignment -- known bug in the rule + + try { + const packageJsonPath = ModuleResolver.resolve( + `${request}/package.json`, + relativeTo + ); + const { version = "unknown" } = require(packageJsonPath); + + nameAndVersion = `${request}@${version}`; + } catch (error) { + debug("package.json was not found:", error.message); + nameAndVersion = request; + } + + debug("Loaded: %s (%s)", nameAndVersion, filePath); + } +} + +/** + * Create a new context with default values. + * @param {ConfigArrayFactoryInternalSlots} slots The internal slots. + * @param {"config" | "ignore" | "implicit-processor" | undefined} providedType The type of the current configuration. Default is `"config"`. + * @param {string | undefined} providedName The name of the current configuration. Default is the relative path from `cwd` to `filePath`. + * @param {string | undefined} providedFilePath The path to the current configuration. Default is empty string. + * @param {string | undefined} providedMatchBasePath The type of the current configuration. Default is the directory of `filePath` or `cwd`. + * @returns {ConfigArrayFactoryLoadingContext} The created context. + */ +function createContext( + { cwd, resolvePluginsRelativeTo }, + providedType, + providedName, + providedFilePath, + providedMatchBasePath +) { + const filePath = providedFilePath + ? path.resolve(cwd, providedFilePath) + : ""; + const matchBasePath = + (providedMatchBasePath && path.resolve(cwd, providedMatchBasePath)) || + (filePath && path.dirname(filePath)) || + cwd; + const name = + providedName || + (filePath && path.relative(cwd, filePath)) || + ""; + const pluginBasePath = + resolvePluginsRelativeTo || + (filePath && path.dirname(filePath)) || + cwd; + const type = providedType || "config"; + + return { filePath, matchBasePath, name, pluginBasePath, type }; +} + +/** + * Normalize a given plugin. + * - Ensure the object to have four properties: configs, environments, processors, and rules. + * - Ensure the object to not have other properties. + * @param {Plugin} plugin The plugin to normalize. + * @returns {Plugin} The normalized plugin. + */ +function normalizePlugin(plugin) { + + // first check the cache + let normalizedPlugin = normalizedPlugins.get(plugin); + + if (normalizedPlugin) { + return normalizedPlugin; + } + + normalizedPlugin = { + configs: plugin.configs || {}, + environments: plugin.environments || {}, + processors: plugin.processors || {}, + rules: plugin.rules || {} + }; + + // save the reference for later + normalizedPlugins.set(plugin, normalizedPlugin); + + return normalizedPlugin; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * The factory of `ConfigArray` objects. + */ +class ConfigArrayFactory { + + /** + * Initialize this instance. + * @param {ConfigArrayFactoryOptions} [options] The map for additional plugins. + */ + constructor({ + additionalPluginPool = new Map(), + cwd = process.cwd(), + resolvePluginsRelativeTo, + builtInRules, + resolver = ModuleResolver, + eslintAllPath, + getEslintAllConfig, + eslintRecommendedPath, + getEslintRecommendedConfig + } = {}) { + internalSlotsMap.set(this, { + additionalPluginPool, + cwd, + resolvePluginsRelativeTo: + resolvePluginsRelativeTo && + path.resolve(cwd, resolvePluginsRelativeTo), + builtInRules, + resolver, + eslintAllPath, + getEslintAllConfig, + eslintRecommendedPath, + getEslintRecommendedConfig + }); + } + + /** + * Create `ConfigArray` instance from a config data. + * @param {ConfigData|null} configData The config data to create. + * @param {Object} [options] The options. + * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @param {string} [options.filePath] The path to this config data. + * @param {string} [options.name] The config name. + * @returns {ConfigArray} Loaded config. + */ + create(configData, { basePath, filePath, name } = {}) { + if (!configData) { + return new ConfigArray(); + } + + const slots = internalSlotsMap.get(this); + const ctx = createContext(slots, "config", name, filePath, basePath); + const elements = this._normalizeConfigData(configData, ctx); + + return new ConfigArray(...elements); + } + + /** + * Load a config file. + * @param {string} filePath The path to a config file. + * @param {Object} [options] The options. + * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @param {string} [options.name] The config name. + * @returns {ConfigArray} Loaded config. + */ + loadFile(filePath, { basePath, name } = {}) { + const slots = internalSlotsMap.get(this); + const ctx = createContext(slots, "config", name, filePath, basePath); + + return new ConfigArray(...this._loadConfigData(ctx)); + } + + /** + * Load the config file on a given directory if exists. + * @param {string} directoryPath The path to a directory. + * @param {Object} [options] The options. + * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @param {string} [options.name] The config name. + * @throws {Error} If the config file is invalid. + * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist. + */ + loadInDirectory(directoryPath, { basePath, name } = {}) { + const slots = internalSlotsMap.get(this); + + for (const filename of configFilenames) { + const ctx = createContext( + slots, + "config", + name, + path.join(directoryPath, filename), + basePath + ); + + if (fs.existsSync(ctx.filePath) && fs.statSync(ctx.filePath).isFile()) { + let configData; + + try { + configData = loadConfigFile(ctx.filePath); + } catch (error) { + if (!error || error.code !== "ESLINT_CONFIG_FIELD_NOT_FOUND") { + throw error; + } + } + + if (configData) { + debug(`Config file found: ${ctx.filePath}`); + return new ConfigArray( + ...this._normalizeConfigData(configData, ctx) + ); + } + } + } + + debug(`Config file not found on ${directoryPath}`); + return new ConfigArray(); + } + + /** + * Check if a config file on a given directory exists or not. + * @param {string} directoryPath The path to a directory. + * @returns {string | null} The path to the found config file. If not found then null. + */ + static getPathToConfigFileInDirectory(directoryPath) { + for (const filename of configFilenames) { + const filePath = path.join(directoryPath, filename); + + if (fs.existsSync(filePath)) { + if (filename === "package.json") { + try { + loadPackageJSONConfigFile(filePath); + return filePath; + } catch { /* ignore */ } + } else { + return filePath; + } + } + } + return null; + } + + /** + * Load `.eslintignore` file. + * @param {string} filePath The path to a `.eslintignore` file to load. + * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist. + */ + loadESLintIgnore(filePath) { + const slots = internalSlotsMap.get(this); + const ctx = createContext( + slots, + "ignore", + void 0, + filePath, + slots.cwd + ); + const ignorePatterns = loadESLintIgnoreFile(ctx.filePath); + + return new ConfigArray( + ...this._normalizeESLintIgnoreData(ignorePatterns, ctx) + ); + } + + /** + * Load `.eslintignore` file in the current working directory. + * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist. + * @throws {Error} If the ignore file is invalid. + */ + loadDefaultESLintIgnore() { + const slots = internalSlotsMap.get(this); + const eslintIgnorePath = path.resolve(slots.cwd, ".eslintignore"); + const packageJsonPath = path.resolve(slots.cwd, "package.json"); + + if (fs.existsSync(eslintIgnorePath)) { + return this.loadESLintIgnore(eslintIgnorePath); + } + if (fs.existsSync(packageJsonPath)) { + const data = loadJSONConfigFile(packageJsonPath); + + if (Object.hasOwn(data, "eslintIgnore")) { + if (!Array.isArray(data.eslintIgnore)) { + throw new Error("Package.json eslintIgnore property requires an array of paths"); + } + const ctx = createContext( + slots, + "ignore", + "eslintIgnore in package.json", + packageJsonPath, + slots.cwd + ); + + return new ConfigArray( + ...this._normalizeESLintIgnoreData(data.eslintIgnore, ctx) + ); + } + } + + return new ConfigArray(); + } + + /** + * Load a given config file. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} Loaded config. + * @private + */ + _loadConfigData(ctx) { + return this._normalizeConfigData(loadConfigFile(ctx.filePath), ctx); + } + + /** + * Normalize a given `.eslintignore` data to config array elements. + * @param {string[]} ignorePatterns The patterns to ignore files. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + *_normalizeESLintIgnoreData(ignorePatterns, ctx) { + const elements = this._normalizeObjectConfigData( + { ignorePatterns }, + ctx + ); + + // Set `ignorePattern.loose` flag for backward compatibility. + for (const element of elements) { + if (element.ignorePattern) { + element.ignorePattern.loose = true; + } + yield element; + } + } + + /** + * Normalize a given config to an array. + * @param {ConfigData} configData The config data to normalize. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + _normalizeConfigData(configData, ctx) { + const validator = new ConfigValidator(); + + validator.validateConfigSchema(configData, ctx.name || ctx.filePath); + return this._normalizeObjectConfigData(configData, ctx); + } + + /** + * Normalize a given config to an array. + * @param {ConfigData|OverrideConfigData} configData The config data to normalize. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + *_normalizeObjectConfigData(configData, ctx) { + const { files, excludedFiles, ...configBody } = configData; + const criteria = OverrideTester.create( + files, + excludedFiles, + ctx.matchBasePath + ); + const elements = this._normalizeObjectConfigDataBody(configBody, ctx); + + // Apply the criteria to every element. + for (const element of elements) { + + /* + * Merge the criteria. + * This is for the `overrides` entries that came from the + * configurations of `overrides[].extends`. + */ + element.criteria = OverrideTester.and(criteria, element.criteria); + + /* + * Remove `root` property to ignore `root` settings which came from + * `extends` in `overrides`. + */ + if (element.criteria) { + element.root = void 0; + } + + yield element; + } + } + + /** + * Normalize a given config to an array. + * @param {ConfigData} configData The config data to normalize. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + *_normalizeObjectConfigDataBody( + { + env, + extends: extend, + globals, + ignorePatterns, + noInlineConfig, + parser: parserName, + parserOptions, + plugins: pluginList, + processor, + reportUnusedDisableDirectives, + root, + rules, + settings, + overrides: overrideList = [] + }, + ctx + ) { + const extendList = Array.isArray(extend) ? extend : [extend]; + const ignorePattern = ignorePatterns && new IgnorePattern( + Array.isArray(ignorePatterns) ? ignorePatterns : [ignorePatterns], + ctx.matchBasePath + ); + + // Flatten `extends`. + for (const extendName of extendList.filter(Boolean)) { + yield* this._loadExtends(extendName, ctx); + } + + // Load parser & plugins. + const parser = parserName && this._loadParser(parserName, ctx); + const plugins = pluginList && this._loadPlugins(pluginList, ctx); + + // Yield pseudo config data for file extension processors. + if (plugins) { + yield* this._takeFileExtensionProcessors(plugins, ctx); + } + + // Yield the config data except `extends` and `overrides`. + yield { + + // Debug information. + type: ctx.type, + name: ctx.name, + filePath: ctx.filePath, + + // Config data. + criteria: null, + env, + globals, + ignorePattern, + noInlineConfig, + parser, + parserOptions, + plugins, + processor, + reportUnusedDisableDirectives, + root, + rules, + settings + }; + + // Flatten `overries`. + for (let i = 0; i < overrideList.length; ++i) { + yield* this._normalizeObjectConfigData( + overrideList[i], + { ...ctx, name: `${ctx.name}#overrides[${i}]` } + ); + } + } + + /** + * Load configs of an element in `extends`. + * @param {string} extendName The name of a base config. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @throws {Error} If the extended config file can't be loaded. + * @private + */ + _loadExtends(extendName, ctx) { + debug("Loading {extends:%j} relative to %s", extendName, ctx.filePath); + try { + if (extendName.startsWith("eslint:")) { + return this._loadExtendedBuiltInConfig(extendName, ctx); + } + if (extendName.startsWith("plugin:")) { + return this._loadExtendedPluginConfig(extendName, ctx); + } + return this._loadExtendedShareableConfig(extendName, ctx); + } catch (error) { + error.message += `\nReferenced from: ${ctx.filePath || ctx.name}`; + throw error; + } + } + + /** + * Load configs of an element in `extends`. + * @param {string} extendName The name of a base config. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @throws {Error} If the extended config file can't be loaded. + * @private + */ + _loadExtendedBuiltInConfig(extendName, ctx) { + const { + eslintAllPath, + getEslintAllConfig, + eslintRecommendedPath, + getEslintRecommendedConfig + } = internalSlotsMap.get(this); + + if (extendName === "eslint:recommended") { + const name = `${ctx.name} » ${extendName}`; + + if (getEslintRecommendedConfig) { + if (typeof getEslintRecommendedConfig !== "function") { + throw new Error(`getEslintRecommendedConfig must be a function instead of '${getEslintRecommendedConfig}'`); + } + return this._normalizeConfigData(getEslintRecommendedConfig(), { ...ctx, name, filePath: "" }); + } + return this._loadConfigData({ + ...ctx, + name, + filePath: eslintRecommendedPath + }); + } + if (extendName === "eslint:all") { + const name = `${ctx.name} » ${extendName}`; + + if (getEslintAllConfig) { + if (typeof getEslintAllConfig !== "function") { + throw new Error(`getEslintAllConfig must be a function instead of '${getEslintAllConfig}'`); + } + return this._normalizeConfigData(getEslintAllConfig(), { ...ctx, name, filePath: "" }); + } + return this._loadConfigData({ + ...ctx, + name, + filePath: eslintAllPath + }); + } + + throw configInvalidError(extendName, ctx.name, "extend-config-missing"); + } + + /** + * Load configs of an element in `extends`. + * @param {string} extendName The name of a base config. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @throws {Error} If the extended config file can't be loaded. + * @private + */ + _loadExtendedPluginConfig(extendName, ctx) { + const slashIndex = extendName.lastIndexOf("/"); + + if (slashIndex === -1) { + throw configInvalidError(extendName, ctx.filePath, "plugin-invalid"); + } + + const pluginName = extendName.slice("plugin:".length, slashIndex); + const configName = extendName.slice(slashIndex + 1); + + if (isFilePath(pluginName)) { + throw new Error("'extends' cannot use a file path for plugins."); + } + + const plugin = this._loadPlugin(pluginName, ctx); + const configData = + plugin.definition && + plugin.definition.configs[configName]; + + if (configData) { + return this._normalizeConfigData(configData, { + ...ctx, + filePath: plugin.filePath || ctx.filePath, + name: `${ctx.name} » plugin:${plugin.id}/${configName}` + }); + } + + throw plugin.error || configInvalidError(extendName, ctx.filePath, "extend-config-missing"); + } + + /** + * Load configs of an element in `extends`. + * @param {string} extendName The name of a base config. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @throws {Error} If the extended config file can't be loaded. + * @private + */ + _loadExtendedShareableConfig(extendName, ctx) { + const { cwd, resolver } = internalSlotsMap.get(this); + const relativeTo = ctx.filePath || path.join(cwd, "__placeholder__.js"); + let request; + + if (isFilePath(extendName)) { + request = extendName; + } else if (extendName.startsWith(".")) { + request = `./${extendName}`; // For backward compatibility. A ton of tests depended on this behavior. + } else { + request = naming.normalizePackageName( + extendName, + "eslint-config" + ); + } + + let filePath; + + try { + filePath = resolver.resolve(request, relativeTo); + } catch (error) { + /* istanbul ignore else */ + if (error && error.code === "MODULE_NOT_FOUND") { + throw configInvalidError(extendName, ctx.filePath, "extend-config-missing"); + } + throw error; + } + + writeDebugLogForLoading(request, relativeTo, filePath); + return this._loadConfigData({ + ...ctx, + filePath, + name: `${ctx.name} » ${request}` + }); + } + + /** + * Load given plugins. + * @param {string[]} names The plugin names to load. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {Record} The loaded parser. + * @private + */ + _loadPlugins(names, ctx) { + return names.reduce((map, name) => { + if (isFilePath(name)) { + throw new Error("Plugins array cannot includes file paths."); + } + const plugin = this._loadPlugin(name, ctx); + + map[plugin.id] = plugin; + + return map; + }, {}); + } + + /** + * Load a given parser. + * @param {string} nameOrPath The package name or the path to a parser file. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {DependentParser} The loaded parser. + */ + _loadParser(nameOrPath, ctx) { + debug("Loading parser %j from %s", nameOrPath, ctx.filePath); + + const { cwd, resolver } = internalSlotsMap.get(this); + const relativeTo = ctx.filePath || path.join(cwd, "__placeholder__.js"); + + try { + const filePath = resolver.resolve(nameOrPath, relativeTo); + + writeDebugLogForLoading(nameOrPath, relativeTo, filePath); + + return new ConfigDependency({ + definition: require(filePath), + filePath, + id: nameOrPath, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } catch (error) { + + // If the parser name is "espree", load the espree of ESLint. + if (nameOrPath === "espree") { + debug("Fallback espree."); + return new ConfigDependency({ + definition: require("espree"), + filePath: require.resolve("espree"), + id: nameOrPath, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + + debug("Failed to load parser '%s' declared in '%s'.", nameOrPath, ctx.name); + error.message = `Failed to load parser '${nameOrPath}' declared in '${ctx.name}': ${error.message}`; + + return new ConfigDependency({ + error, + id: nameOrPath, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + } + + /** + * Load a given plugin. + * @param {string} name The plugin name to load. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {DependentPlugin} The loaded plugin. + * @private + */ + _loadPlugin(name, ctx) { + debug("Loading plugin %j from %s", name, ctx.filePath); + + const { additionalPluginPool, resolver } = internalSlotsMap.get(this); + const request = naming.normalizePackageName(name, "eslint-plugin"); + const id = naming.getShorthandName(request, "eslint-plugin"); + const relativeTo = path.join(ctx.pluginBasePath, "__placeholder__.js"); + + if (name.match(/\s+/u)) { + const error = Object.assign( + new Error(`Whitespace found in plugin name '${name}'`), + { + messageTemplate: "whitespace-found", + messageData: { pluginName: request } + } + ); + + return new ConfigDependency({ + error, + id, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + + // Check for additional pool. + const plugin = + additionalPluginPool.get(request) || + additionalPluginPool.get(id); + + if (plugin) { + return new ConfigDependency({ + definition: normalizePlugin(plugin), + original: plugin, + filePath: "", // It's unknown where the plugin came from. + id, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + + let filePath; + let error; + + try { + filePath = resolver.resolve(request, relativeTo); + } catch (resolveError) { + error = resolveError; + /* istanbul ignore else */ + if (error && error.code === "MODULE_NOT_FOUND") { + error.messageTemplate = "plugin-missing"; + error.messageData = { + pluginName: request, + resolvePluginsRelativeTo: ctx.pluginBasePath, + importerName: ctx.name + }; + } + } + + if (filePath) { + try { + writeDebugLogForLoading(request, relativeTo, filePath); + + const startTime = Date.now(); + const pluginDefinition = require(filePath); + + debug(`Plugin ${filePath} loaded in: ${Date.now() - startTime}ms`); + + return new ConfigDependency({ + definition: normalizePlugin(pluginDefinition), + original: pluginDefinition, + filePath, + id, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } catch (loadError) { + error = loadError; + } + } + + debug("Failed to load plugin '%s' declared in '%s'.", name, ctx.name); + error.message = `Failed to load plugin '${name}' declared in '${ctx.name}': ${error.message}`; + return new ConfigDependency({ + error, + id, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + + /** + * Take file expression processors as config array elements. + * @param {Record} plugins The plugin definitions. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The config array elements of file expression processors. + * @private + */ + *_takeFileExtensionProcessors(plugins, ctx) { + for (const pluginId of Object.keys(plugins)) { + const processors = + plugins[pluginId] && + plugins[pluginId].definition && + plugins[pluginId].definition.processors; + + if (!processors) { + continue; + } + + for (const processorId of Object.keys(processors)) { + if (processorId.startsWith(".")) { + yield* this._normalizeObjectConfigData( + { + files: [`*${processorId}`], + processor: `${pluginId}/${processorId}` + }, + { + ...ctx, + type: "implicit-processor", + name: `${ctx.name}#processors["${pluginId}/${processorId}"]` + } + ); + } + } + } + } +} + +export { + ConfigArrayFactory, + createContext, + loadConfigFile +}; diff --git a/slider/node_modules/@eslint/eslintrc/lib/config-array/config-array.js b/slider/node_modules/@eslint/eslintrc/lib/config-array/config-array.js new file mode 100644 index 0000000..0065dec --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/config-array/config-array.js @@ -0,0 +1,512 @@ +/** + * @fileoverview `ConfigArray` class. + * + * `ConfigArray` class expresses the full of a configuration. It has the entry + * config file, base config files that were extended, loaded parsers, and loaded + * plugins. + * + * `ConfigArray` class provides three properties and two methods. + * + * - `pluginEnvironments` + * - `pluginProcessors` + * - `pluginRules` + * The `Map` objects that contain the members of all plugins that this + * config array contains. Those map objects don't have mutation methods. + * Those keys are the member ID such as `pluginId/memberName`. + * - `isRoot()` + * If `true` then this configuration has `root:true` property. + * - `extractConfig(filePath)` + * Extract the final configuration for a given file. This means merging + * every config array element which that `criteria` property matched. The + * `filePath` argument must be an absolute path. + * + * `ConfigArrayFactory` provides the loading logic of config files. + * + * @author Toru Nagashima + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +import { ExtractedConfig } from "./extracted-config.js"; +import { IgnorePattern } from "./ignore-pattern.js"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +// Define types for VSCode IntelliSense. +/** @typedef {import("../../shared/types").Environment} Environment */ +/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */ +/** @typedef {import("../../shared/types").RuleConf} RuleConf */ +/** @typedef {import("../../shared/types").Rule} Rule */ +/** @typedef {import("../../shared/types").Plugin} Plugin */ +/** @typedef {import("../../shared/types").Processor} Processor */ +/** @typedef {import("./config-dependency").DependentParser} DependentParser */ +/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */ +/** @typedef {import("./override-tester")["OverrideTester"]} OverrideTester */ + +/** + * @typedef {Object} ConfigArrayElement + * @property {string} name The name of this config element. + * @property {string} filePath The path to the source file of this config element. + * @property {InstanceType|null} criteria The tester for the `files` and `excludedFiles` of this config element. + * @property {Record|undefined} env The environment settings. + * @property {Record|undefined} globals The global variable settings. + * @property {IgnorePattern|undefined} ignorePattern The ignore patterns. + * @property {boolean|undefined} noInlineConfig The flag that disables directive comments. + * @property {DependentParser|undefined} parser The parser loader. + * @property {Object|undefined} parserOptions The parser options. + * @property {Record|undefined} plugins The plugin loaders. + * @property {string|undefined} processor The processor name to refer plugin's processor. + * @property {boolean|undefined} reportUnusedDisableDirectives The flag to report unused `eslint-disable` comments. + * @property {boolean|undefined} root The flag to express root. + * @property {Record|undefined} rules The rule settings + * @property {Object|undefined} settings The shared settings. + * @property {"config" | "ignore" | "implicit-processor"} type The element type. + */ + +/** + * @typedef {Object} ConfigArrayInternalSlots + * @property {Map} cache The cache to extract configs. + * @property {ReadonlyMap|null} envMap The map from environment ID to environment definition. + * @property {ReadonlyMap|null} processorMap The map from processor ID to environment definition. + * @property {ReadonlyMap|null} ruleMap The map from rule ID to rule definition. + */ + +/** @type {WeakMap} */ +const internalSlotsMap = new class extends WeakMap { + get(key) { + let value = super.get(key); + + if (!value) { + value = { + cache: new Map(), + envMap: null, + processorMap: null, + ruleMap: null + }; + super.set(key, value); + } + + return value; + } +}(); + +/** + * Get the indices which are matched to a given file. + * @param {ConfigArrayElement[]} elements The elements. + * @param {string} filePath The path to a target file. + * @returns {number[]} The indices. + */ +function getMatchedIndices(elements, filePath) { + const indices = []; + + for (let i = elements.length - 1; i >= 0; --i) { + const element = elements[i]; + + if (!element.criteria || (filePath && element.criteria.test(filePath))) { + indices.push(i); + } + } + + return indices; +} + +/** + * Check if a value is a non-null object. + * @param {any} x The value to check. + * @returns {boolean} `true` if the value is a non-null object. + */ +function isNonNullObject(x) { + return typeof x === "object" && x !== null; +} + +/** + * Merge two objects. + * + * Assign every property values of `y` to `x` if `x` doesn't have the property. + * If `x`'s property value is an object, it does recursive. + * @param {Object} target The destination to merge + * @param {Object|undefined} source The source to merge. + * @returns {void} + */ +function mergeWithoutOverwrite(target, source) { + if (!isNonNullObject(source)) { + return; + } + + for (const key of Object.keys(source)) { + if (key === "__proto__") { + continue; + } + + if (isNonNullObject(target[key])) { + mergeWithoutOverwrite(target[key], source[key]); + } else if (target[key] === void 0) { + if (isNonNullObject(source[key])) { + target[key] = Array.isArray(source[key]) ? [] : {}; + mergeWithoutOverwrite(target[key], source[key]); + } else if (source[key] !== void 0) { + target[key] = source[key]; + } + } + } +} + +/** + * The error for plugin conflicts. + */ +class PluginConflictError extends Error { + + /** + * Initialize this error object. + * @param {string} pluginId The plugin ID. + * @param {{filePath:string, importerName:string}[]} plugins The resolved plugins. + */ + constructor(pluginId, plugins) { + super(`Plugin "${pluginId}" was conflicted between ${plugins.map(p => `"${p.importerName}"`).join(" and ")}.`); + this.messageTemplate = "plugin-conflict"; + this.messageData = { pluginId, plugins }; + } +} + +/** + * Merge plugins. + * `target`'s definition is prior to `source`'s. + * @param {Record} target The destination to merge + * @param {Record|undefined} source The source to merge. + * @returns {void} + * @throws {PluginConflictError} When a plugin was conflicted. + */ +function mergePlugins(target, source) { + if (!isNonNullObject(source)) { + return; + } + + for (const key of Object.keys(source)) { + if (key === "__proto__") { + continue; + } + const targetValue = target[key]; + const sourceValue = source[key]; + + // Adopt the plugin which was found at first. + if (targetValue === void 0) { + if (sourceValue.error) { + throw sourceValue.error; + } + target[key] = sourceValue; + } else if (sourceValue.filePath !== targetValue.filePath) { + throw new PluginConflictError(key, [ + { + filePath: targetValue.filePath, + importerName: targetValue.importerName + }, + { + filePath: sourceValue.filePath, + importerName: sourceValue.importerName + } + ]); + } + } +} + +/** + * Merge rule configs. + * `target`'s definition is prior to `source`'s. + * @param {Record} target The destination to merge + * @param {Record|undefined} source The source to merge. + * @returns {void} + */ +function mergeRuleConfigs(target, source) { + if (!isNonNullObject(source)) { + return; + } + + for (const key of Object.keys(source)) { + if (key === "__proto__") { + continue; + } + const targetDef = target[key]; + const sourceDef = source[key]; + + // Adopt the rule config which was found at first. + if (targetDef === void 0) { + if (Array.isArray(sourceDef)) { + target[key] = [...sourceDef]; + } else { + target[key] = [sourceDef]; + } + + /* + * If the first found rule config is severity only and the current rule + * config has options, merge the severity and the options. + */ + } else if ( + targetDef.length === 1 && + Array.isArray(sourceDef) && + sourceDef.length >= 2 + ) { + targetDef.push(...sourceDef.slice(1)); + } + } +} + +/** + * Create the extracted config. + * @param {ConfigArray} instance The config elements. + * @param {number[]} indices The indices to use. + * @returns {ExtractedConfig} The extracted config. + * @throws {Error} When a plugin is conflicted. + */ +function createConfig(instance, indices) { + const config = new ExtractedConfig(); + const ignorePatterns = []; + + // Merge elements. + for (const index of indices) { + const element = instance[index]; + + // Adopt the parser which was found at first. + if (!config.parser && element.parser) { + if (element.parser.error) { + throw element.parser.error; + } + config.parser = element.parser; + } + + // Adopt the processor which was found at first. + if (!config.processor && element.processor) { + config.processor = element.processor; + } + + // Adopt the noInlineConfig which was found at first. + if (config.noInlineConfig === void 0 && element.noInlineConfig !== void 0) { + config.noInlineConfig = element.noInlineConfig; + config.configNameOfNoInlineConfig = element.name; + } + + // Adopt the reportUnusedDisableDirectives which was found at first. + if (config.reportUnusedDisableDirectives === void 0 && element.reportUnusedDisableDirectives !== void 0) { + config.reportUnusedDisableDirectives = element.reportUnusedDisableDirectives; + } + + // Collect ignorePatterns + if (element.ignorePattern) { + ignorePatterns.push(element.ignorePattern); + } + + // Merge others. + mergeWithoutOverwrite(config.env, element.env); + mergeWithoutOverwrite(config.globals, element.globals); + mergeWithoutOverwrite(config.parserOptions, element.parserOptions); + mergeWithoutOverwrite(config.settings, element.settings); + mergePlugins(config.plugins, element.plugins); + mergeRuleConfigs(config.rules, element.rules); + } + + // Create the predicate function for ignore patterns. + if (ignorePatterns.length > 0) { + config.ignores = IgnorePattern.createIgnore(ignorePatterns.reverse()); + } + + return config; +} + +/** + * Collect definitions. + * @template T, U + * @param {string} pluginId The plugin ID for prefix. + * @param {Record} defs The definitions to collect. + * @param {Map} map The map to output. + * @returns {void} + */ +function collect(pluginId, defs, map) { + if (defs) { + const prefix = pluginId && `${pluginId}/`; + + for (const [key, value] of Object.entries(defs)) { + map.set(`${prefix}${key}`, value); + } + } +} + +/** + * Delete the mutation methods from a given map. + * @param {Map} map The map object to delete. + * @returns {void} + */ +function deleteMutationMethods(map) { + Object.defineProperties(map, { + clear: { configurable: true, value: void 0 }, + delete: { configurable: true, value: void 0 }, + set: { configurable: true, value: void 0 } + }); +} + +/** + * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array. + * @param {ConfigArrayElement[]} elements The config elements. + * @param {ConfigArrayInternalSlots} slots The internal slots. + * @returns {void} + */ +function initPluginMemberMaps(elements, slots) { + const processed = new Set(); + + slots.envMap = new Map(); + slots.processorMap = new Map(); + slots.ruleMap = new Map(); + + for (const element of elements) { + if (!element.plugins) { + continue; + } + + for (const [pluginId, value] of Object.entries(element.plugins)) { + const plugin = value.definition; + + if (!plugin || processed.has(pluginId)) { + continue; + } + processed.add(pluginId); + + collect(pluginId, plugin.environments, slots.envMap); + collect(pluginId, plugin.processors, slots.processorMap); + collect(pluginId, plugin.rules, slots.ruleMap); + } + } + + deleteMutationMethods(slots.envMap); + deleteMutationMethods(slots.processorMap); + deleteMutationMethods(slots.ruleMap); +} + +/** + * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array. + * @param {ConfigArray} instance The config elements. + * @returns {ConfigArrayInternalSlots} The extracted config. + */ +function ensurePluginMemberMaps(instance) { + const slots = internalSlotsMap.get(instance); + + if (!slots.ruleMap) { + initPluginMemberMaps(instance, slots); + } + + return slots; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * The Config Array. + * + * `ConfigArray` instance contains all settings, parsers, and plugins. + * You need to call `ConfigArray#extractConfig(filePath)` method in order to + * extract, merge and get only the config data which is related to an arbitrary + * file. + * @extends {Array} + */ +class ConfigArray extends Array { + + /** + * Get the plugin environments. + * The returned map cannot be mutated. + * @type {ReadonlyMap} The plugin environments. + */ + get pluginEnvironments() { + return ensurePluginMemberMaps(this).envMap; + } + + /** + * Get the plugin processors. + * The returned map cannot be mutated. + * @type {ReadonlyMap} The plugin processors. + */ + get pluginProcessors() { + return ensurePluginMemberMaps(this).processorMap; + } + + /** + * Get the plugin rules. + * The returned map cannot be mutated. + * @returns {ReadonlyMap} The plugin rules. + */ + get pluginRules() { + return ensurePluginMemberMaps(this).ruleMap; + } + + /** + * Check if this config has `root` flag. + * @returns {boolean} `true` if this config array is root. + */ + isRoot() { + for (let i = this.length - 1; i >= 0; --i) { + const root = this[i].root; + + if (typeof root === "boolean") { + return root; + } + } + return false; + } + + /** + * Extract the config data which is related to a given file. + * @param {string} filePath The absolute path to the target file. + * @returns {ExtractedConfig} The extracted config data. + */ + extractConfig(filePath) { + const { cache } = internalSlotsMap.get(this); + const indices = getMatchedIndices(this, filePath); + const cacheKey = indices.join(","); + + if (!cache.has(cacheKey)) { + cache.set(cacheKey, createConfig(this, indices)); + } + + return cache.get(cacheKey); + } + + /** + * Check if a given path is an additional lint target. + * @param {string} filePath The absolute path to the target file. + * @returns {boolean} `true` if the file is an additional lint target. + */ + isAdditionalTargetPath(filePath) { + for (const { criteria, type } of this) { + if ( + type === "config" && + criteria && + !criteria.endsWithWildcard && + criteria.test(filePath) + ) { + return true; + } + } + return false; + } +} + +/** + * Get the used extracted configs. + * CLIEngine will use this method to collect used deprecated rules. + * @param {ConfigArray} instance The config array object to get. + * @returns {ExtractedConfig[]} The used extracted configs. + * @private + */ +function getUsedExtractedConfigs(instance) { + const { cache } = internalSlotsMap.get(instance); + + return Array.from(cache.values()); +} + + +export { + ConfigArray, + getUsedExtractedConfigs +}; diff --git a/slider/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js b/slider/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js new file mode 100644 index 0000000..94b9650 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js @@ -0,0 +1,124 @@ +/** + * @fileoverview `ConfigDependency` class. + * + * `ConfigDependency` class expresses a loaded parser or plugin. + * + * If the parser or plugin was loaded successfully, it has `definition` property + * and `filePath` property. Otherwise, it has `error` property. + * + * When `JSON.stringify()` converted a `ConfigDependency` object to a JSON, it + * omits `definition` property. + * + * `ConfigArrayFactory` creates `ConfigDependency` objects when it loads parsers + * or plugins. + * + * @author Toru Nagashima + */ + +import util from "node:util"; + +/** + * The class is to store parsers or plugins. + * This class hides the loaded object from `JSON.stringify()` and `console.log`. + * @template T + */ +class ConfigDependency { + + /** + * Initialize this instance. + * @param {Object} data The dependency data. + * @param {T} [data.definition] The dependency if the loading succeeded. + * @param {T} [data.original] The original, non-normalized dependency if the loading succeeded. + * @param {Error} [data.error] The error object if the loading failed. + * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded. + * @param {string} data.id The ID of this dependency. + * @param {string} data.importerName The name of the config file which loads this dependency. + * @param {string} data.importerPath The path to the config file which loads this dependency. + */ + constructor({ + definition = null, + original = null, + error = null, + filePath = null, + id, + importerName, + importerPath + }) { + + /** + * The loaded dependency if the loading succeeded. + * @type {T|null} + */ + this.definition = definition; + + /** + * The original dependency as loaded directly from disk if the loading succeeded. + * @type {T|null} + */ + this.original = original; + + /** + * The error object if the loading failed. + * @type {Error|null} + */ + this.error = error; + + /** + * The loaded dependency if the loading succeeded. + * @type {string|null} + */ + this.filePath = filePath; + + /** + * The ID of this dependency. + * @type {string} + */ + this.id = id; + + /** + * The name of the config file which loads this dependency. + * @type {string} + */ + this.importerName = importerName; + + /** + * The path to the config file which loads this dependency. + * @type {string} + */ + this.importerPath = importerPath; + } + + /** + * Converts this instance to a JSON compatible object. + * @returns {Object} a JSON compatible object. + */ + toJSON() { + const obj = this[util.inspect.custom](); + + // Display `error.message` (`Error#message` is unenumerable). + if (obj.error instanceof Error) { + obj.error = { ...obj.error, message: obj.error.message }; + } + + return obj; + } + + /** + * Custom inspect method for Node.js `console.log()`. + * @returns {Object} an object to display by `console.log()`. + */ + [util.inspect.custom]() { + const { + definition: _ignore1, // eslint-disable-line no-unused-vars -- needed to make `obj` correct + original: _ignore2, // eslint-disable-line no-unused-vars -- needed to make `obj` correct + ...obj + } = this; + + return obj; + } +} + +/** @typedef {ConfigDependency} DependentParser */ +/** @typedef {ConfigDependency} DependentPlugin */ + +export { ConfigDependency }; diff --git a/slider/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js b/slider/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js new file mode 100644 index 0000000..38ad9fe --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js @@ -0,0 +1,145 @@ +/** + * @fileoverview `ExtractedConfig` class. + * + * `ExtractedConfig` class expresses a final configuration for a specific file. + * + * It provides one method. + * + * - `toCompatibleObjectAsConfigFileContent()` + * Convert this configuration to the compatible object as the content of + * config files. It converts the loaded parser and plugins to strings. + * `CLIEngine#getConfigForFile(filePath)` method uses this method. + * + * `ConfigArray#extractConfig(filePath)` creates a `ExtractedConfig` instance. + * + * @author Toru Nagashima + */ + +import { IgnorePattern } from "./ignore-pattern.js"; + +// For VSCode intellisense +/** @typedef {import("../../shared/types").ConfigData} ConfigData */ +/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */ +/** @typedef {import("../../shared/types").SeverityConf} SeverityConf */ +/** @typedef {import("./config-dependency").DependentParser} DependentParser */ +/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */ + +/** + * Check if `xs` starts with `ys`. + * @template T + * @param {T[]} xs The array to check. + * @param {T[]} ys The array that may be the first part of `xs`. + * @returns {boolean} `true` if `xs` starts with `ys`. + */ +function startsWith(xs, ys) { + return xs.length >= ys.length && ys.every((y, i) => y === xs[i]); +} + +/** + * The class for extracted config data. + */ +class ExtractedConfig { + constructor() { + + /** + * The config name what `noInlineConfig` setting came from. + * @type {string} + */ + this.configNameOfNoInlineConfig = ""; + + /** + * Environments. + * @type {Record} + */ + this.env = {}; + + /** + * Global variables. + * @type {Record} + */ + this.globals = {}; + + /** + * The glob patterns that ignore to lint. + * @type {(((filePath:string, dot?:boolean) => boolean) & { basePath:string; patterns:string[] }) | undefined} + */ + this.ignores = void 0; + + /** + * The flag that disables directive comments. + * @type {boolean|undefined} + */ + this.noInlineConfig = void 0; + + /** + * Parser definition. + * @type {DependentParser|null} + */ + this.parser = null; + + /** + * Options for the parser. + * @type {Object} + */ + this.parserOptions = {}; + + /** + * Plugin definitions. + * @type {Record} + */ + this.plugins = {}; + + /** + * Processor ID. + * @type {string|null} + */ + this.processor = null; + + /** + * The flag that reports unused `eslint-disable` directive comments. + * @type {boolean|undefined} + */ + this.reportUnusedDisableDirectives = void 0; + + /** + * Rule settings. + * @type {Record} + */ + this.rules = {}; + + /** + * Shared settings. + * @type {Object} + */ + this.settings = {}; + } + + /** + * Convert this config to the compatible object as a config file content. + * @returns {ConfigData} The converted object. + */ + toCompatibleObjectAsConfigFileContent() { + const { + /* eslint-disable no-unused-vars -- needed to make `config` correct */ + configNameOfNoInlineConfig: _ignore1, + processor: _ignore2, + /* eslint-enable no-unused-vars -- needed to make `config` correct */ + ignores, + ...config + } = this; + + config.parser = config.parser && config.parser.filePath; + config.plugins = Object.keys(config.plugins).filter(Boolean).reverse(); + config.ignorePatterns = ignores ? ignores.patterns : []; + + // Strip the default patterns from `ignorePatterns`. + if (startsWith(config.ignorePatterns, IgnorePattern.DefaultPatterns)) { + config.ignorePatterns = + config.ignorePatterns.slice(IgnorePattern.DefaultPatterns.length); + } + + return config; + } +} + +export { ExtractedConfig }; diff --git a/slider/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js b/slider/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js new file mode 100644 index 0000000..ac2eb81 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js @@ -0,0 +1,239 @@ +/** + * @fileoverview `IgnorePattern` class. + * + * `IgnorePattern` class has the set of glob patterns and the base path. + * + * It provides two static methods. + * + * - `IgnorePattern.createDefaultIgnore(cwd)` + * Create the default predicate function. + * - `IgnorePattern.createIgnore(ignorePatterns)` + * Create the predicate function from multiple `IgnorePattern` objects. + * + * It provides two properties and a method. + * + * - `patterns` + * The glob patterns that ignore to lint. + * - `basePath` + * The base path of the glob patterns. If absolute paths existed in the + * glob patterns, those are handled as relative paths to the base path. + * - `getPatternsRelativeTo(basePath)` + * Get `patterns` as modified for a given base path. It modifies the + * absolute paths in the patterns as prepending the difference of two base + * paths. + * + * `ConfigArrayFactory` creates `IgnorePattern` objects when it processes + * `ignorePatterns` properties. + * + * @author Toru Nagashima + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +import assert from "node:assert"; +import path from "node:path"; +import ignore from "ignore"; +import debugOrig from "debug"; + +const debug = debugOrig("eslintrc:ignore-pattern"); + +/** @typedef {ReturnType} Ignore */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Get the path to the common ancestor directory of given paths. + * @param {string[]} sourcePaths The paths to calculate the common ancestor. + * @returns {string} The path to the common ancestor directory. + */ +function getCommonAncestorPath(sourcePaths) { + let result = sourcePaths[0]; + + for (let i = 1; i < sourcePaths.length; ++i) { + const a = result; + const b = sourcePaths[i]; + + // Set the shorter one (it's the common ancestor if one includes the other). + result = a.length < b.length ? a : b; + + // Set the common ancestor. + for (let j = 0, lastSepPos = 0; j < a.length && j < b.length; ++j) { + if (a[j] !== b[j]) { + result = a.slice(0, lastSepPos); + break; + } + if (a[j] === path.sep) { + lastSepPos = j; + } + } + } + + let resolvedResult = result || path.sep; + + // if Windows common ancestor is root of drive must have trailing slash to be absolute. + if (resolvedResult && resolvedResult.endsWith(":") && process.platform === "win32") { + resolvedResult += path.sep; + } + return resolvedResult; +} + +/** + * Make relative path. + * @param {string} from The source path to get relative path. + * @param {string} to The destination path to get relative path. + * @returns {string} The relative path. + */ +function relative(from, to) { + const relPath = path.relative(from, to); + + if (path.sep === "/") { + return relPath; + } + return relPath.split(path.sep).join("/"); +} + +/** + * Get the trailing slash if existed. + * @param {string} filePath The path to check. + * @returns {string} The trailing slash if existed. + */ +function dirSuffix(filePath) { + const isDir = ( + filePath.endsWith(path.sep) || + (process.platform === "win32" && filePath.endsWith("/")) + ); + + return isDir ? "/" : ""; +} + +const DefaultPatterns = Object.freeze(["/**/node_modules/*"]); +const DotPatterns = Object.freeze([".*", "!.eslintrc.*", "!../"]); + +//------------------------------------------------------------------------------ +// Public +//------------------------------------------------------------------------------ + +/** + * Represents a set of glob patterns to ignore against a base path. + */ +class IgnorePattern { + + /** + * The default patterns. + * @type {string[]} + */ + static get DefaultPatterns() { + return DefaultPatterns; + } + + /** + * Create the default predicate function. + * @param {string} cwd The current working directory. + * @returns {((filePath:string, dot:boolean) => boolean) & {basePath:string; patterns:string[]}} + * The preficate function. + * The first argument is an absolute path that is checked. + * The second argument is the flag to not ignore dotfiles. + * If the predicate function returned `true`, it means the path should be ignored. + */ + static createDefaultIgnore(cwd) { + return this.createIgnore([new IgnorePattern(DefaultPatterns, cwd)]); + } + + /** + * Create the predicate function from multiple `IgnorePattern` objects. + * @param {IgnorePattern[]} ignorePatterns The list of ignore patterns. + * @returns {((filePath:string, dot?:boolean) => boolean) & {basePath:string; patterns:string[]}} + * The preficate function. + * The first argument is an absolute path that is checked. + * The second argument is the flag to not ignore dotfiles. + * If the predicate function returned `true`, it means the path should be ignored. + */ + static createIgnore(ignorePatterns) { + debug("Create with: %o", ignorePatterns); + + const basePath = getCommonAncestorPath(ignorePatterns.map(p => p.basePath)); + const patterns = ignorePatterns.flatMap(p => p.getPatternsRelativeTo(basePath)); + const ig = ignore({ allowRelativePaths: true }).add([...DotPatterns, ...patterns]); + const dotIg = ignore({ allowRelativePaths: true }).add(patterns); + + debug(" processed: %o", { basePath, patterns }); + + return Object.assign( + (filePath, dot = false) => { + assert(path.isAbsolute(filePath), "'filePath' should be an absolute path."); + const relPathRaw = relative(basePath, filePath); + const relPath = relPathRaw && (relPathRaw + dirSuffix(filePath)); + const adoptedIg = dot ? dotIg : ig; + const result = relPath !== "" && adoptedIg.ignores(relPath); + + debug("Check", { filePath, dot, relativePath: relPath, result }); + return result; + }, + { basePath, patterns } + ); + } + + /** + * Initialize a new `IgnorePattern` instance. + * @param {string[]} patterns The glob patterns that ignore to lint. + * @param {string} basePath The base path of `patterns`. + */ + constructor(patterns, basePath) { + assert(path.isAbsolute(basePath), "'basePath' should be an absolute path."); + + /** + * The glob patterns that ignore to lint. + * @type {string[]} + */ + this.patterns = patterns; + + /** + * The base path of `patterns`. + * @type {string} + */ + this.basePath = basePath; + + /** + * If `true` then patterns which don't start with `/` will match the paths to the outside of `basePath`. Defaults to `false`. + * + * It's set `true` for `.eslintignore`, `package.json`, and `--ignore-path` for backward compatibility. + * It's `false` as-is for `ignorePatterns` property in config files. + * @type {boolean} + */ + this.loose = false; + } + + /** + * Get `patterns` as modified for a given base path. It modifies the + * absolute paths in the patterns as prepending the difference of two base + * paths. + * @param {string} newBasePath The base path. + * @returns {string[]} Modifired patterns. + */ + getPatternsRelativeTo(newBasePath) { + assert(path.isAbsolute(newBasePath), "'newBasePath' should be an absolute path."); + const { basePath, loose, patterns } = this; + + if (newBasePath === basePath) { + return patterns; + } + const prefix = `/${relative(newBasePath, basePath)}`; + + return patterns.map(pattern => { + const negative = pattern.startsWith("!"); + const head = negative ? "!" : ""; + const body = negative ? pattern.slice(1) : pattern; + + if (body.startsWith("/") || body.startsWith("../")) { + return `${head}${prefix}${body}`; + } + return loose ? pattern : `${head}${prefix}/**/${body}`; + }); + } +} + +export { IgnorePattern }; diff --git a/slider/node_modules/@eslint/eslintrc/lib/config-array/index.js b/slider/node_modules/@eslint/eslintrc/lib/config-array/index.js new file mode 100644 index 0000000..43991a5 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/config-array/index.js @@ -0,0 +1,19 @@ +/** + * @fileoverview `ConfigArray` class. + * @author Toru Nagashima + */ + +import { ConfigArray, getUsedExtractedConfigs } from "./config-array.js"; +import { ConfigDependency } from "./config-dependency.js"; +import { ExtractedConfig } from "./extracted-config.js"; +import { IgnorePattern } from "./ignore-pattern.js"; +import { OverrideTester } from "./override-tester.js"; + +export { + ConfigArray, + ConfigDependency, + ExtractedConfig, + IgnorePattern, + OverrideTester, + getUsedExtractedConfigs +}; diff --git a/slider/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js b/slider/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js new file mode 100644 index 0000000..9a1688c --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js @@ -0,0 +1,227 @@ +/** + * @fileoverview `OverrideTester` class. + * + * `OverrideTester` class handles `files` property and `excludedFiles` property + * of `overrides` config. + * + * It provides one method. + * + * - `test(filePath)` + * Test if a file path matches the pair of `files` property and + * `excludedFiles` property. The `filePath` argument must be an absolute + * path. + * + * `ConfigArrayFactory` creates `OverrideTester` objects when it processes + * `overrides` properties. + * + * @author Toru Nagashima + */ + +import assert from "node:assert"; +import path from "node:path"; +import util from "node:util"; +import minimatch from "minimatch"; + +const { Minimatch } = minimatch; + +const minimatchOpts = { dot: true, matchBase: true }; + +/** + * @typedef {Object} Pattern + * @property {InstanceType[] | null} includes The positive matchers. + * @property {InstanceType[] | null} excludes The negative matchers. + */ + +/** + * Normalize a given pattern to an array. + * @param {string|string[]|undefined} patterns A glob pattern or an array of glob patterns. + * @returns {string[]|null} Normalized patterns. + * @private + */ +function normalizePatterns(patterns) { + if (Array.isArray(patterns)) { + return patterns.filter(Boolean); + } + if (typeof patterns === "string" && patterns) { + return [patterns]; + } + return []; +} + +/** + * Create the matchers of given patterns. + * @param {string[]} patterns The patterns. + * @returns {InstanceType[] | null} The matchers. + */ +function toMatcher(patterns) { + if (patterns.length === 0) { + return null; + } + return patterns.map(pattern => { + if (/^\.[/\\]/u.test(pattern)) { + return new Minimatch( + pattern.slice(2), + + // `./*.js` should not match with `subdir/foo.js` + { ...minimatchOpts, matchBase: false } + ); + } + return new Minimatch(pattern, minimatchOpts); + }); +} + +/** + * Convert a given matcher to string. + * @param {Pattern} matchers The matchers. + * @returns {string} The string expression of the matcher. + */ +function patternToJson({ includes, excludes }) { + return { + includes: includes && includes.map(m => m.pattern), + excludes: excludes && excludes.map(m => m.pattern) + }; +} + +/** + * The class to test given paths are matched by the patterns. + */ +class OverrideTester { + + /** + * Create a tester with given criteria. + * If there are no criteria, returns `null`. + * @param {string|string[]} files The glob patterns for included files. + * @param {string|string[]} excludedFiles The glob patterns for excluded files. + * @param {string} basePath The path to the base directory to test paths. + * @returns {OverrideTester|null} The created instance or `null`. + * @throws {Error} When invalid patterns are given. + */ + static create(files, excludedFiles, basePath) { + const includePatterns = normalizePatterns(files); + const excludePatterns = normalizePatterns(excludedFiles); + let endsWithWildcard = false; + + if (includePatterns.length === 0) { + return null; + } + + // Rejects absolute paths or relative paths to parents. + for (const pattern of includePatterns) { + if (path.isAbsolute(pattern) || pattern.includes("..")) { + throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`); + } + if (pattern.endsWith("*")) { + endsWithWildcard = true; + } + } + for (const pattern of excludePatterns) { + if (path.isAbsolute(pattern) || pattern.includes("..")) { + throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`); + } + } + + const includes = toMatcher(includePatterns); + const excludes = toMatcher(excludePatterns); + + return new OverrideTester( + [{ includes, excludes }], + basePath, + endsWithWildcard + ); + } + + /** + * Combine two testers by logical and. + * If either of the testers was `null`, returns the other tester. + * The `basePath` property of the two must be the same value. + * @param {OverrideTester|null} a A tester. + * @param {OverrideTester|null} b Another tester. + * @returns {OverrideTester|null} Combined tester. + */ + static and(a, b) { + if (!b) { + return a && new OverrideTester( + a.patterns, + a.basePath, + a.endsWithWildcard + ); + } + if (!a) { + return new OverrideTester( + b.patterns, + b.basePath, + b.endsWithWildcard + ); + } + + assert.strictEqual(a.basePath, b.basePath); + return new OverrideTester( + a.patterns.concat(b.patterns), + a.basePath, + a.endsWithWildcard || b.endsWithWildcard + ); + } + + /** + * Initialize this instance. + * @param {Pattern[]} patterns The matchers. + * @param {string} basePath The base path. + * @param {boolean} endsWithWildcard If `true` then a pattern ends with `*`. + */ + constructor(patterns, basePath, endsWithWildcard = false) { + + /** @type {Pattern[]} */ + this.patterns = patterns; + + /** @type {string} */ + this.basePath = basePath; + + /** @type {boolean} */ + this.endsWithWildcard = endsWithWildcard; + } + + /** + * Test if a given path is matched or not. + * @param {string} filePath The absolute path to the target file. + * @returns {boolean} `true` if the path was matched. + * @throws {Error} When invalid `filePath` is given. + */ + test(filePath) { + if (typeof filePath !== "string" || !path.isAbsolute(filePath)) { + throw new Error(`'filePath' should be an absolute path, but got ${filePath}.`); + } + const relativePath = path.relative(this.basePath, filePath); + + return this.patterns.every(({ includes, excludes }) => ( + (!includes || includes.some(m => m.match(relativePath))) && + (!excludes || !excludes.some(m => m.match(relativePath))) + )); + } + + /** + * Converts this instance to a JSON compatible object. + * @returns {Object} a JSON compatible object. + */ + toJSON() { + if (this.patterns.length === 1) { + return { + ...patternToJson(this.patterns[0]), + basePath: this.basePath + }; + } + return { + AND: this.patterns.map(patternToJson), + basePath: this.basePath + }; + } + + /** + * Custom inspect method for Node.js `console.log()`. + * @returns {Object} an object to display by `console.log()`. + */ + [util.inspect.custom]() { + return this.toJSON(); + } +} + +export { OverrideTester }; diff --git a/slider/node_modules/@eslint/eslintrc/lib/flat-compat.js b/slider/node_modules/@eslint/eslintrc/lib/flat-compat.js new file mode 100644 index 0000000..1841df4 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/flat-compat.js @@ -0,0 +1,319 @@ +/** + * @fileoverview Compatibility class for flat config. + * @author Nicholas C. Zakas + */ + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +import createDebug from "debug"; +import path from "node:path"; + +import environments from "../conf/environments.js"; +import { ConfigArrayFactory } from "./config-array-factory.js"; + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/** @typedef {import("../../shared/types").Environment} Environment */ +/** @typedef {import("../../shared/types").Processor} Processor */ + +const debug = createDebug("eslintrc:flat-compat"); +const cafactory = Symbol("cafactory"); + +/** + * Translates an ESLintRC-style config object into a flag-config-style config + * object. + * @param {Object} eslintrcConfig An ESLintRC-style config object. + * @param {Object} options Options to help translate the config. + * @param {string} options.resolveConfigRelativeTo To the directory to resolve + * configs from. + * @param {string} options.resolvePluginsRelativeTo The directory to resolve + * plugins from. + * @param {ReadOnlyMap} options.pluginEnvironments A map of plugin environment + * names to objects. + * @param {ReadOnlyMap} options.pluginProcessors A map of plugin processor + * names to objects. + * @returns {Object} A flag-config-style config object. + * @throws {Error} If a plugin or environment cannot be resolved. + */ +function translateESLintRC(eslintrcConfig, { + resolveConfigRelativeTo, + resolvePluginsRelativeTo, + pluginEnvironments, + pluginProcessors +}) { + + const flatConfig = {}; + const configs = []; + const languageOptions = {}; + const linterOptions = {}; + const keysToCopy = ["settings", "rules", "processor"]; + const languageOptionsKeysToCopy = ["globals", "parser", "parserOptions"]; + const linterOptionsKeysToCopy = ["noInlineConfig", "reportUnusedDisableDirectives"]; + + // copy over simple translations + for (const key of keysToCopy) { + if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") { + flatConfig[key] = eslintrcConfig[key]; + } + } + + // copy over languageOptions + for (const key of languageOptionsKeysToCopy) { + if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") { + + // create the languageOptions key in the flat config + flatConfig.languageOptions = languageOptions; + + if (key === "parser") { + debug(`Resolving parser '${languageOptions[key]}' relative to ${resolveConfigRelativeTo}`); + + if (eslintrcConfig[key].error) { + throw eslintrcConfig[key].error; + } + + languageOptions[key] = eslintrcConfig[key].definition; + continue; + } + + // clone any object values that are in the eslintrc config + if (eslintrcConfig[key] && typeof eslintrcConfig[key] === "object") { + languageOptions[key] = { + ...eslintrcConfig[key] + }; + } else { + languageOptions[key] = eslintrcConfig[key]; + } + } + } + + // copy over linterOptions + for (const key of linterOptionsKeysToCopy) { + if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") { + flatConfig.linterOptions = linterOptions; + linterOptions[key] = eslintrcConfig[key]; + } + } + + // move ecmaVersion a level up + if (languageOptions.parserOptions) { + + if ("ecmaVersion" in languageOptions.parserOptions) { + languageOptions.ecmaVersion = languageOptions.parserOptions.ecmaVersion; + delete languageOptions.parserOptions.ecmaVersion; + } + + if ("sourceType" in languageOptions.parserOptions) { + languageOptions.sourceType = languageOptions.parserOptions.sourceType; + delete languageOptions.parserOptions.sourceType; + } + + // check to see if we even need parserOptions anymore and remove it if not + if (Object.keys(languageOptions.parserOptions).length === 0) { + delete languageOptions.parserOptions; + } + } + + // overrides + if (eslintrcConfig.criteria) { + flatConfig.files = [absoluteFilePath => eslintrcConfig.criteria.test(absoluteFilePath)]; + } + + // translate plugins + if (eslintrcConfig.plugins && typeof eslintrcConfig.plugins === "object") { + debug(`Translating plugins: ${eslintrcConfig.plugins}`); + + flatConfig.plugins = {}; + + for (const pluginName of Object.keys(eslintrcConfig.plugins)) { + + debug(`Translating plugin: ${pluginName}`); + debug(`Resolving plugin '${pluginName} relative to ${resolvePluginsRelativeTo}`); + + const { original: plugin, error } = eslintrcConfig.plugins[pluginName]; + + if (error) { + throw error; + } + + flatConfig.plugins[pluginName] = plugin; + + // create a config for any processors + if (plugin.processors) { + for (const processorName of Object.keys(plugin.processors)) { + if (processorName.startsWith(".")) { + debug(`Assigning processor: ${pluginName}/${processorName}`); + + configs.unshift({ + files: [`**/*${processorName}`], + processor: pluginProcessors.get(`${pluginName}/${processorName}`) + }); + } + + } + } + } + } + + // translate env - must come after plugins + if (eslintrcConfig.env && typeof eslintrcConfig.env === "object") { + for (const envName of Object.keys(eslintrcConfig.env)) { + + // only add environments that are true + if (eslintrcConfig.env[envName]) { + debug(`Translating environment: ${envName}`); + + if (environments.has(envName)) { + + // built-in environments should be defined first + configs.unshift(...translateESLintRC({ + criteria: eslintrcConfig.criteria, + ...environments.get(envName) + }, { + resolveConfigRelativeTo, + resolvePluginsRelativeTo + })); + } else if (pluginEnvironments.has(envName)) { + + // if the environment comes from a plugin, it should come after the plugin config + configs.push(...translateESLintRC({ + criteria: eslintrcConfig.criteria, + ...pluginEnvironments.get(envName) + }, { + resolveConfigRelativeTo, + resolvePluginsRelativeTo + })); + } + } + } + } + + // only add if there are actually keys in the config + if (Object.keys(flatConfig).length > 0) { + configs.push(flatConfig); + } + + return configs; +} + + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * A compatibility class for working with configs. + */ +class FlatCompat { + + constructor({ + baseDirectory = process.cwd(), + resolvePluginsRelativeTo = baseDirectory, + recommendedConfig, + allConfig + } = {}) { + this.baseDirectory = baseDirectory; + this.resolvePluginsRelativeTo = resolvePluginsRelativeTo; + this[cafactory] = new ConfigArrayFactory({ + cwd: baseDirectory, + resolvePluginsRelativeTo, + getEslintAllConfig() { + + if (!allConfig) { + throw new TypeError("Missing parameter 'allConfig' in FlatCompat constructor."); + } + + return allConfig; + }, + getEslintRecommendedConfig() { + + if (!recommendedConfig) { + throw new TypeError("Missing parameter 'recommendedConfig' in FlatCompat constructor."); + } + + return recommendedConfig; + } + }); + } + + /** + * Translates an ESLintRC-style config into a flag-config-style config. + * @param {Object} eslintrcConfig The ESLintRC-style config object. + * @returns {Object} A flag-config-style config object. + */ + config(eslintrcConfig) { + const eslintrcArray = this[cafactory].create(eslintrcConfig, { + basePath: this.baseDirectory + }); + + const flatArray = []; + let hasIgnorePatterns = false; + + eslintrcArray.forEach(configData => { + if (configData.type === "config") { + hasIgnorePatterns = hasIgnorePatterns || configData.ignorePattern; + flatArray.push(...translateESLintRC(configData, { + resolveConfigRelativeTo: path.join(this.baseDirectory, "__placeholder.js"), + resolvePluginsRelativeTo: path.join(this.resolvePluginsRelativeTo, "__placeholder.js"), + pluginEnvironments: eslintrcArray.pluginEnvironments, + pluginProcessors: eslintrcArray.pluginProcessors + })); + } + }); + + // combine ignorePatterns to emulate ESLintRC behavior better + if (hasIgnorePatterns) { + flatArray.unshift({ + ignores: [filePath => { + + // Compute the final config for this file. + // This filters config array elements by `files`/`excludedFiles` then merges the elements. + const finalConfig = eslintrcArray.extractConfig(filePath); + + // Test the `ignorePattern` properties of the final config. + return Boolean(finalConfig.ignores) && finalConfig.ignores(filePath); + }] + }); + } + + return flatArray; + } + + /** + * Translates the `env` section of an ESLintRC-style config. + * @param {Object} envConfig The `env` section of an ESLintRC config. + * @returns {Object[]} An array of flag-config objects representing the environments. + */ + env(envConfig) { + return this.config({ + env: envConfig + }); + } + + /** + * Translates the `extends` section of an ESLintRC-style config. + * @param {...string} configsToExtend The names of the configs to load. + * @returns {Object[]} An array of flag-config objects representing the config. + */ + extends(...configsToExtend) { + return this.config({ + extends: configsToExtend + }); + } + + /** + * Translates the `plugins` section of an ESLintRC-style config. + * @param {...string} plugins The names of the plugins to load. + * @returns {Object[]} An array of flag-config objects representing the plugins. + */ + plugins(...plugins) { + return this.config({ + plugins + }); + } +} + +export { FlatCompat }; diff --git a/slider/node_modules/@eslint/eslintrc/lib/index-universal.js b/slider/node_modules/@eslint/eslintrc/lib/index-universal.js new file mode 100644 index 0000000..eb3d556 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/index-universal.js @@ -0,0 +1,29 @@ +/** + * @fileoverview Package exports for @eslint/eslintrc + * @author Nicholas C. Zakas + */ +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +import * as ConfigOps from "./shared/config-ops.js"; +import ConfigValidator from "./shared/config-validator.js"; +import * as naming from "./shared/naming.js"; +import environments from "../conf/environments.js"; + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +const Legacy = { + environments, + + // shared + ConfigOps, + ConfigValidator, + naming +}; + +export { + Legacy +}; diff --git a/slider/node_modules/@eslint/eslintrc/lib/index.js b/slider/node_modules/@eslint/eslintrc/lib/index.js new file mode 100644 index 0000000..50a9877 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/index.js @@ -0,0 +1,58 @@ +/** + * @fileoverview Package exports for @eslint/eslintrc + * @author Nicholas C. Zakas + */ +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +import { + ConfigArrayFactory, + createContext as createConfigArrayFactoryContext, + loadConfigFile +} from "./config-array-factory.js"; + +import { CascadingConfigArrayFactory } from "./cascading-config-array-factory.js"; +import * as ModuleResolver from "./shared/relative-module-resolver.js"; +import { ConfigArray, getUsedExtractedConfigs } from "./config-array/index.js"; +import { ConfigDependency } from "./config-array/config-dependency.js"; +import { ExtractedConfig } from "./config-array/extracted-config.js"; +import { IgnorePattern } from "./config-array/ignore-pattern.js"; +import { OverrideTester } from "./config-array/override-tester.js"; +import * as ConfigOps from "./shared/config-ops.js"; +import ConfigValidator from "./shared/config-validator.js"; +import * as naming from "./shared/naming.js"; +import { FlatCompat } from "./flat-compat.js"; +import environments from "../conf/environments.js"; + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +const Legacy = { + ConfigArray, + createConfigArrayFactoryContext, + CascadingConfigArrayFactory, + ConfigArrayFactory, + ConfigDependency, + ExtractedConfig, + IgnorePattern, + OverrideTester, + getUsedExtractedConfigs, + environments, + loadConfigFile, + + // shared + ConfigOps, + ConfigValidator, + ModuleResolver, + naming +}; + +export { + + Legacy, + + FlatCompat + +}; diff --git a/slider/node_modules/@eslint/eslintrc/lib/shared/ajv.js b/slider/node_modules/@eslint/eslintrc/lib/shared/ajv.js new file mode 100644 index 0000000..496c94d --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/shared/ajv.js @@ -0,0 +1,191 @@ +/** + * @fileoverview The instance of Ajv validator. + * @author Evgeny Poberezkin + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +import Ajv from "ajv"; + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/* + * Copied from ajv/lib/refs/json-schema-draft-04.json + * The MIT License (MIT) + * Copyright (c) 2015-2017 Evgeny Poberezkin + */ +const metaSchema = { + id: "http://json-schema.org/draft-04/schema#", + $schema: "http://json-schema.org/draft-04/schema#", + description: "Core schema meta-schema", + definitions: { + schemaArray: { + type: "array", + minItems: 1, + items: { $ref: "#" } + }, + positiveInteger: { + type: "integer", + minimum: 0 + }, + positiveIntegerDefault0: { + allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }] + }, + simpleTypes: { + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + stringArray: { + type: "array", + items: { type: "string" }, + minItems: 1, + uniqueItems: true + } + }, + type: "object", + properties: { + id: { + type: "string" + }, + $schema: { + type: "string" + }, + title: { + type: "string" + }, + description: { + type: "string" + }, + default: { }, + multipleOf: { + type: "number", + minimum: 0, + exclusiveMinimum: true + }, + maximum: { + type: "number" + }, + exclusiveMaximum: { + type: "boolean", + default: false + }, + minimum: { + type: "number" + }, + exclusiveMinimum: { + type: "boolean", + default: false + }, + maxLength: { $ref: "#/definitions/positiveInteger" }, + minLength: { $ref: "#/definitions/positiveIntegerDefault0" }, + pattern: { + type: "string", + format: "regex" + }, + additionalItems: { + anyOf: [ + { type: "boolean" }, + { $ref: "#" } + ], + default: { } + }, + items: { + anyOf: [ + { $ref: "#" }, + { $ref: "#/definitions/schemaArray" } + ], + default: { } + }, + maxItems: { $ref: "#/definitions/positiveInteger" }, + minItems: { $ref: "#/definitions/positiveIntegerDefault0" }, + uniqueItems: { + type: "boolean", + default: false + }, + maxProperties: { $ref: "#/definitions/positiveInteger" }, + minProperties: { $ref: "#/definitions/positiveIntegerDefault0" }, + required: { $ref: "#/definitions/stringArray" }, + additionalProperties: { + anyOf: [ + { type: "boolean" }, + { $ref: "#" } + ], + default: { } + }, + definitions: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + properties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + patternProperties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + dependencies: { + type: "object", + additionalProperties: { + anyOf: [ + { $ref: "#" }, + { $ref: "#/definitions/stringArray" } + ] + } + }, + enum: { + type: "array", + minItems: 1, + uniqueItems: true + }, + type: { + anyOf: [ + { $ref: "#/definitions/simpleTypes" }, + { + type: "array", + items: { $ref: "#/definitions/simpleTypes" }, + minItems: 1, + uniqueItems: true + } + ] + }, + format: { type: "string" }, + allOf: { $ref: "#/definitions/schemaArray" }, + anyOf: { $ref: "#/definitions/schemaArray" }, + oneOf: { $ref: "#/definitions/schemaArray" }, + not: { $ref: "#" } + }, + dependencies: { + exclusiveMaximum: ["maximum"], + exclusiveMinimum: ["minimum"] + }, + default: { } +}; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +export default (additionalOptions = {}) => { + const ajv = new Ajv({ + meta: false, + useDefaults: true, + validateSchema: false, + missingRefs: "ignore", + verbose: true, + schemaId: "auto", + ...additionalOptions + }); + + ajv.addMetaSchema(metaSchema); + // eslint-disable-next-line no-underscore-dangle -- part of the API + ajv._opts.defaultMeta = metaSchema.id; + + return ajv; +}; diff --git a/slider/node_modules/@eslint/eslintrc/lib/shared/config-ops.js b/slider/node_modules/@eslint/eslintrc/lib/shared/config-ops.js new file mode 100644 index 0000000..4e76c78 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/shared/config-ops.js @@ -0,0 +1,135 @@ +/** + * @fileoverview Config file operations. This file must be usable in the browser, + * so no Node-specific code can be here. + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +const RULE_SEVERITY_STRINGS = ["off", "warn", "error"], + RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => { + map[value] = index; + return map; + }, {}), + VALID_SEVERITIES = new Set([0, 1, 2, "off", "warn", "error"]); + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Normalizes the severity value of a rule's configuration to a number + * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally + * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0), + * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array + * whose first element is one of the above values. Strings are matched case-insensitively. + * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0. + */ +function getRuleSeverity(ruleConfig) { + const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + + if (severityValue === 0 || severityValue === 1 || severityValue === 2) { + return severityValue; + } + + if (typeof severityValue === "string") { + return RULE_SEVERITY[severityValue.toLowerCase()] || 0; + } + + return 0; +} + +/** + * Converts old-style severity settings (0, 1, 2) into new-style + * severity settings (off, warn, error) for all rules. Assumption is that severity + * values have already been validated as correct. + * @param {Object} config The config object to normalize. + * @returns {void} + */ +function normalizeToStrings(config) { + + if (config.rules) { + Object.keys(config.rules).forEach(ruleId => { + const ruleConfig = config.rules[ruleId]; + + if (typeof ruleConfig === "number") { + config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0]; + } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") { + ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0]; + } + }); + } +} + +/** + * Determines if the severity for the given rule configuration represents an error. + * @param {int|string|Array} ruleConfig The configuration for an individual rule. + * @returns {boolean} True if the rule represents an error, false if not. + */ +function isErrorSeverity(ruleConfig) { + return getRuleSeverity(ruleConfig) === 2; +} + +/** + * Checks whether a given config has valid severity or not. + * @param {number|string|Array} ruleConfig The configuration for an individual rule. + * @returns {boolean} `true` if the configuration has valid severity. + */ +function isValidSeverity(ruleConfig) { + let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + + if (typeof severity === "string") { + severity = severity.toLowerCase(); + } + return VALID_SEVERITIES.has(severity); +} + +/** + * Checks whether every rule of a given config has valid severity or not. + * @param {Object} config The configuration for rules. + * @returns {boolean} `true` if the configuration has valid severity. + */ +function isEverySeverityValid(config) { + return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId])); +} + +/** + * Normalizes a value for a global in a config + * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in + * a global directive comment + * @returns {("readable"|"writeable"|"off")} The value normalized as a string + * @throws Error if global value is invalid + */ +function normalizeConfigGlobal(configuredValue) { + switch (configuredValue) { + case "off": + return "off"; + + case true: + case "true": + case "writeable": + case "writable": + return "writable"; + + case null: + case false: + case "false": + case "readable": + case "readonly": + return "readonly"; + + default: + throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`); + } +} + +export { + getRuleSeverity, + normalizeToStrings, + isErrorSeverity, + isValidSeverity, + isEverySeverityValid, + normalizeConfigGlobal +}; diff --git a/slider/node_modules/@eslint/eslintrc/lib/shared/config-validator.js b/slider/node_modules/@eslint/eslintrc/lib/shared/config-validator.js new file mode 100644 index 0000000..0e08670 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/shared/config-validator.js @@ -0,0 +1,383 @@ +/** + * @fileoverview Validates configs. + * @author Brandon Mills + */ + +/* eslint class-methods-use-this: "off" -- not needed in this file */ + +//------------------------------------------------------------------------------ +// Typedefs +//------------------------------------------------------------------------------ + +/** @typedef {import("../shared/types").Rule} Rule */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +import util from "node:util"; +import * as ConfigOps from "./config-ops.js"; +import { emitDeprecationWarning } from "./deprecation-warnings.js"; +import ajvOrig from "./ajv.js"; +import { deepMergeArrays } from "./deep-merge-arrays.js"; +import configSchema from "../../conf/config-schema.js"; +import BuiltInEnvironments from "../../conf/environments.js"; + +const ajv = ajvOrig(); + +const ruleValidators = new WeakMap(); +const noop = Function.prototype; + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ +let validateSchema; +const severityMap = { + error: 2, + warn: 1, + off: 0 +}; + +const validated = new WeakSet(); + +// JSON schema that disallows passing any options +const noOptionsSchema = Object.freeze({ + type: "array", + minItems: 0, + maxItems: 0 +}); + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * Validator for configuration objects. + */ +export default class ConfigValidator { + constructor({ builtInRules = new Map() } = {}) { + this.builtInRules = builtInRules; + } + + /** + * Gets a complete options schema for a rule. + * @param {Rule} rule A rule object + * @throws {TypeError} If `meta.schema` is specified but is not an array, object or `false`. + * @returns {Object|null} JSON Schema for the rule's options. + * `null` if rule wasn't passed or its `meta.schema` is `false`. + */ + getRuleOptionsSchema(rule) { + if (!rule) { + return null; + } + + if (!rule.meta) { + return { ...noOptionsSchema }; // default if `meta.schema` is not specified + } + + const schema = rule.meta.schema; + + if (typeof schema === "undefined") { + return { ...noOptionsSchema }; // default if `meta.schema` is not specified + } + + // `schema:false` is an allowed explicit opt-out of options validation for the rule + if (schema === false) { + return null; + } + + if (typeof schema !== "object" || schema === null) { + throw new TypeError("Rule's `meta.schema` must be an array or object"); + } + + // ESLint-specific array form needs to be converted into a valid JSON Schema definition + if (Array.isArray(schema)) { + if (schema.length) { + return { + type: "array", + items: schema, + minItems: 0, + maxItems: schema.length + }; + } + + // `schema:[]` is an explicit way to specify that the rule does not accept any options + return { ...noOptionsSchema }; + } + + // `schema:` is assumed to be a valid JSON Schema definition + return schema; + } + + /** + * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid. + * @param {options} options The given options for the rule. + * @returns {number|string} The rule's severity value + * @throws {Error} If the severity is invalid. + */ + validateRuleSeverity(options) { + const severity = Array.isArray(options) ? options[0] : options; + const normSeverity = typeof severity === "string" ? severityMap[severity.toLowerCase()] : severity; + + if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) { + return normSeverity; + } + + throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util.inspect(severity).replace(/'/gu, "\"").replace(/\n/gu, "")}').\n`); + + } + + /** + * Validates the non-severity options passed to a rule, based on its schema. + * @param {{create: Function}} rule The rule to validate + * @param {Array} localOptions The options for the rule, excluding severity + * @returns {void} + * @throws {Error} If the options are invalid. + */ + validateRuleSchema(rule, localOptions) { + if (!ruleValidators.has(rule)) { + try { + const schema = this.getRuleOptionsSchema(rule); + + if (schema) { + ruleValidators.set(rule, ajv.compile(schema)); + } + } catch (err) { + const errorWithCode = new Error(err.message, { cause: err }); + + errorWithCode.code = "ESLINT_INVALID_RULE_OPTIONS_SCHEMA"; + + throw errorWithCode; + } + } + + const validateRule = ruleValidators.get(rule); + + if (validateRule) { + const mergedOptions = deepMergeArrays(rule.meta?.defaultOptions, localOptions); + + validateRule(mergedOptions); + + if (validateRule.errors) { + throw new Error(validateRule.errors.map( + error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n` + ).join("")); + } + } + } + + /** + * Validates a rule's options against its schema. + * @param {{create: Function}|null} rule The rule that the config is being validated for + * @param {string} ruleId The rule's unique name. + * @param {Array|number} options The given options for the rule. + * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined, + * no source is prepended to the message. + * @returns {void} + * @throws {Error} If the options are invalid. + */ + validateRuleOptions(rule, ruleId, options, source = null) { + try { + const severity = this.validateRuleSeverity(options); + + if (severity !== 0) { + this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []); + } + } catch (err) { + let enhancedMessage = err.code === "ESLINT_INVALID_RULE_OPTIONS_SCHEMA" + ? `Error while processing options validation schema of rule '${ruleId}': ${err.message}` + : `Configuration for rule "${ruleId}" is invalid:\n${err.message}`; + + if (typeof source === "string") { + enhancedMessage = `${source}:\n\t${enhancedMessage}`; + } + + const enhancedError = new Error(enhancedMessage, { cause: err }); + + if (err.code) { + enhancedError.code = err.code; + } + + throw enhancedError; + } + } + + /** + * Validates an environment object + * @param {Object} environment The environment config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {(envId:string) => Object} [getAdditionalEnv] A map from strings to loaded environments. + * @returns {void} + * @throws {Error} If the environment is invalid. + */ + validateEnvironment( + environment, + source, + getAdditionalEnv = noop + ) { + + // not having an environment is ok + if (!environment) { + return; + } + + Object.keys(environment).forEach(id => { + const env = getAdditionalEnv(id) || BuiltInEnvironments.get(id) || null; + + if (!env) { + const message = `${source}:\n\tEnvironment key "${id}" is unknown\n`; + + throw new Error(message); + } + }); + } + + /** + * Validates a rules config object + * @param {Object} rulesConfig The rules config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {(ruleId:string) => Object} getAdditionalRule A map from strings to loaded rules + * @returns {void} + */ + validateRules( + rulesConfig, + source, + getAdditionalRule = noop + ) { + if (!rulesConfig) { + return; + } + + Object.keys(rulesConfig).forEach(id => { + const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null; + + this.validateRuleOptions(rule, id, rulesConfig[id], source); + }); + } + + /** + * Validates a `globals` section of a config file + * @param {Object} globalsConfig The `globals` section + * @param {string|null} source The name of the configuration source to report in the event of an error. + * @returns {void} + */ + validateGlobals(globalsConfig, source = null) { + if (!globalsConfig) { + return; + } + + Object.entries(globalsConfig) + .forEach(([configuredGlobal, configuredValue]) => { + try { + ConfigOps.normalizeConfigGlobal(configuredValue); + } catch (err) { + throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`); + } + }); + } + + /** + * Validate `processor` configuration. + * @param {string|undefined} processorName The processor name. + * @param {string} source The name of config file. + * @param {(id:string) => Processor} getProcessor The getter of defined processors. + * @returns {void} + * @throws {Error} If the processor is invalid. + */ + validateProcessor(processorName, source, getProcessor) { + if (processorName && !getProcessor(processorName)) { + throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`); + } + } + + /** + * Formats an array of schema validation errors. + * @param {Array} errors An array of error messages to format. + * @returns {string} Formatted error message + */ + formatErrors(errors) { + return errors.map(error => { + if (error.keyword === "additionalProperties") { + const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty; + + return `Unexpected top-level property "${formattedPropertyPath}"`; + } + if (error.keyword === "type") { + const formattedField = error.dataPath.slice(1); + const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join("/") : error.schema; + const formattedValue = JSON.stringify(error.data); + + return `Property "${formattedField}" is the wrong type (expected ${formattedExpectedType} but got \`${formattedValue}\`)`; + } + + const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath; + + return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`; + }).map(message => `\t- ${message}.\n`).join(""); + } + + /** + * Validates the top level properties of the config object. + * @param {Object} config The config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @returns {void} + * @throws {Error} If the config is invalid. + */ + validateConfigSchema(config, source = null) { + validateSchema = validateSchema || ajv.compile(configSchema); + + if (!validateSchema(config)) { + throw new Error(`ESLint configuration in ${source} is invalid:\n${this.formatErrors(validateSchema.errors)}`); + } + + if (Object.hasOwn(config, "ecmaFeatures")) { + emitDeprecationWarning(source, "ESLINT_LEGACY_ECMAFEATURES"); + } + } + + /** + * Validates an entire config object. + * @param {Object} config The config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {(ruleId:string) => Object} [getAdditionalRule] A map from strings to loaded rules. + * @param {(envId:string) => Object} [getAdditionalEnv] A map from strings to loaded envs. + * @returns {void} + */ + validate(config, source, getAdditionalRule, getAdditionalEnv) { + this.validateConfigSchema(config, source); + this.validateRules(config.rules, source, getAdditionalRule); + this.validateEnvironment(config.env, source, getAdditionalEnv); + this.validateGlobals(config.globals, source); + + for (const override of config.overrides || []) { + this.validateRules(override.rules, source, getAdditionalRule); + this.validateEnvironment(override.env, source, getAdditionalEnv); + this.validateGlobals(config.globals, source); + } + } + + /** + * Validate config array object. + * @param {ConfigArray} configArray The config array to validate. + * @returns {void} + */ + validateConfigArray(configArray) { + const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments); + const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors); + const getPluginRule = Map.prototype.get.bind(configArray.pluginRules); + + // Validate. + for (const element of configArray) { + if (validated.has(element)) { + continue; + } + validated.add(element); + + this.validateEnvironment(element.env, element.name, getPluginEnv); + this.validateGlobals(element.globals, element.name); + this.validateProcessor(element.processor, element.name, getPluginProcessor); + this.validateRules(element.rules, element.name, getPluginRule); + } + } + +} diff --git a/slider/node_modules/@eslint/eslintrc/lib/shared/deep-merge-arrays.js b/slider/node_modules/@eslint/eslintrc/lib/shared/deep-merge-arrays.js new file mode 100644 index 0000000..a7061c2 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/shared/deep-merge-arrays.js @@ -0,0 +1,58 @@ +/** + * @fileoverview Applies default rule options + * @author JoshuaKGoldberg + */ + +/** + * Check if the variable contains an object strictly rejecting arrays + * @param {unknown} value an object + * @returns {boolean} Whether value is an object + */ +function isObjectNotArray(value) { + return typeof value === "object" && value !== null && !Array.isArray(value); +} + +/** + * Deeply merges second on top of first, creating a new {} object if needed. + * @param {T} first Base, default value. + * @param {U} second User-specified value. + * @returns {T | U | (T & U)} Merged equivalent of second on top of first. + */ +function deepMergeObjects(first, second) { + if (second === void 0) { + return first; + } + + if (!isObjectNotArray(first) || !isObjectNotArray(second)) { + return second; + } + + const result = { ...first, ...second }; + + for (const key of Object.keys(second)) { + if (Object.prototype.propertyIsEnumerable.call(first, key)) { + result[key] = deepMergeObjects(first[key], second[key]); + } + } + + return result; +} + +/** + * Deeply merges second on top of first, creating a new [] array if needed. + * @param {T[] | undefined} first Base, default values. + * @param {U[] | undefined} second User-specified values. + * @returns {(T | U | (T & U))[]} Merged equivalent of second on top of first. + */ +function deepMergeArrays(first, second) { + if (!first || !second) { + return second || first || []; + } + + return [ + ...first.map((value, i) => deepMergeObjects(value, second[i])), + ...second.slice(first.length) + ]; +} + +export { deepMergeArrays }; diff --git a/slider/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js b/slider/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js new file mode 100644 index 0000000..d4458e1 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js @@ -0,0 +1,63 @@ +/** + * @fileoverview Provide the function that emits deprecation warnings. + * @author Toru Nagashima + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +import path from "node:path"; + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +// Defitions for deprecation warnings. +const deprecationWarningMessages = { + ESLINT_LEGACY_ECMAFEATURES: + "The 'ecmaFeatures' config file property is deprecated and has no effect.", + ESLINT_PERSONAL_CONFIG_LOAD: + "'~/.eslintrc.*' config files have been deprecated. " + + "Please use a config file per project or the '--config' option.", + ESLINT_PERSONAL_CONFIG_SUPPRESS: + "'~/.eslintrc.*' config files have been deprecated. " + + "Please remove it or add 'root:true' to the config files in your " + + "projects in order to avoid loading '~/.eslintrc.*' accidentally." +}; + +const sourceFileErrorCache = new Set(); + +/** + * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted + * for each unique file path, but repeated invocations with the same file path have no effect. + * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active. + * @param {string} source The name of the configuration source to report the warning for. + * @param {string} errorCode The warning message to show. + * @returns {void} + */ +function emitDeprecationWarning(source, errorCode) { + const cacheKey = JSON.stringify({ source, errorCode }); + + if (sourceFileErrorCache.has(cacheKey)) { + return; + } + sourceFileErrorCache.add(cacheKey); + + const rel = path.relative(process.cwd(), source); + const message = deprecationWarningMessages[errorCode]; + + process.emitWarning( + `${message} (found in "${rel}")`, + "DeprecationWarning", + errorCode + ); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +export { + emitDeprecationWarning +}; diff --git a/slider/node_modules/@eslint/eslintrc/lib/shared/naming.js b/slider/node_modules/@eslint/eslintrc/lib/shared/naming.js new file mode 100644 index 0000000..f51bbcc --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/shared/naming.js @@ -0,0 +1,96 @@ +/** + * @fileoverview Common helpers for naming of plugins, formatters and configs + */ + +const NAMESPACE_REGEX = /^@.*\//iu; + +/** + * Brings package name to correct format based on prefix + * @param {string} name The name of the package. + * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter" + * @returns {string} Normalized name of the package + * @private + */ +function normalizePackageName(name, prefix) { + let normalizedName = name; + + /** + * On Windows, name can come in with Windows slashes instead of Unix slashes. + * Normalize to Unix first to avoid errors later on. + * https://github.com/eslint/eslint/issues/5644 + */ + if (normalizedName.includes("\\")) { + normalizedName = normalizedName.replace(/\\/gu, "/"); + } + + if (normalizedName.charAt(0) === "@") { + + /** + * it's a scoped package + * package name is the prefix, or just a username + */ + const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, "u"), + scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, "u"); + + if (scopedPackageShortcutRegex.test(normalizedName)) { + normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`); + } else if (!scopedPackageNameRegex.test(normalizedName.split("/")[1])) { + + /** + * for scoped packages, insert the prefix after the first / unless + * the path is already @scope/eslint or @scope/eslint-xxx-yyy + */ + normalizedName = normalizedName.replace(/^@([^/]+)\/(.*)$/u, `@$1/${prefix}-$2`); + } + } else if (!normalizedName.startsWith(`${prefix}-`)) { + normalizedName = `${prefix}-${normalizedName}`; + } + + return normalizedName; +} + +/** + * Removes the prefix from a fullname. + * @param {string} fullname The term which may have the prefix. + * @param {string} prefix The prefix to remove. + * @returns {string} The term without prefix. + */ +function getShorthandName(fullname, prefix) { + if (fullname[0] === "@") { + let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(fullname); + + if (matchResult) { + return matchResult[1]; + } + + matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec(fullname); + if (matchResult) { + return `${matchResult[1]}/${matchResult[2]}`; + } + } else if (fullname.startsWith(`${prefix}-`)) { + return fullname.slice(prefix.length + 1); + } + + return fullname; +} + +/** + * Gets the scope (namespace) of a term. + * @param {string} term The term which may have the namespace. + * @returns {string} The namespace of the term if it has one. + */ +function getNamespaceFromTerm(term) { + const match = term.match(NAMESPACE_REGEX); + + return match ? match[0] : ""; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +export { + normalizePackageName, + getShorthandName, + getNamespaceFromTerm +}; diff --git a/slider/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js b/slider/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js new file mode 100644 index 0000000..73e4ba9 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js @@ -0,0 +1,43 @@ +/** + * Utility for resolving a module relative to another module + * @author Teddy Katz + */ + +import Module from "node:module"; + +/* + * `Module.createRequire` is added in v12.2.0. It supports URL as well. + * We only support the case where the argument is a filepath, not a URL. + */ +const createRequire = Module.createRequire; + +/** + * Resolves a Node module relative to another module + * @param {string} moduleName The name of a Node module, or a path to a Node module. + * @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be + * a file rather than a directory, but the file need not actually exist. + * @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath` + * @throws {Error} When the module cannot be resolved. + */ +function resolve(moduleName, relativeToPath) { + try { + return createRequire(relativeToPath).resolve(moduleName); + } catch (error) { + + // This `if` block is for older Node.js than 12.0.0. We can remove this block in the future. + if ( + typeof error === "object" && + error !== null && + error.code === "MODULE_NOT_FOUND" && + !error.requireStack && + error.message.includes(moduleName) + ) { + error.message += `\nRequire stack:\n- ${relativeToPath}`; + } + throw error; + } +} + +export { + resolve +}; diff --git a/slider/node_modules/@eslint/eslintrc/lib/shared/types.js b/slider/node_modules/@eslint/eslintrc/lib/shared/types.js new file mode 100644 index 0000000..f23b5cc --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/shared/types.js @@ -0,0 +1,149 @@ +/** + * @fileoverview Define common types for input completion. + * @author Toru Nagashima + */ + +/** @type {any} */ +export default {}; + +/** @typedef {boolean | "off" | "readable" | "readonly" | "writable" | "writeable"} GlobalConf */ +/** @typedef {0 | 1 | 2 | "off" | "warn" | "error"} SeverityConf */ +/** @typedef {SeverityConf | [SeverityConf, ...any[]]} RuleConf */ + +/** + * @typedef {Object} EcmaFeatures + * @property {boolean} [globalReturn] Enabling `return` statements at the top-level. + * @property {boolean} [jsx] Enabling JSX syntax. + * @property {boolean} [impliedStrict] Enabling strict mode always. + */ + +/** + * @typedef {Object} ParserOptions + * @property {EcmaFeatures} [ecmaFeatures] The optional features. + * @property {3|5|6|7|8|9|10|11|12|2015|2016|2017|2018|2019|2020|2021} [ecmaVersion] The ECMAScript version (or revision number). + * @property {"script"|"module"} [sourceType] The source code type. + */ + +/** + * @typedef {Object} ConfigData + * @property {Record} [env] The environment settings. + * @property {string | string[]} [extends] The path to other config files or the package name of shareable configs. + * @property {Record} [globals] The global variable settings. + * @property {string | string[]} [ignorePatterns] The glob patterns that ignore to lint. + * @property {boolean} [noInlineConfig] The flag that disables directive comments. + * @property {OverrideConfigData[]} [overrides] The override settings per kind of files. + * @property {string} [parser] The path to a parser or the package name of a parser. + * @property {ParserOptions} [parserOptions] The parser options. + * @property {string[]} [plugins] The plugin specifiers. + * @property {string} [processor] The processor specifier. + * @property {boolean} [reportUnusedDisableDirectives] The flag to report unused `eslint-disable` comments. + * @property {boolean} [root] The root flag. + * @property {Record} [rules] The rule settings. + * @property {Object} [settings] The shared settings. + */ + +/** + * @typedef {Object} OverrideConfigData + * @property {Record} [env] The environment settings. + * @property {string | string[]} [excludedFiles] The glob pattarns for excluded files. + * @property {string | string[]} [extends] The path to other config files or the package name of shareable configs. + * @property {string | string[]} files The glob patterns for target files. + * @property {Record} [globals] The global variable settings. + * @property {boolean} [noInlineConfig] The flag that disables directive comments. + * @property {OverrideConfigData[]} [overrides] The override settings per kind of files. + * @property {string} [parser] The path to a parser or the package name of a parser. + * @property {ParserOptions} [parserOptions] The parser options. + * @property {string[]} [plugins] The plugin specifiers. + * @property {string} [processor] The processor specifier. + * @property {boolean} [reportUnusedDisableDirectives] The flag to report unused `eslint-disable` comments. + * @property {Record} [rules] The rule settings. + * @property {Object} [settings] The shared settings. + */ + +/** + * @typedef {Object} ParseResult + * @property {Object} ast The AST. + * @property {ScopeManager} [scopeManager] The scope manager of the AST. + * @property {Record} [services] The services that the parser provides. + * @property {Record} [visitorKeys] The visitor keys of the AST. + */ + +/** + * @typedef {Object} Parser + * @property {(text:string, options:ParserOptions) => Object} parse The definition of global variables. + * @property {(text:string, options:ParserOptions) => ParseResult} [parseForESLint] The parser options that will be enabled under this environment. + */ + +/** + * @typedef {Object} Environment + * @property {Record} [globals] The definition of global variables. + * @property {ParserOptions} [parserOptions] The parser options that will be enabled under this environment. + */ + +/** + * @typedef {Object} LintMessage + * @property {number} column The 1-based column number. + * @property {number} [endColumn] The 1-based column number of the end location. + * @property {number} [endLine] The 1-based line number of the end location. + * @property {boolean} fatal If `true` then this is a fatal error. + * @property {{range:[number,number], text:string}} [fix] Information for autofix. + * @property {number} line The 1-based line number. + * @property {string} message The error message. + * @property {string|null} ruleId The ID of the rule which makes this message. + * @property {0|1|2} severity The severity of this message. + * @property {Array<{desc?: string, messageId?: string, fix: {range: [number, number], text: string}}>} [suggestions] Information for suggestions. + */ + +/** + * @typedef {Object} SuggestionResult + * @property {string} desc A short description. + * @property {string} [messageId] Id referencing a message for the description. + * @property {{ text: string, range: number[] }} fix fix result info + */ + +/** + * @typedef {Object} Processor + * @property {(text:string, filename:string) => Array} [preprocess] The function to extract code blocks. + * @property {(messagesList:LintMessage[][], filename:string) => LintMessage[]} [postprocess] The function to merge messages. + * @property {boolean} [supportsAutofix] If `true` then it means the processor supports autofix. + */ + +/** + * @typedef {Object} RuleMetaDocs + * @property {string} category The category of the rule. + * @property {string} description The description of the rule. + * @property {boolean} recommended If `true` then the rule is included in `eslint:recommended` preset. + * @property {string} url The URL of the rule documentation. + */ + +/** + * @typedef {Object} RuleMeta + * @property {boolean} [deprecated] If `true` then the rule has been deprecated. + * @property {RuleMetaDocs} docs The document information of the rule. + * @property {"code"|"whitespace"} [fixable] The autofix type. + * @property {Record} [messages] The messages the rule reports. + * @property {string[]} [replacedBy] The IDs of the alternative rules. + * @property {Array|Object} schema The option schema of the rule. + * @property {"problem"|"suggestion"|"layout"} type The rule type. + */ + +/** + * @typedef {Object} Rule + * @property {Function} create The factory of the rule. + * @property {RuleMeta} meta The meta data of the rule. + */ + +/** + * @typedef {Object} Plugin + * @property {Record} [configs] The definition of plugin configs. + * @property {Record} [environments] The definition of plugin environments. + * @property {Record} [processors] The definition of plugin processors. + * @property {Record} [rules] The definition of plugin rules. + */ + +/** + * Information of deprecated rules. + * @typedef {Object} DeprecatedRuleInfo + * @property {string} ruleId The rule ID. + * @property {string[]} replacedBy The rule IDs that replace this deprecated rule. + */ diff --git a/slider/node_modules/@eslint/eslintrc/lib/types/index.d.ts b/slider/node_modules/@eslint/eslintrc/lib/types/index.d.ts new file mode 100644 index 0000000..f723ae6 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/lib/types/index.d.ts @@ -0,0 +1,76 @@ +/** + * @fileoverview This file contains the core types for ESLint. It was initially extracted + * from the `@types/eslint__eslintrc` package. + */ + +/* + * MIT License + * Copyright (c) Microsoft Corporation. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE + */ + +import type { Linter } from "eslint"; + +/** + * A compatibility class for working with configs. + */ +export class FlatCompat { + constructor({ + baseDirectory, + resolvePluginsRelativeTo, + recommendedConfig, + allConfig, + }?: { + /** + * default: process.cwd() + */ + baseDirectory?: string; + resolvePluginsRelativeTo?: string; + recommendedConfig?: Linter.LegacyConfig; + allConfig?: Linter.LegacyConfig; + }); + + /** + * Translates an ESLintRC-style config into a flag-config-style config. + * @param eslintrcConfig The ESLintRC-style config object. + * @returns A flag-config-style config object. + */ + config(eslintrcConfig: Linter.LegacyConfig): Linter.Config[]; + + /** + * Translates the `env` section of an ESLintRC-style config. + * @param envConfig The `env` section of an ESLintRC config. + * @returns An array of flag-config objects representing the environments. + */ + env(envConfig: { [name: string]: boolean }): Linter.Config[]; + + /** + * Translates the `extends` section of an ESLintRC-style config. + * @param configsToExtend The names of the configs to load. + * @returns An array of flag-config objects representing the config. + */ + extends(...configsToExtend: string[]): Linter.Config[]; + + /** + * Translates the `plugins` section of an ESLintRC-style config. + * @param plugins The names of the plugins to load. + * @returns An array of flag-config objects representing the plugins. + */ + plugins(...plugins: string[]): Linter.Config[]; +} diff --git a/slider/node_modules/@eslint/eslintrc/package.json b/slider/node_modules/@eslint/eslintrc/package.json new file mode 100644 index 0000000..dea53a0 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/package.json @@ -0,0 +1,84 @@ +{ + "name": "@eslint/eslintrc", + "version": "3.3.1", + "description": "The legacy ESLintRC config file format for ESLint", + "type": "module", + "main": "./dist/eslintrc.cjs", + "types": "./dist/eslintrc.d.cts", + "exports": { + ".": { + "import": "./lib/index.js", + "require": "./dist/eslintrc.cjs", + "types": "./lib/types/index.d.ts" + }, + "./package.json": "./package.json", + "./universal": { + "import": "./lib/index-universal.js", + "require": "./dist/eslintrc-universal.cjs" + } + }, + "files": [ + "lib", + "conf", + "LICENSE", + "dist", + "universal.js" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "build": "rollup -c && node -e \"fs.copyFileSync('./lib/types/index.d.ts', './dist/eslintrc.d.cts')\"", + "lint": "eslint . --report-unused-disable-directives", + "lint:fix": "npm run lint -- --fix", + "prepare": "npm run build", + "release:generate:latest": "eslint-generate-release", + "release:generate:alpha": "eslint-generate-prerelease alpha", + "release:generate:beta": "eslint-generate-prerelease beta", + "release:generate:rc": "eslint-generate-prerelease rc", + "release:publish": "eslint-publish-release", + "test": "mocha -R progress -c 'tests/lib/*.cjs' && c8 mocha -R progress -c 'tests/lib/**/*.js'", + "test:types": "tsc -p tests/lib/types/tsconfig.json" + }, + "repository": "eslint/eslintrc", + "funding": "https://opencollective.com/eslint", + "keywords": [ + "ESLint", + "ESLintRC", + "Configuration" + ], + "author": "Nicholas C. Zakas", + "license": "MIT", + "bugs": { + "url": "https://github.com/eslint/eslintrc/issues" + }, + "homepage": "https://github.com/eslint/eslintrc#readme", + "devDependencies": { + "c8": "^7.7.3", + "chai": "^4.3.4", + "eslint": "^9.20.1", + "eslint-config-eslint": "^11.0.0", + "eslint-release": "^3.2.0", + "fs-teardown": "^0.1.3", + "mocha": "^9.0.3", + "rollup": "^2.70.1", + "shelljs": "^0.8.5", + "sinon": "^11.1.2", + "temp-dir": "^2.0.0", + "typescript": "^5.7.3" + }, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } +} diff --git a/slider/node_modules/@eslint/eslintrc/universal.js b/slider/node_modules/@eslint/eslintrc/universal.js new file mode 100644 index 0000000..dcd1a47 --- /dev/null +++ b/slider/node_modules/@eslint/eslintrc/universal.js @@ -0,0 +1,10 @@ +/* global module, require -- required for CJS file */ + +// Jest (and probably some other runtimes with custom implementations of +// `require`) doesn't support `exports` in `package.json`, so this file is here +// to help them load this module. Note that it is also `.js` and not `.cjs` for +// the same reason - `cjs` files requires to be loaded with an extension, but +// since Jest doesn't respect `module` outside of ESM mode it still works in +// this case (and the `require` in _this_ file does specify the extension). + +module.exports = require("./dist/eslintrc-universal.cjs"); diff --git a/slider/node_modules/@eslint/js/LICENSE b/slider/node_modules/@eslint/js/LICENSE new file mode 100644 index 0000000..bef3698 --- /dev/null +++ b/slider/node_modules/@eslint/js/LICENSE @@ -0,0 +1,19 @@ +Copyright OpenJS Foundation and other contributors, + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/slider/node_modules/@eslint/js/README.md b/slider/node_modules/@eslint/js/README.md new file mode 100644 index 0000000..7efabab --- /dev/null +++ b/slider/node_modules/@eslint/js/README.md @@ -0,0 +1,69 @@ +[![npm version](https://img.shields.io/npm/v/@eslint/js.svg)](https://www.npmjs.com/package/@eslint/js) + +# ESLint JavaScript Plugin + +[Website](https://eslint.org) | [Configure ESLint](https://eslint.org/docs/latest/use/configure) | [Rules](https://eslint.org/docs/rules/) | [Contributing](https://eslint.org/docs/latest/contribute) | [Twitter](https://twitter.com/geteslint) | [Chatroom](https://eslint.org/chat) + +The beginnings of separating out JavaScript-specific functionality from ESLint. + +Right now, this plugin contains two configurations: + +- `recommended` - enables the rules recommended by the ESLint team (the replacement for `"eslint:recommended"`) +- `all` - enables all ESLint rules (the replacement for `"eslint:all"`) + +## Installation + +```shell +npm install @eslint/js -D +``` + +## Usage + +Use in your `eslint.config.js` file anytime you want to extend one of the configs: + +```js +import { defineConfig } from "eslint/config"; +import js from "@eslint/js"; + +export default defineConfig([ + // apply recommended rules to JS files + { + name: "your-project/recommended-rules", + files: ["**/*.js"], + plugins: { + js, + }, + extends: ["js/recommended"], + }, + + // apply recommended rules to JS files with an override + { + name: "your-project/recommended-rules-with-override", + files: ["**/*.js"], + plugins: { + js, + }, + extends: ["js/recommended"], + rules: { + "no-unused-vars": "warn", + }, + }, + + // apply all rules to JS files + { + name: "your-project/all-rules", + files: ["**/*.js"], + plugins: { + js, + }, + extends: ["js/all"], + rules: { + "no-unused-vars": "warn", + }, + }, +]); +``` + +## License + +MIT diff --git a/slider/node_modules/@eslint/js/package.json b/slider/node_modules/@eslint/js/package.json new file mode 100644 index 0000000..3f72d1e --- /dev/null +++ b/slider/node_modules/@eslint/js/package.json @@ -0,0 +1,36 @@ +{ + "name": "@eslint/js", + "version": "9.36.0", + "description": "ESLint JavaScript language implementation", + "funding": "https://eslint.org/donate", + "main": "./src/index.js", + "types": "./types/index.d.ts", + "scripts": { + "test:types": "tsc -p tests/types/tsconfig.json" + }, + "files": [ + "LICENSE", + "README.md", + "src", + "types" + ], + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/eslint/eslint.git", + "directory": "packages/js" + }, + "homepage": "https://eslint.org", + "bugs": "https://github.com/eslint/eslint/issues/", + "keywords": [ + "javascript", + "eslint-plugin", + "eslint" + ], + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } +} diff --git a/slider/node_modules/@eslint/js/src/configs/eslint-all.js b/slider/node_modules/@eslint/js/src/configs/eslint-all.js new file mode 100644 index 0000000..40db517 --- /dev/null +++ b/slider/node_modules/@eslint/js/src/configs/eslint-all.js @@ -0,0 +1,217 @@ +/* + * WARNING: This file is autogenerated using the tools/update-eslint-all.js + * script. Do not edit manually. + */ +"use strict"; + +/* + * IMPORTANT! + * + * We cannot add a "name" property to this object because it's still used in eslintrc + * which doesn't support the "name" property. If we add a "name" property, it will + * cause an error. + */ + +module.exports = Object.freeze({ + rules: Object.freeze({ + "accessor-pairs": "error", + "array-callback-return": "error", + "arrow-body-style": "error", + "block-scoped-var": "error", + "camelcase": "error", + "capitalized-comments": "error", + "class-methods-use-this": "error", + "complexity": "error", + "consistent-return": "error", + "consistent-this": "error", + "constructor-super": "error", + "curly": "error", + "default-case": "error", + "default-case-last": "error", + "default-param-last": "error", + "dot-notation": "error", + "eqeqeq": "error", + "for-direction": "error", + "func-name-matching": "error", + "func-names": "error", + "func-style": "error", + "getter-return": "error", + "grouped-accessor-pairs": "error", + "guard-for-in": "error", + "id-denylist": "error", + "id-length": "error", + "id-match": "error", + "init-declarations": "error", + "logical-assignment-operators": "error", + "max-classes-per-file": "error", + "max-depth": "error", + "max-lines": "error", + "max-lines-per-function": "error", + "max-nested-callbacks": "error", + "max-params": "error", + "max-statements": "error", + "new-cap": "error", + "no-alert": "error", + "no-array-constructor": "error", + "no-async-promise-executor": "error", + "no-await-in-loop": "error", + "no-bitwise": "error", + "no-caller": "error", + "no-case-declarations": "error", + "no-class-assign": "error", + "no-compare-neg-zero": "error", + "no-cond-assign": "error", + "no-console": "error", + "no-const-assign": "error", + "no-constant-binary-expression": "error", + "no-constant-condition": "error", + "no-constructor-return": "error", + "no-continue": "error", + "no-control-regex": "error", + "no-debugger": "error", + "no-delete-var": "error", + "no-div-regex": "error", + "no-dupe-args": "error", + "no-dupe-class-members": "error", + "no-dupe-else-if": "error", + "no-dupe-keys": "error", + "no-duplicate-case": "error", + "no-duplicate-imports": "error", + "no-else-return": "error", + "no-empty": "error", + "no-empty-character-class": "error", + "no-empty-function": "error", + "no-empty-pattern": "error", + "no-empty-static-block": "error", + "no-eq-null": "error", + "no-eval": "error", + "no-ex-assign": "error", + "no-extend-native": "error", + "no-extra-bind": "error", + "no-extra-boolean-cast": "error", + "no-extra-label": "error", + "no-fallthrough": "error", + "no-func-assign": "error", + "no-global-assign": "error", + "no-implicit-coercion": "error", + "no-implicit-globals": "error", + "no-implied-eval": "error", + "no-import-assign": "error", + "no-inline-comments": "error", + "no-inner-declarations": "error", + "no-invalid-regexp": "error", + "no-invalid-this": "error", + "no-irregular-whitespace": "error", + "no-iterator": "error", + "no-label-var": "error", + "no-labels": "error", + "no-lone-blocks": "error", + "no-lonely-if": "error", + "no-loop-func": "error", + "no-loss-of-precision": "error", + "no-magic-numbers": "error", + "no-misleading-character-class": "error", + "no-multi-assign": "error", + "no-multi-str": "error", + "no-negated-condition": "error", + "no-nested-ternary": "error", + "no-new": "error", + "no-new-func": "error", + "no-new-native-nonconstructor": "error", + "no-new-wrappers": "error", + "no-nonoctal-decimal-escape": "error", + "no-obj-calls": "error", + "no-object-constructor": "error", + "no-octal": "error", + "no-octal-escape": "error", + "no-param-reassign": "error", + "no-plusplus": "error", + "no-promise-executor-return": "error", + "no-proto": "error", + "no-prototype-builtins": "error", + "no-redeclare": "error", + "no-regex-spaces": "error", + "no-restricted-exports": "error", + "no-restricted-globals": "error", + "no-restricted-imports": "error", + "no-restricted-properties": "error", + "no-restricted-syntax": "error", + "no-return-assign": "error", + "no-script-url": "error", + "no-self-assign": "error", + "no-self-compare": "error", + "no-sequences": "error", + "no-setter-return": "error", + "no-shadow": "error", + "no-shadow-restricted-names": "error", + "no-sparse-arrays": "error", + "no-template-curly-in-string": "error", + "no-ternary": "error", + "no-this-before-super": "error", + "no-throw-literal": "error", + "no-unassigned-vars": "error", + "no-undef": "error", + "no-undef-init": "error", + "no-undefined": "error", + "no-underscore-dangle": "error", + "no-unexpected-multiline": "error", + "no-unmodified-loop-condition": "error", + "no-unneeded-ternary": "error", + "no-unreachable": "error", + "no-unreachable-loop": "error", + "no-unsafe-finally": "error", + "no-unsafe-negation": "error", + "no-unsafe-optional-chaining": "error", + "no-unused-expressions": "error", + "no-unused-labels": "error", + "no-unused-private-class-members": "error", + "no-unused-vars": "error", + "no-use-before-define": "error", + "no-useless-assignment": "error", + "no-useless-backreference": "error", + "no-useless-call": "error", + "no-useless-catch": "error", + "no-useless-computed-key": "error", + "no-useless-concat": "error", + "no-useless-constructor": "error", + "no-useless-escape": "error", + "no-useless-rename": "error", + "no-useless-return": "error", + "no-var": "error", + "no-void": "error", + "no-warning-comments": "error", + "no-with": "error", + "object-shorthand": "error", + "one-var": "error", + "operator-assignment": "error", + "prefer-arrow-callback": "error", + "prefer-const": "error", + "prefer-destructuring": "error", + "prefer-exponentiation-operator": "error", + "prefer-named-capture-group": "error", + "prefer-numeric-literals": "error", + "prefer-object-has-own": "error", + "prefer-object-spread": "error", + "prefer-promise-reject-errors": "error", + "prefer-regex-literals": "error", + "prefer-rest-params": "error", + "prefer-spread": "error", + "prefer-template": "error", + "preserve-caught-error": "error", + "radix": "error", + "require-atomic-updates": "error", + "require-await": "error", + "require-unicode-regexp": "error", + "require-yield": "error", + "sort-imports": "error", + "sort-keys": "error", + "sort-vars": "error", + "strict": "error", + "symbol-description": "error", + "unicode-bom": "error", + "use-isnan": "error", + "valid-typeof": "error", + "vars-on-top": "error", + "yoda": "error" + }) +}); diff --git a/slider/node_modules/@eslint/js/src/configs/eslint-recommended.js b/slider/node_modules/@eslint/js/src/configs/eslint-recommended.js new file mode 100644 index 0000000..fb825f8 --- /dev/null +++ b/slider/node_modules/@eslint/js/src/configs/eslint-recommended.js @@ -0,0 +1,83 @@ +/** + * @fileoverview Configuration applied when a user configuration extends from + * eslint:recommended. + * @author Nicholas C. Zakas + */ + +"use strict"; + +/* eslint sort-keys: ["error", "asc"] -- Long, so make more readable */ + +/* + * IMPORTANT! + * + * We cannot add a "name" property to this object because it's still used in eslintrc + * which doesn't support the "name" property. If we add a "name" property, it will + * cause an error. + */ + +module.exports = Object.freeze({ + rules: Object.freeze({ + "constructor-super": "error", + "for-direction": "error", + "getter-return": "error", + "no-async-promise-executor": "error", + "no-case-declarations": "error", + "no-class-assign": "error", + "no-compare-neg-zero": "error", + "no-cond-assign": "error", + "no-const-assign": "error", + "no-constant-binary-expression": "error", + "no-constant-condition": "error", + "no-control-regex": "error", + "no-debugger": "error", + "no-delete-var": "error", + "no-dupe-args": "error", + "no-dupe-class-members": "error", + "no-dupe-else-if": "error", + "no-dupe-keys": "error", + "no-duplicate-case": "error", + "no-empty": "error", + "no-empty-character-class": "error", + "no-empty-pattern": "error", + "no-empty-static-block": "error", + "no-ex-assign": "error", + "no-extra-boolean-cast": "error", + "no-fallthrough": "error", + "no-func-assign": "error", + "no-global-assign": "error", + "no-import-assign": "error", + "no-invalid-regexp": "error", + "no-irregular-whitespace": "error", + "no-loss-of-precision": "error", + "no-misleading-character-class": "error", + "no-new-native-nonconstructor": "error", + "no-nonoctal-decimal-escape": "error", + "no-obj-calls": "error", + "no-octal": "error", + "no-prototype-builtins": "error", + "no-redeclare": "error", + "no-regex-spaces": "error", + "no-self-assign": "error", + "no-setter-return": "error", + "no-shadow-restricted-names": "error", + "no-sparse-arrays": "error", + "no-this-before-super": "error", + "no-undef": "error", + "no-unexpected-multiline": "error", + "no-unreachable": "error", + "no-unsafe-finally": "error", + "no-unsafe-negation": "error", + "no-unsafe-optional-chaining": "error", + "no-unused-labels": "error", + "no-unused-private-class-members": "error", + "no-unused-vars": "error", + "no-useless-backreference": "error", + "no-useless-catch": "error", + "no-useless-escape": "error", + "no-with": "error", + "require-yield": "error", + "use-isnan": "error", + "valid-typeof": "error", + }), +}); diff --git a/slider/node_modules/@eslint/js/src/index.js b/slider/node_modules/@eslint/js/src/index.js new file mode 100644 index 0000000..5fcc304 --- /dev/null +++ b/slider/node_modules/@eslint/js/src/index.js @@ -0,0 +1,23 @@ +/** + * @fileoverview Main package entrypoint. + * @author Nicholas C. Zakas + */ + +"use strict"; + +const { name, version } = require("../package.json"); + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + name, + version, + }, + configs: { + all: require("./configs/eslint-all"), + recommended: require("./configs/eslint-recommended"), + }, +}; diff --git a/slider/node_modules/@eslint/js/types/index.d.ts b/slider/node_modules/@eslint/js/types/index.d.ts new file mode 100644 index 0000000..8b64052 --- /dev/null +++ b/slider/node_modules/@eslint/js/types/index.d.ts @@ -0,0 +1,14 @@ +import type { Linter } from "eslint"; + +declare const js: { + readonly meta: { + readonly name: string; + readonly version: string; + }; + readonly configs: { + readonly recommended: { readonly rules: Readonly }; + readonly all: { readonly rules: Readonly }; + }; +}; + +export = js; diff --git a/slider/node_modules/@eslint/object-schema/LICENSE b/slider/node_modules/@eslint/object-schema/LICENSE new file mode 100644 index 0000000..ed43975 --- /dev/null +++ b/slider/node_modules/@eslint/object-schema/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/slider/node_modules/@eslint/object-schema/README.md b/slider/node_modules/@eslint/object-schema/README.md new file mode 100644 index 0000000..4c66253 --- /dev/null +++ b/slider/node_modules/@eslint/object-schema/README.md @@ -0,0 +1,242 @@ +# ObjectSchema Package + +## Overview + +A JavaScript object merge/validation utility where you can define a different merge and validation strategy for each key. This is helpful when you need to validate complex data structures and then merge them in a way that is more complex than `Object.assign()`. This is used in the [`@eslint/config-array`](https://npmjs.com/package/@eslint/config-array) package but can also be used on its own. + +## Installation + +For Node.js and compatible runtimes: + +```shell +npm install @eslint/object-schema +# or +yarn add @eslint/object-schema +# or +pnpm install @eslint/object-schema +# or +bun install @eslint/object-schema +``` + +For Deno: + +```shell +deno add @eslint/object-schema +``` + +## Usage + +Import the `ObjectSchema` constructor: + +```js +// using ESM +import { ObjectSchema } from "@eslint/object-schema"; + +// using CommonJS +const { ObjectSchema } = require("@eslint/object-schema"); + +const schema = new ObjectSchema({ + // define a definition for the "downloads" key + downloads: { + required: true, + merge(value1, value2) { + return value1 + value2; + }, + validate(value) { + if (typeof value !== "number") { + throw new Error("Expected downloads to be a number."); + } + }, + }, + + // define a strategy for the "versions" key + version: { + required: true, + merge(value1, value2) { + return value1.concat(value2); + }, + validate(value) { + if (!Array.isArray(value)) { + throw new Error("Expected versions to be an array."); + } + }, + }, +}); + +const record1 = { + downloads: 25, + versions: ["v1.0.0", "v1.1.0", "v1.2.0"], +}; + +const record2 = { + downloads: 125, + versions: ["v2.0.0", "v2.1.0", "v3.0.0"], +}; + +// make sure the records are valid +schema.validate(record1); +schema.validate(record2); + +// merge together (schema.merge() accepts any number of objects) +const result = schema.merge(record1, record2); + +// result looks like this: + +const result = { + downloads: 75, + versions: ["v1.0.0", "v1.1.0", "v1.2.0", "v2.0.0", "v2.1.0", "v3.0.0"], +}; +``` + +## Tips and Tricks + +### Named merge strategies + +Instead of specifying a `merge()` method, you can specify one of the following strings to use a default merge strategy: + +- `"assign"` - use `Object.assign()` to merge the two values into one object. +- `"overwrite"` - the second value always replaces the first. +- `"replace"` - the second value replaces the first if the second is not `undefined`. + +For example: + +```js +const schema = new ObjectSchema({ + name: { + merge: "replace", + validate() {}, + }, +}); +``` + +### Named validation strategies + +Instead of specifying a `validate()` method, you can specify one of the following strings to use a default validation strategy: + +- `"array"` - value must be an array. +- `"boolean"` - value must be a boolean. +- `"number"` - value must be a number. +- `"object"` - value must be an object. +- `"object?"` - value must be an object or null. +- `"string"` - value must be a string. +- `"string!"` - value must be a non-empty string. + +For example: + +```js +const schema = new ObjectSchema({ + name: { + merge: "replace", + validate: "string", + }, +}); +``` + +### Subschemas + +If you are defining a key that is, itself, an object, you can simplify the process by using a subschema. Instead of defining `merge()` and `validate()`, assign a `schema` key that contains a schema definition, like this: + +```js +const schema = new ObjectSchema({ + name: { + schema: { + first: { + merge: "replace", + validate: "string", + }, + last: { + merge: "replace", + validate: "string", + }, + }, + }, +}); + +schema.validate({ + name: { + first: "n", + last: "z", + }, +}); +``` + +### Remove Keys During Merge + +If the merge strategy for a key returns `undefined`, then the key will not appear in the final object. For example: + +```js +const schema = new ObjectSchema({ + date: { + merge() { + return undefined; + }, + validate(value) { + Date.parse(value); // throws an error when invalid + }, + }, +}); + +const object1 = { date: "5/5/2005" }; +const object2 = { date: "6/6/2006" }; + +const result = schema.merge(object1, object2); + +console.log("date" in result); // false +``` + +### Requiring Another Key Be Present + +If you'd like the presence of one key to require the presence of another key, you can use the `requires` property to specify an array of other properties that any key requires. For example: + +```js +const schema = new ObjectSchema(); + +const schema = new ObjectSchema({ + date: { + merge() { + return undefined; + }, + validate(value) { + Date.parse(value); // throws an error when invalid + }, + }, + time: { + requires: ["date"], + merge(first, second) { + return second; + }, + validate(value) { + // ... + }, + }, +}); + +// throws error: Key "time" requires keys "date" +schema.validate({ + time: "13:45", +}); +``` + +In this example, even though `date` is an optional key, it is required to be present whenever `time` is present. + +## License + +Apache 2.0 + + + + +## Sponsors + +The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) +to get your logo on our READMEs and [website](https://eslint.org/sponsors). + +

Platinum Sponsors

+

Automattic Airbnb

Gold Sponsors

+

Qlty Software trunk.io

Silver Sponsors

+

SERP Triumph JetBrains Liftoff American Express

Bronze Sponsors

+

Cybozu Anagram Solver Icons8 Discord GitBook Neko Nx Mercedes-Benz Group HeroCoders

+

Technology Sponsors

+Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work. +

Netlify Algolia 1Password

+ diff --git a/slider/node_modules/@eslint/object-schema/dist/cjs/index.cjs b/slider/node_modules/@eslint/object-schema/dist/cjs/index.cjs new file mode 100644 index 0000000..434d28e --- /dev/null +++ b/slider/node_modules/@eslint/object-schema/dist/cjs/index.cjs @@ -0,0 +1,455 @@ +'use strict'; + +/** + * @fileoverview Merge Strategy + */ + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +/** + * Container class for several different merge strategies. + */ +class MergeStrategy { + /** + * Merges two keys by overwriting the first with the second. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} The second value. + */ + static overwrite(value1, value2) { + return value2; + } + + /** + * Merges two keys by replacing the first with the second only if the + * second is defined. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} The second value if it is defined. + */ + static replace(value1, value2) { + if (typeof value2 !== "undefined") { + return value2; + } + + return value1; + } + + /** + * Merges two properties by assigning properties from the second to the first. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} A new object containing properties from both value1 and + * value2. + */ + static assign(value1, value2) { + return Object.assign({}, value1, value2); + } +} + +/** + * @fileoverview Validation Strategy + */ + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +/** + * Container class for several different validation strategies. + */ +class ValidationStrategy { + /** + * Validates that a value is an array. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static array(value) { + if (!Array.isArray(value)) { + throw new TypeError("Expected an array."); + } + } + + /** + * Validates that a value is a boolean. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static boolean(value) { + if (typeof value !== "boolean") { + throw new TypeError("Expected a Boolean."); + } + } + + /** + * Validates that a value is a number. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static number(value) { + if (typeof value !== "number") { + throw new TypeError("Expected a number."); + } + } + + /** + * Validates that a value is a object. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static object(value) { + if (!value || typeof value !== "object") { + throw new TypeError("Expected an object."); + } + } + + /** + * Validates that a value is a object or null. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static "object?"(value) { + if (typeof value !== "object") { + throw new TypeError("Expected an object or null."); + } + } + + /** + * Validates that a value is a string. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static string(value) { + if (typeof value !== "string") { + throw new TypeError("Expected a string."); + } + } + + /** + * Validates that a value is a non-empty string. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static "string!"(value) { + if (typeof value !== "string" || value.length === 0) { + throw new TypeError("Expected a non-empty string."); + } + } +} + +/** + * @fileoverview Object Schema + */ + + +//----------------------------------------------------------------------------- +// Types +//----------------------------------------------------------------------------- + +/** @typedef {import("./types.ts").ObjectDefinition} ObjectDefinition */ +/** @typedef {import("./types.ts").PropertyDefinition} PropertyDefinition */ + +//----------------------------------------------------------------------------- +// Private +//----------------------------------------------------------------------------- + +/** + * Validates a schema strategy. + * @param {string} name The name of the key this strategy is for. + * @param {PropertyDefinition} definition The strategy for the object key. + * @returns {void} + * @throws {Error} When the strategy is missing a name. + * @throws {Error} When the strategy is missing a merge() method. + * @throws {Error} When the strategy is missing a validate() method. + */ +function validateDefinition(name, definition) { + let hasSchema = false; + if (definition.schema) { + if (typeof definition.schema === "object") { + hasSchema = true; + } else { + throw new TypeError("Schema must be an object."); + } + } + + if (typeof definition.merge === "string") { + if (!(definition.merge in MergeStrategy)) { + throw new TypeError( + `Definition for key "${name}" missing valid merge strategy.`, + ); + } + } else if (!hasSchema && typeof definition.merge !== "function") { + throw new TypeError( + `Definition for key "${name}" must have a merge property.`, + ); + } + + if (typeof definition.validate === "string") { + if (!(definition.validate in ValidationStrategy)) { + throw new TypeError( + `Definition for key "${name}" missing valid validation strategy.`, + ); + } + } else if (!hasSchema && typeof definition.validate !== "function") { + throw new TypeError( + `Definition for key "${name}" must have a validate() method.`, + ); + } +} + +//----------------------------------------------------------------------------- +// Errors +//----------------------------------------------------------------------------- + +/** + * Error when an unexpected key is found. + */ +class UnexpectedKeyError extends Error { + /** + * Creates a new instance. + * @param {string} key The key that was unexpected. + */ + constructor(key) { + super(`Unexpected key "${key}" found.`); + } +} + +/** + * Error when a required key is missing. + */ +class MissingKeyError extends Error { + /** + * Creates a new instance. + * @param {string} key The key that was missing. + */ + constructor(key) { + super(`Missing required key "${key}".`); + } +} + +/** + * Error when a key requires other keys that are missing. + */ +class MissingDependentKeysError extends Error { + /** + * Creates a new instance. + * @param {string} key The key that was unexpected. + * @param {Array} requiredKeys The keys that are required. + */ + constructor(key, requiredKeys) { + super(`Key "${key}" requires keys "${requiredKeys.join('", "')}".`); + } +} + +/** + * Wrapper error for errors occuring during a merge or validate operation. + */ +class WrapperError extends Error { + /** + * Creates a new instance. + * @param {string} key The object key causing the error. + * @param {Error} source The source error. + */ + constructor(key, source) { + super(`Key "${key}": ${source.message}`, { cause: source }); + + // copy over custom properties that aren't represented + for (const sourceKey of Object.keys(source)) { + if (!(sourceKey in this)) { + this[sourceKey] = source[sourceKey]; + } + } + } +} + +//----------------------------------------------------------------------------- +// Main +//----------------------------------------------------------------------------- + +/** + * Represents an object validation/merging schema. + */ +class ObjectSchema { + /** + * Track all definitions in the schema by key. + * @type {Map} + */ + #definitions = new Map(); + + /** + * Separately track any keys that are required for faster validtion. + * @type {Map} + */ + #requiredKeys = new Map(); + + /** + * Creates a new instance. + * @param {ObjectDefinition} definitions The schema definitions. + */ + constructor(definitions) { + if (!definitions) { + throw new Error("Schema definitions missing."); + } + + // add in all strategies + for (const key of Object.keys(definitions)) { + validateDefinition(key, definitions[key]); + + // normalize merge and validate methods if subschema is present + if (typeof definitions[key].schema === "object") { + const schema = new ObjectSchema(definitions[key].schema); + definitions[key] = { + ...definitions[key], + merge(first = {}, second = {}) { + return schema.merge(first, second); + }, + validate(value) { + ValidationStrategy.object(value); + schema.validate(value); + }, + }; + } + + // normalize the merge method in case there's a string + if (typeof definitions[key].merge === "string") { + definitions[key] = { + ...definitions[key], + merge: MergeStrategy[ + /** @type {string} */ (definitions[key].merge) + ], + }; + } + + // normalize the validate method in case there's a string + if (typeof definitions[key].validate === "string") { + definitions[key] = { + ...definitions[key], + validate: + ValidationStrategy[ + /** @type {string} */ (definitions[key].validate) + ], + }; + } + + this.#definitions.set(key, definitions[key]); + + if (definitions[key].required) { + this.#requiredKeys.set(key, definitions[key]); + } + } + } + + /** + * Determines if a strategy has been registered for the given object key. + * @param {string} key The object key to find a strategy for. + * @returns {boolean} True if the key has a strategy registered, false if not. + */ + hasKey(key) { + return this.#definitions.has(key); + } + + /** + * Merges objects together to create a new object comprised of the keys + * of the all objects. Keys are merged based on the each key's merge + * strategy. + * @param {...Object} objects The objects to merge. + * @returns {Object} A new object with a mix of all objects' keys. + * @throws {Error} If any object is invalid. + */ + merge(...objects) { + // double check arguments + if (objects.length < 2) { + throw new TypeError("merge() requires at least two arguments."); + } + + if ( + objects.some( + object => object === null || typeof object !== "object", + ) + ) { + throw new TypeError("All arguments must be objects."); + } + + return objects.reduce((result, object) => { + this.validate(object); + + for (const [key, strategy] of this.#definitions) { + try { + if (key in result || key in object) { + const merge = /** @type {Function} */ (strategy.merge); + const value = merge.call( + this, + result[key], + object[key], + ); + if (value !== undefined) { + result[key] = value; + } + } + } catch (ex) { + throw new WrapperError(key, ex); + } + } + return result; + }, {}); + } + + /** + * Validates an object's keys based on the validate strategy for each key. + * @param {Object} object The object to validate. + * @returns {void} + * @throws {Error} When the object is invalid. + */ + validate(object) { + // check existing keys first + for (const key of Object.keys(object)) { + // check to see if the key is defined + if (!this.hasKey(key)) { + throw new UnexpectedKeyError(key); + } + + // validate existing keys + const definition = this.#definitions.get(key); + + // first check to see if any other keys are required + if (Array.isArray(definition.requires)) { + if ( + !definition.requires.every(otherKey => otherKey in object) + ) { + throw new MissingDependentKeysError( + key, + definition.requires, + ); + } + } + + // now apply remaining validation strategy + try { + const validate = /** @type {Function} */ (definition.validate); + validate.call(definition, object[key]); + } catch (ex) { + throw new WrapperError(key, ex); + } + } + + // ensure required keys aren't missing + for (const [key] of this.#requiredKeys) { + if (!(key in object)) { + throw new MissingKeyError(key); + } + } + } +} + +exports.MergeStrategy = MergeStrategy; +exports.ObjectSchema = ObjectSchema; +exports.ValidationStrategy = ValidationStrategy; diff --git a/slider/node_modules/@eslint/object-schema/dist/cjs/index.d.cts b/slider/node_modules/@eslint/object-schema/dist/cjs/index.d.cts new file mode 100644 index 0000000..95d8529 --- /dev/null +++ b/slider/node_modules/@eslint/object-schema/dist/cjs/index.d.cts @@ -0,0 +1,123 @@ +export type ObjectDefinition = import("./types.cts").ObjectDefinition; +export type PropertyDefinition = import("./types.cts").PropertyDefinition; +/** + * @fileoverview Merge Strategy + */ +/** + * Container class for several different merge strategies. + */ +export class MergeStrategy { + /** + * Merges two keys by overwriting the first with the second. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} The second value. + */ + static overwrite(value1: any, value2: any): any; + /** + * Merges two keys by replacing the first with the second only if the + * second is defined. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} The second value if it is defined. + */ + static replace(value1: any, value2: any): any; + /** + * Merges two properties by assigning properties from the second to the first. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} A new object containing properties from both value1 and + * value2. + */ + static assign(value1: any, value2: any): any; +} +/** + * Represents an object validation/merging schema. + */ +export class ObjectSchema { + /** + * Creates a new instance. + * @param {ObjectDefinition} definitions The schema definitions. + */ + constructor(definitions: ObjectDefinition); + /** + * Determines if a strategy has been registered for the given object key. + * @param {string} key The object key to find a strategy for. + * @returns {boolean} True if the key has a strategy registered, false if not. + */ + hasKey(key: string): boolean; + /** + * Merges objects together to create a new object comprised of the keys + * of the all objects. Keys are merged based on the each key's merge + * strategy. + * @param {...Object} objects The objects to merge. + * @returns {Object} A new object with a mix of all objects' keys. + * @throws {Error} If any object is invalid. + */ + merge(...objects: any[]): any; + /** + * Validates an object's keys based on the validate strategy for each key. + * @param {Object} object The object to validate. + * @returns {void} + * @throws {Error} When the object is invalid. + */ + validate(object: any): void; + #private; +} +/** + * @fileoverview Validation Strategy + */ +/** + * Container class for several different validation strategies. + */ +export class ValidationStrategy { + /** + * Validates that a value is an array. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static array(value: any): void; + /** + * Validates that a value is a boolean. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static boolean(value: any): void; + /** + * Validates that a value is a number. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static number(value: any): void; + /** + * Validates that a value is a object. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static object(value: any): void; + /** + * Validates that a value is a object or null. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static "object?"(value: any): void; + /** + * Validates that a value is a string. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static string(value: any): void; + /** + * Validates that a value is a non-empty string. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static "string!"(value: any): void; +} diff --git a/slider/node_modules/@eslint/object-schema/dist/cjs/types.ts b/slider/node_modules/@eslint/object-schema/dist/cjs/types.ts new file mode 100644 index 0000000..7458dd2 --- /dev/null +++ b/slider/node_modules/@eslint/object-schema/dist/cjs/types.ts @@ -0,0 +1,57 @@ +/** + * @fileoverview Types for object-schema package. + */ + +/** + * Built-in validation strategies. + */ +export type BuiltInValidationStrategy = + | "array" + | "boolean" + | "number" + | "object" + | "object?" + | "string" + | "string!"; + +/** + * Built-in merge strategies. + */ +export type BuiltInMergeStrategy = "assign" | "overwrite" | "replace"; + +/** + * Property definition. + */ +export interface PropertyDefinition { + /** + * Indicates if the property is required. + */ + required: boolean; + + /** + * The other properties that must be present when this property is used. + */ + requires?: string[]; + + /** + * The strategy to merge the property. + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213 + merge: BuiltInMergeStrategy | ((target: any, source: any) => any); + + /** + * The strategy to validate the property. + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213 + validate: BuiltInValidationStrategy | ((value: any) => void); + + /** + * The schema for the object value of this property. + */ + schema?: ObjectDefinition; +} + +/** + * Object definition. + */ +export type ObjectDefinition = Record; diff --git a/slider/node_modules/@eslint/object-schema/dist/esm/index.d.ts b/slider/node_modules/@eslint/object-schema/dist/esm/index.d.ts new file mode 100644 index 0000000..2c568c8 --- /dev/null +++ b/slider/node_modules/@eslint/object-schema/dist/esm/index.d.ts @@ -0,0 +1,123 @@ +export type ObjectDefinition = import("./types.ts").ObjectDefinition; +export type PropertyDefinition = import("./types.ts").PropertyDefinition; +/** + * @fileoverview Merge Strategy + */ +/** + * Container class for several different merge strategies. + */ +export class MergeStrategy { + /** + * Merges two keys by overwriting the first with the second. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} The second value. + */ + static overwrite(value1: any, value2: any): any; + /** + * Merges two keys by replacing the first with the second only if the + * second is defined. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} The second value if it is defined. + */ + static replace(value1: any, value2: any): any; + /** + * Merges two properties by assigning properties from the second to the first. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} A new object containing properties from both value1 and + * value2. + */ + static assign(value1: any, value2: any): any; +} +/** + * Represents an object validation/merging schema. + */ +export class ObjectSchema { + /** + * Creates a new instance. + * @param {ObjectDefinition} definitions The schema definitions. + */ + constructor(definitions: ObjectDefinition); + /** + * Determines if a strategy has been registered for the given object key. + * @param {string} key The object key to find a strategy for. + * @returns {boolean} True if the key has a strategy registered, false if not. + */ + hasKey(key: string): boolean; + /** + * Merges objects together to create a new object comprised of the keys + * of the all objects. Keys are merged based on the each key's merge + * strategy. + * @param {...Object} objects The objects to merge. + * @returns {Object} A new object with a mix of all objects' keys. + * @throws {Error} If any object is invalid. + */ + merge(...objects: any[]): any; + /** + * Validates an object's keys based on the validate strategy for each key. + * @param {Object} object The object to validate. + * @returns {void} + * @throws {Error} When the object is invalid. + */ + validate(object: any): void; + #private; +} +/** + * @fileoverview Validation Strategy + */ +/** + * Container class for several different validation strategies. + */ +export class ValidationStrategy { + /** + * Validates that a value is an array. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static array(value: any): void; + /** + * Validates that a value is a boolean. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static boolean(value: any): void; + /** + * Validates that a value is a number. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static number(value: any): void; + /** + * Validates that a value is a object. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static object(value: any): void; + /** + * Validates that a value is a object or null. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static "object?"(value: any): void; + /** + * Validates that a value is a string. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static string(value: any): void; + /** + * Validates that a value is a non-empty string. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static "string!"(value: any): void; +} diff --git a/slider/node_modules/@eslint/object-schema/dist/esm/index.js b/slider/node_modules/@eslint/object-schema/dist/esm/index.js new file mode 100644 index 0000000..a403c6c --- /dev/null +++ b/slider/node_modules/@eslint/object-schema/dist/esm/index.js @@ -0,0 +1,452 @@ +// @ts-self-types="./index.d.ts" +/** + * @fileoverview Merge Strategy + */ + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +/** + * Container class for several different merge strategies. + */ +class MergeStrategy { + /** + * Merges two keys by overwriting the first with the second. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} The second value. + */ + static overwrite(value1, value2) { + return value2; + } + + /** + * Merges two keys by replacing the first with the second only if the + * second is defined. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} The second value if it is defined. + */ + static replace(value1, value2) { + if (typeof value2 !== "undefined") { + return value2; + } + + return value1; + } + + /** + * Merges two properties by assigning properties from the second to the first. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} A new object containing properties from both value1 and + * value2. + */ + static assign(value1, value2) { + return Object.assign({}, value1, value2); + } +} + +/** + * @fileoverview Validation Strategy + */ + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +/** + * Container class for several different validation strategies. + */ +class ValidationStrategy { + /** + * Validates that a value is an array. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static array(value) { + if (!Array.isArray(value)) { + throw new TypeError("Expected an array."); + } + } + + /** + * Validates that a value is a boolean. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static boolean(value) { + if (typeof value !== "boolean") { + throw new TypeError("Expected a Boolean."); + } + } + + /** + * Validates that a value is a number. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static number(value) { + if (typeof value !== "number") { + throw new TypeError("Expected a number."); + } + } + + /** + * Validates that a value is a object. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static object(value) { + if (!value || typeof value !== "object") { + throw new TypeError("Expected an object."); + } + } + + /** + * Validates that a value is a object or null. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static "object?"(value) { + if (typeof value !== "object") { + throw new TypeError("Expected an object or null."); + } + } + + /** + * Validates that a value is a string. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static string(value) { + if (typeof value !== "string") { + throw new TypeError("Expected a string."); + } + } + + /** + * Validates that a value is a non-empty string. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static "string!"(value) { + if (typeof value !== "string" || value.length === 0) { + throw new TypeError("Expected a non-empty string."); + } + } +} + +/** + * @fileoverview Object Schema + */ + + +//----------------------------------------------------------------------------- +// Types +//----------------------------------------------------------------------------- + +/** @typedef {import("./types.ts").ObjectDefinition} ObjectDefinition */ +/** @typedef {import("./types.ts").PropertyDefinition} PropertyDefinition */ + +//----------------------------------------------------------------------------- +// Private +//----------------------------------------------------------------------------- + +/** + * Validates a schema strategy. + * @param {string} name The name of the key this strategy is for. + * @param {PropertyDefinition} definition The strategy for the object key. + * @returns {void} + * @throws {Error} When the strategy is missing a name. + * @throws {Error} When the strategy is missing a merge() method. + * @throws {Error} When the strategy is missing a validate() method. + */ +function validateDefinition(name, definition) { + let hasSchema = false; + if (definition.schema) { + if (typeof definition.schema === "object") { + hasSchema = true; + } else { + throw new TypeError("Schema must be an object."); + } + } + + if (typeof definition.merge === "string") { + if (!(definition.merge in MergeStrategy)) { + throw new TypeError( + `Definition for key "${name}" missing valid merge strategy.`, + ); + } + } else if (!hasSchema && typeof definition.merge !== "function") { + throw new TypeError( + `Definition for key "${name}" must have a merge property.`, + ); + } + + if (typeof definition.validate === "string") { + if (!(definition.validate in ValidationStrategy)) { + throw new TypeError( + `Definition for key "${name}" missing valid validation strategy.`, + ); + } + } else if (!hasSchema && typeof definition.validate !== "function") { + throw new TypeError( + `Definition for key "${name}" must have a validate() method.`, + ); + } +} + +//----------------------------------------------------------------------------- +// Errors +//----------------------------------------------------------------------------- + +/** + * Error when an unexpected key is found. + */ +class UnexpectedKeyError extends Error { + /** + * Creates a new instance. + * @param {string} key The key that was unexpected. + */ + constructor(key) { + super(`Unexpected key "${key}" found.`); + } +} + +/** + * Error when a required key is missing. + */ +class MissingKeyError extends Error { + /** + * Creates a new instance. + * @param {string} key The key that was missing. + */ + constructor(key) { + super(`Missing required key "${key}".`); + } +} + +/** + * Error when a key requires other keys that are missing. + */ +class MissingDependentKeysError extends Error { + /** + * Creates a new instance. + * @param {string} key The key that was unexpected. + * @param {Array} requiredKeys The keys that are required. + */ + constructor(key, requiredKeys) { + super(`Key "${key}" requires keys "${requiredKeys.join('", "')}".`); + } +} + +/** + * Wrapper error for errors occuring during a merge or validate operation. + */ +class WrapperError extends Error { + /** + * Creates a new instance. + * @param {string} key The object key causing the error. + * @param {Error} source The source error. + */ + constructor(key, source) { + super(`Key "${key}": ${source.message}`, { cause: source }); + + // copy over custom properties that aren't represented + for (const sourceKey of Object.keys(source)) { + if (!(sourceKey in this)) { + this[sourceKey] = source[sourceKey]; + } + } + } +} + +//----------------------------------------------------------------------------- +// Main +//----------------------------------------------------------------------------- + +/** + * Represents an object validation/merging schema. + */ +class ObjectSchema { + /** + * Track all definitions in the schema by key. + * @type {Map} + */ + #definitions = new Map(); + + /** + * Separately track any keys that are required for faster validtion. + * @type {Map} + */ + #requiredKeys = new Map(); + + /** + * Creates a new instance. + * @param {ObjectDefinition} definitions The schema definitions. + */ + constructor(definitions) { + if (!definitions) { + throw new Error("Schema definitions missing."); + } + + // add in all strategies + for (const key of Object.keys(definitions)) { + validateDefinition(key, definitions[key]); + + // normalize merge and validate methods if subschema is present + if (typeof definitions[key].schema === "object") { + const schema = new ObjectSchema(definitions[key].schema); + definitions[key] = { + ...definitions[key], + merge(first = {}, second = {}) { + return schema.merge(first, second); + }, + validate(value) { + ValidationStrategy.object(value); + schema.validate(value); + }, + }; + } + + // normalize the merge method in case there's a string + if (typeof definitions[key].merge === "string") { + definitions[key] = { + ...definitions[key], + merge: MergeStrategy[ + /** @type {string} */ (definitions[key].merge) + ], + }; + } + + // normalize the validate method in case there's a string + if (typeof definitions[key].validate === "string") { + definitions[key] = { + ...definitions[key], + validate: + ValidationStrategy[ + /** @type {string} */ (definitions[key].validate) + ], + }; + } + + this.#definitions.set(key, definitions[key]); + + if (definitions[key].required) { + this.#requiredKeys.set(key, definitions[key]); + } + } + } + + /** + * Determines if a strategy has been registered for the given object key. + * @param {string} key The object key to find a strategy for. + * @returns {boolean} True if the key has a strategy registered, false if not. + */ + hasKey(key) { + return this.#definitions.has(key); + } + + /** + * Merges objects together to create a new object comprised of the keys + * of the all objects. Keys are merged based on the each key's merge + * strategy. + * @param {...Object} objects The objects to merge. + * @returns {Object} A new object with a mix of all objects' keys. + * @throws {Error} If any object is invalid. + */ + merge(...objects) { + // double check arguments + if (objects.length < 2) { + throw new TypeError("merge() requires at least two arguments."); + } + + if ( + objects.some( + object => object === null || typeof object !== "object", + ) + ) { + throw new TypeError("All arguments must be objects."); + } + + return objects.reduce((result, object) => { + this.validate(object); + + for (const [key, strategy] of this.#definitions) { + try { + if (key in result || key in object) { + const merge = /** @type {Function} */ (strategy.merge); + const value = merge.call( + this, + result[key], + object[key], + ); + if (value !== undefined) { + result[key] = value; + } + } + } catch (ex) { + throw new WrapperError(key, ex); + } + } + return result; + }, {}); + } + + /** + * Validates an object's keys based on the validate strategy for each key. + * @param {Object} object The object to validate. + * @returns {void} + * @throws {Error} When the object is invalid. + */ + validate(object) { + // check existing keys first + for (const key of Object.keys(object)) { + // check to see if the key is defined + if (!this.hasKey(key)) { + throw new UnexpectedKeyError(key); + } + + // validate existing keys + const definition = this.#definitions.get(key); + + // first check to see if any other keys are required + if (Array.isArray(definition.requires)) { + if ( + !definition.requires.every(otherKey => otherKey in object) + ) { + throw new MissingDependentKeysError( + key, + definition.requires, + ); + } + } + + // now apply remaining validation strategy + try { + const validate = /** @type {Function} */ (definition.validate); + validate.call(definition, object[key]); + } catch (ex) { + throw new WrapperError(key, ex); + } + } + + // ensure required keys aren't missing + for (const [key] of this.#requiredKeys) { + if (!(key in object)) { + throw new MissingKeyError(key); + } + } + } +} + +export { MergeStrategy, ObjectSchema, ValidationStrategy }; diff --git a/slider/node_modules/@eslint/object-schema/dist/esm/types.d.ts b/slider/node_modules/@eslint/object-schema/dist/esm/types.d.ts new file mode 100644 index 0000000..7640328 --- /dev/null +++ b/slider/node_modules/@eslint/object-schema/dist/esm/types.d.ts @@ -0,0 +1,40 @@ +/** + * @fileoverview Types for object-schema package. + */ +/** + * Built-in validation strategies. + */ +export type BuiltInValidationStrategy = "array" | "boolean" | "number" | "object" | "object?" | "string" | "string!"; +/** + * Built-in merge strategies. + */ +export type BuiltInMergeStrategy = "assign" | "overwrite" | "replace"; +/** + * Property definition. + */ +export interface PropertyDefinition { + /** + * Indicates if the property is required. + */ + required: boolean; + /** + * The other properties that must be present when this property is used. + */ + requires?: string[]; + /** + * The strategy to merge the property. + */ + merge: BuiltInMergeStrategy | ((target: any, source: any) => any); + /** + * The strategy to validate the property. + */ + validate: BuiltInValidationStrategy | ((value: any) => void); + /** + * The schema for the object value of this property. + */ + schema?: ObjectDefinition; +} +/** + * Object definition. + */ +export type ObjectDefinition = Record; diff --git a/slider/node_modules/@eslint/object-schema/dist/esm/types.ts b/slider/node_modules/@eslint/object-schema/dist/esm/types.ts new file mode 100644 index 0000000..7458dd2 --- /dev/null +++ b/slider/node_modules/@eslint/object-schema/dist/esm/types.ts @@ -0,0 +1,57 @@ +/** + * @fileoverview Types for object-schema package. + */ + +/** + * Built-in validation strategies. + */ +export type BuiltInValidationStrategy = + | "array" + | "boolean" + | "number" + | "object" + | "object?" + | "string" + | "string!"; + +/** + * Built-in merge strategies. + */ +export type BuiltInMergeStrategy = "assign" | "overwrite" | "replace"; + +/** + * Property definition. + */ +export interface PropertyDefinition { + /** + * Indicates if the property is required. + */ + required: boolean; + + /** + * The other properties that must be present when this property is used. + */ + requires?: string[]; + + /** + * The strategy to merge the property. + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213 + merge: BuiltInMergeStrategy | ((target: any, source: any) => any); + + /** + * The strategy to validate the property. + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213 + validate: BuiltInValidationStrategy | ((value: any) => void); + + /** + * The schema for the object value of this property. + */ + schema?: ObjectDefinition; +} + +/** + * Object definition. + */ +export type ObjectDefinition = Record; diff --git a/slider/node_modules/@eslint/object-schema/package.json b/slider/node_modules/@eslint/object-schema/package.json new file mode 100644 index 0000000..78fae88 --- /dev/null +++ b/slider/node_modules/@eslint/object-schema/package.json @@ -0,0 +1,60 @@ +{ + "name": "@eslint/object-schema", + "version": "2.1.6", + "description": "An object schema merger/validator", + "type": "module", + "main": "dist/esm/index.js", + "types": "dist/esm/index.d.ts", + "exports": { + "require": { + "types": "./dist/cjs/index.d.cts", + "default": "./dist/cjs/index.cjs" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + } + }, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "directories": { + "test": "tests" + }, + "scripts": { + "build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts", + "build": "rollup -c && tsc -p tsconfig.esm.json && npm run build:cts", + "test:jsr": "npx jsr@latest publish --dry-run", + "test": "mocha tests/", + "test:coverage": "c8 npm test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/rewrite.git" + }, + "keywords": [ + "object", + "validation", + "schema", + "merge" + ], + "author": "Nicholas C. Zakas", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/eslint/rewrite/issues" + }, + "homepage": "https://github.com/eslint/rewrite#readme", + "devDependencies": { + "c8": "^9.1.0", + "mocha": "^10.4.0", + "rollup": "^4.16.2", + "rollup-plugin-copy": "^3.5.0", + "typescript": "^5.4.5" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } +} diff --git a/slider/node_modules/@eslint/plugin-kit/LICENSE b/slider/node_modules/@eslint/plugin-kit/LICENSE new file mode 100644 index 0000000..ed43975 --- /dev/null +++ b/slider/node_modules/@eslint/plugin-kit/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/slider/node_modules/@eslint/plugin-kit/README.md b/slider/node_modules/@eslint/plugin-kit/README.md new file mode 100644 index 0000000..147fd1c --- /dev/null +++ b/slider/node_modules/@eslint/plugin-kit/README.md @@ -0,0 +1,271 @@ +# ESLint Plugin Kit + +## Description + +A collection of utilities to help build ESLint plugins. + +## Installation + +For Node.js and compatible runtimes: + +```shell +npm install @eslint/plugin-kit +# or +yarn add @eslint/plugin-kit +# or +pnpm install @eslint/plugin-kit +# or +bun add @eslint/plugin-kit +``` + +For Deno: + +```shell +deno add @eslint/plugin-kit +``` + +## Usage + +This package exports the following utilities: + +- [`ConfigCommentParser`](#configcommentparser) - used to parse ESLint configuration comments (i.e., `/* eslint-disable rule */`) +- [`VisitNodeStep` and `CallMethodStep`](#visitnodestep-and-callmethodstep) - used to help implement `SourceCode#traverse()` +- [`Directive`](#directive) - used to help implement `SourceCode#getDisableDirectives()` +- [`TextSourceCodeBase`](#textsourcecodebase) - base class to help implement the `SourceCode` interface + +### `ConfigCommentParser` + +To use the `ConfigCommentParser` class, import it from the package and create a new instance, such as: + +```js +import { ConfigCommentParser } from "@eslint/plugin-kit"; + +// create a new instance +const commentParser = new ConfigCommentParser(); + +// pass in a comment string without the comment delimiters +const directive = commentParser.parseDirective( + "eslint-disable prefer-const, semi -- I don't want to use these.", +); + +// will be undefined when a directive can't be parsed +if (directive) { + console.log(directive.label); // "eslint-disable" + console.log(directive.value); // "prefer-const, semi" + console.log(directive.justification); // "I don't want to use these." +} +``` + +There are different styles of directive values that you'll need to parse separately to get the correct format: + +```js +import { ConfigCommentParser } from "@eslint/plugin-kit"; + +// create a new instance +const commentParser = new ConfigCommentParser(); + +// list format +const list = commentParser.parseListConfig("prefer-const, semi"); +console.log(Object.entries(list)); // [["prefer-const", true], ["semi", true]] + +// string format +const strings = commentParser.parseStringConfig("foo:off, bar"); +console.log(Object.entries(strings)); // [["foo", "off"], ["bar", null]] + +// JSON-like config format +const jsonLike = commentParser.parseJSONLikeConfig( + "semi:[error, never], prefer-const: warn", +); +console.log(Object.entries(jsonLike.config)); // [["semi", ["error", "never"]], ["prefer-const", "warn"]] +``` + +### `VisitNodeStep` and `CallMethodStep` + +The `VisitNodeStep` and `CallMethodStep` classes represent steps in the traversal of source code. They implement the correct interfaces to return from the `SourceCode#traverse()` method. + +The `VisitNodeStep` class is the more common of the two, where you are describing a visit to a particular node during the traversal. The constructor accepts three arguments: + +- `target` - the node being visited. This is used to determine the method to call inside of a rule. For instance, if the node's type is `Literal` then ESLint will call a method named `Literal()` on the rule (if present). +- `phase` - either 1 for enter or 2 for exit. +- `args` - an array of arguments to pass into the visitor method of a rule. + +For example: + +```js +import { VisitNodeStep } from "@eslint/plugin-kit"; + +class MySourceCode { + traverse() { + const steps = []; + + for (const { node, parent, phase } of iterator(this.ast)) { + steps.push( + new VisitNodeStep({ + target: node, + phase: phase === "enter" ? 1 : 2, + args: [node, parent], + }), + ); + } + + return steps; + } +} +``` + +The `CallMethodStep` class is less common and is used to tell ESLint to call a specific method on the rule. The constructor accepts two arguments: + +- `target` - the name of the method to call, frequently beginning with `"on"` such as `"onCodePathStart"`. +- `args` - an array of arguments to pass to the method. + +For example: + +```js +import { VisitNodeStep, CallMethodStep } from "@eslint/plugin-kit"; + +class MySourceCode { + traverse() { + const steps = []; + + for (const { node, parent, phase } of iterator(this.ast)) { + steps.push( + new VisitNodeStep({ + target: node, + phase: phase === "enter" ? 1 : 2, + args: [node, parent], + }), + ); + + // call a method indicating how many times we've been through the loop + steps.push( + new CallMethodStep({ + target: "onIteration", + args: [steps.length] + }); + ) + } + + return steps; + } +} +``` + +### `Directive` + +The `Directive` class represents a disable directive in the source code and implements the `Directive` interface from `@eslint/core`. You can tell ESLint about disable directives using the `SourceCode#getDisableDirectives()` method, where part of the return value is an array of `Directive` objects. Here's an example: + +```js +import { Directive, ConfigCommentParser } from "@eslint/plugin-kit"; + +class MySourceCode { + getDisableDirectives() { + const directives = []; + const problems = []; + const commentParser = new ConfigCommentParser(); + + // read in the inline config nodes to check each one + this.getInlineConfigNodes().forEach(comment => { + // Step 1: Parse the directive + const { label, value, justification } = + commentParser.parseDirective(comment.value); + + // Step 2: Extract the directive value and create the `Directive` object + switch (label) { + case "eslint-disable": + case "eslint-enable": + case "eslint-disable-next-line": + case "eslint-disable-line": { + const directiveType = label.slice("eslint-".length); + + directives.push( + new Directive({ + type: directiveType, + node: comment, + value, + justification, + }), + ); + } + + // ignore any comments that don't begin with known labels + } + }); + + return { + directives, + problems, + }; + } +} +``` + +### `TextSourceCodeBase` + +The `TextSourceCodeBase` class is intended to be a base class that has several of the common members found in `SourceCode` objects already implemented. Those members are: + +- `lines` - an array of text lines that is created automatically when the constructor is called. +- `getLoc(node)` - gets the location of a node. Works for nodes that have the ESLint-style `loc` property and nodes that have the Unist-style [`position` property](https://github.com/syntax-tree/unist?tab=readme-ov-file#position). If you're using an AST with a different location format, you'll still need to implement this method yourself. +- `getRange(node)` - gets the range of a node within the source text. Works for nodes that have the ESLint-style `range` property and nodes that have the Unist-style [`position` property](https://github.com/syntax-tree/unist?tab=readme-ov-file#position). If you're using an AST with a different range format, you'll still need to implement this method yourself. +- `getText(nodeOrToken, charsBefore, charsAfter)` - gets the source text for the given node or token that has range information attached. Optionally, can return additional characters before and after the given node or token. As long as `getRange()` is properly implemented, this method will just work. +- `getAncestors(node)` - returns the ancestry of the node. In order for this to work, you must implement the `getParent()` method yourself. + +Here's an example: + +```js +import { TextSourceCodeBase } from "@eslint/plugin-kit"; + +export class MySourceCode extends TextSourceCodeBase { + #parents = new Map(); + + constructor({ ast, text }) { + super({ ast, text }); + } + + getParent(node) { + return this.#parents.get(node); + } + + traverse() { + const steps = []; + + for (const { node, parent, phase } of iterator(this.ast)) { + //save the parent information + this.#parent.set(node, parent); + + steps.push( + new VisitNodeStep({ + target: node, + phase: phase === "enter" ? 1 : 2, + args: [node, parent], + }), + ); + } + + return steps; + } +} +``` + +In general, it's safe to collect the parent information during the `traverse()` method as `getParent()` and `getAncestor()` will only be called from rules once the AST has been traversed at least once. + +## License + +Apache 2.0 + + + + +## Sponsors + +The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) +to get your logo on our READMEs and [website](https://eslint.org/sponsors). + +

Platinum Sponsors

+

Automattic Airbnb

Gold Sponsors

+

Qlty Software trunk.io Shopify

Silver Sponsors

+

Vite Liftoff American Express StackBlitz

Bronze Sponsors

+

Cybozu Anagram Solver Icons8 Discord GitBook Nx Mercedes-Benz Group HeroCoders LambdaTest

+

Technology Sponsors

+Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work. +

Netlify Algolia 1Password

+ diff --git a/slider/node_modules/@eslint/plugin-kit/dist/cjs/index.cjs b/slider/node_modules/@eslint/plugin-kit/dist/cjs/index.cjs new file mode 100644 index 0000000..5666d56 --- /dev/null +++ b/slider/node_modules/@eslint/plugin-kit/dist/cjs/index.cjs @@ -0,0 +1,620 @@ +'use strict'; + +var levn = require('levn'); + +/** + * @fileoverview Config Comment Parser + * @author Nicholas C. Zakas + */ + + +//----------------------------------------------------------------------------- +// Type Definitions +//----------------------------------------------------------------------------- + +/** @typedef {import("@eslint/core").RuleConfig} RuleConfig */ +/** @typedef {import("@eslint/core").RulesConfig} RulesConfig */ +/** @typedef {import("./types.ts").StringConfig} StringConfig */ +/** @typedef {import("./types.ts").BooleanConfig} BooleanConfig */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const directivesPattern = /^([a-z]+(?:-[a-z]+)*)(?:\s|$)/u; +const validSeverities = new Set([0, 1, 2, "off", "warn", "error"]); + +/** + * Determines if the severity in the rule configuration is valid. + * @param {RuleConfig} ruleConfig A rule's configuration. + * @returns {boolean} `true` if the severity is valid, otherwise `false`. + */ +function isSeverityValid(ruleConfig) { + const severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + return validSeverities.has(severity); +} + +/** + * Determines if all severities in the rules configuration are valid. + * @param {RulesConfig} rulesConfig The rules configuration to check. + * @returns {boolean} `true` if all severities are valid, otherwise `false`. + */ +function isEverySeverityValid(rulesConfig) { + return Object.values(rulesConfig).every(isSeverityValid); +} + +/** + * Represents a directive comment. + */ +class DirectiveComment { + /** + * The label of the directive, such as "eslint", "eslint-disable", etc. + * @type {string} + */ + label = ""; + + /** + * The value of the directive (the string after the label). + * @type {string} + */ + value = ""; + + /** + * The justification of the directive (the string after the --). + * @type {string} + */ + justification = ""; + + /** + * Creates a new directive comment. + * @param {string} label The label of the directive. + * @param {string} value The value of the directive. + * @param {string} justification The justification of the directive. + */ + constructor(label, value, justification) { + this.label = label; + this.value = value; + this.justification = justification; + } +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Object to parse ESLint configuration comments. + */ +class ConfigCommentParser { + /** + * Parses a list of "name:string_value" or/and "name" options divided by comma or + * whitespace. Used for "global" comments. + * @param {string} string The string to parse. + * @returns {StringConfig} Result map object of names and string values, or null values if no value was provided. + */ + parseStringConfig(string) { + const items = /** @type {StringConfig} */ ({}); + + // Collapse whitespace around `:` and `,` to make parsing easier + const trimmedString = string + .trim() + .replace(/(? { + if (!name) { + return; + } + + // value defaults to null (if not provided), e.g: "foo" => ["foo", null] + const [key, value = null] = name.split(":"); + + items[key] = value; + }); + + return items; + } + + /** + * Parses a JSON-like config. + * @param {string} string The string to parse. + * @returns {({ok: true, config: RulesConfig}|{ok: false, error: {message: string}})} Result map object + */ + parseJSONLikeConfig(string) { + // Parses a JSON-like comment by the same way as parsing CLI option. + try { + const items = + /** @type {RulesConfig} */ (levn.parse("Object", string)) || {}; + + /* + * When the configuration has any invalid severities, it should be completely + * ignored. This is because the configuration is not valid and should not be + * applied. + * + * For example, the following configuration is invalid: + * + * "no-alert: 2 no-console: 2" + * + * This results in a configuration of { "no-alert": "2 no-console: 2" }, which is + * not valid. In this case, the configuration should be ignored. + */ + if (isEverySeverityValid(items)) { + return { + ok: true, + config: items, + }; + } + } catch { + // levn parsing error: ignore to parse the string by a fallback. + } + + /* + * Optionator cannot parse commaless notations. + * But we are supporting that. So this is a fallback for that. + */ + const normalizedString = string + .replace(/(? { + const trimmedName = name + .trim() + .replace( + /^(?['"]?)(?.*)\k$/su, + "$", + ); + + if (trimmedName) { + items[trimmedName] = true; + } + }); + + return items; + } + + /** + * Extract the directive and the justification from a given directive comment and trim them. + * @param {string} value The comment text to extract. + * @returns {{directivePart: string, justificationPart: string}} The extracted directive and justification. + */ + #extractDirectiveComment(value) { + const match = /\s-{2,}\s/u.exec(value); + + if (!match) { + return { directivePart: value.trim(), justificationPart: "" }; + } + + const directive = value.slice(0, match.index).trim(); + const justification = value.slice(match.index + match[0].length).trim(); + + return { directivePart: directive, justificationPart: justification }; + } + + /** + * Parses a directive comment into directive text and value. + * @param {string} string The string with the directive to be parsed. + * @returns {DirectiveComment|undefined} The parsed directive or `undefined` if the directive is invalid. + */ + parseDirective(string) { + const { directivePart, justificationPart } = + this.#extractDirectiveComment(string); + const match = directivesPattern.exec(directivePart); + + if (!match) { + return undefined; + } + + const directiveText = match[1]; + const directiveValue = directivePart.slice( + match.index + directiveText.length, + ); + + return new DirectiveComment( + directiveText, + directiveValue.trim(), + justificationPart, + ); + } +} + +/** + * @fileoverview A collection of helper classes for implementing `SourceCode`. + * @author Nicholas C. Zakas + */ + +/* eslint class-methods-use-this: off -- Required to complete interface. */ + +//----------------------------------------------------------------------------- +// Type Definitions +//----------------------------------------------------------------------------- + +/** @typedef {import("@eslint/core").VisitTraversalStep} VisitTraversalStep */ +/** @typedef {import("@eslint/core").CallTraversalStep} CallTraversalStep */ +/** @typedef {import("@eslint/core").TraversalStep} TraversalStep */ +/** @typedef {import("@eslint/core").SourceLocation} SourceLocation */ +/** @typedef {import("@eslint/core").SourceLocationWithOffset} SourceLocationWithOffset */ +/** @typedef {import("@eslint/core").SourceRange} SourceRange */ +/** @typedef {import("@eslint/core").Directive} IDirective */ +/** @typedef {import("@eslint/core").DirectiveType} DirectiveType */ +/** @typedef {import("@eslint/core").SourceCodeBaseTypeOptions} SourceCodeBaseTypeOptions */ +/** + * @typedef {import("@eslint/core").TextSourceCode} TextSourceCode + * @template {SourceCodeBaseTypeOptions} [Options=SourceCodeBaseTypeOptions] + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/** + * Determines if a node has ESTree-style loc information. + * @param {object} node The node to check. + * @returns {node is {loc:SourceLocation}} `true` if the node has ESTree-style loc information, `false` if not. + */ +function hasESTreeStyleLoc(node) { + return "loc" in node; +} + +/** + * Determines if a node has position-style loc information. + * @param {object} node The node to check. + * @returns {node is {position:SourceLocation}} `true` if the node has position-style range information, `false` if not. + */ +function hasPosStyleLoc(node) { + return "position" in node; +} + +/** + * Determines if a node has ESTree-style range information. + * @param {object} node The node to check. + * @returns {node is {range:SourceRange}} `true` if the node has ESTree-style range information, `false` if not. + */ +function hasESTreeStyleRange(node) { + return "range" in node; +} + +/** + * Determines if a node has position-style range information. + * @param {object} node The node to check. + * @returns {node is {position:SourceLocationWithOffset}} `true` if the node has position-style range information, `false` if not. + */ +function hasPosStyleRange(node) { + return "position" in node; +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * A class to represent a step in the traversal process where a node is visited. + * @implements {VisitTraversalStep} + */ +class VisitNodeStep { + /** + * The type of the step. + * @type {"visit"} + * @readonly + */ + type = "visit"; + + /** + * The kind of the step. Represents the same data as the `type` property + * but it's a number for performance. + * @type {1} + * @readonly + */ + kind = 1; + + /** + * The target of the step. + * @type {object} + */ + target; + + /** + * The phase of the step. + * @type {1|2} + */ + phase; + + /** + * The arguments of the step. + * @type {Array} + */ + args; + + /** + * Creates a new instance. + * @param {Object} options The options for the step. + * @param {object} options.target The target of the step. + * @param {1|2} options.phase The phase of the step. + * @param {Array} options.args The arguments of the step. + */ + constructor({ target, phase, args }) { + this.target = target; + this.phase = phase; + this.args = args; + } +} + +/** + * A class to represent a step in the traversal process where a + * method is called. + * @implements {CallTraversalStep} + */ +class CallMethodStep { + /** + * The type of the step. + * @type {"call"} + * @readonly + */ + type = "call"; + + /** + * The kind of the step. Represents the same data as the `type` property + * but it's a number for performance. + * @type {2} + * @readonly + */ + kind = 2; + + /** + * The name of the method to call. + * @type {string} + */ + target; + + /** + * The arguments to pass to the method. + * @type {Array} + */ + args; + + /** + * Creates a new instance. + * @param {Object} options The options for the step. + * @param {string} options.target The target of the step. + * @param {Array} options.args The arguments of the step. + */ + constructor({ target, args }) { + this.target = target; + this.args = args; + } +} + +/** + * A class to represent a directive comment. + * @implements {IDirective} + */ +class Directive { + /** + * The type of directive. + * @type {DirectiveType} + * @readonly + */ + type; + + /** + * The node representing the directive. + * @type {unknown} + * @readonly + */ + node; + + /** + * Everything after the "eslint-disable" portion of the directive, + * but before the "--" that indicates the justification. + * @type {string} + * @readonly + */ + value; + + /** + * The justification for the directive. + * @type {string} + * @readonly + */ + justification; + + /** + * Creates a new instance. + * @param {Object} options The options for the directive. + * @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive. + * @param {unknown} options.node The node representing the directive. + * @param {string} options.value The value of the directive. + * @param {string} options.justification The justification for the directive. + */ + constructor({ type, node, value, justification }) { + this.type = type; + this.node = node; + this.value = value; + this.justification = justification; + } +} + +/** + * Source Code Base Object + * @template {SourceCodeBaseTypeOptions & {SyntaxElementWithLoc: object}} [Options=SourceCodeBaseTypeOptions & {SyntaxElementWithLoc: object}] + * @implements {TextSourceCode} + */ +class TextSourceCodeBase { + /** + * The lines of text in the source code. + * @type {Array} + */ + #lines; + + /** + * The AST of the source code. + * @type {Options['RootNode']} + */ + ast; + + /** + * The text of the source code. + * @type {string} + */ + text; + + /** + * Creates a new instance. + * @param {Object} options The options for the instance. + * @param {string} options.text The source code text. + * @param {Options['RootNode']} options.ast The root AST node. + * @param {RegExp} [options.lineEndingPattern] The pattern to match lineEndings in the source code. + */ + constructor({ text, ast, lineEndingPattern = /\r?\n/u }) { + this.ast = ast; + this.text = text; + this.#lines = text.split(lineEndingPattern); + } + + /** + * Returns the loc information for the given node or token. + * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the loc information for. + * @returns {SourceLocation} The loc information for the node or token. + * @throws {Error} If the node or token does not have loc information. + */ + getLoc(nodeOrToken) { + if (hasESTreeStyleLoc(nodeOrToken)) { + return nodeOrToken.loc; + } + + if (hasPosStyleLoc(nodeOrToken)) { + return nodeOrToken.position; + } + + throw new Error( + "Custom getLoc() method must be implemented in the subclass.", + ); + } + + /** + * Returns the range information for the given node or token. + * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the range information for. + * @returns {SourceRange} The range information for the node or token. + * @throws {Error} If the node or token does not have range information. + */ + getRange(nodeOrToken) { + if (hasESTreeStyleRange(nodeOrToken)) { + return nodeOrToken.range; + } + + if (hasPosStyleRange(nodeOrToken)) { + return [ + nodeOrToken.position.start.offset, + nodeOrToken.position.end.offset, + ]; + } + + throw new Error( + "Custom getRange() method must be implemented in the subclass.", + ); + } + + /* eslint-disable no-unused-vars -- Required to complete interface. */ + /** + * Returns the parent of the given node. + * @param {Options['SyntaxElementWithLoc']} node The node to get the parent of. + * @returns {Options['SyntaxElementWithLoc']|undefined} The parent of the node. + * @throws {Error} If the method is not implemented in the subclass. + */ + getParent(node) { + throw new Error("Not implemented."); + } + /* eslint-enable no-unused-vars -- Required to complete interface. */ + + /** + * Gets all the ancestors of a given node + * @param {Options['SyntaxElementWithLoc']} node The node + * @returns {Array} All the ancestor nodes in the AST, not including the provided node, starting + * from the root node at index 0 and going inwards to the parent node. + * @throws {TypeError} When `node` is missing. + */ + getAncestors(node) { + if (!node) { + throw new TypeError("Missing required argument: node."); + } + + const ancestorsStartingAtParent = []; + + for ( + let ancestor = this.getParent(node); + ancestor; + ancestor = this.getParent(ancestor) + ) { + ancestorsStartingAtParent.push(ancestor); + } + + return ancestorsStartingAtParent.reverse(); + } + + /** + * Gets the source code for the given node. + * @param {Options['SyntaxElementWithLoc']} [node] The AST node to get the text for. + * @param {number} [beforeCount] The number of characters before the node to retrieve. + * @param {number} [afterCount] The number of characters after the node to retrieve. + * @returns {string} The text representing the AST node. + * @public + */ + getText(node, beforeCount, afterCount) { + if (node) { + const range = this.getRange(node); + return this.text.slice( + Math.max(range[0] - (beforeCount || 0), 0), + range[1] + (afterCount || 0), + ); + } + return this.text; + } + + /** + * Gets the entire source text split into an array of lines. + * @returns {Array} The source text as an array of lines. + * @public + */ + get lines() { + return this.#lines; + } + + /** + * Traverse the source code and return the steps that were taken. + * @returns {Iterable} The steps that were taken while traversing the source code. + */ + traverse() { + throw new Error("Not implemented."); + } +} + +exports.CallMethodStep = CallMethodStep; +exports.ConfigCommentParser = ConfigCommentParser; +exports.Directive = Directive; +exports.TextSourceCodeBase = TextSourceCodeBase; +exports.VisitNodeStep = VisitNodeStep; diff --git a/slider/node_modules/@eslint/plugin-kit/dist/cjs/index.d.cts b/slider/node_modules/@eslint/plugin-kit/dist/cjs/index.d.cts new file mode 100644 index 0000000..5f1a5a3 --- /dev/null +++ b/slider/node_modules/@eslint/plugin-kit/dist/cjs/index.d.cts @@ -0,0 +1,298 @@ +export type VisitTraversalStep = import("@eslint/core").VisitTraversalStep; +export type CallTraversalStep = import("@eslint/core").CallTraversalStep; +export type TraversalStep = import("@eslint/core").TraversalStep; +export type SourceLocation = import("@eslint/core").SourceLocation; +export type SourceLocationWithOffset = import("@eslint/core").SourceLocationWithOffset; +export type SourceRange = import("@eslint/core").SourceRange; +export type IDirective = import("@eslint/core").Directive; +export type DirectiveType = import("@eslint/core").DirectiveType; +export type SourceCodeBaseTypeOptions = import("@eslint/core").SourceCodeBaseTypeOptions; +/** + * + */ +export type TextSourceCode = import("@eslint/core").TextSourceCode; +export type RuleConfig = import("@eslint/core").RuleConfig; +export type RulesConfig = import("@eslint/core").RulesConfig; +export type StringConfig = import("./types.cts").StringConfig; +export type BooleanConfig = import("./types.cts").BooleanConfig; +/** + * A class to represent a step in the traversal process where a + * method is called. + * @implements {CallTraversalStep} + */ +export class CallMethodStep implements CallTraversalStep { + /** + * Creates a new instance. + * @param {Object} options The options for the step. + * @param {string} options.target The target of the step. + * @param {Array} options.args The arguments of the step. + */ + constructor({ target, args }: { + target: string; + args: Array; + }); + /** + * The type of the step. + * @type {"call"} + * @readonly + */ + readonly type: "call"; + /** + * The kind of the step. Represents the same data as the `type` property + * but it's a number for performance. + * @type {2} + * @readonly + */ + readonly kind: 2; + /** + * The name of the method to call. + * @type {string} + */ + target: string; + /** + * The arguments to pass to the method. + * @type {Array} + */ + args: Array; +} +/** + * Object to parse ESLint configuration comments. + */ +export class ConfigCommentParser { + /** + * Parses a list of "name:string_value" or/and "name" options divided by comma or + * whitespace. Used for "global" comments. + * @param {string} string The string to parse. + * @returns {StringConfig} Result map object of names and string values, or null values if no value was provided. + */ + parseStringConfig(string: string): StringConfig; + /** + * Parses a JSON-like config. + * @param {string} string The string to parse. + * @returns {({ok: true, config: RulesConfig}|{ok: false, error: {message: string}})} Result map object + */ + parseJSONLikeConfig(string: string): ({ + ok: true; + config: RulesConfig; + } | { + ok: false; + error: { + message: string; + }; + }); + /** + * Parses a config of values separated by comma. + * @param {string} string The string to parse. + * @returns {BooleanConfig} Result map of values and true values + */ + parseListConfig(string: string): BooleanConfig; + /** + * Parses a directive comment into directive text and value. + * @param {string} string The string with the directive to be parsed. + * @returns {DirectiveComment|undefined} The parsed directive or `undefined` if the directive is invalid. + */ + parseDirective(string: string): DirectiveComment | undefined; + #private; +} +/** + * A class to represent a directive comment. + * @implements {IDirective} + */ +export class Directive implements IDirective { + /** + * Creates a new instance. + * @param {Object} options The options for the directive. + * @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive. + * @param {unknown} options.node The node representing the directive. + * @param {string} options.value The value of the directive. + * @param {string} options.justification The justification for the directive. + */ + constructor({ type, node, value, justification }: { + type: "disable" | "enable" | "disable-next-line" | "disable-line"; + node: unknown; + value: string; + justification: string; + }); + /** + * The type of directive. + * @type {DirectiveType} + * @readonly + */ + readonly type: DirectiveType; + /** + * The node representing the directive. + * @type {unknown} + * @readonly + */ + readonly node: unknown; + /** + * Everything after the "eslint-disable" portion of the directive, + * but before the "--" that indicates the justification. + * @type {string} + * @readonly + */ + readonly value: string; + /** + * The justification for the directive. + * @type {string} + * @readonly + */ + readonly justification: string; +} +/** + * Source Code Base Object + * @template {SourceCodeBaseTypeOptions & {SyntaxElementWithLoc: object}} [Options=SourceCodeBaseTypeOptions & {SyntaxElementWithLoc: object}] + * @implements {TextSourceCode} + */ +export class TextSourceCodeBase implements TextSourceCode { + /** + * Creates a new instance. + * @param {Object} options The options for the instance. + * @param {string} options.text The source code text. + * @param {Options['RootNode']} options.ast The root AST node. + * @param {RegExp} [options.lineEndingPattern] The pattern to match lineEndings in the source code. + */ + constructor({ text, ast, lineEndingPattern }: { + text: string; + ast: Options["RootNode"]; + lineEndingPattern?: RegExp; + }); + /** + * The AST of the source code. + * @type {Options['RootNode']} + */ + ast: Options["RootNode"]; + /** + * The text of the source code. + * @type {string} + */ + text: string; + /** + * Returns the loc information for the given node or token. + * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the loc information for. + * @returns {SourceLocation} The loc information for the node or token. + * @throws {Error} If the node or token does not have loc information. + */ + getLoc(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceLocation; + /** + * Returns the range information for the given node or token. + * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the range information for. + * @returns {SourceRange} The range information for the node or token. + * @throws {Error} If the node or token does not have range information. + */ + getRange(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceRange; + /** + * Returns the parent of the given node. + * @param {Options['SyntaxElementWithLoc']} node The node to get the parent of. + * @returns {Options['SyntaxElementWithLoc']|undefined} The parent of the node. + * @throws {Error} If the method is not implemented in the subclass. + */ + getParent(node: Options["SyntaxElementWithLoc"]): Options["SyntaxElementWithLoc"] | undefined; + /** + * Gets all the ancestors of a given node + * @param {Options['SyntaxElementWithLoc']} node The node + * @returns {Array} All the ancestor nodes in the AST, not including the provided node, starting + * from the root node at index 0 and going inwards to the parent node. + * @throws {TypeError} When `node` is missing. + */ + getAncestors(node: Options["SyntaxElementWithLoc"]): Array; + /** + * Gets the source code for the given node. + * @param {Options['SyntaxElementWithLoc']} [node] The AST node to get the text for. + * @param {number} [beforeCount] The number of characters before the node to retrieve. + * @param {number} [afterCount] The number of characters after the node to retrieve. + * @returns {string} The text representing the AST node. + * @public + */ + public getText(node?: Options["SyntaxElementWithLoc"], beforeCount?: number, afterCount?: number): string; + /** + * Gets the entire source text split into an array of lines. + * @returns {Array} The source text as an array of lines. + * @public + */ + public get lines(): Array; + /** + * Traverse the source code and return the steps that were taken. + * @returns {Iterable} The steps that were taken while traversing the source code. + */ + traverse(): Iterable; + #private; +} +/** + * A class to represent a step in the traversal process where a node is visited. + * @implements {VisitTraversalStep} + */ +export class VisitNodeStep implements VisitTraversalStep { + /** + * Creates a new instance. + * @param {Object} options The options for the step. + * @param {object} options.target The target of the step. + * @param {1|2} options.phase The phase of the step. + * @param {Array} options.args The arguments of the step. + */ + constructor({ target, phase, args }: { + target: object; + phase: 1 | 2; + args: Array; + }); + /** + * The type of the step. + * @type {"visit"} + * @readonly + */ + readonly type: "visit"; + /** + * The kind of the step. Represents the same data as the `type` property + * but it's a number for performance. + * @type {1} + * @readonly + */ + readonly kind: 1; + /** + * The target of the step. + * @type {object} + */ + target: object; + /** + * The phase of the step. + * @type {1|2} + */ + phase: 1 | 2; + /** + * The arguments of the step. + * @type {Array} + */ + args: Array; +} +/** + * Represents a directive comment. + */ +declare class DirectiveComment { + /** + * Creates a new directive comment. + * @param {string} label The label of the directive. + * @param {string} value The value of the directive. + * @param {string} justification The justification of the directive. + */ + constructor(label: string, value: string, justification: string); + /** + * The label of the directive, such as "eslint", "eslint-disable", etc. + * @type {string} + */ + label: string; + /** + * The value of the directive (the string after the label). + * @type {string} + */ + value: string; + /** + * The justification of the directive (the string after the --). + * @type {string} + */ + justification: string; +} +export {}; diff --git a/slider/node_modules/@eslint/plugin-kit/dist/cjs/types.cts b/slider/node_modules/@eslint/plugin-kit/dist/cjs/types.cts new file mode 100644 index 0000000..1253474 --- /dev/null +++ b/slider/node_modules/@eslint/plugin-kit/dist/cjs/types.cts @@ -0,0 +1,7 @@ +/** + * @fileoverview Types for the plugin-kit package. + * @author Nicholas C. Zakas + */ + +export type StringConfig = Record; +export type BooleanConfig = Record; diff --git a/slider/node_modules/@eslint/plugin-kit/dist/esm/index.d.ts b/slider/node_modules/@eslint/plugin-kit/dist/esm/index.d.ts new file mode 100644 index 0000000..f27f7d5 --- /dev/null +++ b/slider/node_modules/@eslint/plugin-kit/dist/esm/index.d.ts @@ -0,0 +1,298 @@ +export type VisitTraversalStep = import("@eslint/core").VisitTraversalStep; +export type CallTraversalStep = import("@eslint/core").CallTraversalStep; +export type TraversalStep = import("@eslint/core").TraversalStep; +export type SourceLocation = import("@eslint/core").SourceLocation; +export type SourceLocationWithOffset = import("@eslint/core").SourceLocationWithOffset; +export type SourceRange = import("@eslint/core").SourceRange; +export type IDirective = import("@eslint/core").Directive; +export type DirectiveType = import("@eslint/core").DirectiveType; +export type SourceCodeBaseTypeOptions = import("@eslint/core").SourceCodeBaseTypeOptions; +/** + * + */ +export type TextSourceCode = import("@eslint/core").TextSourceCode; +export type RuleConfig = import("@eslint/core").RuleConfig; +export type RulesConfig = import("@eslint/core").RulesConfig; +export type StringConfig = import("./types.ts").StringConfig; +export type BooleanConfig = import("./types.ts").BooleanConfig; +/** + * A class to represent a step in the traversal process where a + * method is called. + * @implements {CallTraversalStep} + */ +export class CallMethodStep implements CallTraversalStep { + /** + * Creates a new instance. + * @param {Object} options The options for the step. + * @param {string} options.target The target of the step. + * @param {Array} options.args The arguments of the step. + */ + constructor({ target, args }: { + target: string; + args: Array; + }); + /** + * The type of the step. + * @type {"call"} + * @readonly + */ + readonly type: "call"; + /** + * The kind of the step. Represents the same data as the `type` property + * but it's a number for performance. + * @type {2} + * @readonly + */ + readonly kind: 2; + /** + * The name of the method to call. + * @type {string} + */ + target: string; + /** + * The arguments to pass to the method. + * @type {Array} + */ + args: Array; +} +/** + * Object to parse ESLint configuration comments. + */ +export class ConfigCommentParser { + /** + * Parses a list of "name:string_value" or/and "name" options divided by comma or + * whitespace. Used for "global" comments. + * @param {string} string The string to parse. + * @returns {StringConfig} Result map object of names and string values, or null values if no value was provided. + */ + parseStringConfig(string: string): StringConfig; + /** + * Parses a JSON-like config. + * @param {string} string The string to parse. + * @returns {({ok: true, config: RulesConfig}|{ok: false, error: {message: string}})} Result map object + */ + parseJSONLikeConfig(string: string): ({ + ok: true; + config: RulesConfig; + } | { + ok: false; + error: { + message: string; + }; + }); + /** + * Parses a config of values separated by comma. + * @param {string} string The string to parse. + * @returns {BooleanConfig} Result map of values and true values + */ + parseListConfig(string: string): BooleanConfig; + /** + * Parses a directive comment into directive text and value. + * @param {string} string The string with the directive to be parsed. + * @returns {DirectiveComment|undefined} The parsed directive or `undefined` if the directive is invalid. + */ + parseDirective(string: string): DirectiveComment | undefined; + #private; +} +/** + * A class to represent a directive comment. + * @implements {IDirective} + */ +export class Directive implements IDirective { + /** + * Creates a new instance. + * @param {Object} options The options for the directive. + * @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive. + * @param {unknown} options.node The node representing the directive. + * @param {string} options.value The value of the directive. + * @param {string} options.justification The justification for the directive. + */ + constructor({ type, node, value, justification }: { + type: "disable" | "enable" | "disable-next-line" | "disable-line"; + node: unknown; + value: string; + justification: string; + }); + /** + * The type of directive. + * @type {DirectiveType} + * @readonly + */ + readonly type: DirectiveType; + /** + * The node representing the directive. + * @type {unknown} + * @readonly + */ + readonly node: unknown; + /** + * Everything after the "eslint-disable" portion of the directive, + * but before the "--" that indicates the justification. + * @type {string} + * @readonly + */ + readonly value: string; + /** + * The justification for the directive. + * @type {string} + * @readonly + */ + readonly justification: string; +} +/** + * Source Code Base Object + * @template {SourceCodeBaseTypeOptions & {SyntaxElementWithLoc: object}} [Options=SourceCodeBaseTypeOptions & {SyntaxElementWithLoc: object}] + * @implements {TextSourceCode} + */ +export class TextSourceCodeBase implements TextSourceCode { + /** + * Creates a new instance. + * @param {Object} options The options for the instance. + * @param {string} options.text The source code text. + * @param {Options['RootNode']} options.ast The root AST node. + * @param {RegExp} [options.lineEndingPattern] The pattern to match lineEndings in the source code. + */ + constructor({ text, ast, lineEndingPattern }: { + text: string; + ast: Options["RootNode"]; + lineEndingPattern?: RegExp; + }); + /** + * The AST of the source code. + * @type {Options['RootNode']} + */ + ast: Options["RootNode"]; + /** + * The text of the source code. + * @type {string} + */ + text: string; + /** + * Returns the loc information for the given node or token. + * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the loc information for. + * @returns {SourceLocation} The loc information for the node or token. + * @throws {Error} If the node or token does not have loc information. + */ + getLoc(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceLocation; + /** + * Returns the range information for the given node or token. + * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the range information for. + * @returns {SourceRange} The range information for the node or token. + * @throws {Error} If the node or token does not have range information. + */ + getRange(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceRange; + /** + * Returns the parent of the given node. + * @param {Options['SyntaxElementWithLoc']} node The node to get the parent of. + * @returns {Options['SyntaxElementWithLoc']|undefined} The parent of the node. + * @throws {Error} If the method is not implemented in the subclass. + */ + getParent(node: Options["SyntaxElementWithLoc"]): Options["SyntaxElementWithLoc"] | undefined; + /** + * Gets all the ancestors of a given node + * @param {Options['SyntaxElementWithLoc']} node The node + * @returns {Array} All the ancestor nodes in the AST, not including the provided node, starting + * from the root node at index 0 and going inwards to the parent node. + * @throws {TypeError} When `node` is missing. + */ + getAncestors(node: Options["SyntaxElementWithLoc"]): Array; + /** + * Gets the source code for the given node. + * @param {Options['SyntaxElementWithLoc']} [node] The AST node to get the text for. + * @param {number} [beforeCount] The number of characters before the node to retrieve. + * @param {number} [afterCount] The number of characters after the node to retrieve. + * @returns {string} The text representing the AST node. + * @public + */ + public getText(node?: Options["SyntaxElementWithLoc"], beforeCount?: number, afterCount?: number): string; + /** + * Gets the entire source text split into an array of lines. + * @returns {Array} The source text as an array of lines. + * @public + */ + public get lines(): Array; + /** + * Traverse the source code and return the steps that were taken. + * @returns {Iterable} The steps that were taken while traversing the source code. + */ + traverse(): Iterable; + #private; +} +/** + * A class to represent a step in the traversal process where a node is visited. + * @implements {VisitTraversalStep} + */ +export class VisitNodeStep implements VisitTraversalStep { + /** + * Creates a new instance. + * @param {Object} options The options for the step. + * @param {object} options.target The target of the step. + * @param {1|2} options.phase The phase of the step. + * @param {Array} options.args The arguments of the step. + */ + constructor({ target, phase, args }: { + target: object; + phase: 1 | 2; + args: Array; + }); + /** + * The type of the step. + * @type {"visit"} + * @readonly + */ + readonly type: "visit"; + /** + * The kind of the step. Represents the same data as the `type` property + * but it's a number for performance. + * @type {1} + * @readonly + */ + readonly kind: 1; + /** + * The target of the step. + * @type {object} + */ + target: object; + /** + * The phase of the step. + * @type {1|2} + */ + phase: 1 | 2; + /** + * The arguments of the step. + * @type {Array} + */ + args: Array; +} +/** + * Represents a directive comment. + */ +declare class DirectiveComment { + /** + * Creates a new directive comment. + * @param {string} label The label of the directive. + * @param {string} value The value of the directive. + * @param {string} justification The justification of the directive. + */ + constructor(label: string, value: string, justification: string); + /** + * The label of the directive, such as "eslint", "eslint-disable", etc. + * @type {string} + */ + label: string; + /** + * The value of the directive (the string after the label). + * @type {string} + */ + value: string; + /** + * The justification of the directive (the string after the --). + * @type {string} + */ + justification: string; +} +export {}; diff --git a/slider/node_modules/@eslint/plugin-kit/dist/esm/index.js b/slider/node_modules/@eslint/plugin-kit/dist/esm/index.js new file mode 100644 index 0000000..0109c33 --- /dev/null +++ b/slider/node_modules/@eslint/plugin-kit/dist/esm/index.js @@ -0,0 +1,615 @@ +// @ts-self-types="./index.d.ts" +import levn from 'levn'; + +/** + * @fileoverview Config Comment Parser + * @author Nicholas C. Zakas + */ + + +//----------------------------------------------------------------------------- +// Type Definitions +//----------------------------------------------------------------------------- + +/** @typedef {import("@eslint/core").RuleConfig} RuleConfig */ +/** @typedef {import("@eslint/core").RulesConfig} RulesConfig */ +/** @typedef {import("./types.ts").StringConfig} StringConfig */ +/** @typedef {import("./types.ts").BooleanConfig} BooleanConfig */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const directivesPattern = /^([a-z]+(?:-[a-z]+)*)(?:\s|$)/u; +const validSeverities = new Set([0, 1, 2, "off", "warn", "error"]); + +/** + * Determines if the severity in the rule configuration is valid. + * @param {RuleConfig} ruleConfig A rule's configuration. + * @returns {boolean} `true` if the severity is valid, otherwise `false`. + */ +function isSeverityValid(ruleConfig) { + const severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + return validSeverities.has(severity); +} + +/** + * Determines if all severities in the rules configuration are valid. + * @param {RulesConfig} rulesConfig The rules configuration to check. + * @returns {boolean} `true` if all severities are valid, otherwise `false`. + */ +function isEverySeverityValid(rulesConfig) { + return Object.values(rulesConfig).every(isSeverityValid); +} + +/** + * Represents a directive comment. + */ +class DirectiveComment { + /** + * The label of the directive, such as "eslint", "eslint-disable", etc. + * @type {string} + */ + label = ""; + + /** + * The value of the directive (the string after the label). + * @type {string} + */ + value = ""; + + /** + * The justification of the directive (the string after the --). + * @type {string} + */ + justification = ""; + + /** + * Creates a new directive comment. + * @param {string} label The label of the directive. + * @param {string} value The value of the directive. + * @param {string} justification The justification of the directive. + */ + constructor(label, value, justification) { + this.label = label; + this.value = value; + this.justification = justification; + } +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Object to parse ESLint configuration comments. + */ +class ConfigCommentParser { + /** + * Parses a list of "name:string_value" or/and "name" options divided by comma or + * whitespace. Used for "global" comments. + * @param {string} string The string to parse. + * @returns {StringConfig} Result map object of names and string values, or null values if no value was provided. + */ + parseStringConfig(string) { + const items = /** @type {StringConfig} */ ({}); + + // Collapse whitespace around `:` and `,` to make parsing easier + const trimmedString = string + .trim() + .replace(/(? { + if (!name) { + return; + } + + // value defaults to null (if not provided), e.g: "foo" => ["foo", null] + const [key, value = null] = name.split(":"); + + items[key] = value; + }); + + return items; + } + + /** + * Parses a JSON-like config. + * @param {string} string The string to parse. + * @returns {({ok: true, config: RulesConfig}|{ok: false, error: {message: string}})} Result map object + */ + parseJSONLikeConfig(string) { + // Parses a JSON-like comment by the same way as parsing CLI option. + try { + const items = + /** @type {RulesConfig} */ (levn.parse("Object", string)) || {}; + + /* + * When the configuration has any invalid severities, it should be completely + * ignored. This is because the configuration is not valid and should not be + * applied. + * + * For example, the following configuration is invalid: + * + * "no-alert: 2 no-console: 2" + * + * This results in a configuration of { "no-alert": "2 no-console: 2" }, which is + * not valid. In this case, the configuration should be ignored. + */ + if (isEverySeverityValid(items)) { + return { + ok: true, + config: items, + }; + } + } catch { + // levn parsing error: ignore to parse the string by a fallback. + } + + /* + * Optionator cannot parse commaless notations. + * But we are supporting that. So this is a fallback for that. + */ + const normalizedString = string + .replace(/(? { + const trimmedName = name + .trim() + .replace( + /^(?['"]?)(?.*)\k$/su, + "$", + ); + + if (trimmedName) { + items[trimmedName] = true; + } + }); + + return items; + } + + /** + * Extract the directive and the justification from a given directive comment and trim them. + * @param {string} value The comment text to extract. + * @returns {{directivePart: string, justificationPart: string}} The extracted directive and justification. + */ + #extractDirectiveComment(value) { + const match = /\s-{2,}\s/u.exec(value); + + if (!match) { + return { directivePart: value.trim(), justificationPart: "" }; + } + + const directive = value.slice(0, match.index).trim(); + const justification = value.slice(match.index + match[0].length).trim(); + + return { directivePart: directive, justificationPart: justification }; + } + + /** + * Parses a directive comment into directive text and value. + * @param {string} string The string with the directive to be parsed. + * @returns {DirectiveComment|undefined} The parsed directive or `undefined` if the directive is invalid. + */ + parseDirective(string) { + const { directivePart, justificationPart } = + this.#extractDirectiveComment(string); + const match = directivesPattern.exec(directivePart); + + if (!match) { + return undefined; + } + + const directiveText = match[1]; + const directiveValue = directivePart.slice( + match.index + directiveText.length, + ); + + return new DirectiveComment( + directiveText, + directiveValue.trim(), + justificationPart, + ); + } +} + +/** + * @fileoverview A collection of helper classes for implementing `SourceCode`. + * @author Nicholas C. Zakas + */ + +/* eslint class-methods-use-this: off -- Required to complete interface. */ + +//----------------------------------------------------------------------------- +// Type Definitions +//----------------------------------------------------------------------------- + +/** @typedef {import("@eslint/core").VisitTraversalStep} VisitTraversalStep */ +/** @typedef {import("@eslint/core").CallTraversalStep} CallTraversalStep */ +/** @typedef {import("@eslint/core").TraversalStep} TraversalStep */ +/** @typedef {import("@eslint/core").SourceLocation} SourceLocation */ +/** @typedef {import("@eslint/core").SourceLocationWithOffset} SourceLocationWithOffset */ +/** @typedef {import("@eslint/core").SourceRange} SourceRange */ +/** @typedef {import("@eslint/core").Directive} IDirective */ +/** @typedef {import("@eslint/core").DirectiveType} DirectiveType */ +/** @typedef {import("@eslint/core").SourceCodeBaseTypeOptions} SourceCodeBaseTypeOptions */ +/** + * @typedef {import("@eslint/core").TextSourceCode} TextSourceCode + * @template {SourceCodeBaseTypeOptions} [Options=SourceCodeBaseTypeOptions] + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/** + * Determines if a node has ESTree-style loc information. + * @param {object} node The node to check. + * @returns {node is {loc:SourceLocation}} `true` if the node has ESTree-style loc information, `false` if not. + */ +function hasESTreeStyleLoc(node) { + return "loc" in node; +} + +/** + * Determines if a node has position-style loc information. + * @param {object} node The node to check. + * @returns {node is {position:SourceLocation}} `true` if the node has position-style range information, `false` if not. + */ +function hasPosStyleLoc(node) { + return "position" in node; +} + +/** + * Determines if a node has ESTree-style range information. + * @param {object} node The node to check. + * @returns {node is {range:SourceRange}} `true` if the node has ESTree-style range information, `false` if not. + */ +function hasESTreeStyleRange(node) { + return "range" in node; +} + +/** + * Determines if a node has position-style range information. + * @param {object} node The node to check. + * @returns {node is {position:SourceLocationWithOffset}} `true` if the node has position-style range information, `false` if not. + */ +function hasPosStyleRange(node) { + return "position" in node; +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * A class to represent a step in the traversal process where a node is visited. + * @implements {VisitTraversalStep} + */ +class VisitNodeStep { + /** + * The type of the step. + * @type {"visit"} + * @readonly + */ + type = "visit"; + + /** + * The kind of the step. Represents the same data as the `type` property + * but it's a number for performance. + * @type {1} + * @readonly + */ + kind = 1; + + /** + * The target of the step. + * @type {object} + */ + target; + + /** + * The phase of the step. + * @type {1|2} + */ + phase; + + /** + * The arguments of the step. + * @type {Array} + */ + args; + + /** + * Creates a new instance. + * @param {Object} options The options for the step. + * @param {object} options.target The target of the step. + * @param {1|2} options.phase The phase of the step. + * @param {Array} options.args The arguments of the step. + */ + constructor({ target, phase, args }) { + this.target = target; + this.phase = phase; + this.args = args; + } +} + +/** + * A class to represent a step in the traversal process where a + * method is called. + * @implements {CallTraversalStep} + */ +class CallMethodStep { + /** + * The type of the step. + * @type {"call"} + * @readonly + */ + type = "call"; + + /** + * The kind of the step. Represents the same data as the `type` property + * but it's a number for performance. + * @type {2} + * @readonly + */ + kind = 2; + + /** + * The name of the method to call. + * @type {string} + */ + target; + + /** + * The arguments to pass to the method. + * @type {Array} + */ + args; + + /** + * Creates a new instance. + * @param {Object} options The options for the step. + * @param {string} options.target The target of the step. + * @param {Array} options.args The arguments of the step. + */ + constructor({ target, args }) { + this.target = target; + this.args = args; + } +} + +/** + * A class to represent a directive comment. + * @implements {IDirective} + */ +class Directive { + /** + * The type of directive. + * @type {DirectiveType} + * @readonly + */ + type; + + /** + * The node representing the directive. + * @type {unknown} + * @readonly + */ + node; + + /** + * Everything after the "eslint-disable" portion of the directive, + * but before the "--" that indicates the justification. + * @type {string} + * @readonly + */ + value; + + /** + * The justification for the directive. + * @type {string} + * @readonly + */ + justification; + + /** + * Creates a new instance. + * @param {Object} options The options for the directive. + * @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive. + * @param {unknown} options.node The node representing the directive. + * @param {string} options.value The value of the directive. + * @param {string} options.justification The justification for the directive. + */ + constructor({ type, node, value, justification }) { + this.type = type; + this.node = node; + this.value = value; + this.justification = justification; + } +} + +/** + * Source Code Base Object + * @template {SourceCodeBaseTypeOptions & {SyntaxElementWithLoc: object}} [Options=SourceCodeBaseTypeOptions & {SyntaxElementWithLoc: object}] + * @implements {TextSourceCode} + */ +class TextSourceCodeBase { + /** + * The lines of text in the source code. + * @type {Array} + */ + #lines; + + /** + * The AST of the source code. + * @type {Options['RootNode']} + */ + ast; + + /** + * The text of the source code. + * @type {string} + */ + text; + + /** + * Creates a new instance. + * @param {Object} options The options for the instance. + * @param {string} options.text The source code text. + * @param {Options['RootNode']} options.ast The root AST node. + * @param {RegExp} [options.lineEndingPattern] The pattern to match lineEndings in the source code. + */ + constructor({ text, ast, lineEndingPattern = /\r?\n/u }) { + this.ast = ast; + this.text = text; + this.#lines = text.split(lineEndingPattern); + } + + /** + * Returns the loc information for the given node or token. + * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the loc information for. + * @returns {SourceLocation} The loc information for the node or token. + * @throws {Error} If the node or token does not have loc information. + */ + getLoc(nodeOrToken) { + if (hasESTreeStyleLoc(nodeOrToken)) { + return nodeOrToken.loc; + } + + if (hasPosStyleLoc(nodeOrToken)) { + return nodeOrToken.position; + } + + throw new Error( + "Custom getLoc() method must be implemented in the subclass.", + ); + } + + /** + * Returns the range information for the given node or token. + * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the range information for. + * @returns {SourceRange} The range information for the node or token. + * @throws {Error} If the node or token does not have range information. + */ + getRange(nodeOrToken) { + if (hasESTreeStyleRange(nodeOrToken)) { + return nodeOrToken.range; + } + + if (hasPosStyleRange(nodeOrToken)) { + return [ + nodeOrToken.position.start.offset, + nodeOrToken.position.end.offset, + ]; + } + + throw new Error( + "Custom getRange() method must be implemented in the subclass.", + ); + } + + /* eslint-disable no-unused-vars -- Required to complete interface. */ + /** + * Returns the parent of the given node. + * @param {Options['SyntaxElementWithLoc']} node The node to get the parent of. + * @returns {Options['SyntaxElementWithLoc']|undefined} The parent of the node. + * @throws {Error} If the method is not implemented in the subclass. + */ + getParent(node) { + throw new Error("Not implemented."); + } + /* eslint-enable no-unused-vars -- Required to complete interface. */ + + /** + * Gets all the ancestors of a given node + * @param {Options['SyntaxElementWithLoc']} node The node + * @returns {Array} All the ancestor nodes in the AST, not including the provided node, starting + * from the root node at index 0 and going inwards to the parent node. + * @throws {TypeError} When `node` is missing. + */ + getAncestors(node) { + if (!node) { + throw new TypeError("Missing required argument: node."); + } + + const ancestorsStartingAtParent = []; + + for ( + let ancestor = this.getParent(node); + ancestor; + ancestor = this.getParent(ancestor) + ) { + ancestorsStartingAtParent.push(ancestor); + } + + return ancestorsStartingAtParent.reverse(); + } + + /** + * Gets the source code for the given node. + * @param {Options['SyntaxElementWithLoc']} [node] The AST node to get the text for. + * @param {number} [beforeCount] The number of characters before the node to retrieve. + * @param {number} [afterCount] The number of characters after the node to retrieve. + * @returns {string} The text representing the AST node. + * @public + */ + getText(node, beforeCount, afterCount) { + if (node) { + const range = this.getRange(node); + return this.text.slice( + Math.max(range[0] - (beforeCount || 0), 0), + range[1] + (afterCount || 0), + ); + } + return this.text; + } + + /** + * Gets the entire source text split into an array of lines. + * @returns {Array} The source text as an array of lines. + * @public + */ + get lines() { + return this.#lines; + } + + /** + * Traverse the source code and return the steps that were taken. + * @returns {Iterable} The steps that were taken while traversing the source code. + */ + traverse() { + throw new Error("Not implemented."); + } +} + +export { CallMethodStep, ConfigCommentParser, Directive, TextSourceCodeBase, VisitNodeStep }; diff --git a/slider/node_modules/@eslint/plugin-kit/dist/esm/types.d.ts b/slider/node_modules/@eslint/plugin-kit/dist/esm/types.d.ts new file mode 100644 index 0000000..90854eb --- /dev/null +++ b/slider/node_modules/@eslint/plugin-kit/dist/esm/types.d.ts @@ -0,0 +1,6 @@ +/** + * @fileoverview Types for the plugin-kit package. + * @author Nicholas C. Zakas + */ +export type StringConfig = Record; +export type BooleanConfig = Record; diff --git a/slider/node_modules/@eslint/plugin-kit/dist/esm/types.ts b/slider/node_modules/@eslint/plugin-kit/dist/esm/types.ts new file mode 100644 index 0000000..1253474 --- /dev/null +++ b/slider/node_modules/@eslint/plugin-kit/dist/esm/types.ts @@ -0,0 +1,7 @@ +/** + * @fileoverview Types for the plugin-kit package. + * @author Nicholas C. Zakas + */ + +export type StringConfig = Record; +export type BooleanConfig = Record; diff --git a/slider/node_modules/@eslint/plugin-kit/package.json b/slider/node_modules/@eslint/plugin-kit/package.json new file mode 100644 index 0000000..e883a27 --- /dev/null +++ b/slider/node_modules/@eslint/plugin-kit/package.json @@ -0,0 +1,61 @@ +{ + "name": "@eslint/plugin-kit", + "version": "0.3.5", + "description": "Utilities for building ESLint plugins.", + "author": "Nicholas C. Zakas", + "type": "module", + "main": "dist/esm/index.js", + "types": "dist/esm/index.d.ts", + "exports": { + "require": { + "types": "./dist/cjs/index.d.cts", + "default": "./dist/cjs/index.cjs" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + } + }, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/rewrite.git", + "directory": "packages/plugin-kit" + }, + "bugs": { + "url": "https://github.com/eslint/rewrite/issues" + }, + "homepage": "https://github.com/eslint/rewrite/tree/main/packages/plugin-kit#readme", + "scripts": { + "build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js", + "build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts", + "build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts", + "pretest": "npm run build", + "test": "mocha tests/", + "test:coverage": "c8 npm test", + "test:jsr": "npx jsr@latest publish --dry-run", + "test:types": "tsc -p tests/types/tsconfig.json" + }, + "keywords": [ + "eslint", + "eslintplugin", + "eslint-plugin" + ], + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "devDependencies": { + "@types/levn": "^0.4.0", + "rollup-plugin-copy": "^3.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } +} diff --git a/slider/node_modules/@humanfs/core/LICENSE b/slider/node_modules/@humanfs/core/LICENSE new file mode 100644 index 0000000..ed43975 --- /dev/null +++ b/slider/node_modules/@humanfs/core/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/slider/node_modules/@humanfs/core/README.md b/slider/node_modules/@humanfs/core/README.md new file mode 100644 index 0000000..45af946 --- /dev/null +++ b/slider/node_modules/@humanfs/core/README.md @@ -0,0 +1,140 @@ +# `@humanfs/core` + +by [Nicholas C. Zakas](https://humanwhocodes.com) + +If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate) or [nominate me](https://stars.github.com/nominate/) for a GitHub Star. + +## Description + +The core functionality for humanfs that is shared across all implementations for all runtimes. The contents of this package are intentionally runtime agnostic and are not intended to be used alone. + +Currently, this package simply exports the `Hfs` class, which is an abstract base class intended to be inherited from in runtime-specific hfs packages (like `@humanfs/node`). + +> [!WARNING] +> This project is **experimental** and may change significantly before v1.0.0. Use at your own caution and definitely not in production! + +## Installation + +### Node.js + +Install using your favorite package manager for Node.js: + +```shell +npm install @humanfs/core + +# or + +pnpm install @humanfs/core + +# or + +yarn add @humanfs/core + +# or + +bun install @humanfs/core +``` + +Then you can import the `Hfs` and `Path` classes like this: + +```js +import { Hfs, Path } from "@humanfs/core"; +``` + +### Deno + +Install using [JSR](https://jsr.io): + +```shell +deno add @humanfs/core + +# or + +jsr add @humanfs/core +``` + +Then you can import the `Hfs` class like this: + +```js +import { Hfs, Path } from "@humanfs/core"; +``` + +### Browser + +It's recommended to import the minified version to save bandwidth: + +```js +import { Hfs, Path } from "https://cdn.skypack.dev/@humanfs/core?min"; +``` + +However, you can also import the unminified version for debugging purposes: + +```js +import { Hfs, Path } from "https://cdn.skypack.dev/@humanfs/core"; +``` + +## Usage + +### `Hfs` Class + +The `Hfs` class contains all of the basic functionality for an `Hfs` instance *without* a predefined impl. This class is mostly used for creating runtime-specific impls, such as `NodeHfs` and `DenoHfs`. + +You can create your own instance by providing an `impl` directly: + +```js +const hfs = new Hfs({ impl: { async text() {} }}); +``` + +The specified `impl` becomes the base impl for the instance, meaning you can always reset back to it using `resetImpl()`. + +You can also inherit from `Hfs` to create your own class with a preconfigured impl, such as: + +```js +class MyHfs extends Hfs { + constructor() { + super({ + impl: myImpl + }); + } +} +``` + +### `Path` Class + +The `Path` class represents the path to a directory or file within a file system. It's an abstract representation that can be used even outside of traditional file systems where string paths might not make sense. + +```js +const myPath = new Path(["dir", "subdir"]); +console.log(myPath.toString()); // "dir/subdir" + +// add another step +myPath.push("file.txt"); +console.log(myPath.toString()); // "dir/subdir/file.txt" + +// get just the last step +console.log(myPath.name); // "file.txt" + +// change just the last step +myPath.name = "file.json"; +console.log(myPath.name); // "file.json" +console.log(myPath.toString()); // "dir/subdir/file.json" + +// get the size of the path +console.log(myPath.size); // 3 + +// remove the last step +myPath.pop(); +console.log(myPath.toString()); // "dir/subdir" + +// iterate over the steps +for (const step of myPath) { + // do something +} + +// create a new path from a string +const newPath = Path.fromString("/foo/bar"); +``` + +## License + +Apache 2.0 diff --git a/slider/node_modules/@humanfs/core/dist/errors.d.ts b/slider/node_modules/@humanfs/core/dist/errors.d.ts new file mode 100644 index 0000000..468c2ab --- /dev/null +++ b/slider/node_modules/@humanfs/core/dist/errors.d.ts @@ -0,0 +1,64 @@ +/** + * @fileoverview Common error classes + * @author Nicholas C. Zakas + */ +/** + * Error thrown when a file or directory is not found. + */ +export class NotFoundError extends Error { + /** + * Creates a new instance. + * @param {string} message The error message. + */ + constructor(message: string); + /** + * Error code. + * @type {string} + */ + code: string; +} +/** + * Error thrown when an operation is not permitted. + */ +export class PermissionError extends Error { + /** + * Creates a new instance. + * @param {string} message The error message. + */ + constructor(message: string); + /** + * Error code. + * @type {string} + */ + code: string; +} +/** + * Error thrown when an operation is not allowed on a directory. + */ +export class DirectoryError extends Error { + /** + * Creates a new instance. + * @param {string} message The error message. + */ + constructor(message: string); + /** + * Error code. + * @type {string} + */ + code: string; +} +/** + * Error thrown when a directory is not empty. + */ +export class NotEmptyError extends Error { + /** + * Creates a new instance. + * @param {string} message The error message. + */ + constructor(message: string); + /** + * Error code. + * @type {string} + */ + code: string; +} diff --git a/slider/node_modules/@humanfs/core/dist/fsx.d.ts b/slider/node_modules/@humanfs/core/dist/fsx.d.ts new file mode 100644 index 0000000..b68a035 --- /dev/null +++ b/slider/node_modules/@humanfs/core/dist/fsx.d.ts @@ -0,0 +1,193 @@ +/** + * @fileoverview The main file for the hfs package. + * @author Nicholas C. Zakas + */ +/** @typedef{import("@humanfs/types").HfsImpl} HfsImpl */ +/** @typedef{import("@humanfs/types").HfsDirectoryEntry} HfsDirectoryEntry */ +/** + * Error to represent when a method is missing on an impl. + */ +export class NoSuchMethodError extends Error { + /** + * Creates a new instance. + * @param {string} methodName The name of the method that was missing. + */ + constructor(methodName: string); +} +/** + * Error to represent when an impl is already set. + */ +export class ImplAlreadySetError extends Error { + /** + * Creates a new instance. + */ + constructor(); +} +/** + * A class representing a log entry. + */ +export class LogEntry { + /** + * Creates a new instance. + * @param {string} type The type of log entry. + * @param {any} [data] The data associated with the log entry. + */ + constructor(type: string, data?: any); + /** + * The time at which the log entry was created. + * @type {number} + */ + timestamp: number; + methodName: string; + data: any; + #private; +} +/** + * A class representing a file system utility library. + * @implements {HfsImpl} + */ +export class Hfs implements HfsImpl { + /** + * Creates a new instance. + * @param {object} options The options for the instance. + * @param {HfsImpl} options.impl The implementation to use. + */ + constructor({ impl }: { + impl: HfsImpl; + }); + /** + * Starts a new log with the given name. + * @param {string} name The name of the log to start; + * @returns {void} + * @throws {Error} When the log already exists. + * @throws {TypeError} When the name is not a non-empty string. + */ + logStart(name: string): void; + /** + * Ends a log with the given name and returns the entries. + * @param {string} name The name of the log to end. + * @returns {Array} The entries in the log. + * @throws {Error} When the log does not exist. + */ + logEnd(name: string): Array; + /** + * Determines if the current implementation is the base implementation. + * @returns {boolean} True if the current implementation is the base implementation. + */ + isBaseImpl(): boolean; + /** + * Sets the implementation for this instance. + * @param {object} impl The implementation to use. + * @returns {void} + */ + setImpl(impl: object): void; + /** + * Resets the implementation for this instance back to its original. + * @returns {void} + */ + resetImpl(): void; + /** + * Reads the given file and returns the contents as text. Assumes UTF-8 encoding. + * @param {string} filePath The file to read. + * @returns {Promise} The contents of the file. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + text(filePath: string): Promise; + /** + * Reads the given file and returns the contents as JSON. Assumes UTF-8 encoding. + * @param {string} filePath The file to read. + * @returns {Promise} The contents of the file as JSON. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {SyntaxError} When the file contents are not valid JSON. + * @throws {TypeError} When the file path is not a non-empty string. + */ + json(filePath: string): Promise; + /** + * Reads the given file and returns the contents as an ArrayBuffer. + * @param {string} filePath The file to read. + * @returns {Promise} The contents of the file as an ArrayBuffer. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + * @deprecated Use bytes() instead. + */ + arrayBuffer(filePath: string): Promise; + /** + * Reads the given file and returns the contents as an Uint8Array. + * @param {string} filePath The file to read. + * @returns {Promise} The contents of the file as an Uint8Array. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + bytes(filePath: string): Promise; + /** + * Writes the given data to the given file. Creates any necessary directories along the way. + * If the data is a string, UTF-8 encoding is used. + * @param {string} filePath The file to write. + * @param {any} contents The data to write. + * @returns {Promise} A promise that resolves when the file is written. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + write(filePath: string, contents: any): Promise; + /** + * Determines if the given file exists. + * @param {string} filePath The file to check. + * @returns {Promise} True if the file exists. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + isFile(filePath: string): Promise; + /** + * Determines if the given directory exists. + * @param {string} dirPath The directory to check. + * @returns {Promise} True if the directory exists. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the directory path is not a non-empty string. + */ + isDirectory(dirPath: string): Promise; + /** + * Creates the given directory. + * @param {string} dirPath The directory to create. + * @returns {Promise} A promise that resolves when the directory is created. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the directory path is not a non-empty string. + */ + createDirectory(dirPath: string): Promise; + /** + * Deletes the given file. + * @param {string} filePath The file to delete. + * @returns {Promise} A promise that resolves when the file is deleted. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + delete(filePath: string): Promise; + /** + * Deletes the given directory. + * @param {string} dirPath The directory to delete. + * @returns {Promise} A promise that resolves when the directory is deleted. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the directory path is not a non-empty string. + */ + deleteAll(dirPath: string): Promise; + /** + * Returns a list of directory entries for the given path. + * @param {string} dirPath The path to the directory to read. + * @returns {AsyncIterable} A promise that resolves with the + * directory entries. + * @throws {TypeError} If the directory path is not a string. + * @throws {Error} If the directory cannot be read. + */ + list(dirPath: string): AsyncIterable; + /** + * Returns the size of the given file. + * @param {string} filePath The path to the file to read. + * @returns {Promise} A promise that resolves with the size of the file. + * @throws {TypeError} If the file path is not a string. + * @throws {Error} If the file cannot be read. + */ + size(filePath: string): Promise; + #private; +} +export type HfsImpl = import("@humanfs/types").HfsImpl; +export type HfsDirectoryEntry = import("@humanfs/types").HfsDirectoryEntry; diff --git a/slider/node_modules/@humanfs/core/dist/hfs.d.ts b/slider/node_modules/@humanfs/core/dist/hfs.d.ts new file mode 100644 index 0000000..18bf5dd --- /dev/null +++ b/slider/node_modules/@humanfs/core/dist/hfs.d.ts @@ -0,0 +1,288 @@ +/** + * Error to represent when a method is missing on an impl. + */ +export class NoSuchMethodError extends Error { + /** + * Creates a new instance. + * @param {string} methodName The name of the method that was missing. + */ + constructor(methodName: string); +} +/** + * Error to represent when a method is not supported on an impl. This happens + * when a method on `Hfs` is called with one name and the corresponding method + * on the impl has a different name. (Example: `text()` and `bytes()`.) + */ +export class MethodNotSupportedError extends Error { + /** + * Creates a new instance. + * @param {string} methodName The name of the method that was missing. + */ + constructor(methodName: string); +} +/** + * Error to represent when an impl is already set. + */ +export class ImplAlreadySetError extends Error { + /** + * Creates a new instance. + */ + constructor(); +} +/** + * A class representing a log entry. + */ +export class LogEntry { + /** + * Creates a new instance. + * @param {string} type The type of log entry. + * @param {any} [data] The data associated with the log entry. + */ + constructor(type: string, data?: any); + /** + * The type of log entry. + * @type {string} + */ + type: string; + /** + * The data associated with the log entry. + * @type {any} + */ + data: any; + /** + * The time at which the log entry was created. + * @type {number} + */ + timestamp: number; +} +/** + * A class representing a file system utility library. + * @implements {HfsImpl} + */ +export class Hfs implements HfsImpl { + /** + * Creates a new instance. + * @param {object} options The options for the instance. + * @param {HfsImpl} options.impl The implementation to use. + */ + constructor({ impl }: { + impl: HfsImpl; + }); + /** + * Starts a new log with the given name. + * @param {string} name The name of the log to start; + * @returns {void} + * @throws {Error} When the log already exists. + * @throws {TypeError} When the name is not a non-empty string. + */ + logStart(name: string): void; + /** + * Ends a log with the given name and returns the entries. + * @param {string} name The name of the log to end. + * @returns {Array} The entries in the log. + * @throws {Error} When the log does not exist. + */ + logEnd(name: string): Array; + /** + * Determines if the current implementation is the base implementation. + * @returns {boolean} True if the current implementation is the base implementation. + */ + isBaseImpl(): boolean; + /** + * Sets the implementation for this instance. + * @param {object} impl The implementation to use. + * @returns {void} + */ + setImpl(impl: object): void; + /** + * Resets the implementation for this instance back to its original. + * @returns {void} + */ + resetImpl(): void; + /** + * Reads the given file and returns the contents as text. Assumes UTF-8 encoding. + * @param {string|URL} filePath The file to read. + * @returns {Promise} The contents of the file. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + text(filePath: string | URL): Promise; + /** + * Reads the given file and returns the contents as JSON. Assumes UTF-8 encoding. + * @param {string|URL} filePath The file to read. + * @returns {Promise} The contents of the file as JSON. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {SyntaxError} When the file contents are not valid JSON. + * @throws {TypeError} When the file path is not a non-empty string. + */ + json(filePath: string | URL): Promise; + /** + * Reads the given file and returns the contents as an ArrayBuffer. + * @param {string|URL} filePath The file to read. + * @returns {Promise} The contents of the file as an ArrayBuffer. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + * @deprecated Use bytes() instead. + */ + arrayBuffer(filePath: string | URL): Promise; + /** + * Reads the given file and returns the contents as an Uint8Array. + * @param {string|URL} filePath The file to read. + * @returns {Promise} The contents of the file as an Uint8Array. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + bytes(filePath: string | URL): Promise; + /** + * Writes the given data to the given file. Creates any necessary directories along the way. + * If the data is a string, UTF-8 encoding is used. + * @param {string|URL} filePath The file to write. + * @param {string|ArrayBuffer|ArrayBufferView} contents The data to write. + * @returns {Promise} A promise that resolves when the file is written. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + write(filePath: string | URL, contents: string | ArrayBuffer | ArrayBufferView): Promise; + /** + * Appends the given data to the given file. Creates any necessary directories along the way. + * If the data is a string, UTF-8 encoding is used. + * @param {string|URL} filePath The file to append to. + * @param {string|ArrayBuffer|ArrayBufferView} contents The data to append. + * @returns {Promise} A promise that resolves when the file is appended to. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + * @throws {TypeError} When the file contents are not a string or ArrayBuffer. + * @throws {Error} When the file cannot be appended to. + */ + append(filePath: string | URL, contents: string | ArrayBuffer | ArrayBufferView): Promise; + /** + * Determines if the given file exists. + * @param {string|URL} filePath The file to check. + * @returns {Promise} True if the file exists. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + isFile(filePath: string | URL): Promise; + /** + * Determines if the given directory exists. + * @param {string|URL} dirPath The directory to check. + * @returns {Promise} True if the directory exists. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the directory path is not a non-empty string. + */ + isDirectory(dirPath: string | URL): Promise; + /** + * Creates the given directory. + * @param {string|URL} dirPath The directory to create. + * @returns {Promise} A promise that resolves when the directory is created. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the directory path is not a non-empty string. + */ + createDirectory(dirPath: string | URL): Promise; + /** + * Deletes the given file or empty directory. + * @param {string|URL} filePath The file to delete. + * @returns {Promise} A promise that resolves when the file or + * directory is deleted, true if the file or directory is deleted, false + * if the file or directory does not exist. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + delete(filePath: string | URL): Promise; + /** + * Deletes the given file or directory recursively. + * @param {string|URL} dirPath The directory to delete. + * @returns {Promise} A promise that resolves when the file or + * directory is deleted, true if the file or directory is deleted, false + * if the file or directory does not exist. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the directory path is not a non-empty string. + */ + deleteAll(dirPath: string | URL): Promise; + /** + * Returns a list of directory entries for the given path. + * @param {string|URL} dirPath The path to the directory to read. + * @returns {AsyncIterable} A promise that resolves with the + * directory entries. + * @throws {TypeError} If the directory path is not a string or URL. + * @throws {Error} If the directory cannot be read. + */ + list(dirPath: string | URL): AsyncIterable; + /** + * Walks a directory using a depth-first traversal and returns the entries + * from the traversal. + * @param {string|URL} dirPath The path to the directory to walk. + * @param {Object} [options] The options for the walk. + * @param {(entry:HfsWalkEntry) => Promise|boolean} [options.directoryFilter] A filter function to determine + * if a directory's entries should be included in the walk. + * @param {(entry:HfsWalkEntry) => Promise|boolean} [options.entryFilter] A filter function to determine if + * an entry should be included in the walk. + * @returns {AsyncIterable} A promise that resolves with the + * directory entries. + * @throws {TypeError} If the directory path is not a string or URL. + * @throws {Error} If the directory cannot be read. + */ + walk(dirPath: string | URL, { directoryFilter, entryFilter }?: { + directoryFilter?: (entry: HfsWalkEntry) => Promise | boolean; + entryFilter?: (entry: HfsWalkEntry) => Promise | boolean; + }): AsyncIterable; + /** + * Returns the size of the given file. + * @param {string|URL} filePath The path to the file to read. + * @returns {Promise} A promise that resolves with the size of the file. + * @throws {TypeError} If the file path is not a string or URL. + * @throws {Error} If the file cannot be read. + */ + size(filePath: string | URL): Promise; + /** + * Returns the last modified timestamp of the given file or directory. + * @param {string|URL} fileOrDirPath The path to the file or directory. + * @returns {Promise} A promise that resolves with the last modified date + * or undefined if the file or directory does not exist. + * @throws {TypeError} If the path is not a string or URL. + */ + lastModified(fileOrDirPath: string | URL): Promise; + /** + * Copys a file from one location to another. + * @param {string|URL} source The path to the file to copy. + * @param {string|URL} destination The path to the new file. + * @returns {Promise} A promise that resolves when the file is copied. + * @throws {TypeError} If the file path is not a string or URL. + * @throws {Error} If the file cannot be copied. + */ + copy(source: string | URL, destination: string | URL): Promise; + /** + * Copies a file or directory from one location to another. + * @param {string|URL} source The path to the file or directory to copy. + * @param {string|URL} destination The path to copy the file or directory to. + * @returns {Promise} A promise that resolves when the file or directory is + * copied. + * @throws {TypeError} If the directory path is not a string or URL. + * @throws {Error} If the directory cannot be copied. + */ + copyAll(source: string | URL, destination: string | URL): Promise; + /** + * Moves a file from the source path to the destination path. + * @param {string|URL} source The location of the file to move. + * @param {string|URL} destination The destination of the file to move. + * @returns {Promise} A promise that resolves when the move is complete. + * @throws {TypeError} If the file or directory paths are not strings. + * @throws {Error} If the file or directory cannot be moved. + */ + move(source: string | URL, destination: string | URL): Promise; + /** + * Moves a file or directory from one location to another. + * @param {string|URL} source The path to the file or directory to move. + * @param {string|URL} destination The path to move the file or directory to. + * @returns {Promise} A promise that resolves when the file or directory is + * moved. + * @throws {TypeError} If the source is not a string or URL. + * @throws {TypeError} If the destination is not a string or URL. + * @throws {Error} If the file or directory cannot be moved. + */ + moveAll(source: string | URL, destination: string | URL): Promise; + #private; +} +export type HfsImpl = import("@humanfs/types").HfsImpl; +export type HfsDirectoryEntry = import("@humanfs/types").HfsDirectoryEntry; +export type HfsWalkEntry = import("@humanfs/types").HfsWalkEntry; diff --git a/slider/node_modules/@humanfs/core/dist/index.d.ts b/slider/node_modules/@humanfs/core/dist/index.d.ts new file mode 100644 index 0000000..4af516e --- /dev/null +++ b/slider/node_modules/@humanfs/core/dist/index.d.ts @@ -0,0 +1,3 @@ +export { Hfs } from "./hfs.js"; +export { Path } from "./path.js"; +export * from "./errors.js"; diff --git a/slider/node_modules/@humanfs/core/dist/path.d.ts b/slider/node_modules/@humanfs/core/dist/path.d.ts new file mode 100644 index 0000000..7874c85 --- /dev/null +++ b/slider/node_modules/@humanfs/core/dist/path.d.ts @@ -0,0 +1,82 @@ +export class Path { + /** + * Creates a new path based on the argument type. If the argument is a string, + * it is assumed to be a file or directory path and is converted to a Path + * instance. If the argument is a URL, it is assumed to be a file URL and is + * converted to a Path instance. If the argument is a Path instance, it is + * copied into a new Path instance. If the argument is an array, it is assumed + * to be the steps of a path and is used to create a new Path instance. + * @param {string|URL|Path|Array} pathish The value to convert to a Path instance. + * @returns {Path} A new Path instance. + * @throws {TypeError} When pathish is not a string, URL, Path, or Array. + * @throws {TypeError} When pathish is a string and is empty. + */ + static from(pathish: string | URL | Path | Array): Path; + /** + * Creates a new Path instance from a string. + * @param {string} fileOrDirPath The file or directory path to convert. + * @returns {Path} A new Path instance. + * @deprecated Use Path.from() instead. + */ + static fromString(fileOrDirPath: string): Path; + /** + * Creates a new Path instance from a URL. + * @param {URL} url The URL to convert. + * @returns {Path} A new Path instance. + * @throws {TypeError} When url is not a URL instance. + * @throws {TypeError} When url.pathname is empty. + * @throws {TypeError} When url.protocol is not "file:". + * @deprecated Use Path.from() instead. + */ + static fromURL(url: URL): Path; + /** + * Creates a new instance. + * @param {Iterable} [steps] The steps to use for the path. + * @throws {TypeError} When steps is not iterable. + */ + constructor(steps?: Iterable); + /** + * Adds steps to the end of the path. + * @param {...string} steps The steps to add to the path. + * @returns {void} + */ + push(...steps: string[]): void; + /** + * Removes the last step from the path. + * @returns {string} The last step in the path. + */ + pop(): string; + /** + * Returns an iterator for steps in the path. + * @returns {IterableIterator} An iterator for the steps in the path. + */ + steps(): IterableIterator; + /** + * Sets the name (the last step) of the path. + * @type {string} + */ + set name(value: string); + /** + * Retrieves the name (the last step) of the path. + * @type {string} + */ + get name(): string; + /** + * Retrieves the size of the path. + * @type {number} + */ + get size(): number; + /** + * Returns the path as a string. + * @returns {string} The path as a string. + */ + toString(): string; + /** + * Returns an iterator for the steps in the path. + * @returns {IterableIterator} An iterator for the steps in the path. + */ + [Symbol.iterator](): IterableIterator; + #private; +} +export type HfsImpl = import("@humanfs/types").HfsImpl; +export type HfsDirectoryEntry = import("@humanfs/types").HfsDirectoryEntry; diff --git a/slider/node_modules/@humanfs/core/package.json b/slider/node_modules/@humanfs/core/package.json new file mode 100644 index 0000000..2899c6c --- /dev/null +++ b/slider/node_modules/@humanfs/core/package.json @@ -0,0 +1,52 @@ +{ + "name": "@humanfs/core", + "version": "0.19.1", + "description": "The core of the humanfs library.", + "type": "module", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "exports": { + "import": { + "types": "./dist/index.d.ts", + "default": "./src/index.js" + } + }, + "files": [ + "dist", + "src" + ], + "scripts": { + "build": "tsc", + "prepare": "npm run build", + "pretest": "npm run build", + "test": "c8 mocha tests" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/humanwhocodes/humanfs.git" + }, + "publishConfig": { + "access": "public" + }, + "keywords": [ + "filesystem", + "fs", + "hfs", + "files" + ], + "author": "Nicholas C. Zakas", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/humanwhocodes/humanfs/issues" + }, + "homepage": "https://github.com/humanwhocodes/humanfs#readme", + "engines": { + "node": ">=18.18.0" + }, + "devDependencies": { + "@humanfs/types": "^0.15.0", + "c8": "^9.0.0", + "mocha": "^10.2.0", + "typescript": "^5.2.2" + } +} diff --git a/slider/node_modules/@humanfs/core/src/errors.js b/slider/node_modules/@humanfs/core/src/errors.js new file mode 100644 index 0000000..7ec1875 --- /dev/null +++ b/slider/node_modules/@humanfs/core/src/errors.js @@ -0,0 +1,105 @@ +/** + * @fileoverview Common error classes + * @author Nicholas C. Zakas + */ + +/** + * Error thrown when a file or directory is not found. + */ +export class NotFoundError extends Error { + /** + * Name of the error class. + * @type {string} + */ + name = "NotFoundError"; + + /** + * Error code. + * @type {string} + */ + code = "ENOENT"; + + /** + * Creates a new instance. + * @param {string} message The error message. + */ + constructor(message) { + super(`ENOENT: No such file or directory, ${message}`); + } +} + +/** + * Error thrown when an operation is not permitted. + */ +export class PermissionError extends Error { + /** + * Name of the error class. + * @type {string} + */ + name = "PermissionError"; + + /** + * Error code. + * @type {string} + */ + code = "EPERM"; + + /** + * Creates a new instance. + * @param {string} message The error message. + */ + constructor(message) { + super(`EPERM: Operation not permitted, ${message}`); + } +} + +/** + * Error thrown when an operation is not allowed on a directory. + */ + +export class DirectoryError extends Error { + /** + * Name of the error class. + * @type {string} + */ + name = "DirectoryError"; + + /** + * Error code. + * @type {string} + */ + code = "EISDIR"; + + /** + * Creates a new instance. + * @param {string} message The error message. + */ + constructor(message) { + super(`EISDIR: Illegal operation on a directory, ${message}`); + } +} + +/** + * Error thrown when a directory is not empty. + */ +export class NotEmptyError extends Error { + /** + * Name of the error class. + * @type {string} + */ + name = "NotEmptyError"; + + /** + * Error code. + * @type {string} + */ + code = "ENOTEMPTY"; + + /** + * Creates a new instance. + * @param {string} message The error message. + */ + constructor(message) { + super(`ENOTEMPTY: Directory not empty, ${message}`); + } +} diff --git a/slider/node_modules/@humanfs/core/src/hfs.js b/slider/node_modules/@humanfs/core/src/hfs.js new file mode 100644 index 0000000..752a334 --- /dev/null +++ b/slider/node_modules/@humanfs/core/src/hfs.js @@ -0,0 +1,699 @@ +/** + * @fileoverview The main file for the humanfs package. + * @author Nicholas C. Zakas + */ + +/* global URL, TextDecoder, TextEncoder */ + +//----------------------------------------------------------------------------- +// Types +//----------------------------------------------------------------------------- + +/** @typedef {import("@humanfs/types").HfsImpl} HfsImpl */ +/** @typedef {import("@humanfs/types").HfsDirectoryEntry} HfsDirectoryEntry */ +/** @typedef {import("@humanfs/types").HfsWalkEntry} HfsWalkEntry */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const decoder = new TextDecoder(); +const encoder = new TextEncoder(); + +/** + * Error to represent when a method is missing on an impl. + */ +export class NoSuchMethodError extends Error { + /** + * Creates a new instance. + * @param {string} methodName The name of the method that was missing. + */ + constructor(methodName) { + super(`Method "${methodName}" does not exist on impl.`); + } +} + +/** + * Error to represent when a method is not supported on an impl. This happens + * when a method on `Hfs` is called with one name and the corresponding method + * on the impl has a different name. (Example: `text()` and `bytes()`.) + */ +export class MethodNotSupportedError extends Error { + /** + * Creates a new instance. + * @param {string} methodName The name of the method that was missing. + */ + constructor(methodName) { + super(`Method "${methodName}" is not supported on this impl.`); + } +} + +/** + * Error to represent when an impl is already set. + */ +export class ImplAlreadySetError extends Error { + /** + * Creates a new instance. + */ + constructor() { + super(`Implementation already set.`); + } +} + +/** + * Asserts that the given path is a valid file path. + * @param {any} fileOrDirPath The path to check. + * @returns {void} + * @throws {TypeError} When the path is not a non-empty string. + */ +function assertValidFileOrDirPath(fileOrDirPath) { + if ( + !fileOrDirPath || + (!(fileOrDirPath instanceof URL) && typeof fileOrDirPath !== "string") + ) { + throw new TypeError("Path must be a non-empty string or URL."); + } +} + +/** + * Asserts that the given file contents are valid. + * @param {any} contents The contents to check. + * @returns {void} + * @throws {TypeError} When the contents are not a string or ArrayBuffer. + */ +function assertValidFileContents(contents) { + if ( + typeof contents !== "string" && + !(contents instanceof ArrayBuffer) && + !ArrayBuffer.isView(contents) + ) { + throw new TypeError( + "File contents must be a string, ArrayBuffer, or ArrayBuffer view.", + ); + } +} + +/** + * Converts the given contents to Uint8Array. + * @param {any} contents The data to convert. + * @returns {Uint8Array} The converted Uint8Array. + * @throws {TypeError} When the contents are not a string or ArrayBuffer. + */ +function toUint8Array(contents) { + if (contents instanceof Uint8Array) { + return contents; + } + + if (typeof contents === "string") { + return encoder.encode(contents); + } + + if (contents instanceof ArrayBuffer) { + return new Uint8Array(contents); + } + + if (ArrayBuffer.isView(contents)) { + const bytes = contents.buffer.slice( + contents.byteOffset, + contents.byteOffset + contents.byteLength, + ); + return new Uint8Array(bytes); + } + throw new TypeError( + "Invalid contents type. Expected string or ArrayBuffer.", + ); +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * A class representing a log entry. + */ +export class LogEntry { + /** + * The type of log entry. + * @type {string} + */ + type; + + /** + * The data associated with the log entry. + * @type {any} + */ + data; + + /** + * The time at which the log entry was created. + * @type {number} + */ + timestamp = Date.now(); + + /** + * Creates a new instance. + * @param {string} type The type of log entry. + * @param {any} [data] The data associated with the log entry. + */ + constructor(type, data) { + this.type = type; + this.data = data; + } +} + +/** + * A class representing a file system utility library. + * @implements {HfsImpl} + */ +export class Hfs { + /** + * The base implementation for this instance. + * @type {HfsImpl} + */ + #baseImpl; + + /** + * The current implementation for this instance. + * @type {HfsImpl} + */ + #impl; + + /** + * A map of log names to their corresponding entries. + * @type {Map>} + */ + #logs = new Map(); + + /** + * Creates a new instance. + * @param {object} options The options for the instance. + * @param {HfsImpl} options.impl The implementation to use. + */ + constructor({ impl }) { + this.#baseImpl = impl; + this.#impl = impl; + } + + /** + * Logs an entry onto all currently open logs. + * @param {string} methodName The name of the method being called. + * @param {...*} args The arguments to the method. + * @returns {void} + */ + #log(methodName, ...args) { + for (const logs of this.#logs.values()) { + logs.push(new LogEntry("call", { methodName, args })); + } + } + + /** + * Starts a new log with the given name. + * @param {string} name The name of the log to start; + * @returns {void} + * @throws {Error} When the log already exists. + * @throws {TypeError} When the name is not a non-empty string. + */ + logStart(name) { + if (!name || typeof name !== "string") { + throw new TypeError("Log name must be a non-empty string."); + } + + if (this.#logs.has(name)) { + throw new Error(`Log "${name}" already exists.`); + } + + this.#logs.set(name, []); + } + + /** + * Ends a log with the given name and returns the entries. + * @param {string} name The name of the log to end. + * @returns {Array} The entries in the log. + * @throws {Error} When the log does not exist. + */ + logEnd(name) { + if (this.#logs.has(name)) { + const logs = this.#logs.get(name); + this.#logs.delete(name); + return logs; + } + + throw new Error(`Log "${name}" does not exist.`); + } + + /** + * Determines if the current implementation is the base implementation. + * @returns {boolean} True if the current implementation is the base implementation. + */ + isBaseImpl() { + return this.#impl === this.#baseImpl; + } + + /** + * Sets the implementation for this instance. + * @param {object} impl The implementation to use. + * @returns {void} + */ + setImpl(impl) { + this.#log("implSet", impl); + + if (this.#impl !== this.#baseImpl) { + throw new ImplAlreadySetError(); + } + + this.#impl = impl; + } + + /** + * Resets the implementation for this instance back to its original. + * @returns {void} + */ + resetImpl() { + this.#log("implReset"); + this.#impl = this.#baseImpl; + } + + /** + * Asserts that the given method exists on the current implementation. + * @param {string} methodName The name of the method to check. + * @returns {void} + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + */ + #assertImplMethod(methodName) { + if (typeof this.#impl[methodName] !== "function") { + throw new NoSuchMethodError(methodName); + } + } + + /** + * Asserts that the given method exists on the current implementation, and if not, + * throws an error with a different method name. + * @param {string} methodName The name of the method to check. + * @param {string} targetMethodName The name of the method that should be reported + * as an error when methodName does not exist. + * @returns {void} + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + */ + #assertImplMethodAlt(methodName, targetMethodName) { + if (typeof this.#impl[methodName] !== "function") { + throw new MethodNotSupportedError(targetMethodName); + } + } + + /** + * Calls the given method on the current implementation. + * @param {string} methodName The name of the method to call. + * @param {...any} args The arguments to the method. + * @returns {any} The return value from the method. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + */ + #callImplMethod(methodName, ...args) { + this.#log(methodName, ...args); + this.#assertImplMethod(methodName); + return this.#impl[methodName](...args); + } + + /** + * Calls the given method on the current implementation and doesn't log the call. + * @param {string} methodName The name of the method to call. + * @param {...any} args The arguments to the method. + * @returns {any} The return value from the method. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + */ + #callImplMethodWithoutLog(methodName, ...args) { + this.#assertImplMethod(methodName); + return this.#impl[methodName](...args); + } + + /** + * Calls the given method on the current implementation but logs a different method name. + * @param {string} methodName The name of the method to call. + * @param {string} targetMethodName The name of the method to log. + * @param {...any} args The arguments to the method. + * @returns {any} The return value from the method. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + */ + #callImplMethodAlt(methodName, targetMethodName, ...args) { + this.#log(targetMethodName, ...args); + this.#assertImplMethodAlt(methodName, targetMethodName); + return this.#impl[methodName](...args); + } + + /** + * Reads the given file and returns the contents as text. Assumes UTF-8 encoding. + * @param {string|URL} filePath The file to read. + * @returns {Promise} The contents of the file. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + async text(filePath) { + assertValidFileOrDirPath(filePath); + + const result = await this.#callImplMethodAlt("bytes", "text", filePath); + return result ? decoder.decode(result) : undefined; + } + + /** + * Reads the given file and returns the contents as JSON. Assumes UTF-8 encoding. + * @param {string|URL} filePath The file to read. + * @returns {Promise} The contents of the file as JSON. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {SyntaxError} When the file contents are not valid JSON. + * @throws {TypeError} When the file path is not a non-empty string. + */ + async json(filePath) { + assertValidFileOrDirPath(filePath); + + const result = await this.#callImplMethodAlt("bytes", "json", filePath); + return result ? JSON.parse(decoder.decode(result)) : undefined; + } + + /** + * Reads the given file and returns the contents as an ArrayBuffer. + * @param {string|URL} filePath The file to read. + * @returns {Promise} The contents of the file as an ArrayBuffer. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + * @deprecated Use bytes() instead. + */ + async arrayBuffer(filePath) { + assertValidFileOrDirPath(filePath); + + const result = await this.#callImplMethodAlt( + "bytes", + "arrayBuffer", + filePath, + ); + return result?.buffer; + } + + /** + * Reads the given file and returns the contents as an Uint8Array. + * @param {string|URL} filePath The file to read. + * @returns {Promise} The contents of the file as an Uint8Array. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + async bytes(filePath) { + assertValidFileOrDirPath(filePath); + return this.#callImplMethod("bytes", filePath); + } + + /** + * Writes the given data to the given file. Creates any necessary directories along the way. + * If the data is a string, UTF-8 encoding is used. + * @param {string|URL} filePath The file to write. + * @param {string|ArrayBuffer|ArrayBufferView} contents The data to write. + * @returns {Promise} A promise that resolves when the file is written. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + async write(filePath, contents) { + assertValidFileOrDirPath(filePath); + assertValidFileContents(contents); + this.#log("write", filePath, contents); + + let value = toUint8Array(contents); + return this.#callImplMethodWithoutLog("write", filePath, value); + } + + /** + * Appends the given data to the given file. Creates any necessary directories along the way. + * If the data is a string, UTF-8 encoding is used. + * @param {string|URL} filePath The file to append to. + * @param {string|ArrayBuffer|ArrayBufferView} contents The data to append. + * @returns {Promise} A promise that resolves when the file is appended to. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + * @throws {TypeError} When the file contents are not a string or ArrayBuffer. + * @throws {Error} When the file cannot be appended to. + */ + async append(filePath, contents) { + assertValidFileOrDirPath(filePath); + assertValidFileContents(contents); + this.#log("append", filePath, contents); + + let value = toUint8Array(contents); + return this.#callImplMethodWithoutLog("append", filePath, value); + } + + /** + * Determines if the given file exists. + * @param {string|URL} filePath The file to check. + * @returns {Promise} True if the file exists. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + async isFile(filePath) { + assertValidFileOrDirPath(filePath); + return this.#callImplMethod("isFile", filePath); + } + + /** + * Determines if the given directory exists. + * @param {string|URL} dirPath The directory to check. + * @returns {Promise} True if the directory exists. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the directory path is not a non-empty string. + */ + async isDirectory(dirPath) { + assertValidFileOrDirPath(dirPath); + return this.#callImplMethod("isDirectory", dirPath); + } + + /** + * Creates the given directory. + * @param {string|URL} dirPath The directory to create. + * @returns {Promise} A promise that resolves when the directory is created. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the directory path is not a non-empty string. + */ + async createDirectory(dirPath) { + assertValidFileOrDirPath(dirPath); + return this.#callImplMethod("createDirectory", dirPath); + } + + /** + * Deletes the given file or empty directory. + * @param {string|URL} filePath The file to delete. + * @returns {Promise} A promise that resolves when the file or + * directory is deleted, true if the file or directory is deleted, false + * if the file or directory does not exist. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the file path is not a non-empty string. + */ + async delete(filePath) { + assertValidFileOrDirPath(filePath); + return this.#callImplMethod("delete", filePath); + } + + /** + * Deletes the given file or directory recursively. + * @param {string|URL} dirPath The directory to delete. + * @returns {Promise} A promise that resolves when the file or + * directory is deleted, true if the file or directory is deleted, false + * if the file or directory does not exist. + * @throws {NoSuchMethodError} When the method does not exist on the current implementation. + * @throws {TypeError} When the directory path is not a non-empty string. + */ + async deleteAll(dirPath) { + assertValidFileOrDirPath(dirPath); + return this.#callImplMethod("deleteAll", dirPath); + } + + /** + * Returns a list of directory entries for the given path. + * @param {string|URL} dirPath The path to the directory to read. + * @returns {AsyncIterable} A promise that resolves with the + * directory entries. + * @throws {TypeError} If the directory path is not a string or URL. + * @throws {Error} If the directory cannot be read. + */ + async *list(dirPath) { + assertValidFileOrDirPath(dirPath); + yield* await this.#callImplMethod("list", dirPath); + } + + /** + * Walks a directory using a depth-first traversal and returns the entries + * from the traversal. + * @param {string|URL} dirPath The path to the directory to walk. + * @param {Object} [options] The options for the walk. + * @param {(entry:HfsWalkEntry) => Promise|boolean} [options.directoryFilter] A filter function to determine + * if a directory's entries should be included in the walk. + * @param {(entry:HfsWalkEntry) => Promise|boolean} [options.entryFilter] A filter function to determine if + * an entry should be included in the walk. + * @returns {AsyncIterable} A promise that resolves with the + * directory entries. + * @throws {TypeError} If the directory path is not a string or URL. + * @throws {Error} If the directory cannot be read. + */ + async *walk( + dirPath, + { directoryFilter = () => true, entryFilter = () => true } = {}, + ) { + assertValidFileOrDirPath(dirPath); + this.#log("walk", dirPath, { directoryFilter, entryFilter }); + + // inner function for recursion without additional logging + const walk = async function* ( + dirPath, + { directoryFilter, entryFilter, parentPath = "", depth = 1 }, + ) { + let dirEntries; + + try { + dirEntries = await this.#callImplMethodWithoutLog( + "list", + dirPath, + ); + } catch (error) { + // if the directory does not exist then return an empty array + if (error.code === "ENOENT") { + return; + } + + // otherwise, rethrow the error + throw error; + } + + for await (const listEntry of dirEntries) { + const walkEntry = { + path: listEntry.name, + depth, + ...listEntry, + }; + + if (parentPath) { + walkEntry.path = `${parentPath}/${walkEntry.path}`; + } + + // first emit the entry but only if the entry filter returns true + let shouldEmitEntry = entryFilter(walkEntry); + if (shouldEmitEntry.then) { + shouldEmitEntry = await shouldEmitEntry; + } + + if (shouldEmitEntry) { + yield walkEntry; + } + + // if it's a directory then yield the entry and walk the directory + if (listEntry.isDirectory) { + // if the directory filter returns false, skip the directory + let shouldWalkDirectory = directoryFilter(walkEntry); + if (shouldWalkDirectory.then) { + shouldWalkDirectory = await shouldWalkDirectory; + } + + if (!shouldWalkDirectory) { + continue; + } + + // make sure there's a trailing slash on the directory path before appending + const directoryPath = + dirPath instanceof URL + ? new URL( + listEntry.name, + dirPath.href.endsWith("/") + ? dirPath.href + : `${dirPath.href}/`, + ) + : `${dirPath.endsWith("/") ? dirPath : `${dirPath}/`}${listEntry.name}`; + + yield* walk(directoryPath, { + directoryFilter, + entryFilter, + parentPath: walkEntry.path, + depth: depth + 1, + }); + } + } + }.bind(this); + + yield* walk(dirPath, { directoryFilter, entryFilter }); + } + + /** + * Returns the size of the given file. + * @param {string|URL} filePath The path to the file to read. + * @returns {Promise} A promise that resolves with the size of the file. + * @throws {TypeError} If the file path is not a string or URL. + * @throws {Error} If the file cannot be read. + */ + async size(filePath) { + assertValidFileOrDirPath(filePath); + return this.#callImplMethod("size", filePath); + } + + /** + * Returns the last modified timestamp of the given file or directory. + * @param {string|URL} fileOrDirPath The path to the file or directory. + * @returns {Promise} A promise that resolves with the last modified date + * or undefined if the file or directory does not exist. + * @throws {TypeError} If the path is not a string or URL. + */ + async lastModified(fileOrDirPath) { + assertValidFileOrDirPath(fileOrDirPath); + return this.#callImplMethod("lastModified", fileOrDirPath); + } + + /** + * Copys a file from one location to another. + * @param {string|URL} source The path to the file to copy. + * @param {string|URL} destination The path to the new file. + * @returns {Promise} A promise that resolves when the file is copied. + * @throws {TypeError} If the file path is not a string or URL. + * @throws {Error} If the file cannot be copied. + */ + async copy(source, destination) { + assertValidFileOrDirPath(source); + assertValidFileOrDirPath(destination); + return this.#callImplMethod("copy", source, destination); + } + + /** + * Copies a file or directory from one location to another. + * @param {string|URL} source The path to the file or directory to copy. + * @param {string|URL} destination The path to copy the file or directory to. + * @returns {Promise} A promise that resolves when the file or directory is + * copied. + * @throws {TypeError} If the directory path is not a string or URL. + * @throws {Error} If the directory cannot be copied. + */ + async copyAll(source, destination) { + assertValidFileOrDirPath(source); + assertValidFileOrDirPath(destination); + return this.#callImplMethod("copyAll", source, destination); + } + + /** + * Moves a file from the source path to the destination path. + * @param {string|URL} source The location of the file to move. + * @param {string|URL} destination The destination of the file to move. + * @returns {Promise} A promise that resolves when the move is complete. + * @throws {TypeError} If the file or directory paths are not strings. + * @throws {Error} If the file or directory cannot be moved. + */ + async move(source, destination) { + assertValidFileOrDirPath(source); + assertValidFileOrDirPath(destination); + return this.#callImplMethod("move", source, destination); + } + + /** + * Moves a file or directory from one location to another. + * @param {string|URL} source The path to the file or directory to move. + * @param {string|URL} destination The path to move the file or directory to. + * @returns {Promise} A promise that resolves when the file or directory is + * moved. + * @throws {TypeError} If the source is not a string or URL. + * @throws {TypeError} If the destination is not a string or URL. + * @throws {Error} If the file or directory cannot be moved. + */ + async moveAll(source, destination) { + assertValidFileOrDirPath(source); + assertValidFileOrDirPath(destination); + return this.#callImplMethod("moveAll", source, destination); + } +} diff --git a/slider/node_modules/@humanfs/core/src/index.js b/slider/node_modules/@humanfs/core/src/index.js new file mode 100644 index 0000000..6db4b74 --- /dev/null +++ b/slider/node_modules/@humanfs/core/src/index.js @@ -0,0 +1,8 @@ +/** + * @fileoverview API entrypoint for hfs/core + * @author Nicholas C. Zakas + */ + +export { Hfs } from "./hfs.js"; +export { Path } from "./path.js"; +export * from "./errors.js"; diff --git a/slider/node_modules/@humanfs/core/src/path.js b/slider/node_modules/@humanfs/core/src/path.js new file mode 100644 index 0000000..43ebf68 --- /dev/null +++ b/slider/node_modules/@humanfs/core/src/path.js @@ -0,0 +1,237 @@ +/** + * @fileoverview The Path class. + * @author Nicholas C. Zakas + */ + +/* globals URL */ + +//----------------------------------------------------------------------------- +// Types +//----------------------------------------------------------------------------- + +/** @typedef{import("@humanfs/types").HfsImpl} HfsImpl */ +/** @typedef{import("@humanfs/types").HfsDirectoryEntry} HfsDirectoryEntry */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/** + * Normalizes a path to use forward slashes. + * @param {string} filePath The path to normalize. + * @returns {string} The normalized path. + */ +function normalizePath(filePath) { + let startIndex = 0; + let endIndex = filePath.length; + + if (/[a-z]:\//i.test(filePath)) { + startIndex = 3; + } + + if (filePath.startsWith("./")) { + startIndex = 2; + } + + if (filePath.startsWith("/")) { + startIndex = 1; + } + + if (filePath.endsWith("/")) { + endIndex = filePath.length - 1; + } + + return filePath.slice(startIndex, endIndex).replace(/\\/g, "/"); +} + +/** + * Asserts that the given name is a non-empty string, no equal to "." or "..", + * and does not contain a forward slash or backslash. + * @param {string} name The name to check. + * @returns {void} + * @throws {TypeError} When name is not valid. + */ +function assertValidName(name) { + if (typeof name !== "string") { + throw new TypeError("name must be a string"); + } + + if (!name) { + throw new TypeError("name cannot be empty"); + } + + if (name === ".") { + throw new TypeError(`name cannot be "."`); + } + + if (name === "..") { + throw new TypeError(`name cannot be ".."`); + } + + if (name.includes("/") || name.includes("\\")) { + throw new TypeError( + `name cannot contain a slash or backslash: "${name}"`, + ); + } +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +export class Path { + /** + * The steps in the path. + * @type {Array} + */ + #steps; + + /** + * Creates a new instance. + * @param {Iterable} [steps] The steps to use for the path. + * @throws {TypeError} When steps is not iterable. + */ + constructor(steps = []) { + if (typeof steps[Symbol.iterator] !== "function") { + throw new TypeError("steps must be iterable"); + } + + this.#steps = [...steps]; + this.#steps.forEach(assertValidName); + } + + /** + * Adds steps to the end of the path. + * @param {...string} steps The steps to add to the path. + * @returns {void} + */ + push(...steps) { + steps.forEach(assertValidName); + this.#steps.push(...steps); + } + + /** + * Removes the last step from the path. + * @returns {string} The last step in the path. + */ + pop() { + return this.#steps.pop(); + } + + /** + * Returns an iterator for steps in the path. + * @returns {IterableIterator} An iterator for the steps in the path. + */ + steps() { + return this.#steps.values(); + } + + /** + * Returns an iterator for the steps in the path. + * @returns {IterableIterator} An iterator for the steps in the path. + */ + [Symbol.iterator]() { + return this.steps(); + } + + /** + * Retrieves the name (the last step) of the path. + * @type {string} + */ + get name() { + return this.#steps[this.#steps.length - 1]; + } + + /** + * Sets the name (the last step) of the path. + * @type {string} + */ + set name(value) { + assertValidName(value); + this.#steps[this.#steps.length - 1] = value; + } + + /** + * Retrieves the size of the path. + * @type {number} + */ + get size() { + return this.#steps.length; + } + + /** + * Returns the path as a string. + * @returns {string} The path as a string. + */ + toString() { + return this.#steps.join("/"); + } + + /** + * Creates a new path based on the argument type. If the argument is a string, + * it is assumed to be a file or directory path and is converted to a Path + * instance. If the argument is a URL, it is assumed to be a file URL and is + * converted to a Path instance. If the argument is a Path instance, it is + * copied into a new Path instance. If the argument is an array, it is assumed + * to be the steps of a path and is used to create a new Path instance. + * @param {string|URL|Path|Array} pathish The value to convert to a Path instance. + * @returns {Path} A new Path instance. + * @throws {TypeError} When pathish is not a string, URL, Path, or Array. + * @throws {TypeError} When pathish is a string and is empty. + */ + static from(pathish) { + if (typeof pathish === "string") { + if (!pathish) { + throw new TypeError("argument cannot be empty"); + } + + return Path.fromString(pathish); + } + + if (pathish instanceof URL) { + return Path.fromURL(pathish); + } + + if (pathish instanceof Path || Array.isArray(pathish)) { + return new Path(pathish); + } + + throw new TypeError("argument must be a string, URL, Path, or Array"); + } + + /** + * Creates a new Path instance from a string. + * @param {string} fileOrDirPath The file or directory path to convert. + * @returns {Path} A new Path instance. + * @deprecated Use Path.from() instead. + */ + static fromString(fileOrDirPath) { + return new Path(normalizePath(fileOrDirPath).split("/")); + } + + /** + * Creates a new Path instance from a URL. + * @param {URL} url The URL to convert. + * @returns {Path} A new Path instance. + * @throws {TypeError} When url is not a URL instance. + * @throws {TypeError} When url.pathname is empty. + * @throws {TypeError} When url.protocol is not "file:". + * @deprecated Use Path.from() instead. + */ + static fromURL(url) { + if (!(url instanceof URL)) { + throw new TypeError("url must be a URL instance"); + } + + if (!url.pathname || url.pathname === "/") { + throw new TypeError("url.pathname cannot be empty"); + } + + if (url.protocol !== "file:") { + throw new TypeError(`url.protocol must be "file:"`); + } + + // Remove leading slash in pathname + return new Path(normalizePath(url.pathname.slice(1)).split("/")); + } +} diff --git a/slider/node_modules/@humanfs/node/LICENSE b/slider/node_modules/@humanfs/node/LICENSE new file mode 100644 index 0000000..ed43975 --- /dev/null +++ b/slider/node_modules/@humanfs/node/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/slider/node_modules/@humanfs/node/README.md b/slider/node_modules/@humanfs/node/README.md new file mode 100644 index 0000000..6773dc5 --- /dev/null +++ b/slider/node_modules/@humanfs/node/README.md @@ -0,0 +1,141 @@ +# `@humanfs/node` + +by [Nicholas C. Zakas](https://humanwhocodes.com) + +If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate) or [nominate me](https://stars.github.com/nominate/) for a GitHub Star. + +## Description + +The `hfs` bindings for use in Node.js and Node.js-compatible runtimes. + +> [!WARNING] +> This project is **experimental** and may change significantly before v1.0.0. Use at your own caution and definitely not in production! + +## Installation + +Install using your favorite package manager: + +```shell +npm install @humanfs/node + +# or + +pnpm install @humanfs/node + +# or + +yarn add @humanfs/node + +# or + +bun install @humanfs/node +``` + +## Usage + +The easiest way to use hfs in your project is to import the `hfs` object: + +```js +import { hfs } from "@humanfs/node"; +``` + +Then, you can use the API methods: + +```js +// 1. Files + +// read from a text file +const text = await hfs.text("file.txt"); + +// read from a JSON file +const json = await hfs.json("file.json"); + +// read raw bytes from a text file +const arrayBuffer = await hfs.arrayBuffer("file.txt"); + +// write text to a file +await hfs.write("file.txt", "Hello world!"); + +// write bytes to a file +await hfs.write("file.txt", new TextEncoder().encode("Hello world!")); + +// append text to a file +await hfs.append("file.txt", "Hello world!"); + +// append bytes to a file +await hfs.append("file.txt", new TextEncoder().encode("Hello world!")); + +// does the file exist? +const found = await hfs.isFile("file.txt"); + +// how big is the file? +const size = await hfs.size("file.txt"); + +// when was the file modified? +const mtime = await hfs.lastModified("file.txt"); + +// copy a file from one location to another +await hfs.copy("file.txt", "file-copy.txt"); + +// move a file from one location to another +await hfs.move("file.txt", "renamed.txt"); + +// delete a file +await hfs.delete("file.txt"); + +// 2. Directories + +// create a directory +await hfs.createDirectory("dir"); + +// create a directory recursively +await hfs.createDirectory("dir/subdir"); + +// does the directory exist? +const dirFound = await hfs.isDirectory("dir"); + +// copy the entire directory +hfs.copyAll("from-dir", "to-dir"); + +// move the entire directory +hfs.moveAll("from-dir", "to-dir"); + +// delete a directory +await hfs.delete("dir"); + +// delete a non-empty directory +await hfs.deleteAll("dir"); +``` + +If you'd like to create your own instance, import the `NodeHfs` constructor: + +```js +import { NodeHfs } from "@humanfs/node"; +import fsp from "fs/promises"; + +const hfs = new NodeHfs(); + +// optionally specify the fs/promises object to use +const hfs = new NodeHfs({ fsp }); +``` + +If you'd like to use just the impl, import the `NodeHfsImpl` constructor: + +```js +import { NodeHfsImpl } from "@humanfs/node"; +import fsp from "fs/promises"; + +const hfs = new NodeHfsImpl(); + +// optionally specify the fs/promises object to use +const hfs = new NodeHfsImpl({ fsp }); +``` + +## Errors Handled + +* `ENOENT` - in most cases, these errors are handled silently. +* `ENFILE` and `EMFILE` - calls that result in these errors are retried for up to 60 seconds before giving up for good. + +## License + +Apache 2.0 diff --git a/slider/node_modules/@humanfs/node/dist/index.d.ts b/slider/node_modules/@humanfs/node/dist/index.d.ts new file mode 100644 index 0000000..8a06b26 --- /dev/null +++ b/slider/node_modules/@humanfs/node/dist/index.d.ts @@ -0,0 +1,2 @@ +export * from "./node-hfs.js"; +export { Hfs } from "@humanfs/core"; diff --git a/slider/node_modules/@humanfs/node/dist/node-fsx.d.ts b/slider/node_modules/@humanfs/node/dist/node-fsx.d.ts new file mode 100644 index 0000000..9d974fb --- /dev/null +++ b/slider/node_modules/@humanfs/node/dist/node-fsx.d.ts @@ -0,0 +1,150 @@ +/// +/** + * A class representing the Node.js implementation of Hfs. + * @implements {HfsImpl} + */ +export class NodeHfsImpl implements HfsImpl { + /** + * Creates a new instance. + * @param {object} [options] The options for the instance. + * @param {Fsp} [options.fsp] The file system module to use. + */ + constructor({ fsp }?: { + fsp?: Fsp; + }); + /** + * Reads a file and returns the contents as a string. Assumes UTF-8 encoding. + * @param {string} filePath The path to the file to read. + * @returns {Promise} A promise that resolves with the contents of + * the file or undefined if the file doesn't exist. + * @throws {TypeError} If the file path is not a string. + * @throws {RangeError} If the file path is empty. + * @throws {RangeError} If the file path is not absolute. + * @throws {RangeError} If the file path is not a file. + * @throws {RangeError} If the file path is not readable. + */ + text(filePath: string): Promise; + /** + * Reads a file and returns the contents as a JSON object. Assumes UTF-8 encoding. + * @param {string} filePath The path to the file to read. + * @returns {Promise} A promise that resolves with the contents of + * the file or undefined if the file doesn't exist. + * @throws {SyntaxError} If the file contents are not valid JSON. + * @throws {Error} If the file cannot be read. + * @throws {TypeError} If the file path is not a string. + */ + json(filePath: string): Promise; + /** + * Reads a file and returns the contents as an ArrayBuffer. + * @param {string} filePath The path to the file to read. + * @returns {Promise} A promise that resolves with the contents + * of the file or undefined if the file doesn't exist. + * @throws {Error} If the file cannot be read. + * @throws {TypeError} If the file path is not a string. + * @deprecated Use bytes() instead. + */ + arrayBuffer(filePath: string): Promise; + /** + * Reads a file and returns the contents as an Uint8Array. + * @param {string} filePath The path to the file to read. + * @returns {Promise} A promise that resolves with the contents + * of the file or undefined if the file doesn't exist. + * @throws {Error} If the file cannot be read. + * @throws {TypeError} If the file path is not a string. + */ + bytes(filePath: string): Promise; + /** + * Writes a value to a file. If the value is a string, UTF-8 encoding is used. + * @param {string} filePath The path to the file to write. + * @param {string|ArrayBuffer|ArrayBufferView} contents The contents to write to the + * file. + * @returns {Promise} A promise that resolves when the file is + * written. + * @throws {TypeError} If the file path is not a string. + * @throws {Error} If the file cannot be written. + */ + write(filePath: string, contents: string | ArrayBuffer | ArrayBufferView): Promise; + /** + * Checks if a file exists. + * @param {string} filePath The path to the file to check. + * @returns {Promise} A promise that resolves with true if the + * file exists or false if it does not. + * @throws {Error} If the operation fails with a code other than ENOENT. + */ + isFile(filePath: string): Promise; + /** + * Checks if a directory exists. + * @param {string} dirPath The path to the directory to check. + * @returns {Promise} A promise that resolves with true if the + * directory exists or false if it does not. + * @throws {Error} If the operation fails with a code other than ENOENT. + */ + isDirectory(dirPath: string): Promise; + /** + * Creates a directory recursively. + * @param {string} dirPath The path to the directory to create. + * @returns {Promise} A promise that resolves when the directory is + * created. + */ + createDirectory(dirPath: string): Promise; + /** + * Deletes a file or empty directory. + * @param {string} fileOrDirPath The path to the file or directory to + * delete. + * @returns {Promise} A promise that resolves when the file or + * directory is deleted. + * @throws {TypeError} If the file or directory path is not a string. + * @throws {Error} If the file or directory cannot be deleted. + * @throws {Error} If the file or directory is not found. + */ + delete(fileOrDirPath: string): Promise; + /** + * Deletes a file or directory recursively. + * @param {string} fileOrDirPath The path to the file or directory to + * delete. + * @returns {Promise} A promise that resolves when the file or + * directory is deleted. + * @throws {TypeError} If the file or directory path is not a string. + * @throws {Error} If the file or directory cannot be deleted. + * @throws {Error} If the file or directory is not found. + */ + deleteAll(fileOrDirPath: string): Promise; + /** + * Returns a list of directory entries for the given path. + * @param {string} dirPath The path to the directory to read. + * @returns {AsyncIterable} A promise that resolves with the + * directory entries. + * @throws {TypeError} If the directory path is not a string. + * @throws {Error} If the directory cannot be read. + */ + list(dirPath: string): AsyncIterable; + /** + * Returns the size of a file. + * @param {string} filePath The path to the file to read. + * @returns {Promise} A promise that resolves with the size of the + * file in bytes or undefined if the file doesn't exist. + */ + size(filePath: string): Promise; + #private; +} +/** + * A class representing a file system utility library. + * @implements {HfsImpl} + */ +export class NodeHfs extends Hfs implements HfsImpl { + /** + * Creates a new instance. + * @param {object} [options] The options for the instance. + * @param {Fsp} [options.fsp] The file system module to use. + */ + constructor({ fsp }?: { + fsp?: Fsp; + }); +} +export const hfs: NodeHfs; +export type HfsImpl = import("@humanfs/types").HfsImpl; +export type HfsDirectoryEntry = import("@humanfs/types").HfsDirectoryEntry; +export type Fsp = typeof nativeFsp; +export type Dirent = import("fs").Dirent; +import { Hfs } from "@humanfs/core"; +import nativeFsp from "node:fs/promises"; diff --git a/slider/node_modules/@humanfs/node/dist/node-hfs.d.ts b/slider/node_modules/@humanfs/node/dist/node-hfs.d.ts new file mode 100644 index 0000000..c99b12b --- /dev/null +++ b/slider/node_modules/@humanfs/node/dist/node-hfs.d.ts @@ -0,0 +1,176 @@ +/// +/** + * A class representing the Node.js implementation of Hfs. + * @implements {HfsImpl} + */ +export class NodeHfsImpl implements HfsImpl { + /** + * Creates a new instance. + * @param {object} [options] The options for the instance. + * @param {Fsp} [options.fsp] The file system module to use. + */ + constructor({ fsp }?: { + fsp?: Fsp; + }); + /** + * Reads a file and returns the contents as an Uint8Array. + * @param {string|URL} filePath The path to the file to read. + * @returns {Promise} A promise that resolves with the contents + * of the file or undefined if the file doesn't exist. + * @throws {Error} If the file cannot be read. + * @throws {TypeError} If the file path is not a string. + */ + bytes(filePath: string | URL): Promise; + /** + * Writes a value to a file. If the value is a string, UTF-8 encoding is used. + * @param {string|URL} filePath The path to the file to write. + * @param {Uint8Array} contents The contents to write to the + * file. + * @returns {Promise} A promise that resolves when the file is + * written. + * @throws {TypeError} If the file path is not a string. + * @throws {Error} If the file cannot be written. + */ + write(filePath: string | URL, contents: Uint8Array): Promise; + /** + * Appends a value to a file. If the value is a string, UTF-8 encoding is used. + * @param {string|URL} filePath The path to the file to append to. + * @param {Uint8Array} contents The contents to append to the + * file. + * @returns {Promise} A promise that resolves when the file is + * written. + * @throws {TypeError} If the file path is not a string. + * @throws {Error} If the file cannot be appended to. + */ + append(filePath: string | URL, contents: Uint8Array): Promise; + /** + * Checks if a file exists. + * @param {string|URL} filePath The path to the file to check. + * @returns {Promise} A promise that resolves with true if the + * file exists or false if it does not. + * @throws {Error} If the operation fails with a code other than ENOENT. + */ + isFile(filePath: string | URL): Promise; + /** + * Checks if a directory exists. + * @param {string|URL} dirPath The path to the directory to check. + * @returns {Promise} A promise that resolves with true if the + * directory exists or false if it does not. + * @throws {Error} If the operation fails with a code other than ENOENT. + */ + isDirectory(dirPath: string | URL): Promise; + /** + * Creates a directory recursively. + * @param {string|URL} dirPath The path to the directory to create. + * @returns {Promise} A promise that resolves when the directory is + * created. + */ + createDirectory(dirPath: string | URL): Promise; + /** + * Deletes a file or empty directory. + * @param {string|URL} fileOrDirPath The path to the file or directory to + * delete. + * @returns {Promise} A promise that resolves when the file or + * directory is deleted, true if the file or directory is deleted, false + * if the file or directory does not exist. + * @throws {TypeError} If the file or directory path is not a string. + * @throws {Error} If the file or directory cannot be deleted. + */ + delete(fileOrDirPath: string | URL): Promise; + /** + * Deletes a file or directory recursively. + * @param {string|URL} fileOrDirPath The path to the file or directory to + * delete. + * @returns {Promise} A promise that resolves when the file or + * directory is deleted, true if the file or directory is deleted, false + * if the file or directory does not exist. + * @throws {TypeError} If the file or directory path is not a string. + * @throws {Error} If the file or directory cannot be deleted. + */ + deleteAll(fileOrDirPath: string | URL): Promise; + /** + * Returns a list of directory entries for the given path. + * @param {string|URL} dirPath The path to the directory to read. + * @returns {AsyncIterable} A promise that resolves with the + * directory entries. + * @throws {TypeError} If the directory path is not a string. + * @throws {Error} If the directory cannot be read. + */ + list(dirPath: string | URL): AsyncIterable; + /** + * Returns the size of a file. This method handles ENOENT errors + * and returns undefined in that case. + * @param {string|URL} filePath The path to the file to read. + * @returns {Promise} A promise that resolves with the size of the + * file in bytes or undefined if the file doesn't exist. + */ + size(filePath: string | URL): Promise; + /** + * Returns the last modified date of a file or directory. This method handles ENOENT errors + * and returns undefined in that case. + * @param {string|URL} fileOrDirPath The path to the file to read. + * @returns {Promise} A promise that resolves with the last modified + * date of the file or directory, or undefined if the file doesn't exist. + */ + lastModified(fileOrDirPath: string | URL): Promise; + /** + * Copies a file from one location to another. + * @param {string|URL} source The path to the file to copy. + * @param {string|URL} destination The path to copy the file to. + * @returns {Promise} A promise that resolves when the file is copied. + * @throws {Error} If the source file does not exist. + * @throws {Error} If the source file is a directory. + * @throws {Error} If the destination file is a directory. + */ + copy(source: string | URL, destination: string | URL): Promise; + /** + * Copies a file or directory from one location to another. + * @param {string|URL} source The path to the file or directory to copy. + * @param {string|URL} destination The path to copy the file or directory to. + * @returns {Promise} A promise that resolves when the file or directory is + * copied. + * @throws {Error} If the source file or directory does not exist. + * @throws {Error} If the destination file or directory is a directory. + */ + copyAll(source: string | URL, destination: string | URL): Promise; + /** + * Moves a file from the source path to the destination path. + * @param {string|URL} source The location of the file to move. + * @param {string|URL} destination The destination of the file to move. + * @returns {Promise} A promise that resolves when the move is complete. + * @throws {TypeError} If the file paths are not strings. + * @throws {Error} If the file cannot be moved. + */ + move(source: string | URL, destination: string | URL): Promise; + /** + * Moves a file or directory from the source path to the destination path. + * @param {string|URL} source The location of the file or directory to move. + * @param {string|URL} destination The destination of the file or directory to move. + * @returns {Promise} A promise that resolves when the move is complete. + * @throws {TypeError} If the file paths are not strings. + * @throws {Error} If the file or directory cannot be moved. + */ + moveAll(source: string | URL, destination: string | URL): Promise; + #private; +} +/** + * A class representing a file system utility library. + * @implements {HfsImpl} + */ +export class NodeHfs extends Hfs implements HfsImpl { + /** + * Creates a new instance. + * @param {object} [options] The options for the instance. + * @param {Fsp} [options.fsp] The file system module to use. + */ + constructor({ fsp }?: { + fsp?: Fsp; + }); +} +export const hfs: NodeHfs; +export type HfsImpl = import("@humanfs/types").HfsImpl; +export type HfsDirectoryEntry = import("@humanfs/types").HfsDirectoryEntry; +export type Fsp = typeof nativeFsp; +export type Dirent = import("fs").Dirent; +import { Hfs } from "@humanfs/core"; +import nativeFsp from "node:fs/promises"; diff --git a/slider/node_modules/@humanfs/node/package.json b/slider/node_modules/@humanfs/node/package.json new file mode 100644 index 0000000..13bdf3b --- /dev/null +++ b/slider/node_modules/@humanfs/node/package.json @@ -0,0 +1,58 @@ +{ + "name": "@humanfs/node", + "version": "0.16.7", + "description": "The Node.js bindings of the humanfs library.", + "type": "module", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "exports": { + "import": { + "types": "./dist/index.d.ts", + "default": "./src/index.js" + } + }, + "files": [ + "dist", + "src" + ], + "scripts": { + "build": "tsc", + "prepare": "npm run build", + "pretest": "npm run build", + "test": "mocha ./tests/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/humanwhocodes/humanfs.git", + "directory": "packages/node" + }, + "publishConfig": { + "access": "public" + }, + "keywords": [ + "filesystem", + "fs", + "hfs", + "files" + ], + "author": "Nicholas C. Zakas", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/humanwhocodes/humanfs/issues" + }, + "homepage": "https://github.com/humanwhocodes/humanfs#readme", + "engines": { + "node": ">=18.18.0" + }, + "devDependencies": { + "@types/node": "^20.9.4", + "@humanfs/test": "^0.15.0", + "@humanfs/types": "^0.15.0", + "mocha": "^10.2.0", + "typescript": "^5.2.2" + }, + "dependencies": { + "@humanwhocodes/retry": "^0.4.0", + "@humanfs/core": "^0.19.1" + } +} diff --git a/slider/node_modules/@humanfs/node/src/index.js b/slider/node_modules/@humanfs/node/src/index.js new file mode 100644 index 0000000..8444147 --- /dev/null +++ b/slider/node_modules/@humanfs/node/src/index.js @@ -0,0 +1,7 @@ +/** + * @fileoverview This file exports everything for this package. + * @author Nicholas C. Zakas + */ + +export * from "./node-hfs.js"; +export { Hfs } from "@humanfs/core"; diff --git a/slider/node_modules/@humanfs/node/src/node-hfs.js b/slider/node_modules/@humanfs/node/src/node-hfs.js new file mode 100644 index 0000000..57b6720 --- /dev/null +++ b/slider/node_modules/@humanfs/node/src/node-hfs.js @@ -0,0 +1,452 @@ +/** + * @fileoverview The main file for the hfs package. + * @author Nicholas C. Zakas + */ +/* global Buffer:readonly, URL */ + +//----------------------------------------------------------------------------- +// Types +//----------------------------------------------------------------------------- + +/** @typedef {import("@humanfs/types").HfsImpl} HfsImpl */ +/** @typedef {import("@humanfs/types").HfsDirectoryEntry} HfsDirectoryEntry */ +/** @typedef {import("node:fs/promises")} Fsp */ +/** @typedef {import("fs").Dirent} Dirent */ + +//----------------------------------------------------------------------------- +// Imports +//----------------------------------------------------------------------------- + +import { Hfs } from "@humanfs/core"; +import path from "node:path"; +import { Retrier } from "@humanwhocodes/retry"; +import nativeFsp from "node:fs/promises"; +import { fileURLToPath } from "node:url"; + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +const RETRY_ERROR_CODES = new Set(["ENFILE", "EMFILE"]); + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/** + * A class representing a directory entry. + * @implements {HfsDirectoryEntry} + */ +class NodeHfsDirectoryEntry { + /** + * The name of the directory entry. + * @type {string} + */ + name; + + /** + * True if the entry is a file. + * @type {boolean} + */ + isFile; + + /** + * True if the entry is a directory. + * @type {boolean} + */ + isDirectory; + + /** + * True if the entry is a symbolic link. + * @type {boolean} + */ + isSymlink; + + /** + * Creates a new instance. + * @param {Dirent} dirent The directory entry to wrap. + */ + constructor(dirent) { + this.name = dirent.name; + this.isFile = dirent.isFile(); + this.isDirectory = dirent.isDirectory(); + this.isSymlink = dirent.isSymbolicLink(); + } +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * A class representing the Node.js implementation of Hfs. + * @implements {HfsImpl} + */ +export class NodeHfsImpl { + /** + * The file system module to use. + * @type {Fsp} + */ + #fsp; + + /** + * The retryer object used for retrying operations. + * @type {Retrier} + */ + #retrier; + + /** + * Creates a new instance. + * @param {object} [options] The options for the instance. + * @param {Fsp} [options.fsp] The file system module to use. + */ + constructor({ fsp = nativeFsp } = {}) { + this.#fsp = fsp; + this.#retrier = new Retrier(error => RETRY_ERROR_CODES.has(error.code)); + } + + /** + * Reads a file and returns the contents as an Uint8Array. + * @param {string|URL} filePath The path to the file to read. + * @returns {Promise} A promise that resolves with the contents + * of the file or undefined if the file doesn't exist. + * @throws {Error} If the file cannot be read. + * @throws {TypeError} If the file path is not a string. + */ + bytes(filePath) { + return this.#retrier + .retry(() => this.#fsp.readFile(filePath)) + .then(buffer => new Uint8Array(buffer.buffer)) + .catch(error => { + if (error.code === "ENOENT") { + return undefined; + } + + throw error; + }); + } + + /** + * Writes a value to a file. If the value is a string, UTF-8 encoding is used. + * @param {string|URL} filePath The path to the file to write. + * @param {Uint8Array} contents The contents to write to the + * file. + * @returns {Promise} A promise that resolves when the file is + * written. + * @throws {TypeError} If the file path is not a string. + * @throws {Error} If the file cannot be written. + */ + async write(filePath, contents) { + const value = Buffer.from(contents); + + return this.#retrier + .retry(() => this.#fsp.writeFile(filePath, value)) + .catch(error => { + // the directory may not exist, so create it + if (error.code === "ENOENT") { + const dirPath = path.dirname( + filePath instanceof URL + ? fileURLToPath(filePath) + : filePath, + ); + + return this.#fsp + .mkdir(dirPath, { recursive: true }) + .then(() => this.#fsp.writeFile(filePath, value)); + } + + throw error; + }); + } + + /** + * Appends a value to a file. If the value is a string, UTF-8 encoding is used. + * @param {string|URL} filePath The path to the file to append to. + * @param {Uint8Array} contents The contents to append to the + * file. + * @returns {Promise} A promise that resolves when the file is + * written. + * @throws {TypeError} If the file path is not a string. + * @throws {Error} If the file cannot be appended to. + */ + async append(filePath, contents) { + const value = Buffer.from(contents); + + return this.#retrier + .retry(() => this.#fsp.appendFile(filePath, value)) + .catch(error => { + // the directory may not exist, so create it + if (error.code === "ENOENT") { + const dirPath = path.dirname( + filePath instanceof URL + ? fileURLToPath(filePath) + : filePath, + ); + + return this.#fsp + .mkdir(dirPath, { recursive: true }) + .then(() => this.#fsp.appendFile(filePath, value)); + } + + throw error; + }); + } + + /** + * Checks if a file exists. + * @param {string|URL} filePath The path to the file to check. + * @returns {Promise} A promise that resolves with true if the + * file exists or false if it does not. + * @throws {Error} If the operation fails with a code other than ENOENT. + */ + isFile(filePath) { + return this.#fsp + .stat(filePath) + .then(stat => stat.isFile()) + .catch(error => { + if (error.code === "ENOENT") { + return false; + } + + throw error; + }); + } + + /** + * Checks if a directory exists. + * @param {string|URL} dirPath The path to the directory to check. + * @returns {Promise} A promise that resolves with true if the + * directory exists or false if it does not. + * @throws {Error} If the operation fails with a code other than ENOENT. + */ + isDirectory(dirPath) { + return this.#fsp + .stat(dirPath) + .then(stat => stat.isDirectory()) + .catch(error => { + if (error.code === "ENOENT") { + return false; + } + + throw error; + }); + } + + /** + * Creates a directory recursively. + * @param {string|URL} dirPath The path to the directory to create. + * @returns {Promise} A promise that resolves when the directory is + * created. + */ + async createDirectory(dirPath) { + await this.#fsp.mkdir(dirPath, { recursive: true }); + } + + /** + * Deletes a file or empty directory. + * @param {string|URL} fileOrDirPath The path to the file or directory to + * delete. + * @returns {Promise} A promise that resolves when the file or + * directory is deleted, true if the file or directory is deleted, false + * if the file or directory does not exist. + * @throws {TypeError} If the file or directory path is not a string. + * @throws {Error} If the file or directory cannot be deleted. + */ + delete(fileOrDirPath) { + return this.#fsp + .rm(fileOrDirPath) + .then(() => true) + .catch(error => { + if (error.code === "ERR_FS_EISDIR") { + return this.#fsp.rmdir(fileOrDirPath).then(() => true); + } + + if (error.code === "ENOENT") { + return false; + } + + throw error; + }); + } + + /** + * Deletes a file or directory recursively. + * @param {string|URL} fileOrDirPath The path to the file or directory to + * delete. + * @returns {Promise} A promise that resolves when the file or + * directory is deleted, true if the file or directory is deleted, false + * if the file or directory does not exist. + * @throws {TypeError} If the file or directory path is not a string. + * @throws {Error} If the file or directory cannot be deleted. + */ + deleteAll(fileOrDirPath) { + return this.#fsp + .rm(fileOrDirPath, { recursive: true }) + .then(() => true) + .catch(error => { + if (error.code === "ENOENT") { + return false; + } + + throw error; + }); + } + + /** + * Returns a list of directory entries for the given path. + * @param {string|URL} dirPath The path to the directory to read. + * @returns {AsyncIterable} A promise that resolves with the + * directory entries. + * @throws {TypeError} If the directory path is not a string. + * @throws {Error} If the directory cannot be read. + */ + async *list(dirPath) { + const entries = await this.#fsp.readdir(dirPath, { + withFileTypes: true, + }); + + for (const entry of entries) { + yield new NodeHfsDirectoryEntry(entry); + } + } + + /** + * Returns the size of a file. This method handles ENOENT errors + * and returns undefined in that case. + * @param {string|URL} filePath The path to the file to read. + * @returns {Promise} A promise that resolves with the size of the + * file in bytes or undefined if the file doesn't exist. + */ + size(filePath) { + return this.#fsp + .stat(filePath) + .then(stat => stat.size) + .catch(error => { + if (error.code === "ENOENT") { + return undefined; + } + + throw error; + }); + } + + /** + * Returns the last modified date of a file or directory. This method handles ENOENT errors + * and returns undefined in that case. + * @param {string|URL} fileOrDirPath The path to the file to read. + * @returns {Promise} A promise that resolves with the last modified + * date of the file or directory, or undefined if the file doesn't exist. + */ + lastModified(fileOrDirPath) { + return this.#fsp + .stat(fileOrDirPath) + .then(stat => stat.mtime) + .catch(error => { + if (error.code === "ENOENT") { + return undefined; + } + + throw error; + }); + } + + /** + * Copies a file from one location to another. + * @param {string|URL} source The path to the file to copy. + * @param {string|URL} destination The path to copy the file to. + * @returns {Promise} A promise that resolves when the file is copied. + * @throws {Error} If the source file does not exist. + * @throws {Error} If the source file is a directory. + * @throws {Error} If the destination file is a directory. + */ + copy(source, destination) { + return this.#fsp.copyFile(source, destination); + } + + /** + * Copies a file or directory from one location to another. + * @param {string|URL} source The path to the file or directory to copy. + * @param {string|URL} destination The path to copy the file or directory to. + * @returns {Promise} A promise that resolves when the file or directory is + * copied. + * @throws {Error} If the source file or directory does not exist. + * @throws {Error} If the destination file or directory is a directory. + */ + async copyAll(source, destination) { + // for files use copy() and exit + if (await this.isFile(source)) { + return this.copy(source, destination); + } + + const sourceStr = + source instanceof URL ? fileURLToPath(source) : source; + + const destinationStr = + destination instanceof URL + ? fileURLToPath(destination) + : destination; + + // for directories, create the destination directory and copy each entry + await this.createDirectory(destination); + + for await (const entry of this.list(source)) { + const fromEntryPath = path.join(sourceStr, entry.name); + const toEntryPath = path.join(destinationStr, entry.name); + + if (entry.isDirectory) { + await this.copyAll(fromEntryPath, toEntryPath); + } else { + await this.copy(fromEntryPath, toEntryPath); + } + } + } + + /** + * Moves a file from the source path to the destination path. + * @param {string|URL} source The location of the file to move. + * @param {string|URL} destination The destination of the file to move. + * @returns {Promise} A promise that resolves when the move is complete. + * @throws {TypeError} If the file paths are not strings. + * @throws {Error} If the file cannot be moved. + */ + move(source, destination) { + return this.#fsp.stat(source).then(stat => { + if (stat.isDirectory()) { + throw new Error( + `EISDIR: illegal operation on a directory, move '${source}' -> '${destination}'`, + ); + } + + return this.#fsp.rename(source, destination); + }); + } + + /** + * Moves a file or directory from the source path to the destination path. + * @param {string|URL} source The location of the file or directory to move. + * @param {string|URL} destination The destination of the file or directory to move. + * @returns {Promise} A promise that resolves when the move is complete. + * @throws {TypeError} If the file paths are not strings. + * @throws {Error} If the file or directory cannot be moved. + */ + async moveAll(source, destination) { + return this.#fsp.rename(source, destination); + } +} + +/** + * A class representing a file system utility library. + * @implements {HfsImpl} + */ +export class NodeHfs extends Hfs { + /** + * Creates a new instance. + * @param {object} [options] The options for the instance. + * @param {Fsp} [options.fsp] The file system module to use. + */ + constructor({ fsp } = {}) { + super({ impl: new NodeHfsImpl({ fsp }) }); + } +} + +export const hfs = new NodeHfs(); diff --git a/slider/node_modules/@humanwhocodes/module-importer/CHANGELOG.md b/slider/node_modules/@humanwhocodes/module-importer/CHANGELOG.md new file mode 100644 index 0000000..4319f34 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/module-importer/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +## [1.0.1](https://github.com/humanwhocodes/module-importer/compare/v1.0.0...v1.0.1) (2022-08-18) + + +### Bug Fixes + +* Ensure CommonJS mode works correctly. ([cf54a0b](https://github.com/humanwhocodes/module-importer/commit/cf54a0b998085066fbe1776dd0b4cacd808cc192)), closes [#6](https://github.com/humanwhocodes/module-importer/issues/6) + +## 1.0.0 (2022-08-17) + + +### Features + +* Implement ModuleImporter ([3ce4e82](https://www.github.com/humanwhocodes/module-importer/commit/3ce4e820c30c114e787bfed00a0966ac4772f563)) diff --git a/slider/node_modules/@humanwhocodes/module-importer/LICENSE b/slider/node_modules/@humanwhocodes/module-importer/LICENSE new file mode 100644 index 0000000..ed43975 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/module-importer/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/slider/node_modules/@humanwhocodes/module-importer/README.md b/slider/node_modules/@humanwhocodes/module-importer/README.md new file mode 100644 index 0000000..cde2d5b --- /dev/null +++ b/slider/node_modules/@humanwhocodes/module-importer/README.md @@ -0,0 +1,80 @@ +# ModuleImporter + +by [Nicholas C. Zakas](https://humanwhocodes.com) + +If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate). + +## Description + +A utility for seamlessly importing modules in Node.js regardless if they are CommonJS or ESM format. Under the hood, this uses `import()` and relies on Node.js's CommonJS compatibility to work correctly. This ensures that the correct locations and formats are used for CommonJS so you can call one method and not worry about any compatibility issues. + +The problem with the default `import()` is that it always resolves relative to the file location in which it is called. If you want to resolve from a different location, you need to jump through a few hoops to achieve that. This package makes it easy to both resolve and import modules from any directory. + +## Usage + +### Node.js + +Install using [npm][npm] or [yarn][yarn]: + +``` +npm install @humanwhocodes/module-importer + +# or + +yarn add @humanwhocodes/module-importer +``` + +Import into your Node.js project: + +```js +// CommonJS +const { ModuleImporter } = require("@humanwhocodes/module-importer"); + +// ESM +import { ModuleImporter } from "@humanwhocodes/module-importer"; +``` + +### Bun + +Install using this command: + +``` +bun add @humanwhocodes/module-importer +``` + +Import into your Bun project: + +```js +import { ModuleImporter } from "@humanwhocodes/module-importer"; +``` + +## API + +After importing, create a new instance of `ModuleImporter` to start emitting events: + +```js +// cwd can be omitted to use process.cwd() +const importer = new ModuleImporter(cwd); + +// you can resolve the location of any package +const location = importer.resolve("./some-file.cjs"); + +// you can also import directly +const module = importer.import("./some-file.cjs"); +``` + +For both `resolve()` and `import()`, you can pass in package names and filenames. + +## Developer Setup + +1. Fork the repository +2. Clone your fork +3. Run `npm install` to setup dependencies +4. Run `npm test` to run tests + +## License + +Apache 2.0 + +[npm]: https://npmjs.com/ +[yarn]: https://yarnpkg.com/ diff --git a/slider/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs b/slider/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs new file mode 100644 index 0000000..34123df --- /dev/null +++ b/slider/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var module$1 = require('module'); +var url = require('url'); +var path = require('path'); + +/** + * @fileoverview Universal module importer + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('module-importer.cjs', document.baseURI).href))); +const __dirname$1 = path.dirname(__filename$1); +const require$1 = module$1.createRequire(__dirname$1 + "/"); +const { ModuleImporter } = require$1("./module-importer.cjs"); + +exports.ModuleImporter = ModuleImporter; diff --git a/slider/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts b/slider/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts new file mode 100644 index 0000000..a2db8c7 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts @@ -0,0 +1,27 @@ +export class ModuleImporter { + /** + * Creates a new instance. + * @param {string} [cwd] The current working directory to resolve from. + */ + constructor(cwd?: string); + /** + * The base directory from which paths should be resolved. + * @type {string} + */ + cwd: string; + /** + * Resolves a module based on its name or location. + * @param {string} specifier Either an npm package name or + * relative file path. + * @returns {string|undefined} The location of the import. + * @throws {Error} If specifier cannot be located. + */ + resolve(specifier: string): string | undefined; + /** + * Imports a module based on its name or location. + * @param {string} specifier Either an npm package name or + * relative file path. + * @returns {Promise} The module's object. + */ + import(specifier: string): Promise; +} diff --git a/slider/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts b/slider/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts new file mode 100644 index 0000000..8a3a796 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts @@ -0,0 +1,2 @@ +export { ModuleImporter }; +import { ModuleImporter } from "./module-importer.cjs"; diff --git a/slider/node_modules/@humanwhocodes/module-importer/dist/module-importer.js b/slider/node_modules/@humanwhocodes/module-importer/dist/module-importer.js new file mode 100644 index 0000000..28d3485 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/module-importer/dist/module-importer.js @@ -0,0 +1,18 @@ +import { createRequire } from 'module'; +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; + +/** + * @fileoverview Universal module importer + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const require = createRequire(__dirname + "/"); +const { ModuleImporter } = require("./module-importer.cjs"); + +export { ModuleImporter }; diff --git a/slider/node_modules/@humanwhocodes/module-importer/package.json b/slider/node_modules/@humanwhocodes/module-importer/package.json new file mode 100644 index 0000000..b9e325e --- /dev/null +++ b/slider/node_modules/@humanwhocodes/module-importer/package.json @@ -0,0 +1,65 @@ +{ + "name": "@humanwhocodes/module-importer", + "version": "1.0.1", + "description": "Universal module importer for Node.js", + "main": "src/module-importer.cjs", + "module": "src/module-importer.js", + "type": "module", + "types": "dist/module-importer.d.ts", + "exports": { + "require": "./src/module-importer.cjs", + "import": "./src/module-importer.js" + }, + "files": [ + "dist", + "src" + ], + "publishConfig": { + "access": "public" + }, + "gitHooks": { + "pre-commit": "lint-staged" + }, + "lint-staged": { + "*.js": [ + "eslint --fix" + ] + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + }, + "scripts": { + "build": "rollup -c && tsc", + "prepare": "npm run build", + "lint": "eslint src/ tests/", + "test:unit": "c8 mocha tests/module-importer.test.js", + "test:build": "node tests/pkg.test.cjs && node tests/pkg.test.mjs", + "test": "npm run test:unit && npm run test:build" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/humanwhocodes/module-importer.git" + }, + "keywords": [ + "modules", + "esm", + "commonjs" + ], + "engines": { + "node": ">=12.22" + }, + "author": "Nicholas C. Zaks", + "license": "Apache-2.0", + "devDependencies": { + "@types/node": "^18.7.6", + "c8": "7.12.0", + "chai": "4.3.6", + "eslint": "8.22.0", + "lint-staged": "13.0.3", + "mocha": "9.2.2", + "rollup": "2.78.0", + "typescript": "4.7.4", + "yorkie": "2.0.0" + } +} diff --git a/slider/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs b/slider/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs new file mode 100644 index 0000000..057b348 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs @@ -0,0 +1,81 @@ +/** + * @fileoverview Universal module importer + */ + +//----------------------------------------------------------------------------- +// Imports +//----------------------------------------------------------------------------- + +const { createRequire } = require("module"); +const { pathToFileURL } = require("url"); + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const SLASHES = new Set(["/", "\\"]); + +/** + * Normalizes directories to have a trailing slash. + * Resolve is pretty finicky -- if the directory name doesn't have + * a trailing slash then it tries to look in the parent directory. + * i.e., if the directory is "/usr/nzakas/foo" it will start the + * search in /usr/nzakas. However, if the directory is "/user/nzakas/foo/", + * then it will start the search in /user/nzakas/foo. + * @param {string} directory The directory to check. + * @returns {string} The normalized directory. + */ +function normalizeDirectory(directory) { + if (!SLASHES.has(directory[directory.length-1])) { + return directory + "/"; + } + + return directory; +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * Class for importing both CommonJS and ESM modules in Node.js. + */ +exports.ModuleImporter = class ModuleImporter { + + /** + * Creates a new instance. + * @param {string} [cwd] The current working directory to resolve from. + */ + constructor(cwd = process.cwd()) { + + /** + * The base directory from which paths should be resolved. + * @type {string} + */ + this.cwd = normalizeDirectory(cwd); + } + + /** + * Resolves a module based on its name or location. + * @param {string} specifier Either an npm package name or + * relative file path. + * @returns {string|undefined} The location of the import. + * @throws {Error} If specifier cannot be located. + */ + resolve(specifier) { + const require = createRequire(this.cwd); + return require.resolve(specifier); + } + + /** + * Imports a module based on its name or location. + * @param {string} specifier Either an npm package name or + * relative file path. + * @returns {Promise} The module's object. + */ + import(specifier) { + const location = this.resolve(specifier); + return import(pathToFileURL(location).href); + } + +} diff --git a/slider/node_modules/@humanwhocodes/module-importer/src/module-importer.js b/slider/node_modules/@humanwhocodes/module-importer/src/module-importer.js new file mode 100644 index 0000000..6c54ba4 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/module-importer/src/module-importer.js @@ -0,0 +1,22 @@ +/** + * @fileoverview Universal module importer + */ + +//----------------------------------------------------------------------------- +// Imports +//----------------------------------------------------------------------------- + +import { createRequire } from "module"; +import { fileURLToPath } from "url"; +import { dirname } from "path"; + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const require = createRequire(__dirname + "/"); +const { ModuleImporter } = require("./module-importer.cjs"); + +export { ModuleImporter }; diff --git a/slider/node_modules/@humanwhocodes/retry/LICENSE b/slider/node_modules/@humanwhocodes/retry/LICENSE new file mode 100644 index 0000000..ed43975 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/retry/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/slider/node_modules/@humanwhocodes/retry/README.md b/slider/node_modules/@humanwhocodes/retry/README.md new file mode 100644 index 0000000..f4e2eee --- /dev/null +++ b/slider/node_modules/@humanwhocodes/retry/README.md @@ -0,0 +1,177 @@ +# Retry utility + +by [Nicholas C. Zakas](https://humanwhocodes.com) + +If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate) or [nominate me](https://stars.github.com/nominate/) for a GitHub Star. + +## Description + +A utility for retrying failed async JavaScript calls based on the error returned. + +## Usage + +### Node.js + +Install using [npm][npm] or [yarn][yarn]: + +``` +npm install @humanwhocodes/retry + +# or + +yarn add @humanwhocodes/retry +``` + +Import into your Node.js project: + +```js +// CommonJS +const { Retrier } = require("@humanwhocodes/retry"); + +// ESM +import { Retrier } from "@humanwhocodes/retry"; +``` + +### Deno + +Install using [JSR](https://jsr.io): + +```shell +deno add @humanwhocodes/retry + +#or + +jsr add @humanwhocodes/retry +``` + +Then import into your Deno project: + +```js +import { Retrier } from "@humanwhocodes/retry"; +``` + +### Bun + +Install using this command: + +``` +bun add @humanwhocodes/retry +``` + +Import into your Bun project: + +```js +import { Retrier } from "@humanwhocodes/retry"; +``` + +### Browser + +It's recommended to import the minified version to save bandwidth: + +```js +import { Retrier } from "https://cdn.skypack.dev/@humanwhocodes/retry?min"; +``` + +However, you can also import the unminified version for debugging purposes: + +```js +import { Retrier } from "https://cdn.skypack.dev/@humanwhocodes/retry"; +``` + +## API + +After importing, create a new instance of `Retrier` and specify the function to run on the error. This function should return `true` if you want the call retried and `false` if not. + +```js +// this instance will retry if the specific error code is found +const retrier = new Retrier(error => { + return error.code === "ENFILE" || error.code === "EMFILE"; +}); +``` + +Then, call the `retry()` method around the function you'd like to retry, such as: + +```js +import fs from "fs/promises"; + +const retrier = new Retrier(error => { + return error.code === "ENFILE" || error.code === "EMFILE"; +}); + +const text = await retrier.retry(() => fs.readFile("README.md", "utf8")); +``` + +The `retry()` method will either pass through the result on success or wait and retry on failure. Any error that isn't caught by the retrier is automatically rejected so the end result is a transparent passing through of both success and failure. + +### Setting a Timeout + +You can control how long a task will attempt to retry before giving up by passing the `timeout` option to the `Retrier` constructor. By default, the timeout is one minute. + +```js +import fs from "fs/promises"; + +const retrier = new Retrier(error => { + return error.code === "ENFILE" || error.code === "EMFILE"; +}, { timeout: 100_000 }); + +const text = await retrier.retry(() => fs.readFile("README.md", "utf8")); +``` + +When a call times out, it rejects the first error that was received from calling the function. + +### Setting a Concurrency Limit + +When processing a large number of function calls, you can limit the number of concurrent function calls by passing the `concurrency` option to the `Retrier` constructor. By default, `concurrency` is 1000. + +```js +import fs from "fs/promises"; + +const retrier = new Retrier(error => { + return error.code === "ENFILE" || error.code === "EMFILE"; +}, { concurrency: 100 }); + +const filenames = getFilenames(); +const contents = await Promise.all( + filenames.map(filename => retrier.retry(() => fs.readFile(filename, "utf8")) +); +``` + +### Aborting with `AbortSignal` + +You can also pass an `AbortSignal` to cancel a retry: + +```js +import fs from "fs/promises"; + +const controller = new AbortController(); +const retrier = new Retrier(error => { + return error.code === "ENFILE" || error.code === "EMFILE"; +}); + +const text = await retrier.retry( + () => fs.readFile("README.md", "utf8"), + { signal: controller.signal } +); +``` + +## Developer Setup + +1. Fork the repository +2. Clone your fork +3. Run `npm install` to setup dependencies +4. Run `npm test` to run tests + +### Debug Output + +Enable debugging output by setting the `DEBUG` environment variable to `"@hwc/retry"` before running. + +## License + +Apache 2.0 + +## Prior Art + +This utility is inspired by, and contains code from [`graceful-fs`](https://github.com/isaacs/node-graceful-fs). + +[npm]: https://npmjs.com/ +[yarn]: https://yarnpkg.com/ diff --git a/slider/node_modules/@humanwhocodes/retry/dist/retrier.cjs b/slider/node_modules/@humanwhocodes/retry/dist/retrier.cjs new file mode 100644 index 0000000..f135e2f --- /dev/null +++ b/slider/node_modules/@humanwhocodes/retry/dist/retrier.cjs @@ -0,0 +1,478 @@ +'use strict'; + +/** + * @fileoverview A utility for retrying failed async method calls. + */ + +/* global setTimeout, clearTimeout */ + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +const MAX_TASK_TIMEOUT = 60000; +const MAX_TASK_DELAY = 100; +const MAX_CONCURRENCY = 1000; + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/** + * Logs a message to the console if the DEBUG environment variable is set. + * @param {string} message The message to log. + * @returns {void} + */ +function debug(message) { + if (globalThis?.process?.env.DEBUG === "@hwc/retry") { + console.debug(message); + } +} + +/* + * The following logic has been extracted from graceful-fs. + * + * The ISC License + * + * Copyright (c) 2011-2023 Isaac Z. Schlueter, Ben Noordhuis, and Contributors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * Checks if it is time to retry a task based on the timestamp and last attempt time. + * @param {RetryTask} task The task to check. + * @param {number} maxDelay The maximum delay for the queue. + * @returns {boolean} true if it is time to retry, false otherwise. + */ +function isTimeToRetry(task, maxDelay) { + const timeSinceLastAttempt = Date.now() - task.lastAttempt; + const timeSinceStart = Math.max(task.lastAttempt - task.timestamp, 1); + const desiredDelay = Math.min(timeSinceStart * 1.2, maxDelay); + + return timeSinceLastAttempt >= desiredDelay; +} + +/** + * Checks if it is time to bail out based on the given timestamp. + * @param {RetryTask} task The task to check. + * @param {number} timeout The timeout for the queue. + * @returns {boolean} true if it is time to bail, false otherwise. + */ +function isTimeToBail(task, timeout) { + return task.age > timeout; +} + +/** + * Creates a new promise with resolve and reject functions. + * @returns {{promise:Promise, resolve:(value:any) => any, reject: (value:any) => any}} A new promise. + */ +function createPromise() { + if (Promise.withResolvers) { + return Promise.withResolvers(); + } + + let resolve, reject; + + const promise = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + + if (resolve === undefined || reject === undefined) { + throw new Error("Promise executor did not initialize resolve or reject."); + } + + return { promise, resolve, reject }; +} + + +/** + * A class to represent a task in the retry queue. + */ +class RetryTask { + + /** + * The unique ID for the task. + * @type {string} + */ + id = Math.random().toString(36).slice(2); + + /** + * The function to call. + * @type {Function} + */ + fn; + + /** + * The error that was thrown. + * @type {Error} + */ + error; + + /** + * The timestamp of the task. + * @type {number} + */ + timestamp = Date.now(); + + /** + * The timestamp of the last attempt. + * @type {number} + */ + lastAttempt = this.timestamp; + + /** + * The resolve function for the promise. + * @type {Function} + */ + resolve; + + /** + * The reject function for the promise. + * @type {Function} + */ + reject; + + /** + * The AbortSignal to monitor for cancellation. + * @type {AbortSignal|undefined} + */ + signal; + + /** + * Creates a new instance. + * @param {Function} fn The function to call. + * @param {Error} error The error that was thrown. + * @param {Function} resolve The resolve function for the promise. + * @param {Function} reject The reject function for the promise. + * @param {AbortSignal|undefined} signal The AbortSignal to monitor for cancellation. + */ + constructor(fn, error, resolve, reject, signal) { + this.fn = fn; + this.error = error; + this.timestamp = Date.now(); + this.lastAttempt = Date.now(); + this.resolve = resolve; + this.reject = reject; + this.signal = signal; + } + + /** + * Gets the age of the task. + * @returns {number} The age of the task in milliseconds. + * @readonly + */ + get age() { + return Date.now() - this.timestamp; + } +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * A class that manages a queue of retry jobs. + */ +class Retrier { + + /** + * Represents the queue for processing tasks. + * @type {Array} + */ + #retrying = []; + + /** + * Represents the queue for pending tasks. + * @type {Array} + */ + #pending = []; + + /** + * The number of tasks currently being processed. + * @type {number} + */ + #working = 0; + + /** + * The timeout for the queue. + * @type {number} + */ + #timeout; + + /** + * The maximum delay for the queue. + * @type {number} + */ + #maxDelay; + + /** + * The setTimeout() timer ID. + * @type {NodeJS.Timeout|undefined} + */ + #timerId; + + /** + * The function to call. + * @type {Function} + */ + #check; + + /** + * The maximum number of concurrent tasks. + * @type {number} + */ + #concurrency; + + /** + * Creates a new instance. + * @param {Function} check The function to call. + * @param {object} [options] The options for the instance. + * @param {number} [options.timeout] The timeout for the queue. + * @param {number} [options.maxDelay] The maximum delay for the queue. + * @param {number} [options.concurrency] The maximum number of concurrent tasks. + */ + constructor(check, { timeout = MAX_TASK_TIMEOUT, maxDelay = MAX_TASK_DELAY, concurrency = MAX_CONCURRENCY } = {}) { + + if (typeof check !== "function") { + throw new Error("Missing function to check errors"); + } + + this.#check = check; + this.#timeout = timeout; + this.#maxDelay = maxDelay; + this.#concurrency = concurrency; + } + + /** + * Gets the number of tasks waiting to be retried. + * @returns {number} The number of tasks in the retry queue. + */ + get retrying() { + return this.#retrying.length; + } + + /** + * Gets the number of tasks waiting to be processed in the pending queue. + * @returns {number} The number of tasks in the pending queue. + */ + get pending() { + return this.#pending.length; + } + + /** + * Gets the number of tasks currently being processed. + * @returns {number} The number of tasks currently being processed. + */ + get working() { + return this.#working; + } + + /** + * Calls the function and retries if it fails. + * @param {Function} fn The function to call. + * @param {Object} options The options for the job. + * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. + * @param {Promise} options.promise The promise to return when the function settles. + * @param {Function} options.resolve The resolve function for the promise. + * @param {Function} options.reject The reject function for the promise. + * @returns {Promise} A promise that resolves when the function is + * called successfully. + */ + #call(fn, { signal, promise, resolve, reject }) { + + let result; + + try { + result = fn(); + } catch (/** @type {any} */ error) { + reject(new Error(`Synchronous error: ${error.message}`, { cause: error })); + return promise; + } + + // if the result is not a promise then reject an error + if (!result || typeof result.then !== "function") { + reject(new Error("Result is not a promise.")); + return promise; + } + + this.#working++; + promise.finally(() => { + this.#working--; + this.#processPending(); + }) + // `promise.finally` creates a new promise that may be rejected, so it must be handled. + .catch(() => { }); + + // call the original function and catch any ENFILE or EMFILE errors + Promise.resolve(result) + .then(value => { + debug("Function called successfully without retry."); + resolve(value); + }) + .catch(error => { + if (!this.#check(error)) { + reject(error); + return; + } + + const task = new RetryTask(fn, error, resolve, reject, signal); + + debug(`Function failed, queuing for retry with task ${task.id}.`); + this.#retrying.push(task); + + signal?.addEventListener("abort", () => { + debug(`Task ${task.id} was aborted due to AbortSignal.`); + reject(signal.reason); + }); + + this.#processQueue(); + }); + + return promise; + } + + /** + * Adds a new retry job to the queue. + * @template {(...args: unknown[]) => Promise} Func + * @template {Awaited>} RetVal + * @param {Func} fn The function to call. + * @param {object} [options] The options for the job. + * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. + * @returns {Promise} A promise that resolves when the queue is processed. + */ + retry(fn, { signal } = {}) { + + signal?.throwIfAborted(); + + const { promise, resolve, reject } = createPromise(); + + this.#pending.push(() => this.#call(fn, { signal, promise, resolve, reject })); + this.#processPending(); + + return promise; + } + + + /** + * Processes the pending queue and the retry queue. + * @returns {void} + */ + #processAll() { + if (this.pending) { + this.#processPending(); + } + + if (this.retrying) { + this.#processQueue(); + } + } + + /** + * Processes the pending queue to see which tasks can be started. + * @returns {void} + */ + #processPending() { + + debug(`Processing pending tasks: ${this.pending} pending, ${this.working} working.`); + + const available = this.#concurrency - this.working; + + if (available <= 0) { + return; + } + + const count = Math.min(this.pending, available); + + for (let i = 0; i < count; i++) { + const task = this.#pending.shift(); + task?.(); + } + + debug(`Processed pending tasks: ${this.pending} pending, ${this.working} working.`); + } + + /** + * Processes the queue. + * @returns {void} + */ + #processQueue() { + // clear any timer because we're going to check right now + clearTimeout(this.#timerId); + this.#timerId = undefined; + + debug(`Processing retry queue: ${this.retrying} retrying, ${this.working} working.`); + + const processAgain = () => { + this.#timerId = setTimeout(() => this.#processAll(), 0); + }; + + // if there's nothing in the queue, we're done + const task = this.#retrying.shift(); + if (!task) { + debug("Queue is empty, exiting."); + + if (this.pending) { + processAgain(); + } + return; + } + + // if it's time to bail, then bail + if (isTimeToBail(task, this.#timeout)) { + debug(`Task ${task.id} was abandoned due to timeout.`); + task.reject(task.error); + processAgain(); + return; + } + + // if it's not time to retry, then wait and try again + if (!isTimeToRetry(task, this.#maxDelay)) { + debug(`Task ${task.id} is not ready to retry, skipping.`); + this.#retrying.push(task); + processAgain(); + return; + } + + // otherwise, try again + task.lastAttempt = Date.now(); + + // Promise.resolve needed in case it's a thenable but not a Promise + Promise.resolve(task.fn()) + // @ts-ignore because we know it's any + .then(result => { + debug(`Task ${task.id} succeeded after ${task.age}ms.`); + task.resolve(result); + }) + + // @ts-ignore because we know it's any + .catch(error => { + if (!this.#check(error)) { + debug(`Task ${task.id} failed with non-retryable error: ${error.message}.`); + task.reject(error); + return; + } + + // update the task timestamp and push to back of queue to try again + task.lastAttempt = Date.now(); + this.#retrying.push(task); + debug(`Task ${task.id} failed, requeueing to try again.`); + }) + .finally(() => { + this.#processAll(); + }); + } +} + +exports.Retrier = Retrier; diff --git a/slider/node_modules/@humanwhocodes/retry/dist/retrier.d.cts b/slider/node_modules/@humanwhocodes/retry/dist/retrier.d.cts new file mode 100644 index 0000000..ef89cf9 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/retry/dist/retrier.d.cts @@ -0,0 +1,46 @@ +/** + * A class that manages a queue of retry jobs. + */ +export class Retrier { + /** + * Creates a new instance. + * @param {Function} check The function to call. + * @param {object} [options] The options for the instance. + * @param {number} [options.timeout] The timeout for the queue. + * @param {number} [options.maxDelay] The maximum delay for the queue. + * @param {number} [options.concurrency] The maximum number of concurrent tasks. + */ + constructor(check: Function, { timeout, maxDelay, concurrency }?: { + timeout?: number | undefined; + maxDelay?: number | undefined; + concurrency?: number | undefined; + } | undefined); + /** + * Gets the number of tasks waiting to be retried. + * @returns {number} The number of tasks in the retry queue. + */ + get retrying(): number; + /** + * Gets the number of tasks waiting to be processed in the pending queue. + * @returns {number} The number of tasks in the pending queue. + */ + get pending(): number; + /** + * Gets the number of tasks currently being processed. + * @returns {number} The number of tasks currently being processed. + */ + get working(): number; + /** + * Adds a new retry job to the queue. + * @template {(...args: unknown[]) => Promise} Func + * @template {Awaited>} RetVal + * @param {Func} fn The function to call. + * @param {object} [options] The options for the job. + * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. + * @returns {Promise} A promise that resolves when the queue is processed. + */ + retry Promise, RetVal extends Awaited>>(fn: Func, { signal }?: { + signal?: AbortSignal | undefined; + } | undefined): Promise; + #private; +} diff --git a/slider/node_modules/@humanwhocodes/retry/dist/retrier.d.ts b/slider/node_modules/@humanwhocodes/retry/dist/retrier.d.ts new file mode 100644 index 0000000..ef89cf9 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/retry/dist/retrier.d.ts @@ -0,0 +1,46 @@ +/** + * A class that manages a queue of retry jobs. + */ +export class Retrier { + /** + * Creates a new instance. + * @param {Function} check The function to call. + * @param {object} [options] The options for the instance. + * @param {number} [options.timeout] The timeout for the queue. + * @param {number} [options.maxDelay] The maximum delay for the queue. + * @param {number} [options.concurrency] The maximum number of concurrent tasks. + */ + constructor(check: Function, { timeout, maxDelay, concurrency }?: { + timeout?: number | undefined; + maxDelay?: number | undefined; + concurrency?: number | undefined; + } | undefined); + /** + * Gets the number of tasks waiting to be retried. + * @returns {number} The number of tasks in the retry queue. + */ + get retrying(): number; + /** + * Gets the number of tasks waiting to be processed in the pending queue. + * @returns {number} The number of tasks in the pending queue. + */ + get pending(): number; + /** + * Gets the number of tasks currently being processed. + * @returns {number} The number of tasks currently being processed. + */ + get working(): number; + /** + * Adds a new retry job to the queue. + * @template {(...args: unknown[]) => Promise} Func + * @template {Awaited>} RetVal + * @param {Func} fn The function to call. + * @param {object} [options] The options for the job. + * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. + * @returns {Promise} A promise that resolves when the queue is processed. + */ + retry Promise, RetVal extends Awaited>>(fn: Func, { signal }?: { + signal?: AbortSignal | undefined; + } | undefined): Promise; + #private; +} diff --git a/slider/node_modules/@humanwhocodes/retry/dist/retrier.js b/slider/node_modules/@humanwhocodes/retry/dist/retrier.js new file mode 100644 index 0000000..f10fff2 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/retry/dist/retrier.js @@ -0,0 +1,477 @@ +// @ts-self-types="./retrier.d.ts" +/** + * @fileoverview A utility for retrying failed async method calls. + */ + +/* global setTimeout, clearTimeout */ + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +const MAX_TASK_TIMEOUT = 60000; +const MAX_TASK_DELAY = 100; +const MAX_CONCURRENCY = 1000; + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/** + * Logs a message to the console if the DEBUG environment variable is set. + * @param {string} message The message to log. + * @returns {void} + */ +function debug(message) { + if (globalThis?.process?.env.DEBUG === "@hwc/retry") { + console.debug(message); + } +} + +/* + * The following logic has been extracted from graceful-fs. + * + * The ISC License + * + * Copyright (c) 2011-2023 Isaac Z. Schlueter, Ben Noordhuis, and Contributors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * Checks if it is time to retry a task based on the timestamp and last attempt time. + * @param {RetryTask} task The task to check. + * @param {number} maxDelay The maximum delay for the queue. + * @returns {boolean} true if it is time to retry, false otherwise. + */ +function isTimeToRetry(task, maxDelay) { + const timeSinceLastAttempt = Date.now() - task.lastAttempt; + const timeSinceStart = Math.max(task.lastAttempt - task.timestamp, 1); + const desiredDelay = Math.min(timeSinceStart * 1.2, maxDelay); + + return timeSinceLastAttempt >= desiredDelay; +} + +/** + * Checks if it is time to bail out based on the given timestamp. + * @param {RetryTask} task The task to check. + * @param {number} timeout The timeout for the queue. + * @returns {boolean} true if it is time to bail, false otherwise. + */ +function isTimeToBail(task, timeout) { + return task.age > timeout; +} + +/** + * Creates a new promise with resolve and reject functions. + * @returns {{promise:Promise, resolve:(value:any) => any, reject: (value:any) => any}} A new promise. + */ +function createPromise() { + if (Promise.withResolvers) { + return Promise.withResolvers(); + } + + let resolve, reject; + + const promise = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + + if (resolve === undefined || reject === undefined) { + throw new Error("Promise executor did not initialize resolve or reject."); + } + + return { promise, resolve, reject }; +} + + +/** + * A class to represent a task in the retry queue. + */ +class RetryTask { + + /** + * The unique ID for the task. + * @type {string} + */ + id = Math.random().toString(36).slice(2); + + /** + * The function to call. + * @type {Function} + */ + fn; + + /** + * The error that was thrown. + * @type {Error} + */ + error; + + /** + * The timestamp of the task. + * @type {number} + */ + timestamp = Date.now(); + + /** + * The timestamp of the last attempt. + * @type {number} + */ + lastAttempt = this.timestamp; + + /** + * The resolve function for the promise. + * @type {Function} + */ + resolve; + + /** + * The reject function for the promise. + * @type {Function} + */ + reject; + + /** + * The AbortSignal to monitor for cancellation. + * @type {AbortSignal|undefined} + */ + signal; + + /** + * Creates a new instance. + * @param {Function} fn The function to call. + * @param {Error} error The error that was thrown. + * @param {Function} resolve The resolve function for the promise. + * @param {Function} reject The reject function for the promise. + * @param {AbortSignal|undefined} signal The AbortSignal to monitor for cancellation. + */ + constructor(fn, error, resolve, reject, signal) { + this.fn = fn; + this.error = error; + this.timestamp = Date.now(); + this.lastAttempt = Date.now(); + this.resolve = resolve; + this.reject = reject; + this.signal = signal; + } + + /** + * Gets the age of the task. + * @returns {number} The age of the task in milliseconds. + * @readonly + */ + get age() { + return Date.now() - this.timestamp; + } +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * A class that manages a queue of retry jobs. + */ +class Retrier { + + /** + * Represents the queue for processing tasks. + * @type {Array} + */ + #retrying = []; + + /** + * Represents the queue for pending tasks. + * @type {Array} + */ + #pending = []; + + /** + * The number of tasks currently being processed. + * @type {number} + */ + #working = 0; + + /** + * The timeout for the queue. + * @type {number} + */ + #timeout; + + /** + * The maximum delay for the queue. + * @type {number} + */ + #maxDelay; + + /** + * The setTimeout() timer ID. + * @type {NodeJS.Timeout|undefined} + */ + #timerId; + + /** + * The function to call. + * @type {Function} + */ + #check; + + /** + * The maximum number of concurrent tasks. + * @type {number} + */ + #concurrency; + + /** + * Creates a new instance. + * @param {Function} check The function to call. + * @param {object} [options] The options for the instance. + * @param {number} [options.timeout] The timeout for the queue. + * @param {number} [options.maxDelay] The maximum delay for the queue. + * @param {number} [options.concurrency] The maximum number of concurrent tasks. + */ + constructor(check, { timeout = MAX_TASK_TIMEOUT, maxDelay = MAX_TASK_DELAY, concurrency = MAX_CONCURRENCY } = {}) { + + if (typeof check !== "function") { + throw new Error("Missing function to check errors"); + } + + this.#check = check; + this.#timeout = timeout; + this.#maxDelay = maxDelay; + this.#concurrency = concurrency; + } + + /** + * Gets the number of tasks waiting to be retried. + * @returns {number} The number of tasks in the retry queue. + */ + get retrying() { + return this.#retrying.length; + } + + /** + * Gets the number of tasks waiting to be processed in the pending queue. + * @returns {number} The number of tasks in the pending queue. + */ + get pending() { + return this.#pending.length; + } + + /** + * Gets the number of tasks currently being processed. + * @returns {number} The number of tasks currently being processed. + */ + get working() { + return this.#working; + } + + /** + * Calls the function and retries if it fails. + * @param {Function} fn The function to call. + * @param {Object} options The options for the job. + * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. + * @param {Promise} options.promise The promise to return when the function settles. + * @param {Function} options.resolve The resolve function for the promise. + * @param {Function} options.reject The reject function for the promise. + * @returns {Promise} A promise that resolves when the function is + * called successfully. + */ + #call(fn, { signal, promise, resolve, reject }) { + + let result; + + try { + result = fn(); + } catch (/** @type {any} */ error) { + reject(new Error(`Synchronous error: ${error.message}`, { cause: error })); + return promise; + } + + // if the result is not a promise then reject an error + if (!result || typeof result.then !== "function") { + reject(new Error("Result is not a promise.")); + return promise; + } + + this.#working++; + promise.finally(() => { + this.#working--; + this.#processPending(); + }) + // `promise.finally` creates a new promise that may be rejected, so it must be handled. + .catch(() => { }); + + // call the original function and catch any ENFILE or EMFILE errors + Promise.resolve(result) + .then(value => { + debug("Function called successfully without retry."); + resolve(value); + }) + .catch(error => { + if (!this.#check(error)) { + reject(error); + return; + } + + const task = new RetryTask(fn, error, resolve, reject, signal); + + debug(`Function failed, queuing for retry with task ${task.id}.`); + this.#retrying.push(task); + + signal?.addEventListener("abort", () => { + debug(`Task ${task.id} was aborted due to AbortSignal.`); + reject(signal.reason); + }); + + this.#processQueue(); + }); + + return promise; + } + + /** + * Adds a new retry job to the queue. + * @template {(...args: unknown[]) => Promise} Func + * @template {Awaited>} RetVal + * @param {Func} fn The function to call. + * @param {object} [options] The options for the job. + * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. + * @returns {Promise} A promise that resolves when the queue is processed. + */ + retry(fn, { signal } = {}) { + + signal?.throwIfAborted(); + + const { promise, resolve, reject } = createPromise(); + + this.#pending.push(() => this.#call(fn, { signal, promise, resolve, reject })); + this.#processPending(); + + return promise; + } + + + /** + * Processes the pending queue and the retry queue. + * @returns {void} + */ + #processAll() { + if (this.pending) { + this.#processPending(); + } + + if (this.retrying) { + this.#processQueue(); + } + } + + /** + * Processes the pending queue to see which tasks can be started. + * @returns {void} + */ + #processPending() { + + debug(`Processing pending tasks: ${this.pending} pending, ${this.working} working.`); + + const available = this.#concurrency - this.working; + + if (available <= 0) { + return; + } + + const count = Math.min(this.pending, available); + + for (let i = 0; i < count; i++) { + const task = this.#pending.shift(); + task?.(); + } + + debug(`Processed pending tasks: ${this.pending} pending, ${this.working} working.`); + } + + /** + * Processes the queue. + * @returns {void} + */ + #processQueue() { + // clear any timer because we're going to check right now + clearTimeout(this.#timerId); + this.#timerId = undefined; + + debug(`Processing retry queue: ${this.retrying} retrying, ${this.working} working.`); + + const processAgain = () => { + this.#timerId = setTimeout(() => this.#processAll(), 0); + }; + + // if there's nothing in the queue, we're done + const task = this.#retrying.shift(); + if (!task) { + debug("Queue is empty, exiting."); + + if (this.pending) { + processAgain(); + } + return; + } + + // if it's time to bail, then bail + if (isTimeToBail(task, this.#timeout)) { + debug(`Task ${task.id} was abandoned due to timeout.`); + task.reject(task.error); + processAgain(); + return; + } + + // if it's not time to retry, then wait and try again + if (!isTimeToRetry(task, this.#maxDelay)) { + debug(`Task ${task.id} is not ready to retry, skipping.`); + this.#retrying.push(task); + processAgain(); + return; + } + + // otherwise, try again + task.lastAttempt = Date.now(); + + // Promise.resolve needed in case it's a thenable but not a Promise + Promise.resolve(task.fn()) + // @ts-ignore because we know it's any + .then(result => { + debug(`Task ${task.id} succeeded after ${task.age}ms.`); + task.resolve(result); + }) + + // @ts-ignore because we know it's any + .catch(error => { + if (!this.#check(error)) { + debug(`Task ${task.id} failed with non-retryable error: ${error.message}.`); + task.reject(error); + return; + } + + // update the task timestamp and push to back of queue to try again + task.lastAttempt = Date.now(); + this.#retrying.push(task); + debug(`Task ${task.id} failed, requeueing to try again.`); + }) + .finally(() => { + this.#processAll(); + }); + } +} + +export { Retrier }; diff --git a/slider/node_modules/@humanwhocodes/retry/dist/retrier.min.js b/slider/node_modules/@humanwhocodes/retry/dist/retrier.min.js new file mode 100644 index 0000000..ac9ed35 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/retry/dist/retrier.min.js @@ -0,0 +1 @@ +function e(e){"@hwc/retry"===globalThis?.process?.env.DEBUG&&console.debug(e)}class RetryTask{id=Math.random().toString(36).slice(2);fn;error;timestamp=Date.now();lastAttempt=this.timestamp;resolve;reject;signal;constructor(e,t,r,i,s){this.fn=e,this.error=t,this.timestamp=Date.now(),this.lastAttempt=Date.now(),this.resolve=r,this.reject=i,this.signal=s}get age(){return Date.now()-this.timestamp}}class Retrier{#e=[];#t=[];#r=0;#i;#s;#n;#o;#c;constructor(e,{timeout:t=6e4,maxDelay:r=100,concurrency:i=1e3}={}){if("function"!=typeof e)throw new Error("Missing function to check errors");this.#o=e,this.#i=t,this.#s=r,this.#c=i}get retrying(){return this.#e.length}get pending(){return this.#t.length}get working(){return this.#r}#a(t,{signal:r,promise:i,resolve:s,reject:n}){let o;try{o=t()}catch(e){return n(new Error(`Synchronous error: ${e.message}`,{cause:e})),i}return o&&"function"==typeof o.then?(this.#r++,i.finally((()=>{this.#r--,this.#h()})).catch((()=>{})),Promise.resolve(o).then((t=>{e("Function called successfully without retry."),s(t)})).catch((i=>{if(!this.#o(i))return void n(i);const o=new RetryTask(t,i,s,n,r);e(`Function failed, queuing for retry with task ${o.id}.`),this.#e.push(o),r?.addEventListener("abort",(()=>{e(`Task ${o.id} was aborted due to AbortSignal.`),n(r.reason)})),this.#g()})),i):(n(new Error("Result is not a promise.")),i)}retry(e,{signal:t}={}){t?.throwIfAborted();const{promise:r,resolve:i,reject:s}=function(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;const r=new Promise(((r,i)=>{e=r,t=i}));if(void 0===e||void 0===t)throw new Error("Promise executor did not initialize resolve or reject.");return{promise:r,resolve:e,reject:t}}();return this.#t.push((()=>this.#a(e,{signal:t,promise:r,resolve:i,reject:s}))),this.#h(),r}#u(){this.pending&&this.#h(),this.retrying&&this.#g()}#h(){e(`Processing pending tasks: ${this.pending} pending, ${this.working} working.`);const t=this.#c-this.working;if(t<=0)return;const r=Math.min(this.pending,t);for(let e=0;e{this.#n=setTimeout((()=>this.#u()),0)},r=this.#e.shift();return r?function(e,t){return e.age>t}(r,this.#i)?(e(`Task ${r.id} was abandoned due to timeout.`),r.reject(r.error),void t()):function(e,t){const r=Date.now()-e.lastAttempt,i=Math.max(e.lastAttempt-e.timestamp,1);return r>=Math.min(1.2*i,t)}(r,this.#s)?(r.lastAttempt=Date.now(),void Promise.resolve(r.fn()).then((t=>{e(`Task ${r.id} succeeded after ${r.age}ms.`),r.resolve(t)})).catch((t=>{if(!this.#o(t))return e(`Task ${r.id} failed with non-retryable error: ${t.message}.`),void r.reject(t);r.lastAttempt=Date.now(),this.#e.push(r),e(`Task ${r.id} failed, requeueing to try again.`)})).finally((()=>{this.#u()}))):(e(`Task ${r.id} is not ready to retry, skipping.`),this.#e.push(r),void t()):(e("Queue is empty, exiting."),void(this.pending&&t()))}}export{Retrier}; diff --git a/slider/node_modules/@humanwhocodes/retry/dist/retrier.mjs b/slider/node_modules/@humanwhocodes/retry/dist/retrier.mjs new file mode 100644 index 0000000..fb05a37 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/retry/dist/retrier.mjs @@ -0,0 +1,476 @@ +/** + * @fileoverview A utility for retrying failed async method calls. + */ + +/* global setTimeout, clearTimeout */ + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +const MAX_TASK_TIMEOUT = 60000; +const MAX_TASK_DELAY = 100; +const MAX_CONCURRENCY = 1000; + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/** + * Logs a message to the console if the DEBUG environment variable is set. + * @param {string} message The message to log. + * @returns {void} + */ +function debug(message) { + if (globalThis?.process?.env.DEBUG === "@hwc/retry") { + console.debug(message); + } +} + +/* + * The following logic has been extracted from graceful-fs. + * + * The ISC License + * + * Copyright (c) 2011-2023 Isaac Z. Schlueter, Ben Noordhuis, and Contributors + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * Checks if it is time to retry a task based on the timestamp and last attempt time. + * @param {RetryTask} task The task to check. + * @param {number} maxDelay The maximum delay for the queue. + * @returns {boolean} true if it is time to retry, false otherwise. + */ +function isTimeToRetry(task, maxDelay) { + const timeSinceLastAttempt = Date.now() - task.lastAttempt; + const timeSinceStart = Math.max(task.lastAttempt - task.timestamp, 1); + const desiredDelay = Math.min(timeSinceStart * 1.2, maxDelay); + + return timeSinceLastAttempt >= desiredDelay; +} + +/** + * Checks if it is time to bail out based on the given timestamp. + * @param {RetryTask} task The task to check. + * @param {number} timeout The timeout for the queue. + * @returns {boolean} true if it is time to bail, false otherwise. + */ +function isTimeToBail(task, timeout) { + return task.age > timeout; +} + +/** + * Creates a new promise with resolve and reject functions. + * @returns {{promise:Promise, resolve:(value:any) => any, reject: (value:any) => any}} A new promise. + */ +function createPromise() { + if (Promise.withResolvers) { + return Promise.withResolvers(); + } + + let resolve, reject; + + const promise = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + + if (resolve === undefined || reject === undefined) { + throw new Error("Promise executor did not initialize resolve or reject."); + } + + return { promise, resolve, reject }; +} + + +/** + * A class to represent a task in the retry queue. + */ +class RetryTask { + + /** + * The unique ID for the task. + * @type {string} + */ + id = Math.random().toString(36).slice(2); + + /** + * The function to call. + * @type {Function} + */ + fn; + + /** + * The error that was thrown. + * @type {Error} + */ + error; + + /** + * The timestamp of the task. + * @type {number} + */ + timestamp = Date.now(); + + /** + * The timestamp of the last attempt. + * @type {number} + */ + lastAttempt = this.timestamp; + + /** + * The resolve function for the promise. + * @type {Function} + */ + resolve; + + /** + * The reject function for the promise. + * @type {Function} + */ + reject; + + /** + * The AbortSignal to monitor for cancellation. + * @type {AbortSignal|undefined} + */ + signal; + + /** + * Creates a new instance. + * @param {Function} fn The function to call. + * @param {Error} error The error that was thrown. + * @param {Function} resolve The resolve function for the promise. + * @param {Function} reject The reject function for the promise. + * @param {AbortSignal|undefined} signal The AbortSignal to monitor for cancellation. + */ + constructor(fn, error, resolve, reject, signal) { + this.fn = fn; + this.error = error; + this.timestamp = Date.now(); + this.lastAttempt = Date.now(); + this.resolve = resolve; + this.reject = reject; + this.signal = signal; + } + + /** + * Gets the age of the task. + * @returns {number} The age of the task in milliseconds. + * @readonly + */ + get age() { + return Date.now() - this.timestamp; + } +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * A class that manages a queue of retry jobs. + */ +class Retrier { + + /** + * Represents the queue for processing tasks. + * @type {Array} + */ + #retrying = []; + + /** + * Represents the queue for pending tasks. + * @type {Array} + */ + #pending = []; + + /** + * The number of tasks currently being processed. + * @type {number} + */ + #working = 0; + + /** + * The timeout for the queue. + * @type {number} + */ + #timeout; + + /** + * The maximum delay for the queue. + * @type {number} + */ + #maxDelay; + + /** + * The setTimeout() timer ID. + * @type {NodeJS.Timeout|undefined} + */ + #timerId; + + /** + * The function to call. + * @type {Function} + */ + #check; + + /** + * The maximum number of concurrent tasks. + * @type {number} + */ + #concurrency; + + /** + * Creates a new instance. + * @param {Function} check The function to call. + * @param {object} [options] The options for the instance. + * @param {number} [options.timeout] The timeout for the queue. + * @param {number} [options.maxDelay] The maximum delay for the queue. + * @param {number} [options.concurrency] The maximum number of concurrent tasks. + */ + constructor(check, { timeout = MAX_TASK_TIMEOUT, maxDelay = MAX_TASK_DELAY, concurrency = MAX_CONCURRENCY } = {}) { + + if (typeof check !== "function") { + throw new Error("Missing function to check errors"); + } + + this.#check = check; + this.#timeout = timeout; + this.#maxDelay = maxDelay; + this.#concurrency = concurrency; + } + + /** + * Gets the number of tasks waiting to be retried. + * @returns {number} The number of tasks in the retry queue. + */ + get retrying() { + return this.#retrying.length; + } + + /** + * Gets the number of tasks waiting to be processed in the pending queue. + * @returns {number} The number of tasks in the pending queue. + */ + get pending() { + return this.#pending.length; + } + + /** + * Gets the number of tasks currently being processed. + * @returns {number} The number of tasks currently being processed. + */ + get working() { + return this.#working; + } + + /** + * Calls the function and retries if it fails. + * @param {Function} fn The function to call. + * @param {Object} options The options for the job. + * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. + * @param {Promise} options.promise The promise to return when the function settles. + * @param {Function} options.resolve The resolve function for the promise. + * @param {Function} options.reject The reject function for the promise. + * @returns {Promise} A promise that resolves when the function is + * called successfully. + */ + #call(fn, { signal, promise, resolve, reject }) { + + let result; + + try { + result = fn(); + } catch (/** @type {any} */ error) { + reject(new Error(`Synchronous error: ${error.message}`, { cause: error })); + return promise; + } + + // if the result is not a promise then reject an error + if (!result || typeof result.then !== "function") { + reject(new Error("Result is not a promise.")); + return promise; + } + + this.#working++; + promise.finally(() => { + this.#working--; + this.#processPending(); + }) + // `promise.finally` creates a new promise that may be rejected, so it must be handled. + .catch(() => { }); + + // call the original function and catch any ENFILE or EMFILE errors + Promise.resolve(result) + .then(value => { + debug("Function called successfully without retry."); + resolve(value); + }) + .catch(error => { + if (!this.#check(error)) { + reject(error); + return; + } + + const task = new RetryTask(fn, error, resolve, reject, signal); + + debug(`Function failed, queuing for retry with task ${task.id}.`); + this.#retrying.push(task); + + signal?.addEventListener("abort", () => { + debug(`Task ${task.id} was aborted due to AbortSignal.`); + reject(signal.reason); + }); + + this.#processQueue(); + }); + + return promise; + } + + /** + * Adds a new retry job to the queue. + * @template {(...args: unknown[]) => Promise} Func + * @template {Awaited>} RetVal + * @param {Func} fn The function to call. + * @param {object} [options] The options for the job. + * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. + * @returns {Promise} A promise that resolves when the queue is processed. + */ + retry(fn, { signal } = {}) { + + signal?.throwIfAborted(); + + const { promise, resolve, reject } = createPromise(); + + this.#pending.push(() => this.#call(fn, { signal, promise, resolve, reject })); + this.#processPending(); + + return promise; + } + + + /** + * Processes the pending queue and the retry queue. + * @returns {void} + */ + #processAll() { + if (this.pending) { + this.#processPending(); + } + + if (this.retrying) { + this.#processQueue(); + } + } + + /** + * Processes the pending queue to see which tasks can be started. + * @returns {void} + */ + #processPending() { + + debug(`Processing pending tasks: ${this.pending} pending, ${this.working} working.`); + + const available = this.#concurrency - this.working; + + if (available <= 0) { + return; + } + + const count = Math.min(this.pending, available); + + for (let i = 0; i < count; i++) { + const task = this.#pending.shift(); + task?.(); + } + + debug(`Processed pending tasks: ${this.pending} pending, ${this.working} working.`); + } + + /** + * Processes the queue. + * @returns {void} + */ + #processQueue() { + // clear any timer because we're going to check right now + clearTimeout(this.#timerId); + this.#timerId = undefined; + + debug(`Processing retry queue: ${this.retrying} retrying, ${this.working} working.`); + + const processAgain = () => { + this.#timerId = setTimeout(() => this.#processAll(), 0); + }; + + // if there's nothing in the queue, we're done + const task = this.#retrying.shift(); + if (!task) { + debug("Queue is empty, exiting."); + + if (this.pending) { + processAgain(); + } + return; + } + + // if it's time to bail, then bail + if (isTimeToBail(task, this.#timeout)) { + debug(`Task ${task.id} was abandoned due to timeout.`); + task.reject(task.error); + processAgain(); + return; + } + + // if it's not time to retry, then wait and try again + if (!isTimeToRetry(task, this.#maxDelay)) { + debug(`Task ${task.id} is not ready to retry, skipping.`); + this.#retrying.push(task); + processAgain(); + return; + } + + // otherwise, try again + task.lastAttempt = Date.now(); + + // Promise.resolve needed in case it's a thenable but not a Promise + Promise.resolve(task.fn()) + // @ts-ignore because we know it's any + .then(result => { + debug(`Task ${task.id} succeeded after ${task.age}ms.`); + task.resolve(result); + }) + + // @ts-ignore because we know it's any + .catch(error => { + if (!this.#check(error)) { + debug(`Task ${task.id} failed with non-retryable error: ${error.message}.`); + task.reject(error); + return; + } + + // update the task timestamp and push to back of queue to try again + task.lastAttempt = Date.now(); + this.#retrying.push(task); + debug(`Task ${task.id} failed, requeueing to try again.`); + }) + .finally(() => { + this.#processAll(); + }); + } +} + +export { Retrier }; diff --git a/slider/node_modules/@humanwhocodes/retry/package.json b/slider/node_modules/@humanwhocodes/retry/package.json new file mode 100644 index 0000000..18d1c96 --- /dev/null +++ b/slider/node_modules/@humanwhocodes/retry/package.json @@ -0,0 +1,77 @@ +{ + "name": "@humanwhocodes/retry", + "version": "0.4.3", + "description": "A utility to retry failed async methods.", + "type": "module", + "main": "dist/retrier.cjs", + "module": "dist/retrier.js", + "types": "dist/retrier.d.ts", + "exports": { + "require": { + "types": "./dist/retrier.d.cts", + "default": "./dist/retrier.cjs" + }, + "import": { + "types": "./dist/retrier.d.ts", + "default": "./dist/retrier.js" + } + }, + "files": [ + "dist" + ], + "engines": { + "node": ">=18.18" + }, + "publishConfig": { + "access": "public" + }, + "gitHooks": { + "pre-commit": "lint-staged" + }, + "lint-staged": { + "*.js": [ + "eslint --fix" + ] + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + }, + "scripts": { + "build:cts-types": "node -e \"fs.copyFileSync('dist/retrier.d.ts', 'dist/retrier.d.cts')\"", + "build": "rollup -c && tsc && npm run build:cts-types", + "prepare": "npm run build", + "lint": "eslint src/ tests/", + "pretest": "npm run build", + "test:unit": "mocha tests/retrier.test.js", + "test:build": "node tests/pkg.test.cjs && node tests/pkg.test.mjs", + "test:jsr": "npx jsr@latest publish --dry-run", + "test:emfile": "node tools/check-emfile-handling.js", + "test": "npm run test:unit && npm run test:build" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/humanwhocodes/retry.git" + }, + "keywords": [ + "nodejs", + "retry", + "async", + "promises" + ], + "author": "Nicholas C. Zaks", + "license": "Apache-2.0", + "devDependencies": { + "@eslint/js": "^8.49.0", + "@rollup/plugin-terser": "0.4.4", + "@tsconfig/node16": "^16.1.1", + "@types/mocha": "^10.0.3", + "@types/node": "20.12.6", + "eslint": "^8.21.0", + "lint-staged": "15.2.1", + "mocha": "^10.3.0", + "rollup": "3.29.4", + "typescript": "5.4.4", + "yorkie": "2.0.0" + } +} diff --git a/slider/node_modules/@nodelib/fs.scandir/LICENSE b/slider/node_modules/@nodelib/fs.scandir/LICENSE new file mode 100644 index 0000000..0c47f21 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Denis Malinochkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@nodelib/fs.scandir/README.md b/slider/node_modules/@nodelib/fs.scandir/README.md new file mode 100644 index 0000000..544e6c0 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/README.md @@ -0,0 +1,171 @@ +# @nodelib/fs.scandir + +> List files and directories inside the specified directory. + +## :bulb: Highlights + +The package is aimed at obtaining information about entries in the directory. + +* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional). +* :gear: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type. See [`old` and `modern` mode](#old-and-modern-mode). +* :link: Can safely work with broken symbolic links. + +## Install + +```console +npm install @nodelib/fs.scandir +``` + +## Usage + +```ts +import * as fsScandir from '@nodelib/fs.scandir'; + +fsScandir.scandir('path', (error, stats) => { /* … */ }); +``` + +## API + +### .scandir(path, [optionsOrSettings], callback) + +Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path with standard callback-style. + +```ts +fsScandir.scandir('path', (error, entries) => { /* … */ }); +fsScandir.scandir('path', {}, (error, entries) => { /* … */ }); +fsScandir.scandir('path', new fsScandir.Settings(), (error, entries) => { /* … */ }); +``` + +### .scandirSync(path, [optionsOrSettings]) + +Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path. + +```ts +const entries = fsScandir.scandirSync('path'); +const entries = fsScandir.scandirSync('path', {}); +const entries = fsScandir.scandirSync(('path', new fsScandir.Settings()); +``` + +#### path + +* Required: `true` +* Type: `string | Buffer | URL` + +A path to a file. If a URL is provided, it must use the `file:` protocol. + +#### optionsOrSettings + +* Required: `false` +* Type: `Options | Settings` +* Default: An instance of `Settings` class + +An [`Options`](#options) object or an instance of [`Settings`](#settingsoptions) class. + +> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. + +### Settings([options]) + +A class of full settings of the package. + +```ts +const settings = new fsScandir.Settings({ followSymbolicLinks: false }); + +const entries = fsScandir.scandirSync('path', settings); +``` + +## Entry + +* `name` — The name of the entry (`unknown.txt`). +* `path` — The path of the entry relative to call directory (`root/unknown.txt`). +* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. On Node.js below 10.10 will be emulated by [`DirentFromStats`](./src/utils/fs.ts) class. +* `stats` (optional) — An instance of `fs.Stats` class. + +For example, the `scandir` call for `tools` directory with one directory inside: + +```ts +{ + dirent: Dirent { name: 'typedoc', /* … */ }, + name: 'typedoc', + path: 'tools/typedoc' +} +``` + +## Options + +### stats + +* Type: `boolean` +* Default: `false` + +Adds an instance of `fs.Stats` class to the [`Entry`](#entry). + +> :book: Always use `fs.readdir` without the `withFileTypes` option. ??TODO?? + +### followSymbolicLinks + +* Type: `boolean` +* Default: `false` + +Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`. + +### `throwErrorOnBrokenSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Throw an error when symbolic link is broken if `true` or safely use `lstat` call if `false`. + +### `pathSegmentSeparator` + +* Type: `string` +* Default: `path.sep` + +By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead. + +### `fs` + +* Type: [`FileSystemAdapter`](./src/adapters/fs.ts) +* Default: A default FS methods + +By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. + +```ts +interface FileSystemAdapter { + lstat?: typeof fs.lstat; + stat?: typeof fs.stat; + lstatSync?: typeof fs.lstatSync; + statSync?: typeof fs.statSync; + readdir?: typeof fs.readdir; + readdirSync?: typeof fs.readdirSync; +} + +const settings = new fsScandir.Settings({ + fs: { lstat: fakeLstat } +}); +``` + +## `old` and `modern` mode + +This package has two modes that are used depending on the environment and parameters of use. + +### old + +* Node.js below `10.10` or when the `stats` option is enabled + +When working in the old mode, the directory is read first (`fs.readdir`), then the type of entries is determined (`fs.lstat` and/or `fs.stat` for symbolic links). + +### modern + +* Node.js 10.10+ and the `stats` option is disabled + +In the modern mode, reading the directory (`fs.readdir` with the `withFileTypes` option) is combined with obtaining information about its entries. An additional call for symbolic links (`fs.stat`) is still present. + +This mode makes fewer calls to the file system. It's faster. + +## Changelog + +See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. + +## License + +This software is released under the terms of the MIT license. diff --git a/slider/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts b/slider/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts new file mode 100644 index 0000000..b29d217 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts @@ -0,0 +1,20 @@ +import type * as fsStat from '@nodelib/fs.stat'; +import type { Dirent, ErrnoException } from '../types'; +export interface ReaddirAsynchronousMethod { + (filepath: string, options: { + withFileTypes: true; + }, callback: (error: ErrnoException | null, files: Dirent[]) => void): void; + (filepath: string, callback: (error: ErrnoException | null, files: string[]) => void): void; +} +export interface ReaddirSynchronousMethod { + (filepath: string, options: { + withFileTypes: true; + }): Dirent[]; + (filepath: string): string[]; +} +export declare type FileSystemAdapter = fsStat.FileSystemAdapter & { + readdir: ReaddirAsynchronousMethod; + readdirSync: ReaddirSynchronousMethod; +}; +export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter; +export declare function createFileSystemAdapter(fsMethods?: Partial): FileSystemAdapter; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/adapters/fs.js b/slider/node_modules/@nodelib/fs.scandir/out/adapters/fs.js new file mode 100644 index 0000000..695e75b --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/adapters/fs.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; +const fs = require("fs"); +exports.FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + stat: fs.stat, + lstatSync: fs.lstatSync, + statSync: fs.statSync, + readdir: fs.readdir, + readdirSync: fs.readdirSync +}; +function createFileSystemAdapter(fsMethods) { + if (fsMethods === undefined) { + return exports.FILE_SYSTEM_ADAPTER; + } + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); +} +exports.createFileSystemAdapter = createFileSystemAdapter; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/constants.d.ts b/slider/node_modules/@nodelib/fs.scandir/out/constants.d.ts new file mode 100644 index 0000000..afe206e --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/constants.d.ts @@ -0,0 +1,4 @@ +/** + * IS `true` for Node.js 10.10 and greater. + */ +export declare const IS_SUPPORT_READDIR_WITH_FILE_TYPES: boolean; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/constants.js b/slider/node_modules/@nodelib/fs.scandir/out/constants.js new file mode 100644 index 0000000..ab56d34 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/constants.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; +const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.'); +if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) { + throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); +} +const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); +const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); +const SUPPORTED_MAJOR_VERSION = 10; +const SUPPORTED_MINOR_VERSION = 10; +const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; +const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; +/** + * IS `true` for Node.js 10.10 and greater. + */ +exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/index.d.ts b/slider/node_modules/@nodelib/fs.scandir/out/index.d.ts new file mode 100644 index 0000000..9111e1f --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/index.d.ts @@ -0,0 +1,12 @@ +import type { FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod } from './adapters/fs'; +import * as async from './providers/async'; +import Settings, { Options } from './settings'; +import type { Dirent, Entry } from './types'; +declare type AsyncCallback = async.AsyncCallback; +declare function scandir(path: string, callback: AsyncCallback): void; +declare function scandir(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; +declare namespace scandir { + function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise; +} +declare function scandirSync(path: string, optionsOrSettings?: Options | Settings): Entry[]; +export { scandir, scandirSync, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod, Options }; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/index.js b/slider/node_modules/@nodelib/fs.scandir/out/index.js new file mode 100644 index 0000000..b3b7580 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/index.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Settings = exports.scandirSync = exports.scandir = void 0; +const async = require("./providers/async"); +const sync = require("./providers/sync"); +const settings_1 = require("./settings"); +exports.Settings = settings_1.default; +function scandir(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === 'function') { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); +} +exports.scandir = scandir; +function scandirSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); +} +exports.scandirSync = scandirSync; +function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); +} diff --git a/slider/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts b/slider/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts new file mode 100644 index 0000000..4eebc36 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts @@ -0,0 +1,7 @@ +/// +import type Settings from '../settings'; +import type { Entry } from '../types'; +export declare type AsyncCallback = (error: NodeJS.ErrnoException, entries: Entry[]) => void; +export declare function read(directory: string, settings: Settings, callback: AsyncCallback): void; +export declare function readdirWithFileTypes(directory: string, settings: Settings, callback: AsyncCallback): void; +export declare function readdir(directory: string, settings: Settings, callback: AsyncCallback): void; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/providers/async.js b/slider/node_modules/@nodelib/fs.scandir/out/providers/async.js new file mode 100644 index 0000000..e39e097 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/providers/async.js @@ -0,0 +1,104 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; +const fsStat = require("@nodelib/fs.stat"); +const rpl = require("run-parallel"); +const constants_1 = require("../constants"); +const utils = require("../utils"); +const common = require("./common"); +function read(directory, settings, callback) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + readdirWithFileTypes(directory, settings, callback); + return; + } + readdir(directory, settings, callback); +} +exports.read = read; +function readdirWithFileTypes(directory, settings, callback) { + settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const entries = dirents.map((dirent) => ({ + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + })); + if (!settings.followSymbolicLinks) { + callSuccessCallback(callback, entries); + return; + } + const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); + rpl(tasks, (rplError, rplEntries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, rplEntries); + }); + }); +} +exports.readdirWithFileTypes = readdirWithFileTypes; +function makeRplTaskEntry(entry, settings) { + return (done) => { + if (!entry.dirent.isSymbolicLink()) { + done(null, entry); + return; + } + settings.fs.stat(entry.path, (statError, stats) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + done(statError); + return; + } + done(null, entry); + return; + } + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + done(null, entry); + }); + }; +} +function readdir(directory, settings, callback) { + settings.fs.readdir(directory, (readdirError, names) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const tasks = names.map((name) => { + const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + return (done) => { + fsStat.stat(path, settings.fsStatSettings, (error, stats) => { + if (error !== null) { + done(error); + return; + } + const entry = { + name, + path, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) { + entry.stats = stats; + } + done(null, entry); + }); + }; + }); + rpl(tasks, (rplError, entries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, entries); + }); + }); +} +exports.readdir = readdir; +function callFailureCallback(callback, error) { + callback(error); +} +function callSuccessCallback(callback, result) { + callback(null, result); +} diff --git a/slider/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts b/slider/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts new file mode 100644 index 0000000..c2f9829 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts @@ -0,0 +1 @@ +export declare function joinPathSegments(a: string, b: string, separator: string): string; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/providers/common.js b/slider/node_modules/@nodelib/fs.scandir/out/providers/common.js new file mode 100644 index 0000000..73f3a96 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/providers/common.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.joinPathSegments = void 0; +function joinPathSegments(a, b, separator) { + /** + * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). + */ + if (a.endsWith(separator)) { + return a + b; + } + return a + separator + b; +} +exports.joinPathSegments = joinPathSegments; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts b/slider/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts new file mode 100644 index 0000000..c073775 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts @@ -0,0 +1,5 @@ +import type Settings from '../settings'; +import type { Entry } from '../types'; +export declare function read(directory: string, settings: Settings): Entry[]; +export declare function readdirWithFileTypes(directory: string, settings: Settings): Entry[]; +export declare function readdir(directory: string, settings: Settings): Entry[]; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/providers/sync.js b/slider/node_modules/@nodelib/fs.scandir/out/providers/sync.js new file mode 100644 index 0000000..622659e --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/providers/sync.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; +const fsStat = require("@nodelib/fs.stat"); +const constants_1 = require("../constants"); +const utils = require("../utils"); +const common = require("./common"); +function read(directory, settings) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + return readdirWithFileTypes(directory, settings); + } + return readdir(directory, settings); +} +exports.read = read; +function readdirWithFileTypes(directory, settings) { + const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); + return dirents.map((dirent) => { + const entry = { + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + }; + if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { + try { + const stats = settings.fs.statSync(entry.path); + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + } + catch (error) { + if (settings.throwErrorOnBrokenSymbolicLink) { + throw error; + } + } + } + return entry; + }); +} +exports.readdirWithFileTypes = readdirWithFileTypes; +function readdir(directory, settings) { + const names = settings.fs.readdirSync(directory); + return names.map((name) => { + const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const stats = fsStat.statSync(entryPath, settings.fsStatSettings); + const entry = { + name, + path: entryPath, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) { + entry.stats = stats; + } + return entry; + }); +} +exports.readdir = readdir; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/settings.d.ts b/slider/node_modules/@nodelib/fs.scandir/out/settings.d.ts new file mode 100644 index 0000000..b6d5b37 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/settings.d.ts @@ -0,0 +1,20 @@ +import * as fsStat from '@nodelib/fs.stat'; +import * as fs from './adapters/fs'; +export interface Options { + followSymbolicLinks?: boolean; + fs?: Partial; + pathSegmentSeparator?: string; + stats?: boolean; + throwErrorOnBrokenSymbolicLink?: boolean; +} +export default class Settings { + private readonly _options; + readonly followSymbolicLinks: boolean; + readonly fs: fs.FileSystemAdapter; + readonly pathSegmentSeparator: string; + readonly stats: boolean; + readonly throwErrorOnBrokenSymbolicLink: boolean; + readonly fsStatSettings: fsStat.Settings; + constructor(_options?: Options); + private _getValue; +} diff --git a/slider/node_modules/@nodelib/fs.scandir/out/settings.js b/slider/node_modules/@nodelib/fs.scandir/out/settings.js new file mode 100644 index 0000000..f266349 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/settings.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const fsStat = require("@nodelib/fs.stat"); +const fs = require("./adapters/fs"); +class Settings { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); + this.stats = this._getValue(this._options.stats, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + this.fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this.followSymbolicLinks, + fs: this.fs, + throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } +} +exports.default = Settings; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/types/index.d.ts b/slider/node_modules/@nodelib/fs.scandir/out/types/index.d.ts new file mode 100644 index 0000000..1bfcb96 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/types/index.d.ts @@ -0,0 +1,20 @@ +/// +import type * as fs from 'fs'; +export interface Entry { + dirent: Dirent; + name: string; + path: string; + stats?: Stats; +} +export declare type Stats = fs.Stats; +export declare type ErrnoException = NodeJS.ErrnoException; +export interface Dirent { + isBlockDevice: () => boolean; + isCharacterDevice: () => boolean; + isDirectory: () => boolean; + isFIFO: () => boolean; + isFile: () => boolean; + isSocket: () => boolean; + isSymbolicLink: () => boolean; + name: string; +} diff --git a/slider/node_modules/@nodelib/fs.scandir/out/types/index.js b/slider/node_modules/@nodelib/fs.scandir/out/types/index.js new file mode 100644 index 0000000..fabb051 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/types/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts b/slider/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts new file mode 100644 index 0000000..74c006b --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts @@ -0,0 +1,2 @@ +import type { Dirent, Stats } from '../types'; +export declare function createDirentFromStats(name: string, stats: Stats): Dirent; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/utils/fs.js b/slider/node_modules/@nodelib/fs.scandir/out/utils/fs.js new file mode 100644 index 0000000..41ac3b9 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/utils/fs.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDirentFromStats = void 0; +class DirentFromStats { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } +} +function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); +} +exports.createDirentFromStats = createDirentFromStats; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts b/slider/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts new file mode 100644 index 0000000..8233ab8 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts @@ -0,0 +1,2 @@ +import * as fs from './fs'; +export { fs }; diff --git a/slider/node_modules/@nodelib/fs.scandir/out/utils/index.js b/slider/node_modules/@nodelib/fs.scandir/out/utils/index.js new file mode 100644 index 0000000..2948bfe --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/out/utils/index.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fs = void 0; +const fs = require("./fs"); +exports.fs = fs; diff --git a/slider/node_modules/@nodelib/fs.scandir/package.json b/slider/node_modules/@nodelib/fs.scandir/package.json new file mode 100644 index 0000000..c1a4559 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.scandir/package.json @@ -0,0 +1,44 @@ +{ + "name": "@nodelib/fs.scandir", + "version": "2.1.5", + "description": "List files and directories inside the specified directory", + "license": "MIT", + "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir", + "keywords": [ + "NodeLib", + "fs", + "FileSystem", + "file system", + "scandir", + "readdir", + "dirent" + ], + "engines": { + "node": ">= 8" + }, + "files": [ + "out/**", + "!out/**/*.map", + "!out/**/*.spec.*" + ], + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "clean": "rimraf {tsconfig.tsbuildinfo,out}", + "lint": "eslint \"src/**/*.ts\" --cache", + "compile": "tsc -b .", + "compile:watch": "tsc -p . --watch --sourceMap", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "build": "npm run clean && npm run compile && npm run lint && npm test", + "watch": "npm run clean && npm run compile:watch" + }, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "devDependencies": { + "@nodelib/fs.macchiato": "1.0.4", + "@types/run-parallel": "^1.1.0" + }, + "gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562" +} diff --git a/slider/node_modules/@nodelib/fs.stat/LICENSE b/slider/node_modules/@nodelib/fs.stat/LICENSE new file mode 100644 index 0000000..0c47f21 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Denis Malinochkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@nodelib/fs.stat/README.md b/slider/node_modules/@nodelib/fs.stat/README.md new file mode 100644 index 0000000..720ac89 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/README.md @@ -0,0 +1,126 @@ +# @nodelib/fs.stat + +> Get the status of a file with some features. + +## :bulb: Highlights + +Wrapper around standard method `fs.lstat` and `fs.stat` with some features. + +* :beginner: Normally follows symbolic link. +* :gear: Can safely work with broken symbolic link. + +## Install + +```console +npm install @nodelib/fs.stat +``` + +## Usage + +```ts +import * as fsStat from '@nodelib/fs.stat'; + +fsStat.stat('path', (error, stats) => { /* … */ }); +``` + +## API + +### .stat(path, [optionsOrSettings], callback) + +Returns an instance of `fs.Stats` class for provided path with standard callback-style. + +```ts +fsStat.stat('path', (error, stats) => { /* … */ }); +fsStat.stat('path', {}, (error, stats) => { /* … */ }); +fsStat.stat('path', new fsStat.Settings(), (error, stats) => { /* … */ }); +``` + +### .statSync(path, [optionsOrSettings]) + +Returns an instance of `fs.Stats` class for provided path. + +```ts +const stats = fsStat.stat('path'); +const stats = fsStat.stat('path', {}); +const stats = fsStat.stat('path', new fsStat.Settings()); +``` + +#### path + +* Required: `true` +* Type: `string | Buffer | URL` + +A path to a file. If a URL is provided, it must use the `file:` protocol. + +#### optionsOrSettings + +* Required: `false` +* Type: `Options | Settings` +* Default: An instance of `Settings` class + +An [`Options`](#options) object or an instance of [`Settings`](#settings) class. + +> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. + +### Settings([options]) + +A class of full settings of the package. + +```ts +const settings = new fsStat.Settings({ followSymbolicLink: false }); + +const stats = fsStat.stat('path', settings); +``` + +## Options + +### `followSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Follow symbolic link or not. Call `fs.stat` on symbolic link if `true`. + +### `markSymbolicLink` + +* Type: `boolean` +* Default: `false` + +Mark symbolic link by setting the return value of `isSymbolicLink` function to always `true` (even after `fs.stat`). + +> :book: Can be used if you want to know what is hidden behind a symbolic link, but still continue to know that it is a symbolic link. + +### `throwErrorOnBrokenSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`. + +### `fs` + +* Type: [`FileSystemAdapter`](./src/adapters/fs.ts) +* Default: A default FS methods + +By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. + +```ts +interface FileSystemAdapter { + lstat?: typeof fs.lstat; + stat?: typeof fs.stat; + lstatSync?: typeof fs.lstatSync; + statSync?: typeof fs.statSync; +} + +const settings = new fsStat.Settings({ + fs: { lstat: fakeLstat } +}); +``` + +## Changelog + +See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. + +## License + +This software is released under the terms of the MIT license. diff --git a/slider/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts b/slider/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts new file mode 100644 index 0000000..03ac4cb --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts @@ -0,0 +1,13 @@ +/// +import * as fs from 'fs'; +import type { ErrnoException } from '../types'; +export declare type StatAsynchronousMethod = (path: string, callback: (error: ErrnoException | null, stats: fs.Stats) => void) => void; +export declare type StatSynchronousMethod = (path: string) => fs.Stats; +export interface FileSystemAdapter { + lstat: StatAsynchronousMethod; + stat: StatAsynchronousMethod; + lstatSync: StatSynchronousMethod; + statSync: StatSynchronousMethod; +} +export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter; +export declare function createFileSystemAdapter(fsMethods?: Partial): FileSystemAdapter; diff --git a/slider/node_modules/@nodelib/fs.stat/out/adapters/fs.js b/slider/node_modules/@nodelib/fs.stat/out/adapters/fs.js new file mode 100644 index 0000000..3794b23 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/out/adapters/fs.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; +const fs = require("fs"); +exports.FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + stat: fs.stat, + lstatSync: fs.lstatSync, + statSync: fs.statSync +}; +function createFileSystemAdapter(fsMethods) { + if (fsMethods === undefined) { + return exports.FILE_SYSTEM_ADAPTER; + } + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); +} +exports.createFileSystemAdapter = createFileSystemAdapter; diff --git a/slider/node_modules/@nodelib/fs.stat/out/index.d.ts b/slider/node_modules/@nodelib/fs.stat/out/index.d.ts new file mode 100644 index 0000000..8870556 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/out/index.d.ts @@ -0,0 +1,12 @@ +import type { FileSystemAdapter, StatAsynchronousMethod, StatSynchronousMethod } from './adapters/fs'; +import * as async from './providers/async'; +import Settings, { Options } from './settings'; +import type { Stats } from './types'; +declare type AsyncCallback = async.AsyncCallback; +declare function stat(path: string, callback: AsyncCallback): void; +declare function stat(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; +declare namespace stat { + function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise; +} +declare function statSync(path: string, optionsOrSettings?: Options | Settings): Stats; +export { Settings, stat, statSync, AsyncCallback, FileSystemAdapter, StatAsynchronousMethod, StatSynchronousMethod, Options, Stats }; diff --git a/slider/node_modules/@nodelib/fs.stat/out/index.js b/slider/node_modules/@nodelib/fs.stat/out/index.js new file mode 100644 index 0000000..bbb18b8 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/out/index.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.statSync = exports.stat = exports.Settings = void 0; +const async = require("./providers/async"); +const sync = require("./providers/sync"); +const settings_1 = require("./settings"); +exports.Settings = settings_1.default; +function stat(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === 'function') { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); +} +exports.stat = stat; +function statSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); +} +exports.statSync = statSync; +function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); +} diff --git a/slider/node_modules/@nodelib/fs.stat/out/providers/async.d.ts b/slider/node_modules/@nodelib/fs.stat/out/providers/async.d.ts new file mode 100644 index 0000000..96cf82b --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/out/providers/async.d.ts @@ -0,0 +1,4 @@ +import type Settings from '../settings'; +import type { ErrnoException, Stats } from '../types'; +export declare type AsyncCallback = (error: ErrnoException, stats: Stats) => void; +export declare function read(path: string, settings: Settings, callback: AsyncCallback): void; diff --git a/slider/node_modules/@nodelib/fs.stat/out/providers/async.js b/slider/node_modules/@nodelib/fs.stat/out/providers/async.js new file mode 100644 index 0000000..fa551e0 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/out/providers/async.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.read = void 0; +function read(path, settings, callback) { + settings.fs.lstat(path, (lstatError, lstat) => { + if (lstatError !== null) { + callFailureCallback(callback, lstatError); + return; + } + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + callSuccessCallback(callback, lstat); + return; + } + settings.fs.stat(path, (statError, stat) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + callFailureCallback(callback, statError); + return; + } + callSuccessCallback(callback, lstat); + return; + } + if (settings.markSymbolicLink) { + stat.isSymbolicLink = () => true; + } + callSuccessCallback(callback, stat); + }); + }); +} +exports.read = read; +function callFailureCallback(callback, error) { + callback(error); +} +function callSuccessCallback(callback, result) { + callback(null, result); +} diff --git a/slider/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts b/slider/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts new file mode 100644 index 0000000..22b047c --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts @@ -0,0 +1,3 @@ +import type Settings from '../settings'; +import type { Stats } from '../types'; +export declare function read(path: string, settings: Settings): Stats; diff --git a/slider/node_modules/@nodelib/fs.stat/out/providers/sync.js b/slider/node_modules/@nodelib/fs.stat/out/providers/sync.js new file mode 100644 index 0000000..af0361f --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/out/providers/sync.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.read = void 0; +function read(path, settings) { + const lstat = settings.fs.lstatSync(path); + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + return lstat; + } + try { + const stat = settings.fs.statSync(path); + if (settings.markSymbolicLink) { + stat.isSymbolicLink = () => true; + } + return stat; + } + catch (error) { + if (!settings.throwErrorOnBrokenSymbolicLink) { + return lstat; + } + throw error; + } +} +exports.read = read; diff --git a/slider/node_modules/@nodelib/fs.stat/out/settings.d.ts b/slider/node_modules/@nodelib/fs.stat/out/settings.d.ts new file mode 100644 index 0000000..8b86e7e --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/out/settings.d.ts @@ -0,0 +1,16 @@ +import * as fs from './adapters/fs'; +export interface Options { + followSymbolicLink?: boolean; + fs?: Partial; + markSymbolicLink?: boolean; + throwErrorOnBrokenSymbolicLink?: boolean; +} +export default class Settings { + private readonly _options; + readonly followSymbolicLink: boolean; + readonly fs: fs.FileSystemAdapter; + readonly markSymbolicLink: boolean; + readonly throwErrorOnBrokenSymbolicLink: boolean; + constructor(_options?: Options); + private _getValue; +} diff --git a/slider/node_modules/@nodelib/fs.stat/out/settings.js b/slider/node_modules/@nodelib/fs.stat/out/settings.js new file mode 100644 index 0000000..d9392c1 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/out/settings.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("./adapters/fs"); +class Settings { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } +} +exports.default = Settings; diff --git a/slider/node_modules/@nodelib/fs.stat/out/types/index.d.ts b/slider/node_modules/@nodelib/fs.stat/out/types/index.d.ts new file mode 100644 index 0000000..4d483e1 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/out/types/index.d.ts @@ -0,0 +1,4 @@ +/// +import type * as fs from 'fs'; +export declare type Stats = fs.Stats; +export declare type ErrnoException = NodeJS.ErrnoException; diff --git a/slider/node_modules/@nodelib/fs.stat/out/types/index.js b/slider/node_modules/@nodelib/fs.stat/out/types/index.js new file mode 100644 index 0000000..fabb051 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/out/types/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@nodelib/fs.stat/package.json b/slider/node_modules/@nodelib/fs.stat/package.json new file mode 100644 index 0000000..141280f --- /dev/null +++ b/slider/node_modules/@nodelib/fs.stat/package.json @@ -0,0 +1,37 @@ +{ + "name": "@nodelib/fs.stat", + "version": "2.0.5", + "description": "Get the status of a file with some features", + "license": "MIT", + "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat", + "keywords": [ + "NodeLib", + "fs", + "FileSystem", + "file system", + "stat" + ], + "engines": { + "node": ">= 8" + }, + "files": [ + "out/**", + "!out/**/*.map", + "!out/**/*.spec.*" + ], + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "clean": "rimraf {tsconfig.tsbuildinfo,out}", + "lint": "eslint \"src/**/*.ts\" --cache", + "compile": "tsc -b .", + "compile:watch": "tsc -p . --watch --sourceMap", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "build": "npm run clean && npm run compile && npm run lint && npm test", + "watch": "npm run clean && npm run compile:watch" + }, + "devDependencies": { + "@nodelib/fs.macchiato": "1.0.4" + }, + "gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562" +} diff --git a/slider/node_modules/@nodelib/fs.walk/LICENSE b/slider/node_modules/@nodelib/fs.walk/LICENSE new file mode 100644 index 0000000..0c47f21 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Denis Malinochkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@nodelib/fs.walk/README.md b/slider/node_modules/@nodelib/fs.walk/README.md new file mode 100644 index 0000000..0f1a8d2 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/README.md @@ -0,0 +1,215 @@ +# @nodelib/fs.walk + +> A library for efficiently walking a directory recursively. + +## :bulb: Highlights + +* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional). +* :rocket: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type for performance reasons. See [`old` and `modern` mode](https://github.com/nodelib/nodelib/blob/master/packages/fs/fs.scandir/README.md#old-and-modern-mode). +* :gear: Built-in directories/files and error filtering system. +* :link: Can safely work with broken symbolic links. + +## Install + +```console +npm install @nodelib/fs.walk +``` + +## Usage + +```ts +import * as fsWalk from '@nodelib/fs.walk'; + +fsWalk.walk('path', (error, entries) => { /* … */ }); +``` + +## API + +### .walk(path, [optionsOrSettings], callback) + +Reads the directory recursively and asynchronously. Requires a callback function. + +> :book: If you want to use the Promise API, use `util.promisify`. + +```ts +fsWalk.walk('path', (error, entries) => { /* … */ }); +fsWalk.walk('path', {}, (error, entries) => { /* … */ }); +fsWalk.walk('path', new fsWalk.Settings(), (error, entries) => { /* … */ }); +``` + +### .walkStream(path, [optionsOrSettings]) + +Reads the directory recursively and asynchronously. [Readable Stream](https://nodejs.org/dist/latest-v12.x/docs/api/stream.html#stream_readable_streams) is used as a provider. + +```ts +const stream = fsWalk.walkStream('path'); +const stream = fsWalk.walkStream('path', {}); +const stream = fsWalk.walkStream('path', new fsWalk.Settings()); +``` + +### .walkSync(path, [optionsOrSettings]) + +Reads the directory recursively and synchronously. Returns an array of entries. + +```ts +const entries = fsWalk.walkSync('path'); +const entries = fsWalk.walkSync('path', {}); +const entries = fsWalk.walkSync('path', new fsWalk.Settings()); +``` + +#### path + +* Required: `true` +* Type: `string | Buffer | URL` + +A path to a file. If a URL is provided, it must use the `file:` protocol. + +#### optionsOrSettings + +* Required: `false` +* Type: `Options | Settings` +* Default: An instance of `Settings` class + +An [`Options`](#options) object or an instance of [`Settings`](#settings) class. + +> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. + +### Settings([options]) + +A class of full settings of the package. + +```ts +const settings = new fsWalk.Settings({ followSymbolicLinks: true }); + +const entries = fsWalk.walkSync('path', settings); +``` + +## Entry + +* `name` — The name of the entry (`unknown.txt`). +* `path` — The path of the entry relative to call directory (`root/unknown.txt`). +* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. +* [`stats`] — An instance of `fs.Stats` class. + +## Options + +### basePath + +* Type: `string` +* Default: `undefined` + +By default, all paths are built relative to the root path. You can use this option to set custom root path. + +In the example below we read the files from the `root` directory, but in the results the root path will be `custom`. + +```ts +fsWalk.walkSync('root'); // → ['root/file.txt'] +fsWalk.walkSync('root', { basePath: 'custom' }); // → ['custom/file.txt'] +``` + +### concurrency + +* Type: `number` +* Default: `Infinity` + +The maximum number of concurrent calls to `fs.readdir`. + +> :book: The higher the number, the higher performance and the load on the File System. If you want to read in quiet mode, set the value to `4 * os.cpus().length` (4 is default size of [thread pool work scheduling](http://docs.libuv.org/en/v1.x/threadpool.html#thread-pool-work-scheduling)). + +### deepFilter + +* Type: [`DeepFilterFunction`](./src/settings.ts) +* Default: `undefined` + +A function that indicates whether the directory will be read deep or not. + +```ts +// Skip all directories that starts with `node_modules` +const filter: DeepFilterFunction = (entry) => !entry.path.startsWith('node_modules'); +``` + +### entryFilter + +* Type: [`EntryFilterFunction`](./src/settings.ts) +* Default: `undefined` + +A function that indicates whether the entry will be included to results or not. + +```ts +// Exclude all `.js` files from results +const filter: EntryFilterFunction = (entry) => !entry.name.endsWith('.js'); +``` + +### errorFilter + +* Type: [`ErrorFilterFunction`](./src/settings.ts) +* Default: `undefined` + +A function that allows you to skip errors that occur when reading directories. + +For example, you can skip `ENOENT` errors if required: + +```ts +// Skip all ENOENT errors +const filter: ErrorFilterFunction = (error) => error.code == 'ENOENT'; +``` + +### stats + +* Type: `boolean` +* Default: `false` + +Adds an instance of `fs.Stats` class to the [`Entry`](#entry). + +> :book: Always use `fs.readdir` with additional `fs.lstat/fs.stat` calls to determine the entry type. + +### followSymbolicLinks + +* Type: `boolean` +* Default: `false` + +Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`. + +### `throwErrorOnBrokenSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`. + +### `pathSegmentSeparator` + +* Type: `string` +* Default: `path.sep` + +By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead. + +### `fs` + +* Type: `FileSystemAdapter` +* Default: A default FS methods + +By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. + +```ts +interface FileSystemAdapter { + lstat: typeof fs.lstat; + stat: typeof fs.stat; + lstatSync: typeof fs.lstatSync; + statSync: typeof fs.statSync; + readdir: typeof fs.readdir; + readdirSync: typeof fs.readdirSync; +} + +const settings = new fsWalk.Settings({ + fs: { lstat: fakeLstat } +}); +``` + +## Changelog + +See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. + +## License + +This software is released under the terms of the MIT license. diff --git a/slider/node_modules/@nodelib/fs.walk/out/index.d.ts b/slider/node_modules/@nodelib/fs.walk/out/index.d.ts new file mode 100644 index 0000000..9a1e368 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/index.d.ts @@ -0,0 +1,14 @@ +/// +import type { Readable } from 'stream'; +import type { Dirent, FileSystemAdapter } from '@nodelib/fs.scandir'; +import { AsyncCallback } from './providers/async'; +import Settings, { DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction, Options } from './settings'; +import type { Entry } from './types'; +declare function walk(directory: string, callback: AsyncCallback): void; +declare function walk(directory: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; +declare namespace walk { + function __promisify__(directory: string, optionsOrSettings?: Options | Settings): Promise; +} +declare function walkSync(directory: string, optionsOrSettings?: Options | Settings): Entry[]; +declare function walkStream(directory: string, optionsOrSettings?: Options | Settings): Readable; +export { walk, walkSync, walkStream, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, Options, DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction }; diff --git a/slider/node_modules/@nodelib/fs.walk/out/index.js b/slider/node_modules/@nodelib/fs.walk/out/index.js new file mode 100644 index 0000000..b30e61f --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/index.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; +const async_1 = require("./providers/async"); +const stream_1 = require("./providers/stream"); +const sync_1 = require("./providers/sync"); +const settings_1 = require("./settings"); +exports.Settings = settings_1.default; +function walk(directory, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === 'function') { + new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); + return; + } + new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); +} +exports.walk = walk; +function walkSync(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + const provider = new sync_1.default(directory, settings); + return provider.read(); +} +exports.walkSync = walkSync; +function walkStream(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + const provider = new stream_1.default(directory, settings); + return provider.read(); +} +exports.walkStream = walkStream; +function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); +} diff --git a/slider/node_modules/@nodelib/fs.walk/out/providers/async.d.ts b/slider/node_modules/@nodelib/fs.walk/out/providers/async.d.ts new file mode 100644 index 0000000..08e7522 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/providers/async.d.ts @@ -0,0 +1,12 @@ +import AsyncReader from '../readers/async'; +import type Settings from '../settings'; +import type { Entry, Errno } from '../types'; +export declare type AsyncCallback = (error: Errno, entries: Entry[]) => void; +export default class AsyncProvider { + private readonly _root; + private readonly _settings; + protected readonly _reader: AsyncReader; + private readonly _storage; + constructor(_root: string, _settings: Settings); + read(callback: AsyncCallback): void; +} diff --git a/slider/node_modules/@nodelib/fs.walk/out/providers/async.js b/slider/node_modules/@nodelib/fs.walk/out/providers/async.js new file mode 100644 index 0000000..3b60223 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/providers/async.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const async_1 = require("../readers/async"); +class AsyncProvider { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._storage = []; + } + read(callback) { + this._reader.onError((error) => { + callFailureCallback(callback, error); + }); + this._reader.onEntry((entry) => { + this._storage.push(entry); + }); + this._reader.onEnd(() => { + callSuccessCallback(callback, this._storage); + }); + this._reader.read(); + } +} +exports.default = AsyncProvider; +function callFailureCallback(callback, error) { + callback(error); +} +function callSuccessCallback(callback, entries) { + callback(null, entries); +} diff --git a/slider/node_modules/@nodelib/fs.walk/out/providers/index.d.ts b/slider/node_modules/@nodelib/fs.walk/out/providers/index.d.ts new file mode 100644 index 0000000..5e21dc4 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/providers/index.d.ts @@ -0,0 +1,4 @@ +import AsyncProvider from './async'; +import StreamProvider from './stream'; +import SyncProvider from './sync'; +export { AsyncProvider, StreamProvider, SyncProvider }; diff --git a/slider/node_modules/@nodelib/fs.walk/out/providers/index.js b/slider/node_modules/@nodelib/fs.walk/out/providers/index.js new file mode 100644 index 0000000..ad7357b --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/providers/index.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SyncProvider = exports.StreamProvider = exports.AsyncProvider = void 0; +const async_1 = require("./async"); +exports.AsyncProvider = async_1.default; +const stream_1 = require("./stream"); +exports.StreamProvider = stream_1.default; +const sync_1 = require("./sync"); +exports.SyncProvider = sync_1.default; diff --git a/slider/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts b/slider/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts new file mode 100644 index 0000000..bfa37f3 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts @@ -0,0 +1,12 @@ +/// +import { Readable } from 'stream'; +import AsyncReader from '../readers/async'; +import type Settings from '../settings'; +export default class StreamProvider { + private readonly _root; + private readonly _settings; + protected readonly _reader: AsyncReader; + protected readonly _stream: Readable; + constructor(_root: string, _settings: Settings); + read(): Readable; +} diff --git a/slider/node_modules/@nodelib/fs.walk/out/providers/stream.js b/slider/node_modules/@nodelib/fs.walk/out/providers/stream.js new file mode 100644 index 0000000..50e8a76 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/providers/stream.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const stream_1 = require("stream"); +const async_1 = require("../readers/async"); +class StreamProvider { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._stream = new stream_1.Readable({ + objectMode: true, + read: () => { }, + destroy: () => { + if (!this._reader.isDestroyed) { + this._reader.destroy(); + } + } + }); + } + read() { + this._reader.onError((error) => { + this._stream.emit('error', error); + }); + this._reader.onEntry((entry) => { + this._stream.push(entry); + }); + this._reader.onEnd(() => { + this._stream.push(null); + }); + this._reader.read(); + return this._stream; + } +} +exports.default = StreamProvider; diff --git a/slider/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts b/slider/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts new file mode 100644 index 0000000..c7f9aa4 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts @@ -0,0 +1,10 @@ +import SyncReader from '../readers/sync'; +import type Settings from '../settings'; +import type { Entry } from '../types'; +export default class SyncProvider { + private readonly _root; + private readonly _settings; + protected readonly _reader: SyncReader; + constructor(_root: string, _settings: Settings); + read(): Entry[]; +} diff --git a/slider/node_modules/@nodelib/fs.walk/out/providers/sync.js b/slider/node_modules/@nodelib/fs.walk/out/providers/sync.js new file mode 100644 index 0000000..32ea443 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/providers/sync.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const sync_1 = require("../readers/sync"); +class SyncProvider { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new sync_1.default(this._root, this._settings); + } + read() { + return this._reader.read(); + } +} +exports.default = SyncProvider; diff --git a/slider/node_modules/@nodelib/fs.walk/out/readers/async.d.ts b/slider/node_modules/@nodelib/fs.walk/out/readers/async.d.ts new file mode 100644 index 0000000..244977a --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/readers/async.d.ts @@ -0,0 +1,30 @@ +/// +import { EventEmitter } from 'events'; +import * as fsScandir from '@nodelib/fs.scandir'; +import type Settings from '../settings'; +import type { Entry, Errno } from '../types'; +import Reader from './reader'; +declare type EntryEventCallback = (entry: Entry) => void; +declare type ErrorEventCallback = (error: Errno) => void; +declare type EndEventCallback = () => void; +export default class AsyncReader extends Reader { + protected readonly _settings: Settings; + protected readonly _scandir: typeof fsScandir.scandir; + protected readonly _emitter: EventEmitter; + private readonly _queue; + private _isFatalError; + private _isDestroyed; + constructor(_root: string, _settings: Settings); + read(): EventEmitter; + get isDestroyed(): boolean; + destroy(): void; + onEntry(callback: EntryEventCallback): void; + onError(callback: ErrorEventCallback): void; + onEnd(callback: EndEventCallback): void; + private _pushToQueue; + private _worker; + private _handleError; + private _handleEntry; + private _emitEntry; +} +export {}; diff --git a/slider/node_modules/@nodelib/fs.walk/out/readers/async.js b/slider/node_modules/@nodelib/fs.walk/out/readers/async.js new file mode 100644 index 0000000..7b1acb6 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/readers/async.js @@ -0,0 +1,97 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const events_1 = require("events"); +const fsScandir = require("@nodelib/fs.scandir"); +const fastq = require("fastq"); +const common = require("./common"); +const reader_1 = require("./reader"); +class AsyncReader extends reader_1.default { + constructor(_root, _settings) { + super(_root, _settings); + this._settings = _settings; + this._scandir = fsScandir.scandir; + this._emitter = new events_1.EventEmitter(); + this._queue = fastq(this._worker.bind(this), this._settings.concurrency); + this._isFatalError = false; + this._isDestroyed = false; + this._queue.drain = () => { + if (!this._isFatalError) { + this._emitter.emit('end'); + } + }; + } + read() { + this._isFatalError = false; + this._isDestroyed = false; + setImmediate(() => { + this._pushToQueue(this._root, this._settings.basePath); + }); + return this._emitter; + } + get isDestroyed() { + return this._isDestroyed; + } + destroy() { + if (this._isDestroyed) { + throw new Error('The reader is already destroyed'); + } + this._isDestroyed = true; + this._queue.killAndDrain(); + } + onEntry(callback) { + this._emitter.on('entry', callback); + } + onError(callback) { + this._emitter.once('error', callback); + } + onEnd(callback) { + this._emitter.once('end', callback); + } + _pushToQueue(directory, base) { + const queueItem = { directory, base }; + this._queue.push(queueItem, (error) => { + if (error !== null) { + this._handleError(error); + } + }); + } + _worker(item, done) { + this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { + if (error !== null) { + done(error, undefined); + return; + } + for (const entry of entries) { + this._handleEntry(entry, item.base); + } + done(null, undefined); + }); + } + _handleError(error) { + if (this._isDestroyed || !common.isFatalError(this._settings, error)) { + return; + } + this._isFatalError = true; + this._isDestroyed = true; + this._emitter.emit('error', error); + } + _handleEntry(entry, base) { + if (this._isDestroyed || this._isFatalError) { + return; + } + const fullpath = entry.path; + if (base !== undefined) { + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + } + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + this._emitEntry(entry); + } + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); + } + } + _emitEntry(entry) { + this._emitter.emit('entry', entry); + } +} +exports.default = AsyncReader; diff --git a/slider/node_modules/@nodelib/fs.walk/out/readers/common.d.ts b/slider/node_modules/@nodelib/fs.walk/out/readers/common.d.ts new file mode 100644 index 0000000..5c7dcbb --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/readers/common.d.ts @@ -0,0 +1,7 @@ +import type { FilterFunction } from '../settings'; +import type Settings from '../settings'; +import type { Errno } from '../types'; +export declare function isFatalError(settings: Settings, error: Errno): boolean; +export declare function isAppliedFilter(filter: FilterFunction | null, value: T): boolean; +export declare function replacePathSegmentSeparator(filepath: string, separator: string): string; +export declare function joinPathSegments(a: string, b: string, separator: string): string; diff --git a/slider/node_modules/@nodelib/fs.walk/out/readers/common.js b/slider/node_modules/@nodelib/fs.walk/out/readers/common.js new file mode 100644 index 0000000..6becbe1 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/readers/common.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0; +function isFatalError(settings, error) { + if (settings.errorFilter === null) { + return true; + } + return !settings.errorFilter(error); +} +exports.isFatalError = isFatalError; +function isAppliedFilter(filter, value) { + return filter === null || filter(value); +} +exports.isAppliedFilter = isAppliedFilter; +function replacePathSegmentSeparator(filepath, separator) { + return filepath.split(/[/\\]/).join(separator); +} +exports.replacePathSegmentSeparator = replacePathSegmentSeparator; +function joinPathSegments(a, b, separator) { + if (a === '') { + return b; + } + /** + * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). + */ + if (a.endsWith(separator)) { + return a + b; + } + return a + separator + b; +} +exports.joinPathSegments = joinPathSegments; diff --git a/slider/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts b/slider/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts new file mode 100644 index 0000000..572450c --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts @@ -0,0 +1,6 @@ +import type Settings from '../settings'; +export default class Reader { + protected readonly _root: string; + protected readonly _settings: Settings; + constructor(_root: string, _settings: Settings); +} diff --git a/slider/node_modules/@nodelib/fs.walk/out/readers/reader.js b/slider/node_modules/@nodelib/fs.walk/out/readers/reader.js new file mode 100644 index 0000000..55086a4 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/readers/reader.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const common = require("./common"); +class Reader { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); + } +} +exports.default = Reader; diff --git a/slider/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts b/slider/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts new file mode 100644 index 0000000..9e49c9b --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts @@ -0,0 +1,15 @@ +import * as fsScandir from '@nodelib/fs.scandir'; +import type { Entry } from '../types'; +import Reader from './reader'; +export default class SyncReader extends Reader { + protected readonly _scandir: typeof fsScandir.scandirSync; + private readonly _storage; + private readonly _queue; + read(): Entry[]; + private _pushToQueue; + private _handleQueue; + private _handleDirectory; + private _handleError; + private _handleEntry; + private _pushToStorage; +} diff --git a/slider/node_modules/@nodelib/fs.walk/out/readers/sync.js b/slider/node_modules/@nodelib/fs.walk/out/readers/sync.js new file mode 100644 index 0000000..61c7fd3 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/readers/sync.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fsScandir = require("@nodelib/fs.scandir"); +const common = require("./common"); +const reader_1 = require("./reader"); +class SyncReader extends reader_1.default { + constructor() { + super(...arguments); + this._scandir = fsScandir.scandirSync; + this._storage = []; + this._queue = new Set(); + } + read() { + this._pushToQueue(this._root, this._settings.basePath); + this._handleQueue(); + return this._storage; + } + _pushToQueue(directory, base) { + this._queue.add({ directory, base }); + } + _handleQueue() { + for (const item of this._queue.values()) { + this._handleDirectory(item.directory, item.base); + } + } + _handleDirectory(directory, base) { + try { + const entries = this._scandir(directory, this._settings.fsScandirSettings); + for (const entry of entries) { + this._handleEntry(entry, base); + } + } + catch (error) { + this._handleError(error); + } + } + _handleError(error) { + if (!common.isFatalError(this._settings, error)) { + return; + } + throw error; + } + _handleEntry(entry, base) { + const fullpath = entry.path; + if (base !== undefined) { + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + } + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + this._pushToStorage(entry); + } + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); + } + } + _pushToStorage(entry) { + this._storage.push(entry); + } +} +exports.default = SyncReader; diff --git a/slider/node_modules/@nodelib/fs.walk/out/settings.d.ts b/slider/node_modules/@nodelib/fs.walk/out/settings.d.ts new file mode 100644 index 0000000..11a2ed4 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/settings.d.ts @@ -0,0 +1,30 @@ +import * as fsScandir from '@nodelib/fs.scandir'; +import type { Entry, Errno } from './types'; +export declare type FilterFunction = (value: T) => boolean; +export declare type DeepFilterFunction = FilterFunction; +export declare type EntryFilterFunction = FilterFunction; +export declare type ErrorFilterFunction = FilterFunction; +export interface Options { + basePath?: string; + concurrency?: number; + deepFilter?: DeepFilterFunction; + entryFilter?: EntryFilterFunction; + errorFilter?: ErrorFilterFunction; + followSymbolicLinks?: boolean; + fs?: Partial; + pathSegmentSeparator?: string; + stats?: boolean; + throwErrorOnBrokenSymbolicLink?: boolean; +} +export default class Settings { + private readonly _options; + readonly basePath?: string; + readonly concurrency: number; + readonly deepFilter: DeepFilterFunction | null; + readonly entryFilter: EntryFilterFunction | null; + readonly errorFilter: ErrorFilterFunction | null; + readonly pathSegmentSeparator: string; + readonly fsScandirSettings: fsScandir.Settings; + constructor(_options?: Options); + private _getValue; +} diff --git a/slider/node_modules/@nodelib/fs.walk/out/settings.js b/slider/node_modules/@nodelib/fs.walk/out/settings.js new file mode 100644 index 0000000..e4abebe --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/settings.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const fsScandir = require("@nodelib/fs.scandir"); +class Settings { + constructor(_options = {}) { + this._options = _options; + this.basePath = this._getValue(this._options.basePath, undefined); + this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); + this.deepFilter = this._getValue(this._options.deepFilter, null); + this.entryFilter = this._getValue(this._options.entryFilter, null); + this.errorFilter = this._getValue(this._options.errorFilter, null); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); + this.fsScandirSettings = new fsScandir.Settings({ + followSymbolicLinks: this._options.followSymbolicLinks, + fs: this._options.fs, + pathSegmentSeparator: this._options.pathSegmentSeparator, + stats: this._options.stats, + throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } +} +exports.default = Settings; diff --git a/slider/node_modules/@nodelib/fs.walk/out/types/index.d.ts b/slider/node_modules/@nodelib/fs.walk/out/types/index.d.ts new file mode 100644 index 0000000..2c5951f --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/types/index.d.ts @@ -0,0 +1,8 @@ +/// +import type * as scandir from '@nodelib/fs.scandir'; +export declare type Entry = scandir.Entry; +export declare type Errno = NodeJS.ErrnoException; +export interface QueueItem { + directory: string; + base?: string; +} diff --git a/slider/node_modules/@nodelib/fs.walk/out/types/index.js b/slider/node_modules/@nodelib/fs.walk/out/types/index.js new file mode 100644 index 0000000..fabb051 --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/out/types/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@nodelib/fs.walk/package.json b/slider/node_modules/@nodelib/fs.walk/package.json new file mode 100644 index 0000000..dbfee8c --- /dev/null +++ b/slider/node_modules/@nodelib/fs.walk/package.json @@ -0,0 +1,44 @@ +{ + "name": "@nodelib/fs.walk", + "version": "1.2.8", + "description": "A library for efficiently walking a directory recursively", + "license": "MIT", + "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk", + "keywords": [ + "NodeLib", + "fs", + "FileSystem", + "file system", + "walk", + "scanner", + "crawler" + ], + "engines": { + "node": ">= 8" + }, + "files": [ + "out/**", + "!out/**/*.map", + "!out/**/*.spec.*", + "!out/**/tests/**" + ], + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "clean": "rimraf {tsconfig.tsbuildinfo,out}", + "lint": "eslint \"src/**/*.ts\" --cache", + "compile": "tsc -b .", + "compile:watch": "tsc -p . --watch --sourceMap", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "build": "npm run clean && npm run compile && npm run lint && npm test", + "watch": "npm run clean && npm run compile:watch" + }, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "devDependencies": { + "@nodelib/fs.macchiato": "1.0.4" + }, + "gitHead": "1e5bad48565da2b06b8600e744324ea240bf49d8" +} diff --git a/slider/node_modules/@stylistic/eslint-plugin/LICENSE b/slider/node_modules/@stylistic/eslint-plugin/LICENSE new file mode 100644 index 0000000..56e5630 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright OpenJS Foundation and other contributors, +Copyright (c) 2023-PRESENT ESLint Stylistic contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/configs.js b/slider/node_modules/@stylistic/eslint-plugin/dist/configs.js new file mode 100644 index 0000000..103a034 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/configs.js @@ -0,0 +1,551 @@ +import { createAllConfigs, warnDeprecation } from "./utils.js"; +import { array_bracket_newline_default } from "./rules/array-bracket-newline.js"; +import { array_bracket_spacing_default } from "./rules/array-bracket-spacing.js"; +import { array_element_newline_default } from "./rules/array-element-newline.js"; +import { arrow_parens_default } from "./rules/arrow-parens.js"; +import { arrow_spacing_default } from "./rules/arrow-spacing.js"; +import { block_spacing_default } from "./rules/block-spacing.js"; +import { brace_style_default } from "./rules/brace-style.js"; +import { comma_dangle_default } from "./rules/comma-dangle.js"; +import { comma_spacing_default } from "./rules/comma-spacing.js"; +import { comma_style_default } from "./rules/comma-style.js"; +import { computed_property_spacing_default } from "./rules/computed-property-spacing.js"; +import { curly_newline_default } from "./rules/curly-newline.js"; +import { dot_location_default } from "./rules/dot-location.js"; +import { eol_last_default } from "./rules/eol-last.js"; +import { function_call_argument_newline_default } from "./rules/function-call-argument-newline.js"; +import { function_call_spacing_default } from "./rules/function-call-spacing.js"; +import { function_paren_newline_default } from "./rules/function-paren-newline.js"; +import { generator_star_spacing_default } from "./rules/generator-star-spacing.js"; +import { implicit_arrow_linebreak_default } from "./rules/implicit-arrow-linebreak.js"; +import { indent_binary_ops_default } from "./rules/indent-binary-ops.js"; +import { indent_default } from "./rules/indent.js"; +import { jsx_child_element_spacing_default } from "./rules/jsx-child-element-spacing.js"; +import { jsx_closing_bracket_location_default } from "./rules/jsx-closing-bracket-location.js"; +import { jsx_closing_tag_location_default } from "./rules/jsx-closing-tag-location.js"; +import { jsx_curly_brace_presence_default } from "./rules/jsx-curly-brace-presence.js"; +import { jsx_curly_newline_default } from "./rules/jsx-curly-newline.js"; +import { jsx_curly_spacing_default } from "./rules/jsx-curly-spacing.js"; +import { jsx_equals_spacing_default } from "./rules/jsx-equals-spacing.js"; +import { jsx_first_prop_new_line_default } from "./rules/jsx-first-prop-new-line.js"; +import { jsx_function_call_newline_default } from "./rules/jsx-function-call-newline.js"; +import { jsx_indent_props_default } from "./rules/jsx-indent-props.js"; +import { jsx_indent_default } from "./rules/jsx-indent.js"; +import { jsx_max_props_per_line_default } from "./rules/jsx-max-props-per-line.js"; +import { jsx_newline_default } from "./rules/jsx-newline.js"; +import { jsx_one_expression_per_line_default } from "./rules/jsx-one-expression-per-line.js"; +import { jsx_pascal_case_default } from "./rules/jsx-pascal-case.js"; +import { jsx_props_no_multi_spaces_default } from "./rules/jsx-props-no-multi-spaces.js"; +import { jsx_quotes_default } from "./rules/jsx-quotes.js"; +import { jsx_self_closing_comp_default } from "./rules/jsx-self-closing-comp.js"; +import { jsx_sort_props_default } from "./rules/jsx-sort-props.js"; +import { jsx_tag_spacing_default } from "./rules/jsx-tag-spacing.js"; +import { jsx_wrap_multilines_default } from "./rules/jsx-wrap-multilines.js"; +import { key_spacing_default } from "./rules/key-spacing.js"; +import { keyword_spacing_default } from "./rules/keyword-spacing.js"; +import { line_comment_position_default } from "./rules/line-comment-position.js"; +import { linebreak_style_default } from "./rules/linebreak-style.js"; +import { lines_around_comment_default } from "./rules/lines-around-comment.js"; +import { lines_between_class_members_default } from "./rules/lines-between-class-members.js"; +import { max_len_default } from "./rules/max-len.js"; +import { max_statements_per_line_default } from "./rules/max-statements-per-line.js"; +import { member_delimiter_style_default } from "./rules/member-delimiter-style.js"; +import { multiline_comment_style_default } from "./rules/multiline-comment-style.js"; +import { multiline_ternary_default } from "./rules/multiline-ternary.js"; +import { new_parens_default } from "./rules/new-parens.js"; +import { newline_per_chained_call_default } from "./rules/newline-per-chained-call.js"; +import { no_confusing_arrow_default } from "./rules/no-confusing-arrow.js"; +import { no_extra_parens_default } from "./rules/no-extra-parens.js"; +import { no_extra_semi_default } from "./rules/no-extra-semi.js"; +import { no_floating_decimal_default } from "./rules/no-floating-decimal.js"; +import { no_mixed_operators_default } from "./rules/no-mixed-operators.js"; +import { no_mixed_spaces_and_tabs_default } from "./rules/no-mixed-spaces-and-tabs.js"; +import { no_multi_spaces_default } from "./rules/no-multi-spaces.js"; +import { no_multiple_empty_lines_default } from "./rules/no-multiple-empty-lines.js"; +import { no_tabs_default } from "./rules/no-tabs.js"; +import { no_trailing_spaces_default } from "./rules/no-trailing-spaces.js"; +import { no_whitespace_before_property_default } from "./rules/no-whitespace-before-property.js"; +import { nonblock_statement_body_position_default } from "./rules/nonblock-statement-body-position.js"; +import { object_curly_newline_default } from "./rules/object-curly-newline.js"; +import { object_curly_spacing_default } from "./rules/object-curly-spacing.js"; +import { object_property_newline_default } from "./rules/object-property-newline.js"; +import { one_var_declaration_per_line_default } from "./rules/one-var-declaration-per-line.js"; +import { operator_linebreak_default } from "./rules/operator-linebreak.js"; +import { padded_blocks_default } from "./rules/padded-blocks.js"; +import { padding_line_between_statements_default } from "./rules/padding-line-between-statements.js"; +import { quote_props_default } from "./rules/quote-props.js"; +import { quotes_default } from "./rules/quotes.js"; +import { rest_spread_spacing_default } from "./rules/rest-spread-spacing.js"; +import { semi_spacing_default } from "./rules/semi-spacing.js"; +import { semi_style_default } from "./rules/semi-style.js"; +import { semi_default } from "./rules/semi.js"; +import { space_before_blocks_default } from "./rules/space-before-blocks.js"; +import { space_before_function_paren_default } from "./rules/space-before-function-paren.js"; +import { space_in_parens_default } from "./rules/space-in-parens.js"; +import { space_infix_ops_default } from "./rules/space-infix-ops.js"; +import { space_unary_ops_default } from "./rules/space-unary-ops.js"; +import { spaced_comment_default } from "./rules/spaced-comment.js"; +import { switch_colon_spacing_default } from "./rules/switch-colon-spacing.js"; +import { template_curly_spacing_default } from "./rules/template-curly-spacing.js"; +import { template_tag_spacing_default } from "./rules/template-tag-spacing.js"; +import { type_annotation_spacing_default } from "./rules/type-annotation-spacing.js"; +import { type_generic_spacing_default } from "./rules/type-generic-spacing.js"; +import { type_named_tuple_spacing_default } from "./rules/type-named-tuple-spacing.js"; +import { wrap_iife_default } from "./rules/wrap-iife.js"; +import { wrap_regex_default } from "./rules/wrap-regex.js"; +import { yield_star_spacing_default } from "./rules/yield-star-spacing.js"; +var rules_default = { + "array-bracket-newline": array_bracket_newline_default, + "array-bracket-spacing": array_bracket_spacing_default, + "array-element-newline": array_element_newline_default, + "arrow-parens": arrow_parens_default, + "arrow-spacing": arrow_spacing_default, + "block-spacing": block_spacing_default, + "brace-style": brace_style_default, + "comma-dangle": comma_dangle_default, + "comma-spacing": comma_spacing_default, + "comma-style": comma_style_default, + "computed-property-spacing": computed_property_spacing_default, + "curly-newline": curly_newline_default, + "dot-location": dot_location_default, + "eol-last": eol_last_default, + "function-call-argument-newline": function_call_argument_newline_default, + "function-call-spacing": function_call_spacing_default, + "function-paren-newline": function_paren_newline_default, + "generator-star-spacing": generator_star_spacing_default, + "implicit-arrow-linebreak": implicit_arrow_linebreak_default, + "indent": indent_default, + "indent-binary-ops": indent_binary_ops_default, + "jsx-child-element-spacing": jsx_child_element_spacing_default, + "jsx-closing-bracket-location": jsx_closing_bracket_location_default, + "jsx-closing-tag-location": jsx_closing_tag_location_default, + "jsx-curly-brace-presence": jsx_curly_brace_presence_default, + "jsx-curly-newline": jsx_curly_newline_default, + "jsx-curly-spacing": jsx_curly_spacing_default, + "jsx-equals-spacing": jsx_equals_spacing_default, + "jsx-first-prop-new-line": jsx_first_prop_new_line_default, + "jsx-function-call-newline": jsx_function_call_newline_default, + "jsx-indent": jsx_indent_default, + "jsx-indent-props": jsx_indent_props_default, + "jsx-max-props-per-line": jsx_max_props_per_line_default, + "jsx-newline": jsx_newline_default, + "jsx-one-expression-per-line": jsx_one_expression_per_line_default, + "jsx-pascal-case": jsx_pascal_case_default, + "jsx-props-no-multi-spaces": jsx_props_no_multi_spaces_default, + "jsx-quotes": jsx_quotes_default, + "jsx-self-closing-comp": jsx_self_closing_comp_default, + "jsx-sort-props": jsx_sort_props_default, + "jsx-tag-spacing": jsx_tag_spacing_default, + "jsx-wrap-multilines": jsx_wrap_multilines_default, + "key-spacing": key_spacing_default, + "keyword-spacing": keyword_spacing_default, + "line-comment-position": line_comment_position_default, + "linebreak-style": linebreak_style_default, + "lines-around-comment": lines_around_comment_default, + "lines-between-class-members": lines_between_class_members_default, + "max-len": max_len_default, + "max-statements-per-line": max_statements_per_line_default, + "member-delimiter-style": member_delimiter_style_default, + "multiline-comment-style": multiline_comment_style_default, + "multiline-ternary": multiline_ternary_default, + "new-parens": new_parens_default, + "newline-per-chained-call": newline_per_chained_call_default, + "no-confusing-arrow": no_confusing_arrow_default, + "no-extra-parens": no_extra_parens_default, + "no-extra-semi": no_extra_semi_default, + "no-floating-decimal": no_floating_decimal_default, + "no-mixed-operators": no_mixed_operators_default, + "no-mixed-spaces-and-tabs": no_mixed_spaces_and_tabs_default, + "no-multi-spaces": no_multi_spaces_default, + "no-multiple-empty-lines": no_multiple_empty_lines_default, + "no-tabs": no_tabs_default, + "no-trailing-spaces": no_trailing_spaces_default, + "no-whitespace-before-property": no_whitespace_before_property_default, + "nonblock-statement-body-position": nonblock_statement_body_position_default, + "object-curly-newline": object_curly_newline_default, + "object-curly-spacing": object_curly_spacing_default, + "object-property-newline": object_property_newline_default, + "one-var-declaration-per-line": one_var_declaration_per_line_default, + "operator-linebreak": operator_linebreak_default, + "padded-blocks": padded_blocks_default, + "padding-line-between-statements": padding_line_between_statements_default, + "quote-props": quote_props_default, + "quotes": quotes_default, + "rest-spread-spacing": rest_spread_spacing_default, + "semi": semi_default, + "semi-spacing": semi_spacing_default, + "semi-style": semi_style_default, + "space-before-blocks": space_before_blocks_default, + "space-before-function-paren": space_before_function_paren_default, + "space-in-parens": space_in_parens_default, + "space-infix-ops": space_infix_ops_default, + "space-unary-ops": space_unary_ops_default, + "spaced-comment": spaced_comment_default, + "switch-colon-spacing": switch_colon_spacing_default, + "template-curly-spacing": template_curly_spacing_default, + "template-tag-spacing": template_tag_spacing_default, + "type-annotation-spacing": type_annotation_spacing_default, + "type-generic-spacing": type_generic_spacing_default, + "type-named-tuple-spacing": type_named_tuple_spacing_default, + "wrap-iife": wrap_iife_default, + "wrap-regex": wrap_regex_default, + "yield-star-spacing": yield_star_spacing_default +}; +const plugin = { rules: rules_default }; +var plugin_default = plugin; +function customize(options = {}) { + const { arrowParens = false, blockSpacing = true, braceStyle = "stroustrup", commaDangle = "always-multiline", experimental: enableExperimentalRules = false, indent = 2, jsx = true, pluginName = "@stylistic", quoteProps = "consistent-as-needed", quotes = "single", semi = false, severity = "error" } = options; + let rules = { + "@stylistic/array-bracket-spacing": [severity, "never"], + "@stylistic/arrow-parens": [ + severity, + arrowParens ? "always" : "as-needed", + { requireForBlockBody: true } + ], + "@stylistic/arrow-spacing": [severity, { + after: true, + before: true + }], + "@stylistic/block-spacing": [severity, blockSpacing ? "always" : "never"], + "@stylistic/brace-style": [ + severity, + braceStyle, + { allowSingleLine: true } + ], + "@stylistic/comma-dangle": [severity, commaDangle], + "@stylistic/comma-spacing": [severity, { + after: true, + before: false + }], + "@stylistic/comma-style": [severity, "last"], + "@stylistic/computed-property-spacing": [ + severity, + "never", + { enforceForClassMembers: true } + ], + "@stylistic/dot-location": [severity, "property"], + "@stylistic/eol-last": severity, + "@stylistic/generator-star-spacing": [severity, { + after: true, + before: false + }], + "@stylistic/indent": [ + severity, + indent, + { + ArrayExpression: 1, + CallExpression: { arguments: 1 }, + flatTernaryExpressions: false, + FunctionDeclaration: { + body: 1, + parameters: 1, + returnType: 1 + }, + FunctionExpression: { + body: 1, + parameters: 1, + returnType: 1 + }, + ignoreComments: false, + ignoredNodes: ["TSUnionType", "TSIntersectionType"], + ImportDeclaration: 1, + MemberExpression: 1, + ObjectExpression: 1, + offsetTernaryExpressions: true, + outerIIFEBody: 1, + SwitchCase: 1, + tabLength: indent === "tab" ? 4 : indent, + VariableDeclarator: 1 + } + ], + "@stylistic/indent-binary-ops": [severity, indent], + "@stylistic/key-spacing": [severity, { + afterColon: true, + beforeColon: false + }], + "@stylistic/keyword-spacing": [severity, { + after: true, + before: true + }], + "@stylistic/lines-between-class-members": [ + severity, + "always", + { exceptAfterSingleLine: true } + ], + "@stylistic/max-statements-per-line": [severity, { max: 1 }], + "@stylistic/member-delimiter-style": [severity, { + multiline: { + delimiter: semi ? "semi" : "none", + requireLast: semi + }, + multilineDetection: "brackets", + overrides: { interface: { multiline: { + delimiter: semi ? "semi" : "none", + requireLast: semi + } } }, + singleline: { delimiter: semi ? "semi" : "comma" } + }], + "@stylistic/multiline-ternary": [severity, "always-multiline"], + "@stylistic/new-parens": severity, + "@stylistic/no-extra-parens": [severity, "functions"], + "@stylistic/no-floating-decimal": severity, + "@stylistic/no-mixed-operators": [severity, { + allowSamePrecedence: true, + groups: [ + [ + "==", + "!=", + "===", + "!==", + ">", + ">=", + "<", + "<=" + ], + ["&&", "||"], + ["in", "instanceof"] + ] + }], + "@stylistic/no-mixed-spaces-and-tabs": severity, + "@stylistic/no-multi-spaces": severity, + "@stylistic/no-multiple-empty-lines": [severity, { + max: 1, + maxBOF: 0, + maxEOF: 0 + }], + "@stylistic/no-tabs": indent === "tab" ? "off" : severity, + "@stylistic/no-trailing-spaces": severity, + "@stylistic/no-whitespace-before-property": severity, + "@stylistic/object-curly-spacing": [severity, "always"], + "@stylistic/operator-linebreak": [severity, "before"], + "@stylistic/padded-blocks": [severity, { + blocks: "never", + classes: "never", + switches: "never" + }], + "@stylistic/quote-props": [severity, quoteProps], + "@stylistic/quotes": [ + severity, + quotes, + { + allowTemplateLiterals: "always", + avoidEscape: false + } + ], + "@stylistic/rest-spread-spacing": [severity, "never"], + "@stylistic/semi": [severity, semi ? "always" : "never"], + "@stylistic/semi-spacing": [severity, { + after: true, + before: false + }], + "@stylistic/space-before-blocks": [severity, "always"], + "@stylistic/space-before-function-paren": [severity, { + anonymous: "always", + asyncArrow: "always", + named: "never" + }], + "@stylistic/space-in-parens": [severity, "never"], + "@stylistic/space-infix-ops": severity, + "@stylistic/space-unary-ops": [severity, { + nonwords: false, + words: true + }], + "@stylistic/spaced-comment": [ + severity, + "always", + { + block: { + balanced: true, + exceptions: ["*"], + markers: ["!"] + }, + line: { + exceptions: ["/", "#"], + markers: ["/"] + } + } + ], + "@stylistic/template-curly-spacing": severity, + "@stylistic/template-tag-spacing": [severity, "never"], + "@stylistic/type-annotation-spacing": [severity, {}], + "@stylistic/type-generic-spacing": severity, + "@stylistic/type-named-tuple-spacing": severity, + "@stylistic/wrap-iife": [ + severity, + "any", + { functionPrototypeMethods: true } + ], + "@stylistic/yield-star-spacing": [severity, { + after: true, + before: false + }], + ...jsx ? { + "@stylistic/jsx-closing-bracket-location": severity, + "@stylistic/jsx-closing-tag-location": severity, + "@stylistic/jsx-curly-brace-presence": [severity, { propElementValues: "always" }], + "@stylistic/jsx-curly-newline": severity, + "@stylistic/jsx-curly-spacing": [severity, "never"], + "@stylistic/jsx-equals-spacing": severity, + "@stylistic/jsx-first-prop-new-line": severity, + "@stylistic/jsx-function-call-newline": [severity, "multiline"], + "@stylistic/jsx-indent-props": [severity, indent], + "@stylistic/jsx-max-props-per-line": [severity, { + maximum: 1, + when: "multiline" + }], + "@stylistic/jsx-one-expression-per-line": [severity, { allow: "single-child" }], + "@stylistic/jsx-quotes": severity, + "@stylistic/jsx-tag-spacing": [severity, { + afterOpening: "never", + beforeClosing: "never", + beforeSelfClosing: "always", + closingSlash: "never" + }], + "@stylistic/jsx-wrap-multilines": [severity, { + arrow: "parens-new-line", + assignment: "parens-new-line", + condition: "parens-new-line", + declaration: "parens-new-line", + logical: "parens-new-line", + prop: "parens-new-line", + propertyValue: "parens-new-line", + return: "parens-new-line" + }] + } : {} + }; + if (enableExperimentalRules) {} + if (pluginName !== "@stylistic") { + const regex = /^@stylistic\//; + rules = Object.fromEntries(Object.entries(rules).map(([ruleName, ruleConfig]) => [ruleName.replace(regex, `${pluginName}/`), ruleConfig])); + } + return { + plugins: { [pluginName]: plugin_default }, + rules + }; +} +const config = { rules: { + "array-bracket-newline": 0, + "array-bracket-spacing": 0, + "array-element-newline": 0, + "arrow-parens": 0, + "arrow-spacing": 0, + "block-spacing": 0, + "brace-style": 0, + "comma-dangle": 0, + "comma-spacing": 0, + "comma-style": 0, + "computed-property-spacing": 0, + "dot-location": 0, + "eol-last": 0, + "func-call-spacing": 0, + "function-call-argument-newline": 0, + "function-paren-newline": 0, + "generator-star-spacing": 0, + "implicit-arrow-linebreak": 0, + "indent": 0, + "jsx-quotes": 0, + "key-spacing": 0, + "keyword-spacing": 0, + "linebreak-style": 0, + "lines-around-comment": 0, + "lines-between-class-members": 0, + "max-len": 0, + "max-statements-per-line": 0, + "multiline-ternary": 0, + "new-parens": 0, + "newline-per-chained-call": 0, + "no-confusing-arrow": 0, + "no-extra-parens": 0, + "no-extra-semi": 0, + "no-floating-decimal": 0, + "no-mixed-operators": 0, + "no-mixed-spaces-and-tabs": 0, + "no-multi-spaces": 0, + "no-multiple-empty-lines": 0, + "no-tabs": 0, + "no-trailing-spaces": 0, + "no-whitespace-before-property": 0, + "nonblock-statement-body-position": 0, + "object-curly-newline": 0, + "object-curly-spacing": 0, + "object-property-newline": 0, + "one-var-declaration-per-line": 0, + "operator-linebreak": 0, + "padded-blocks": 0, + "padding-line-between-statements": 0, + "quote-props": 0, + "quotes": 0, + "rest-spread-spacing": 0, + "semi": 0, + "semi-spacing": 0, + "semi-style": 0, + "space-before-blocks": 0, + "space-before-function-paren": 0, + "space-in-parens": 0, + "space-infix-ops": 0, + "space-unary-ops": 0, + "spaced-comment": 0, + "switch-colon-spacing": 0, + "template-curly-spacing": 0, + "template-tag-spacing": 0, + "wrap-iife": 0, + "wrap-regex": 0, + "yield-star-spacing": 0, + "@typescript-eslint/block-spacing": 0, + "@typescript-eslint/brace-style": 0, + "@typescript-eslint/comma-dangle": 0, + "@typescript-eslint/comma-spacing": 0, + "@typescript-eslint/func-call-spacing": 0, + "@typescript-eslint/indent": 0, + "@typescript-eslint/key-spacing": 0, + "@typescript-eslint/keyword-spacing": 0, + "@typescript-eslint/lines-around-comment": 0, + "@typescript-eslint/lines-between-class-members": 0, + "@typescript-eslint/member-delimiter-style": 0, + "@typescript-eslint/no-extra-parens": 0, + "@typescript-eslint/no-extra-semi": 0, + "@typescript-eslint/object-curly-spacing": 0, + "@typescript-eslint/padding-line-between-statements": 0, + "@typescript-eslint/quotes": 0, + "@typescript-eslint/semi": 0, + "@typescript-eslint/space-before-blocks": 0, + "@typescript-eslint/space-before-function-paren": 0, + "@typescript-eslint/space-infix-ops": 0, + "@typescript-eslint/type-annotation-spacing": 0, + "react/jsx-child-element-spacing": 0, + "react/jsx-closing-bracket-location": 0, + "react/jsx-closing-tag-location": 0, + "react/jsx-curly-brace-presence": 0, + "react/jsx-curly-newline": 0, + "react/jsx-curly-spacing": 0, + "react/jsx-equals-spacing": 0, + "react/jsx-first-prop-new-line": 0, + "react/jsx-indent": 0, + "react/jsx-indent-props": 0, + "react/jsx-max-props-per-line": 0, + "react/jsx-newline": 0, + "react/jsx-one-expression-per-line": 0, + "react/jsx-pascal-case": 0, + "react/jsx-props-no-multi-spaces": 0, + "react/self-closing-comp": 0, + "react/jsx-sort-props": 0, + "react/jsx-tag-spacing": 0, + "react/jsx-wrap-multilines": 0 +} }; +var disable_legacy_default = config; +const allConfigsIgnore = [/^jsx-/, /^curly-newline$/]; +const all = /* @__PURE__ */ createAllConfigs(plugin_default, "@stylistic", (name) => !allConfigsIgnore.some((re) => re.test(name))); +const recommended = /* @__PURE__ */ customize(); +const configs = new Proxy({ + "disable-legacy": disable_legacy_default, + "customize": customize, + "recommended": recommended, + "recommended-flat": recommended, + "all": all, + "all-flat": all +}, { get(target, p, receiver) { + const prop = p.toString(); + if (prop.endsWith("-flat")) warnDeprecation(`config("${prop}")`, `"${prop.replace("-flat", "")}"`); + return Reflect.get(target, p, receiver); +} }); +export { configs, plugin_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/dts/define-config-support.d.ts b/slider/node_modules/@stylistic/eslint-plugin/dist/dts/define-config-support.d.ts new file mode 100644 index 0000000..e118d25 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/dts/define-config-support.d.ts @@ -0,0 +1,7 @@ +import { RuleOptions } from "./rule-options2.js"; + +//#region dts/define-config-support.d.ts + +declare module 'eslint-define-config' { + export interface CustomRuleOptions extends RuleOptions {} +} \ No newline at end of file diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/dts/index.d.ts b/slider/node_modules/@stylistic/eslint-plugin/dist/dts/index.d.ts new file mode 100644 index 0000000..b98ab58 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/dts/index.d.ts @@ -0,0 +1,130 @@ +import { RuleOptions, UnprefixedRuleOptions } from "./rule-options2.js"; +import { ESLint, Linter, Rule } from "eslint"; + +//#region dts/options.d.ts +interface StylisticCustomizeOptions { + /** + * The name of the registered plugin, used to prefix rule IDs + * @default '@stylistic' + */ + pluginName?: string; + /** + * Indentation level + * Similar to the `tabWidth` and `useTabs` options in Prettier + * + * @default 2 + */ + indent?: number | 'tab'; + /** + * Quote style + * Similar to `singleQuote` option in Prettier + * + * @default 'single' + */ + quotes?: 'single' | 'double' | 'backtick'; + /** + * Whether to enable semicolons + * Similar to `semi` option in Prettier + * + * @default false + */ + semi?: boolean; + /** + * Enable JSX support + * @default true + */ + jsx?: boolean; + /** + * When to enable arrow parenthesis + * Similar to `arrowParens` option in Prettier + * + * @default false + */ + arrowParens?: boolean; + /** + * Which brace style to use + * @default 'stroustrup' + */ + braceStyle?: '1tbs' | 'stroustrup' | 'allman'; + /** + * Whether to require spaces around braces + * Similar to `bracketSpacing` option in Prettier + * + * @default true + */ + blockSpacing?: boolean; + /** + * When to enable prop quoting + * Similar to `quoteProps` option in Prettier + * + * @default 'consistent-as-needed' + */ + quoteProps?: 'always' | 'as-needed' | 'consistent' | 'consistent-as-needed'; + /** + * When to enable comma dangles + * Similar to `trailingComma` option in Prettier + * + * @default 'always-multiline' + */ + commaDangle?: 'never' | 'always' | 'always-multiline' | 'only-multiline'; + /** + * Severity level of the rules + * Determines how violations are reported. + * + * @default 'error' + */ + severity?: 'error' | 'warn'; + /** + * Enable the experimental rules + * + * @default false + */ + experimental?: boolean; +} +//#endregion +//#region dts/configs.d.ts +declare function customize(options?: StylisticCustomizeOptions): Linter.Config; +declare const configs: { + /** + * Disable all legacy rules from `eslint`, `@typescript-eslint` and `eslint-plugin-react` + * + * This config works for both flat and legacy config format + */ + 'disable-legacy': Linter.Config; + /** + * A factory function to customize the recommended config + */ + 'customize': typeof customize; + /** + * The default recommended config in Flat Config Format + */ + 'recommended': Linter.Config; + /** + * The default recommended config in Flat Config Format + * + * @deprecated use `recommended` instead. + */ + 'recommended-flat': Linter.Config; + /** + * Enable all rules, in Flat Config Format + */ + 'all': Linter.Config; + /** + * Enable all rules, in Flat Config Format + * + * @deprecated use `all` instead. + */ + 'all-flat': Linter.Config; +}; +type Configs = typeof configs; +//#endregion +//#region dts/rules.d.ts +type Rules = { [K in keyof UnprefixedRuleOptions]: Rule.RuleModule }; +//#endregion +//#region dts/index.d.ts +declare const plugin: { + rules: Rules; + configs: ESLint.Plugin['configs'] & Configs; +}; +//#endregion +export { type Configs, type RuleOptions, type Rules, type StylisticCustomizeOptions, type UnprefixedRuleOptions, plugin as default }; \ No newline at end of file diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/dts/rule-options.d.ts b/slider/node_modules/@stylistic/eslint-plugin/dist/dts/rule-options.d.ts new file mode 100644 index 0000000..f31c570 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/dts/rule-options.d.ts @@ -0,0 +1,2 @@ +import { RuleOptions, UnprefixedRuleOptions } from "./rule-options2.js"; +export { RuleOptions, UnprefixedRuleOptions }; \ No newline at end of file diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/dts/rule-options2.d.ts b/slider/node_modules/@stylistic/eslint-plugin/dist/dts/rule-options2.d.ts new file mode 100644 index 0000000..0b6997d --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/dts/rule-options2.d.ts @@ -0,0 +1,2420 @@ +//#region rules/array-bracket-newline/types.d.ts + +type ArrayBracketNewlineSchema0 = ('always' | 'never' | 'consistent') | { + multiline?: boolean; + minItems?: number | null; +}; +type ArrayBracketNewlineRuleOptions = [ArrayBracketNewlineSchema0?]; +//#endregion +//#region rules/array-bracket-spacing/types.d.ts + +type ArrayBracketSpacingSchema0 = 'always' | 'never'; +interface ArrayBracketSpacingSchema1 { + singleValue?: boolean; + objectsInArrays?: boolean; + arraysInArrays?: boolean; +} +type ArrayBracketSpacingRuleOptions = [ArrayBracketSpacingSchema0?, ArrayBracketSpacingSchema1?]; +//#endregion +//#region rules/array-element-newline/types.d.ts + +type ArrayElementNewlineSchema0 = [] | [BasicConfig | { + ArrayExpression?: BasicConfig; + ArrayPattern?: BasicConfig; +}]; +type BasicConfig = ('always' | 'never' | 'consistent') | { + consistent?: boolean; + multiline?: boolean; + minItems?: number | null; +}; +type ArrayElementNewlineRuleOptions = ArrayElementNewlineSchema0; +//#endregion +//#region rules/arrow-parens/types.d.ts + +type ArrowParensSchema0 = 'always' | 'as-needed'; +interface ArrowParensSchema1 { + requireForBlockBody?: boolean; +} +type ArrowParensRuleOptions = [ArrowParensSchema0?, ArrowParensSchema1?]; +//#endregion +//#region rules/arrow-spacing/types.d.ts + +interface ArrowSpacingSchema0 { + before?: boolean; + after?: boolean; +} +type ArrowSpacingRuleOptions = [ArrowSpacingSchema0?]; +//#endregion +//#region rules/block-spacing/types.d.ts + +type BlockSpacingSchema0 = 'always' | 'never'; +type BlockSpacingRuleOptions = [BlockSpacingSchema0?]; +//#endregion +//#region rules/brace-style/types.d.ts + +type BraceStyleSchema0 = '1tbs' | 'stroustrup' | 'allman'; +interface BraceStyleSchema1 { + allowSingleLine?: boolean; +} +type BraceStyleRuleOptions = [BraceStyleSchema0?, BraceStyleSchema1?]; +//#endregion +//#region rules/comma-dangle/types.d.ts + +type CommaDangleSchema0 = [] | [Value | { + arrays?: ValueWithIgnore; + objects?: ValueWithIgnore; + imports?: ValueWithIgnore; + exports?: ValueWithIgnore; + functions?: ValueWithIgnore; + importAttributes?: ValueWithIgnore; + dynamicImports?: ValueWithIgnore; + enums?: ValueWithIgnore; + generics?: ValueWithIgnore; + tuples?: ValueWithIgnore; +}]; +type Value = 'always-multiline' | 'always' | 'never' | 'only-multiline'; +type ValueWithIgnore = 'always-multiline' | 'always' | 'never' | 'only-multiline' | 'ignore'; +type CommaDangleRuleOptions = CommaDangleSchema0; +//#endregion +//#region rules/comma-spacing/types.d.ts + +interface CommaSpacingSchema0 { + before?: boolean; + after?: boolean; +} +type CommaSpacingRuleOptions = [CommaSpacingSchema0?]; +//#endregion +//#region rules/comma-style/types.d.ts + +type CommaStyleSchema0 = 'first' | 'last'; +interface CommaStyleSchema1 { + exceptions?: { + [k: string]: boolean; + }; +} +type CommaStyleRuleOptions = [CommaStyleSchema0?, CommaStyleSchema1?]; +//#endregion +//#region rules/computed-property-spacing/types.d.ts + +type ComputedPropertySpacingSchema0 = 'always' | 'never'; +interface ComputedPropertySpacingSchema1 { + enforceForClassMembers?: boolean; +} +type ComputedPropertySpacingRuleOptions = [ComputedPropertySpacingSchema0?, ComputedPropertySpacingSchema1?]; +//#endregion +//#region rules/curly-newline/types.d.ts + +type CurlyNewlineSchema0 = ('always' | 'never') | { + IfStatementConsequent?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + IfStatementAlternative?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + DoWhileStatement?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + ForInStatement?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + ForOfStatement?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + ForStatement?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + WhileStatement?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + SwitchStatement?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + SwitchCase?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + TryStatementBlock?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + TryStatementHandler?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + TryStatementFinalizer?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + BlockStatement?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + ArrowFunctionExpression?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + FunctionDeclaration?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + FunctionExpression?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + Property?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + ClassBody?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + StaticBlock?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + WithStatement?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + TSModuleBlock?: ('always' | 'never') | { + multiline?: boolean; + minElements?: number; + consistent?: boolean; + }; + multiline?: boolean; + minElements?: number; + consistent?: boolean; +}; +type CurlyNewlineRuleOptions = [CurlyNewlineSchema0?]; +//#endregion +//#region rules/dot-location/types.d.ts + +type DotLocationSchema0 = 'object' | 'property'; +type DotLocationRuleOptions = [DotLocationSchema0?]; +//#endregion +//#region rules/eol-last/types.d.ts + +type EolLastSchema0 = 'always' | 'never' | 'unix' | 'windows'; +type EolLastRuleOptions = [EolLastSchema0?]; +//#endregion +//#region rules/function-call-argument-newline/types.d.ts + +type FunctionCallArgumentNewlineSchema0 = 'always' | 'never' | 'consistent'; +type FunctionCallArgumentNewlineRuleOptions = [FunctionCallArgumentNewlineSchema0?]; +//#endregion +//#region rules/function-call-spacing/types.d.ts + +type FunctionCallSpacingSchema0 = [] | ['never'] | [] | ['always'] | ['always', { + allowNewlines?: boolean; + optionalChain?: { + before?: boolean; + after?: boolean; + }; +}]; +type FunctionCallSpacingRuleOptions = FunctionCallSpacingSchema0; +//#endregion +//#region rules/function-paren-newline/types.d.ts + +type FunctionParenNewlineSchema0 = ('always' | 'never' | 'consistent' | 'multiline' | 'multiline-arguments') | { + minItems?: number; +}; +type FunctionParenNewlineRuleOptions = [FunctionParenNewlineSchema0?]; +//#endregion +//#region rules/generator-star-spacing/types.d.ts + +type GeneratorStarSpacingSchema0 = ('before' | 'after' | 'both' | 'neither') | { + before?: boolean; + after?: boolean; + named?: ('before' | 'after' | 'both' | 'neither') | { + before?: boolean; + after?: boolean; + }; + anonymous?: ('before' | 'after' | 'both' | 'neither') | { + before?: boolean; + after?: boolean; + }; + method?: ('before' | 'after' | 'both' | 'neither') | { + before?: boolean; + after?: boolean; + }; + shorthand?: ('before' | 'after' | 'both' | 'neither') | { + before?: boolean; + after?: boolean; + }; +}; +type GeneratorStarSpacingRuleOptions = [GeneratorStarSpacingSchema0?]; +//#endregion +//#region rules/implicit-arrow-linebreak/types.d.ts + +type ImplicitArrowLinebreakSchema0 = 'beside' | 'below'; +type ImplicitArrowLinebreakRuleOptions = [ImplicitArrowLinebreakSchema0?]; +//#endregion +//#region rules/indent-binary-ops/types.d.ts + +type IndentBinaryOpsSchema0 = number | 'tab'; +type IndentBinaryOpsRuleOptions = [IndentBinaryOpsSchema0?]; +//#endregion +//#region rules/indent/types.d.ts + +type IndentSchema0 = 'tab' | number; +interface IndentSchema1 { + SwitchCase?: number; + VariableDeclarator?: (number | ('first' | 'off')) | { + var?: number | ('first' | 'off'); + let?: number | ('first' | 'off'); + const?: number | ('first' | 'off'); + using?: number | ('first' | 'off'); + }; + assignmentOperator?: number | 'off'; + outerIIFEBody?: number | 'off'; + MemberExpression?: number | 'off'; + FunctionDeclaration?: { + parameters?: number | ('first' | 'off'); + body?: number; + returnType?: number; + }; + FunctionExpression?: { + parameters?: number | ('first' | 'off'); + body?: number; + returnType?: number; + }; + StaticBlock?: { + body?: number; + }; + CallExpression?: { + arguments?: number | ('first' | 'off'); + }; + ArrayExpression?: number | ('first' | 'off'); + ObjectExpression?: number | ('first' | 'off'); + ImportDeclaration?: number | ('first' | 'off'); + flatTernaryExpressions?: boolean; + offsetTernaryExpressions?: boolean; + offsetTernaryExpressionsOffsetCallExpressions?: boolean; + ignoredNodes?: string[]; + ignoreComments?: boolean; + tabLength?: number; +} +type IndentRuleOptions = [IndentSchema0?, IndentSchema1?]; +//#endregion +//#region rules/jsx-child-element-spacing/types.d.ts + +type JsxChildElementSpacingRuleOptions = []; +//#endregion +//#region rules/jsx-closing-bracket-location/types.d.ts + +type JsxClosingBracketLocationSchema0 = ('after-props' | 'props-aligned' | 'tag-aligned' | 'line-aligned') | { + location?: 'after-props' | 'props-aligned' | 'tag-aligned' | 'line-aligned'; +} | { + nonEmpty?: ('after-props' | 'props-aligned' | 'tag-aligned' | 'line-aligned') | false; + selfClosing?: ('after-props' | 'props-aligned' | 'tag-aligned' | 'line-aligned') | false; +}; +type JsxClosingBracketLocationRuleOptions = [JsxClosingBracketLocationSchema0?]; +//#endregion +//#region rules/jsx-closing-tag-location/types.d.ts + +type JsxClosingTagLocationSchema0 = 'tag-aligned' | 'line-aligned'; +type JsxClosingTagLocationRuleOptions = [JsxClosingTagLocationSchema0?]; +//#endregion +//#region rules/jsx-curly-brace-presence/types.d.ts + +type JsxCurlyBracePresenceSchema0 = { + props?: 'always' | 'never' | 'ignore'; + children?: 'always' | 'never' | 'ignore'; + propElementValues?: 'always' | 'never' | 'ignore'; +} | ('always' | 'never' | 'ignore'); +type JsxCurlyBracePresenceRuleOptions = [JsxCurlyBracePresenceSchema0?]; +//#endregion +//#region rules/jsx-curly-newline/types.d.ts + +type JsxCurlyNewlineSchema0 = ('consistent' | 'never') | { + singleline?: 'consistent' | 'require' | 'forbid'; + multiline?: 'consistent' | 'require' | 'forbid'; +}; +type JsxCurlyNewlineRuleOptions = [JsxCurlyNewlineSchema0?]; +//#endregion +//#region rules/jsx-curly-spacing/types.d.ts + +type JsxCurlySpacingSchema0 = [] | [{ + when?: 'always' | 'never'; + allowMultiline?: boolean; + spacing?: { + objectLiterals?: 'always' | 'never'; + }; + attributes?: { + when?: 'always' | 'never'; + allowMultiline?: boolean; + spacing?: { + objectLiterals?: 'always' | 'never'; + }; + } | boolean; + children?: { + when?: 'always' | 'never'; + allowMultiline?: boolean; + spacing?: { + objectLiterals?: 'always' | 'never'; + }; + } | boolean; +} | ('always' | 'never')] | [({ + when?: 'always' | 'never'; + allowMultiline?: boolean; + spacing?: { + objectLiterals?: 'always' | 'never'; + }; + attributes?: { + when?: 'always' | 'never'; + allowMultiline?: boolean; + spacing?: { + objectLiterals?: 'always' | 'never'; + }; + } | boolean; + children?: { + when?: 'always' | 'never'; + allowMultiline?: boolean; + spacing?: { + objectLiterals?: 'always' | 'never'; + }; + } | boolean; +} | ('always' | 'never')), { + allowMultiline?: boolean; + spacing?: { + objectLiterals?: 'always' | 'never'; + }; +}]; +type JsxCurlySpacingRuleOptions = JsxCurlySpacingSchema0; +//#endregion +//#region rules/jsx-equals-spacing/types.d.ts + +type JsxEqualsSpacingSchema0 = 'always' | 'never'; +type JsxEqualsSpacingRuleOptions = [JsxEqualsSpacingSchema0?]; +//#endregion +//#region rules/jsx-first-prop-new-line/types.d.ts + +type JsxFirstPropNewLineSchema0 = 'always' | 'never' | 'multiline' | 'multiline-multiprop' | 'multiprop'; +type JsxFirstPropNewLineRuleOptions = [JsxFirstPropNewLineSchema0?]; +//#endregion +//#region rules/jsx-function-call-newline/types.d.ts + +type JsxFunctionCallNewlineSchema0 = 'always' | 'multiline'; +type JsxFunctionCallNewlineRuleOptions = [JsxFunctionCallNewlineSchema0?]; +//#endregion +//#region rules/jsx-indent-props/types.d.ts + +type JsxIndentPropsSchema0 = ('tab' | 'first') | number | { + indentMode?: ('tab' | 'first') | number; + ignoreTernaryOperator?: boolean; +}; +type JsxIndentPropsRuleOptions = [JsxIndentPropsSchema0?]; +//#endregion +//#region rules/jsx-indent/types.d.ts + +type JsxIndentSchema0 = 'tab' | number; +interface JsxIndentSchema1 { + checkAttributes?: boolean; + indentLogicalExpressions?: boolean; +} +type JsxIndentRuleOptions = [JsxIndentSchema0?, JsxIndentSchema1?]; +//#endregion +//#region rules/jsx-max-props-per-line/types.d.ts + +type JsxMaxPropsPerLineSchema0 = { + maximum?: { + single?: number; + multi?: number; + }; +} | { + maximum?: number; + when?: 'always' | 'multiline'; +}; +type JsxMaxPropsPerLineRuleOptions = [JsxMaxPropsPerLineSchema0?]; +//#endregion +//#region rules/jsx-newline/types.d.ts + +interface JsxNewlineSchema0 { + prevent?: boolean; + allowMultilines?: boolean; +} +type JsxNewlineRuleOptions = [JsxNewlineSchema0?]; +//#endregion +//#region rules/jsx-one-expression-per-line/types.d.ts + +interface JsxOneExpressionPerLineSchema0 { + allow?: 'none' | 'literal' | 'single-child' | 'single-line' | 'non-jsx'; +} +type JsxOneExpressionPerLineRuleOptions = [JsxOneExpressionPerLineSchema0?]; +//#endregion +//#region rules/jsx-pascal-case/types.d.ts + +interface JsxPascalCaseSchema0 { + allowAllCaps?: boolean; + allowLeadingUnderscore?: boolean; + allowNamespace?: boolean; + ignore?: string[]; +} +type JsxPascalCaseRuleOptions = [JsxPascalCaseSchema0?]; +//#endregion +//#region rules/jsx-props-no-multi-spaces/types.d.ts + +type JsxPropsNoMultiSpacesRuleOptions = []; +//#endregion +//#region rules/jsx-quotes/types.d.ts + +type JsxQuotesSchema0 = 'prefer-single' | 'prefer-double'; +type JsxQuotesRuleOptions = [JsxQuotesSchema0?]; +//#endregion +//#region rules/jsx-self-closing-comp/types.d.ts + +interface JsxSelfClosingCompSchema0 { + component?: boolean; + html?: boolean; +} +type JsxSelfClosingCompRuleOptions = [JsxSelfClosingCompSchema0?]; +//#endregion +//#region rules/jsx-sort-props/types.d.ts + +interface JsxSortPropsSchema0 { + callbacksLast?: boolean; + shorthandFirst?: boolean; + shorthandLast?: boolean; + multiline?: 'ignore' | 'first' | 'last'; + ignoreCase?: boolean; + noSortAlphabetically?: boolean; + reservedFirst?: string[] | boolean; + reservedLast?: string[]; + locale?: string; +} +type JsxSortPropsRuleOptions = [JsxSortPropsSchema0?]; +//#endregion +//#region rules/jsx-tag-spacing/types.d.ts + +interface JsxTagSpacingSchema0 { + closingSlash?: 'always' | 'never' | 'allow'; + beforeSelfClosing?: 'always' | 'proportional-always' | 'never' | 'allow'; + afterOpening?: 'always' | 'allow-multiline' | 'never' | 'allow'; + beforeClosing?: 'always' | 'proportional-always' | 'never' | 'allow'; +} +type JsxTagSpacingRuleOptions = [JsxTagSpacingSchema0?]; +//#endregion +//#region rules/jsx-wrap-multilines/types.d.ts + +interface JsxWrapMultilinesSchema0 { + declaration?: true | false | 'ignore' | 'parens' | 'parens-new-line'; + assignment?: true | false | 'ignore' | 'parens' | 'parens-new-line'; + return?: true | false | 'ignore' | 'parens' | 'parens-new-line'; + arrow?: true | false | 'ignore' | 'parens' | 'parens-new-line'; + condition?: true | false | 'ignore' | 'parens' | 'parens-new-line'; + logical?: true | false | 'ignore' | 'parens' | 'parens-new-line'; + prop?: true | false | 'ignore' | 'parens' | 'parens-new-line'; + propertyValue?: true | false | 'ignore' | 'parens' | 'parens-new-line'; +} +type JsxWrapMultilinesRuleOptions = [JsxWrapMultilinesSchema0?]; +//#endregion +//#region rules/key-spacing/types.d.ts + +type KeySpacingSchema0 = { + align?: ('colon' | 'value') | { + mode?: 'strict' | 'minimum'; + on?: 'colon' | 'value'; + beforeColon?: boolean; + afterColon?: boolean; + }; + mode?: 'strict' | 'minimum'; + beforeColon?: boolean; + afterColon?: boolean; + ignoredNodes?: ('ObjectExpression' | 'ObjectPattern' | 'ImportDeclaration' | 'ExportNamedDeclaration' | 'ExportAllDeclaration' | 'TSTypeLiteral' | 'TSInterfaceBody' | 'ClassBody')[]; +} | { + singleLine?: { + mode?: 'strict' | 'minimum'; + beforeColon?: boolean; + afterColon?: boolean; + }; + multiLine?: { + align?: ('colon' | 'value') | { + mode?: 'strict' | 'minimum'; + on?: 'colon' | 'value'; + beforeColon?: boolean; + afterColon?: boolean; + }; + mode?: 'strict' | 'minimum'; + beforeColon?: boolean; + afterColon?: boolean; + }; +} | { + singleLine?: { + mode?: 'strict' | 'minimum'; + beforeColon?: boolean; + afterColon?: boolean; + }; + multiLine?: { + mode?: 'strict' | 'minimum'; + beforeColon?: boolean; + afterColon?: boolean; + }; + align?: { + mode?: 'strict' | 'minimum'; + on?: 'colon' | 'value'; + beforeColon?: boolean; + afterColon?: boolean; + }; +}; +type KeySpacingRuleOptions = [KeySpacingSchema0?]; +//#endregion +//#region rules/keyword-spacing/types.d.ts + +interface KeywordSpacingSchema0 { + before?: boolean; + after?: boolean; + overrides?: { + abstract?: { + before?: boolean; + after?: boolean; + }; + boolean?: { + before?: boolean; + after?: boolean; + }; + break?: { + before?: boolean; + after?: boolean; + }; + byte?: { + before?: boolean; + after?: boolean; + }; + case?: { + before?: boolean; + after?: boolean; + }; + catch?: { + before?: boolean; + after?: boolean; + }; + char?: { + before?: boolean; + after?: boolean; + }; + class?: { + before?: boolean; + after?: boolean; + }; + const?: { + before?: boolean; + after?: boolean; + }; + continue?: { + before?: boolean; + after?: boolean; + }; + debugger?: { + before?: boolean; + after?: boolean; + }; + default?: { + before?: boolean; + after?: boolean; + }; + delete?: { + before?: boolean; + after?: boolean; + }; + do?: { + before?: boolean; + after?: boolean; + }; + double?: { + before?: boolean; + after?: boolean; + }; + else?: { + before?: boolean; + after?: boolean; + }; + enum?: { + before?: boolean; + after?: boolean; + }; + export?: { + before?: boolean; + after?: boolean; + }; + extends?: { + before?: boolean; + after?: boolean; + }; + false?: { + before?: boolean; + after?: boolean; + }; + final?: { + before?: boolean; + after?: boolean; + }; + finally?: { + before?: boolean; + after?: boolean; + }; + float?: { + before?: boolean; + after?: boolean; + }; + for?: { + before?: boolean; + after?: boolean; + }; + function?: { + before?: boolean; + after?: boolean; + }; + goto?: { + before?: boolean; + after?: boolean; + }; + if?: { + before?: boolean; + after?: boolean; + }; + implements?: { + before?: boolean; + after?: boolean; + }; + import?: { + before?: boolean; + after?: boolean; + }; + in?: { + before?: boolean; + after?: boolean; + }; + instanceof?: { + before?: boolean; + after?: boolean; + }; + int?: { + before?: boolean; + after?: boolean; + }; + interface?: { + before?: boolean; + after?: boolean; + }; + long?: { + before?: boolean; + after?: boolean; + }; + native?: { + before?: boolean; + after?: boolean; + }; + new?: { + before?: boolean; + after?: boolean; + }; + null?: { + before?: boolean; + after?: boolean; + }; + package?: { + before?: boolean; + after?: boolean; + }; + private?: { + before?: boolean; + after?: boolean; + }; + protected?: { + before?: boolean; + after?: boolean; + }; + public?: { + before?: boolean; + after?: boolean; + }; + return?: { + before?: boolean; + after?: boolean; + }; + short?: { + before?: boolean; + after?: boolean; + }; + static?: { + before?: boolean; + after?: boolean; + }; + super?: { + before?: boolean; + after?: boolean; + }; + switch?: { + before?: boolean; + after?: boolean; + }; + synchronized?: { + before?: boolean; + after?: boolean; + }; + this?: { + before?: boolean; + after?: boolean; + }; + throw?: { + before?: boolean; + after?: boolean; + }; + throws?: { + before?: boolean; + after?: boolean; + }; + transient?: { + before?: boolean; + after?: boolean; + }; + true?: { + before?: boolean; + after?: boolean; + }; + try?: { + before?: boolean; + after?: boolean; + }; + typeof?: { + before?: boolean; + after?: boolean; + }; + var?: { + before?: boolean; + after?: boolean; + }; + void?: { + before?: boolean; + after?: boolean; + }; + volatile?: { + before?: boolean; + after?: boolean; + }; + while?: { + before?: boolean; + after?: boolean; + }; + with?: { + before?: boolean; + after?: boolean; + }; + arguments?: { + before?: boolean; + after?: boolean; + }; + as?: { + before?: boolean; + after?: boolean; + }; + async?: { + before?: boolean; + after?: boolean; + }; + await?: { + before?: boolean; + after?: boolean; + }; + eval?: { + before?: boolean; + after?: boolean; + }; + from?: { + before?: boolean; + after?: boolean; + }; + get?: { + before?: boolean; + after?: boolean; + }; + let?: { + before?: boolean; + after?: boolean; + }; + of?: { + before?: boolean; + after?: boolean; + }; + set?: { + before?: boolean; + after?: boolean; + }; + type?: { + before?: boolean; + after?: boolean; + }; + using?: { + before?: boolean; + after?: boolean; + }; + yield?: { + before?: boolean; + after?: boolean; + }; + accessor?: { + before?: boolean; + after?: boolean; + }; + satisfies?: { + before?: boolean; + after?: boolean; + }; + }; +} +type KeywordSpacingRuleOptions = [KeywordSpacingSchema0?]; +//#endregion +//#region rules/line-comment-position/types.d.ts + +type LineCommentPositionSchema0 = ('above' | 'beside') | { + position?: 'above' | 'beside'; + ignorePattern?: string; + applyDefaultPatterns?: boolean; + applyDefaultIgnorePatterns?: boolean; +}; +type LineCommentPositionRuleOptions = [LineCommentPositionSchema0?]; +//#endregion +//#region rules/linebreak-style/types.d.ts + +type LinebreakStyleSchema0 = 'unix' | 'windows'; +type LinebreakStyleRuleOptions = [LinebreakStyleSchema0?]; +//#endregion +//#region rules/lines-around-comment/types.d.ts + +interface LinesAroundCommentSchema0 { + beforeBlockComment?: boolean; + afterBlockComment?: boolean; + beforeLineComment?: boolean; + afterLineComment?: boolean; + allowBlockStart?: boolean; + allowBlockEnd?: boolean; + allowClassStart?: boolean; + allowClassEnd?: boolean; + allowObjectStart?: boolean; + allowObjectEnd?: boolean; + allowArrayStart?: boolean; + allowArrayEnd?: boolean; + allowInterfaceStart?: boolean; + allowInterfaceEnd?: boolean; + allowTypeStart?: boolean; + allowTypeEnd?: boolean; + allowEnumStart?: boolean; + allowEnumEnd?: boolean; + allowModuleStart?: boolean; + allowModuleEnd?: boolean; + ignorePattern?: string; + applyDefaultIgnorePatterns?: boolean; + afterHashbangComment?: boolean; +} +type LinesAroundCommentRuleOptions = [LinesAroundCommentSchema0?]; +//#endregion +//#region rules/lines-between-class-members/types.d.ts + +type LinesBetweenClassMembersSchema0 = { + /** + * @minItems 1 + */ + enforce: [{ + blankLine: 'always' | 'never'; + prev: 'method' | 'field' | '*'; + next: 'method' | 'field' | '*'; + }, ...{ + blankLine: 'always' | 'never'; + prev: 'method' | 'field' | '*'; + next: 'method' | 'field' | '*'; + }[]]; +} | ('always' | 'never'); +interface LinesBetweenClassMembersSchema1 { + exceptAfterSingleLine?: boolean; + exceptAfterOverload?: boolean; +} +type LinesBetweenClassMembersRuleOptions = [LinesBetweenClassMembersSchema0?, LinesBetweenClassMembersSchema1?]; +//#endregion +//#region rules/max-len/types.d.ts + +type MaxLenSchema0 = { + code?: number; + comments?: number; + tabWidth?: number; + ignorePattern?: string; + ignoreComments?: boolean; + ignoreStrings?: boolean; + ignoreUrls?: boolean; + ignoreTemplateLiterals?: boolean; + ignoreRegExpLiterals?: boolean; + ignoreTrailingComments?: boolean; +} | number; +type MaxLenSchema1 = { + code?: number; + comments?: number; + tabWidth?: number; + ignorePattern?: string; + ignoreComments?: boolean; + ignoreStrings?: boolean; + ignoreUrls?: boolean; + ignoreTemplateLiterals?: boolean; + ignoreRegExpLiterals?: boolean; + ignoreTrailingComments?: boolean; +} | number; +interface MaxLenSchema2 { + code?: number; + comments?: number; + tabWidth?: number; + ignorePattern?: string; + ignoreComments?: boolean; + ignoreStrings?: boolean; + ignoreUrls?: boolean; + ignoreTemplateLiterals?: boolean; + ignoreRegExpLiterals?: boolean; + ignoreTrailingComments?: boolean; +} +type MaxLenRuleOptions = [MaxLenSchema0?, MaxLenSchema1?, MaxLenSchema2?]; +//#endregion +//#region rules/max-statements-per-line/types.d.ts + +interface MaxStatementsPerLineSchema0 { + max?: number; + ignoredNodes?: ('BreakStatement' | 'ClassDeclaration' | 'ContinueStatement' | 'DebuggerStatement' | 'DoWhileStatement' | 'ExpressionStatement' | 'ForInStatement' | 'ForOfStatement' | 'ForStatement' | 'FunctionDeclaration' | 'IfStatement' | 'ImportDeclaration' | 'LabeledStatement' | 'ReturnStatement' | 'SwitchStatement' | 'ThrowStatement' | 'TryStatement' | 'VariableDeclaration' | 'WhileStatement' | 'WithStatement' | 'ExportNamedDeclaration' | 'ExportDefaultDeclaration' | 'ExportAllDeclaration')[]; +} +type MaxStatementsPerLineRuleOptions = [MaxStatementsPerLineSchema0?]; +//#endregion +//#region rules/member-delimiter-style/types.d.ts + +type MultiLineOption = 'none' | 'semi' | 'comma'; +type SingleLineOption = 'semi' | 'comma'; +interface MemberDelimiterStyleSchema0 { + multiline?: { + delimiter?: MultiLineOption; + requireLast?: boolean; + }; + singleline?: { + delimiter?: SingleLineOption; + requireLast?: boolean; + }; + overrides?: { + interface?: DelimiterConfig; + typeLiteral?: DelimiterConfig; + }; + multilineDetection?: 'brackets' | 'last-member'; +} +interface DelimiterConfig { + multiline?: { + delimiter?: MultiLineOption; + requireLast?: boolean; + }; + singleline?: { + delimiter?: SingleLineOption; + requireLast?: boolean; + }; +} +type MemberDelimiterStyleRuleOptions = [MemberDelimiterStyleSchema0?]; +//#endregion +//#region rules/multiline-comment-style/types.d.ts + +type MultilineCommentStyleSchema0 = [] | ['starred-block' | 'bare-block'] | [] | ['separate-lines'] | ['separate-lines', { + checkJSDoc?: boolean; + checkExclamation?: boolean; +}]; +type MultilineCommentStyleRuleOptions = MultilineCommentStyleSchema0; +//#endregion +//#region rules/multiline-ternary/types.d.ts + +type MultilineTernarySchema0 = 'always' | 'always-multiline' | 'never'; +interface MultilineTernarySchema1 { + ignoreJSX?: boolean; +} +type MultilineTernaryRuleOptions = [MultilineTernarySchema0?, MultilineTernarySchema1?]; +//#endregion +//#region rules/new-parens/types.d.ts + +type NewParensSchema0 = 'always' | 'never'; +type NewParensRuleOptions = [NewParensSchema0?]; +//#endregion +//#region rules/newline-per-chained-call/types.d.ts + +interface NewlinePerChainedCallSchema0 { + ignoreChainWithDepth?: number; +} +type NewlinePerChainedCallRuleOptions = [NewlinePerChainedCallSchema0?]; +//#endregion +//#region rules/no-confusing-arrow/types.d.ts + +interface NoConfusingArrowSchema0 { + allowParens?: boolean; + onlyOneSimpleParam?: boolean; +} +type NoConfusingArrowRuleOptions = [NoConfusingArrowSchema0?]; +//#endregion +//#region rules/no-extra-parens/types.d.ts + +type NoExtraParensSchema0 = [] | ['functions'] | [] | ['all'] | ['all', { + conditionalAssign?: boolean; + ternaryOperandBinaryExpressions?: boolean; + nestedBinaryExpressions?: boolean; + returnAssign?: boolean; + ignoreJSX?: 'none' | 'all' | 'single-line' | 'multi-line'; + enforceForArrowConditionals?: boolean; + enforceForSequenceExpressions?: boolean; + enforceForNewInMemberExpressions?: boolean; + enforceForFunctionPrototypeMethods?: boolean; + allowParensAfterCommentPattern?: string; + nestedConditionalExpressions?: boolean; + allowNodesInSpreadElement?: { + ConditionalExpression?: boolean; + LogicalExpression?: boolean; + AwaitExpression?: boolean; + }; + ignoredNodes?: string[]; +}]; +type NoExtraParensRuleOptions = NoExtraParensSchema0; +//#endregion +//#region rules/no-extra-semi/types.d.ts + +type NoExtraSemiRuleOptions = []; +//#endregion +//#region rules/no-floating-decimal/types.d.ts + +type NoFloatingDecimalRuleOptions = []; +//#endregion +//#region rules/no-mixed-operators/types.d.ts + +interface NoMixedOperatorsSchema0 { + groups?: [('+' | '-' | '*' | '/' | '%' | '**' | '&' | '|' | '^' | '~' | '<<' | '>>' | '>>>' | '==' | '!=' | '===' | '!==' | '>' | '>=' | '<' | '<=' | '&&' | '||' | 'in' | 'instanceof' | '?:' | '??'), ('+' | '-' | '*' | '/' | '%' | '**' | '&' | '|' | '^' | '~' | '<<' | '>>' | '>>>' | '==' | '!=' | '===' | '!==' | '>' | '>=' | '<' | '<=' | '&&' | '||' | 'in' | 'instanceof' | '?:' | '??'), ...('+' | '-' | '*' | '/' | '%' | '**' | '&' | '|' | '^' | '~' | '<<' | '>>' | '>>>' | '==' | '!=' | '===' | '!==' | '>' | '>=' | '<' | '<=' | '&&' | '||' | 'in' | 'instanceof' | '?:' | '??')[]][]; + allowSamePrecedence?: boolean; +} +type NoMixedOperatorsRuleOptions = [NoMixedOperatorsSchema0?]; +//#endregion +//#region rules/no-mixed-spaces-and-tabs/types.d.ts + +type NoMixedSpacesAndTabsSchema0 = 'smart-tabs' | boolean; +type NoMixedSpacesAndTabsRuleOptions = [NoMixedSpacesAndTabsSchema0?]; +//#endregion +//#region rules/no-multi-spaces/types.d.ts + +interface NoMultiSpacesSchema0 { + exceptions?: { + [k: string]: boolean; + }; + ignoreEOLComments?: boolean; + includeTabs?: boolean; +} +type NoMultiSpacesRuleOptions = [NoMultiSpacesSchema0?]; +//#endregion +//#region rules/no-multiple-empty-lines/types.d.ts + +interface NoMultipleEmptyLinesSchema0 { + max: number; + maxEOF?: number; + maxBOF?: number; +} +type NoMultipleEmptyLinesRuleOptions = [NoMultipleEmptyLinesSchema0?]; +//#endregion +//#region rules/no-tabs/types.d.ts + +interface NoTabsSchema0 { + allowIndentationTabs?: boolean; +} +type NoTabsRuleOptions = [NoTabsSchema0?]; +//#endregion +//#region rules/no-trailing-spaces/types.d.ts + +interface NoTrailingSpacesSchema0 { + skipBlankLines?: boolean; + ignoreComments?: boolean; +} +type NoTrailingSpacesRuleOptions = [NoTrailingSpacesSchema0?]; +//#endregion +//#region rules/no-whitespace-before-property/types.d.ts + +type NoWhitespaceBeforePropertyRuleOptions = []; +//#endregion +//#region rules/nonblock-statement-body-position/types.d.ts + +type NonblockStatementBodyPositionSchema0 = 'beside' | 'below' | 'any'; +interface NonblockStatementBodyPositionSchema1 { + overrides?: { + if?: 'beside' | 'below' | 'any'; + else?: 'beside' | 'below' | 'any'; + while?: 'beside' | 'below' | 'any'; + do?: 'beside' | 'below' | 'any'; + for?: 'beside' | 'below' | 'any'; + }; +} +type NonblockStatementBodyPositionRuleOptions = [NonblockStatementBodyPositionSchema0?, NonblockStatementBodyPositionSchema1?]; +//#endregion +//#region rules/object-curly-newline/types.d.ts + +type ObjectCurlyNewlineSchema0 = (('always' | 'never') | { + multiline?: boolean; + minProperties?: number; + consistent?: boolean; +}) | { + ObjectExpression?: ('always' | 'never') | { + multiline?: boolean; + minProperties?: number; + consistent?: boolean; + }; + ObjectPattern?: ('always' | 'never') | { + multiline?: boolean; + minProperties?: number; + consistent?: boolean; + }; + ImportDeclaration?: ('always' | 'never') | { + multiline?: boolean; + minProperties?: number; + consistent?: boolean; + }; + ExportDeclaration?: ('always' | 'never') | { + multiline?: boolean; + minProperties?: number; + consistent?: boolean; + }; + TSTypeLiteral?: ('always' | 'never') | { + multiline?: boolean; + minProperties?: number; + consistent?: boolean; + }; + TSInterfaceBody?: ('always' | 'never') | { + multiline?: boolean; + minProperties?: number; + consistent?: boolean; + }; + TSEnumBody?: ('always' | 'never') | { + multiline?: boolean; + minProperties?: number; + consistent?: boolean; + }; +}; +type ObjectCurlyNewlineRuleOptions = [ObjectCurlyNewlineSchema0?]; +//#endregion +//#region rules/object-curly-spacing/types.d.ts + +type ObjectCurlySpacingSchema0 = 'always' | 'never'; +interface ObjectCurlySpacingSchema1 { + arraysInObjects?: boolean; + objectsInObjects?: boolean; + overrides?: { + ObjectPattern?: 'always' | 'never'; + ObjectExpression?: 'always' | 'never'; + ImportDeclaration?: 'always' | 'never'; + ImportAttributes?: 'always' | 'never'; + ExportNamedDeclaration?: 'always' | 'never'; + ExportAllDeclaration?: 'always' | 'never'; + TSMappedType?: 'always' | 'never'; + TSTypeLiteral?: 'always' | 'never'; + TSInterfaceBody?: 'always' | 'never'; + TSEnumBody?: 'always' | 'never'; + }; +} +type ObjectCurlySpacingRuleOptions = [ObjectCurlySpacingSchema0?, ObjectCurlySpacingSchema1?]; +//#endregion +//#region rules/object-property-newline/types.d.ts + +interface ObjectPropertyNewlineSchema0 { + allowAllPropertiesOnSameLine?: boolean; +} +type ObjectPropertyNewlineRuleOptions = [ObjectPropertyNewlineSchema0?]; +//#endregion +//#region rules/one-var-declaration-per-line/types.d.ts + +type OneVarDeclarationPerLineSchema0 = 'always' | 'initializations'; +type OneVarDeclarationPerLineRuleOptions = [OneVarDeclarationPerLineSchema0?]; +//#endregion +//#region rules/operator-linebreak/types.d.ts + +type OperatorLinebreakSchema0 = ('after' | 'before' | 'none') | null; +interface OperatorLinebreakSchema1 { + overrides?: { + [k: string]: 'after' | 'before' | 'none' | 'ignore'; + }; +} +type OperatorLinebreakRuleOptions = [OperatorLinebreakSchema0?, OperatorLinebreakSchema1?]; +//#endregion +//#region rules/padded-blocks/types.d.ts + +type PaddedBlocksSchema0 = ('always' | 'never' | 'start' | 'end') | { + blocks?: 'always' | 'never' | 'start' | 'end'; + switches?: 'always' | 'never' | 'start' | 'end'; + classes?: 'always' | 'never' | 'start' | 'end'; +}; +interface PaddedBlocksSchema1 { + allowSingleLineBlocks?: boolean; +} +type PaddedBlocksRuleOptions = [PaddedBlocksSchema0?, PaddedBlocksSchema1?]; +//#endregion +//#region rules/padding-line-between-statements/types.d.ts + +type PaddingType = 'any' | 'never' | 'always'; +type StatementOption = StatementType | [StatementType, ...StatementType[]]; +type StatementType = '*' | 'exports' | 'require' | 'directive' | 'iife' | 'block' | 'empty' | 'function' | 'ts-method' | 'break' | 'case' | 'class' | 'continue' | 'debugger' | 'default' | 'do' | 'for' | 'if' | 'import' | 'switch' | 'throw' | 'try' | 'while' | 'with' | 'cjs-export' | 'cjs-import' | 'enum' | 'interface' | 'function-overload' | 'block-like' | 'singleline-block-like' | 'multiline-block-like' | 'expression' | 'singleline-expression' | 'multiline-expression' | 'return' | 'singleline-return' | 'multiline-return' | 'export' | 'singleline-export' | 'multiline-export' | 'var' | 'singleline-var' | 'multiline-var' | 'let' | 'singleline-let' | 'multiline-let' | 'const' | 'singleline-const' | 'multiline-const' | 'using' | 'singleline-using' | 'multiline-using' | 'type' | 'singleline-type' | 'multiline-type'; +type PaddingLineBetweenStatementsSchema0 = { + blankLine: PaddingType; + prev: StatementOption; + next: StatementOption; +}[]; +type PaddingLineBetweenStatementsRuleOptions = PaddingLineBetweenStatementsSchema0; +//#endregion +//#region rules/quote-props/types.d.ts + +type QuotePropsSchema0 = [] | ['always' | 'as-needed' | 'consistent' | 'consistent-as-needed'] | [] | ['always' | 'as-needed' | 'consistent' | 'consistent-as-needed'] | [('always' | 'as-needed' | 'consistent' | 'consistent-as-needed'), { + keywords?: boolean; + unnecessary?: boolean; + numbers?: boolean; +}]; +type QuotePropsRuleOptions = QuotePropsSchema0; +//#endregion +//#region rules/quotes/types.d.ts + +type QuotesSchema0 = 'single' | 'double' | 'backtick'; +type QuotesSchema1 = 'avoid-escape' | { + avoidEscape?: boolean; + allowTemplateLiterals?: boolean | ('never' | 'avoidEscape' | 'always'); + ignoreStringLiterals?: boolean; +}; +type QuotesRuleOptions = [QuotesSchema0?, QuotesSchema1?]; +//#endregion +//#region rules/rest-spread-spacing/types.d.ts + +type RestSpreadSpacingSchema0 = 'always' | 'never'; +type RestSpreadSpacingRuleOptions = [RestSpreadSpacingSchema0?]; +//#endregion +//#region rules/semi-spacing/types.d.ts + +interface SemiSpacingSchema0 { + before?: boolean; + after?: boolean; +} +type SemiSpacingRuleOptions = [SemiSpacingSchema0?]; +//#endregion +//#region rules/semi-style/types.d.ts + +type SemiStyleSchema0 = 'last' | 'first'; +type SemiStyleRuleOptions = [SemiStyleSchema0?]; +//#endregion +//#region rules/semi/types.d.ts + +type SemiSchema0 = [] | ['never'] | ['never', { + beforeStatementContinuationChars?: 'always' | 'any' | 'never'; +}] | [] | ['always'] | ['always', { + omitLastInOneLineBlock?: boolean; + omitLastInOneLineClassBody?: boolean; +}]; +type SemiRuleOptions = SemiSchema0; +//#endregion +//#region rules/space-before-blocks/types.d.ts + +type SpaceBeforeBlocksSchema0 = ('always' | 'never') | { + keywords?: 'always' | 'never' | 'off'; + functions?: 'always' | 'never' | 'off'; + classes?: 'always' | 'never' | 'off'; + modules?: 'always' | 'never' | 'off'; +}; +type SpaceBeforeBlocksRuleOptions = [SpaceBeforeBlocksSchema0?]; +//#endregion +//#region rules/space-before-function-paren/types.d.ts + +type SpaceBeforeFunctionParenSchema0 = ('always' | 'never') | { + anonymous?: 'always' | 'never' | 'ignore'; + named?: 'always' | 'never' | 'ignore'; + asyncArrow?: 'always' | 'never' | 'ignore'; + catch?: 'always' | 'never' | 'ignore'; +}; +type SpaceBeforeFunctionParenRuleOptions = [SpaceBeforeFunctionParenSchema0?]; +//#endregion +//#region rules/space-in-parens/types.d.ts + +type SpaceInParensSchema0 = 'always' | 'never'; +interface SpaceInParensSchema1 { + exceptions?: ('{}' | '[]' | '()' | 'empty')[]; +} +type SpaceInParensRuleOptions = [SpaceInParensSchema0?, SpaceInParensSchema1?]; +//#endregion +//#region rules/space-infix-ops/types.d.ts + +interface SpaceInfixOpsSchema0 { + int32Hint?: boolean; + ignoreTypes?: boolean; +} +type SpaceInfixOpsRuleOptions = [SpaceInfixOpsSchema0?]; +//#endregion +//#region rules/space-unary-ops/types.d.ts + +interface SpaceUnaryOpsSchema0 { + words?: boolean; + nonwords?: boolean; + overrides?: { + [k: string]: boolean; + }; +} +type SpaceUnaryOpsRuleOptions = [SpaceUnaryOpsSchema0?]; +//#endregion +//#region rules/spaced-comment/types.d.ts + +type SpacedCommentSchema0 = 'always' | 'never'; +interface SpacedCommentSchema1 { + exceptions?: string[]; + markers?: string[]; + line?: { + exceptions?: string[]; + markers?: string[]; + }; + block?: { + exceptions?: string[]; + markers?: string[]; + balanced?: boolean; + }; +} +type SpacedCommentRuleOptions = [SpacedCommentSchema0?, SpacedCommentSchema1?]; +//#endregion +//#region rules/switch-colon-spacing/types.d.ts + +interface SwitchColonSpacingSchema0 { + before?: boolean; + after?: boolean; +} +type SwitchColonSpacingRuleOptions = [SwitchColonSpacingSchema0?]; +//#endregion +//#region rules/template-curly-spacing/types.d.ts + +type TemplateCurlySpacingSchema0 = 'always' | 'never'; +type TemplateCurlySpacingRuleOptions = [TemplateCurlySpacingSchema0?]; +//#endregion +//#region rules/template-tag-spacing/types.d.ts + +type TemplateTagSpacingSchema0 = 'always' | 'never'; +type TemplateTagSpacingRuleOptions = [TemplateTagSpacingSchema0?]; +//#endregion +//#region rules/type-annotation-spacing/types.d.ts + +interface TypeAnnotationSpacingSchema0 { + before?: boolean; + after?: boolean; + overrides?: { + colon?: SpacingConfig; + arrow?: SpacingConfig; + variable?: SpacingConfig; + parameter?: SpacingConfig; + property?: SpacingConfig; + returnType?: SpacingConfig; + }; +} +interface SpacingConfig { + before?: boolean; + after?: boolean; +} +type TypeAnnotationSpacingRuleOptions = [TypeAnnotationSpacingSchema0?]; +//#endregion +//#region rules/type-generic-spacing/types.d.ts + +type TypeGenericSpacingRuleOptions = []; +//#endregion +//#region rules/type-named-tuple-spacing/types.d.ts + +type TypeNamedTupleSpacingRuleOptions = []; +//#endregion +//#region rules/wrap-iife/types.d.ts + +type WrapIifeSchema0 = 'outside' | 'inside' | 'any'; +interface WrapIifeSchema1 { + functionPrototypeMethods?: boolean; +} +type WrapIifeRuleOptions = [WrapIifeSchema0?, WrapIifeSchema1?]; +//#endregion +//#region rules/wrap-regex/types.d.ts + +type WrapRegexRuleOptions = []; +//#endregion +//#region rules/yield-star-spacing/types.d.ts + +type YieldStarSpacingSchema0 = ('before' | 'after' | 'both' | 'neither') | { + before?: boolean; + after?: boolean; +}; +type YieldStarSpacingRuleOptions = [YieldStarSpacingSchema0?]; +//#endregion +//#region dts/rule-options.d.ts +interface RuleOptions { + /** + * Enforce linebreaks after opening and before closing array brackets + * @see https://eslint.style/rules/array-bracket-newline + */ + '@stylistic/array-bracket-newline': ArrayBracketNewlineRuleOptions; + /** + * Enforce consistent spacing inside array brackets + * @see https://eslint.style/rules/array-bracket-spacing + */ + '@stylistic/array-bracket-spacing': ArrayBracketSpacingRuleOptions; + /** + * Enforce line breaks after each array element + * @see https://eslint.style/rules/array-element-newline + */ + '@stylistic/array-element-newline': ArrayElementNewlineRuleOptions; + /** + * Require parentheses around arrow function arguments + * @see https://eslint.style/rules/arrow-parens + */ + '@stylistic/arrow-parens': ArrowParensRuleOptions; + /** + * Enforce consistent spacing before and after the arrow in arrow functions + * @see https://eslint.style/rules/arrow-spacing + */ + '@stylistic/arrow-spacing': ArrowSpacingRuleOptions; + /** + * Disallow or enforce spaces inside of blocks after opening block and before closing block + * @see https://eslint.style/rules/block-spacing + */ + '@stylistic/block-spacing': BlockSpacingRuleOptions; + /** + * Enforce consistent brace style for blocks + * @see https://eslint.style/rules/brace-style + */ + '@stylistic/brace-style': BraceStyleRuleOptions; + /** + * Require or disallow trailing commas + * @see https://eslint.style/rules/comma-dangle + */ + '@stylistic/comma-dangle': CommaDangleRuleOptions; + /** + * Enforce consistent spacing before and after commas + * @see https://eslint.style/rules/comma-spacing + */ + '@stylistic/comma-spacing': CommaSpacingRuleOptions; + /** + * Enforce consistent comma style + * @see https://eslint.style/rules/comma-style + */ + '@stylistic/comma-style': CommaStyleRuleOptions; + /** + * Enforce consistent spacing inside computed property brackets + * @see https://eslint.style/rules/computed-property-spacing + */ + '@stylistic/computed-property-spacing': ComputedPropertySpacingRuleOptions; + /** + * Enforce consistent line breaks after opening and before closing braces + * @see https://eslint.style/rules/curly-newline + */ + '@stylistic/curly-newline': CurlyNewlineRuleOptions; + /** + * Enforce consistent newlines before and after dots + * @see https://eslint.style/rules/dot-location + */ + '@stylistic/dot-location': DotLocationRuleOptions; + /** + * Require or disallow newline at the end of files + * @see https://eslint.style/rules/eol-last + */ + '@stylistic/eol-last': EolLastRuleOptions; + /** + * Enforce line breaks between arguments of a function call + * @see https://eslint.style/rules/function-call-argument-newline + */ + '@stylistic/function-call-argument-newline': FunctionCallArgumentNewlineRuleOptions; + /** + * Require or disallow spacing between function identifiers and their invocations + * @see https://eslint.style/rules/function-call-spacing + */ + '@stylistic/function-call-spacing': FunctionCallSpacingRuleOptions; + /** + * Enforce consistent line breaks inside function parentheses + * @see https://eslint.style/rules/function-paren-newline + */ + '@stylistic/function-paren-newline': FunctionParenNewlineRuleOptions; + /** + * Enforce consistent spacing around `*` operators in generator functions + * @see https://eslint.style/rules/generator-star-spacing + */ + '@stylistic/generator-star-spacing': GeneratorStarSpacingRuleOptions; + /** + * Enforce the location of arrow function bodies + * @see https://eslint.style/rules/implicit-arrow-linebreak + */ + '@stylistic/implicit-arrow-linebreak': ImplicitArrowLinebreakRuleOptions; + /** + * Enforce consistent indentation + * @see https://eslint.style/rules/indent + */ + '@stylistic/indent': IndentRuleOptions; + /** + * Indentation for binary operators + * @see https://eslint.style/rules/indent-binary-ops + */ + '@stylistic/indent-binary-ops': IndentBinaryOpsRuleOptions; + /** + * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions + * @see https://eslint.style/rules/jsx-child-element-spacing + */ + '@stylistic/jsx-child-element-spacing': JsxChildElementSpacingRuleOptions; + /** + * Enforce closing bracket location in JSX + * @see https://eslint.style/rules/jsx-closing-bracket-location + */ + '@stylistic/jsx-closing-bracket-location': JsxClosingBracketLocationRuleOptions; + /** + * Enforce closing tag location for multiline JSX + * @see https://eslint.style/rules/jsx-closing-tag-location + */ + '@stylistic/jsx-closing-tag-location': JsxClosingTagLocationRuleOptions; + /** + * Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes + * @see https://eslint.style/rules/jsx-curly-brace-presence + */ + '@stylistic/jsx-curly-brace-presence': JsxCurlyBracePresenceRuleOptions; + /** + * Enforce consistent linebreaks in curly braces in JSX attributes and expressions + * @see https://eslint.style/rules/jsx-curly-newline + */ + '@stylistic/jsx-curly-newline': JsxCurlyNewlineRuleOptions; + /** + * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions + * @see https://eslint.style/rules/jsx-curly-spacing + */ + '@stylistic/jsx-curly-spacing': JsxCurlySpacingRuleOptions; + /** + * Enforce or disallow spaces around equal signs in JSX attributes + * @see https://eslint.style/rules/jsx-equals-spacing + */ + '@stylistic/jsx-equals-spacing': JsxEqualsSpacingRuleOptions; + /** + * Enforce proper position of the first property in JSX + * @see https://eslint.style/rules/jsx-first-prop-new-line + */ + '@stylistic/jsx-first-prop-new-line': JsxFirstPropNewLineRuleOptions; + /** + * Enforce line breaks before and after JSX elements when they are used as arguments to a function. + * @see https://eslint.style/rules/jsx-function-call-newline + */ + '@stylistic/jsx-function-call-newline': JsxFunctionCallNewlineRuleOptions; + /** + * Enforce JSX indentation. Deprecated, use `indent` rule instead. + * @see https://eslint.style/rules/jsx-indent + */ + '@stylistic/jsx-indent': JsxIndentRuleOptions; + /** + * Enforce props indentation in JSX + * @see https://eslint.style/rules/jsx-indent-props + */ + '@stylistic/jsx-indent-props': JsxIndentPropsRuleOptions; + /** + * Enforce maximum of props on a single line in JSX + * @see https://eslint.style/rules/jsx-max-props-per-line + */ + '@stylistic/jsx-max-props-per-line': JsxMaxPropsPerLineRuleOptions; + /** + * Require or prevent a new line after jsx elements and expressions. + * @see https://eslint.style/rules/jsx-newline + */ + '@stylistic/jsx-newline': JsxNewlineRuleOptions; + /** + * Require one JSX element per line + * @see https://eslint.style/rules/jsx-one-expression-per-line + */ + '@stylistic/jsx-one-expression-per-line': JsxOneExpressionPerLineRuleOptions; + /** + * Enforce PascalCase for user-defined JSX components + * @see https://eslint.style/rules/jsx-pascal-case + */ + '@stylistic/jsx-pascal-case': JsxPascalCaseRuleOptions; + /** + * Disallow multiple spaces between inline JSX props. Deprecated, use `no-multi-spaces` rule instead. + * @see https://eslint.style/rules/jsx-props-no-multi-spaces + */ + '@stylistic/jsx-props-no-multi-spaces': JsxPropsNoMultiSpacesRuleOptions; + /** + * Enforce the consistent use of either double or single quotes in JSX attributes + * @see https://eslint.style/rules/jsx-quotes + */ + '@stylistic/jsx-quotes': JsxQuotesRuleOptions; + /** + * Disallow extra closing tags for components without children + * @see https://eslint.style/rules/jsx-self-closing-comp + */ + '@stylistic/jsx-self-closing-comp': JsxSelfClosingCompRuleOptions; + /** + * Enforce props alphabetical sorting + * @see https://eslint.style/rules/jsx-sort-props + */ + '@stylistic/jsx-sort-props': JsxSortPropsRuleOptions; + /** + * Enforce whitespace in and around the JSX opening and closing brackets + * @see https://eslint.style/rules/jsx-tag-spacing + */ + '@stylistic/jsx-tag-spacing': JsxTagSpacingRuleOptions; + /** + * Disallow missing parentheses around multiline JSX + * @see https://eslint.style/rules/jsx-wrap-multilines + */ + '@stylistic/jsx-wrap-multilines': JsxWrapMultilinesRuleOptions; + /** + * Enforce consistent spacing between property names and type annotations in types and interfaces + * @see https://eslint.style/rules/key-spacing + */ + '@stylistic/key-spacing': KeySpacingRuleOptions; + /** + * Enforce consistent spacing before and after keywords + * @see https://eslint.style/rules/keyword-spacing + */ + '@stylistic/keyword-spacing': KeywordSpacingRuleOptions; + /** + * Enforce position of line comments + * @see https://eslint.style/rules/line-comment-position + */ + '@stylistic/line-comment-position': LineCommentPositionRuleOptions; + /** + * Enforce consistent linebreak style + * @see https://eslint.style/rules/linebreak-style + */ + '@stylistic/linebreak-style': LinebreakStyleRuleOptions; + /** + * Require empty lines around comments + * @see https://eslint.style/rules/lines-around-comment + */ + '@stylistic/lines-around-comment': LinesAroundCommentRuleOptions; + /** + * Require or disallow an empty line between class members + * @see https://eslint.style/rules/lines-between-class-members + */ + '@stylistic/lines-between-class-members': LinesBetweenClassMembersRuleOptions; + /** + * Enforce a maximum line length + * @see https://eslint.style/rules/max-len + */ + '@stylistic/max-len': MaxLenRuleOptions; + /** + * Enforce a maximum number of statements allowed per line + * @see https://eslint.style/rules/max-statements-per-line + */ + '@stylistic/max-statements-per-line': MaxStatementsPerLineRuleOptions; + /** + * Require a specific member delimiter style for interfaces and type literals + * @see https://eslint.style/rules/member-delimiter-style + */ + '@stylistic/member-delimiter-style': MemberDelimiterStyleRuleOptions; + /** + * Enforce a particular style for multiline comments + * @see https://eslint.style/rules/multiline-comment-style + */ + '@stylistic/multiline-comment-style': MultilineCommentStyleRuleOptions; + /** + * Enforce newlines between operands of ternary expressions + * @see https://eslint.style/rules/multiline-ternary + */ + '@stylistic/multiline-ternary': MultilineTernaryRuleOptions; + /** + * Enforce or disallow parentheses when invoking a constructor with no arguments + * @see https://eslint.style/rules/new-parens + */ + '@stylistic/new-parens': NewParensRuleOptions; + /** + * Require a newline after each call in a method chain + * @see https://eslint.style/rules/newline-per-chained-call + */ + '@stylistic/newline-per-chained-call': NewlinePerChainedCallRuleOptions; + /** + * Disallow arrow functions where they could be confused with comparisons + * @see https://eslint.style/rules/no-confusing-arrow + */ + '@stylistic/no-confusing-arrow': NoConfusingArrowRuleOptions; + /** + * Disallow unnecessary parentheses + * @see https://eslint.style/rules/no-extra-parens + */ + '@stylistic/no-extra-parens': NoExtraParensRuleOptions; + /** + * Disallow unnecessary semicolons + * @see https://eslint.style/rules/no-extra-semi + */ + '@stylistic/no-extra-semi': NoExtraSemiRuleOptions; + /** + * Disallow leading or trailing decimal points in numeric literals + * @see https://eslint.style/rules/no-floating-decimal + */ + '@stylistic/no-floating-decimal': NoFloatingDecimalRuleOptions; + /** + * Disallow mixed binary operators + * @see https://eslint.style/rules/no-mixed-operators + */ + '@stylistic/no-mixed-operators': NoMixedOperatorsRuleOptions; + /** + * Disallow mixed spaces and tabs for indentation + * @see https://eslint.style/rules/no-mixed-spaces-and-tabs + */ + '@stylistic/no-mixed-spaces-and-tabs': NoMixedSpacesAndTabsRuleOptions; + /** + * Disallow multiple spaces + * @see https://eslint.style/rules/no-multi-spaces + */ + '@stylistic/no-multi-spaces': NoMultiSpacesRuleOptions; + /** + * Disallow multiple empty lines + * @see https://eslint.style/rules/no-multiple-empty-lines + */ + '@stylistic/no-multiple-empty-lines': NoMultipleEmptyLinesRuleOptions; + /** + * Disallow all tabs + * @see https://eslint.style/rules/no-tabs + */ + '@stylistic/no-tabs': NoTabsRuleOptions; + /** + * Disallow trailing whitespace at the end of lines + * @see https://eslint.style/rules/no-trailing-spaces + */ + '@stylistic/no-trailing-spaces': NoTrailingSpacesRuleOptions; + /** + * Disallow whitespace before properties + * @see https://eslint.style/rules/no-whitespace-before-property + */ + '@stylistic/no-whitespace-before-property': NoWhitespaceBeforePropertyRuleOptions; + /** + * Enforce the location of single-line statements + * @see https://eslint.style/rules/nonblock-statement-body-position + */ + '@stylistic/nonblock-statement-body-position': NonblockStatementBodyPositionRuleOptions; + /** + * Enforce consistent line breaks after opening and before closing braces + * @see https://eslint.style/rules/object-curly-newline + */ + '@stylistic/object-curly-newline': ObjectCurlyNewlineRuleOptions; + /** + * Enforce consistent spacing inside braces + * @see https://eslint.style/rules/object-curly-spacing + */ + '@stylistic/object-curly-spacing': ObjectCurlySpacingRuleOptions; + /** + * Enforce placing object properties on separate lines + * @see https://eslint.style/rules/object-property-newline + */ + '@stylistic/object-property-newline': ObjectPropertyNewlineRuleOptions; + /** + * Require or disallow newlines around variable declarations + * @see https://eslint.style/rules/one-var-declaration-per-line + */ + '@stylistic/one-var-declaration-per-line': OneVarDeclarationPerLineRuleOptions; + /** + * Enforce consistent linebreak style for operators + * @see https://eslint.style/rules/operator-linebreak + */ + '@stylistic/operator-linebreak': OperatorLinebreakRuleOptions; + /** + * Require or disallow padding within blocks + * @see https://eslint.style/rules/padded-blocks + */ + '@stylistic/padded-blocks': PaddedBlocksRuleOptions; + /** + * Require or disallow padding lines between statements + * @see https://eslint.style/rules/padding-line-between-statements + */ + '@stylistic/padding-line-between-statements': PaddingLineBetweenStatementsRuleOptions; + /** + * Require quotes around object literal, type literal, interfaces and enums property names + * @see https://eslint.style/rules/quote-props + */ + '@stylistic/quote-props': QuotePropsRuleOptions; + /** + * Enforce the consistent use of either backticks, double, or single quotes + * @see https://eslint.style/rules/quotes + */ + '@stylistic/quotes': QuotesRuleOptions; + /** + * Enforce spacing between rest and spread operators and their expressions + * @see https://eslint.style/rules/rest-spread-spacing + */ + '@stylistic/rest-spread-spacing': RestSpreadSpacingRuleOptions; + /** + * Require or disallow semicolons instead of ASI + * @see https://eslint.style/rules/semi + */ + '@stylistic/semi': SemiRuleOptions; + /** + * Enforce consistent spacing before and after semicolons + * @see https://eslint.style/rules/semi-spacing + */ + '@stylistic/semi-spacing': SemiSpacingRuleOptions; + /** + * Enforce location of semicolons + * @see https://eslint.style/rules/semi-style + */ + '@stylistic/semi-style': SemiStyleRuleOptions; + /** + * Enforce consistent spacing before blocks + * @see https://eslint.style/rules/space-before-blocks + */ + '@stylistic/space-before-blocks': SpaceBeforeBlocksRuleOptions; + /** + * Enforce consistent spacing before function parenthesis + * @see https://eslint.style/rules/space-before-function-paren + */ + '@stylistic/space-before-function-paren': SpaceBeforeFunctionParenRuleOptions; + /** + * Enforce consistent spacing inside parentheses + * @see https://eslint.style/rules/space-in-parens + */ + '@stylistic/space-in-parens': SpaceInParensRuleOptions; + /** + * Require spacing around infix operators + * @see https://eslint.style/rules/space-infix-ops + */ + '@stylistic/space-infix-ops': SpaceInfixOpsRuleOptions; + /** + * Enforce consistent spacing before or after unary operators + * @see https://eslint.style/rules/space-unary-ops + */ + '@stylistic/space-unary-ops': SpaceUnaryOpsRuleOptions; + /** + * Enforce consistent spacing after the `//` or `/*` in a comment + * @see https://eslint.style/rules/spaced-comment + */ + '@stylistic/spaced-comment': SpacedCommentRuleOptions; + /** + * Enforce spacing around colons of switch statements + * @see https://eslint.style/rules/switch-colon-spacing + */ + '@stylistic/switch-colon-spacing': SwitchColonSpacingRuleOptions; + /** + * Require or disallow spacing around embedded expressions of template strings + * @see https://eslint.style/rules/template-curly-spacing + */ + '@stylistic/template-curly-spacing': TemplateCurlySpacingRuleOptions; + /** + * Require or disallow spacing between template tags and their literals + * @see https://eslint.style/rules/template-tag-spacing + */ + '@stylistic/template-tag-spacing': TemplateTagSpacingRuleOptions; + /** + * Require consistent spacing around type annotations + * @see https://eslint.style/rules/type-annotation-spacing + */ + '@stylistic/type-annotation-spacing': TypeAnnotationSpacingRuleOptions; + /** + * Enforces consistent spacing inside TypeScript type generics + * @see https://eslint.style/rules/type-generic-spacing + */ + '@stylistic/type-generic-spacing': TypeGenericSpacingRuleOptions; + /** + * Expect space before the type declaration in the named tuple + * @see https://eslint.style/rules/type-named-tuple-spacing + */ + '@stylistic/type-named-tuple-spacing': TypeNamedTupleSpacingRuleOptions; + /** + * Require parentheses around immediate `function` invocations + * @see https://eslint.style/rules/wrap-iife + */ + '@stylistic/wrap-iife': WrapIifeRuleOptions; + /** + * Require parenthesis around regex literals + * @see https://eslint.style/rules/wrap-regex + */ + '@stylistic/wrap-regex': WrapRegexRuleOptions; + /** + * Require or disallow spacing around the `*` in `yield*` expressions + * @see https://eslint.style/rules/yield-star-spacing + */ + '@stylistic/yield-star-spacing': YieldStarSpacingRuleOptions; +} +interface UnprefixedRuleOptions { + /** + * Enforce linebreaks after opening and before closing array brackets + * @see https://eslint.style/rules/array-bracket-newline + */ + 'array-bracket-newline': ArrayBracketNewlineRuleOptions; + /** + * Enforce consistent spacing inside array brackets + * @see https://eslint.style/rules/array-bracket-spacing + */ + 'array-bracket-spacing': ArrayBracketSpacingRuleOptions; + /** + * Enforce line breaks after each array element + * @see https://eslint.style/rules/array-element-newline + */ + 'array-element-newline': ArrayElementNewlineRuleOptions; + /** + * Require parentheses around arrow function arguments + * @see https://eslint.style/rules/arrow-parens + */ + 'arrow-parens': ArrowParensRuleOptions; + /** + * Enforce consistent spacing before and after the arrow in arrow functions + * @see https://eslint.style/rules/arrow-spacing + */ + 'arrow-spacing': ArrowSpacingRuleOptions; + /** + * Disallow or enforce spaces inside of blocks after opening block and before closing block + * @see https://eslint.style/rules/block-spacing + */ + 'block-spacing': BlockSpacingRuleOptions; + /** + * Enforce consistent brace style for blocks + * @see https://eslint.style/rules/brace-style + */ + 'brace-style': BraceStyleRuleOptions; + /** + * Require or disallow trailing commas + * @see https://eslint.style/rules/comma-dangle + */ + 'comma-dangle': CommaDangleRuleOptions; + /** + * Enforce consistent spacing before and after commas + * @see https://eslint.style/rules/comma-spacing + */ + 'comma-spacing': CommaSpacingRuleOptions; + /** + * Enforce consistent comma style + * @see https://eslint.style/rules/comma-style + */ + 'comma-style': CommaStyleRuleOptions; + /** + * Enforce consistent spacing inside computed property brackets + * @see https://eslint.style/rules/computed-property-spacing + */ + 'computed-property-spacing': ComputedPropertySpacingRuleOptions; + /** + * Enforce consistent line breaks after opening and before closing braces + * @see https://eslint.style/rules/curly-newline + */ + 'curly-newline': CurlyNewlineRuleOptions; + /** + * Enforce consistent newlines before and after dots + * @see https://eslint.style/rules/dot-location + */ + 'dot-location': DotLocationRuleOptions; + /** + * Require or disallow newline at the end of files + * @see https://eslint.style/rules/eol-last + */ + 'eol-last': EolLastRuleOptions; + /** + * Enforce line breaks between arguments of a function call + * @see https://eslint.style/rules/function-call-argument-newline + */ + 'function-call-argument-newline': FunctionCallArgumentNewlineRuleOptions; + /** + * Require or disallow spacing between function identifiers and their invocations + * @see https://eslint.style/rules/function-call-spacing + */ + 'function-call-spacing': FunctionCallSpacingRuleOptions; + /** + * Enforce consistent line breaks inside function parentheses + * @see https://eslint.style/rules/function-paren-newline + */ + 'function-paren-newline': FunctionParenNewlineRuleOptions; + /** + * Enforce consistent spacing around `*` operators in generator functions + * @see https://eslint.style/rules/generator-star-spacing + */ + 'generator-star-spacing': GeneratorStarSpacingRuleOptions; + /** + * Enforce the location of arrow function bodies + * @see https://eslint.style/rules/implicit-arrow-linebreak + */ + 'implicit-arrow-linebreak': ImplicitArrowLinebreakRuleOptions; + /** + * Enforce consistent indentation + * @see https://eslint.style/rules/indent + */ + 'indent': IndentRuleOptions; + /** + * Indentation for binary operators + * @see https://eslint.style/rules/indent-binary-ops + */ + 'indent-binary-ops': IndentBinaryOpsRuleOptions; + /** + * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions + * @see https://eslint.style/rules/jsx-child-element-spacing + */ + 'jsx-child-element-spacing': JsxChildElementSpacingRuleOptions; + /** + * Enforce closing bracket location in JSX + * @see https://eslint.style/rules/jsx-closing-bracket-location + */ + 'jsx-closing-bracket-location': JsxClosingBracketLocationRuleOptions; + /** + * Enforce closing tag location for multiline JSX + * @see https://eslint.style/rules/jsx-closing-tag-location + */ + 'jsx-closing-tag-location': JsxClosingTagLocationRuleOptions; + /** + * Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes + * @see https://eslint.style/rules/jsx-curly-brace-presence + */ + 'jsx-curly-brace-presence': JsxCurlyBracePresenceRuleOptions; + /** + * Enforce consistent linebreaks in curly braces in JSX attributes and expressions + * @see https://eslint.style/rules/jsx-curly-newline + */ + 'jsx-curly-newline': JsxCurlyNewlineRuleOptions; + /** + * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions + * @see https://eslint.style/rules/jsx-curly-spacing + */ + 'jsx-curly-spacing': JsxCurlySpacingRuleOptions; + /** + * Enforce or disallow spaces around equal signs in JSX attributes + * @see https://eslint.style/rules/jsx-equals-spacing + */ + 'jsx-equals-spacing': JsxEqualsSpacingRuleOptions; + /** + * Enforce proper position of the first property in JSX + * @see https://eslint.style/rules/jsx-first-prop-new-line + */ + 'jsx-first-prop-new-line': JsxFirstPropNewLineRuleOptions; + /** + * Enforce line breaks before and after JSX elements when they are used as arguments to a function. + * @see https://eslint.style/rules/jsx-function-call-newline + */ + 'jsx-function-call-newline': JsxFunctionCallNewlineRuleOptions; + /** + * Enforce JSX indentation. Deprecated, use `indent` rule instead. + * @see https://eslint.style/rules/jsx-indent + */ + 'jsx-indent': JsxIndentRuleOptions; + /** + * Enforce props indentation in JSX + * @see https://eslint.style/rules/jsx-indent-props + */ + 'jsx-indent-props': JsxIndentPropsRuleOptions; + /** + * Enforce maximum of props on a single line in JSX + * @see https://eslint.style/rules/jsx-max-props-per-line + */ + 'jsx-max-props-per-line': JsxMaxPropsPerLineRuleOptions; + /** + * Require or prevent a new line after jsx elements and expressions. + * @see https://eslint.style/rules/jsx-newline + */ + 'jsx-newline': JsxNewlineRuleOptions; + /** + * Require one JSX element per line + * @see https://eslint.style/rules/jsx-one-expression-per-line + */ + 'jsx-one-expression-per-line': JsxOneExpressionPerLineRuleOptions; + /** + * Enforce PascalCase for user-defined JSX components + * @see https://eslint.style/rules/jsx-pascal-case + */ + 'jsx-pascal-case': JsxPascalCaseRuleOptions; + /** + * Disallow multiple spaces between inline JSX props. Deprecated, use `no-multi-spaces` rule instead. + * @see https://eslint.style/rules/jsx-props-no-multi-spaces + */ + 'jsx-props-no-multi-spaces': JsxPropsNoMultiSpacesRuleOptions; + /** + * Enforce the consistent use of either double or single quotes in JSX attributes + * @see https://eslint.style/rules/jsx-quotes + */ + 'jsx-quotes': JsxQuotesRuleOptions; + /** + * Disallow extra closing tags for components without children + * @see https://eslint.style/rules/jsx-self-closing-comp + */ + 'jsx-self-closing-comp': JsxSelfClosingCompRuleOptions; + /** + * Enforce props alphabetical sorting + * @see https://eslint.style/rules/jsx-sort-props + */ + 'jsx-sort-props': JsxSortPropsRuleOptions; + /** + * Enforce whitespace in and around the JSX opening and closing brackets + * @see https://eslint.style/rules/jsx-tag-spacing + */ + 'jsx-tag-spacing': JsxTagSpacingRuleOptions; + /** + * Disallow missing parentheses around multiline JSX + * @see https://eslint.style/rules/jsx-wrap-multilines + */ + 'jsx-wrap-multilines': JsxWrapMultilinesRuleOptions; + /** + * Enforce consistent spacing between property names and type annotations in types and interfaces + * @see https://eslint.style/rules/key-spacing + */ + 'key-spacing': KeySpacingRuleOptions; + /** + * Enforce consistent spacing before and after keywords + * @see https://eslint.style/rules/keyword-spacing + */ + 'keyword-spacing': KeywordSpacingRuleOptions; + /** + * Enforce position of line comments + * @see https://eslint.style/rules/line-comment-position + */ + 'line-comment-position': LineCommentPositionRuleOptions; + /** + * Enforce consistent linebreak style + * @see https://eslint.style/rules/linebreak-style + */ + 'linebreak-style': LinebreakStyleRuleOptions; + /** + * Require empty lines around comments + * @see https://eslint.style/rules/lines-around-comment + */ + 'lines-around-comment': LinesAroundCommentRuleOptions; + /** + * Require or disallow an empty line between class members + * @see https://eslint.style/rules/lines-between-class-members + */ + 'lines-between-class-members': LinesBetweenClassMembersRuleOptions; + /** + * Enforce a maximum line length + * @see https://eslint.style/rules/max-len + */ + 'max-len': MaxLenRuleOptions; + /** + * Enforce a maximum number of statements allowed per line + * @see https://eslint.style/rules/max-statements-per-line + */ + 'max-statements-per-line': MaxStatementsPerLineRuleOptions; + /** + * Require a specific member delimiter style for interfaces and type literals + * @see https://eslint.style/rules/member-delimiter-style + */ + 'member-delimiter-style': MemberDelimiterStyleRuleOptions; + /** + * Enforce a particular style for multiline comments + * @see https://eslint.style/rules/multiline-comment-style + */ + 'multiline-comment-style': MultilineCommentStyleRuleOptions; + /** + * Enforce newlines between operands of ternary expressions + * @see https://eslint.style/rules/multiline-ternary + */ + 'multiline-ternary': MultilineTernaryRuleOptions; + /** + * Enforce or disallow parentheses when invoking a constructor with no arguments + * @see https://eslint.style/rules/new-parens + */ + 'new-parens': NewParensRuleOptions; + /** + * Require a newline after each call in a method chain + * @see https://eslint.style/rules/newline-per-chained-call + */ + 'newline-per-chained-call': NewlinePerChainedCallRuleOptions; + /** + * Disallow arrow functions where they could be confused with comparisons + * @see https://eslint.style/rules/no-confusing-arrow + */ + 'no-confusing-arrow': NoConfusingArrowRuleOptions; + /** + * Disallow unnecessary parentheses + * @see https://eslint.style/rules/no-extra-parens + */ + 'no-extra-parens': NoExtraParensRuleOptions; + /** + * Disallow unnecessary semicolons + * @see https://eslint.style/rules/no-extra-semi + */ + 'no-extra-semi': NoExtraSemiRuleOptions; + /** + * Disallow leading or trailing decimal points in numeric literals + * @see https://eslint.style/rules/no-floating-decimal + */ + 'no-floating-decimal': NoFloatingDecimalRuleOptions; + /** + * Disallow mixed binary operators + * @see https://eslint.style/rules/no-mixed-operators + */ + 'no-mixed-operators': NoMixedOperatorsRuleOptions; + /** + * Disallow mixed spaces and tabs for indentation + * @see https://eslint.style/rules/no-mixed-spaces-and-tabs + */ + 'no-mixed-spaces-and-tabs': NoMixedSpacesAndTabsRuleOptions; + /** + * Disallow multiple spaces + * @see https://eslint.style/rules/no-multi-spaces + */ + 'no-multi-spaces': NoMultiSpacesRuleOptions; + /** + * Disallow multiple empty lines + * @see https://eslint.style/rules/no-multiple-empty-lines + */ + 'no-multiple-empty-lines': NoMultipleEmptyLinesRuleOptions; + /** + * Disallow all tabs + * @see https://eslint.style/rules/no-tabs + */ + 'no-tabs': NoTabsRuleOptions; + /** + * Disallow trailing whitespace at the end of lines + * @see https://eslint.style/rules/no-trailing-spaces + */ + 'no-trailing-spaces': NoTrailingSpacesRuleOptions; + /** + * Disallow whitespace before properties + * @see https://eslint.style/rules/no-whitespace-before-property + */ + 'no-whitespace-before-property': NoWhitespaceBeforePropertyRuleOptions; + /** + * Enforce the location of single-line statements + * @see https://eslint.style/rules/nonblock-statement-body-position + */ + 'nonblock-statement-body-position': NonblockStatementBodyPositionRuleOptions; + /** + * Enforce consistent line breaks after opening and before closing braces + * @see https://eslint.style/rules/object-curly-newline + */ + 'object-curly-newline': ObjectCurlyNewlineRuleOptions; + /** + * Enforce consistent spacing inside braces + * @see https://eslint.style/rules/object-curly-spacing + */ + 'object-curly-spacing': ObjectCurlySpacingRuleOptions; + /** + * Enforce placing object properties on separate lines + * @see https://eslint.style/rules/object-property-newline + */ + 'object-property-newline': ObjectPropertyNewlineRuleOptions; + /** + * Require or disallow newlines around variable declarations + * @see https://eslint.style/rules/one-var-declaration-per-line + */ + 'one-var-declaration-per-line': OneVarDeclarationPerLineRuleOptions; + /** + * Enforce consistent linebreak style for operators + * @see https://eslint.style/rules/operator-linebreak + */ + 'operator-linebreak': OperatorLinebreakRuleOptions; + /** + * Require or disallow padding within blocks + * @see https://eslint.style/rules/padded-blocks + */ + 'padded-blocks': PaddedBlocksRuleOptions; + /** + * Require or disallow padding lines between statements + * @see https://eslint.style/rules/padding-line-between-statements + */ + 'padding-line-between-statements': PaddingLineBetweenStatementsRuleOptions; + /** + * Require quotes around object literal, type literal, interfaces and enums property names + * @see https://eslint.style/rules/quote-props + */ + 'quote-props': QuotePropsRuleOptions; + /** + * Enforce the consistent use of either backticks, double, or single quotes + * @see https://eslint.style/rules/quotes + */ + 'quotes': QuotesRuleOptions; + /** + * Enforce spacing between rest and spread operators and their expressions + * @see https://eslint.style/rules/rest-spread-spacing + */ + 'rest-spread-spacing': RestSpreadSpacingRuleOptions; + /** + * Require or disallow semicolons instead of ASI + * @see https://eslint.style/rules/semi + */ + 'semi': SemiRuleOptions; + /** + * Enforce consistent spacing before and after semicolons + * @see https://eslint.style/rules/semi-spacing + */ + 'semi-spacing': SemiSpacingRuleOptions; + /** + * Enforce location of semicolons + * @see https://eslint.style/rules/semi-style + */ + 'semi-style': SemiStyleRuleOptions; + /** + * Enforce consistent spacing before blocks + * @see https://eslint.style/rules/space-before-blocks + */ + 'space-before-blocks': SpaceBeforeBlocksRuleOptions; + /** + * Enforce consistent spacing before function parenthesis + * @see https://eslint.style/rules/space-before-function-paren + */ + 'space-before-function-paren': SpaceBeforeFunctionParenRuleOptions; + /** + * Enforce consistent spacing inside parentheses + * @see https://eslint.style/rules/space-in-parens + */ + 'space-in-parens': SpaceInParensRuleOptions; + /** + * Require spacing around infix operators + * @see https://eslint.style/rules/space-infix-ops + */ + 'space-infix-ops': SpaceInfixOpsRuleOptions; + /** + * Enforce consistent spacing before or after unary operators + * @see https://eslint.style/rules/space-unary-ops + */ + 'space-unary-ops': SpaceUnaryOpsRuleOptions; + /** + * Enforce consistent spacing after the `//` or `/*` in a comment + * @see https://eslint.style/rules/spaced-comment + */ + 'spaced-comment': SpacedCommentRuleOptions; + /** + * Enforce spacing around colons of switch statements + * @see https://eslint.style/rules/switch-colon-spacing + */ + 'switch-colon-spacing': SwitchColonSpacingRuleOptions; + /** + * Require or disallow spacing around embedded expressions of template strings + * @see https://eslint.style/rules/template-curly-spacing + */ + 'template-curly-spacing': TemplateCurlySpacingRuleOptions; + /** + * Require or disallow spacing between template tags and their literals + * @see https://eslint.style/rules/template-tag-spacing + */ + 'template-tag-spacing': TemplateTagSpacingRuleOptions; + /** + * Require consistent spacing around type annotations + * @see https://eslint.style/rules/type-annotation-spacing + */ + 'type-annotation-spacing': TypeAnnotationSpacingRuleOptions; + /** + * Enforces consistent spacing inside TypeScript type generics + * @see https://eslint.style/rules/type-generic-spacing + */ + 'type-generic-spacing': TypeGenericSpacingRuleOptions; + /** + * Expect space before the type declaration in the named tuple + * @see https://eslint.style/rules/type-named-tuple-spacing + */ + 'type-named-tuple-spacing': TypeNamedTupleSpacingRuleOptions; + /** + * Require parentheses around immediate `function` invocations + * @see https://eslint.style/rules/wrap-iife + */ + 'wrap-iife': WrapIifeRuleOptions; + /** + * Require parenthesis around regex literals + * @see https://eslint.style/rules/wrap-regex + */ + 'wrap-regex': WrapRegexRuleOptions; + /** + * Require or disallow spacing around the `*` in `yield*` expressions + * @see https://eslint.style/rules/yield-star-spacing + */ + 'yield-star-spacing': YieldStarSpacingRuleOptions; +} +//#endregion +export { RuleOptions, UnprefixedRuleOptions }; \ No newline at end of file diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/index.js b/slider/node_modules/@stylistic/eslint-plugin/dist/index.js new file mode 100644 index 0000000..b1ce42f --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/index.js @@ -0,0 +1,100 @@ +import "./utils.js"; +import "./vendor.js"; +import "./rules/array-bracket-newline.js"; +import "./rules/array-bracket-spacing.js"; +import "./rules/array-element-newline.js"; +import "./rules/arrow-parens.js"; +import "./rules/arrow-spacing.js"; +import "./rules/block-spacing.js"; +import "./rules/brace-style.js"; +import "./rules/comma-dangle.js"; +import "./rules/comma-spacing.js"; +import "./rules/comma-style.js"; +import "./rules/computed-property-spacing.js"; +import "./rules/curly-newline.js"; +import "./rules/dot-location.js"; +import "./rules/eol-last.js"; +import "./rules/function-call-argument-newline.js"; +import "./rules/function-call-spacing.js"; +import "./rules/function-paren-newline.js"; +import "./rules/generator-star-spacing.js"; +import "./rules/implicit-arrow-linebreak.js"; +import "./rules/indent-binary-ops.js"; +import "./rules/indent.js"; +import "./rules/jsx-child-element-spacing.js"; +import "./rules/jsx-closing-bracket-location.js"; +import "./rules/jsx-closing-tag-location.js"; +import "./rules/jsx-curly-brace-presence.js"; +import "./rules/jsx-curly-newline.js"; +import "./rules/jsx-curly-spacing.js"; +import "./rules/jsx-equals-spacing.js"; +import "./rules/jsx-first-prop-new-line.js"; +import "./rules/jsx-function-call-newline.js"; +import "./rules/jsx-indent-props.js"; +import "./rules/jsx-indent.js"; +import "./rules/jsx-max-props-per-line.js"; +import "./rules/jsx-newline.js"; +import "./rules/jsx-one-expression-per-line.js"; +import "./rules/jsx-pascal-case.js"; +import "./rules/jsx-props-no-multi-spaces.js"; +import "./rules/jsx-quotes.js"; +import "./rules/jsx-self-closing-comp.js"; +import "./rules/jsx-sort-props.js"; +import "./rules/jsx-tag-spacing.js"; +import "./rules/jsx-wrap-multilines.js"; +import "./rules/key-spacing.js"; +import "./rules/keyword-spacing.js"; +import "./rules/line-comment-position.js"; +import "./rules/linebreak-style.js"; +import "./rules/lines-around-comment.js"; +import "./rules/lines-between-class-members.js"; +import "./rules/max-len.js"; +import "./rules/max-statements-per-line.js"; +import "./rules/member-delimiter-style.js"; +import "./rules/multiline-comment-style.js"; +import "./rules/multiline-ternary.js"; +import "./rules/new-parens.js"; +import "./rules/newline-per-chained-call.js"; +import "./rules/no-confusing-arrow.js"; +import "./rules/no-extra-parens.js"; +import "./rules/no-extra-semi.js"; +import "./rules/no-floating-decimal.js"; +import "./rules/no-mixed-operators.js"; +import "./rules/no-mixed-spaces-and-tabs.js"; +import "./rules/no-multi-spaces.js"; +import "./rules/no-multiple-empty-lines.js"; +import "./rules/no-tabs.js"; +import "./rules/no-trailing-spaces.js"; +import "./rules/no-whitespace-before-property.js"; +import "./rules/nonblock-statement-body-position.js"; +import "./rules/object-curly-newline.js"; +import "./rules/object-curly-spacing.js"; +import "./rules/object-property-newline.js"; +import "./rules/one-var-declaration-per-line.js"; +import "./rules/operator-linebreak.js"; +import "./rules/padded-blocks.js"; +import "./rules/padding-line-between-statements.js"; +import "./rules/quote-props.js"; +import "./rules/quotes.js"; +import "./rules/rest-spread-spacing.js"; +import "./rules/semi-spacing.js"; +import "./rules/semi-style.js"; +import "./rules/semi.js"; +import "./rules/space-before-blocks.js"; +import "./rules/space-before-function-paren.js"; +import "./rules/space-in-parens.js"; +import "./rules/space-infix-ops.js"; +import "./rules/space-unary-ops.js"; +import "./rules/spaced-comment.js"; +import "./rules/switch-colon-spacing.js"; +import "./rules/template-curly-spacing.js"; +import "./rules/template-tag-spacing.js"; +import "./rules/type-annotation-spacing.js"; +import "./rules/type-generic-spacing.js"; +import "./rules/type-named-tuple-spacing.js"; +import "./rules/wrap-iife.js"; +import "./rules/wrap-regex.js"; +import "./rules/yield-star-spacing.js"; +import { configs, plugin_default } from "./configs.js"; +const index = Object.assign(plugin_default, { configs }); +export { index as default, index as "module.exports" }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rolldown-runtime.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rolldown-runtime.js new file mode 100644 index 0000000..307a388 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rolldown-runtime.js @@ -0,0 +1,31 @@ +import { createRequire } from "node:module"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); +var __export = (target, all) => { + for (var name in all) __defProp(target, name, { + get: all[name], + enumerable: true + }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { + key = keys[i]; + if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable + }); + } + return to; +}; +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { + value: mod, + enumerable: true +}) : target, mod)); +var __require = /* @__PURE__ */ createRequire(import.meta.url); +export { __commonJSMin, __export, __reExport, __require, __toESM }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/array-bracket-newline.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/array-bracket-newline.js new file mode 100644 index 0000000..b05561e --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/array-bracket-newline.js @@ -0,0 +1,135 @@ +import { ast_exports, createRule } from "../utils.js"; +var array_bracket_newline_default = createRule({ + name: "array-bracket-newline", + meta: { + type: "layout", + docs: { description: "Enforce linebreaks after opening and before closing array brackets" }, + fixable: "whitespace", + schema: [{ oneOf: [{ + type: "string", + enum: [ + "always", + "never", + "consistent" + ] + }, { + type: "object", + properties: { + multiline: { type: "boolean" }, + minItems: { + type: ["integer", "null"], + minimum: 0 + } + }, + additionalProperties: false + }] }], + messages: { + unexpectedOpeningLinebreak: "There should be no linebreak after '['.", + unexpectedClosingLinebreak: "There should be no linebreak before ']'.", + missingOpeningLinebreak: "A linebreak is required after '['.", + missingClosingLinebreak: "A linebreak is required before ']'." + } + }, + create(context) { + const sourceCode = context.sourceCode; + function normalizeOptionValue(option) { + let consistent = false; + let multiline = false; + let minItems = 0; + if (option) if (option === "consistent") { + consistent = true; + minItems = Number.POSITIVE_INFINITY; + } else if (option === "always" || typeof option !== "string" && option.minItems === 0) minItems = 0; + else if (option === "never") minItems = Number.POSITIVE_INFINITY; + else { + multiline = Boolean(option.multiline); + minItems = option.minItems || Number.POSITIVE_INFINITY; + } + else { + consistent = false; + multiline = true; + minItems = Number.POSITIVE_INFINITY; + } + return { + consistent, + multiline, + minItems + }; + } + function normalizeOptions(options) { + const value = normalizeOptionValue(options); + return { + ArrayExpression: value, + ArrayPattern: value + }; + } + function reportNoBeginningLinebreak(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "unexpectedOpeningLinebreak", + fix(fixer) { + const nextToken = sourceCode.getTokenAfter(token, { includeComments: true }); + if (!nextToken || (0, ast_exports.isCommentToken)(nextToken)) return null; + return fixer.removeRange([token.range[1], nextToken.range[0]]); + } + }); + } + function reportNoEndingLinebreak(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "unexpectedClosingLinebreak", + fix(fixer) { + const previousToken = sourceCode.getTokenBefore(token, { includeComments: true }); + if (!previousToken || (0, ast_exports.isCommentToken)(previousToken)) return null; + return fixer.removeRange([previousToken.range[1], token.range[0]]); + } + }); + } + function reportRequiredBeginningLinebreak(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "missingOpeningLinebreak", + fix(fixer) { + return fixer.insertTextAfter(token, "\n"); + } + }); + } + function reportRequiredEndingLinebreak(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "missingClosingLinebreak", + fix(fixer) { + return fixer.insertTextBefore(token, "\n"); + } + }); + } + function check(node) { + const elements = node.elements; + const normalizedOptions = normalizeOptions(context.options[0]); + const options = normalizedOptions[node.type]; + const openBracket = sourceCode.getFirstToken(node); + const closeBracket = sourceCode.getLastToken(node); + const firstIncComment = sourceCode.getTokenAfter(openBracket, { includeComments: true }); + const lastIncComment = sourceCode.getTokenBefore(closeBracket, { includeComments: true }); + const first = sourceCode.getTokenAfter(openBracket); + const last = sourceCode.getTokenBefore(closeBracket); + const needsLinebreaks = elements.length >= options.minItems || options.multiline && elements.length > 0 && !(0, ast_exports.isTokenOnSameLine)(lastIncComment, firstIncComment) || elements.length === 0 && firstIncComment.type === "Block" && !(0, ast_exports.isTokenOnSameLine)(lastIncComment, firstIncComment) && firstIncComment === lastIncComment || options.consistent && !(0, ast_exports.isTokenOnSameLine)(openBracket, first); + if (needsLinebreaks) { + if ((0, ast_exports.isTokenOnSameLine)(openBracket, first)) reportRequiredBeginningLinebreak(node, openBracket); + if ((0, ast_exports.isTokenOnSameLine)(last, closeBracket)) reportRequiredEndingLinebreak(node, closeBracket); + } else { + if (!(0, ast_exports.isTokenOnSameLine)(openBracket, first)) reportNoBeginningLinebreak(node, openBracket); + if (!(0, ast_exports.isTokenOnSameLine)(last, closeBracket)) reportNoEndingLinebreak(node, closeBracket); + } + } + return { + ArrayPattern: check, + ArrayExpression: check + }; + } +}); +export { array_bracket_newline_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/array-bracket-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/array-bracket-spacing.js new file mode 100644 index 0000000..fd1c11a --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/array-bracket-spacing.js @@ -0,0 +1,122 @@ +import { ast_exports, createRule } from "../utils.js"; +var array_bracket_spacing_default = createRule({ + name: "array-bracket-spacing", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing inside array brackets" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: ["always", "never"] + }, { + type: "object", + properties: { + singleValue: { type: "boolean" }, + objectsInArrays: { type: "boolean" }, + arraysInArrays: { type: "boolean" } + }, + additionalProperties: false + }], + messages: { + unexpectedSpaceAfter: "There should be no space after '{{tokenValue}}'.", + unexpectedSpaceBefore: "There should be no space before '{{tokenValue}}'.", + missingSpaceAfter: "A space is required after '{{tokenValue}}'.", + missingSpaceBefore: "A space is required before '{{tokenValue}}'." + } + }, + create(context) { + const spaced = context.options[0] === "always"; + const sourceCode = context.sourceCode; + function isOptionSet(option) { + return context.options[1] ? context.options[1][option] === !spaced : false; + } + const options = { + spaced, + singleElementException: isOptionSet("singleValue"), + objectsInArraysException: isOptionSet("objectsInArrays"), + arraysInArraysException: isOptionSet("arraysInArrays") + }; + function reportNoBeginningSpace(node, token) { + const nextToken = sourceCode.getTokenAfter(token); + context.report({ + node, + loc: { + start: token.loc.end, + end: nextToken.loc.start + }, + messageId: "unexpectedSpaceAfter", + data: { tokenValue: token.value }, + fix(fixer) { + return fixer.removeRange([token.range[1], nextToken.range[0]]); + } + }); + } + function reportNoEndingSpace(node, token) { + const previousToken = sourceCode.getTokenBefore(token); + context.report({ + node, + loc: { + start: previousToken.loc.end, + end: token.loc.start + }, + messageId: "unexpectedSpaceBefore", + data: { tokenValue: token.value }, + fix(fixer) { + return fixer.removeRange([previousToken.range[1], token.range[0]]); + } + }); + } + function reportRequiredBeginningSpace(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "missingSpaceAfter", + data: { tokenValue: token.value }, + fix(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); + } + function reportRequiredEndingSpace(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "missingSpaceBefore", + data: { tokenValue: token.value }, + fix(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + } + function isObjectType(node) { + return node && (node.type === "ObjectExpression" || node.type === "ObjectPattern"); + } + function isArrayType(node) { + return node && (node.type === "ArrayExpression" || node.type === "ArrayPattern"); + } + function validateArraySpacing(node) { + if (options.spaced && node.elements.length === 0) return; + const first = sourceCode.getFirstToken(node); + const second = sourceCode.getFirstToken(node, 1); + const last = node.type === "ArrayPattern" && node.typeAnnotation ? sourceCode.getTokenBefore(node.typeAnnotation) : sourceCode.getLastToken(node); + const penultimate = sourceCode.getTokenBefore(last); + const firstElement = node.elements[0]; + const lastElement = node.elements[node.elements.length - 1]; + const openingBracketMustBeSpaced = firstElement && options.objectsInArraysException && isObjectType(firstElement) || firstElement && options.arraysInArraysException && isArrayType(firstElement) || options.singleElementException && node.elements.length === 1 ? !options.spaced : options.spaced; + const closingBracketMustBeSpaced = lastElement && options.objectsInArraysException && isObjectType(lastElement) || lastElement && options.arraysInArraysException && isArrayType(lastElement) || options.singleElementException && node.elements.length === 1 ? !options.spaced : options.spaced; + if ((0, ast_exports.isTokenOnSameLine)(first, second)) { + if (openingBracketMustBeSpaced && !sourceCode.isSpaceBetween(first, second)) reportRequiredBeginningSpace(node, first); + if (!openingBracketMustBeSpaced && sourceCode.isSpaceBetween(first, second)) reportNoBeginningSpace(node, first); + } + if (first !== penultimate && (0, ast_exports.isTokenOnSameLine)(penultimate, last)) { + if (closingBracketMustBeSpaced && !sourceCode.isSpaceBetween(penultimate, last)) reportRequiredEndingSpace(node, last); + if (!closingBracketMustBeSpaced && sourceCode.isSpaceBetween(penultimate, last)) reportNoEndingSpace(node, last); + } + } + return { + ArrayPattern: validateArraySpacing, + ArrayExpression: validateArraySpacing + }; + } +}); +export { array_bracket_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/array-element-newline.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/array-element-newline.js new file mode 100644 index 0000000..5eeaa6e --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/array-element-newline.js @@ -0,0 +1,148 @@ +import { ast_exports, createRule, isSingleLine } from "../utils.js"; +var array_element_newline_default = createRule({ + name: "array-element-newline", + meta: { + type: "layout", + docs: { description: "Enforce line breaks after each array element" }, + fixable: "whitespace", + schema: { + definitions: { basicConfig: { oneOf: [{ + type: "string", + enum: [ + "always", + "never", + "consistent" + ] + }, { + type: "object", + properties: { + consistent: { type: "boolean" }, + multiline: { type: "boolean" }, + minItems: { + type: ["integer", "null"], + minimum: 0 + } + }, + additionalProperties: false + }] } }, + type: "array", + items: [{ oneOf: [{ $ref: "#/definitions/basicConfig" }, { + type: "object", + properties: { + ArrayExpression: { $ref: "#/definitions/basicConfig" }, + ArrayPattern: { $ref: "#/definitions/basicConfig" } + }, + additionalProperties: false, + minProperties: 1 + }] }] + }, + messages: { + unexpectedLineBreak: "There should be no linebreak here.", + missingLineBreak: "There should be a linebreak after this element." + } + }, + create(context) { + const sourceCode = context.sourceCode; + function normalizeOptionValue(providedOption) { + let consistent = false; + let multiline = false; + let minItems; + const option = providedOption || "always"; + if (!option || option === "always" || typeof option === "object" && option.minItems === 0) minItems = 0; + else if (option === "never") minItems = Number.POSITIVE_INFINITY; + else if (option === "consistent") { + consistent = true; + minItems = Number.POSITIVE_INFINITY; + } else { + consistent = Boolean(option.consistent); + multiline = Boolean(option.multiline); + minItems = option.minItems || Number.POSITIVE_INFINITY; + } + return { + consistent, + multiline, + minItems + }; + } + function normalizeOptions(options) { + if (options && (options.ArrayExpression || options.ArrayPattern)) { + let expressionOptions, patternOptions; + if (options.ArrayExpression) expressionOptions = normalizeOptionValue(options.ArrayExpression); + if (options.ArrayPattern) patternOptions = normalizeOptionValue(options.ArrayPattern); + return { + ArrayExpression: expressionOptions, + ArrayPattern: patternOptions + }; + } + const value = normalizeOptionValue(options); + return { + ArrayExpression: value, + ArrayPattern: value + }; + } + function reportNoLineBreak(token) { + const tokenBefore = sourceCode.getTokenBefore(token, { includeComments: true }); + context.report({ + loc: { + start: tokenBefore.loc.end, + end: token.loc.start + }, + messageId: "unexpectedLineBreak", + fix(fixer) { + if ((0, ast_exports.isCommentToken)(tokenBefore)) return null; + if (!(0, ast_exports.isTokenOnSameLine)(tokenBefore, token)) return fixer.replaceTextRange([tokenBefore.range[1], token.range[0]], " "); + const twoTokensBefore = sourceCode.getTokenBefore(tokenBefore, { includeComments: true }); + if ((0, ast_exports.isCommentToken)(twoTokensBefore)) return null; + return fixer.replaceTextRange([twoTokensBefore.range[1], tokenBefore.range[0]], ""); + } + }); + } + function reportRequiredLineBreak(token) { + const tokenBefore = sourceCode.getTokenBefore(token, { includeComments: true }); + context.report({ + loc: { + start: tokenBefore.loc.end, + end: token.loc.start + }, + messageId: "missingLineBreak", + fix(fixer) { + return fixer.replaceTextRange([tokenBefore.range[1], token.range[0]], "\n"); + } + }); + } + function check(node) { + const elements = node.elements; + const normalizedOptions = normalizeOptions(context.options[0]); + const options = normalizedOptions[node.type]; + if (!options) return; + let elementBreak = false; + if (options.multiline) elementBreak = elements.some((element) => element !== null && !isSingleLine(element)); + let linebreaksCount = 0; + for (let i = 0; i < node.elements.length; i++) { + const element = node.elements[i]; + const previousElement = elements[i - 1]; + if (i === 0 || element === null || previousElement === null) continue; + const commaToken = sourceCode.getFirstTokenBetween(previousElement, element, ast_exports.isCommaToken); + const lastTokenOfPreviousElement = sourceCode.getTokenBefore(commaToken); + const firstTokenOfCurrentElement = sourceCode.getTokenAfter(commaToken); + if (!(0, ast_exports.isTokenOnSameLine)(lastTokenOfPreviousElement, firstTokenOfCurrentElement)) linebreaksCount++; + } + const needsLinebreaks = elements.length >= options.minItems || options.multiline && elementBreak || options.consistent && linebreaksCount > 0 && linebreaksCount < node.elements.length; + elements.forEach((element, i) => { + const previousElement = elements[i - 1]; + if (i === 0 || element === null || previousElement === null) return; + const commaToken = sourceCode.getFirstTokenBetween(previousElement, element, ast_exports.isCommaToken); + const lastTokenOfPreviousElement = sourceCode.getTokenBefore(commaToken); + const firstTokenOfCurrentElement = sourceCode.getTokenAfter(commaToken); + if (needsLinebreaks) { + if ((0, ast_exports.isTokenOnSameLine)(lastTokenOfPreviousElement, firstTokenOfCurrentElement)) reportRequiredLineBreak(firstTokenOfCurrentElement); + } else if (!(0, ast_exports.isTokenOnSameLine)(lastTokenOfPreviousElement, firstTokenOfCurrentElement)) reportNoLineBreak(firstTokenOfCurrentElement); + }); + } + return { + ArrayPattern: check, + ArrayExpression: check + }; + } +}); +export { array_element_newline_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/arrow-parens.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/arrow-parens.js new file mode 100644 index 0000000..9492fde --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/arrow-parens.js @@ -0,0 +1,77 @@ +import { ast_exports, canTokensBeAdjacent, createRule } from "../utils.js"; +function hasBlockBody(node) { + return node.body.type === "BlockStatement"; +} +var arrow_parens_default = createRule({ + name: "arrow-parens", + meta: { + type: "layout", + docs: { description: "Require parentheses around arrow function arguments" }, + fixable: "code", + schema: [{ + type: "string", + enum: ["always", "as-needed"] + }, { + type: "object", + properties: { requireForBlockBody: { + type: "boolean", + default: false + } }, + additionalProperties: false + }], + messages: { + unexpectedParens: "Unexpected parentheses around single function argument.", + expectedParens: "Expected parentheses around arrow function argument.", + unexpectedParensInline: "Unexpected parentheses around single function argument having a body with no curly braces.", + expectedParensBlock: "Expected parentheses around arrow function argument having a body with curly braces." + } + }, + create(context) { + const asNeeded = context.options[0] === "as-needed"; + const requireForBlockBody = asNeeded && context.options[1] && context.options[1].requireForBlockBody === true; + const sourceCode = context.sourceCode; + function findOpeningParenOfParams(node) { + const tokenBeforeParams = sourceCode.getTokenBefore(node.params[0]); + if (tokenBeforeParams && (0, ast_exports.isOpeningParenToken)(tokenBeforeParams) && node.range[0] <= tokenBeforeParams.range[0]) return tokenBeforeParams; + return null; + } + function getClosingParenOfParams(node) { + return sourceCode.getTokenAfter(node.params[0], ast_exports.isClosingParenToken); + } + function hasCommentsInParensOfParams(node, openingParen) { + return sourceCode.commentsExistBetween(openingParen, getClosingParenOfParams(node)); + } + function hasUnexpectedTokensBeforeOpeningParen(node, openingParen) { + const expectedCount = node.async ? 1 : 0; + return sourceCode.getFirstToken(node, { skip: expectedCount }) !== openingParen; + } + return { "ArrowFunctionExpression[params.length=1]": function(node) { + const shouldHaveParens = !asNeeded || requireForBlockBody && hasBlockBody(node); + const openingParen = findOpeningParenOfParams(node); + const hasParens = openingParen !== null; + const [param] = node.params; + if (shouldHaveParens && !hasParens) context.report({ + node, + messageId: requireForBlockBody ? "expectedParensBlock" : "expectedParens", + loc: param.loc, + *fix(fixer) { + yield fixer.insertTextBefore(param, "("); + yield fixer.insertTextAfter(param, ")"); + } + }); + if (!shouldHaveParens && hasParens && param.type === "Identifier" && !param.optional && !param.typeAnnotation && !node.returnType && !hasCommentsInParensOfParams(node, openingParen) && !hasUnexpectedTokensBeforeOpeningParen(node, openingParen)) context.report({ + node, + messageId: requireForBlockBody ? "unexpectedParensInline" : "unexpectedParens", + loc: param.loc, + *fix(fixer) { + const tokenBeforeOpeningParen = sourceCode.getTokenBefore(openingParen); + const closingParen = getClosingParenOfParams(node); + if (tokenBeforeOpeningParen && tokenBeforeOpeningParen.range[1] === openingParen.range[0] && !canTokensBeAdjacent(tokenBeforeOpeningParen, sourceCode.getFirstToken(param))) yield fixer.insertTextBefore(openingParen, " "); + yield fixer.removeRange([openingParen.range[0], param.range[0]]); + yield fixer.removeRange([param.range[1], closingParen.range[1]]); + } + }); + } }; + } +}); +export { arrow_parens_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/arrow-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/arrow-spacing.js new file mode 100644 index 0000000..baff8d1 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/arrow-spacing.js @@ -0,0 +1,87 @@ +import { ast_exports, createRule } from "../utils.js"; +var arrow_spacing_default = createRule({ + name: "arrow-spacing", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing before and after the arrow in arrow functions" }, + fixable: "whitespace", + schema: [{ + type: "object", + properties: { + before: { + type: "boolean", + default: true + }, + after: { + type: "boolean", + default: true + } + }, + additionalProperties: false + }], + messages: { + expectedBefore: "Missing space before =>.", + unexpectedBefore: "Unexpected space before =>.", + expectedAfter: "Missing space after =>.", + unexpectedAfter: "Unexpected space after =>." + } + }, + create(context) { + const rule = Object.assign({}, context.options[0]); + rule.before = rule.before !== false; + rule.after = rule.after !== false; + const sourceCode = context.sourceCode; + function getTokens(node) { + const arrow = sourceCode.getTokenBefore(node.body, ast_exports.isArrowToken); + return { + before: sourceCode.getTokenBefore(arrow), + arrow, + after: sourceCode.getTokenAfter(arrow) + }; + } + function countSpaces(tokens) { + const before = tokens.arrow.range[0] - tokens.before.range[1]; + const after = tokens.after.range[0] - tokens.arrow.range[1]; + return { + before, + after + }; + } + function spaces(node) { + const tokens = getTokens(node); + const countSpace = countSpaces(tokens); + if (rule.before) { + if (countSpace.before === 0) context.report({ + node: tokens.before, + messageId: "expectedBefore", + fix(fixer) { + return fixer.insertTextBefore(tokens.arrow, " "); + } + }); + } else if (countSpace.before > 0) context.report({ + node: tokens.before, + messageId: "unexpectedBefore", + fix(fixer) { + return fixer.removeRange([tokens.before.range[1], tokens.arrow.range[0]]); + } + }); + if (rule.after) { + if (countSpace.after === 0) context.report({ + node: tokens.after, + messageId: "expectedAfter", + fix(fixer) { + return fixer.insertTextAfter(tokens.arrow, " "); + } + }); + } else if (countSpace.after > 0) context.report({ + node: tokens.after, + messageId: "unexpectedAfter", + fix(fixer) { + return fixer.removeRange([tokens.arrow.range[1], tokens.after.range[0]]); + } + }); + } + return { ArrowFunctionExpression: spaces }; + } +}); +export { arrow_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/block-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/block-spacing.js new file mode 100644 index 0000000..be10c67 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/block-spacing.js @@ -0,0 +1,83 @@ +import { AST_TOKEN_TYPES, ast_exports, createRule } from "../utils.js"; +var block_spacing_default = createRule({ + name: "block-spacing", + meta: { + type: "layout", + docs: { description: "Disallow or enforce spaces inside of blocks after opening block and before closing block" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: ["always", "never"] + }], + messages: { + missing: "Requires a space {{location}} '{{token}}'.", + extra: "Unexpected space(s) {{location}} '{{token}}'." + } + }, + defaultOptions: ["always"], + create(context, [whenToApplyOption]) { + const sourceCode = context.sourceCode; + const always = whenToApplyOption !== "never"; + const messageId = always ? "missing" : "extra"; + function getOpenBrace(node) { + return sourceCode.getFirstToken(node, { filter: (token) => (0, ast_exports.isOpeningBraceToken)(token) }); + } + function isValid(left, right) { + return !(0, ast_exports.isTokenOnSameLine)(left, right) || sourceCode.isSpaceBetween(left, right) === always; + } + function checkSpacingInsideBraces(node) { + const openBrace = getOpenBrace(node); + const closeBrace = sourceCode.getLastToken(node); + const firstToken = sourceCode.getTokenAfter(openBrace, { includeComments: true }); + const lastToken = sourceCode.getTokenBefore(closeBrace, { includeComments: true }); + if (!(0, ast_exports.isOpeningBraceToken)(openBrace) || !(0, ast_exports.isClosingBraceToken)(closeBrace) || firstToken === closeBrace) return; + if (!always && firstToken.type === AST_TOKEN_TYPES.Line) return; + if (!isValid(openBrace, firstToken)) { + let loc = openBrace.loc; + if (messageId === "extra") loc = { + start: openBrace.loc.end, + end: firstToken.loc.start + }; + context.report({ + node, + loc, + messageId, + data: { + location: "after", + token: openBrace.value + }, + fix(fixer) { + if (always) return fixer.insertTextBefore(firstToken, " "); + return fixer.removeRange([openBrace.range[1], firstToken.range[0]]); + } + }); + } + if (!isValid(lastToken, closeBrace)) { + let loc = closeBrace.loc; + if (messageId === "extra") loc = { + start: lastToken.loc.end, + end: closeBrace.loc.start + }; + context.report({ + node, + loc, + messageId, + data: { + location: "before", + token: closeBrace.value + }, + fix(fixer) { + if (always) return fixer.insertTextAfter(lastToken, " "); + return fixer.removeRange([lastToken.range[1], closeBrace.range[0]]); + } + }); + } + } + return { + BlockStatement: checkSpacingInsideBraces, + StaticBlock: checkSpacingInsideBraces, + SwitchStatement: checkSpacingInsideBraces + }; + } +}); +export { block_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/brace-style.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/brace-style.js new file mode 100644 index 0000000..d731b9d --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/brace-style.js @@ -0,0 +1,112 @@ +import { STATEMENT_LIST_PARENTS, ast_exports, createRule } from "../utils.js"; +var brace_style_default = createRule({ + name: "brace-style", + meta: { + type: "layout", + docs: { description: "Enforce consistent brace style for blocks" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: [ + "1tbs", + "stroustrup", + "allman" + ] + }, { + type: "object", + properties: { allowSingleLine: { + type: "boolean", + default: false + } }, + additionalProperties: false + }], + messages: { + nextLineOpen: "Opening curly brace does not appear on the same line as controlling statement.", + sameLineOpen: "Opening curly brace appears on the same line as controlling statement.", + blockSameLine: "Statement inside of curly braces should be on next line.", + nextLineClose: "Closing curly brace does not appear on the same line as the subsequent block.", + singleLineClose: "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.", + sameLineClose: "Closing curly brace appears on the same line as the subsequent block." + } + }, + defaultOptions: ["1tbs", { allowSingleLine: false }], + create(context, optionsWithDefaults) { + const [style, { allowSingleLine } = { allowSingleLine: false }] = optionsWithDefaults; + const isAllmanStyle = style === "allman"; + const sourceCode = context.sourceCode; + function removeNewlineBetween(firstToken, secondToken) { + const textRange = [firstToken.range[1], secondToken.range[0]]; + const textBetween = sourceCode.text.slice(textRange[0], textRange[1]); + if (textBetween.trim()) return null; + return (fixer) => fixer.replaceTextRange(textRange, " "); + } + function validateCurlyPair(openingCurlyToken, closingCurlyToken) { + const tokenBeforeOpeningCurly = sourceCode.getTokenBefore(openingCurlyToken); + const tokenBeforeClosingCurly = sourceCode.getTokenBefore(closingCurlyToken); + const tokenAfterOpeningCurly = sourceCode.getTokenAfter(openingCurlyToken); + const singleLineException = allowSingleLine && (0, ast_exports.isTokenOnSameLine)(openingCurlyToken, closingCurlyToken); + if (!isAllmanStyle && !(0, ast_exports.isTokenOnSameLine)(tokenBeforeOpeningCurly, openingCurlyToken)) context.report({ + node: openingCurlyToken, + messageId: "nextLineOpen", + fix: removeNewlineBetween(tokenBeforeOpeningCurly, openingCurlyToken) + }); + if (isAllmanStyle && (0, ast_exports.isTokenOnSameLine)(tokenBeforeOpeningCurly, openingCurlyToken) && !singleLineException) context.report({ + node: openingCurlyToken, + messageId: "sameLineOpen", + fix: (fixer) => fixer.insertTextBefore(openingCurlyToken, "\n") + }); + if ((0, ast_exports.isTokenOnSameLine)(openingCurlyToken, tokenAfterOpeningCurly) && tokenAfterOpeningCurly !== closingCurlyToken && !singleLineException) context.report({ + node: openingCurlyToken, + messageId: "blockSameLine", + fix: (fixer) => fixer.insertTextAfter(openingCurlyToken, "\n") + }); + if ((0, ast_exports.isTokenOnSameLine)(tokenBeforeClosingCurly, closingCurlyToken) && tokenBeforeClosingCurly !== openingCurlyToken && !singleLineException) context.report({ + node: closingCurlyToken, + messageId: "singleLineClose", + fix: (fixer) => fixer.insertTextBefore(closingCurlyToken, "\n") + }); + } + function validateCurlyBeforeKeyword(curlyToken) { + const keywordToken = sourceCode.getTokenAfter(curlyToken); + if (style === "1tbs" && !(0, ast_exports.isTokenOnSameLine)(curlyToken, keywordToken)) context.report({ + node: curlyToken, + messageId: "nextLineClose", + fix: removeNewlineBetween(curlyToken, keywordToken) + }); + if (style !== "1tbs" && (0, ast_exports.isTokenOnSameLine)(curlyToken, keywordToken)) context.report({ + node: curlyToken, + messageId: "sameLineClose", + fix: (fixer) => fixer.insertTextAfter(curlyToken, "\n") + }); + } + return { + BlockStatement(node) { + if (!STATEMENT_LIST_PARENTS.has(node.parent.type)) validateCurlyPair(sourceCode.getFirstToken(node), sourceCode.getLastToken(node)); + }, + StaticBlock(node) { + validateCurlyPair(sourceCode.getFirstToken(node, { skip: 1 }), sourceCode.getLastToken(node)); + }, + ClassBody(node) { + validateCurlyPair(sourceCode.getFirstToken(node), sourceCode.getLastToken(node)); + }, + SwitchStatement(node) { + const closingCurly = sourceCode.getLastToken(node); + const openingCurly = sourceCode.getTokenBefore(node.cases.length ? node.cases[0] : closingCurly); + validateCurlyPair(openingCurly, closingCurly); + }, + IfStatement(node) { + if (node.consequent.type === "BlockStatement" && node.alternate) validateCurlyBeforeKeyword(sourceCode.getLastToken(node.consequent)); + }, + TryStatement(node) { + validateCurlyBeforeKeyword(sourceCode.getLastToken(node.block)); + if (node.handler && node.finalizer) validateCurlyBeforeKeyword(sourceCode.getLastToken(node.handler.body)); + }, + TSModuleBlock(node) { + const openingCurly = sourceCode.getFirstToken(node); + const closingCurly = sourceCode.getLastToken(node); + validateCurlyPair(openingCurly, closingCurly); + } + }; + } +}); +export { brace_style_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/comma-dangle.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/comma-dangle.js new file mode 100644 index 0000000..12c284e --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/comma-dangle.js @@ -0,0 +1,284 @@ +import { AST_NODE_TYPES, ast_exports, createRule, getNextLocation } from "../utils.js"; +const OPTION_VALUE_SCHEME = [ + "always-multiline", + "always", + "never", + "only-multiline" +]; +var comma_dangle_default = createRule({ + name: "comma-dangle", + meta: { + type: "layout", + docs: { description: "Require or disallow trailing commas" }, + schema: { + $defs: { + value: { + type: "string", + enum: OPTION_VALUE_SCHEME + }, + valueWithIgnore: { + type: "string", + enum: [...OPTION_VALUE_SCHEME, "ignore"] + } + }, + type: "array", + items: [{ oneOf: [{ $ref: "#/$defs/value" }, { + type: "object", + properties: { + arrays: { $ref: "#/$defs/valueWithIgnore" }, + objects: { $ref: "#/$defs/valueWithIgnore" }, + imports: { $ref: "#/$defs/valueWithIgnore" }, + exports: { $ref: "#/$defs/valueWithIgnore" }, + functions: { $ref: "#/$defs/valueWithIgnore" }, + importAttributes: { $ref: "#/$defs/valueWithIgnore" }, + dynamicImports: { $ref: "#/$defs/valueWithIgnore" }, + enums: { $ref: "#/$defs/valueWithIgnore" }, + generics: { $ref: "#/$defs/valueWithIgnore" }, + tuples: { $ref: "#/$defs/valueWithIgnore" } + }, + additionalProperties: false + }] }], + additionalItems: false + }, + fixable: "code", + messages: { + unexpected: "Unexpected trailing comma.", + missing: "Missing trailing comma." + } + }, + defaultOptions: ["never"], + create(context, [options]) { + function normalizeOptions(options$1 = {}, ecmaVersion$1) { + const DEFAULT_OPTION_VALUE = "never"; + if (typeof options$1 === "string") return { + arrays: options$1, + objects: options$1, + imports: options$1, + exports: options$1, + functions: !ecmaVersion$1 || ecmaVersion$1 === "latest" ? options$1 : ecmaVersion$1 < 2017 ? "ignore" : options$1, + importAttributes: options$1, + dynamicImports: !ecmaVersion$1 || ecmaVersion$1 === "latest" ? options$1 : ecmaVersion$1 < 2025 ? "ignore" : options$1, + enums: options$1, + generics: options$1, + tuples: options$1 + }; + return { + arrays: options$1.arrays ?? DEFAULT_OPTION_VALUE, + objects: options$1.objects ?? DEFAULT_OPTION_VALUE, + imports: options$1.imports ?? DEFAULT_OPTION_VALUE, + exports: options$1.exports ?? DEFAULT_OPTION_VALUE, + functions: options$1.functions ?? DEFAULT_OPTION_VALUE, + importAttributes: options$1.importAttributes ?? DEFAULT_OPTION_VALUE, + dynamicImports: options$1.dynamicImports ?? DEFAULT_OPTION_VALUE, + enums: options$1.enums ?? DEFAULT_OPTION_VALUE, + generics: options$1.generics ?? DEFAULT_OPTION_VALUE, + tuples: options$1.tuples ?? DEFAULT_OPTION_VALUE + }; + } + const ecmaVersion = context?.languageOptions?.ecmaVersion ?? context.parserOptions.ecmaVersion; + const normalizedOptions = normalizeOptions(options, ecmaVersion); + const isTSX = context.parserOptions?.ecmaFeatures?.jsx && context.filename?.endsWith(".tsx"); + const sourceCode = context.sourceCode; + const closeBraces = [ + "}", + "]", + ")", + ">" + ]; + const predicate = { + "always": forceTrailingComma, + "always-multiline": forceTrailingCommaIfMultiline, + "only-multiline": allowTrailingCommaIfMultiline, + "never": forbidTrailingComma, + "ignore": () => {} + }; + function last(nodes) { + if (!nodes) return null; + return nodes[nodes.length - 1] ?? null; + } + function getTrailingToken(info) { + switch (info.node.type) { + case "ObjectExpression": + case "ArrayExpression": + case "CallExpression": + case "NewExpression": + case "ImportExpression": return sourceCode.getLastToken(info.node, 1); + default: { + const lastItem = info.lastItem; + if (!lastItem) return null; + const nextToken = sourceCode.getTokenAfter(lastItem); + if ((0, ast_exports.isCommaToken)(nextToken)) return nextToken; + return sourceCode.getLastToken(lastItem); + } + } + } + function isMultiline(info) { + const lastItem = info.lastItem; + if (!lastItem) return false; + const penultimateToken = getTrailingToken(info); + if (!penultimateToken) return false; + const lastToken = sourceCode.getTokenAfter(penultimateToken); + if (!lastToken) return false; + return lastToken.loc.end.line !== penultimateToken.loc.end.line; + } + function isTrailingCommaAllowed(lastItem) { + return lastItem.type !== "RestElement"; + } + function forbidTrailingComma(info) { + if (isTSX && info.node.type === AST_NODE_TYPES.TSTypeParameterDeclaration && info.node.params.length === 1) return; + const lastItem = info.lastItem; + if (!lastItem) return; + const trailingToken = getTrailingToken(info); + if (trailingToken && (0, ast_exports.isCommaToken)(trailingToken)) context.report({ + node: lastItem, + loc: trailingToken.loc, + messageId: "unexpected", + *fix(fixer) { + yield fixer.remove(trailingToken); + yield fixer.insertTextBefore(sourceCode.getTokenBefore(trailingToken), ""); + yield fixer.insertTextAfter(sourceCode.getTokenAfter(trailingToken), ""); + } + }); + } + function forceTrailingComma(info) { + const lastItem = info.lastItem; + if (!lastItem) return; + if (!isTrailingCommaAllowed(lastItem)) { + forbidTrailingComma(info); + return; + } + const trailingToken = getTrailingToken(info); + if (!trailingToken || trailingToken.value === ",") return; + const nextToken = sourceCode.getTokenAfter(trailingToken); + if (!nextToken || !closeBraces.includes(nextToken.value)) return; + context.report({ + node: lastItem, + loc: { + start: trailingToken.loc.end, + end: getNextLocation(sourceCode, trailingToken.loc.end) + }, + messageId: "missing", + *fix(fixer) { + yield fixer.insertTextAfter(trailingToken, ","); + yield fixer.insertTextBefore(trailingToken, ""); + yield fixer.insertTextAfter(sourceCode.getTokenAfter(trailingToken), ""); + } + }); + } + function allowTrailingCommaIfMultiline(info) { + if (!isMultiline(info)) forbidTrailingComma(info); + } + function forceTrailingCommaIfMultiline(info) { + if (isMultiline(info)) forceTrailingComma(info); + else forbidTrailingComma(info); + } + return { + ObjectExpression: (node) => { + predicate[normalizedOptions.objects]({ + node, + lastItem: last(node.properties) + }); + }, + ObjectPattern: (node) => { + predicate[normalizedOptions.objects]({ + node, + lastItem: last(node.properties) + }); + }, + ArrayExpression: (node) => { + predicate[normalizedOptions.arrays]({ + node, + lastItem: last(node.elements) + }); + }, + ArrayPattern: (node) => { + predicate[normalizedOptions.arrays]({ + node, + lastItem: last(node.elements) + }); + }, + ImportDeclaration: (node) => { + const lastSpecifier = last(node.specifiers); + if (lastSpecifier?.type === "ImportSpecifier") predicate[normalizedOptions.imports]({ + node, + lastItem: lastSpecifier + }); + predicate[normalizedOptions.importAttributes]({ + node, + lastItem: last(node.attributes) + }); + }, + ExportNamedDeclaration: (node) => { + predicate[normalizedOptions.exports]({ + node, + lastItem: last(node.specifiers) + }); + predicate[normalizedOptions.importAttributes]({ + node, + lastItem: last(node.attributes) + }); + }, + ExportAllDeclaration: (node) => { + predicate[normalizedOptions.importAttributes]({ + node, + lastItem: last(node.attributes) + }); + }, + FunctionDeclaration: (node) => { + predicate[normalizedOptions.functions]({ + node, + lastItem: last(node.params) + }); + }, + FunctionExpression: (node) => { + predicate[normalizedOptions.functions]({ + node, + lastItem: last(node.params) + }); + }, + ArrowFunctionExpression: (node) => { + predicate[normalizedOptions.functions]({ + node, + lastItem: last(node.params) + }); + }, + CallExpression: (node) => { + predicate[normalizedOptions.functions]({ + node, + lastItem: last(node.arguments) + }); + }, + NewExpression: (node) => { + predicate[normalizedOptions.functions]({ + node, + lastItem: last(node.arguments) + }); + }, + ImportExpression: (node) => { + predicate[normalizedOptions.dynamicImports]({ + node, + lastItem: node.options ?? node.source + }); + }, + TSEnumDeclaration(node) { + predicate[normalizedOptions.enums]({ + node, + lastItem: last(node.body?.members ?? node.members) + }); + }, + TSTypeParameterDeclaration(node) { + predicate[normalizedOptions.generics]({ + node, + lastItem: last(node.params) + }); + }, + TSTupleType(node) { + predicate[normalizedOptions.tuples]({ + node, + lastItem: last(node.elementTypes) + }); + } + }; + } +}); +export { comma_dangle_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/comma-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/comma-spacing.js new file mode 100644 index 0000000..c098d0b --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/comma-spacing.js @@ -0,0 +1,84 @@ +import { AST_TOKEN_TYPES, ast_exports, createRule } from "../utils.js"; +var comma_spacing_default = createRule({ + name: "comma-spacing", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing before and after commas" }, + fixable: "whitespace", + schema: [{ + type: "object", + properties: { + before: { + type: "boolean", + default: false + }, + after: { + type: "boolean", + default: true + } + }, + additionalProperties: false + }], + messages: { + unexpected: `There should be no space {{loc}} ','.`, + missing: `A space is required {{loc}} ','.` + } + }, + defaultOptions: [{ + before: false, + after: true + }], + create(context, [options = {}]) { + const { before: spaceBefore, after: spaceAfter } = options; + const sourceCode = context.sourceCode; + const tokensAndComments = sourceCode.tokensAndComments; + const ignoredTokens = /* @__PURE__ */ new Set(); + function addNullElementsToIgnoreList(node) { + let previousToken = sourceCode.getFirstToken(node); + for (const element of node.elements) { + let token; + if (element == null) { + token = sourceCode.getTokenAfter(previousToken); + if (token && (0, ast_exports.isCommaToken)(token)) ignoredTokens.add(token); + } else token = sourceCode.getTokenAfter(element); + previousToken = token; + } + } + function addTypeParametersTrailingCommaToIgnoreList(node) { + const paramLength = node.params.length; + if (paramLength) { + const param = node.params[paramLength - 1]; + const afterToken = sourceCode.getTokenAfter(param); + if (afterToken && (0, ast_exports.isCommaToken)(afterToken)) ignoredTokens.add(afterToken); + } + } + function validateCommaSpacing(commaToken, prevToken, nextToken) { + if (prevToken && (0, ast_exports.isTokenOnSameLine)(prevToken, commaToken) && spaceBefore !== sourceCode.isSpaceBetween(prevToken, commaToken)) context.report({ + node: commaToken, + data: { loc: "before" }, + messageId: spaceBefore ? "missing" : "unexpected", + fix: (fixer) => spaceBefore ? fixer.insertTextBefore(commaToken, " ") : fixer.replaceTextRange([prevToken.range[1], commaToken.range[0]], "") + }); + if (nextToken && (0, ast_exports.isTokenOnSameLine)(commaToken, nextToken) && !(0, ast_exports.isClosingParenToken)(nextToken) && !(0, ast_exports.isClosingBracketToken)(nextToken) && !(0, ast_exports.isClosingBraceToken)(nextToken) && !(!spaceAfter && nextToken.type === AST_TOKEN_TYPES.Line) && spaceAfter !== sourceCode.isSpaceBetween(commaToken, nextToken)) context.report({ + node: commaToken, + data: { loc: "after" }, + messageId: spaceAfter ? "missing" : "unexpected", + fix: (fixer) => spaceAfter ? fixer.insertTextAfter(commaToken, " ") : fixer.replaceTextRange([commaToken.range[1], nextToken.range[0]], "") + }); + } + return { + "TSTypeParameterDeclaration": addTypeParametersTrailingCommaToIgnoreList, + "ArrayExpression": addNullElementsToIgnoreList, + "ArrayPattern": addNullElementsToIgnoreList, + "Program:exit": function() { + tokensAndComments.forEach((token, i) => { + if (!(0, ast_exports.isCommaToken)(token)) return; + const prevToken = tokensAndComments[i - 1]; + const nextToken = tokensAndComments[i + 1]; + validateCommaSpacing(token, (0, ast_exports.isCommaToken)(prevToken) || ignoredTokens.has(token) ? null : prevToken, nextToken && (0, ast_exports.isCommaToken)(nextToken) || ignoredTokens.has(token) ? null : nextToken); + }); + } + }; + } +}); +export { comma_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/comma-style.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/comma-style.js new file mode 100644 index 0000000..76a02f5 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/comma-style.js @@ -0,0 +1,178 @@ +import { ast_exports, createRule } from "../utils.js"; +var comma_style_default = createRule({ + name: "comma-style", + meta: { + type: "layout", + docs: { description: "Enforce consistent comma style" }, + fixable: "code", + schema: [{ + type: "string", + enum: ["first", "last"] + }, { + type: "object", + properties: { exceptions: { + type: "object", + additionalProperties: { type: "boolean" } + } }, + additionalProperties: false + }], + messages: { + unexpectedLineBeforeAndAfterComma: "Bad line breaking before and after ','.", + expectedCommaFirst: "',' should be placed first.", + expectedCommaLast: "',' should be placed last." + } + }, + create(context) { + const style = context.options[0] || "last"; + const sourceCode = context.sourceCode; + const exceptions = {}; + if (context.options.length === 2 && Object.prototype.hasOwnProperty.call(context.options[1], "exceptions")) { + context.options[1] ??= { exceptions: {} }; + const rawExceptions = context.options[1].exceptions; + const keys = Object.keys(rawExceptions); + for (let i = 0; i < keys.length; i++) exceptions[keys[i]] = rawExceptions[keys[i]]; + } + function getReplacedText(styleType, text) { + switch (styleType) { + case "between": return `,${text.replace(ast_exports.LINEBREAK_MATCHER, "")}`; + case "first": return `${text},`; + case "last": return `,${text}`; + default: return ""; + } + } + function getFixerFunction(styleType, tokenBeforeComma, commaToken, tokenAfterComma) { + const text = sourceCode.text.slice(tokenBeforeComma.range[1], commaToken.range[0]) + sourceCode.text.slice(commaToken.range[1], tokenAfterComma.range[0]); + const range = [tokenBeforeComma.range[1], tokenAfterComma.range[0]]; + return function(fixer) { + return fixer.replaceTextRange(range, getReplacedText(styleType, text)); + }; + } + function validateCommaItemSpacing(tokenBeforeComma, commaToken, tokenAfterComma) { + if ((0, ast_exports.isTokenOnSameLine)(commaToken, tokenAfterComma) && (0, ast_exports.isTokenOnSameLine)(tokenBeforeComma, commaToken)) {} else if (!(0, ast_exports.isTokenOnSameLine)(commaToken, tokenAfterComma) && !(0, ast_exports.isTokenOnSameLine)(tokenBeforeComma, commaToken)) { + const comment = sourceCode.getCommentsAfter(commaToken)[0]; + const styleType = comment && comment.type === "Block" && (0, ast_exports.isTokenOnSameLine)(commaToken, comment) ? style : "between"; + context.report({ + node: commaToken, + messageId: "unexpectedLineBeforeAndAfterComma", + fix: getFixerFunction(styleType, tokenBeforeComma, commaToken, tokenAfterComma) + }); + } else if (style === "first" && !(0, ast_exports.isTokenOnSameLine)(commaToken, tokenAfterComma)) context.report({ + node: commaToken, + messageId: "expectedCommaFirst", + fix: getFixerFunction(style, tokenBeforeComma, commaToken, tokenAfterComma) + }); + else if (style === "last" && (0, ast_exports.isTokenOnSameLine)(commaToken, tokenAfterComma)) context.report({ + node: commaToken, + messageId: "expectedCommaLast", + fix: getFixerFunction(style, tokenBeforeComma, commaToken, tokenAfterComma) + }); + } + function extractCommaTokens(node, items) { + if (items.length === 0) return []; + const definedItems = items.filter((item) => Boolean(item)); + if (definedItems.length === 0) return sourceCode.getTokens(node).filter(ast_exports.isCommaToken); + const commaTokens = []; + const firstItem = definedItems[0]; + let prevToken = sourceCode.getTokenBefore(firstItem); + while (prevToken && node.range[0] <= prevToken.range[0]) { + if ((0, ast_exports.isCommaToken)(prevToken)) commaTokens.unshift(prevToken); + else if ((0, ast_exports.isNotOpeningParenToken)(prevToken)) break; + prevToken = sourceCode.getTokenBefore(prevToken); + } + let prevItem = null; + for (const item of definedItems) { + if (prevItem) commaTokens.push(...sourceCode.getTokensBetween(prevItem, item).filter(ast_exports.isCommaToken)); + const tokenLastItem = sourceCode.getLastToken(item); + if (tokenLastItem && (0, ast_exports.isCommaToken)(tokenLastItem)) commaTokens.push(tokenLastItem); + prevItem = item; + } + let nextToken = sourceCode.getTokenAfter(prevItem); + while (nextToken && nextToken.range[1] <= node.range[1]) { + if ((0, ast_exports.isCommaToken)(nextToken)) commaTokens.push(nextToken); + else if ((0, ast_exports.isNotClosingParenToken)(nextToken)) break; + nextToken = sourceCode.getTokenAfter(nextToken); + } + return commaTokens; + } + function validateComma(node, items) { + const commaTokens = extractCommaTokens(node, items); + commaTokens.forEach((commaToken) => { + const tokenBeforeComma = sourceCode.getTokenBefore(commaToken); + const tokenAfterComma = sourceCode.getTokenAfter(commaToken); + if ((0, ast_exports.isOpeningBracketToken)(tokenBeforeComma)) return; + if ((0, ast_exports.isCommaToken)(tokenBeforeComma) && (0, ast_exports.isOpeningBracketToken)(sourceCode.getTokenBefore(tokenBeforeComma, ast_exports.isNotCommaToken))) return; + if ((0, ast_exports.isCommaToken)(tokenAfterComma) && !(0, ast_exports.isTokenOnSameLine)(commaToken, tokenAfterComma)) return; + validateCommaItemSpacing(tokenBeforeComma, commaToken, tokenAfterComma); + }); + } + const nodes = {}; + if (!exceptions.VariableDeclaration) nodes.VariableDeclaration = (node) => validateComma(node, node.declarations); + if (!exceptions.ObjectExpression) nodes.ObjectExpression = validateObjectProperties; + if (!exceptions.ObjectPattern) nodes.ObjectPattern = validateObjectProperties; + if (!exceptions.ArrayExpression) nodes.ArrayExpression = validateArrayElements; + if (!exceptions.ArrayPattern) nodes.ArrayPattern = validateArrayElements; + if (!exceptions.FunctionDeclaration) nodes.FunctionDeclaration = validateFunctionParams; + if (!exceptions.FunctionExpression) nodes.FunctionExpression = validateFunctionParams; + if (!exceptions.ArrowFunctionExpression) nodes.ArrowFunctionExpression = validateFunctionParams; + if (!exceptions.CallExpression) nodes.CallExpression = validateCallArguments; + if (!exceptions.ImportDeclaration) nodes.ImportDeclaration = (node) => { + validateComma(node, node.specifiers); + visitImportAttributes(node); + }; + if (!exceptions.NewExpression) nodes.NewExpression = validateCallArguments; + if (!exceptions.ExportAllDeclaration) nodes.ExportAllDeclaration = visitImportAttributes; + if (!exceptions.ExportNamedDeclaration) nodes.ExportNamedDeclaration = (node) => { + validateComma(node, node.specifiers); + visitImportAttributes(node); + }; + if (!exceptions.ImportExpression) nodes.ImportExpression = (node) => { + validateComma(node, [node.source, node.options ?? null]); + }; + if (!exceptions.SequenceExpression) nodes.SequenceExpression = (node) => validateComma(node, node.expressions); + if (!exceptions.ClassDeclaration) nodes.ClassDeclaration = visitClassImplements; + if (!exceptions.ClassExpression) nodes.ClassExpression = visitClassImplements; + if (!exceptions.TSDeclareFunction) nodes.TSDeclareFunction = validateFunctionParams; + if (!exceptions.TSFunctionType) nodes.TSFunctionType = validateFunctionParams; + if (!exceptions.TSConstructorType) nodes.TSConstructorType = validateFunctionParams; + if (!exceptions.TSEmptyBodyFunctionExpression) nodes.TSEmptyBodyFunctionExpression = validateFunctionParams; + if (!exceptions.TSMethodSignature) nodes.TSMethodSignature = validateFunctionParams; + if (!exceptions.TSCallSignatureDeclaration) nodes.TSCallSignatureDeclaration = validateFunctionParams; + if (!exceptions.TSConstructSignatureDeclaration) nodes.TSConstructSignatureDeclaration = validateFunctionParams; + if (!exceptions.TSTypeParameterDeclaration) nodes.TSTypeParameterDeclaration = validateTypeParams; + if (!exceptions.TSTypeParameterInstantiation) nodes.TSTypeParameterInstantiation = validateTypeParams; + if (!exceptions.TSEnumBody) nodes.TSEnumBody = visitMembers; + if (!exceptions.TSTypeLiteral) nodes.TSTypeLiteral = visitMembers; + if (!exceptions.TSIndexSignature) nodes.TSIndexSignature = (node) => validateComma(node, node.parameters); + if (!exceptions.TSInterfaceDeclaration) nodes.TSInterfaceDeclaration = (node) => validateComma(node, node.extends); + if (!exceptions.TSInterfaceBody) nodes.TSInterfaceBody = (node) => validateComma(node, node.body); + if (!exceptions.TSTupleType) nodes.TSTupleType = (node) => validateComma(node, node.elementTypes); + return nodes; + function validateObjectProperties(node) { + validateComma(node, node.properties); + } + function validateArrayElements(node) { + validateComma(node, node.elements); + } + function validateFunctionParams(node) { + validateComma(node, node.params); + } + function validateCallArguments(node) { + validateComma(node, node.arguments); + } + function visitImportAttributes(node) { + if (!node.attributes) return; + validateComma(node, node.attributes); + } + function visitClassImplements(node) { + if (!node.implements) return; + validateComma(node, node.implements); + } + function visitMembers(node) { + validateComma(node, node.members); + } + function validateTypeParams(node) { + validateComma(node, node.params); + } + } +}); +export { comma_style_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/computed-property-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/computed-property-spacing.js new file mode 100644 index 0000000..de1a2e1 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/computed-property-spacing.js @@ -0,0 +1,112 @@ +import { ast_exports, createRule } from "../utils.js"; +var computed_property_spacing_default = createRule({ + name: "computed-property-spacing", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing inside computed property brackets" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: ["always", "never"] + }, { + type: "object", + properties: { enforceForClassMembers: { + type: "boolean", + default: true + } }, + additionalProperties: false + }], + messages: { + unexpectedSpaceBefore: "There should be no space before '{{tokenValue}}'.", + unexpectedSpaceAfter: "There should be no space after '{{tokenValue}}'.", + missingSpaceBefore: "A space is required before '{{tokenValue}}'.", + missingSpaceAfter: "A space is required after '{{tokenValue}}'." + } + }, + create(context) { + const sourceCode = context.sourceCode; + const propertyNameMustBeSpaced = context.options[0] === "always"; + const enforceForClassMembers = !context.options[1] || context.options[1].enforceForClassMembers; + function reportNoBeginningSpace(node, token, tokenAfter) { + context.report({ + node, + loc: { + start: token.loc.end, + end: tokenAfter.loc.start + }, + messageId: "unexpectedSpaceAfter", + data: { tokenValue: token.value }, + fix(fixer) { + return fixer.removeRange([token.range[1], tokenAfter.range[0]]); + } + }); + } + function reportNoEndingSpace(node, token, tokenBefore) { + context.report({ + node, + loc: { + start: tokenBefore.loc.end, + end: token.loc.start + }, + messageId: "unexpectedSpaceBefore", + data: { tokenValue: token.value }, + fix(fixer) { + return fixer.removeRange([tokenBefore.range[1], token.range[0]]); + } + }); + } + function reportRequiredBeginningSpace(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "missingSpaceAfter", + data: { tokenValue: token.value }, + fix(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); + } + function reportRequiredEndingSpace(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "missingSpaceBefore", + data: { tokenValue: token.value }, + fix(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + } + function checkSpacing(propertyName) { + return function(node) { + if (!node.computed) return; + const property = node[propertyName]; + const before = sourceCode.getTokenBefore(property, ast_exports.isOpeningBracketToken); + const first = sourceCode.getTokenAfter(before, { includeComments: true }); + const after = sourceCode.getTokenAfter(property, ast_exports.isClosingBracketToken); + const last = sourceCode.getTokenBefore(after, { includeComments: true }); + if ((0, ast_exports.isTokenOnSameLine)(before, first)) { + if (propertyNameMustBeSpaced) { + if (!sourceCode.isSpaceBetween(before, first) && (0, ast_exports.isTokenOnSameLine)(before, first)) reportRequiredBeginningSpace(node, before); + } else if (sourceCode.isSpaceBetween(before, first)) reportNoBeginningSpace(node, before, first); + } + if ((0, ast_exports.isTokenOnSameLine)(last, after)) { + if (propertyNameMustBeSpaced) { + if (!sourceCode.isSpaceBetween(last, after) && (0, ast_exports.isTokenOnSameLine)(last, after)) reportRequiredEndingSpace(node, after); + } else if (sourceCode.isSpaceBetween(last, after)) reportNoEndingSpace(node, after, last); + } + }; + } + const listeners = { + Property: checkSpacing("key"), + MemberExpression: checkSpacing("property") + }; + if (enforceForClassMembers) { + listeners.MethodDefinition = checkSpacing("key"); + listeners.PropertyDefinition = checkSpacing("key"); + listeners.AccessorProperty = checkSpacing("key"); + } + return listeners; + } +}); +export { computed_property_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/curly-newline.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/curly-newline.js new file mode 100644 index 0000000..f6d2d4e --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/curly-newline.js @@ -0,0 +1,214 @@ +import { ast_exports, createRule } from "../utils.js"; +const commonProperties = { + multiline: { type: "boolean" }, + minElements: { + type: "integer", + minimum: 0 + }, + consistent: { type: "boolean" } +}; +const optionValueSchema = { oneOf: [{ + type: "string", + enum: ["always", "never"] +}, { + type: "object", + properties: commonProperties, + additionalProperties: false +}] }; +var Specialization = /* @__PURE__ */ function(Specialization$1) { + Specialization$1["IfStatementConsequent"] = "IfStatementConsequent"; + Specialization$1["IfStatementAlternative"] = "IfStatementAlternative"; + Specialization$1["DoWhileStatement"] = "DoWhileStatement"; + Specialization$1["ForInStatement"] = "ForInStatement"; + Specialization$1["ForOfStatement"] = "ForOfStatement"; + Specialization$1["ForStatement"] = "ForStatement"; + Specialization$1["WhileStatement"] = "WhileStatement"; + Specialization$1["SwitchStatement"] = "SwitchStatement"; + Specialization$1["SwitchCase"] = "SwitchCase"; + Specialization$1["TryStatementBlock"] = "TryStatementBlock"; + Specialization$1["TryStatementHandler"] = "TryStatementHandler"; + Specialization$1["TryStatementFinalizer"] = "TryStatementFinalizer"; + Specialization$1["BlockStatement"] = "BlockStatement"; + Specialization$1["ArrowFunctionExpression"] = "ArrowFunctionExpression"; + Specialization$1["FunctionDeclaration"] = "FunctionDeclaration"; + Specialization$1["FunctionExpression"] = "FunctionExpression"; + Specialization$1["Property"] = "Property"; + Specialization$1["ClassBody"] = "ClassBody"; + Specialization$1["StaticBlock"] = "StaticBlock"; + Specialization$1["WithStatement"] = "WithStatement"; + Specialization$1["TSModuleBlock"] = "TSModuleBlock"; + return Specialization$1; +}(Specialization || {}); +const presets = { + default: { + multiline: false, + minElements: Number.POSITIVE_INFINITY, + consistent: true + }, + always: { + multiline: false, + minElements: 0, + consistent: false + }, + never: { + multiline: false, + minElements: Number.POSITIVE_INFINITY, + consistent: false + } +}; +function normalizeOptionValue(value) { + if (value === "always") return presets.always; + if (value === "never") return presets.never; + if (value) return { + consistent: !!value.consistent, + minElements: value.minElements ?? Number.POSITIVE_INFINITY, + multiline: !!value.multiline + }; + return presets.default; +} +function normalizeOptions(options) { + const value = normalizeOptionValue(options); + return Object.fromEntries(Object.entries(Specialization).map(([k]) => [k, typeof options === "object" && options != null && k in options ? normalizeOptionValue(options[k]) : value])); +} +var curly_newline_default = createRule({ + name: "curly-newline", + meta: { + type: "layout", + docs: { description: "Enforce consistent line breaks after opening and before closing braces" }, + fixable: "whitespace", + schema: [{ oneOf: [{ + type: "string", + enum: ["always", "never"] + }, { + type: "object", + properties: { + ...Object.fromEntries(Object.entries(Specialization).map(([k]) => [k, optionValueSchema])), + ...commonProperties + }, + additionalProperties: false + }] }], + messages: { + unexpectedLinebreakBeforeClosingBrace: "Unexpected line break before this closing brace.", + unexpectedLinebreakAfterOpeningBrace: "Unexpected line break after this opening brace.", + expectedLinebreakBeforeClosingBrace: "Expected a line break before this closing brace.", + expectedLinebreakAfterOpeningBrace: "Expected a line break after this opening brace." + } + }, + create(context) { + const sourceCode = context.sourceCode; + const normalizedOptions = normalizeOptions(context.options[0]); + function check(node, specialization) { + const options = normalizedOptions[specialization]; + let openBrace; + let closeBrace; + let elementCount; + switch (node.type) { + case "SwitchStatement": + closeBrace = sourceCode.getLastToken(node); + openBrace = sourceCode.getTokenBefore(node.cases.length ? node.cases[0] : closeBrace); + elementCount = node.cases.length; + break; + case "StaticBlock": + openBrace = sourceCode.getFirstToken(node, (token) => token.value === "{"); + closeBrace = sourceCode.getLastToken(node); + elementCount = node.body.length; + break; + default: + openBrace = sourceCode.getFirstToken(node); + closeBrace = sourceCode.getLastToken(node); + elementCount = node.body.length; + } + let first = sourceCode.getTokenAfter(openBrace, { includeComments: true }); + let last = sourceCode.getTokenBefore(closeBrace, { includeComments: true }); + const needsLineBreaks = elementCount >= options.minElements || options.multiline && elementCount > 0 && !(0, ast_exports.isTokenOnSameLine)(last, first); + const hasCommentsFirstToken = (0, ast_exports.isCommentToken)(first); + const hasCommentsLastToken = (0, ast_exports.isCommentToken)(last); + first = sourceCode.getTokenAfter(openBrace); + last = sourceCode.getTokenBefore(closeBrace); + if (needsLineBreaks) { + if ((0, ast_exports.isTokenOnSameLine)(openBrace, first)) context.report({ + messageId: "expectedLinebreakAfterOpeningBrace", + node, + loc: openBrace.loc, + fix(fixer) { + if (hasCommentsFirstToken) return null; + return fixer.insertTextAfter(openBrace, "\n"); + } + }); + if ((0, ast_exports.isTokenOnSameLine)(last, closeBrace)) context.report({ + messageId: "expectedLinebreakBeforeClosingBrace", + node, + loc: closeBrace.loc, + fix(fixer) { + if (hasCommentsLastToken) return null; + return fixer.insertTextBefore(closeBrace, "\n"); + } + }); + } else { + const consistent = options.consistent; + const hasLineBreakBetweenOpenBraceAndFirst = !(0, ast_exports.isTokenOnSameLine)(openBrace, first); + const hasLineBreakBetweenCloseBraceAndLast = !(0, ast_exports.isTokenOnSameLine)(last, closeBrace); + if (!consistent && hasLineBreakBetweenOpenBraceAndFirst || consistent && hasLineBreakBetweenOpenBraceAndFirst && !hasLineBreakBetweenCloseBraceAndLast) context.report({ + messageId: "unexpectedLinebreakAfterOpeningBrace", + node, + loc: openBrace.loc, + fix(fixer) { + if (hasCommentsFirstToken) return null; + return fixer.removeRange([openBrace.range[1], first.range[0]]); + } + }); + if (!consistent && hasLineBreakBetweenCloseBraceAndLast || consistent && !hasLineBreakBetweenOpenBraceAndFirst && hasLineBreakBetweenCloseBraceAndLast) context.report({ + messageId: "unexpectedLinebreakBeforeClosingBrace", + node, + loc: closeBrace.loc, + fix(fixer) { + if (hasCommentsLastToken) return null; + return fixer.removeRange([last.range[1], closeBrace.range[0]]); + } + }); + } + } + function checkBlockLike(node) { + check(node, node.type); + } + return { + BlockStatement(node) { + const { parent } = node; + switch (parent.type) { + case "DoWhileStatement": + case "ForInStatement": + case "ForOfStatement": + case "ForStatement": + case "WhileStatement": + case "ArrowFunctionExpression": + case "FunctionDeclaration": + case "WithStatement": + check(node, parent.type); + break; + case "FunctionExpression": + if (parent.parent.type === "Property" && parent.parent.method) check(node, "Property"); + else check(node, parent.type); + break; + case "IfStatement": + if (node === parent.consequent) check(node, "IfStatementConsequent"); + if (node === parent.alternate) check(node, "IfStatementAlternative"); + break; + case "TryStatement": + if (node === parent.block) check(node, "TryStatementBlock"); + if (node === parent.finalizer) check(node, "TryStatementFinalizer"); + break; + case "CatchClause": + check(node, "TryStatementHandler"); + break; + default: if (parent.type === "SwitchCase" && parent.consequent.length === 1) check(node, "SwitchCase"); + else check(node, "BlockStatement"); + } + }, + SwitchStatement: checkBlockLike, + ClassBody: checkBlockLike, + StaticBlock: checkBlockLike, + TSModuleBlock: checkBlockLike + }; + } +}); +export { curly_newline_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/dot-location.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/dot-location.js new file mode 100644 index 0000000..5691370 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/dot-location.js @@ -0,0 +1,52 @@ +import { ast_exports, createRule, isDecimalIntegerNumericToken } from "../utils.js"; +var dot_location_default = createRule({ + name: "dot-location", + meta: { + type: "layout", + docs: { description: "Enforce consistent newlines before and after dots" }, + schema: [{ + type: "string", + enum: ["object", "property"] + }], + fixable: "code", + messages: { + expectedDotAfterObject: "Expected dot to be on same line as object.", + expectedDotBeforeProperty: "Expected dot to be on same line as property." + } + }, + create(context) { + const config = context.options[0]; + const onObject = config === "object" || !config; + const sourceCode = context.sourceCode; + function checkDotLocation(node) { + const property = node.property; + const dotToken = sourceCode.getTokenBefore(property); + if (onObject && dotToken) { + const tokenBeforeDot = sourceCode.getTokenBefore(dotToken); + if (tokenBeforeDot && !(0, ast_exports.isTokenOnSameLine)(tokenBeforeDot, dotToken)) context.report({ + node, + loc: dotToken.loc, + messageId: "expectedDotAfterObject", + *fix(fixer) { + if (dotToken.value.startsWith(".") && isDecimalIntegerNumericToken(tokenBeforeDot)) yield fixer.insertTextAfter(tokenBeforeDot, ` ${dotToken.value}`); + else yield fixer.insertTextAfter(tokenBeforeDot, dotToken.value); + yield fixer.remove(dotToken); + } + }); + } else if (dotToken && !(0, ast_exports.isTokenOnSameLine)(dotToken, property)) context.report({ + node, + loc: dotToken.loc, + messageId: "expectedDotBeforeProperty", + *fix(fixer) { + yield fixer.remove(dotToken); + yield fixer.insertTextBefore(property, dotToken.value); + } + }); + } + function checkNode(node) { + if (node.type === "MemberExpression" && !node.computed) checkDotLocation(node); + } + return { MemberExpression: checkNode }; + } +}); +export { dot_location_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/eol-last.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/eol-last.js new file mode 100644 index 0000000..7cfd7f4 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/eol-last.js @@ -0,0 +1,81 @@ +import { createRule, warnDeprecation } from "../utils.js"; +var eol_last_default = createRule({ + name: "eol-last", + meta: { + type: "layout", + docs: { description: "Require or disallow newline at the end of files" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: [ + "always", + "never", + "unix", + "windows" + ] + }], + messages: { + missing: "Newline required at end of file but not found.", + unexpected: "Newline not allowed at end of file." + } + }, + create(context) { + return { Program: function checkBadEOF(node) { + const sourceCode = context.sourceCode; + const src = sourceCode.getText(); + const lastLine = sourceCode.lines[sourceCode.lines.length - 1]; + const location = { + column: lastLine.length, + line: sourceCode.lines.length + }; + const LF = "\n"; + const CRLF = `\r${LF}`; + const endsWithNewline = src.endsWith(LF); + if (!src.length) return; + let mode = context.options[0] || "always"; + let appendCRLF = false; + if (mode === "unix") { + warnDeprecation("option(\"unix\")", "\"always\" and \"@stylistic/eslint-plugin/rules/linebreak-style\"", "eol-last"); + mode = "always"; + } + if (mode === "windows") { + warnDeprecation("option(\"windows\")", "\"always\" and \"@stylistic/eslint-plugin/rules/linebreak-style\"", "eol-last"); + mode = "always"; + appendCRLF = true; + } + if (mode === "always" && !endsWithNewline) context.report({ + node, + loc: location, + messageId: "missing", + fix(fixer) { + return fixer.insertTextAfterRange([0, src.length], appendCRLF ? CRLF : LF); + } + }); + else if (mode === "never" && endsWithNewline) { + const secondLastLine = sourceCode.lines[sourceCode.lines.length - 2]; + context.report({ + node, + loc: { + start: { + line: sourceCode.lines.length - 1, + column: secondLastLine.length + }, + end: { + line: sourceCode.lines.length, + column: 0 + } + }, + messageId: "unexpected", + fix(fixer) { + const finalEOLs = /(?:\r?\n)+$/u; + const match = finalEOLs.exec(sourceCode.text); + const start = match.index; + const end = sourceCode.text.length; + return fixer.replaceTextRange([start, end], ""); + } + }); + } + } }; + } +}); +export { eol_last_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/function-call-argument-newline.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/function-call-argument-newline.js new file mode 100644 index 0000000..9d2d039 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/function-call-argument-newline.js @@ -0,0 +1,76 @@ +import { ast_exports, createRule } from "../utils.js"; +var function_call_argument_newline_default = createRule({ + name: "function-call-argument-newline", + meta: { + type: "layout", + docs: { description: "Enforce line breaks between arguments of a function call" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: [ + "always", + "never", + "consistent" + ] + }], + messages: { + unexpectedLineBreak: "There should be no line break here.", + missingLineBreak: "There should be a line break after this argument." + } + }, + create(context) { + const sourceCode = context.sourceCode; + const checkers = { + unexpected: { + messageId: "unexpectedLineBreak", + check: (prevToken, currentToken) => !(0, ast_exports.isTokenOnSameLine)(prevToken, currentToken), + createFix: (token, tokenBefore) => (fixer) => fixer.replaceTextRange([tokenBefore.range[1], token.range[0]], " ") + }, + missing: { + messageId: "missingLineBreak", + check: (prevToken, currentToken) => (0, ast_exports.isTokenOnSameLine)(prevToken, currentToken), + createFix: (token, tokenBefore) => (fixer) => fixer.replaceTextRange([tokenBefore.range[1], token.range[0]], "\n") + } + }; + function checkArguments(argumentNodes, checker) { + for (let i = 1; i < argumentNodes.length; i++) { + const argumentNode = argumentNodes[i - 1]; + const prevArgToken = sourceCode.getLastToken(argumentNode); + const currentArgToken = sourceCode.getFirstToken(argumentNodes[i]); + if (checker.check(prevArgToken, currentArgToken)) { + const tokenBefore = sourceCode.getTokenBefore(currentArgToken, { includeComments: true }); + const hasLineCommentBefore = tokenBefore.type === "Line"; + context.report({ + node: argumentNodes[i - 1], + loc: { + start: tokenBefore.loc.end, + end: currentArgToken.loc.start + }, + messageId: checker.messageId, + fix: hasLineCommentBefore ? null : checker.createFix(currentArgToken, tokenBefore) + }); + } + } + } + function check(argumentNodes) { + if (argumentNodes.length < 2) return; + const option = context.options[0] || "always"; + if (option === "never") checkArguments(argumentNodes, checkers.unexpected); + else if (option === "always") checkArguments(argumentNodes, checkers.missing); + else if (option === "consistent") { + const firstArgToken = sourceCode.getLastToken(argumentNodes[0]); + const secondArgToken = sourceCode.getFirstToken(argumentNodes[1]); + if ((0, ast_exports.isTokenOnSameLine)(firstArgToken, secondArgToken)) checkArguments(argumentNodes, checkers.unexpected); + else checkArguments(argumentNodes, checkers.missing); + } + } + return { + CallExpression: (node) => check(node.arguments), + NewExpression: (node) => check(node.arguments), + ImportExpression: (node) => { + if (node.options) check([node.source, node.options]); + } + }; + } +}); +export { function_call_argument_newline_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/function-call-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/function-call-spacing.js new file mode 100644 index 0000000..509de8c --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/function-call-spacing.js @@ -0,0 +1,142 @@ +import { ast_exports, createRule } from "../utils.js"; +var function_call_spacing_default = createRule({ + name: "function-call-spacing", + meta: { + type: "layout", + docs: { description: "Require or disallow spacing between function identifiers and their invocations" }, + fixable: "whitespace", + schema: { anyOf: [{ + type: "array", + items: [{ + type: "string", + enum: ["never"] + }], + minItems: 0, + maxItems: 1 + }, { + type: "array", + items: [{ + type: "string", + enum: ["always"] + }, { + type: "object", + properties: { + allowNewlines: { type: "boolean" }, + optionalChain: { + type: "object", + properties: { + before: { type: "boolean" }, + after: { type: "boolean" } + }, + additionalProperties: false + } + }, + additionalProperties: false + }], + minItems: 0, + maxItems: 2 + }] }, + messages: { + unexpectedWhitespace: "Unexpected whitespace between function name and paren.", + unexpectedNewline: "Unexpected newline between function name and paren.", + missing: "Missing space between function name and paren." + } + }, + defaultOptions: ["never", {}], + create(context, [option, config]) { + const sourceCode = context.sourceCode; + const text = sourceCode.getText(); + const { allowNewlines = false, optionalChain = { + before: true, + after: true + } } = config; + function checkSpacing(node, leftToken, rightToken) { + const isOptionalCall = (0, ast_exports.isOptionalCallExpression)(node); + const textBetweenTokens = text.slice(leftToken.range[1], rightToken.range[0]).replace(/\/\*.*?\*\//gu, ""); + const hasWhitespace = /\s/u.test(textBetweenTokens); + const hasNewline = hasWhitespace && ast_exports.LINEBREAK_MATCHER.test(textBetweenTokens); + if (option === "never") { + if (hasWhitespace) return context.report({ + node, + loc: { + start: leftToken.loc.end, + end: rightToken.loc.start + }, + messageId: "unexpectedWhitespace", + fix(fixer) { + if (sourceCode.commentsExistBetween(leftToken, rightToken)) return null; + if (isOptionalCall) return fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], "?."); + return fixer.removeRange([leftToken.range[1], rightToken.range[0]]); + } + }); + } else if (isOptionalCall) { + const { before: beforeOptionChain = true, after: afterOptionChain = true } = optionalChain; + const hasPrefixSpace = /^\s/u.test(textBetweenTokens); + const hasSuffixSpace = /\s$/u.test(textBetweenTokens); + const hasCorrectPrefixSpace = beforeOptionChain ? hasPrefixSpace : !hasPrefixSpace; + const hasCorrectSuffixSpace = afterOptionChain ? hasSuffixSpace : !hasSuffixSpace; + const hasCorrectNewline = allowNewlines || !hasNewline; + if (!hasCorrectPrefixSpace || !hasCorrectSuffixSpace || !hasCorrectNewline) { + const messageId = !hasCorrectNewline ? "unexpectedNewline" : !beforeOptionChain && hasPrefixSpace || !afterOptionChain && hasSuffixSpace ? "unexpectedWhitespace" : "missing"; + context.report({ + node, + loc: { + start: leftToken.loc.end, + end: rightToken.loc.start + }, + messageId, + fix(fixer) { + if (sourceCode.commentsExistBetween(leftToken, rightToken)) return null; + let text$1 = textBetweenTokens; + if (!allowNewlines) { + const GLOBAL_LINEBREAK_MATCHER = new RegExp(ast_exports.LINEBREAK_MATCHER.source, "g"); + text$1 = text$1.replaceAll(GLOBAL_LINEBREAK_MATCHER, " "); + } + if (!hasCorrectPrefixSpace) text$1 = beforeOptionChain ? ` ${text$1}` : text$1.trimStart(); + if (!hasCorrectSuffixSpace) text$1 = afterOptionChain ? `${text$1} ` : text$1.trimEnd(); + return fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], text$1); + } + }); + } + } else if (!hasWhitespace) context.report({ + node, + loc: { + start: leftToken.loc.end, + end: rightToken.loc.start + }, + messageId: "missing", + fix(fixer) { + return fixer.insertTextBefore(rightToken, " "); + } + }); + else if (!allowNewlines && hasNewline) context.report({ + node, + loc: { + start: leftToken.loc.end, + end: rightToken.loc.start + }, + messageId: "unexpectedNewline", + fix(fixer) { + if (sourceCode.commentsExistBetween(leftToken, rightToken)) return null; + return fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], " "); + } + }); + } + return { + "CallExpression, NewExpression": function(node) { + const closingParenToken = sourceCode.getLastToken(node); + const lastCalleeTokenWithoutPossibleParens = sourceCode.getLastToken(node.typeArguments ?? node.callee); + const openingParenToken = sourceCode.getFirstTokenBetween(lastCalleeTokenWithoutPossibleParens, closingParenToken, ast_exports.isOpeningParenToken); + if (!openingParenToken || openingParenToken.range[1] >= node.range[1]) return; + const lastCalleeToken = sourceCode.getTokenBefore(openingParenToken, ast_exports.isNotOptionalChainPunctuator); + checkSpacing(node, lastCalleeToken, openingParenToken); + }, + ImportExpression(node) { + const leftToken = sourceCode.getFirstToken(node); + const rightToken = sourceCode.getTokenAfter(leftToken); + checkSpacing(node, leftToken, rightToken); + } + }; + } +}); +export { function_call_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/function-paren-newline.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/function-paren-newline.js new file mode 100644 index 0000000..7aa5be6 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/function-paren-newline.js @@ -0,0 +1,162 @@ +import { ast_exports, createRule } from "../utils.js"; +var function_paren_newline_default = createRule({ + name: "function-paren-newline", + meta: { + type: "layout", + docs: { description: "Enforce consistent line breaks inside function parentheses" }, + fixable: "whitespace", + schema: [{ oneOf: [{ + type: "string", + enum: [ + "always", + "never", + "consistent", + "multiline", + "multiline-arguments" + ] + }, { + type: "object", + properties: { minItems: { + type: "integer", + minimum: 0 + } }, + additionalProperties: false + }] }], + messages: { + expectedBefore: "Expected newline before ')'.", + expectedAfter: "Expected newline after '('.", + expectedBetween: "Expected newline between arguments/params.", + unexpectedBefore: "Unexpected newline before ')'.", + unexpectedAfter: "Unexpected newline after '('." + } + }, + create(context) { + const sourceCode = context.sourceCode; + const rawOption = context.options[0] || "multiline"; + const multilineOption = rawOption === "multiline"; + const multilineArgumentsOption = rawOption === "multiline-arguments"; + const consistentOption = rawOption === "consistent"; + let minItems; + if (typeof rawOption === "object") minItems = rawOption.minItems; + else if (rawOption === "always") minItems = 0; + else if (rawOption === "never") minItems = Infinity; + function shouldHaveNewlines(elements, hasLeftNewline) { + if (multilineArgumentsOption && elements.length === 1) return hasLeftNewline; + if (multilineOption || multilineArgumentsOption) return elements.some((element, index) => index !== elements.length - 1 && !(0, ast_exports.isTokenOnSameLine)(element, elements[index + 1])); + if (consistentOption) return hasLeftNewline; + return minItems == null || elements.length >= minItems; + } + function validateParens(parens, elements) { + const leftParen = parens.leftParen; + const rightParen = parens.rightParen; + const tokenAfterLeftParen = sourceCode.getTokenAfter(leftParen); + const tokenBeforeRightParen = sourceCode.getTokenBefore(rightParen); + const hasLeftNewline = !(0, ast_exports.isTokenOnSameLine)(leftParen, tokenAfterLeftParen); + const hasRightNewline = !(0, ast_exports.isTokenOnSameLine)(tokenBeforeRightParen, rightParen); + const needsNewlines = shouldHaveNewlines(elements, hasLeftNewline); + if (hasLeftNewline && !needsNewlines) context.report({ + node: leftParen, + messageId: "unexpectedAfter", + fix(fixer) { + return sourceCode.getText().slice(leftParen.range[1], tokenAfterLeftParen.range[0]).trim() ? null : fixer.removeRange([leftParen.range[1], tokenAfterLeftParen.range[0]]); + } + }); + else if (!hasLeftNewline && needsNewlines) context.report({ + node: leftParen, + messageId: "expectedAfter", + fix: (fixer) => fixer.insertTextAfter(leftParen, "\n") + }); + if (hasRightNewline && !needsNewlines) context.report({ + node: rightParen, + messageId: "unexpectedBefore", + fix(fixer) { + return sourceCode.getText().slice(tokenBeforeRightParen.range[1], rightParen.range[0]).trim() ? null : fixer.removeRange([tokenBeforeRightParen.range[1], rightParen.range[0]]); + } + }); + else if (!hasRightNewline && needsNewlines) context.report({ + node: rightParen, + messageId: "expectedBefore", + fix: (fixer) => fixer.insertTextBefore(rightParen, "\n") + }); + } + function validateArguments(parens, elements) { + const leftParen = parens.leftParen; + const tokenAfterLeftParen = sourceCode.getTokenAfter(leftParen); + const hasLeftNewline = !(0, ast_exports.isTokenOnSameLine)(leftParen, tokenAfterLeftParen); + const needsNewlines = shouldHaveNewlines(elements, hasLeftNewline); + for (let i = 0; i <= elements.length - 2; i++) { + const currentElement = elements[i]; + const nextElement = elements[i + 1]; + const hasNewLine = !(0, ast_exports.isTokenOnSameLine)(currentElement, nextElement); + if (!hasNewLine && needsNewlines) context.report({ + node: currentElement, + messageId: "expectedBetween", + fix: (fixer) => fixer.insertTextBefore(nextElement, "\n") + }); + } + } + function getParenTokens(node) { + const isOpeningParenTokenOutsideTypeParameter = () => { + let typeParameterOpeningLevel = 0; + return (token) => { + if (token.type === "Punctuator" && token.value === "<") typeParameterOpeningLevel += 1; + if (token.type === "Punctuator" && token.value === ">") typeParameterOpeningLevel -= 1; + return typeParameterOpeningLevel !== 0 ? false : (0, ast_exports.isOpeningParenToken)(token); + }; + }; + switch (node.type) { + case "NewExpression": if (!node.arguments.length && !((0, ast_exports.isOpeningParenToken)(sourceCode.getLastToken(node, { skip: 1 })) && (0, ast_exports.isClosingParenToken)(sourceCode.getLastToken(node)) && node.callee.range[1] < node.range[1])) return null; + case "CallExpression": return { + leftParen: sourceCode.getTokenAfter(node.callee, isOpeningParenTokenOutsideTypeParameter()), + rightParen: sourceCode.getLastToken(node) + }; + case "FunctionDeclaration": + case "FunctionExpression": { + const leftParen = sourceCode.getFirstToken(node, isOpeningParenTokenOutsideTypeParameter()); + const rightParen = node.params.length ? sourceCode.getTokenAfter(node.params[node.params.length - 1], ast_exports.isClosingParenToken) : sourceCode.getTokenAfter(leftParen); + return { + leftParen, + rightParen + }; + } + case "ArrowFunctionExpression": { + const firstToken = sourceCode.getFirstToken(node, { skip: node.async ? 1 : 0 }); + if (!(0, ast_exports.isOpeningParenToken)(firstToken)) return null; + const rightParen = node.params.length ? sourceCode.getTokenAfter(node.params[node.params.length - 1], ast_exports.isClosingParenToken) : sourceCode.getTokenAfter(firstToken); + return { + leftParen: firstToken, + rightParen + }; + } + case "ImportExpression": { + const leftParen = sourceCode.getFirstToken(node, 1); + const rightParen = sourceCode.getLastToken(node); + return { + leftParen, + rightParen + }; + } + default: throw new TypeError(`unexpected node with type ${node.type}`); + } + } + return { [[ + "ArrowFunctionExpression", + "CallExpression", + "FunctionDeclaration", + "FunctionExpression", + "ImportExpression", + "NewExpression" + ].join(", ")](node) { + const parens = getParenTokens(node); + let params; + if (node.type === "ImportExpression") params = [node.source, ...node.options ? [node.options] : []]; + else if ((0, ast_exports.isFunction)(node)) params = node.params; + else params = node.arguments; + if (parens) { + validateParens(parens, params); + if (multilineArgumentsOption) validateArguments(parens, params); + } + } }; + } +}); +export { function_paren_newline_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/generator-star-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/generator-star-spacing.js new file mode 100644 index 0000000..f58703e --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/generator-star-spacing.js @@ -0,0 +1,135 @@ +import { createRule } from "../utils.js"; +const OVERRIDE_SCHEMA = { oneOf: [{ + type: "string", + enum: [ + "before", + "after", + "both", + "neither" + ] +}, { + type: "object", + properties: { + before: { type: "boolean" }, + after: { type: "boolean" } + }, + additionalProperties: false +}] }; +var generator_star_spacing_default = createRule({ + name: "generator-star-spacing", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing around `*` operators in generator functions" }, + fixable: "whitespace", + schema: [{ oneOf: [{ + type: "string", + enum: [ + "before", + "after", + "both", + "neither" + ] + }, { + type: "object", + properties: { + before: { type: "boolean" }, + after: { type: "boolean" }, + named: OVERRIDE_SCHEMA, + anonymous: OVERRIDE_SCHEMA, + method: OVERRIDE_SCHEMA, + shorthand: OVERRIDE_SCHEMA + }, + additionalProperties: false + }] }], + defaultOptions: [{ + before: true, + after: false + }], + messages: { + missingBefore: "Missing space before *.", + missingAfter: "Missing space after *.", + unexpectedBefore: "Unexpected space before *.", + unexpectedAfter: "Unexpected space after *." + } + }, + create(context, [options]) { + const optionDefinitions = { + before: { + before: true, + after: false + }, + after: { + before: false, + after: true + }, + both: { + before: true, + after: true + }, + neither: { + before: false, + after: false + } + }; + function optionToDefinition(option, defaults) { + if (!option) return defaults; + return typeof option === "string" ? optionDefinitions[option] : Object.assign({}, defaults, option); + } + const modes = function() { + const defaults = optionToDefinition(options, optionDefinitions.before); + const { named, anonymous, method, shorthand } = options; + return { + named: optionToDefinition(named, defaults), + anonymous: optionToDefinition(anonymous, defaults), + method: optionToDefinition(method, defaults), + shorthand: optionToDefinition(shorthand ?? method, defaults) + }; + }(); + const sourceCode = context.sourceCode; + function isStarToken(token) { + return token.value === "*" && token.type === "Punctuator"; + } + function getStarToken(node) { + return sourceCode.getFirstToken("method" in node.parent && node.parent.method || node.parent.type === "MethodDefinition" ? node.parent : node, isStarToken); + } + function capitalize(str) { + return str[0].toUpperCase() + str.slice(1); + } + function checkSpacing(kind, side, leftToken, rightToken) { + if (!!(rightToken.range[0] - leftToken.range[1]) !== modes[kind][side]) { + const after = leftToken.value === "*"; + const spaceRequired = modes[kind][side]; + const node = after ? leftToken : rightToken; + const messageId = `${spaceRequired ? "missing" : "unexpected"}${capitalize(side)}`; + context.report({ + node, + messageId, + fix(fixer) { + if (spaceRequired) { + if (after) return fixer.insertTextAfter(node, " "); + return fixer.insertTextBefore(node, " "); + } + return fixer.removeRange([leftToken.range[1], rightToken.range[0]]); + } + }); + } + } + function checkFunction(node) { + if (!node.generator) return; + const starToken = getStarToken(node); + const prevToken = sourceCode.getTokenBefore(starToken); + const nextToken = sourceCode.getTokenAfter(starToken); + let kind = "named"; + if (node.parent.type === "Property" && node.parent.method) kind = "shorthand"; + else if (node.parent.type === "MethodDefinition") kind = "method"; + else if (!node.id) kind = "anonymous"; + if (!((kind === "method" || kind === "shorthand") && starToken === sourceCode.getFirstToken(node.parent))) checkSpacing(kind, "before", prevToken, starToken); + checkSpacing(kind, "after", starToken, nextToken); + } + return { + FunctionDeclaration: checkFunction, + FunctionExpression: checkFunction + }; + } +}); +export { generator_star_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/implicit-arrow-linebreak.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/implicit-arrow-linebreak.js new file mode 100644 index 0000000..5ea3a87 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/implicit-arrow-linebreak.js @@ -0,0 +1,42 @@ +import { ast_exports, createRule, hasCommentsBetween } from "../utils.js"; +var implicit_arrow_linebreak_default = createRule({ + name: "implicit-arrow-linebreak", + meta: { + type: "layout", + docs: { description: "Enforce the location of arrow function bodies" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: ["beside", "below"] + }], + messages: { + expected: "Expected a linebreak before this expression.", + unexpected: "Expected no linebreak before this expression." + } + }, + create(context) { + const sourceCode = context.sourceCode; + const option = context.options[0] || "beside"; + function validateExpression(node) { + if (node.body.type === "BlockStatement") return; + const arrowToken = sourceCode.getTokenBefore(node.body, ast_exports.isNotOpeningParenToken); + const firstTokenOfBody = sourceCode.getTokenAfter(arrowToken); + const onSameLine = (0, ast_exports.isTokenOnSameLine)(arrowToken, firstTokenOfBody); + if (onSameLine && option === "below") context.report({ + node: firstTokenOfBody, + messageId: "expected", + fix: (fixer) => fixer.insertTextBefore(firstTokenOfBody, "\n") + }); + else if (!onSameLine && option === "beside") context.report({ + node: firstTokenOfBody, + messageId: "unexpected", + fix(fixer) { + if (hasCommentsBetween(sourceCode, arrowToken, firstTokenOfBody)) return null; + return fixer.replaceTextRange([arrowToken.range[1], firstTokenOfBody.range[0]], " "); + } + }); + } + return { ArrowFunctionExpression: (node) => validateExpression(node) }; + } +}); +export { implicit_arrow_linebreak_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/indent-binary-ops.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/indent-binary-ops.js new file mode 100644 index 0000000..926c1f3 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/indent-binary-ops.js @@ -0,0 +1,140 @@ +import { ASSIGNMENT_OPERATOR, createRule, isKeywordToken } from "../utils.js"; +var indent_binary_ops_default = createRule({ + name: "indent-binary-ops", + meta: { + type: "layout", + docs: { description: "Indentation for binary operators" }, + fixable: "whitespace", + schema: [{ oneOf: [{ + type: "integer", + minimum: 0 + }, { + type: "string", + enum: ["tab"] + }] }], + messages: { wrongIndentation: "Expected indentation of {{expected}}" } + }, + defaultOptions: [2], + create: (context, options) => { + const { sourceCode } = context; + const indentStr = options[0] === "tab" ? " " : " ".repeat(options[0] ?? 2); + const indentCache = /* @__PURE__ */ new Map(); + function getIndentOfLine(line) { + if (indentCache.has(line)) return indentCache.get(line); + return sourceCode.lines[line - 1].match(/^\s*/)?.[0] ?? ""; + } + function subtractionIndent(indent) { + if (options[0] === "tab") return indent.slice(1); + return indent.slice(options[0] ?? 2); + } + function getTargetIndent(indent, needAdditionIndent, needSubtractionIndent) { + if (needAdditionIndent && !needSubtractionIndent) return indent + indentStr; + if (!needAdditionIndent && needSubtractionIndent) return subtractionIndent(indent); + return indent; + } + function firstTokenOfLine(line) { + return sourceCode.tokensAndComments.find((token) => token.loc.start.line === line); + } + function lastTokenOfLine(line) { + return [...sourceCode.tokensAndComments].reverse().find((token) => token.loc.end.line === line); + } + function isGreaterThanCloseBracketOfLine(line) { + const tokensAndCommentsOfLine = sourceCode.tokensAndComments.filter((token) => token.loc.start.line === line); + let openBracketCount = 0; + let closeBracketCount = 0; + for (const token of tokensAndCommentsOfLine) { + if (token.value === "(") openBracketCount++; + if (token.value === ")") closeBracketCount++; + } + return openBracketCount < closeBracketCount; + } + function isTypeKeywordOfNode(typeToken, node) { + while (node.parent) { + node = node.parent; + if (node.type === "TSTypeAliasDeclaration" && context.sourceCode.getTokenBefore(node.id) === typeToken) return true; + } + return false; + } + function handler(node, right) { + if (node.loc.start.line === node.loc.end.line) return; + let tokenRight = sourceCode.getFirstToken(right); + let tokenOperator = sourceCode.getTokenBefore(tokenRight); + while (tokenOperator.value === "(") { + tokenRight = tokenOperator; + tokenOperator = sourceCode.getTokenBefore(tokenRight); + if (tokenOperator.range[0] <= right.parent.range[0]) return; + } + const tokenBeforeAll = sourceCode.getTokenBefore(node); + const tokenLeft = sourceCode.getTokenBefore(tokenOperator); + const isMultiline = tokenRight.loc.start.line !== tokenLeft.loc.start.line; + if (!isMultiline) return; + const firstTokenOfLineLeft = firstTokenOfLine(tokenLeft.loc.start.line); + const lastTokenOfLineLeft = lastTokenOfLine(tokenLeft.loc.start.line); + const needAdditionIndent = isKeywordToken(firstTokenOfLineLeft) && ![ + "typeof", + "instanceof", + "this" + ].includes(firstTokenOfLineLeft.value) || firstTokenOfLineLeft?.type === "Identifier" && firstTokenOfLineLeft.value === "type" && isTypeKeywordOfNode(firstTokenOfLineLeft, node) || [ + ":", + "[", + "(", + "<" + ].concat(ASSIGNMENT_OPERATOR).includes(lastTokenOfLineLeft?.value || "") || [ + "[", + "(", + "{", + "=>", + ":" + ].concat(ASSIGNMENT_OPERATOR).includes(tokenBeforeAll?.value || "") && firstTokenOfLineLeft?.loc.start.line === tokenBeforeAll?.loc.start.line; + const needSubtractionIndent = lastTokenOfLineLeft?.value === ")" && isGreaterThanCloseBracketOfLine(tokenLeft.loc.start.line) && ![ + "]", + ")", + "}" + ].includes(firstTokenOfLineLeft?.value || ""); + const indentLeft = getIndentOfLine(tokenLeft.loc.start.line); + const indentRight = getIndentOfLine(tokenRight.loc.start.line); + const indentTarget = getTargetIndent(indentLeft, needAdditionIndent, needSubtractionIndent); + if (indentTarget !== indentRight) { + const start = { + line: tokenRight.loc.start.line, + column: 0 + }; + const end = { + line: tokenRight.loc.start.line, + column: indentRight.length + }; + context.report({ + loc: { + start, + end + }, + messageId: "wrongIndentation", + data: { expected: `${indentTarget.length} ${options[0] === "tab" ? "tab" : "space"}${indentTarget.length === 1 ? "" : "s"}` }, + fix(fixer) { + return fixer.replaceTextRange([sourceCode.getIndexFromLoc(start), sourceCode.getIndexFromLoc(end)], indentTarget); + } + }); + indentCache.set(tokenRight.loc.start.line, indentTarget); + } + } + return { + BinaryExpression(node) { + handler(node, node.right); + }, + LogicalExpression(node) { + handler(node, node.right); + }, + TSUnionType(node) { + if (node.types.length > 1) node.types.forEach((type) => { + handler(node, type); + }); + }, + TSIntersectionType(node) { + if (node.types.length > 1) node.types.forEach((type) => { + handler(node, type); + }); + } + }; + } +}); +export { indent_binary_ops_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/indent.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/indent.js new file mode 100644 index 0000000..367971e --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/indent.js @@ -0,0 +1,1205 @@ +import { AST_NODE_TYPES, STATEMENT_LIST_PARENTS, ast_exports, createGlobalLinebreakMatcher, createRule, getCommentsBetween, isEqToken, isQuestionToken, isSingleLine, skipChainExpression } from "../utils.js"; +const KNOWN_NODES = new Set([ + "AssignmentExpression", + "AssignmentPattern", + "ArrayExpression", + "ArrayPattern", + "ArrowFunctionExpression", + "AwaitExpression", + "BlockStatement", + "BinaryExpression", + "BreakStatement", + "CallExpression", + "CatchClause", + "ChainExpression", + "ClassBody", + "ClassDeclaration", + "ClassExpression", + "ConditionalExpression", + "ContinueStatement", + "DoWhileStatement", + "DebuggerStatement", + "EmptyStatement", + "ExpressionStatement", + "ForStatement", + "ForInStatement", + "ForOfStatement", + "FunctionDeclaration", + "FunctionExpression", + "Identifier", + "IfStatement", + "Literal", + "LabeledStatement", + "LogicalExpression", + "MemberExpression", + "MetaProperty", + "MethodDefinition", + "NewExpression", + "ObjectExpression", + "ObjectPattern", + "PrivateIdentifier", + "Program", + "Property", + "PropertyDefinition", + AST_NODE_TYPES.AccessorProperty, + "RestElement", + "ReturnStatement", + "SequenceExpression", + "SpreadElement", + "StaticBlock", + "Super", + "SwitchCase", + "SwitchStatement", + "TaggedTemplateExpression", + "TemplateElement", + "TemplateLiteral", + "ThisExpression", + "ThrowStatement", + "TryStatement", + "UnaryExpression", + "UpdateExpression", + "VariableDeclaration", + "VariableDeclarator", + "WhileStatement", + "WithStatement", + "YieldExpression", + "JSXFragment", + "JSXOpeningFragment", + "JSXClosingFragment", + "JSXIdentifier", + "JSXNamespacedName", + "JSXMemberExpression", + "JSXEmptyExpression", + "JSXExpressionContainer", + "JSXElement", + "JSXClosingElement", + "JSXOpeningElement", + "JSXAttribute", + "JSXSpreadAttribute", + "JSXText", + "ExportDefaultDeclaration", + "ExportNamedDeclaration", + "ExportAllDeclaration", + "ExportSpecifier", + "ImportDeclaration", + "ImportSpecifier", + "ImportDefaultSpecifier", + "ImportNamespaceSpecifier", + "ImportExpression", + "ImportAttribute", + AST_NODE_TYPES.TSAbstractKeyword, + AST_NODE_TYPES.TSAnyKeyword, + AST_NODE_TYPES.TSBooleanKeyword, + AST_NODE_TYPES.TSNeverKeyword, + AST_NODE_TYPES.TSNumberKeyword, + AST_NODE_TYPES.TSStringKeyword, + AST_NODE_TYPES.TSSymbolKeyword, + AST_NODE_TYPES.TSUndefinedKeyword, + AST_NODE_TYPES.TSUnknownKeyword, + AST_NODE_TYPES.TSVoidKeyword, + AST_NODE_TYPES.TSNullKeyword, + AST_NODE_TYPES.TSAbstractPropertyDefinition, + AST_NODE_TYPES.TSAbstractAccessorProperty, + AST_NODE_TYPES.TSAbstractMethodDefinition, + AST_NODE_TYPES.TSArrayType, + AST_NODE_TYPES.TSAsExpression, + AST_NODE_TYPES.TSCallSignatureDeclaration, + AST_NODE_TYPES.TSConditionalType, + AST_NODE_TYPES.TSConstructorType, + AST_NODE_TYPES.TSConstructSignatureDeclaration, + AST_NODE_TYPES.TSDeclareFunction, + AST_NODE_TYPES.TSEmptyBodyFunctionExpression, + AST_NODE_TYPES.TSEnumDeclaration, + AST_NODE_TYPES.TSEnumBody, + AST_NODE_TYPES.TSEnumMember, + AST_NODE_TYPES.TSExportAssignment, + AST_NODE_TYPES.TSExternalModuleReference, + AST_NODE_TYPES.TSFunctionType, + AST_NODE_TYPES.TSImportType, + AST_NODE_TYPES.TSIndexedAccessType, + AST_NODE_TYPES.TSIndexSignature, + AST_NODE_TYPES.TSInferType, + AST_NODE_TYPES.TSInterfaceBody, + AST_NODE_TYPES.TSInterfaceDeclaration, + AST_NODE_TYPES.TSInterfaceHeritage, + AST_NODE_TYPES.TSImportEqualsDeclaration, + AST_NODE_TYPES.TSLiteralType, + AST_NODE_TYPES.TSMappedType, + AST_NODE_TYPES.TSMethodSignature, + "TSMinusToken", + AST_NODE_TYPES.TSModuleBlock, + AST_NODE_TYPES.TSModuleDeclaration, + AST_NODE_TYPES.TSNonNullExpression, + AST_NODE_TYPES.TSParameterProperty, + "TSPlusToken", + AST_NODE_TYPES.TSPropertySignature, + AST_NODE_TYPES.TSQualifiedName, + "TSQuestionToken", + AST_NODE_TYPES.TSRestType, + AST_NODE_TYPES.TSThisType, + AST_NODE_TYPES.TSTupleType, + AST_NODE_TYPES.TSTypeAliasDeclaration, + AST_NODE_TYPES.TSTypeAnnotation, + AST_NODE_TYPES.TSTypeLiteral, + AST_NODE_TYPES.TSTypeOperator, + AST_NODE_TYPES.TSTypeParameter, + AST_NODE_TYPES.TSTypeParameterDeclaration, + AST_NODE_TYPES.TSTypeParameterInstantiation, + AST_NODE_TYPES.TSTypeReference, + AST_NODE_TYPES.Decorator +]); +var IndexMap = class { + _values; + constructor(maxKey) { + this._values = new Array(maxKey + 1); + } + insert(key, value) { + this._values[key] = value; + } + findLastNotAfter(key) { + const values = this._values; + for (let index = key; index >= 0; index--) { + const value = values[index]; + if (value) return value; + } + } + deleteRange(start, end) { + this._values.fill(void 0, start, end); + } +}; +var TokenInfo = class { + sourceCode; + firstTokensByLineNumber; + constructor(sourceCode) { + this.sourceCode = sourceCode; + this.firstTokensByLineNumber = /* @__PURE__ */ new Map(); + const tokens = sourceCode.tokensAndComments; + for (let i = 0; i < tokens.length; i++) { + const token = tokens[i]; + if (!this.firstTokensByLineNumber.has(token.loc.start.line)) this.firstTokensByLineNumber.set(token.loc.start.line, token); + if (!this.firstTokensByLineNumber.has(token.loc.end.line) && sourceCode.text.slice(token.range[1] - token.loc.end.column, token.range[1]).trim()) this.firstTokensByLineNumber.set(token.loc.end.line, token); + } + } + getFirstTokenOfLine(token) { + return this.firstTokensByLineNumber.get(token.loc.start.line); + } + isFirstTokenOfLine(token) { + return this.getFirstTokenOfLine(token) === token; + } + getTokenIndent(token) { + return this.sourceCode.text.slice(token.range[0] - token.loc.start.column, token.range[0]); + } +}; +var OffsetStorage = class { + _tokenInfo; + _indentSize; + _indentType; + _indexMap; + _lockedFirstTokens = /* @__PURE__ */ new WeakMap(); + _desiredIndentCache = /* @__PURE__ */ new WeakMap(); + _ignoredTokens = /* @__PURE__ */ new WeakSet(); + constructor(tokenInfo, indentSize, indentType, maxIndex) { + this._tokenInfo = tokenInfo; + this._indentSize = indentSize; + this._indentType = indentType; + this._indexMap = new IndexMap(maxIndex); + this._indexMap.insert(0, { + offset: 0, + from: null, + force: false + }); + } + _getOffsetDescriptor(token) { + return this._indexMap.findLastNotAfter(token.range[0]); + } + matchOffsetOf(baseToken, offsetToken) { + this._lockedFirstTokens.set(offsetToken, baseToken); + } + setDesiredOffset(token, fromToken, offset) { + if (token) this.setDesiredOffsets(token.range, fromToken, offset); + } + setDesiredOffsets(range, fromToken, offset, force = false) { + const descriptorToInsert = { + offset, + from: fromToken, + force + }; + const descriptorAfterRange = this._indexMap.findLastNotAfter(range[1]); + const fromTokenIsInRange = fromToken && fromToken.range[0] >= range[0] && fromToken.range[1] <= range[1]; + const fromTokenDescriptor = fromTokenIsInRange && this._getOffsetDescriptor(fromToken); + this._indexMap.deleteRange(range[0] + 1, range[1]); + this._indexMap.insert(range[0], descriptorToInsert); + if (fromTokenIsInRange) { + this._indexMap.insert(fromToken.range[0], fromTokenDescriptor); + this._indexMap.insert(fromToken.range[1], descriptorToInsert); + } + this._indexMap.insert(range[1], descriptorAfterRange); + } + getDesiredIndent(token) { + if (!this._desiredIndentCache.has(token)) if (this._ignoredTokens.has(token)) this._desiredIndentCache.set(token, this._tokenInfo.getTokenIndent(token)); + else if (this._lockedFirstTokens.has(token)) { + const firstToken = this._lockedFirstTokens.get(token); + const firstTokenOfLine = this._tokenInfo.getFirstTokenOfLine(firstToken); + this._desiredIndentCache.set(token, this.getDesiredIndent(firstTokenOfLine) + this._indentType.repeat(firstToken.loc.start.column - firstTokenOfLine.loc.start.column)); + } else { + const offsetInfo = this._getOffsetDescriptor(token); + const offset = offsetInfo.from && offsetInfo.from.loc.start.line === token.loc.start.line && !/^\s*?\n/u.test(token.value) && !offsetInfo.force ? 0 : offsetInfo.offset * this._indentSize; + this._desiredIndentCache.set(token, (offsetInfo.from ? this.getDesiredIndent(offsetInfo.from) : "") + this._indentType.repeat(offset)); + } + return this._desiredIndentCache.get(token); + } + ignoreToken(token) { + if (this._tokenInfo.isFirstTokenOfLine(token)) this._ignoredTokens.add(token); + } + getFirstDependency(token) { + return this._getOffsetDescriptor(token).from; + } +}; +const ELEMENT_LIST_SCHEMA = { oneOf: [{ + type: "integer", + minimum: 0 +}, { + type: "string", + enum: ["first", "off"] +}] }; +var indent_default = createRule({ + name: "indent", + meta: { + type: "layout", + docs: { description: "Enforce consistent indentation" }, + fixable: "whitespace", + schema: [{ oneOf: [{ + type: "string", + enum: ["tab"] + }, { + type: "integer", + minimum: 0 + }] }, { + type: "object", + properties: { + SwitchCase: { + type: "integer", + minimum: 0, + default: 0 + }, + VariableDeclarator: { oneOf: [ELEMENT_LIST_SCHEMA, { + type: "object", + properties: { + var: ELEMENT_LIST_SCHEMA, + let: ELEMENT_LIST_SCHEMA, + const: ELEMENT_LIST_SCHEMA, + using: ELEMENT_LIST_SCHEMA + }, + additionalProperties: false + }] }, + assignmentOperator: { oneOf: [{ + type: "integer", + minimum: 0 + }, { + type: "string", + enum: ["off"] + }] }, + outerIIFEBody: { oneOf: [{ + type: "integer", + minimum: 0 + }, { + type: "string", + enum: ["off"] + }] }, + MemberExpression: { oneOf: [{ + type: "integer", + minimum: 0 + }, { + type: "string", + enum: ["off"] + }] }, + FunctionDeclaration: { + type: "object", + properties: { + parameters: ELEMENT_LIST_SCHEMA, + body: { + type: "integer", + minimum: 0 + }, + returnType: { + type: "integer", + minimum: 0 + } + }, + additionalProperties: false + }, + FunctionExpression: { + type: "object", + properties: { + parameters: ELEMENT_LIST_SCHEMA, + body: { + type: "integer", + minimum: 0 + }, + returnType: { + type: "integer", + minimum: 0 + } + }, + additionalProperties: false + }, + StaticBlock: { + type: "object", + properties: { body: { + type: "integer", + minimum: 0 + } }, + additionalProperties: false + }, + CallExpression: { + type: "object", + properties: { arguments: ELEMENT_LIST_SCHEMA }, + additionalProperties: false + }, + ArrayExpression: ELEMENT_LIST_SCHEMA, + ObjectExpression: ELEMENT_LIST_SCHEMA, + ImportDeclaration: ELEMENT_LIST_SCHEMA, + flatTernaryExpressions: { + type: "boolean", + default: false + }, + offsetTernaryExpressions: { + type: "boolean", + default: false + }, + offsetTernaryExpressionsOffsetCallExpressions: { + type: "boolean", + default: true + }, + ignoredNodes: { + type: "array", + items: { + type: "string", + not: { pattern: ":exit$" } + } + }, + ignoreComments: { + type: "boolean", + default: false + }, + tabLength: { + type: "number", + default: 4 + } + }, + additionalProperties: false + }], + messages: { wrongIndentation: "Expected indentation of {{expected}} but found {{actual}}." } + }, + defaultOptions: [4, { + SwitchCase: 1, + flatTernaryExpressions: false, + ignoredNodes: [] + }], + create(context, optionsWithDefaults) { + const DEFAULT_VARIABLE_INDENT = 1; + const DEFAULT_PARAMETER_INDENT = 1; + const DEFAULT_FUNCTION_BODY_INDENT = 1; + const DEFAULT_FUNCTION_RETURN_TYPE_INDENT = 1; + let indentType = "space"; + let indentSize = 4; + const options = { + SwitchCase: 0, + VariableDeclarator: { + var: DEFAULT_VARIABLE_INDENT, + let: DEFAULT_VARIABLE_INDENT, + const: DEFAULT_VARIABLE_INDENT, + using: DEFAULT_VARIABLE_INDENT + }, + outerIIFEBody: 1, + assignmentOperator: 1, + FunctionDeclaration: { + parameters: DEFAULT_PARAMETER_INDENT, + body: DEFAULT_FUNCTION_BODY_INDENT, + returnType: DEFAULT_FUNCTION_RETURN_TYPE_INDENT + }, + FunctionExpression: { + parameters: DEFAULT_PARAMETER_INDENT, + body: DEFAULT_FUNCTION_BODY_INDENT, + returnType: DEFAULT_FUNCTION_RETURN_TYPE_INDENT + }, + StaticBlock: { body: DEFAULT_FUNCTION_BODY_INDENT }, + CallExpression: { arguments: DEFAULT_PARAMETER_INDENT }, + MemberExpression: 1, + ArrayExpression: 1, + ObjectExpression: 1, + ImportDeclaration: 1, + flatTernaryExpressions: false, + ignoredNodes: [], + ignoreComments: false, + offsetTernaryExpressions: false, + offsetTernaryExpressionsOffsetCallExpressions: true, + tabLength: 4 + }; + if (optionsWithDefaults.length) { + if (optionsWithDefaults[0] === "tab") { + indentSize = 1; + indentType = "tab"; + } else { + indentSize = optionsWithDefaults[0] ?? indentSize; + indentType = "space"; + } + const userOptions = optionsWithDefaults[1]; + if (userOptions) { + Object.assign(options, userOptions); + if (typeof userOptions.VariableDeclarator === "number" || userOptions.VariableDeclarator === "first") options.VariableDeclarator = { + var: userOptions.VariableDeclarator, + let: userOptions.VariableDeclarator, + const: userOptions.VariableDeclarator, + using: userOptions.VariableDeclarator + }; + } + } + const sourceCode = context.sourceCode; + const tokenInfo = new TokenInfo(sourceCode); + const offsets = new OffsetStorage(tokenInfo, indentSize, indentType === "space" ? " " : " ", sourceCode.text.length); + const parameterParens = /* @__PURE__ */ new WeakSet(); + function createErrorMessageData(expectedAmount, actualSpaces, actualTabs) { + const expectedStatement = `${expectedAmount} ${indentType}${expectedAmount === 1 ? "" : "s"}`; + const foundSpacesWord = `space${actualSpaces === 1 ? "" : "s"}`; + const foundTabsWord = `tab${actualTabs === 1 ? "" : "s"}`; + let foundStatement; + if (actualSpaces > 0) foundStatement = indentType === "space" ? actualSpaces : `${actualSpaces} ${foundSpacesWord}`; + else if (actualTabs > 0) foundStatement = indentType === "tab" ? actualTabs : `${actualTabs} ${foundTabsWord}`; + else foundStatement = "0"; + return { + expected: expectedStatement, + actual: foundStatement + }; + } + function report(token, neededIndent) { + const actualIndent = Array.from(tokenInfo.getTokenIndent(token)); + const numSpaces = actualIndent.filter((char) => char === " ").length; + const numTabs = actualIndent.filter((char) => char === " ").length; + context.report({ + node: token, + messageId: "wrongIndentation", + data: createErrorMessageData(neededIndent.length, numSpaces, numTabs), + loc: { + start: { + line: token.loc.start.line, + column: 0 + }, + end: { + line: token.loc.start.line, + column: token.loc.start.column + } + }, + fix(fixer) { + const range = [token.range[0] - token.loc.start.column, token.range[0]]; + const newText = neededIndent; + return fixer.replaceTextRange(range, newText); + } + }); + } + function validateTokenIndent(token, desiredIndent) { + const indentation = tokenInfo.getTokenIndent(token); + return indentation === desiredIndent; + } + function isOuterIIFE(node) { + if (!node.parent || node.parent.type !== "CallExpression" || node.parent.callee !== node) return false; + let statement = node.parent && node.parent.parent; + while (statement.type === "UnaryExpression" && [ + "!", + "~", + "+", + "-" + ].includes(statement.operator) || statement.type === "AssignmentExpression" || statement.type === "LogicalExpression" || statement.type === "SequenceExpression" || statement.type === "VariableDeclarator") statement = statement.parent; + return (statement.type === "ExpressionStatement" || statement.type === "VariableDeclaration") && statement.parent.type === "Program"; + } + function countTrailingLinebreaks(string) { + const trailingWhitespace = string.match(/\s*$/u)[0]; + const linebreakMatches = trailingWhitespace.match(createGlobalLinebreakMatcher()); + return linebreakMatches === null ? 0 : linebreakMatches.length; + } + function addElementListIndent(elements, startToken, endToken, offset) { + function getFirstToken(element) { + let token = sourceCode.getTokenBefore(element); + while ((0, ast_exports.isOpeningParenToken)(token) && token !== startToken) token = sourceCode.getTokenBefore(token); + return sourceCode.getTokenAfter(token); + } + offsets.setDesiredOffsets([startToken.range[1], endToken.range[0]], startToken, typeof offset === "number" ? offset : 1); + offsets.setDesiredOffset(endToken, startToken, 0); + if (offset === "first" && elements.length && !elements[0]) return; + elements.forEach((element, index) => { + if (!element) return; + if (offset === "off") offsets.ignoreToken(getFirstToken(element)); + if (index === 0) return; + if (offset === "first" && tokenInfo.isFirstTokenOfLine(getFirstToken(element))) offsets.matchOffsetOf(getFirstToken(elements[0]), getFirstToken(element)); + else { + const previousElement = elements[index - 1]; + const firstTokenOfPreviousElement = previousElement && getFirstToken(previousElement); + const previousElementLastToken = previousElement && sourceCode.getLastToken(previousElement); + if (previousElement && previousElementLastToken.loc.end.line - countTrailingLinebreaks(previousElementLastToken.value) > startToken.loc.end.line) offsets.setDesiredOffsets([previousElement.range[1], element.range[1]], firstTokenOfPreviousElement, 0); + } + }); + } + function addBlocklessNodeIndent(node) { + if (node.type !== "BlockStatement") { + const lastParentToken = sourceCode.getTokenBefore(node, ast_exports.isNotOpeningParenToken); + let firstBodyToken = sourceCode.getFirstToken(node); + let lastBodyToken = sourceCode.getLastToken(node); + while ((0, ast_exports.isOpeningParenToken)(sourceCode.getTokenBefore(firstBodyToken)) && (0, ast_exports.isClosingParenToken)(sourceCode.getTokenAfter(lastBodyToken))) { + firstBodyToken = sourceCode.getTokenBefore(firstBodyToken); + lastBodyToken = sourceCode.getTokenAfter(lastBodyToken); + } + offsets.setDesiredOffsets([firstBodyToken.range[0], lastBodyToken.range[1]], lastParentToken, 1); + } + } + function addFunctionCallIndent(node) { + let openingParen; + if (node.arguments.length) openingParen = sourceCode.getTokenAfter(node.typeArguments ?? node.callee, ast_exports.isOpeningParenToken); + else openingParen = sourceCode.getLastToken(node, 1); + const closingParen = sourceCode.getLastToken(node); + parameterParens.add(openingParen); + parameterParens.add(closingParen); + if ("optional" in node && node.optional) { + const dotToken = sourceCode.getTokenAfter(node.callee, ast_exports.isOptionalChainPunctuator); + const calleeParenCount = sourceCode.getTokensBetween(node.callee, dotToken, { filter: ast_exports.isClosingParenToken }).length; + const firstTokenOfCallee = calleeParenCount ? sourceCode.getTokenBefore(node.callee, { skip: calleeParenCount - 1 }) : sourceCode.getFirstToken(node.callee); + const lastTokenOfCallee = sourceCode.getTokenBefore(dotToken); + const offsetBase = (0, ast_exports.isTokenOnSameLine)(lastTokenOfCallee, openingParen) ? lastTokenOfCallee : firstTokenOfCallee; + offsets.setDesiredOffset(dotToken, offsetBase, 1); + } + const offsetAfterToken = node.callee.type === "TaggedTemplateExpression" ? sourceCode.getFirstToken(node.callee.quasi) : node.typeArguments ?? openingParen; + const offsetToken = sourceCode.getTokenBefore(offsetAfterToken); + offsets.setDesiredOffset(openingParen, offsetToken, 0); + addElementListIndent(node.arguments, openingParen, closingParen, options.CallExpression.arguments); + } + function addParensIndent(tokens) { + const parenStack = []; + const parenPairs = []; + for (let i = 0; i < tokens.length; i++) { + const nextToken = tokens[i]; + if ((0, ast_exports.isOpeningParenToken)(nextToken)) parenStack.push(nextToken); + else if ((0, ast_exports.isClosingParenToken)(nextToken)) parenPairs.push({ + left: parenStack.pop(), + right: nextToken + }); + } + for (let i = parenPairs.length - 1; i >= 0; i--) { + const leftParen = parenPairs[i].left; + const rightParen = parenPairs[i].right; + if (!parameterParens.has(leftParen) && !parameterParens.has(rightParen)) { + const parenthesizedTokens = new Set(sourceCode.getTokensBetween(leftParen, rightParen)); + parenthesizedTokens.forEach((token) => { + if (!parenthesizedTokens.has(offsets.getFirstDependency(token))) offsets.setDesiredOffset(token, leftParen, 1); + }); + } + offsets.setDesiredOffset(rightParen, leftParen, 0); + } + } + function ignoreNode(node) { + const unknownNodeTokens = new Set(sourceCode.getTokens(node, { includeComments: true })); + unknownNodeTokens.forEach((token) => { + if (!unknownNodeTokens.has(offsets.getFirstDependency(token))) { + const firstTokenOfLine = tokenInfo.getFirstTokenOfLine(token); + if (token === firstTokenOfLine) offsets.ignoreToken(token); + else offsets.setDesiredOffset(token, firstTokenOfLine, 0); + } + }); + } + function isOnFirstLineOfStatement(token, leafNode) { + let node = leafNode; + while (node.parent && !node.parent.type.endsWith("Statement") && !node.parent.type.endsWith("Declaration")) node = node.parent; + node = node.parent; + return !node || node.loc.start.line === token.loc.start.line; + } + function hasBlankLinesBetween(firstToken, secondToken) { + const firstTokenLine = firstToken.loc.end.line; + const secondTokenLine = secondToken.loc.start.line; + if (firstTokenLine === secondTokenLine || firstTokenLine === secondTokenLine - 1) return false; + for (let line = firstTokenLine + 1; line < secondTokenLine; ++line) if (!tokenInfo.firstTokensByLineNumber.has(line)) return true; + return false; + } + const ignoredNodeFirstTokens = /* @__PURE__ */ new Set(); + function checkAssignmentOperator(operator) { + const left = sourceCode.getTokenBefore(operator); + const right = sourceCode.getTokenAfter(operator); + if (typeof options.assignmentOperator === "number") { + offsets.setDesiredOffset(operator, left, options.assignmentOperator); + offsets.setDesiredOffset(right, operator, options.assignmentOperator); + } else { + offsets.ignoreToken(operator); + offsets.ignoreToken(right); + } + } + function checkArrayLikeNode(node) { + const elementList = node.type === AST_NODE_TYPES.TSTupleType ? node.elementTypes : node.elements; + const openingBracket = sourceCode.getFirstToken(node); + const closingBracket = sourceCode.getTokenAfter([...elementList].reverse().find((_) => _) || openingBracket, ast_exports.isClosingBracketToken); + addElementListIndent(elementList, openingBracket, closingBracket, options.ArrayExpression); + } + function checkObjectLikeNode(node, properties) { + const openingCurly = sourceCode.getFirstToken(node, ast_exports.isOpeningBraceToken); + const closingCurly = sourceCode.getTokenAfter(properties.length ? properties[properties.length - 1] : openingCurly, ast_exports.isClosingBraceToken); + addElementListIndent(properties, openingCurly, closingCurly, options.ObjectExpression); + } + function checkConditionalNode(node, test, consequent, alternate) { + const firstToken = sourceCode.getFirstToken(node); + if (!options.flatTernaryExpressions || !(0, ast_exports.isTokenOnSameLine)(test, consequent) || isOnFirstLineOfStatement(firstToken, node)) { + const questionMarkToken = sourceCode.getFirstTokenBetween(test, consequent, isQuestionToken); + const colonToken = sourceCode.getFirstTokenBetween(consequent, alternate, ast_exports.isColonToken); + const firstConsequentToken = sourceCode.getTokenAfter(questionMarkToken); + const lastConsequentToken = sourceCode.getTokenBefore(colonToken); + const firstAlternateToken = sourceCode.getTokenAfter(colonToken); + offsets.setDesiredOffset(questionMarkToken, firstToken, 1); + offsets.setDesiredOffset(colonToken, firstToken, 1); + let offset = 1; + if (options.offsetTernaryExpressions) { + if (firstConsequentToken.type === "Punctuator") offset = 2; + const consequentType = skipChainExpression(consequent).type; + if (options.offsetTernaryExpressionsOffsetCallExpressions && (consequentType === "CallExpression" || consequentType === "AwaitExpression")) offset = 2; + } + offsets.setDesiredOffset(firstConsequentToken, firstToken, offset); + if ((0, ast_exports.isTokenOnSameLine)(lastConsequentToken, firstAlternateToken)) offsets.setDesiredOffset(firstAlternateToken, firstConsequentToken, 0); + else { + let offset$1 = 1; + if (options.offsetTernaryExpressions) { + if (firstAlternateToken.type === "Punctuator") offset$1 = 2; + const alternateType = skipChainExpression(alternate).type; + if (options.offsetTernaryExpressionsOffsetCallExpressions && (alternateType === "CallExpression" || alternateType === "AwaitExpression")) offset$1 = 2; + } + offsets.setDesiredOffset(firstAlternateToken, firstToken, offset$1); + } + } + } + function checkOperatorToken(left, right, operator) { + const operatorToken = sourceCode.getFirstTokenBetween(left, right, (token) => token.value === operator); + const tokenAfterOperator = sourceCode.getTokenAfter(operatorToken); + offsets.ignoreToken(operatorToken); + offsets.ignoreToken(tokenAfterOperator); + offsets.setDesiredOffset(tokenAfterOperator, operatorToken, 0); + } + function checkMemberExpression(node, object, property, computed = false) { + const firstNonObjectToken = sourceCode.getFirstTokenBetween(object, property, ast_exports.isNotClosingParenToken); + const secondNonObjectToken = sourceCode.getTokenAfter(firstNonObjectToken); + const objectParenCount = sourceCode.getTokensBetween(object, property, { filter: ast_exports.isClosingParenToken }).length; + const firstObjectToken = objectParenCount ? sourceCode.getTokenBefore(object, { skip: objectParenCount - 1 }) : sourceCode.getFirstToken(object); + const lastObjectToken = sourceCode.getTokenBefore(firstNonObjectToken); + const firstPropertyToken = computed ? firstNonObjectToken : secondNonObjectToken; + if (computed) { + offsets.setDesiredOffset(sourceCode.getLastToken(node), firstNonObjectToken, 0); + offsets.setDesiredOffsets(property.range, firstNonObjectToken, 1); + } + const offsetBase = (0, ast_exports.isTokenOnSameLine)(lastObjectToken, firstPropertyToken) ? lastObjectToken : firstObjectToken; + if (typeof options.MemberExpression === "number") { + offsets.setDesiredOffset(firstNonObjectToken, offsetBase, options.MemberExpression); + offsets.setDesiredOffset(secondNonObjectToken, computed ? firstNonObjectToken : offsetBase, options.MemberExpression); + } else { + offsets.ignoreToken(firstNonObjectToken); + offsets.ignoreToken(secondNonObjectToken); + offsets.setDesiredOffset(firstNonObjectToken, offsetBase, 0); + offsets.setDesiredOffset(secondNonObjectToken, firstNonObjectToken, 0); + } + } + function checkBlockLikeNode(node) { + let blockIndentLevel; + if (node.parent && isOuterIIFE(node.parent)) blockIndentLevel = options.outerIIFEBody; + else if (node.parent && (node.parent.type === "FunctionExpression" || node.parent.type === "ArrowFunctionExpression")) blockIndentLevel = options.FunctionExpression.body; + else if (node.parent && node.parent.type === "FunctionDeclaration") blockIndentLevel = options.FunctionDeclaration.body; + else blockIndentLevel = 1; + if (!STATEMENT_LIST_PARENTS.has(node.parent.type)) offsets.setDesiredOffset(sourceCode.getFirstToken(node), sourceCode.getFirstToken(node.parent), 0); + addElementListIndent(node.type === AST_NODE_TYPES.TSEnumBody ? node.members : node.body, sourceCode.getFirstToken(node), sourceCode.getLastToken(node), blockIndentLevel); + } + function checkHeritages(node, heritages) { + const classToken = sourceCode.getFirstToken(node); + const extendsToken = sourceCode.getTokenBefore(heritages[0], ast_exports.isNotOpeningParenToken); + offsets.setDesiredOffsets([extendsToken.range[0], node.body.range[0]], classToken, 1); + } + function checkClassProperty(node) { + const firstToken = sourceCode.getFirstToken(node); + const lastToken = sourceCode.getLastToken(node); + let keyLastToken; + if (node.computed) { + const bracketTokenL = sourceCode.getTokenBefore(node.key, ast_exports.isOpeningBracketToken); + const bracketTokenR = keyLastToken = sourceCode.getTokenAfter(node.key, ast_exports.isClosingBracketToken); + const keyRange = [bracketTokenL.range[1], bracketTokenR.range[0]]; + if (bracketTokenL !== firstToken) offsets.setDesiredOffset(bracketTokenL, firstToken, 0); + offsets.setDesiredOffsets(keyRange, bracketTokenL, 1); + offsets.setDesiredOffset(bracketTokenR, bracketTokenL, 0); + } else { + const idToken = keyLastToken = sourceCode.getFirstToken(node.key); + if (!node.decorators?.length && idToken !== firstToken) offsets.setDesiredOffset(idToken, firstToken, 1); + } + if (node.value) { + const operator = sourceCode.getTokenBefore(node.value, isEqToken); + checkAssignmentOperator(operator); + if ((0, ast_exports.isSemicolonToken)(lastToken)) offsets.setDesiredOffset(lastToken, operator, 1); + } else if ((0, ast_exports.isSemicolonToken)(lastToken)) offsets.setDesiredOffset(lastToken, keyLastToken, 1); + } + function getNodeIndent(node, byLastLine = false, excludeCommas = false) { + let src = context.sourceCode.getText(node, node.loc.start.column); + const lines = src.split("\n"); + if (byLastLine) src = lines[lines.length - 1]; + else src = lines[0]; + const skip = excludeCommas ? "," : ""; + let regExp; + if (indentType === "space") regExp = /* @__PURE__ */ new RegExp(`^[ ${skip}]+`); + else regExp = /* @__PURE__ */ new RegExp(`^[\t${skip}]+`); + const indent = regExp.exec(src); + return indent ? indent[0].length : 0; + } + const baseOffsetListeners = { + "ArrayExpression": checkArrayLikeNode, + "ArrayPattern": checkArrayLikeNode, + ObjectExpression(node) { + checkObjectLikeNode(node, node.properties); + }, + ObjectPattern(node) { + checkObjectLikeNode(node, node.properties); + }, + ArrowFunctionExpression(node) { + const maybeOpeningParen = sourceCode.getFirstToken(node, { skip: node.async ? 1 : 0 }); + if ((0, ast_exports.isOpeningParenToken)(maybeOpeningParen)) { + const openingParen = maybeOpeningParen; + const closingParen = sourceCode.getTokenBefore(node.returnType ?? node.body, { filter: ast_exports.isClosingParenToken }); + parameterParens.add(openingParen); + parameterParens.add(closingParen); + addElementListIndent(node.params, openingParen, closingParen, options.FunctionExpression.parameters); + } + addBlocklessNodeIndent(node.body); + }, + AssignmentExpression(node) { + const operator = sourceCode.getFirstTokenBetween(node.left, node.right, (token) => token.value === node.operator); + checkAssignmentOperator(operator); + }, + AssignmentPattern(node) { + const operator = sourceCode.getFirstTokenBetween(node.left, node.right, isEqToken); + checkAssignmentOperator(operator); + }, + BinaryExpression(node) { + checkOperatorToken(node.left, node.right, node.operator); + }, + LogicalExpression(node) { + checkOperatorToken(node.left, node.right, node.operator); + }, + "BlockStatement": checkBlockLikeNode, + "ClassBody": checkBlockLikeNode, + "CallExpression": addFunctionCallIndent, + ClassDeclaration(node) { + if (!node.superClass) return; + checkHeritages(node, [node.superClass]); + }, + ClassExpression(node) { + if (!node.superClass) return; + checkHeritages(node, [node.superClass]); + }, + ConditionalExpression(node) { + checkConditionalNode(node, node.test, node.consequent, node.alternate); + }, + "DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement": function(node) { + addBlocklessNodeIndent(node.body); + }, + ExportNamedDeclaration(node) { + if (node.declaration === null) { + const closingCurly = node.source ? sourceCode.getTokenBefore(node.source, ast_exports.isClosingBraceToken) : sourceCode.getLastToken(node, ast_exports.isClosingBraceToken); + addElementListIndent(node.specifiers, sourceCode.getFirstToken(node, { skip: 1 }), closingCurly, 1); + if (node.source) { + const fromToken = sourceCode.getTokenAfter(closingCurly, (token) => token.type === "Identifier" && token.value === "from"); + const lastToken = sourceCode.getLastToken(node, ast_exports.isNotSemicolonToken); + offsets.setDesiredOffsets([fromToken.range[0], lastToken.range[1]], sourceCode.getFirstToken(node), 1); + const lastClosingCurly = sourceCode.getLastToken(node, ast_exports.isClosingBraceToken); + if (lastClosingCurly && node.source.range[1] < lastClosingCurly.range[0]) { + const openingCurly = sourceCode.getTokenAfter(node.source, ast_exports.isOpeningBraceToken); + const closingCurly$1 = lastClosingCurly; + addElementListIndent(node.attributes, openingCurly, closingCurly$1, 1); + } + } + } + }, + ExportAllDeclaration(node) { + const fromToken = sourceCode.getTokenAfter(node.exported || sourceCode.getFirstToken(node), (token) => token.type === "Identifier" && token.value === "from"); + const lastToken = sourceCode.getLastToken(node, ast_exports.isNotSemicolonToken); + offsets.setDesiredOffsets([fromToken.range[0], lastToken.range[1]], sourceCode.getFirstToken(node), 1); + const lastClosingCurly = sourceCode.getLastToken(node, ast_exports.isClosingBraceToken); + if (lastClosingCurly && node.source.range[1] < lastClosingCurly.range[0]) { + const openingCurly = sourceCode.getTokenAfter(node.source, ast_exports.isOpeningBraceToken); + const closingCurly = lastClosingCurly; + addElementListIndent(node.attributes, openingCurly, closingCurly, 1); + } + }, + ForStatement(node) { + const forOpeningParen = sourceCode.getFirstToken(node, 1); + if (node.init) offsets.setDesiredOffsets(node.init.range, forOpeningParen, 1); + if (node.test) offsets.setDesiredOffsets(node.test.range, forOpeningParen, 1); + if (node.update) offsets.setDesiredOffsets(node.update.range, forOpeningParen, 1); + addBlocklessNodeIndent(node.body); + }, + "FunctionDeclaration, FunctionExpression": function(node) { + const paramsClosingParen = sourceCode.getTokenBefore(node.returnType ?? node.body, { filter: ast_exports.isClosingParenToken }); + const paramsOpeningParen = sourceCode.getTokenBefore(node.params.length ? node.params[0].decorators?.[0] ?? node.params[0] : paramsClosingParen, { filter: ast_exports.isOpeningParenToken }); + parameterParens.add(paramsOpeningParen); + parameterParens.add(paramsClosingParen); + addElementListIndent(node.params, paramsOpeningParen, paramsClosingParen, options[node.type].parameters); + if (node.returnType) offsets.setDesiredOffsets(node.returnType.range, paramsClosingParen, options[node.type].returnType); + }, + IfStatement(node) { + addBlocklessNodeIndent(node.consequent); + if (node.alternate) addBlocklessNodeIndent(node.alternate); + }, + ":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit": function(node) { + let nodesToCheck; + if (node.type === "IfStatement") { + nodesToCheck = [node.consequent]; + if (node.alternate) nodesToCheck.push(node.alternate); + } else nodesToCheck = [node.body]; + for (const nodeToCheck of nodesToCheck) { + const lastToken = sourceCode.getLastToken(nodeToCheck); + if ((0, ast_exports.isSemicolonToken)(lastToken)) { + const tokenBeforeLast = sourceCode.getTokenBefore(lastToken); + const tokenAfterLast = sourceCode.getTokenAfter(lastToken); + if (!(0, ast_exports.isTokenOnSameLine)(tokenBeforeLast, lastToken) && tokenAfterLast && (0, ast_exports.isTokenOnSameLine)(lastToken, tokenAfterLast)) offsets.setDesiredOffset(lastToken, sourceCode.getFirstToken(node), 0); + } + } + }, + ImportDeclaration(node) { + if (node.specifiers.some((specifier) => specifier.type === "ImportSpecifier")) { + const openingCurly = sourceCode.getFirstToken(node, ast_exports.isOpeningBraceToken); + const closingCurly = sourceCode.getTokenBefore(node.source, ast_exports.isClosingBraceToken); + addElementListIndent(node.specifiers.filter((specifier) => specifier.type === "ImportSpecifier"), openingCurly, closingCurly, options.ImportDeclaration); + } + const fromToken = node.specifiers.length ? sourceCode.getTokenAfter(node.specifiers[node.specifiers.length - 1], (token) => token.type === "Identifier" && token.value === "from") : sourceCode.getFirstToken(node, (token) => token.type === "Identifier" && token.value === "from"); + const lastToken = sourceCode.getLastToken(node, ast_exports.isNotSemicolonToken); + if (fromToken) offsets.setDesiredOffsets([fromToken.range[0], lastToken.range[1]], sourceCode.getFirstToken(node), 1); + const lastClosingCurly = sourceCode.getLastToken(node, ast_exports.isClosingBraceToken); + if (lastClosingCurly && node.source.range[1] < lastClosingCurly.range[0]) { + const openingCurly = sourceCode.getTokenAfter(node.source, ast_exports.isOpeningBraceToken); + const closingCurly = lastClosingCurly; + if (!fromToken) { + const withToken = sourceCode.getTokenBefore(openingCurly, (token) => token.value === "with"); + offsets.setDesiredOffsets([withToken.range[0], lastToken.range[1]], sourceCode.getFirstToken(node), 1); + } + addElementListIndent(node.attributes, openingCurly, closingCurly, 1); + } + }, + ImportExpression(node) { + const openingParen = sourceCode.getFirstToken(node, 1); + const closingParen = sourceCode.getLastToken(node); + parameterParens.add(openingParen); + parameterParens.add(closingParen); + offsets.setDesiredOffset(openingParen, sourceCode.getTokenBefore(openingParen), 0); + addElementListIndent([node.source], openingParen, closingParen, options.CallExpression.arguments); + }, + MemberExpression(node) { + checkMemberExpression(node, node.object, node.property, node.computed); + }, + MetaProperty(node) { + checkMemberExpression(node, node.meta, node.property); + }, + NewExpression(node) { + if (node.arguments.length > 0 || (0, ast_exports.isClosingParenToken)(sourceCode.getLastToken(node)) && (0, ast_exports.isOpeningParenToken)(sourceCode.getLastToken(node, 1))) addFunctionCallIndent(node); + }, + Property(node) { + if (!node.shorthand && !node.method && node.kind === "init") { + const colon = sourceCode.getFirstTokenBetween(node.key, node.value, ast_exports.isColonToken); + offsets.ignoreToken(sourceCode.getTokenAfter(colon)); + } + }, + "PropertyDefinition": checkClassProperty, + "AccessorProperty": checkClassProperty, + "TSAbstractPropertyDefinition": checkClassProperty, + "TSAbstractAccessorProperty": checkClassProperty, + StaticBlock(node) { + const openingCurly = sourceCode.getFirstToken(node, { skip: 1 }); + const closingCurly = sourceCode.getLastToken(node); + addElementListIndent(node.body, openingCurly, closingCurly, options.StaticBlock.body); + }, + SwitchStatement(node) { + const openingCurly = sourceCode.getTokenAfter(node.discriminant, ast_exports.isOpeningBraceToken); + const closingCurly = sourceCode.getLastToken(node); + offsets.setDesiredOffsets([openingCurly.range[1], closingCurly.range[0]], openingCurly, options.SwitchCase); + if (node.cases.length) getCommentsBetween(sourceCode, node.cases[node.cases.length - 1], closingCurly).forEach((token) => offsets.ignoreToken(token)); + }, + SwitchCase(node) { + if (!(node.consequent.length === 1 && node.consequent[0].type === "BlockStatement")) { + const caseKeyword = sourceCode.getFirstToken(node); + const tokenAfterCurrentCase = sourceCode.getTokenAfter(node); + offsets.setDesiredOffsets([caseKeyword.range[1], tokenAfterCurrentCase.range[0]], caseKeyword, 1); + } + }, + TemplateLiteral(node) { + node.expressions.forEach((expression, index) => { + const previousQuasi = node.quasis[index]; + const nextQuasi = node.quasis[index + 1]; + const tokenToAlignFrom = isSingleLine(previousQuasi) ? sourceCode.getFirstToken(previousQuasi) : null; + const startsOnSameLine = (0, ast_exports.isTokenOnSameLine)(previousQuasi, expression); + const endsOnSameLine = (0, ast_exports.isTokenOnSameLine)(expression, nextQuasi); + if (tokenToAlignFrom || endsOnSameLine && !startsOnSameLine) { + offsets.setDesiredOffsets([previousQuasi.range[1], nextQuasi.range[0]], tokenToAlignFrom, 1); + offsets.setDesiredOffset(sourceCode.getFirstToken(nextQuasi), tokenToAlignFrom, 0); + return; + } + const tokenBeforeText = sourceCode.text.slice(previousQuasi.range[1] - previousQuasi.loc.end.column, previousQuasi.range[1] - 2).split(""); + let numIndentation = tokenBeforeText.findIndex((char) => char !== " " && char !== " "); + if (numIndentation === -1) numIndentation = tokenBeforeText.length; + const numSpaces = tokenBeforeText.slice(0, numIndentation).filter((char) => char === " ").length; + const numTabs = numIndentation - numSpaces; + const indentOffset = numTabs + Math.ceil(numSpaces / (indentType === "tab" ? options.tabLength : indentSize)); + const innerIndentation = endsOnSameLine ? indentOffset : indentOffset + 1; + offsets.setDesiredOffsets([previousQuasi.range[1], nextQuasi.range[0]], tokenToAlignFrom, innerIndentation); + offsets.setDesiredOffset(sourceCode.getFirstToken(nextQuasi), tokenToAlignFrom, indentOffset); + }); + }, + VariableDeclaration(node) { + if (node.declarations.length === 0) return; + const kind = node.kind === "await using" ? "using" : node.kind; + let variableIndent = Object.prototype.hasOwnProperty.call(options.VariableDeclarator, kind) ? options.VariableDeclarator[kind] : DEFAULT_VARIABLE_INDENT; + const alignFirstVariable = variableIndent === "first"; + const firstToken = sourceCode.getFirstToken(node); + const lastToken = sourceCode.getLastToken(node); + const hasDeclaratorOnNewLine = node.declarations.at(-1).loc.start.line > node.loc.start.line; + if (hasDeclaratorOnNewLine) { + if (alignFirstVariable) { + addElementListIndent(node.declarations, firstToken, lastToken, variableIndent); + const firstTokenOfFirstElement = sourceCode.getFirstToken(node.declarations[0]); + variableIndent = (tokenInfo.getTokenIndent(firstTokenOfFirstElement).length - tokenInfo.getTokenIndent(firstToken).length) / indentSize; + } + offsets.setDesiredOffsets(node.range, firstToken, variableIndent, true); + } else { + if (alignFirstVariable) variableIndent = DEFAULT_VARIABLE_INDENT; + offsets.setDesiredOffsets(node.range, firstToken, variableIndent); + } + if ((0, ast_exports.isSemicolonToken)(lastToken)) offsets.ignoreToken(lastToken); + }, + VariableDeclarator(node) { + if (node.init) { + const operator = sourceCode.getTokenBefore(node.init, ast_exports.isNotOpeningParenToken); + checkAssignmentOperator(operator); + } + const lastToken = sourceCode.getLastToken(node); + if ((0, ast_exports.isSemicolonToken)(lastToken)) offsets.ignoreToken(lastToken); + }, + JSXText(node) { + if (!node.parent) return; + if (node.parent.type !== "JSXElement" && node.parent.type !== "JSXFragment") return; + const value = node.value; + const regExp = indentType === "space" ? /\n( *)[\t ]*\S/g : /\n(\t*)[\t ]*\S/g; + const nodeIndentsPerLine = Array.from(String(value).matchAll(regExp), (match) => match[1] ? match[1].length : 0); + const hasFirstInLineNode = nodeIndentsPerLine.length > 0; + const parentNodeIndent = getNodeIndent(node.parent); + const indent = parentNodeIndent + indentSize; + if (hasFirstInLineNode && !nodeIndentsPerLine.every((actualIndent) => actualIndent === indent)) nodeIndentsPerLine.forEach((nodeIndent) => { + context.report({ + node, + messageId: "wrongIndentation", + data: createErrorMessageData(indent, nodeIndent, nodeIndent), + fix(fixer) { + const indentChar = indentType === "space" ? " " : " "; + const indentStr = new Array(indent + 1).join(indentChar); + const regExp$1 = /\n[\t ]*(\S)/g; + const fixedText = node.raw.replace(regExp$1, (match, p1) => `\n${indentStr}${p1}`); + return fixer.replaceText(node, fixedText); + } + }); + }); + }, + JSXAttribute(node) { + if (!node.value) return; + const operator = sourceCode.getFirstTokenBetween(node.name, node.value, isEqToken); + checkAssignmentOperator(operator); + }, + JSXElement(node) { + if (node.closingElement) addElementListIndent(node.children, sourceCode.getFirstToken(node.openingElement), sourceCode.getFirstToken(node.closingElement), 1); + }, + JSXOpeningElement(node) { + const firstToken = sourceCode.getFirstToken(node); + let closingToken; + if (node.selfClosing) { + closingToken = sourceCode.getLastToken(node, { skip: 1 }); + offsets.setDesiredOffset(sourceCode.getLastToken(node), closingToken, 0); + } else closingToken = sourceCode.getLastToken(node); + offsets.setDesiredOffsets(node.name.range, firstToken, 0); + addElementListIndent(node.attributes, firstToken, closingToken, 1); + }, + JSXClosingElement(node) { + const firstToken = sourceCode.getFirstToken(node); + offsets.setDesiredOffsets(node.name.range, firstToken, 1); + }, + JSXFragment(node) { + const firstOpeningToken = sourceCode.getFirstToken(node.openingFragment); + const firstClosingToken = sourceCode.getFirstToken(node.closingFragment); + addElementListIndent(node.children, firstOpeningToken, firstClosingToken, 1); + }, + JSXOpeningFragment(node) { + const firstToken = sourceCode.getFirstToken(node); + const closingToken = sourceCode.getLastToken(node); + offsets.setDesiredOffsets(node.range, firstToken, 1); + offsets.matchOffsetOf(firstToken, closingToken); + }, + JSXClosingFragment(node) { + const firstToken = sourceCode.getFirstToken(node); + const closingToken = sourceCode.getLastToken(node); + offsets.setDesiredOffsets(node.range, firstToken, 1); + const slashToken = sourceCode.getLastToken(node, (token) => token.value === "/"); + if (slashToken) { + const tokenToMatch = (0, ast_exports.isTokenOnSameLine)(slashToken, closingToken) ? slashToken : closingToken; + offsets.matchOffsetOf(firstToken, tokenToMatch); + } + }, + JSXExpressionContainer(node) { + const openingCurly = sourceCode.getFirstToken(node); + const closingCurly = sourceCode.getLastToken(node); + offsets.setDesiredOffsets([openingCurly.range[1], closingCurly.range[0]], openingCurly, 1); + }, + JSXSpreadAttribute(node) { + const openingCurly = sourceCode.getFirstToken(node); + const closingCurly = sourceCode.getLastToken(node); + offsets.setDesiredOffsets([openingCurly.range[1], closingCurly.range[0]], openingCurly, 1); + }, + JSXMemberExpression(node) { + checkMemberExpression(node, node.object, node.property); + }, + TSTypeAliasDeclaration(node) { + const operator = sourceCode.getTokenBefore(node.typeAnnotation, ast_exports.isNotOpeningParenToken); + checkAssignmentOperator(operator); + const lastToken = sourceCode.getLastToken(node); + if ((0, ast_exports.isSemicolonToken)(lastToken)) offsets.ignoreToken(lastToken); + }, + "TSTupleType": checkArrayLikeNode, + "TSEnumBody": checkBlockLikeNode, + TSEnumMember(node) { + if (!node.initializer) return; + const operator = sourceCode.getTokenBefore(node.initializer, isEqToken); + checkAssignmentOperator(operator); + }, + TSTypeLiteral(node) { + checkObjectLikeNode(node, node.members); + }, + TSMappedType(node) { + const squareBracketStart = sourceCode.getTokenBefore(node.constraint || node.typeParameter); + const properties = [{ + parent: node, + type: AST_NODE_TYPES.Property, + key: node.key || node.typeParameter, + value: node.typeAnnotation, + range: [squareBracketStart.range[0], node.typeAnnotation ? node.typeAnnotation.range[1] : squareBracketStart.range[0]], + loc: { + start: squareBracketStart.loc.start, + end: node.typeAnnotation ? node.typeAnnotation.loc.end : squareBracketStart.loc.end + }, + kind: "init", + computed: false, + method: false, + optional: false, + shorthand: false + }]; + checkObjectLikeNode(node, properties); + }, + TSAsExpression(node) { + checkOperatorToken(node.expression, node.typeAnnotation, "as"); + }, + TSConditionalType(node) { + checkConditionalNode(node, { + parent: node, + type: AST_NODE_TYPES.BinaryExpression, + operator: "extends", + left: node.checkType, + right: node.extendsType, + range: [node.checkType.range[0], node.extendsType.range[1]], + loc: { + start: node.checkType.loc.start, + end: node.extendsType.loc.end + } + }, node.trueType, node.falseType); + }, + TSImportEqualsDeclaration(node) { + if (node.moduleReference) { + const operator = sourceCode.getTokenBefore(node.moduleReference, isEqToken); + checkAssignmentOperator(operator); + } + const lastToken = sourceCode.getLastToken(node); + if ((0, ast_exports.isSemicolonToken)(lastToken)) offsets.ignoreToken(lastToken); + }, + TSIndexedAccessType(node) { + checkMemberExpression(node, node.objectType, node.indexType, true); + }, + "TSInterfaceBody": checkBlockLikeNode, + TSInterfaceDeclaration(node) { + if (node.extends.length === 0) return; + checkHeritages(node, node.extends); + }, + TSQualifiedName(node) { + checkMemberExpression(node, node.left, node.right); + }, + TSTypeParameter(node) { + if (!node.default) return; + const operator = sourceCode.getTokenBefore(node.default, isEqToken); + checkAssignmentOperator(operator); + }, + TSTypeParameterDeclaration(node) { + if (!node.params.length) return; + const firstToken = sourceCode.getFirstToken(node); + const closingToken = sourceCode.getLastToken(node); + addElementListIndent(node.params, firstToken, closingToken, 1); + }, + TSTypeParameterInstantiation(node) { + if (!node.params.length) return; + const firstToken = sourceCode.getFirstToken(node); + const closingToken = sourceCode.getLastToken(node); + addElementListIndent(node.params, firstToken, closingToken, 1); + }, + "TSModuleBlock": checkBlockLikeNode, + "*": function(node) { + const firstToken = sourceCode.getFirstToken(node); + if (firstToken && !ignoredNodeFirstTokens.has(firstToken)) offsets.setDesiredOffsets(node.range, firstToken, 0); + } + }; + const listenerCallQueue = []; + const offsetListeners = {}; + for (const [selector, listener] of Object.entries(baseOffsetListeners)) offsetListeners[selector] = (node) => listenerCallQueue.push({ + listener, + node + }); + const ignoredNodes = /* @__PURE__ */ new Set(); + function addToIgnoredNodes(node) { + ignoredNodes.add(node); + ignoredNodeFirstTokens.add(sourceCode.getFirstToken(node)); + } + const ignoredNodeListeners = options.ignoredNodes.reduce((listeners, ignoredSelector) => Object.assign(listeners, { [ignoredSelector]: addToIgnoredNodes }), {}); + return { + ...offsetListeners, + ...ignoredNodeListeners, + "*:exit": function(node) { + if (!KNOWN_NODES.has(node.type)) addToIgnoredNodes(node); + }, + "Program:exit": function() { + if (options.ignoreComments) sourceCode.getAllComments().forEach((comment) => offsets.ignoreToken(comment)); + for (let i = 0; i < listenerCallQueue.length; i++) { + const nodeInfo = listenerCallQueue[i]; + if (!ignoredNodes.has(nodeInfo.node)) nodeInfo.listener?.(nodeInfo.node); + } + ignoredNodes.forEach(ignoreNode); + addParensIndent(sourceCode.ast.tokens); + const precedingTokens = /* @__PURE__ */ new WeakMap(); + for (let i = 0; i < sourceCode.ast.comments.length; i++) { + const comment = sourceCode.ast.comments[i]; + const tokenOrCommentBefore = sourceCode.getTokenBefore(comment, { includeComments: true }); + const hasToken = precedingTokens.has(tokenOrCommentBefore) ? precedingTokens.get(tokenOrCommentBefore) : tokenOrCommentBefore; + precedingTokens.set(comment, hasToken); + } + for (let i = 1; i < sourceCode.lines.length + 1; i++) { + if (!tokenInfo.firstTokensByLineNumber.has(i)) continue; + const firstTokenOfLine = tokenInfo.firstTokensByLineNumber.get(i); + if (firstTokenOfLine.loc.start.line !== i) continue; + if ((0, ast_exports.isCommentToken)(firstTokenOfLine)) { + const tokenBefore = precedingTokens.get(firstTokenOfLine); + const tokenAfter = tokenBefore ? sourceCode.getTokenAfter(tokenBefore) : sourceCode.ast.tokens[0]; + const mayAlignWithBefore = tokenBefore && !hasBlankLinesBetween(tokenBefore, firstTokenOfLine); + const mayAlignWithAfter = tokenAfter && !hasBlankLinesBetween(firstTokenOfLine, tokenAfter); + if (tokenAfter && (0, ast_exports.isSemicolonToken)(tokenAfter) && !(0, ast_exports.isTokenOnSameLine)(firstTokenOfLine, tokenAfter)) offsets.setDesiredOffset(firstTokenOfLine, tokenAfter, 0); + if (mayAlignWithBefore && validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(tokenBefore)) || mayAlignWithAfter && validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(tokenAfter))) continue; + } + if (validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(firstTokenOfLine))) continue; + report(firstTokenOfLine, offsets.getDesiredIndent(firstTokenOfLine)); + } + } + }; + } +}); +export { indent_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-child-element-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-child-element-spacing.js new file mode 100644 index 0000000..6a8b766 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-child-element-spacing.js @@ -0,0 +1,79 @@ +import { createRule } from "../utils.js"; +const INLINE_ELEMENTS = new Set([ + "a", + "abbr", + "acronym", + "b", + "bdo", + "big", + "button", + "cite", + "code", + "dfn", + "em", + "i", + "img", + "input", + "kbd", + "label", + "map", + "object", + "q", + "samp", + "script", + "select", + "small", + "span", + "strong", + "sub", + "sup", + "textarea", + "tt", + "var" +]); +const messages = { + spacingAfterPrev: "Ambiguous spacing after previous element {{element}}", + spacingBeforeNext: "Ambiguous spacing before next element {{element}}" +}; +var jsx_child_element_spacing_default = createRule({ + name: "jsx-child-element-spacing", + meta: { + type: "layout", + docs: { description: "Enforce or disallow spaces inside of curly braces in JSX attributes and expressions" }, + messages, + schema: [] + }, + create(context) { + const TEXT_FOLLOWING_ELEMENT_PATTERN = /^[\t\v\f\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\n\s*\S/; + const TEXT_PRECEDING_ELEMENT_PATTERN = /\S[\t\v\f\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\n\s*$/; + const elementName = (node) => node.openingElement && node.openingElement.name && node.openingElement.name.type === "JSXIdentifier" && node.openingElement.name.name || ""; + const isInlineElement = (node) => node.type === "JSXElement" && INLINE_ELEMENTS.has(elementName(node)); + const handleJSX = (node) => { + let lastChild = null; + let child = null; + [...node.children, null].forEach((nextChild) => { + if ((lastChild || nextChild) && (!lastChild || isInlineElement(lastChild)) && child && (child.type === "Literal" || child.type === "JSXText") && (!nextChild || isInlineElement(nextChild)) && true) { + if (lastChild && String(child.value).match(TEXT_FOLLOWING_ELEMENT_PATTERN)) context.report({ + messageId: "spacingAfterPrev", + node: lastChild, + loc: lastChild.loc.end, + data: { element: elementName(lastChild) } + }); + else if (nextChild && String(child.value).match(TEXT_PRECEDING_ELEMENT_PATTERN)) context.report({ + messageId: "spacingBeforeNext", + node: nextChild, + loc: nextChild.loc.start, + data: { element: elementName(nextChild) } + }); + } + lastChild = child; + child = nextChild; + }); + }; + return { + JSXElement: handleJSX, + JSXFragment: handleJSX + }; + } +}); +export { jsx_child_element_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-closing-bracket-location.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-closing-bracket-location.js new file mode 100644 index 0000000..7507c04 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-closing-bracket-location.js @@ -0,0 +1,215 @@ +import { createRule } from "../utils.js"; +const messages = { bracketLocation: "The closing bracket must be {{location}}{{details}}" }; +var jsx_closing_bracket_location_default = createRule({ + name: "jsx-closing-bracket-location", + meta: { + type: "layout", + docs: { description: "Enforce closing bracket location in JSX" }, + fixable: "code", + messages, + schema: [{ anyOf: [ + { + type: "string", + enum: [ + "after-props", + "props-aligned", + "tag-aligned", + "line-aligned" + ] + }, + { + type: "object", + properties: { location: { + type: "string", + enum: [ + "after-props", + "props-aligned", + "tag-aligned", + "line-aligned" + ] + } }, + additionalProperties: false + }, + { + type: "object", + properties: { + nonEmpty: { oneOf: [{ + type: "string", + enum: [ + "after-props", + "props-aligned", + "tag-aligned", + "line-aligned" + ] + }, { + type: "boolean", + enum: [false] + }] }, + selfClosing: { oneOf: [{ + type: "string", + enum: [ + "after-props", + "props-aligned", + "tag-aligned", + "line-aligned" + ] + }, { + type: "boolean", + enum: [false] + }] } + }, + additionalProperties: false + } + ] }] + }, + create(context) { + const MESSAGE_LOCATION = { + "after-props": "placed after the last prop", + "after-tag": "placed after the opening tag", + "props-aligned": "aligned with the last prop", + "tag-aligned": "aligned with the opening tag", + "line-aligned": "aligned with the line containing the opening tag" + }; + const DEFAULT_LOCATION = "tag-aligned"; + const config = context.options[0]; + const options = { + nonEmpty: DEFAULT_LOCATION, + selfClosing: DEFAULT_LOCATION + }; + if (typeof config === "string") { + options.nonEmpty = config; + options.selfClosing = config; + } else if (typeof config === "object") { + if ("location" in config) { + options.nonEmpty = config.location; + options.selfClosing = config.location; + } + if ("nonEmpty" in config) options.nonEmpty = config.nonEmpty; + if ("selfClosing" in config) options.selfClosing = config.selfClosing; + } + function getExpectedLocation(tokens) { + let location; + if (typeof tokens.lastProp === "undefined") location = "after-tag"; + else if (tokens.opening.line === tokens.lastProp.lastLine) location = "after-props"; + else location = tokens.selfClosing ? options.selfClosing : options.nonEmpty; + return location; + } + function getCorrectColumn(tokens, expectedLocation) { + switch (expectedLocation) { + case "props-aligned": return tokens.lastProp.column; + case "tag-aligned": return tokens.opening.column; + case "line-aligned": return tokens.openingStartOfLine.column; + default: return null; + } + } + function hasCorrectLocation(tokens, expectedLocation) { + switch (expectedLocation) { + case "after-tag": return tokens.tag.line === tokens.closing.line; + case "after-props": return tokens.lastProp.lastLine === tokens.closing.line; + case "props-aligned": + case "tag-aligned": + case "line-aligned": { + const correctColumn = getCorrectColumn(tokens, expectedLocation); + return correctColumn === tokens.closing.column; + } + default: return true; + } + } + function getIndentation(tokens, expectedLocation, correctColumn) { + const newColumn = correctColumn || 0; + let indentation; + let spaces = []; + switch (expectedLocation) { + case "props-aligned": + indentation = /^\s*/.exec(context.sourceCode.lines[tokens.lastProp.firstLine - 1])[0]; + break; + case "tag-aligned": + case "line-aligned": + indentation = /^\s*/.exec(context.sourceCode.lines[tokens.opening.line - 1])[0]; + break; + default: indentation = ""; + } + if (indentation.length + 1 < newColumn) spaces = Array.from({ length: +correctColumn + 1 - indentation.length }); + return indentation + spaces.join(" "); + } + function getTokensLocations(node) { + const sourceCode = context.sourceCode; + const opening = sourceCode.getFirstToken(node).loc.start; + const closing = sourceCode.getLastTokens(node, node.selfClosing ? 2 : 1)[0].loc.start; + const tag = sourceCode.getFirstToken(node.name).loc.start; + let lastProp; + if (node.attributes.length) { + lastProp = node.attributes[node.attributes.length - 1]; + lastProp = { + column: sourceCode.getFirstToken(lastProp).loc.start.column, + firstLine: sourceCode.getFirstToken(lastProp).loc.start.line, + lastLine: sourceCode.getLastToken(lastProp).loc.end.line + }; + } + const openingLine = sourceCode.lines[opening.line - 1]; + const closingLine = sourceCode.lines[closing.line - 1]; + const isTab = { + openTab: /^\t/.test(openingLine), + closeTab: /^\t/.test(closingLine) + }; + const openingStartOfLine = { + column: /^\s*/.exec(openingLine)?.[0].length, + line: opening.line + }; + return { + isTab, + tag, + opening, + closing, + lastProp, + selfClosing: node.selfClosing, + openingStartOfLine + }; + } + return { "JSXOpeningElement:exit": function(node) { + const lastAttributeNode = node.attributes.at(-1); + const cachedLastAttributeEndPos = lastAttributeNode ? lastAttributeNode.range[1] : null; + let expectedNextLine; + const tokens = getTokensLocations(node); + let expectedLocation = getExpectedLocation(tokens); + let usingSameIndentation = true; + if (expectedLocation === "tag-aligned") usingSameIndentation = tokens.isTab.openTab === tokens.isTab.closeTab; + const lastComment = context.sourceCode.getCommentsInside(node).at(-1); + const hasTrailingComment = lastComment && lastComment.range[0] > (lastAttributeNode ?? node.name).range[1]; + if ((expectedLocation === "after-props" || expectedLocation === "after-tag") && !(hasCorrectLocation(tokens, expectedLocation) && usingSameIndentation) && hasTrailingComment) expectedLocation = "line-aligned"; + if (hasCorrectLocation(tokens, expectedLocation) && usingSameIndentation) return; + const data = { + location: MESSAGE_LOCATION[expectedLocation], + details: "" + }; + const correctColumn = getCorrectColumn(tokens, expectedLocation); + if (correctColumn !== null) { + expectedNextLine = tokens.lastProp && tokens.lastProp.lastLine === tokens.closing.line; + data.details = ` (expected column ${correctColumn + 1}${expectedNextLine ? " on the next line)" : ")"}`; + } + context.report({ + node, + messageId: "bracketLocation", + loc: tokens.closing, + data, + fix(fixer) { + const closingTag = tokens.selfClosing ? "/>" : ">"; + switch (expectedLocation) { + case "after-tag": + if (cachedLastAttributeEndPos) return fixer.replaceTextRange([cachedLastAttributeEndPos, node.range[1]], (expectedNextLine ? "\n" : "") + closingTag); + return fixer.replaceTextRange([node.name.range[1], node.range[1]], (expectedNextLine ? "\n" : " ") + closingTag); + case "after-props": return fixer.replaceTextRange([cachedLastAttributeEndPos, node.range[1]], (expectedNextLine ? "\n" : "") + closingTag); + case "props-aligned": + case "tag-aligned": + case "line-aligned": { + const rangeStart = hasTrailingComment ? lastComment.range[1] : cachedLastAttributeEndPos; + return fixer.replaceTextRange([rangeStart, node.range[1]], `\n${getIndentation(tokens, expectedLocation, correctColumn)}${closingTag}`); + } + } + return null; + } + }); + } }; + } +}); +export { jsx_closing_bracket_location_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-closing-tag-location.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-closing-tag-location.js new file mode 100644 index 0000000..c1e0f60 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-closing-tag-location.js @@ -0,0 +1,63 @@ +import { createRule, isNodeFirstInLine } from "../utils.js"; +const messages = { + onOwnLine: "Closing tag of a multiline JSX expression must be on its own line.", + matchIndent: "Expected closing tag to match indentation of opening.", + alignWithOpening: "Expected closing tag to be aligned with the line containing the opening tag" +}; +const DEFAULT_LOCATION = "tag-aligned"; +const MESSAGE_LOCATION = { + "tag-aligned": "matchIndent", + "line-aligned": "alignWithOpening" +}; +var jsx_closing_tag_location_default = createRule({ + name: "jsx-closing-tag-location", + meta: { + type: "layout", + docs: { description: "Enforce closing tag location for multiline JSX" }, + fixable: "whitespace", + messages, + schema: [{ anyOf: [{ + type: "string", + enum: ["tag-aligned", "line-aligned"], + default: DEFAULT_LOCATION + }] }] + }, + defaultOptions: [DEFAULT_LOCATION], + create(context) { + const option = context.options[0] || DEFAULT_LOCATION; + function getIndentation(openingStartOfLine, opening) { + if (option === "line-aligned") return openingStartOfLine.column; + else return opening.loc.start.column; + } + function handleClosingElement(node) { + if (!node.parent) return; + const sourceCode = context.sourceCode; + const opening = "openingFragment" in node.parent ? node.parent.openingFragment : node.parent.openingElement; + const openingLoc = sourceCode.getFirstToken(opening).loc.start; + const openingLine = sourceCode.lines[openingLoc.line - 1]; + const openingStartOfLine = { + column: /^\s*/.exec(openingLine)?.[0].length, + line: openingLoc.line + }; + if (opening.loc.start.line === node.loc.start.line) return; + if (opening.loc.start.column === node.loc.start.column && option === "tag-aligned") return; + if (openingStartOfLine.column === node.loc.start.column && option === "line-aligned") return; + const messageId = isNodeFirstInLine(context, node) ? MESSAGE_LOCATION[option] : "onOwnLine"; + context.report({ + node, + messageId, + loc: node.loc, + fix(fixer) { + const indent = new Array((getIndentation(openingStartOfLine, opening) || 0) + 1).join(" "); + if (isNodeFirstInLine(context, node)) return fixer.replaceTextRange([node.range[0] - node.loc.start.column, node.range[0]], indent); + return fixer.insertTextBefore(node, `\n${indent}`); + } + }); + } + return { + JSXClosingElement: handleClosingElement, + JSXClosingFragment: handleClosingElement + }; + } +}); +export { jsx_closing_tag_location_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-curly-brace-presence.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-curly-brace-presence.js new file mode 100644 index 0000000..05fab39 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-curly-brace-presence.js @@ -0,0 +1,217 @@ +import { ast_exports, createRule, isJSX, isWhiteSpaces } from "../utils.js"; +const OPTION_ALWAYS = "always"; +const OPTION_NEVER = "never"; +const OPTION_IGNORE = "ignore"; +const OPTION_VALUES = [ + OPTION_ALWAYS, + OPTION_NEVER, + OPTION_IGNORE +]; +const DEFAULT_CONFIG = { + props: OPTION_NEVER, + children: OPTION_NEVER, + propElementValues: OPTION_IGNORE +}; +const messages = { + unnecessaryCurly: "Curly braces are unnecessary here.", + missingCurly: "Need to wrap this literal in a JSX expression." +}; +var jsx_curly_brace_presence_default = createRule({ + name: "jsx-curly-brace-presence", + meta: { + type: "layout", + docs: { description: "Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes" }, + fixable: "code", + messages, + schema: [{ anyOf: [{ + type: "object", + properties: { + props: { + type: "string", + enum: OPTION_VALUES + }, + children: { + type: "string", + enum: OPTION_VALUES + }, + propElementValues: { + type: "string", + enum: OPTION_VALUES + } + }, + additionalProperties: false + }, { + type: "string", + enum: OPTION_VALUES + }] }] + }, + create(context) { + const HTML_ENTITY_REGEX = () => /&[A-Z\d#]+;/gi; + const ruleOptions = context.options[0]; + const userConfig = typeof ruleOptions === "string" ? { + props: ruleOptions, + children: ruleOptions, + propElementValues: OPTION_IGNORE + } : Object.assign({}, DEFAULT_CONFIG, ruleOptions); + function containsLineTerminators(rawStringValue) { + return ast_exports.LINEBREAK_MATCHER.test(rawStringValue); + } + function containsBackslash(rawStringValue) { + return rawStringValue.includes("\\"); + } + function containsHTMLEntity(rawStringValue) { + return HTML_ENTITY_REGEX().test(rawStringValue); + } + function containsOnlyHtmlEntities(rawStringValue) { + return rawStringValue.replace(HTML_ENTITY_REGEX(), "").trim() === ""; + } + function containsDisallowedJSXTextChars(rawStringValue) { + return /[{<>}]/.test(rawStringValue); + } + function containsQuoteCharacters(value) { + return /['"]/.test(value); + } + function containsMultilineComment(value) { + return /\/\*/.test(value); + } + function escapeDoubleQuotes(rawStringValue) { + return rawStringValue.replace(/\\"/g, "\"").replace(/"/g, "\\\""); + } + function escapeBackslashes(rawStringValue) { + return rawStringValue.replace(/\\/g, "\\\\"); + } + function needToEscapeCharacterForJSX(raw, node) { + return containsBackslash(raw) || containsHTMLEntity(raw) || node.parent.type !== "JSXAttribute" && containsDisallowedJSXTextChars(raw); + } + function containsWhitespaceExpression(child) { + if (child.type === "JSXExpressionContainer") { + const value = child.expression.value; + return value ? isWhiteSpaces(value) : false; + } + return false; + } + function isLineBreak(text) { + return containsLineTerminators(text) && text.trim() === ""; + } + function wrapNonHTMLEntities(text) { + const HTML_ENTITY = ""; + const withCurlyBraces = text.split(HTML_ENTITY_REGEX()).map((word) => word === "" ? "" : `{${JSON.stringify(word)}}`).join(HTML_ENTITY); + const htmlEntities = text.match(HTML_ENTITY_REGEX()); + return htmlEntities.reduce((acc, htmlEntity) => acc.replace(HTML_ENTITY, htmlEntity), withCurlyBraces); + } + function wrapWithCurlyBraces(rawText) { + if (!containsLineTerminators(rawText)) return `{${JSON.stringify(rawText)}}`; + return rawText.split("\n").map((line) => { + if (line.trim() === "") return line; + const firstCharIndex = line.search(/\S/); + const leftWhitespace = line.slice(0, firstCharIndex); + const text = line.slice(firstCharIndex); + if (containsHTMLEntity(line)) return `${leftWhitespace}${wrapNonHTMLEntities(text)}`; + return `${leftWhitespace}{${JSON.stringify(text)}}`; + }).join("\n"); + } + function reportUnnecessaryCurly(JSXExpressionNode) { + context.report({ + messageId: "unnecessaryCurly", + node: JSXExpressionNode, + fix(fixer) { + const expression = JSXExpressionNode.expression; + let textToReplace; + if (isJSX(expression)) { + const sourceCode = context.sourceCode; + textToReplace = sourceCode.getText(expression); + } else { + const parentType = JSXExpressionNode.parent.type; + if (parentType === "JSXAttribute") textToReplace = `"${expression.type === "TemplateLiteral" ? expression.quasis[0].value.raw : expression.raw.slice(1, -1)}"`; + else if (isJSX(expression)) { + const sourceCode = context.sourceCode; + textToReplace = sourceCode.getText(expression); + } else textToReplace = expression.type === "TemplateLiteral" ? expression.quasis[0].value.cooked : expression.value; + } + return fixer.replaceText(JSXExpressionNode, textToReplace); + } + }); + } + function reportMissingCurly(literalNode) { + context.report({ + messageId: "missingCurly", + node: literalNode, + fix(fixer) { + if (isJSX(literalNode)) return fixer.replaceText(literalNode, `{${context.sourceCode.getText(literalNode)}}`); + if (containsOnlyHtmlEntities(literalNode.raw) || literalNode.parent.type === "JSXAttribute" && containsLineTerminators(literalNode.raw) || isLineBreak(literalNode.raw)) return null; + const expression = literalNode.parent.type === "JSXAttribute" ? `{"${escapeDoubleQuotes(escapeBackslashes(literalNode.raw.slice(1, -1)))}"}` : wrapWithCurlyBraces(literalNode.raw); + return fixer.replaceText(literalNode, expression); + } + }); + } + function isWhiteSpaceLiteral(node) { + return node.type && node.type === "Literal" && node.value && isWhiteSpaces(node.value); + } + function isStringWithTrailingWhiteSpaces(value) { + return /^\s|\s$/.test(value); + } + function isLiteralWithTrailingWhiteSpaces(node) { + return node.type && node.type === "Literal" && node.value && isStringWithTrailingWhiteSpaces(node.value); + } + function lintUnnecessaryCurly(JSXExpressionNode) { + const expression = JSXExpressionNode.expression; + const expressionType = expression.type; + const sourceCode = context.sourceCode; + if (sourceCode.getCommentsInside && sourceCode.getCommentsInside(JSXExpressionNode).length > 0) return; + if ((expressionType === "Literal" || expressionType === "JSXText") && typeof expression.value === "string" && (JSXExpressionNode.parent.type === "JSXAttribute" && !isWhiteSpaceLiteral(expression) || !isLiteralWithTrailingWhiteSpaces(expression)) && !containsMultilineComment(expression.value) && !needToEscapeCharacterForJSX(expression.raw, JSXExpressionNode) && (isJSX(JSXExpressionNode.parent) || !containsQuoteCharacters(expression.value))) reportUnnecessaryCurly(JSXExpressionNode); + else if (expressionType === "TemplateLiteral" && expression.expressions.length === 0 && !expression.quasis[0].value.raw.includes("\n") && !isStringWithTrailingWhiteSpaces(expression.quasis[0].value.raw) && !needToEscapeCharacterForJSX(expression.quasis[0].value.raw, JSXExpressionNode) && !containsQuoteCharacters(expression.quasis[0].value.cooked)) reportUnnecessaryCurly(JSXExpressionNode); + else if (isJSX(expression)) reportUnnecessaryCurly(JSXExpressionNode); + } + function areRuleConditionsSatisfied(parent, config, ruleCondition) { + return parent.type === "JSXAttribute" && typeof config.props === "string" && config.props === ruleCondition || isJSX(parent) && typeof config.children === "string" && config.children === ruleCondition; + } + function getAdjacentSiblings(node, children) { + for (let i = 1; i < children.length - 1; i++) { + const child = children[i]; + if (node === child) return [children[i - 1], children[i + 1]]; + } + if (node === children[0] && children[1]) return [children[1]]; + if (node === children[children.length - 1] && children[children.length - 2]) return [children[children.length - 2]]; + return []; + } + function hasAdjacentJsxExpressionContainers(node, children) { + if (!children) return false; + const childrenExcludingWhitespaceLiteral = children.filter((child) => !isWhiteSpaceLiteral(child)); + const adjSiblings = getAdjacentSiblings(node, childrenExcludingWhitespaceLiteral); + return adjSiblings.some((x) => x.type && x.type === "JSXExpressionContainer"); + } + function hasAdjacentJsx(node, children) { + if (!children) return false; + const childrenExcludingWhitespaceLiteral = children.filter((child) => !isWhiteSpaceLiteral(child)); + const adjSiblings = getAdjacentSiblings(node, childrenExcludingWhitespaceLiteral); + return adjSiblings.some((x) => x.type && ["JSXExpressionContainer", "JSXElement"].includes(x.type)); + } + function shouldCheckForUnnecessaryCurly(node, config) { + const parent = node.parent; + if (parent.type && parent.type === "JSXAttribute" && node.expression && node.expression.type && node.expression.type !== "Literal" && node.expression.type !== "StringLiteral" && node.expression.type !== "TemplateLiteral") return false; + if (isJSX(parent) && hasAdjacentJsxExpressionContainers(node, parent.children)) return false; + if (containsWhitespaceExpression(node) && hasAdjacentJsx(node, parent.children)) return false; + if (parent.children && parent.children.length === 1 && containsWhitespaceExpression(node)) return false; + return areRuleConditionsSatisfied(parent, config, OPTION_NEVER); + } + function shouldCheckForMissingCurly(node, config) { + if (isJSX(node)) return config.propElementValues !== OPTION_IGNORE; + if (isLineBreak(node.raw) || containsOnlyHtmlEntities(node.raw)) return false; + const parent = node.parent; + if (parent.children && parent.children.length === 1 && containsWhitespaceExpression(parent.children[0])) return false; + return areRuleConditionsSatisfied(parent, config, OPTION_ALWAYS); + } + return { + "JSXAttribute > JSXExpressionContainer > JSXElement": function(node) { + if (userConfig.propElementValues === OPTION_NEVER) reportUnnecessaryCurly(node.parent); + }, + JSXExpressionContainer(node) { + if (shouldCheckForUnnecessaryCurly(node, userConfig)) lintUnnecessaryCurly(node); + }, + "JSXAttribute > JSXElement, Literal, JSXText": function(node) { + if (shouldCheckForMissingCurly(node, userConfig)) reportMissingCurly(node); + } + }; + } +}); +export { jsx_curly_brace_presence_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-curly-newline.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-curly-newline.js new file mode 100644 index 0000000..ce75334 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-curly-newline.js @@ -0,0 +1,109 @@ +import { ast_exports, createRule, isSingleLine } from "../utils.js"; +function getNormalizedOption(context) { + const rawOption = context.options[0] || "consistent"; + if (rawOption === "consistent") return { + multiline: "consistent", + singleline: "consistent" + }; + if (rawOption === "never") return { + multiline: "forbid", + singleline: "forbid" + }; + return { + multiline: rawOption.multiline || "consistent", + singleline: rawOption.singleline || "consistent" + }; +} +const messages = { + expectedBefore: "Expected newline before '}'.", + expectedAfter: "Expected newline after '{'.", + unexpectedBefore: "Unexpected newline before '}'.", + unexpectedAfter: "Unexpected newline after '{'." +}; +var jsx_curly_newline_default = createRule({ + name: "jsx-curly-newline", + meta: { + type: "layout", + docs: { description: "Enforce consistent linebreaks in curly braces in JSX attributes and expressions" }, + fixable: "whitespace", + schema: [{ anyOf: [{ + type: "string", + enum: ["consistent", "never"] + }, { + type: "object", + properties: { + singleline: { + type: "string", + enum: [ + "consistent", + "require", + "forbid" + ] + }, + multiline: { + type: "string", + enum: [ + "consistent", + "require", + "forbid" + ] + } + }, + additionalProperties: false + }] }], + messages + }, + create(context) { + const sourceCode = context.sourceCode; + const option = getNormalizedOption(context); + function shouldHaveNewlines(expression, hasLeftNewline) { + switch (!isSingleLine(expression) ? option.multiline : option.singleline) { + case "forbid": return false; + case "require": return true; + case "consistent": + default: return hasLeftNewline; + } + } + function validateCurlys(curlys, expression) { + const leftCurly = curlys.leftCurly; + const rightCurly = curlys.rightCurly; + const tokenAfterLeftCurly = sourceCode.getTokenAfter(leftCurly); + const tokenBeforeRightCurly = sourceCode.getTokenBefore(rightCurly); + const hasLeftNewline = !(0, ast_exports.isTokenOnSameLine)(leftCurly, tokenAfterLeftCurly); + const hasRightNewline = !(0, ast_exports.isTokenOnSameLine)(tokenBeforeRightCurly, rightCurly); + const needsNewlines = shouldHaveNewlines(expression, hasLeftNewline); + if (hasLeftNewline && !needsNewlines) context.report({ + node: leftCurly, + messageId: "unexpectedAfter", + fix(fixer) { + return sourceCode.getText().slice(leftCurly.range[1], tokenAfterLeftCurly?.range[0]).trim() ? null : fixer.removeRange([leftCurly.range[1], tokenAfterLeftCurly.range[0]]); + } + }); + else if (!hasLeftNewline && needsNewlines) context.report({ + node: leftCurly, + messageId: "expectedAfter", + fix: (fixer) => fixer.insertTextAfter(leftCurly, "\n") + }); + if (hasRightNewline && !needsNewlines) context.report({ + node: rightCurly, + messageId: "unexpectedBefore", + fix(fixer) { + return sourceCode.getText().slice(tokenBeforeRightCurly.range[1], rightCurly.range[0]).trim() ? null : fixer.removeRange([tokenBeforeRightCurly.range[1], rightCurly.range[0]]); + } + }); + else if (!hasRightNewline && needsNewlines) context.report({ + node: rightCurly, + messageId: "expectedBefore", + fix: (fixer) => fixer.insertTextBefore(rightCurly, "\n") + }); + } + return { JSXExpressionContainer(node) { + const curlyTokens = { + leftCurly: sourceCode.getFirstToken(node), + rightCurly: sourceCode.getLastToken(node) + }; + validateCurlys(curlyTokens, node.expression); + } }; + } +}); +export { jsx_curly_newline_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-curly-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-curly-spacing.js new file mode 100644 index 0000000..899be40 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-curly-spacing.js @@ -0,0 +1,236 @@ +import { ast_exports, createRule } from "../utils.js"; +const SPACING = { + always: "always", + never: "never" +}; +const SPACING_VALUES = [SPACING.always, SPACING.never]; +const messages = { + noNewlineAfter: "There should be no newline after '{{token}}'", + noNewlineBefore: "There should be no newline before '{{token}}'", + noSpaceAfter: "There should be no space after '{{token}}'", + noSpaceBefore: "There should be no space before '{{token}}'", + spaceNeededAfter: "A space is required after '{{token}}'", + spaceNeededBefore: "A space is required before '{{token}}'" +}; +const BASIC_CONFIG_SCHEMA = { + type: "object", + properties: { + when: { + type: "string", + enum: SPACING_VALUES + }, + allowMultiline: { type: "boolean" }, + spacing: { + type: "object", + properties: { objectLiterals: { + type: "string", + enum: SPACING_VALUES + } }, + additionalProperties: false + } + }, + additionalProperties: false +}; +const BASIC_CONFIG_OR_BOOLEAN_SCHEMA = { anyOf: [BASIC_CONFIG_SCHEMA, { type: "boolean" }] }; +var jsx_curly_spacing_default = createRule({ + name: "jsx-curly-spacing", + meta: { + type: "layout", + docs: { description: "Enforce or disallow spaces inside of curly braces in JSX attributes and expressions" }, + fixable: "code", + messages, + schema: { + type: "array", + items: [{ anyOf: [{ + type: "object", + additionalProperties: false, + properties: { + ...BASIC_CONFIG_SCHEMA.properties, + attributes: BASIC_CONFIG_OR_BOOLEAN_SCHEMA, + children: BASIC_CONFIG_OR_BOOLEAN_SCHEMA + } + }, { + type: "string", + enum: SPACING_VALUES + }] }, { + type: "object", + properties: { + allowMultiline: { type: "boolean" }, + spacing: { + type: "object", + properties: { objectLiterals: { + type: "string", + enum: SPACING_VALUES + } }, + additionalProperties: false + } + }, + additionalProperties: false + }] + } + }, + create(context) { + function normalizeConfig(configOrTrue, defaults, lastPass = false) { + const config = configOrTrue === true ? {} : configOrTrue; + const when = config.when || defaults.when; + const allowMultiline = "allowMultiline" in config ? config.allowMultiline : defaults.allowMultiline; + const spacing = config.spacing || {}; + let objectLiteralSpaces = spacing.objectLiterals || defaults.objectLiteralSpaces; + if (lastPass) objectLiteralSpaces = objectLiteralSpaces || when; + return { + when, + allowMultiline, + objectLiteralSpaces + }; + } + const DEFAULT_WHEN = SPACING.never; + const DEFAULT_ALLOW_MULTILINE = true; + const DEFAULT_ATTRIBUTES = true; + const DEFAULT_CHILDREN = false; + let originalConfig = context.options[0] || {}; + if (SPACING_VALUES.includes(originalConfig)) originalConfig = Object.assign({ when: context.options[0] }, context.options[1]); + originalConfig = originalConfig; + const defaultConfig = normalizeConfig(originalConfig, { + when: DEFAULT_WHEN, + allowMultiline: DEFAULT_ALLOW_MULTILINE + }); + const attributes = "attributes" in originalConfig ? originalConfig.attributes : DEFAULT_ATTRIBUTES; + const attributesConfig = attributes ? normalizeConfig(attributes, defaultConfig, true) : null; + const children = "children" in originalConfig ? originalConfig.children : DEFAULT_CHILDREN; + const childrenConfig = children ? normalizeConfig(children, defaultConfig, true) : null; + function fixByTrimmingWhitespace(fixer, fromLoc, toLoc, mode, spacing = "") { + let replacementText = context.sourceCode.text.slice(fromLoc, toLoc); + if (mode === "start") replacementText = replacementText.replace(/^\s+/gm, ""); + else replacementText = replacementText.replace(/\s+$/gm, ""); + if (spacing === SPACING.always) if (mode === "start") replacementText += " "; + else replacementText = ` ${replacementText}`; + return fixer.replaceTextRange([fromLoc, toLoc], replacementText); + } + function reportNoBeginningNewline(node, token, spacing) { + context.report({ + node, + loc: token.loc.start, + messageId: "noNewlineAfter", + data: { token: token.value }, + fix(fixer) { + const nextToken = context.sourceCode.getTokenAfter(token); + return fixByTrimmingWhitespace(fixer, token.range[1], nextToken.range[0], "start", spacing); + } + }); + } + function reportNoEndingNewline(node, token, spacing) { + context.report({ + node, + loc: token.loc.start, + messageId: "noNewlineBefore", + data: { token: token.value }, + fix(fixer) { + const previousToken = context.sourceCode.getTokenBefore(token); + return fixByTrimmingWhitespace(fixer, previousToken.range[1], token.range[0], "end", spacing); + } + }); + } + function reportNoBeginningSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + messageId: "noSpaceAfter", + data: { token: token.value }, + fix(fixer) { + const sourceCode = context.sourceCode; + const nextToken = sourceCode.getTokenAfter(token); + const nextComment = sourceCode.getCommentsAfter(token); + if (nextComment.length > 0) return fixByTrimmingWhitespace(fixer, token.range[1], Math.min(nextToken.range[0], nextComment[0].range[0]), "start"); + return fixByTrimmingWhitespace(fixer, token.range[1], nextToken.range[0], "start"); + } + }); + } + function reportNoEndingSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + messageId: "noSpaceBefore", + data: { token: token.value }, + fix(fixer) { + const sourceCode = context.sourceCode; + const previousToken = sourceCode.getTokenBefore(token); + const previousComment = sourceCode.getCommentsBefore(token); + if (previousComment.length > 0) return fixByTrimmingWhitespace(fixer, Math.max(previousToken.range[1], previousComment[0].range[1]), token.range[0], "end"); + return fixByTrimmingWhitespace(fixer, previousToken.range[1], token.range[0], "end"); + } + }); + } + function reportRequiredBeginningSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + messageId: "spaceNeededAfter", + data: { token: token.value }, + fix(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); + } + function reportRequiredEndingSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + messageId: "spaceNeededBefore", + data: { token: token.value }, + fix(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + } + function validateBraceSpacing(node) { + let config; + switch (node.parent?.type) { + case "JSXAttribute": + case "JSXOpeningElement": + config = attributesConfig; + break; + case "JSXElement": + case "JSXFragment": + config = childrenConfig; + break; + default: return; + } + if (config === null) return; + const sourceCode = context.sourceCode; + const first = sourceCode.getFirstToken(node); + const last = sourceCode.getLastToken(node); + let second = sourceCode.getTokenAfter(first, { includeComments: true }); + let penultimate = sourceCode.getTokenBefore(last, { includeComments: true }); + if (!second) { + second = sourceCode.getTokenAfter(first); + const leadingComments = sourceCode.getCommentsBefore(second); + second = leadingComments ? leadingComments[0] : second; + } + if (!penultimate) { + penultimate = sourceCode.getTokenBefore(last); + const trailingComments = sourceCode.getCommentsAfter(penultimate); + penultimate = trailingComments ? trailingComments[trailingComments.length - 1] : penultimate; + } + const isObjectLiteral = first.value === second.value; + const spacing = isObjectLiteral ? config.objectLiteralSpaces : config.when; + if (spacing === SPACING.always) { + if (!sourceCode.isSpaceBetween(first, second)) reportRequiredBeginningSpace(node, first); + else if (!config.allowMultiline && !(0, ast_exports.isTokenOnSameLine)(first, second)) reportNoBeginningNewline(node, first, spacing); + if (!sourceCode.isSpaceBetween(penultimate, last)) reportRequiredEndingSpace(node, last); + else if (!config.allowMultiline && !(0, ast_exports.isTokenOnSameLine)(penultimate, last)) reportNoEndingNewline(node, last, spacing); + } else if (spacing === SPACING.never) { + if (!(0, ast_exports.isTokenOnSameLine)(first, second)) { + if (!config.allowMultiline) reportNoBeginningNewline(node, first, spacing); + } else if (sourceCode.isSpaceBetween(first, second)) reportNoBeginningSpace(node, first); + if (!(0, ast_exports.isTokenOnSameLine)(penultimate, last)) { + if (!config.allowMultiline) reportNoEndingNewline(node, last, spacing); + } else if (sourceCode.isSpaceBetween(penultimate, last)) reportNoEndingSpace(node, last); + } + } + return { + JSXExpressionContainer: validateBraceSpacing, + JSXSpreadAttribute: validateBraceSpacing + }; + } +}); +export { jsx_curly_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-equals-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-equals-spacing.js new file mode 100644 index 0000000..9e3b20a --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-equals-spacing.js @@ -0,0 +1,68 @@ +import { createRule } from "../utils.js"; +const messages = { + noSpaceBefore: "There should be no space before '='", + noSpaceAfter: "There should be no space after '='", + needSpaceBefore: "A space is required before '='", + needSpaceAfter: "A space is required after '='" +}; +var jsx_equals_spacing_default = createRule({ + name: "jsx-equals-spacing", + meta: { + type: "layout", + docs: { description: "Enforce or disallow spaces around equal signs in JSX attributes" }, + fixable: "code", + messages, + schema: [{ + type: "string", + enum: ["always", "never"] + }] + }, + create(context) { + const config = context.options[0] || "never"; + return { JSXOpeningElement(node) { + node.attributes.forEach((attrNode) => { + if (!(attrNode.type !== "JSXSpreadAttribute" && attrNode.value !== null)) return; + const sourceCode = context.sourceCode; + const equalToken = sourceCode.getTokenAfter(attrNode.name); + const spacedBefore = sourceCode.isSpaceBetween(attrNode.name, equalToken); + const spacedAfter = sourceCode.isSpaceBetween(equalToken, attrNode.value); + if (config === "never") { + if (spacedBefore) context.report({ + node: attrNode, + messageId: "noSpaceBefore", + loc: equalToken.loc.start, + fix(fixer) { + return fixer.removeRange([attrNode.name.range[1], equalToken.range[0]]); + } + }); + if (spacedAfter) context.report({ + node: attrNode, + messageId: "noSpaceAfter", + loc: equalToken.loc.start, + fix(fixer) { + return fixer.removeRange([equalToken.range[1], attrNode.value.range[0]]); + } + }); + } else if (config === "always") { + if (!spacedBefore) context.report({ + messageId: "needSpaceBefore", + node: attrNode, + loc: equalToken.loc.start, + fix(fixer) { + return fixer.insertTextBefore(equalToken, " "); + } + }); + if (!spacedAfter) context.report({ + node: attrNode, + messageId: "needSpaceAfter", + loc: equalToken.loc.start, + fix(fixer) { + return fixer.insertTextAfter(equalToken, " "); + } + }); + } + }); + } }; + } +}); +export { jsx_equals_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-first-prop-new-line.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-first-prop-new-line.js new file mode 100644 index 0000000..d5db942 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-first-prop-new-line.js @@ -0,0 +1,50 @@ +import { createRule, isSingleLine } from "../utils.js"; +const messages = { + propOnNewLine: "Property should be placed on a new line", + propOnSameLine: "Property should be placed on the same line as the component declaration" +}; +var jsx_first_prop_new_line_default = createRule({ + name: "jsx-first-prop-new-line", + meta: { + type: "layout", + docs: { description: "Enforce proper position of the first property in JSX" }, + fixable: "code", + messages, + schema: [{ + type: "string", + enum: [ + "always", + "never", + "multiline", + "multiline-multiprop", + "multiprop" + ] + }] + }, + create(context) { + const configuration = context.options[0] || "multiline-multiprop"; + return { JSXOpeningElement(node) { + if (configuration === "multiline" && !isSingleLine(node) || configuration === "multiline-multiprop" && !isSingleLine(node) && node.attributes.length > 1 || configuration === "multiprop" && node.attributes.length > 1 || configuration === "always") node.attributes.some((decl) => { + if (decl.loc.start.line === node.loc.start.line) context.report({ + node: decl, + messageId: "propOnNewLine", + fix(fixer) { + return fixer.replaceTextRange([(node.typeArguments || node.name).range[1], decl.range[0]], "\n"); + } + }); + return true; + }); + else if (configuration === "never" && node.attributes.length > 0 || configuration === "multiprop" && !isSingleLine(node) && node.attributes.length <= 1) { + const firstNode = node.attributes[0]; + if (node.loc.start.line < firstNode.loc.start.line) context.report({ + node: firstNode, + messageId: "propOnSameLine", + fix(fixer) { + return fixer.replaceTextRange([node.name.range[1], firstNode.range[0]], " "); + } + }); + } + } }; + } +}); +export { jsx_first_prop_new_line_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-function-call-newline.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-function-call-newline.js new file mode 100644 index 0000000..6410bbf --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-function-call-newline.js @@ -0,0 +1,66 @@ +import { ast_exports, createRule, isJSX, isSingleLine } from "../utils.js"; +const messages = { missingLineBreak: "Missing line break around JSX" }; +function endWithComma(context, node) { + const sourceCode = context.sourceCode; + const nextToken = sourceCode.getTokenAfter(node); + return !!nextToken && nextToken.value === "," && nextToken.range[0] >= node.range[1]; +} +var jsx_function_call_newline_default = createRule({ + name: "jsx-function-call-newline", + meta: { + type: "layout", + docs: { description: "Enforce line breaks before and after JSX elements when they are used as arguments to a function." }, + fixable: "whitespace", + messages, + schema: [{ + type: "string", + enum: ["always", "multiline"] + }] + }, + create(context) { + const option = context.options[0] || "multiline"; + function needsOpeningNewLine(node) { + const previousToken = context.sourceCode.getTokenBefore(node); + if ((0, ast_exports.isTokenOnSameLine)(previousToken, node)) return true; + return false; + } + function needsClosingNewLine(node) { + const nextToken = context.sourceCode.getTokenAfter(node); + if (endWithComma(context, node)) return false; + if (node.loc.end.line === nextToken.loc.end.line) return true; + return false; + } + function check(node) { + if (!node || !isJSX(node)) return; + const sourceCode = context.sourceCode; + if (option === "always" || !isSingleLine(node)) { + const needsOpening = needsOpeningNewLine(node); + const needsClosing = needsClosingNewLine(node); + if (needsOpening || needsClosing) context.report({ + node, + messageId: "missingLineBreak", + fix: (fixer) => { + const text = sourceCode.getText(node); + let fixed = text; + if (needsOpening) fixed = `\n${fixed}`; + if (needsClosing) fixed = `${fixed}\n`; + return fixer.replaceText(node, fixed); + } + }); + } + } + function handleCallExpression(node) { + if (node.arguments.length === 0) return; + node.arguments.forEach(check); + } + return { + CallExpression(node) { + handleCallExpression(node); + }, + NewExpression(node) { + handleCallExpression(node); + } + }; + } +}); +export { jsx_function_call_newline_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-indent-props.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-indent-props.js new file mode 100644 index 0000000..da341c8 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-indent-props.js @@ -0,0 +1,108 @@ +import { createRule, isNodeFirstInLine } from "../utils.js"; +const messages = { wrongIndent: "Expected indentation of {{needed}} {{type}} {{characters}} but found {{gotten}}." }; +var jsx_indent_props_default = createRule({ + name: "jsx-indent-props", + meta: { + type: "layout", + docs: { description: "Enforce props indentation in JSX" }, + fixable: "code", + messages, + schema: [{ anyOf: [ + { + type: "string", + enum: ["tab", "first"] + }, + { type: "integer" }, + { + type: "object", + properties: { + indentMode: { anyOf: [{ + type: "string", + enum: ["tab", "first"] + }, { type: "integer" }] }, + ignoreTernaryOperator: { type: "boolean" } + }, + additionalProperties: false + } + ] }] + }, + create(context) { + const options = context.options[0]; + const extraColumnStart = 0; + let indentType = "space"; + let indentSize = 4; + const line = { + isUsingOperator: false, + currentOperator: false + }; + let ignoreTernaryOperator = false; + if (context.options.length) { + const isConfigObject = typeof context.options[0] === "object"; + const indentMode = isConfigObject ? typeof options === "object" && options.indentMode : options; + if (indentMode === "first") { + indentSize = "first"; + indentType = "space"; + } else if (indentMode === "tab") { + indentSize = 1; + indentType = "tab"; + } else if (typeof indentMode === "number") { + indentSize = indentMode; + indentType = "space"; + } + if (typeof options === "object" && options.ignoreTernaryOperator) ignoreTernaryOperator = true; + } + function getNodeIndent(node) { + let src = context.sourceCode.getText(node, node.loc.start.column + extraColumnStart); + const lines = src.split("\n"); + src = lines[0]; + let regExp; + if (indentType === "space") regExp = /^ +/; + else regExp = /^\t+/; + const indent = regExp.exec(src); + const useOperator = /^[ \t]*:/.test(src) || /^[ \t]*\?/.test(src); + const useBracket = / { + const nodeIndent = getNodeIndent(node); + if (line.isUsingOperator && !line.currentOperator && indentSize !== "first" && !ignoreTernaryOperator) { + nestedIndent += indentSize; + line.isUsingOperator = false; + } + if (node.type !== "ArrayExpression" && node.type !== "ObjectExpression" && nodeIndent !== nestedIndent && isNodeFirstInLine(context, node)) context.report({ + node, + messageId: "wrongIndent", + data: { + needed: nestedIndent, + type: indentType, + characters: nestedIndent === 1 ? "character" : "characters", + gotten: nodeIndent + }, + fix(fixer) { + return fixer.replaceTextRange([node.range[0] - node.loc.start.column, node.range[0]], new Array(nestedIndent + 1).join(indentType === "space" ? " " : " ")); + } + }); + }); + } + return { JSXOpeningElement(node) { + if (!node.attributes.length) return; + let propIndent; + if (indentSize === "first") { + const firstPropNode = node.attributes[0]; + propIndent = firstPropNode.loc.start.column; + } else { + const elementIndent = getNodeIndent(node); + propIndent = elementIndent + indentSize; + } + checkNodesIndent(node.attributes, propIndent); + } }; + } +}); +export { jsx_indent_props_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-indent.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-indent.js new file mode 100644 index 0000000..359f620 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-indent.js @@ -0,0 +1,188 @@ +import { ast_exports, createRule, getFirstNodeInLine, isJSX, isNodeFirstInLine, isReturningJSX } from "../utils.js"; +const messages = { wrongIndent: "Expected indentation of {{needed}} {{type}} {{characters}} but found {{gotten}}." }; +var jsx_indent_default = createRule({ + name: "jsx-indent", + meta: { + type: "layout", + docs: { description: "Enforce JSX indentation. Deprecated, use `indent` rule instead." }, + deprecated: { + message: "The rule was replaced with a more general rule.", + deprecatedSince: "5.0.0", + replacedBy: [{ rule: { + name: "indent", + url: "https://eslint.style/rules/indent" + } }] + }, + fixable: "whitespace", + messages, + schema: [{ anyOf: [{ + type: "string", + enum: ["tab"] + }, { type: "integer" }] }, { + type: "object", + properties: { + checkAttributes: { type: "boolean" }, + indentLogicalExpressions: { type: "boolean" } + }, + additionalProperties: false + }] + }, + create(context) { + const extraColumnStart = 0; + let indentType = "space"; + let indentSize = 4; + if (context.options.length) { + if (context.options[0] === "tab") { + indentSize = 1; + indentType = "tab"; + } else if (typeof context.options[0] === "number") { + indentSize = context.options[0]; + indentType = "space"; + } + } + const indentChar = indentType === "space" ? " " : " "; + const options = context.options[1] || {}; + const checkAttributes = options.checkAttributes || false; + const indentLogicalExpressions = options.indentLogicalExpressions || false; + function getFixerFunction(node, needed) { + const indent = new Array(needed + 1).join(indentChar); + if (node.type === "JSXText" || node.type === "Literal") return function fix(fixer) { + const regExp = /\n[\t ]*(\S)/g; + const fixedText = node.raw.replace(regExp, (match, p1) => `\n${indent}${p1}`); + return fixer.replaceText(node, fixedText); + }; + if (node.type === "ReturnStatement") { + const raw = context.sourceCode.getText(node); + const lines = raw.split("\n"); + if (lines.length > 1) return function fix(fixer) { + const lastLineStart = raw.lastIndexOf("\n"); + const lastLine = raw.slice(lastLineStart).replace(/^\n[\t ]*(\S)/, (match, p1) => `\n${indent}${p1}`); + return fixer.replaceTextRange([node.range[0] + lastLineStart, node.range[1]], lastLine); + }; + } + return function fix(fixer) { + return fixer.replaceTextRange([node.range[0] - node.loc.start.column, node.range[0]], indent); + }; + } + function report(node, needed, gotten, loc) { + const msgContext = { + needed, + type: indentType, + characters: needed === 1 ? "character" : "characters", + gotten + }; + context.report({ + node, + messageId: "wrongIndent", + data: msgContext, + fix: getFixerFunction(node, needed), + ...loc ? { loc } : {} + }); + } + function getNodeIndent(node, byLastLine = false, excludeCommas = false) { + let src = context.sourceCode.getText(node, node.loc.start.column + extraColumnStart); + const lines = src.split("\n"); + if (byLastLine) src = lines[lines.length - 1]; + else src = lines[0]; + const skip = excludeCommas ? "," : ""; + let regExp; + if (indentType === "space") regExp = /* @__PURE__ */ new RegExp(`^[ ${skip}]+`); + else regExp = /* @__PURE__ */ new RegExp(`^[\t${skip}]+`); + const indent = regExp.exec(src); + return indent ? indent[0].length : 0; + } + function isRightInLogicalExp(node) { + return node.parent && node.parent.parent && node.parent.parent.type === "LogicalExpression" && node.parent.parent.right === node.parent && !indentLogicalExpressions; + } + function isAlternateInConditionalExp(node) { + return node.parent && node.parent.parent && node.parent.parent.type === "ConditionalExpression" && node.parent.parent.alternate === node.parent && context.sourceCode.getTokenBefore(node).value !== "("; + } + function isSecondOrSubsequentExpWithinDoExp(node) { + if (!node.parent || !node.parent.parent || node.parent.parent.type !== "ExpressionStatement") return false; + const expStmt = node.parent.parent; + const isInBlockStmtWithinDoExp = expStmt.parent && expStmt.parent.type === "BlockStatement" && expStmt.parent.parent && expStmt.parent.parent.type === "DoExpression"; + if (!isInBlockStmtWithinDoExp) return false; + const blockStmt = expStmt.parent; + const blockStmtFirstExp = blockStmt.body[0]; + return !(blockStmtFirstExp === expStmt); + } + function checkNodesIndent(node, indent, excludeCommas = false) { + const nodeIndent = getNodeIndent(node, false, excludeCommas); + const isCorrectRightInLogicalExp = isRightInLogicalExp(node) && nodeIndent - indent === indentSize; + const isCorrectAlternateInCondExp = isAlternateInConditionalExp(node) && nodeIndent - indent === 0; + if (nodeIndent !== indent && isNodeFirstInLine(context, node) && !isCorrectRightInLogicalExp && !isCorrectAlternateInCondExp) report(node, indent, nodeIndent); + } + function checkLiteralNodeIndent(node, indent) { + const value = node.value; + const regExp = indentType === "space" ? /\n( *)[\t ]*\S/g : /\n(\t*)[\t ]*\S/g; + const nodeIndentsPerLine = Array.from(String(value).matchAll(regExp), (match) => match[1] ? match[1].length : 0); + const hasFirstInLineNode = nodeIndentsPerLine.length > 0; + if (hasFirstInLineNode && !nodeIndentsPerLine.every((actualIndent) => actualIndent === indent)) nodeIndentsPerLine.forEach((nodeIndent) => { + report(node, indent, nodeIndent); + }); + } + function handleOpeningElement(node) { + const sourceCode = context.sourceCode; + let prevToken = sourceCode.getTokenBefore(node); + if (!prevToken) return; + if (prevToken.type === "JSXText" || (0, ast_exports.isCommaToken)(prevToken)) { + prevToken = sourceCode.getNodeByRangeIndex(prevToken.range[0]); + prevToken = prevToken.type === "Literal" || prevToken.type === "JSXText" ? prevToken.parent : prevToken; + } else if ((0, ast_exports.isColonToken)(prevToken)) { + do + prevToken = sourceCode.getTokenBefore(prevToken); + while (prevToken.type === "Punctuator" && prevToken.value !== "/"); + prevToken = sourceCode.getNodeByRangeIndex(prevToken.range[0]); + while (prevToken.parent && prevToken.parent.type !== "ConditionalExpression") prevToken = prevToken.parent; + } + prevToken = prevToken.type === "JSXExpressionContainer" ? prevToken.expression : prevToken; + const parentElementIndent = getNodeIndent(prevToken); + const indent = prevToken.loc.start.line === node.loc.start.line || isRightInLogicalExp(node) || isAlternateInConditionalExp(node) || isSecondOrSubsequentExpWithinDoExp(node) ? 0 : indentSize; + checkNodesIndent(node, parentElementIndent + indent); + } + function handleClosingElement(node) { + if (!node.parent) return; + const peerElementIndent = getNodeIndent(node.parent.openingElement || node.parent.openingFragment); + checkNodesIndent(node, peerElementIndent); + } + function handleAttribute(node) { + if (!checkAttributes || !node.value || node.value.type !== "JSXExpressionContainer") return; + const nameIndent = getNodeIndent(node.name); + const lastToken = context.sourceCode.getLastToken(node.value); + const firstInLine = getFirstNodeInLine(context, lastToken); + if (firstInLine.loc.start.line !== lastToken.loc.start.line) return; + const indent = node.name.loc.start.line === firstInLine.loc.start.line ? 0 : nameIndent; + checkNodesIndent(firstInLine, indent); + } + function handleLiteral(node) { + if (!node.parent) return; + if (node.parent.type !== "JSXElement" && node.parent.type !== "JSXFragment") return; + const parentNodeIndent = getNodeIndent(node.parent); + checkLiteralNodeIndent(node, parentNodeIndent + indentSize); + } + return { + JSXOpeningElement: handleOpeningElement, + JSXOpeningFragment: handleOpeningElement, + JSXClosingElement: handleClosingElement, + JSXClosingFragment: handleClosingElement, + JSXAttribute: handleAttribute, + JSXExpressionContainer(node) { + if (!node.parent) return; + const parentNodeIndent = getNodeIndent(node.parent); + checkNodesIndent(node, parentNodeIndent + indentSize); + }, + Literal: handleLiteral, + JSXText: handleLiteral, + ReturnStatement(node) { + if (!node.parent || !node.argument || !isJSX(node.argument)) return; + let fn = node.parent; + while (fn && fn.type !== "FunctionDeclaration" && fn.type !== "FunctionExpression") fn = fn.parent; + if (!fn || !isReturningJSX(node, context, true)) return; + const openingIndent = getNodeIndent(node); + const closingIndent = getNodeIndent(node, true); + if (openingIndent !== closingIndent) report(node, openingIndent, closingIndent); + } + }; + } +}); +export { jsx_indent_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-max-props-per-line.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-max-props-per-line.js new file mode 100644 index 0000000..73b061c --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-max-props-per-line.js @@ -0,0 +1,99 @@ +import { ast_exports, createRule, isSingleLine } from "../utils.js"; +function getPropName(context, propNode) { + if (propNode.type === "JSXSpreadAttribute") return context.sourceCode.getText(propNode.argument); + return propNode.name.name; +} +const messages = { newLine: "Prop `{{prop}}` must be placed on a new line" }; +var jsx_max_props_per_line_default = createRule({ + name: "jsx-max-props-per-line", + meta: { + type: "layout", + docs: { description: "Enforce maximum of props on a single line in JSX" }, + fixable: "code", + messages, + schema: [{ anyOf: [{ + type: "object", + properties: { maximum: { + type: "object", + properties: { + single: { + type: "integer", + minimum: 1 + }, + multi: { + type: "integer", + minimum: 1 + } + }, + additionalProperties: false + } }, + additionalProperties: false + }, { + type: "object", + properties: { + maximum: { + type: "number", + minimum: 1 + }, + when: { + type: "string", + enum: ["always", "multiline"] + } + }, + additionalProperties: false + }] }] + }, + create(context) { + const configuration = context.options[0] || {}; + const maximum = configuration.maximum || 1; + const maxConfig = typeof maximum === "number" ? { + single: configuration.when === "multiline" ? Infinity : maximum, + multi: maximum + } : { + single: maximum.single || Infinity, + multi: maximum.multi || Infinity + }; + function generateFixFunction(line, max) { + const sourceCode = context.sourceCode; + const output = []; + const front = line[0].range[0]; + const back = line[line.length - 1].range[1]; + for (let i = 0; i < line.length; i += max) { + const nodes = line.slice(i, i + max); + output.push(nodes.reduce((prev, curr) => { + if (prev === "") return sourceCode.getText(curr); + return `${prev} ${sourceCode.getText(curr)}`; + }, "")); + } + const code = output.join("\n"); + return function fix(fixer) { + return fixer.replaceTextRange([front, back], code); + }; + } + return { JSXOpeningElement(node) { + if (!node.attributes.length) return; + const isSingleLineTag = isSingleLine(node); + if ((isSingleLineTag ? maxConfig.single : maxConfig.multi) === Infinity) return; + const firstProp = node.attributes[0]; + const linePartitionedProps = [[firstProp]]; + node.attributes.reduce((last, decl) => { + if ((0, ast_exports.isTokenOnSameLine)(last, decl)) linePartitionedProps[linePartitionedProps.length - 1].push(decl); + else linePartitionedProps.push([decl]); + return decl; + }); + linePartitionedProps.forEach((propsInLine) => { + const maxPropsCountPerLine = isSingleLineTag && propsInLine[0].loc.start.line === node.loc.start.line ? maxConfig.single : maxConfig.multi; + if (propsInLine.length > maxPropsCountPerLine) { + const name = getPropName(context, propsInLine[maxPropsCountPerLine]); + context.report({ + messageId: "newLine", + node: propsInLine[maxPropsCountPerLine], + data: { prop: name }, + fix: generateFixFunction(propsInLine, maxPropsCountPerLine) + }); + } + }); + } }; + } +}); +export { jsx_max_props_per_line_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-newline.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-newline.js new file mode 100644 index 0000000..4659b10 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-newline.js @@ -0,0 +1,95 @@ +import { createRule, isSingleLine } from "../utils.js"; +const messages = { + require: "JSX element should start in a new line", + prevent: "JSX element should not start in a new line", + allowMultilines: "Multiline JSX elements should start in a new line" +}; +var jsx_newline_default = createRule({ + name: "jsx-newline", + package: "jsx", + meta: { + type: "layout", + docs: { description: "Require or prevent a new line after jsx elements and expressions." }, + fixable: "code", + messages, + schema: [{ + type: "object", + properties: { + prevent: { + default: false, + type: "boolean" + }, + allowMultilines: { + default: false, + type: "boolean" + } + }, + additionalProperties: false, + if: { properties: { allowMultilines: { const: true } } }, + then: { + properties: { prevent: { const: true } }, + required: ["prevent"] + } + }] + }, + create(context) { + const jsxElementParents = /* @__PURE__ */ new Set(); + const sourceCode = context.sourceCode; + function isBlockCommentInCurlyBraces(element) { + const elementRawValue = sourceCode.getText(element); + return /^\s*\{\/\*/.test(elementRawValue); + } + function isNonBlockComment(element) { + return !isBlockCommentInCurlyBraces(element) && (element.type === "JSXElement" || element.type === "JSXExpressionContainer"); + } + return { + "Program:exit": function() { + jsxElementParents.forEach((parent) => { + parent.children.forEach((element, index, elements) => { + if (element.type === "JSXElement" || element.type === "JSXExpressionContainer") { + const configuration = context.options[0] || {}; + const prevent = configuration.prevent || false; + const allowMultilines = configuration.allowMultilines || false; + const firstAdjacentSibling = elements[index + 1]; + const secondAdjacentSibling = elements[index + 2]; + const hasSibling = firstAdjacentSibling && secondAdjacentSibling && (firstAdjacentSibling.type === "Literal" || firstAdjacentSibling.type === "JSXText"); + if (!hasSibling) return; + const isWithoutNewLine = !/\n\s*\n/.test(firstAdjacentSibling.value); + if (isBlockCommentInCurlyBraces(element)) return; + const nextNonBlockComment = elements.slice(index + 2).find(isNonBlockComment); + if (allowMultilines && (!isSingleLine(element) || nextNonBlockComment && !isSingleLine(nextNonBlockComment))) { + if (!isWithoutNewLine) return; + const regex$1 = /(\n)(?!.*\1)/g; + const replacement$1 = "\n\n"; + const messageId$1 = "allowMultilines"; + context.report({ + messageId: messageId$1, + node: secondAdjacentSibling, + fix(fixer) { + return fixer.replaceText(firstAdjacentSibling, sourceCode.getText(firstAdjacentSibling).replace(regex$1, replacement$1)); + } + }); + return; + } + if (isWithoutNewLine === prevent) return; + const messageId = prevent ? "prevent" : "require"; + const regex = prevent ? /(\n\n)(?!.*\1)/g : /(\n)(?!.*\1)/g; + const replacement = prevent ? "\n" : "\n\n"; + context.report({ + messageId, + node: secondAdjacentSibling, + fix(fixer) { + return fixer.replaceText(firstAdjacentSibling, sourceCode.getText(firstAdjacentSibling).replace(regex, replacement)); + } + }); + } + }); + }); + }, + ":matches(JSXElement, JSXFragment) > :matches(JSXElement, JSXExpressionContainer)": (node) => { + jsxElementParents.add(node.parent); + } + }; + } +}); +export { jsx_newline_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-one-expression-per-line.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-one-expression-per-line.js new file mode 100644 index 0000000..b05cb57 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-one-expression-per-line.js @@ -0,0 +1,161 @@ +import { createRule, isWhiteSpaces } from "../utils.js"; +const optionDefaults = { allow: "none" }; +const messages = { moveToNewLine: "`{{descriptor}}` must be placed on a new line" }; +var jsx_one_expression_per_line_default = createRule({ + name: "jsx-one-expression-per-line", + meta: { + type: "layout", + docs: { description: "Require one JSX element per line" }, + fixable: "whitespace", + messages, + schema: [{ + type: "object", + properties: { allow: { + type: "string", + enum: [ + "none", + "literal", + "single-child", + "single-line", + "non-jsx" + ] + } }, + default: optionDefaults, + additionalProperties: false + }] + }, + create(context) { + const options = Object.assign({}, optionDefaults, context.options[0]); + function nodeKey(node) { + return `${node.loc.start.line},${node.loc.start.column}`; + } + function nodeDescriptor(n) { + return "openingElement" in n && n.openingElement && "name" in n.openingElement.name ? String(n.openingElement.name.name) : context.sourceCode.getText(n).replace(/\n/g, ""); + } + function report(node, fix) { + context.report({ + messageId: "moveToNewLine", + node, + data: { descriptor: nodeDescriptor(node) }, + fix + }); + } + function handleJSX(node) { + const children = node.children; + if (!children || !children.length) return; + if (options.allow === "non-jsx" && !children.some((child) => child.type === "JSXFragment" || child.type === "JSXElement")) return; + const isFragment = node.type === "JSXFragment"; + const openingElement = isFragment ? node.openingFragment : node.openingElement; + const closingElement = isFragment ? node.closingFragment : node.closingElement; + const openingElementStartLine = openingElement.loc.start.line; + const openingElementEndLine = openingElement.loc.end.line; + const closingElementStartLine = closingElement.loc.start.line; + const closingElementEndLine = closingElement.loc.end.line; + if (children.length === 1) { + const child = children[0]; + if (openingElementStartLine === openingElementEndLine && openingElementEndLine === closingElementStartLine && closingElementStartLine === closingElementEndLine && closingElementEndLine === child.loc.start.line && child.loc.start.line === child.loc.end.line) { + if (options.allow === "single-child" || options.allow === "literal" && (child.type === "Literal" || child.type === "JSXText") || options.allow === "single-line") return; + } + } + if (options.allow === "single-line") { + const firstChild = children[0]; + const lastChild = children[children.length - 1]; + const lineDifference = lastChild.loc.end.line - firstChild.loc.start.line; + let lineBreaks = 0; + if (firstChild.type === "Literal" || firstChild.type === "JSXText") { + if (/^\s*?\n/.test(firstChild.raw)) lineBreaks += 1; + } + if (lastChild.type === "Literal" || lastChild.type === "JSXText") { + if (/\n\s*$/.test(lastChild.raw)) lineBreaks += 1; + } + if (lineDifference === 0 && lineBreaks === 0 || lineDifference === 2 && lineBreaks === 2) return; + } + const childrenGroupedByLine = {}; + const fixDetailsByNode = {}; + children.forEach((child) => { + let countNewLinesBeforeContent = 0; + let countNewLinesAfterContent = 0; + if (child.type === "Literal" || child.type === "JSXText") { + if (isWhiteSpaces(child.raw)) return; + countNewLinesBeforeContent = (child.raw.match(/^\s*\n/g) || []).length; + countNewLinesAfterContent = (child.raw.match(/\n\s*$/g) || []).length; + } + const startLine = child.loc.start.line + countNewLinesBeforeContent; + const endLine = child.loc.end.line - countNewLinesAfterContent; + if (startLine === endLine) { + if (!childrenGroupedByLine[startLine]) childrenGroupedByLine[startLine] = []; + childrenGroupedByLine[startLine].push(child); + } else { + if (!childrenGroupedByLine[startLine]) childrenGroupedByLine[startLine] = []; + childrenGroupedByLine[startLine].push(child); + if (!childrenGroupedByLine[endLine]) childrenGroupedByLine[endLine] = []; + childrenGroupedByLine[endLine].push(child); + } + }); + const lines = Object.keys(childrenGroupedByLine); + if (lines.length === 1 && options.allow === "single-line") { + const line = parseInt(lines[0]); + const children$1 = childrenGroupedByLine[line]; + const firstChild = children$1[0]; + if (line === openingElementEndLine) report(firstChild, (fixer) => fixer.insertTextBefore(firstChild, "\n")); + const lastChild = children$1.at(-1); + if (line === closingElementStartLine) report(lastChild, (fixer) => fixer.insertTextAfter(lastChild, "\n")); + } else { + lines.forEach((_line) => { + const line = parseInt(_line, 10); + const firstIndex = 0; + const lastIndex = childrenGroupedByLine[line].length - 1; + childrenGroupedByLine[line].forEach((child, i) => { + let prevChild; + let nextChild; + if (i === firstIndex) { + if (line === openingElementEndLine) prevChild = openingElement; + } else prevChild = childrenGroupedByLine[line][i - 1]; + if (i === lastIndex) { + if (line === closingElementStartLine) nextChild = closingElement; + } + if (!prevChild && !nextChild) return; + const spaceBetweenPrev = () => { + const tokenBetweenNodes = context.sourceCode.getTokensBetween(prevChild, child)[0]; + return (prevChild.type === "Literal" || prevChild.type === "JSXText") && prevChild.raw.endsWith(" ") || (child.type === "Literal" || child.type === "JSXText") && child.raw.startsWith(" ") || isWhiteSpaces(tokenBetweenNodes?.value); + }; + const spaceBetweenNext = () => { + const tokenBetweenNodes = context.sourceCode.getTokensBetween(child, nextChild)[0]; + return (nextChild.type === "Literal" || nextChild.type === "JSXText") && nextChild.raw.startsWith(" ") || (child.type === "Literal" || child.type === "JSXText") && child.raw.endsWith(" ") || isWhiteSpaces(tokenBetweenNodes?.value); + }; + const source = context.sourceCode.getText(child); + const leadingSpace = !!(prevChild && spaceBetweenPrev()); + const trailingSpace = !!(nextChild && spaceBetweenNext()); + const leadingNewLine = !!prevChild; + const trailingNewLine = !!nextChild; + const key = nodeKey(child); + if (!fixDetailsByNode[key]) fixDetailsByNode[key] = { + node: child, + source + }; + if (leadingSpace) fixDetailsByNode[key].leadingSpace = true; + if (leadingNewLine) fixDetailsByNode[key].leadingNewLine = true; + if (trailingNewLine) fixDetailsByNode[key].trailingNewLine = true; + if (trailingSpace) fixDetailsByNode[key].trailingSpace = true; + }); + }); + Object.keys(fixDetailsByNode).forEach((key) => { + const details = fixDetailsByNode[key]; + const nodeToReport = details.node; + const source = details.source.replace(/(^ +| +$)/g, ""); + const leadingSpaceString = details.leadingSpace ? "\n{' '}" : ""; + const trailingSpaceString = details.trailingSpace ? "{' '}\n" : ""; + const leadingNewLineString = details.leadingNewLine ? "\n" : ""; + const trailingNewLineString = details.trailingNewLine ? "\n" : ""; + const replaceText = `${leadingSpaceString}${leadingNewLineString}${source}${trailingNewLineString}${trailingSpaceString}`; + report(nodeToReport, (fixer) => fixer.replaceText(nodeToReport, replaceText)); + }); + } + } + return { + JSXElement: handleJSX, + JSXFragment: handleJSX + }; + } +}); +export { jsx_one_expression_per_line_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-pascal-case.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-pascal-case.js new file mode 100644 index 0000000..26d990d --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-pascal-case.js @@ -0,0 +1,93 @@ +import { createRule, getElementType, isDOMComponent } from "../utils.js"; +import picomatch from "picomatch"; +function testDigit(char) { + const charCode = char.charCodeAt(0); + return charCode >= 48 && charCode <= 57; +} +function testUpperCase(char) { + const upperCase = char.toUpperCase(); + return char === upperCase && upperCase !== char.toLowerCase(); +} +function testLowerCase(char) { + const lowerCase = char.toLowerCase(); + return char === lowerCase && lowerCase !== char.toUpperCase(); +} +function testPascalCase(name) { + if (!testUpperCase(name.charAt(0))) return false; + const anyNonAlphaNumeric = Array.prototype.some.call(name.slice(1), (char) => char.toLowerCase() === char.toUpperCase() && !testDigit(char)); + if (anyNonAlphaNumeric) return false; + return Array.prototype.some.call(name.slice(1), (char) => testLowerCase(char) || testDigit(char)); +} +function testAllCaps(name) { + const firstChar = name.charAt(0); + if (!(testUpperCase(firstChar) || testDigit(firstChar))) return false; + for (let i = 1; i < name.length - 1; i += 1) { + const char = name.charAt(i); + if (!(testUpperCase(char) || testDigit(char) || char === "_")) return false; + } + const lastChar = name.charAt(name.length - 1); + if (!(testUpperCase(lastChar) || testDigit(lastChar))) return false; + return true; +} +const messages = { + usePascalCase: "Imported JSX component {{name}} must be in PascalCase", + usePascalOrSnakeCase: "Imported JSX component {{name}} must be in PascalCase or SCREAMING_SNAKE_CASE" +}; +var jsx_pascal_case_default = createRule({ + name: "jsx-pascal-case", + meta: { + type: "suggestion", + docs: { description: "Enforce PascalCase for user-defined JSX components" }, + messages, + schema: [{ + type: "object", + properties: { + allowAllCaps: { type: "boolean" }, + allowLeadingUnderscore: { type: "boolean" }, + allowNamespace: { type: "boolean" }, + ignore: { + items: { type: "string" }, + type: "array", + uniqueItems: true + } + }, + additionalProperties: false + }] + }, + create(context) { + const configuration = context.options[0] || {}; + const { allowAllCaps = false, allowLeadingUnderscore = false, allowNamespace = false, ignore = [] } = configuration; + const isMatchIgnore = picomatch(ignore, { noglobstar: true }); + function ignoreCheck(name) { + return isMatchIgnore(name) || ignore.includes(name); + } + return { JSXOpeningElement(node) { + const isCompatTag = isDOMComponent(node); + if (isCompatTag) return; + const name = getElementType(node); + let checkNames = [name]; + let index = 0; + if (name.includes(":")) checkNames = name.split(":"); + else if (name.includes(".")) checkNames = name.split("."); + do { + const splitName = checkNames[index]; + if (splitName.length === 1) return; + const isIgnored = ignoreCheck(splitName); + const checkName = allowLeadingUnderscore && splitName.startsWith("_") ? splitName.slice(1) : splitName; + const isPascalCase = testPascalCase(checkName); + const isAllowedAllCaps = allowAllCaps && testAllCaps(checkName); + if (!isPascalCase && !isAllowedAllCaps && !isIgnored) { + const messageId = allowAllCaps ? "usePascalOrSnakeCase" : "usePascalCase"; + context.report({ + messageId, + node, + data: { name: splitName } + }); + break; + } + index += 1; + } while (index < checkNames.length && !allowNamespace); + } }; + } +}); +export { jsx_pascal_case_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-props-no-multi-spaces.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-props-no-multi-spaces.js new file mode 100644 index 0000000..bfefdaf --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-props-no-multi-spaces.js @@ -0,0 +1,86 @@ +import { createRule } from "../utils.js"; +const messages = { + noLineGap: "Expected no line gap between “{{prop1}}” and “{{prop2}}”", + onlyOneSpace: "Expected only one space between “{{prop1}}” and “{{prop2}}”" +}; +var jsx_props_no_multi_spaces_default = createRule({ + name: "jsx-props-no-multi-spaces", + meta: { + type: "layout", + docs: { description: "Disallow multiple spaces between inline JSX props. Deprecated, use `no-multi-spaces` rule instead." }, + deprecated: { + message: "The rule was replaced with a more general rule.", + deprecatedSince: "5.0.0", + replacedBy: [{ rule: { + name: "no-multi-spaces", + url: "https://eslint.style/rules/no-multi-spaces" + } }] + }, + fixable: "code", + messages, + schema: [] + }, + create(context) { + const sourceCode = context.sourceCode; + function getPropName(propNode) { + switch (propNode.type) { + case "JSXSpreadAttribute": return sourceCode.getText(propNode.argument); + case "JSXIdentifier": return propNode.name; + case "JSXMemberExpression": return `${getPropName(propNode.object)}.${propNode.property.name}`; + default: return propNode.name ? propNode.name.name : `${sourceCode.getText(propNode.object)}.${propNode.property.name}`; + } + } + function hasEmptyLines(first, second) { + const comments = sourceCode.getCommentsBefore ? sourceCode.getCommentsBefore(second) : []; + const nodes = [].concat(first, comments, second); + for (let i = 1; i < nodes.length; i += 1) { + const prev = nodes[i - 1]; + const curr = nodes[i]; + if (curr.loc.start.line - prev.loc.end.line >= 2) return true; + } + return false; + } + function checkSpacing(prev, node) { + if (hasEmptyLines(prev, node)) context.report({ + messageId: "noLineGap", + node, + data: { + prop1: getPropName(prev), + prop2: getPropName(node) + } + }); + if (prev.loc.end.line !== node.loc.end.line) return; + const between = sourceCode.text.slice(prev.range[1], node.range[0]); + if (between !== " ") context.report({ + node, + messageId: "onlyOneSpace", + data: { + prop1: getPropName(prev), + prop2: getPropName(node) + }, + fix(fixer) { + return fixer.replaceTextRange([prev.range[1], node.range[0]], " "); + } + }); + } + function containsGenericType(node) { + const containsTypeParams = typeof node.typeArguments !== "undefined"; + return containsTypeParams && node.typeArguments?.type === "TSTypeParameterInstantiation"; + } + function getGenericNode(node) { + const name = node.name; + if (containsGenericType(node)) { + const type = node.typeArguments; + return Object.assign({}, node, { range: [name.range[0], type?.range[1]] }); + } + return name; + } + return { JSXOpeningElement(node) { + node.attributes.reduce((prev, prop) => { + checkSpacing(prev, prop); + return prop; + }, getGenericNode(node)); + } }; + } +}); +export { jsx_props_no_multi_spaces_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-quotes.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-quotes.js new file mode 100644 index 0000000..7d78764 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-quotes.js @@ -0,0 +1,49 @@ +import { createRule, isStringLiteral, isSurroundedBy } from "../utils.js"; +const QUOTE_SETTINGS = { + "prefer-double": { + quote: "\"", + description: "singlequote", + convert(str) { + return str.replace(/'/gu, "\""); + } + }, + "prefer-single": { + quote: "'", + description: "doublequote", + convert(str) { + return str.replace(/"/gu, "'"); + } + } +}; +var jsx_quotes_default = createRule({ + name: "jsx-quotes", + meta: { + type: "layout", + docs: { description: "Enforce the consistent use of either double or single quotes in JSX attributes" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: ["prefer-single", "prefer-double"] + }], + messages: { unexpected: "Unexpected usage of {{description}}." } + }, + create(context) { + const quoteOption = context.options[0] || "prefer-double"; + const setting = QUOTE_SETTINGS[quoteOption]; + function usesExpectedQuotes(node) { + return node.value.includes(setting.quote) || isSurroundedBy(node.raw, setting.quote); + } + return { JSXAttribute(node) { + const attributeValue = node.value; + if (attributeValue && isStringLiteral(attributeValue) && !usesExpectedQuotes(attributeValue)) context.report({ + node: attributeValue, + messageId: "unexpected", + data: { description: setting.description }, + fix(fixer) { + return fixer.replaceText(attributeValue, setting.convert(attributeValue.raw)); + } + }); + } }; + } +}); +export { jsx_quotes_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-self-closing-comp.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-self-closing-comp.js new file mode 100644 index 0000000..6ec730c --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-self-closing-comp.js @@ -0,0 +1,59 @@ +import { createRule, isDOMComponent } from "../utils.js"; +const optionDefaults = { + component: true, + html: true +}; +const messages = { notSelfClosing: "Empty components are self-closing" }; +var jsx_self_closing_comp_default = createRule({ + name: "jsx-self-closing-comp", + meta: { + type: "layout", + docs: { description: "Disallow extra closing tags for components without children" }, + fixable: "code", + messages, + schema: [{ + type: "object", + properties: { + component: { + default: optionDefaults.component, + type: "boolean" + }, + html: { + default: optionDefaults.html, + type: "boolean" + } + }, + additionalProperties: false + }] + }, + create(context) { + function isComponent(node) { + return node.name && (node.name.type === "JSXIdentifier" || node.name.type === "JSXMemberExpression") && !isDOMComponent(node); + } + function childrenIsEmpty(node) { + return node.parent.children.length === 0; + } + function childrenIsMultilineSpaces(node) { + const childrens = node.parent.children; + return childrens.length === 1 && childrens[0].type === "JSXText" && childrens[0].value.includes("\n") && childrens[0].value.replace(/(?!\xA0)\s/g, "") === ""; + } + function isShouldBeSelfClosed(node) { + const configuration = Object.assign({}, optionDefaults, context.options[0]); + return (configuration.component && isComponent(node) || configuration.html && isDOMComponent(node)) && !node.selfClosing && (childrenIsEmpty(node) || childrenIsMultilineSpaces(node)); + } + return { JSXOpeningElement(node) { + if (!isShouldBeSelfClosed(node)) return; + context.report({ + messageId: "notSelfClosing", + node, + fix(fixer) { + const openingElementEnding = node.range[1] - 1; + const closingElementEnding = node.parent.closingElement?.range[1] ?? NaN; + const range = [openingElementEnding, closingElementEnding]; + return fixer.replaceTextRange(range, " />"); + } + }); + } }; + } +}); +export { jsx_self_closing_comp_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-sort-props.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-sort-props.js new file mode 100644 index 0000000..9fd9dc8 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-sort-props.js @@ -0,0 +1,372 @@ +import { createRule, getPropName, isDOMComponent, isSingleLine } from "../utils.js"; +function isCallbackPropName(name) { + return /^on[A-Z]/.test(name); +} +const messages = { + listIsEmpty: "A customized reserved first list must not be empty", + listReservedPropsFirst: "Reserved props must be listed before all other props", + listReservedPropsLast: "Reserved props must be listed after all other props", + listCallbacksLast: "Callbacks must be listed after all other props", + listShorthandFirst: "Shorthand props must be listed before all other props", + listShorthandLast: "Shorthand props must be listed after all other props", + listMultilineFirst: "Multiline props must be listed before all other props", + listMultilineLast: "Multiline props must be listed after all other props", + sortPropsByAlpha: "Props should be sorted alphabetically" +}; +const RESERVED_PROPS_LIST = [ + "children", + "dangerouslySetInnerHTML", + "key", + "ref" +]; +function getReservedPropIndex(name, list) { + return list.indexOf(name.split(":")[0]); +} +let attributeMap; +function shouldSortToEnd(node) { + const attr = attributeMap.get(node); + return !!attr && !!attr.hasComment; +} +function contextCompare(a, b, options) { + let aProp = getPropName(a); + let bProp = getPropName(b); + const aPropNamespace = aProp.split(":")[0]; + const bPropNamespace = bProp.split(":")[0]; + const aSortToEnd = shouldSortToEnd(a); + const bSortToEnd = shouldSortToEnd(b); + if (aSortToEnd && !bSortToEnd) return 1; + if (!aSortToEnd && bSortToEnd) return -1; + if (options.reservedFirst) { + const aIndex = getReservedPropIndex(aProp, options.reservedList); + const bIndex = getReservedPropIndex(bProp, options.reservedList); + if (aIndex > -1 && bIndex === -1) return -1; + if (aIndex === -1 && bIndex > -1) return 1; + if (aIndex > -1 && bIndex > -1 && aPropNamespace !== bPropNamespace) return aIndex > bIndex ? 1 : -1; + } + if (options.reservedLast.length > 0) { + const aLastIndex = getReservedPropIndex(aProp, options.reservedLast); + const bLastIndex = getReservedPropIndex(bProp, options.reservedLast); + if (aLastIndex > -1 && bLastIndex === -1) return 1; + if (aLastIndex === -1 && bLastIndex > -1) return -1; + if (aLastIndex > -1 && bLastIndex > -1 && aPropNamespace !== bPropNamespace) return aLastIndex > bLastIndex ? -1 : 1; + } + if (options.callbacksLast) { + const aIsCallback = isCallbackPropName(aProp); + const bIsCallback = isCallbackPropName(bProp); + if (aIsCallback && !bIsCallback) return 1; + if (!aIsCallback && bIsCallback) return -1; + } + if (options.shorthandFirst || options.shorthandLast) { + const shorthandSign = options.shorthandFirst ? -1 : 1; + if (!a.value && b.value) return shorthandSign; + if (a.value && !b.value) return -shorthandSign; + } + if (options.multiline !== "ignore") { + const multilineSign = options.multiline === "first" ? -1 : 1; + const aIsMultiline = !isSingleLine(a); + const bIsMultiline = !isSingleLine(b); + if (aIsMultiline && !bIsMultiline) return multilineSign; + if (!aIsMultiline && bIsMultiline) return -multilineSign; + } + if (options.noSortAlphabetically) return 0; + const actualLocale = options.locale === "auto" ? void 0 : options.locale; + if (options.ignoreCase) { + aProp = aProp.toLowerCase(); + bProp = bProp.toLowerCase(); + return aProp.localeCompare(bProp, actualLocale); + } + if (aProp === bProp) return 0; + if (options.locale === "auto") return aProp < bProp ? -1 : 1; + return aProp.localeCompare(bProp, actualLocale); +} +function getGroupsOfSortableAttributes(attributes, context) { + const sourceCode = context.sourceCode; + const sortableAttributeGroups = []; + let groupCount = 0; + function addtoSortableAttributeGroups(attribute) { + sortableAttributeGroups[groupCount - 1].push(attribute); + } + for (let i = 0; i < attributes.length; i++) { + const attribute = attributes[i]; + const nextAttribute = attributes[i + 1]; + const attributeline = attribute.loc.start.line; + let comment = []; + try { + comment = sourceCode.getCommentsAfter(attribute); + } catch {} + const lastAttr = attributes[i - 1]; + const attrIsSpread = attribute.type === "JSXSpreadAttribute"; + if (!lastAttr || lastAttr.type === "JSXSpreadAttribute" && !attrIsSpread) { + groupCount += 1; + sortableAttributeGroups[groupCount - 1] = []; + } + if (!attrIsSpread) if (comment.length === 0) { + attributeMap.set(attribute, { + end: attribute.range[1], + hasComment: false + }); + addtoSortableAttributeGroups(attribute); + } else { + const firstComment = comment[0]; + const commentline = firstComment.loc.start.line; + if (comment.length === 1) { + if (attributeline + 1 === commentline && nextAttribute) { + attributeMap.set(attribute, { + end: nextAttribute.range[1], + hasComment: true + }); + addtoSortableAttributeGroups(attribute); + i += 1; + } else if (attributeline === commentline) { + if (firstComment.type === "Block" && nextAttribute) { + attributeMap.set(attribute, { + end: nextAttribute.range[1], + hasComment: true + }); + i += 1; + } else if (firstComment.type === "Block") attributeMap.set(attribute, { + end: firstComment.range[1], + hasComment: true + }); + else attributeMap.set(attribute, { + end: firstComment.range[1], + hasComment: false + }); + addtoSortableAttributeGroups(attribute); + } + } else if (comment.length > 1 && attributeline + 1 === comment[1].loc.start.line && nextAttribute) { + const commentNextAttribute = sourceCode.getCommentsAfter(nextAttribute); + attributeMap.set(attribute, { + end: nextAttribute.range[1], + hasComment: true + }); + if (commentNextAttribute.length === 1 && nextAttribute.loc.start.line === commentNextAttribute[0].loc.start.line) attributeMap.set(attribute, { + end: commentNextAttribute[0].range[1], + hasComment: true + }); + addtoSortableAttributeGroups(attribute); + i += 1; + } + } + } + return sortableAttributeGroups; +} +function generateFixerFunction(node, context, reservedList) { + const sourceCode = context.sourceCode; + const attributes = node.attributes.slice(0); + const configuration = context.options[0] || {}; + const ignoreCase = configuration.ignoreCase || false; + const callbacksLast = configuration.callbacksLast || false; + const shorthandFirst = configuration.shorthandFirst || false; + const shorthandLast = configuration.shorthandLast || false; + const multiline = configuration.multiline || "ignore"; + const noSortAlphabetically = configuration.noSortAlphabetically || false; + const reservedFirst = configuration.reservedFirst || false; + const reservedLast = configuration.reservedLast || []; + const locale = configuration.locale || "auto"; + const options = { + ignoreCase, + callbacksLast, + shorthandFirst, + shorthandLast, + multiline, + noSortAlphabetically, + reservedFirst, + reservedList, + reservedLast, + locale + }; + const sortableAttributeGroups = getGroupsOfSortableAttributes(attributes, context); + const sortedAttributeGroups = sortableAttributeGroups.slice(0).map((group) => [...group].sort((a, b) => contextCompare(a, b, options))); + return function fixFunction(fixer) { + const fixers = []; + let source = sourceCode.getText(); + sortableAttributeGroups.forEach((sortableGroup, ii) => { + sortableGroup.forEach((attr, jj) => { + const sortedAttr = sortedAttributeGroups[ii][jj]; + const sortedAttrText = source.slice(sortedAttr.range[0], attributeMap.get(sortedAttr).end); + fixers.push({ + range: [attr.range[0], attributeMap.get(attr).end], + text: sortedAttrText + }); + }); + }); + fixers.sort((a, b) => b.range[0] - a.range[0]); + const firstFixer = fixers[0]; + const lastFixer = fixers[fixers.length - 1]; + const rangeStart = lastFixer ? lastFixer.range[0] : 0; + const rangeEnd = firstFixer ? firstFixer.range[1] : -0; + fixers.forEach((fix) => { + source = `${source.slice(0, fix.range[0])}${fix.text}${source.slice(fix.range[1])}`; + }); + return fixer.replaceTextRange([rangeStart, rangeEnd], source.slice(rangeStart, rangeEnd)); + }; +} +function validateReservedFirstConfig(context, reservedFirst) { + if (reservedFirst) { + if (Array.isArray(reservedFirst)) { + if (reservedFirst.length === 0) return function Report(decl) { + context.report({ + node: decl, + messageId: "listIsEmpty" + }); + }; + } + } +} +const reportedNodeAttributes = /* @__PURE__ */ new WeakMap(); +function reportNodeAttribute(nodeAttribute, errorType, node, context, reservedList) { + const errors = reportedNodeAttributes.get(nodeAttribute) || []; + if (errors.includes(errorType)) return; + errors.push(errorType); + reportedNodeAttributes.set(nodeAttribute, errors); + context.report({ + node: nodeAttribute.name ?? "", + messageId: errorType, + fix: generateFixerFunction(node, context, reservedList) + }); +} +var jsx_sort_props_default = createRule({ + name: "jsx-sort-props", + meta: { + type: "layout", + docs: { description: "Enforce props alphabetical sorting" }, + fixable: "code", + messages, + schema: [{ + type: "object", + properties: { + callbacksLast: { type: "boolean" }, + shorthandFirst: { type: "boolean" }, + shorthandLast: { type: "boolean" }, + multiline: { + type: "string", + enum: [ + "ignore", + "first", + "last" + ], + default: "ignore" + }, + ignoreCase: { type: "boolean" }, + noSortAlphabetically: { type: "boolean" }, + reservedFirst: { oneOf: [{ + type: "array", + items: { type: "string" } + }, { type: "boolean" }] }, + reservedLast: { + type: "array", + items: { type: "string" } + }, + locale: { + type: "string", + default: "auto" + } + }, + additionalProperties: false + }] + }, + create(context) { + const configuration = context.options[0] || {}; + const ignoreCase = configuration.ignoreCase || false; + const callbacksLast = configuration.callbacksLast || false; + const shorthandFirst = configuration.shorthandFirst || false; + const shorthandLast = configuration.shorthandLast || false; + const multiline = configuration.multiline || "ignore"; + const noSortAlphabetically = configuration.noSortAlphabetically || false; + const reservedFirst = configuration.reservedFirst || false; + const reservedFirstError = validateReservedFirstConfig(context, reservedFirst); + const reservedList = Array.isArray(reservedFirst) ? reservedFirst : RESERVED_PROPS_LIST; + const reservedLastList = configuration.reservedLast || []; + const locale = configuration.locale || "auto"; + return { + Program() { + attributeMap = /* @__PURE__ */ new WeakMap(); + }, + JSXOpeningElement(node) { + const nodeReservedList = reservedFirst && !isDOMComponent(node) ? reservedList.filter((prop) => prop !== "dangerouslySetInnerHTML") : reservedList; + node.attributes.reduce((memo, decl, idx, attrs) => { + if (decl.type === "JSXSpreadAttribute") return attrs[idx + 1]; + let previousPropName = getPropName(memo); + let currentPropName = getPropName(decl); + const previousReservedNamespace = previousPropName.split(":")[0]; + const currentReservedNamespace = currentPropName.split(":")[0]; + const previousValue = memo.value; + const currentValue = decl.value; + const previousIsCallback = isCallbackPropName(previousPropName); + const currentIsCallback = isCallbackPropName(currentPropName); + if (ignoreCase) { + previousPropName = previousPropName.toLowerCase(); + currentPropName = currentPropName.toLowerCase(); + } + if (reservedFirst) { + if (reservedFirstError) { + reservedFirstError(decl); + return memo; + } + const previousReservedIndex = getReservedPropIndex(previousPropName, nodeReservedList); + const currentReservedIndex = getReservedPropIndex(currentPropName, nodeReservedList); + if (previousReservedIndex > -1 && currentReservedIndex === -1) return decl; + if (reservedFirst !== true && previousReservedIndex > currentReservedIndex || previousReservedIndex === -1 && currentReservedIndex > -1) { + reportNodeAttribute(decl, "listReservedPropsFirst", node, context, nodeReservedList); + return memo; + } + if (previousReservedIndex > -1 && currentReservedIndex > -1 && currentReservedIndex > previousReservedIndex && previousReservedNamespace !== currentReservedNamespace) return decl; + } + if (reservedLastList.length > 0) { + const previousReservedIndex = getReservedPropIndex(previousPropName, reservedLastList); + const currentReservedIndex = getReservedPropIndex(currentPropName, reservedLastList); + if (previousReservedIndex === -1 && currentReservedIndex > -1) return decl; + if (previousReservedIndex < currentReservedIndex || previousReservedIndex > -1 && currentReservedIndex === -1) { + reportNodeAttribute(decl, "listReservedPropsLast", node, context, nodeReservedList); + return memo; + } + if (previousReservedIndex > -1 && currentReservedIndex > -1 && currentReservedIndex > previousReservedIndex && previousReservedNamespace !== currentReservedNamespace) return decl; + } + if (callbacksLast) { + if (!previousIsCallback && currentIsCallback) return decl; + if (previousIsCallback && !currentIsCallback) { + reportNodeAttribute(memo, "listCallbacksLast", node, context, nodeReservedList); + return memo; + } + } + if (shorthandFirst) { + if (currentValue && !previousValue) return decl; + if (!currentValue && previousValue) { + reportNodeAttribute(decl, "listShorthandFirst", node, context, nodeReservedList); + return memo; + } + } + if (shorthandLast) { + if (!currentValue && previousValue) return decl; + if (currentValue && !previousValue) { + reportNodeAttribute(memo, "listShorthandLast", node, context, nodeReservedList); + return memo; + } + } + const previousIsMultiline = !isSingleLine(memo); + const currentIsMultiline = !isSingleLine(decl); + if (multiline === "first") { + if (previousIsMultiline && !currentIsMultiline) return decl; + if (!previousIsMultiline && currentIsMultiline) { + reportNodeAttribute(decl, "listMultilineFirst", node, context, nodeReservedList); + return memo; + } + } else if (multiline === "last") { + if (!previousIsMultiline && currentIsMultiline) return decl; + if (previousIsMultiline && !currentIsMultiline) { + reportNodeAttribute(memo, "listMultilineLast", node, context, nodeReservedList); + return memo; + } + } + if (!noSortAlphabetically && (ignoreCase || locale !== "auto" ? previousPropName.localeCompare(currentPropName, locale === "auto" ? void 0 : locale) > 0 : previousPropName > currentPropName)) { + reportNodeAttribute(decl, "sortPropsByAlpha", node, context, nodeReservedList); + return memo; + } + return decl; + }, node.attributes[0]); + } + }; + } +}); +export { jsx_sort_props_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-tag-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-tag-spacing.js new file mode 100644 index 0000000..8c096db --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/jsx-tag-spacing.js @@ -0,0 +1,269 @@ +import { ast_exports, createRule, getTokenBeforeClosingBracket, isSingleLine } from "../utils.js"; +const messages = { + selfCloseSlashNoSpace: "Whitespace is forbidden between `/` and `>`; write `/>`", + selfCloseSlashNeedSpace: "Whitespace is required between `/` and `>`; write `/ >`", + closeSlashNoSpace: "Whitespace is forbidden between `<` and `/`; write ` fixer.replaceText(node, `(${sourceCode.getText(node)})`) + }); + if (option === "parens-new-line" && !isSingleLine(node)) if (!(0, ast_exports.isParenthesized)(node, context.sourceCode)) { + const tokenBefore = sourceCode.getTokenBefore(node); + const tokenAfter = sourceCode.getTokenAfter(node); + const start = node.loc.start; + if (tokenBefore.loc.end.line < start.line) { + const textBefore = sourceCode.getText().slice(tokenBefore.range[1], node.range[0]).trim(); + const isTab = /^\t/.test(sourceCode.lines[start.line - 1]); + const INDENT = isTab ? " " : " "; + const indentBefore = INDENT.repeat(start.column); + const indentAfter = INDENT.repeat(Math.max(0, start.column - (isTab ? 1 : 2))); + context.report({ + node, + messageId: "missingParens", + fix: (fixer) => fixer.replaceTextRange([tokenBefore.range[0], tokenAfter && (tokenAfter.value === ";" || tokenAfter.value === "}") ? tokenAfter.range[0] : node.range[1]], `${trimTokenBeforeNewline(tokenBefore)}(\n${indentBefore}${textBefore}${textBefore.length > 0 ? `\n${indentBefore}` : ""}${sourceCode.getText(node)}\n${indentAfter})`) + }); + } else context.report({ + node, + messageId: "missingParens", + fix: (fixer) => fixer.replaceText(node, `(\n${sourceCode.getText(node)}\n)`) + }); + } else { + const needsOpening = needsOpeningNewLine(node); + const needsClosing = needsClosingNewLine(node); + if (needsOpening || needsClosing) context.report({ + node, + messageId: "parensOnNewLines", + fix: (fixer) => { + const text = sourceCode.getText(node); + let fixed = text; + if (needsOpening) fixed = `\n${fixed}`; + if (needsClosing) fixed = `${fixed}\n`; + return fixer.replaceText(node, fixed); + } + }); + } + } + return { + VariableDeclarator(node) { + const type = "declaration"; + if (!isEnabled(type)) return; + if (!isEnabled("condition") && node.init && node.init.type === "ConditionalExpression") { + check(node.init.consequent, type); + check(node.init.alternate, type); + return; + } + check(node.init, type); + }, + AssignmentExpression(node) { + const type = "assignment"; + if (!isEnabled(type)) return; + if (!isEnabled("condition") && node.right.type === "ConditionalExpression") { + check(node.right.consequent, type); + check(node.right.alternate, type); + return; + } + check(node.right, type); + }, + ReturnStatement(node) { + const type = "return"; + if (isEnabled(type)) check(node.argument, type); + }, + "ArrowFunctionExpression:exit": (node) => { + const arrowBody = node.body; + const type = "arrow"; + if (isEnabled(type) && arrowBody.type !== "BlockStatement") check(arrowBody, type); + }, + ConditionalExpression(node) { + const type = "condition"; + if (isEnabled(type)) { + check(node.consequent, type); + check(node.alternate, type); + } + }, + LogicalExpression(node) { + const type = "logical"; + if (isEnabled(type)) check(node.right, type); + }, + JSXAttribute(node) { + const type = "prop"; + if (isEnabled(type) && node.value && node.value.type === "JSXExpressionContainer") check(node.value.expression, type); + }, + ObjectExpression(node) { + const type = "propertyValue"; + if (isEnabled(type)) node.properties.forEach((property) => { + if (property.type === "Property" && property.value.type === "JSXElement") check(property.value, type); + }); + } + }; + } +}); +export { jsx_wrap_multilines_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/key-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/key-spacing.js new file mode 100644 index 0000000..4f0a1bf --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/key-spacing.js @@ -0,0 +1,553 @@ +import { AST_NODE_TYPES, ast_exports, createRule, getStaticPropertyName, getStringLength, isSingleLine } from "../utils.js"; +const listeningNodes = [ + "ObjectExpression", + "ObjectPattern", + "ImportDeclaration", + "ExportNamedDeclaration", + "ExportAllDeclaration", + "TSTypeLiteral", + "TSInterfaceBody", + "ClassBody" +]; +function initOptionProperty(toOptions, fromOptions) { + toOptions.mode = fromOptions.mode || "strict"; + if (typeof fromOptions.beforeColon !== "undefined") toOptions.beforeColon = +fromOptions.beforeColon; + else toOptions.beforeColon = 0; + if (typeof fromOptions.afterColon !== "undefined") toOptions.afterColon = +fromOptions.afterColon; + else toOptions.afterColon = 1; + if (typeof fromOptions.align !== "undefined") if (typeof fromOptions.align === "object") toOptions.align = fromOptions.align; + else toOptions.align = { + on: fromOptions.align, + mode: toOptions.mode, + beforeColon: toOptions.beforeColon, + afterColon: toOptions.afterColon + }; + return toOptions; +} +function initOptions(toOptions, fromOptions) { + if (typeof fromOptions.align === "object") { + toOptions.align = initOptionProperty({}, fromOptions.align); + toOptions.align.on = fromOptions.align.on || "colon"; + toOptions.align.mode = fromOptions.align.mode || "strict"; + toOptions.multiLine = initOptionProperty({}, fromOptions.multiLine || fromOptions); + toOptions.singleLine = initOptionProperty({}, fromOptions.singleLine || fromOptions); + } else { + toOptions.multiLine = initOptionProperty({}, fromOptions.multiLine || fromOptions); + toOptions.singleLine = initOptionProperty({}, fromOptions.singleLine || fromOptions); + if (toOptions.multiLine.align) toOptions.align = { + on: toOptions.multiLine.align.on, + mode: toOptions.multiLine.align.mode || toOptions.multiLine.mode, + beforeColon: toOptions.multiLine.align.beforeColon, + afterColon: toOptions.multiLine.align.afterColon + }; + } + toOptions.ignoredNodes = fromOptions.ignoredNodes || []; + return toOptions; +} +var key_spacing_default = createRule({ + name: "key-spacing", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing between property names and type annotations in types and interfaces" }, + fixable: "whitespace", + schema: [{ anyOf: [ + { + type: "object", + properties: { + align: { anyOf: [{ + type: "string", + enum: ["colon", "value"] + }, { + type: "object", + properties: { + mode: { + type: "string", + enum: ["strict", "minimum"] + }, + on: { + type: "string", + enum: ["colon", "value"] + }, + beforeColon: { type: "boolean" }, + afterColon: { type: "boolean" } + }, + additionalProperties: false + }] }, + mode: { + type: "string", + enum: ["strict", "minimum"] + }, + beforeColon: { type: "boolean" }, + afterColon: { type: "boolean" }, + ignoredNodes: { + type: "array", + items: { + type: "string", + enum: listeningNodes + } + } + }, + additionalProperties: false + }, + { + type: "object", + properties: { + singleLine: { + type: "object", + properties: { + mode: { + type: "string", + enum: ["strict", "minimum"] + }, + beforeColon: { type: "boolean" }, + afterColon: { type: "boolean" } + }, + additionalProperties: false + }, + multiLine: { + type: "object", + properties: { + align: { anyOf: [{ + type: "string", + enum: ["colon", "value"] + }, { + type: "object", + properties: { + mode: { + type: "string", + enum: ["strict", "minimum"] + }, + on: { + type: "string", + enum: ["colon", "value"] + }, + beforeColon: { type: "boolean" }, + afterColon: { type: "boolean" } + }, + additionalProperties: false + }] }, + mode: { + type: "string", + enum: ["strict", "minimum"] + }, + beforeColon: { type: "boolean" }, + afterColon: { type: "boolean" } + }, + additionalProperties: false + } + }, + additionalProperties: false + }, + { + type: "object", + properties: { + singleLine: { + type: "object", + properties: { + mode: { + type: "string", + enum: ["strict", "minimum"] + }, + beforeColon: { type: "boolean" }, + afterColon: { type: "boolean" } + }, + additionalProperties: false + }, + multiLine: { + type: "object", + properties: { + mode: { + type: "string", + enum: ["strict", "minimum"] + }, + beforeColon: { type: "boolean" }, + afterColon: { type: "boolean" } + }, + additionalProperties: false + }, + align: { + type: "object", + properties: { + mode: { + type: "string", + enum: ["strict", "minimum"] + }, + on: { + type: "string", + enum: ["colon", "value"] + }, + beforeColon: { type: "boolean" }, + afterColon: { type: "boolean" } + }, + additionalProperties: false + } + }, + additionalProperties: false + } + ] }], + messages: { + extraKey: "Extra space after {{computed}}key '{{key}}'.", + extraValue: "Extra space before value for {{computed}}key '{{key}}'.", + missingKey: "Missing space after {{computed}}key '{{key}}'.", + missingValue: "Missing space before value for {{computed}}key '{{key}}'." + } + }, + defaultOptions: [{}], + create(context, [_options]) { + const options = _options || {}; + const ruleOptions = initOptions({}, options); + const multiLineOptions = ruleOptions.multiLine; + const singleLineOptions = ruleOptions.singleLine; + const alignmentOptions = ruleOptions.align || null; + const ignoredNodes = ruleOptions.ignoredNodes; + const sourceCode = context.sourceCode; + function containsLineTerminator(str) { + return ast_exports.LINEBREAK_MATCHER.test(str); + } + function isSingleLineImportAttributes(node, sourceCode$1) { + if (node.type === "TSImportType") { + if ("options" in node && node.options) return isSingleLine(node.options); + return false; + } + const openingBrace = sourceCode$1.getTokenBefore(node.attributes[0], ast_exports.isOpeningBraceToken); + const closingBrace = sourceCode$1.getTokenAfter(node.attributes[node.attributes.length - 1], ast_exports.isClosingBraceToken); + return (0, ast_exports.isTokenOnSameLine)(closingBrace, openingBrace); + } + function isSingleLineProperties(properties) { + const [firstProp] = properties; + const lastProp = properties.at(-1); + return (0, ast_exports.isTokenOnSameLine)(lastProp, firstProp); + } + function isKeyValueProperty(property) { + if (property.type === "ImportAttribute") return true; + return !("method" in property && property.method || "shorthand" in property && property.shorthand || "kind" in property && property.kind !== "init" || property.type !== "Property"); + } + function getNextColon(node) { + return sourceCode.getTokenAfter(node, ast_exports.isColonToken); + } + function getLastTokenBeforeColon(node) { + const colonToken = getNextColon(node); + return sourceCode.getTokenBefore(colonToken); + } + function getFirstTokenAfterColon(node) { + const colonToken = getNextColon(node); + return sourceCode.getTokenAfter(colonToken); + } + function continuesPropertyGroup(lastMember, candidate) { + const groupEndLine = lastMember.loc.start.line; + const candidateValueStartLine = (isKeyValueProperty(candidate) ? getFirstTokenAfterColon(candidate.key) : candidate).loc.start.line; + if (candidateValueStartLine - groupEndLine <= 1) return true; + const leadingComments = sourceCode.getCommentsBefore(candidate); + if (leadingComments.length && leadingComments[0].loc.start.line - groupEndLine <= 1 && candidateValueStartLine - leadingComments.at(-1).loc.end.line <= 1) { + for (let i = 1; i < leadingComments.length; i++) if (leadingComments[i].loc.start.line - leadingComments[i - 1].loc.end.line > 1) return false; + return true; + } + return false; + } + function getKey(property) { + const key = property.key; + if (property.type !== "ImportAttribute" && property.computed) return sourceCode.getText().slice(key.range[0], key.range[1]); + return getStaticPropertyName(property); + } + function report(property, side, whitespace, expected, mode) { + const diff = whitespace.length - expected; + if ((diff && mode === "strict" || diff < 0 && mode === "minimum" || diff > 0 && !expected && mode === "minimum") && !(expected && containsLineTerminator(whitespace))) { + const nextColon = getNextColon(property.key); + const tokenBeforeColon = sourceCode.getTokenBefore(nextColon, { includeComments: true }); + const tokenAfterColon = sourceCode.getTokenAfter(nextColon, { includeComments: true }); + const isKeySide = side === "key"; + const isExtra = diff > 0; + const diffAbs = Math.abs(diff); + const spaces = new Array(diffAbs + 1).join(" "); + const locStart = isKeySide ? tokenBeforeColon.loc.end : nextColon.loc.start; + const locEnd = isKeySide ? nextColon.loc.start : tokenAfterColon.loc.start; + const missingLoc = isKeySide ? tokenBeforeColon.loc : tokenAfterColon.loc; + const loc = isExtra ? { + start: locStart, + end: locEnd + } : missingLoc; + let fix; + if (isExtra) { + let range; + if (isKeySide) range = [tokenBeforeColon.range[1], tokenBeforeColon.range[1] + diffAbs]; + else range = [tokenAfterColon.range[0] - diffAbs, tokenAfterColon.range[0]]; + fix = function(fixer) { + return fixer.removeRange(range); + }; + } else if (isKeySide) fix = function(fixer) { + return fixer.insertTextAfter(tokenBeforeColon, spaces); + }; + else fix = function(fixer) { + return fixer.insertTextBefore(tokenAfterColon, spaces); + }; + let messageId; + if (isExtra) messageId = side === "key" ? "extraKey" : "extraValue"; + else messageId = side === "key" ? "missingKey" : "missingValue"; + context.report({ + node: property[side], + loc, + messageId, + data: { + computed: property.type !== "ImportAttribute" && property.computed ? "computed " : "", + key: getKey(property) + }, + fix + }); + } + } + function getKeyWidth(property) { + const startToken = sourceCode.getFirstToken(property); + const endToken = getLastTokenBeforeColon(property.key); + return getStringLength(sourceCode.getText().slice(startToken.range[0], endToken.range[1])); + } + function getPropertyWhitespace(property) { + const whitespace = /(\s*):(\s*)/u.exec(sourceCode.getText().slice(property.key.range[1], property.value.range[0])); + if (whitespace) return { + beforeColon: whitespace[1], + afterColon: whitespace[2] + }; + return null; + } + function createGroups(properties) { + if (properties.length === 1) return [properties]; + return properties.reduce((groups, property) => { + const currentGroup = groups.at(-1); + const prev = currentGroup.at(-1); + if (!prev || continuesPropertyGroup(prev, property)) currentGroup.push(property); + else groups.push([property]); + return groups; + }, [[]]); + } + function verifyGroupAlignment(properties) { + const length = properties.length; + const widths = properties.map(getKeyWidth); + const align = alignmentOptions.on; + let targetWidth = Math.max(...widths); + let beforeColon; + let afterColon; + let mode; + if (alignmentOptions && length > 1) { + beforeColon = alignmentOptions.beforeColon; + afterColon = alignmentOptions.afterColon; + mode = alignmentOptions.mode; + } else { + beforeColon = multiLineOptions.beforeColon; + afterColon = multiLineOptions.afterColon; + mode = alignmentOptions.mode; + } + targetWidth += align === "colon" ? beforeColon : afterColon; + for (let i = 0; i < length; i++) { + const property = properties[i]; + const whitespace = getPropertyWhitespace(property); + if (whitespace) { + const width = widths[i]; + if (align === "value") { + report(property, "key", whitespace.beforeColon, beforeColon, mode); + report(property, "value", whitespace.afterColon, targetWidth - width, mode); + } else { + report(property, "key", whitespace.beforeColon, targetWidth - width, mode); + report(property, "value", whitespace.afterColon, afterColon, mode); + } + } + } + } + function verifySpacing(node, lineOptions) { + if (ignoredNodes.includes(node.parent.type)) return; + const actual = getPropertyWhitespace(node); + if (actual) { + report(node, "key", actual.beforeColon, lineOptions.beforeColon, lineOptions.mode); + report(node, "value", actual.afterColon, lineOptions.afterColon, lineOptions.mode); + } + } + function verifyListSpacing(properties, lineOptions) { + const length = properties.length; + for (let i = 0; i < length; i++) verifySpacing(properties[i], lineOptions); + } + function verifyAlignment(properties) { + createGroups(properties).forEach((group) => { + const properties$1 = group.filter(isKeyValueProperty); + if (properties$1.length > 0 && isSingleLineProperties(properties$1)) verifyListSpacing(properties$1, multiLineOptions); + else verifyGroupAlignment(properties$1); + }); + } + function verifyImportAttributes(node) { + if (ignoredNodes.includes(node.type)) return; + if (!node.attributes) return; + if (!node.attributes.length) return; + if (isSingleLineImportAttributes(node, sourceCode)) verifyListSpacing(node.attributes, singleLineOptions); + else verifyAlignment(node.attributes); + } + const baseRules = alignmentOptions ? { + ObjectExpression(node) { + if (ignoredNodes.includes(node.type)) return; + if (isSingleLine(node)) verifyListSpacing(node.properties.filter(isKeyValueProperty), singleLineOptions); + else verifyAlignment(node.properties); + }, + ImportDeclaration(node) { + verifyImportAttributes(node); + }, + ExportNamedDeclaration(node) { + verifyImportAttributes(node); + }, + ExportAllDeclaration(node) { + verifyImportAttributes(node); + } + } : { + Property(node) { + verifySpacing(node, isSingleLine(node.parent) ? singleLineOptions : multiLineOptions); + }, + ImportAttribute(node) { + const parent = node.parent; + verifySpacing(node, isSingleLineImportAttributes(parent, sourceCode) ? singleLineOptions : multiLineOptions); + } + }; + function adjustedColumn(position) { + const line = position.line - 1; + return getStringLength(sourceCode.lines.at(line).slice(0, position.column)); + } + function isKeyTypeNode(node) { + return (node.type === AST_NODE_TYPES.TSPropertySignature || node.type === AST_NODE_TYPES.TSIndexSignature || node.type === AST_NODE_TYPES.PropertyDefinition) && !!node.typeAnnotation; + } + function isApplicable(node) { + return isKeyTypeNode(node) && (0, ast_exports.isTokenOnSameLine)(node, node.typeAnnotation); + } + function getKeyText(node) { + if (node.type !== AST_NODE_TYPES.TSIndexSignature) return sourceCode.getText(node.key); + const code = sourceCode.getText(node); + return code.slice(0, sourceCode.getTokenAfter(node.parameters.at(-1), ast_exports.isClosingBracketToken).range[1] - node.range[0]); + } + function getKeyLocEnd(node) { + return getLastTokenBeforeColon(node.type !== AST_NODE_TYPES.TSIndexSignature ? node.key : node.parameters.at(-1)).loc.end; + } + function checkBeforeColon(node, expectedWhitespaceBeforeColon, mode) { + const { typeAnnotation } = node; + const colon = typeAnnotation.loc.start.column; + const keyEnd = getKeyLocEnd(node); + const difference = colon - keyEnd.column - expectedWhitespaceBeforeColon; + if (mode === "strict" ? difference : difference < 0) context.report({ + node, + messageId: difference > 0 ? "extraKey" : "missingKey", + fix: (fixer) => { + if (difference > 0) return fixer.removeRange([typeAnnotation.range[0] - difference, typeAnnotation.range[0]]); + return fixer.insertTextBefore(typeAnnotation, " ".repeat(-difference)); + }, + data: { + computed: "", + key: getKeyText(node) + } + }); + } + function checkAfterColon(node, expectedWhitespaceAfterColon, mode) { + const { typeAnnotation } = node; + const colonToken = sourceCode.getFirstToken(typeAnnotation); + const typeStart = sourceCode.getTokenAfter(colonToken, { includeComments: true }).loc.start.column; + const difference = typeStart - colonToken.loc.start.column - 1 - expectedWhitespaceAfterColon; + if (mode === "strict" ? difference : difference < 0) context.report({ + node, + messageId: difference > 0 ? "extraValue" : "missingValue", + fix: (fixer) => { + if (difference > 0) return fixer.removeRange([colonToken.range[1], colonToken.range[1] + difference]); + return fixer.insertTextAfter(colonToken, " ".repeat(-difference)); + }, + data: { + computed: "", + key: getKeyText(node) + } + }); + } + function continuesAlignGroup(lastMember, candidate) { + const groupEndLine = lastMember.loc.start.line; + const candidateValueStartLine = (isKeyTypeNode(candidate) ? candidate.typeAnnotation : candidate).loc.start.line; + if (candidateValueStartLine === groupEndLine) return false; + if (candidateValueStartLine - groupEndLine === 1) return true; + const leadingComments = sourceCode.getCommentsBefore(candidate); + if (leadingComments.length && leadingComments[0].loc.start.line - groupEndLine <= 1 && candidateValueStartLine - leadingComments.at(-1).loc.end.line <= 1) { + for (let i = 1; i < leadingComments.length; i++) if (leadingComments[i].loc.start.line - leadingComments[i - 1].loc.end.line > 1) return false; + return true; + } + return false; + } + function checkAlignGroup(group) { + let alignColumn = 0; + const align = (typeof options.align === "object" ? options.align.on : typeof options.multiLine?.align === "object" ? options.multiLine.align.on : options.multiLine?.align ?? options.align) ?? "colon"; + const beforeColon = (typeof options.align === "object" ? options.align.beforeColon : options.multiLine ? typeof options.multiLine.align === "object" ? options.multiLine.align.beforeColon : options.multiLine.beforeColon : options.beforeColon) ?? false; + const expectedWhitespaceBeforeColon = beforeColon ? 1 : 0; + const afterColon = (typeof options.align === "object" ? options.align.afterColon : options.multiLine ? typeof options.multiLine.align === "object" ? options.multiLine.align.afterColon : options.multiLine.afterColon : options.afterColon) ?? true; + const expectedWhitespaceAfterColon = afterColon ? 1 : 0; + const mode = (typeof options.align === "object" ? options.align.mode : options.multiLine ? typeof options.multiLine.align === "object" ? options.multiLine.align.mode ?? options.multiLine.mode : options.multiLine.mode : options.mode) ?? "strict"; + for (const node of group) if (isKeyTypeNode(node)) { + const keyEnd = adjustedColumn(getKeyLocEnd(node)); + alignColumn = Math.max(alignColumn, align === "colon" ? keyEnd + expectedWhitespaceBeforeColon : keyEnd + 1 + expectedWhitespaceAfterColon + expectedWhitespaceBeforeColon); + } + for (const node of group) { + if (!isApplicable(node)) continue; + const { typeAnnotation } = node; + const toCheck = align === "colon" ? typeAnnotation : typeAnnotation.typeAnnotation; + const difference = adjustedColumn(toCheck.loc.start) - alignColumn; + if (difference) context.report({ + node, + messageId: difference > 0 ? align === "colon" ? "extraKey" : "extraValue" : align === "colon" ? "missingKey" : "missingValue", + fix: (fixer) => { + if (difference > 0) return fixer.removeRange([toCheck.range[0] - difference, toCheck.range[0]]); + return fixer.insertTextBefore(toCheck, " ".repeat(-difference)); + }, + data: { + computed: "", + key: getKeyText(node) + } + }); + if (align === "colon") checkAfterColon(node, expectedWhitespaceAfterColon, mode); + else checkBeforeColon(node, expectedWhitespaceBeforeColon, mode); + } + } + function checkIndividualNode(node, { singleLine }) { + const beforeColon = (singleLine ? options.singleLine ? options.singleLine.beforeColon : options.beforeColon : options.multiLine ? options.multiLine.beforeColon : options.beforeColon) ?? false; + const expectedWhitespaceBeforeColon = beforeColon ? 1 : 0; + const afterColon = (singleLine ? options.singleLine ? options.singleLine.afterColon : options.afterColon : options.multiLine ? options.multiLine.afterColon : options.afterColon) ?? true; + const expectedWhitespaceAfterColon = afterColon ? 1 : 0; + const mode = (singleLine ? options.singleLine ? options.singleLine.mode : options.mode : options.multiLine ? options.multiLine.mode : options.mode) ?? "strict"; + if (isApplicable(node)) { + checkBeforeColon(node, expectedWhitespaceBeforeColon, mode); + checkAfterColon(node, expectedWhitespaceAfterColon, mode); + } + } + function validateBody(body) { + if (ignoredNodes.includes(body.type)) return; + const members = body.type === AST_NODE_TYPES.TSTypeLiteral ? body.members : body.body; + let alignGroups = []; + let unalignedElements = []; + if (options.align || options.multiLine?.align) { + let currentAlignGroup = []; + alignGroups.push(currentAlignGroup); + let prevNode; + for (const node of members) { + let prevAlignedNode = currentAlignGroup.at(-1); + if (prevAlignedNode !== prevNode) prevAlignedNode = void 0; + if (prevAlignedNode && continuesAlignGroup(prevAlignedNode, node)) currentAlignGroup.push(node); + else if (prevNode?.loc.start.line === node.loc.start.line) { + if (prevAlignedNode) { + unalignedElements.push(prevAlignedNode); + currentAlignGroup.pop(); + } + unalignedElements.push(node); + } else { + currentAlignGroup = [node]; + alignGroups.push(currentAlignGroup); + } + prevNode = node; + } + unalignedElements = unalignedElements.concat(...alignGroups.filter((group) => group.length === 1)); + alignGroups = alignGroups.filter((group) => group.length >= 2); + } else unalignedElements = members; + for (const group of alignGroups) checkAlignGroup(group); + for (const node of unalignedElements) checkIndividualNode(node, { singleLine: isSingleLine(body) }); + } + return { + ...baseRules, + TSTypeLiteral: validateBody, + TSInterfaceBody: validateBody, + ClassBody: validateBody + }; + } +}); +export { key_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/keyword-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/keyword-spacing.js new file mode 100644 index 0000000..3c1d3c8 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/keyword-spacing.js @@ -0,0 +1,324 @@ +import { AST_NODE_TYPES, KEYWORDS, ast_exports, createRule, isKeywordToken } from "../utils.js"; +const PREV_TOKEN = /^[)\]}>]$/u; +const NEXT_TOKEN = /^(?:[([{<~!]|\+\+?|--?)$/u; +const PREV_TOKEN_M = /^[)\]}>*]$/u; +const NEXT_TOKEN_M = /^[{*]$/u; +const TEMPLATE_OPEN_PAREN = /\$\{$/u; +const TEMPLATE_CLOSE_PAREN = /^\}/u; +const CHECK_TYPE = /^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u; +var keyword_spacing_default = createRule({ + name: "keyword-spacing", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing before and after keywords" }, + fixable: "whitespace", + schema: [{ + type: "object", + properties: { + before: { + type: "boolean", + default: true + }, + after: { + type: "boolean", + default: true + }, + overrides: { + type: "object", + properties: KEYWORDS.reduce((retv, key) => { + retv[key] = { + type: "object", + properties: { + before: { type: "boolean" }, + after: { type: "boolean" } + }, + additionalProperties: false + }; + return retv; + }, {}), + additionalProperties: false + } + }, + additionalProperties: false + }], + messages: { + expectedBefore: "Expected space(s) before \"{{value}}\".", + expectedAfter: "Expected space(s) after \"{{value}}\".", + unexpectedBefore: "Unexpected space(s) before \"{{value}}\".", + unexpectedAfter: "Unexpected space(s) after \"{{value}}\"." + } + }, + defaultOptions: [{}], + create(context) { + const sourceCode = context.sourceCode; + const tokensToIgnore = /* @__PURE__ */ new WeakSet(); + function isOpenParenOfTemplate(token) { + return token.type === "Template" && TEMPLATE_OPEN_PAREN.test(token.value); + } + function isCloseParenOfTemplate(token) { + return token.type === "Template" && TEMPLATE_CLOSE_PAREN.test(token.value); + } + function expectSpaceBefore(token, pattern) { + const prevToken = sourceCode.getTokenBefore(token); + if (prevToken && (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) && !isOpenParenOfTemplate(prevToken) && !tokensToIgnore.has(prevToken) && (0, ast_exports.isTokenOnSameLine)(prevToken, token) && !sourceCode.isSpaceBetween(prevToken, token)) context.report({ + loc: token.loc, + messageId: "expectedBefore", + data: token, + fix(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + } + function unexpectSpaceBefore(token, pattern) { + const prevToken = sourceCode.getTokenBefore(token); + if (prevToken && (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) && !isOpenParenOfTemplate(prevToken) && !tokensToIgnore.has(prevToken) && (0, ast_exports.isTokenOnSameLine)(prevToken, token) && sourceCode.isSpaceBetween(prevToken, token)) context.report({ + loc: { + start: prevToken.loc.end, + end: token.loc.start + }, + messageId: "unexpectedBefore", + data: token, + fix(fixer) { + return fixer.removeRange([prevToken.range[1], token.range[0]]); + } + }); + } + function expectSpaceAfter(token, pattern) { + const nextToken = sourceCode.getTokenAfter(token); + if (nextToken && (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) && !isCloseParenOfTemplate(nextToken) && !tokensToIgnore.has(nextToken) && (0, ast_exports.isTokenOnSameLine)(token, nextToken) && !sourceCode.isSpaceBetween(token, nextToken)) context.report({ + loc: token.loc, + messageId: "expectedAfter", + data: token, + fix(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); + } + function unexpectSpaceAfter(token, pattern) { + const nextToken = sourceCode.getTokenAfter(token); + if (nextToken && (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) && !isCloseParenOfTemplate(nextToken) && !tokensToIgnore.has(nextToken) && (0, ast_exports.isTokenOnSameLine)(token, nextToken) && sourceCode.isSpaceBetween(token, nextToken)) context.report({ + loc: { + start: token.loc.end, + end: nextToken.loc.start + }, + messageId: "unexpectedAfter", + data: token, + fix(fixer) { + return fixer.removeRange([token.range[1], nextToken.range[0]]); + } + }); + } + function parseOptions(options = {}) { + const before = options.before !== false; + const after = options.after !== false; + const defaultValue = { + before: before ? expectSpaceBefore : unexpectSpaceBefore, + after: after ? expectSpaceAfter : unexpectSpaceAfter + }; + const overrides = options && options.overrides || {}; + const retv = Object.create(null); + for (let i = 0; i < KEYWORDS.length; ++i) { + const key = KEYWORDS[i]; + const override = overrides[key]; + if (override) { + const thisBefore = "before" in override ? override.before : before; + const thisAfter = "after" in override ? override.after : after; + retv[key] = { + before: thisBefore ? expectSpaceBefore : unexpectSpaceBefore, + after: thisAfter ? expectSpaceAfter : unexpectSpaceAfter + }; + } else retv[key] = defaultValue; + } + return retv; + } + const checkMethodMap = parseOptions(context.options[0]); + function checkSpacingBefore(token, pattern) { + checkMethodMap[token.value].before(token, pattern || PREV_TOKEN); + } + function checkSpacingAfter(token, pattern) { + checkMethodMap[token.value].after(token, pattern || NEXT_TOKEN); + } + function checkSpacingAround(token) { + checkSpacingBefore(token); + checkSpacingAfter(token); + } + function checkSpacingAroundFirstToken(node) { + const firstToken = node && sourceCode.getFirstToken(node); + if (!firstToken) return; + if (!isKeywordToken(firstToken)) if (node.type === "VariableDeclaration") { + if (node.kind !== "using" && node.kind !== "await using" || firstToken.type !== "Identifier") + /* c8 ignore next 2 */ return; + } else return; + checkSpacingAround(firstToken); + } + function checkSpacingBeforeFirstToken(node) { + const firstToken = node && sourceCode.getFirstToken(node); + if (isKeywordToken(firstToken)) checkSpacingBefore(firstToken); + } + function checkSpacingAroundTokenBefore(node) { + if (node) { + const token = sourceCode.getTokenBefore(node, isKeywordToken); + if (token) checkSpacingAround(token); + } + } + function checkSpacingForFunction(node) { + const firstToken = node && sourceCode.getFirstToken(node); + if (firstToken && (isKeywordToken(firstToken) && firstToken.value === "function" || firstToken.value === "async")) checkSpacingBefore(firstToken); + } + function checkSpacingForClass(node) { + checkSpacingAroundFirstToken(node); + checkSpacingAroundTokenBefore(node.superClass); + } + function checkSpacingForModuleDeclaration(node) { + const firstToken = sourceCode.getFirstToken(node); + checkSpacingBefore(firstToken, PREV_TOKEN_M); + checkSpacingAfter(firstToken, NEXT_TOKEN_M); + if (node.type === "ExportDefaultDeclaration") checkSpacingAround(sourceCode.getTokenAfter(firstToken)); + if (node.type === "ExportAllDeclaration" && node.exported) { + const asToken = sourceCode.getTokenBefore(node.exported); + checkSpacingBefore(asToken, PREV_TOKEN_M); + checkSpacingAfter(asToken, NEXT_TOKEN_M); + } + if ("source" in node && node.source) { + const fromToken = sourceCode.getTokenBefore(node.source); + checkSpacingBefore(fromToken, PREV_TOKEN_M); + checkSpacingAfter(fromToken, NEXT_TOKEN_M); + if (node.attributes) { + const withToken = sourceCode.getTokenAfter(node.source); + if (isKeywordToken(withToken)) checkSpacingAround(withToken); + } + } + if (node.type !== "ExportDefaultDeclaration") checkSpacingForTypeKeywordInImportExport(node); + } + function checkSpacingForTypeKeywordInImportExport(node) { + let kind; + switch (node.type) { + case AST_NODE_TYPES.ImportDeclaration: + kind = node.importKind; + break; + case AST_NODE_TYPES.ExportAllDeclaration: + case AST_NODE_TYPES.ExportNamedDeclaration: + kind = node.exportKind; + break; + } + if (kind !== "type") return; + const typeToken = sourceCode.getFirstToken(node, { skip: 1 }); + if (!(0, ast_exports.isTypeKeyword)(typeToken)) return; + checkSpacingBefore(typeToken, PREV_TOKEN_M); + checkSpacingAfter(typeToken, NEXT_TOKEN_M); + } + function checkSpacingForProperty(node) { + if ("static" in node && node.static) checkSpacingAroundFirstToken(node); + if (node.kind === "get" || node.kind === "set" || ("method" in node && node.method || node.type === "MethodDefinition") && "async" in node.value && node.value.async || node.type === AST_NODE_TYPES.AccessorProperty) { + const token = sourceCode.getTokenBefore(node.key, (tok) => { + switch (tok.value) { + case "get": + case "set": + case "async": + case "accessor": return true; + default: return false; + } + }); + if (!token) throw new Error("Failed to find token get, set, or async beside method name"); + checkSpacingAround(token); + } + } + return { + DebuggerStatement: checkSpacingAroundFirstToken, + WithStatement: checkSpacingAroundFirstToken, + BreakStatement: checkSpacingAroundFirstToken, + ContinueStatement: checkSpacingAroundFirstToken, + ReturnStatement: checkSpacingAroundFirstToken, + ThrowStatement: checkSpacingAroundFirstToken, + TryStatement(node) { + checkSpacingAroundFirstToken(node); + if (node.handler) if (node.handler.param) checkSpacingBeforeFirstToken(node.handler); + else checkSpacingAroundFirstToken(node.handler); + checkSpacingAroundTokenBefore(node.finalizer); + }, + IfStatement(node) { + checkSpacingAroundFirstToken(node); + checkSpacingAroundTokenBefore(node.alternate); + }, + SwitchStatement: checkSpacingAroundFirstToken, + SwitchCase: checkSpacingAroundFirstToken, + DoWhileStatement(node) { + checkSpacingAroundFirstToken(node); + checkSpacingAroundTokenBefore(node.test); + }, + ForInStatement(node) { + checkSpacingAroundFirstToken(node); + const inToken = sourceCode.getTokenBefore(node.right, ast_exports.isNotOpeningParenToken); + const previousToken = sourceCode.getTokenBefore(inToken); + if (previousToken.type !== "PrivateIdentifier") checkSpacingBefore(inToken); + checkSpacingAfter(inToken); + }, + ForOfStatement(node) { + if (node.await) { + checkSpacingBefore(sourceCode.getFirstToken(node, 0)); + checkSpacingAfter(sourceCode.getFirstToken(node, 1)); + } else checkSpacingAroundFirstToken(node); + const ofToken = sourceCode.getTokenBefore(node.right, ast_exports.isNotOpeningParenToken); + const previousToken = sourceCode.getTokenBefore(ofToken); + if (previousToken.type !== "PrivateIdentifier") checkSpacingBefore(ofToken); + checkSpacingAfter(ofToken); + }, + ForStatement: checkSpacingAroundFirstToken, + WhileStatement: checkSpacingAroundFirstToken, + ClassDeclaration: checkSpacingForClass, + ExportNamedDeclaration: checkSpacingForModuleDeclaration, + ExportDefaultDeclaration: checkSpacingForModuleDeclaration, + ExportAllDeclaration: checkSpacingForModuleDeclaration, + FunctionDeclaration: checkSpacingForFunction, + ImportDeclaration: checkSpacingForModuleDeclaration, + VariableDeclaration: checkSpacingAroundFirstToken, + ArrowFunctionExpression: checkSpacingForFunction, + AwaitExpression(node) { + checkSpacingBefore(sourceCode.getFirstToken(node)); + }, + ClassExpression: checkSpacingForClass, + FunctionExpression: checkSpacingForFunction, + NewExpression: checkSpacingBeforeFirstToken, + Super: checkSpacingBeforeFirstToken, + ThisExpression: checkSpacingBeforeFirstToken, + UnaryExpression: checkSpacingBeforeFirstToken, + YieldExpression: checkSpacingBeforeFirstToken, + ImportSpecifier(node) { + if (node.imported.range[0] !== node.local.range[0]) { + const asToken = sourceCode.getTokenBefore(node.local); + checkSpacingBefore(asToken, PREV_TOKEN_M); + } + }, + ExportSpecifier(node) { + if (node.local.range[0] !== node.exported.range[0]) { + const asToken = sourceCode.getTokenBefore(node.exported); + checkSpacingBefore(asToken, PREV_TOKEN_M); + checkSpacingAfter(asToken, NEXT_TOKEN_M); + } + }, + ImportNamespaceSpecifier(node) { + const asToken = sourceCode.getFirstToken(node, 1); + checkSpacingBefore(asToken, PREV_TOKEN_M); + }, + MethodDefinition: checkSpacingForProperty, + PropertyDefinition: checkSpacingForProperty, + AccessorProperty: checkSpacingForProperty, + StaticBlock: checkSpacingAroundFirstToken, + Property: checkSpacingForProperty, + BinaryExpression(node) { + if (node.operator !== ">") return; + const operatorToken = sourceCode.getTokenBefore(node.right, ast_exports.isNotOpeningParenToken); + tokensToIgnore.add(operatorToken); + }, + TSAsExpression(node) { + const asToken = sourceCode.getTokenAfter(node.expression, (token) => token.value === "as"); + checkSpacingAround(asToken); + }, + TSSatisfiesExpression(node) { + const satisfiesToken = sourceCode.getTokenAfter(node.expression, (token) => token.value === "satisfies"); + checkSpacingAround(satisfiesToken); + } + }; + } +}); +export { keyword_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/line-comment-position.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/line-comment-position.js new file mode 100644 index 0000000..c27578a --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/line-comment-position.js @@ -0,0 +1,67 @@ +import { COMMENTS_IGNORE_PATTERN, ast_exports, createRule, warnDeprecatedOptions } from "../utils.js"; +var line_comment_position_default = createRule({ + name: "line-comment-position", + meta: { + type: "layout", + docs: { description: "Enforce position of line comments" }, + schema: [{ oneOf: [{ + type: "string", + enum: ["above", "beside"] + }, { + type: "object", + properties: { + position: { + type: "string", + enum: ["above", "beside"] + }, + ignorePattern: { type: "string" }, + applyDefaultPatterns: { type: "boolean" }, + applyDefaultIgnorePatterns: { type: "boolean" } + }, + additionalProperties: false + }] }], + messages: { + above: "Expected comment to be above code.", + beside: "Expected comment to be beside code." + } + }, + create(context) { + const options = context.options[0]; + let above; + let ignorePattern; + let applyDefaultIgnorePatterns = true; + let customIgnoreRegExp; + if (!options || typeof options === "string") above = !options || options === "above"; + else { + above = !options.position || options.position === "above"; + ignorePattern = options.ignorePattern; + customIgnoreRegExp = new RegExp(ignorePattern, "u"); + if (Object.hasOwn(options, "applyDefaultIgnorePatterns")) applyDefaultIgnorePatterns = options.applyDefaultIgnorePatterns; + else applyDefaultIgnorePatterns = options.applyDefaultPatterns !== false; + warnDeprecatedOptions(options, "applyDefaultPatterns", "applyDefaultIgnorePatterns", "line-comment-position"); + } + const defaultIgnoreRegExp = COMMENTS_IGNORE_PATTERN; + const fallThroughRegExp = /^\s*falls?\s?through/u; + const sourceCode = context.sourceCode; + return { Program() { + const comments = sourceCode.getAllComments(); + comments.forEach((node) => { + if (node.type !== "Line") return; + if (applyDefaultIgnorePatterns && (defaultIgnoreRegExp.test(node.value) || fallThroughRegExp.test(node.value))) return; + if (ignorePattern && customIgnoreRegExp.test(node.value)) return; + const previous = sourceCode.getTokenBefore(node, { includeComments: true }); + const isOnSameLine = previous && (0, ast_exports.isTokenOnSameLine)(previous, node); + if (above) { + if (isOnSameLine) context.report({ + node, + messageId: "above" + }); + } else if (!isOnSameLine) context.report({ + node, + messageId: "beside" + }); + }); + } }; + } +}); +export { line_comment_position_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/linebreak-style.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/linebreak-style.js new file mode 100644 index 0000000..d3896d2 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/linebreak-style.js @@ -0,0 +1,51 @@ +import { createGlobalLinebreakMatcher, createRule } from "../utils.js"; +var linebreak_style_default = createRule({ + name: "linebreak-style", + meta: { + type: "layout", + docs: { description: "Enforce consistent linebreak style" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: ["unix", "windows"] + }], + messages: { + expectedLF: "Expected linebreaks to be 'LF' but found 'CRLF'.", + expectedCRLF: "Expected linebreaks to be 'CRLF' but found 'LF'." + } + }, + create(context) { + const sourceCode = context.sourceCode; + return { Program: function checkForLinebreakStyle(node) { + const linebreakStyle = context.options[0] || "unix"; + const expectedLF = linebreakStyle === "unix"; + const expectedLFChars = expectedLF ? "\n" : "\r\n"; + const source = sourceCode.getText(); + const pattern = createGlobalLinebreakMatcher(); + let match; + let i = 0; + while ((match = pattern.exec(source)) !== null) { + i++; + if (match[0] === expectedLFChars) continue; + const index = match.index; + const range = [index, index + match[0].length]; + context.report({ + node, + loc: { + start: { + line: i, + column: sourceCode.lines[i - 1].length + }, + end: { + line: i + 1, + column: 0 + } + }, + messageId: expectedLF ? "expectedLF" : "expectedCRLF", + fix: (fixer) => fixer.replaceTextRange(range, expectedLFChars) + }); + } + } }; + } +}); +export { linebreak_style_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/lines-around-comment.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/lines-around-comment.js new file mode 100644 index 0000000..f86f218 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/lines-around-comment.js @@ -0,0 +1,243 @@ +import { AST_NODE_TYPES, AST_TOKEN_TYPES, COMMENTS_IGNORE_PATTERN, ast_exports, createRule, isHashbangComment } from "../utils.js"; +function getEmptyLineNums(lines) { + const emptyLines = []; + lines.forEach((line, i) => { + if (!line.trim()) emptyLines.push(i + 1); + }); + return emptyLines; +} +function getCommentLineNums(comments) { + const lines = []; + comments.forEach((token) => { + const start = token.loc.start.line; + const end = token.loc.end.line; + lines.push(start, end); + }); + return lines; +} +var lines_around_comment_default = createRule({ + name: "lines-around-comment", + meta: { + type: "layout", + docs: { description: "Require empty lines around comments" }, + schema: [{ + type: "object", + properties: { + beforeBlockComment: { + type: "boolean", + default: true + }, + afterBlockComment: { + type: "boolean", + default: false + }, + beforeLineComment: { + type: "boolean", + default: false + }, + afterLineComment: { + type: "boolean", + default: false + }, + allowBlockStart: { + type: "boolean", + default: false + }, + allowBlockEnd: { + type: "boolean", + default: false + }, + allowClassStart: { type: "boolean" }, + allowClassEnd: { type: "boolean" }, + allowObjectStart: { type: "boolean" }, + allowObjectEnd: { type: "boolean" }, + allowArrayStart: { type: "boolean" }, + allowArrayEnd: { type: "boolean" }, + allowInterfaceStart: { type: "boolean" }, + allowInterfaceEnd: { type: "boolean" }, + allowTypeStart: { type: "boolean" }, + allowTypeEnd: { type: "boolean" }, + allowEnumStart: { type: "boolean" }, + allowEnumEnd: { type: "boolean" }, + allowModuleStart: { type: "boolean" }, + allowModuleEnd: { type: "boolean" }, + ignorePattern: { type: "string" }, + applyDefaultIgnorePatterns: { type: "boolean" }, + afterHashbangComment: { type: "boolean" } + }, + additionalProperties: false + }], + fixable: "whitespace", + messages: { + after: "Expected line after comment.", + before: "Expected line before comment." + } + }, + defaultOptions: [{ beforeBlockComment: true }], + create(context, [_options]) { + const options = _options; + const defaultIgnoreRegExp = COMMENTS_IGNORE_PATTERN; + const customIgnoreRegExp = new RegExp(options.ignorePattern ?? "", "u"); + const sourceCode = context.sourceCode; + const comments = sourceCode.getAllComments(); + const lines = sourceCode.lines; + const numLines = lines.length + 1; + const commentLines = getCommentLineNums(comments); + const emptyLines = getEmptyLineNums(lines); + const commentAndEmptyLines = new Set(commentLines.concat(emptyLines)); + function codeAroundComment(token) { + let currentToken = token; + do + currentToken = sourceCode.getTokenBefore(currentToken, { includeComments: true }); + while (currentToken && (0, ast_exports.isCommentToken)(currentToken)); + if (currentToken && (0, ast_exports.isTokenOnSameLine)(currentToken, token)) return true; + currentToken = token; + do + currentToken = sourceCode.getTokenAfter(currentToken, { includeComments: true }); + while (currentToken && (0, ast_exports.isCommentToken)(currentToken)); + if (currentToken && (0, ast_exports.isTokenOnSameLine)(token, currentToken)) return true; + return false; + } + function isParentNodeType(parent, nodeType) { + return parent.type === nodeType; + } + function getParentNodeOfToken(token) { + const node = sourceCode.getNodeByRangeIndex(token.range[0]); + if (node && node.type === "StaticBlock") { + const openingBrace = sourceCode.getFirstToken(node, { skip: 1 }); + return openingBrace && token.range[0] >= openingBrace.range[0] ? node : null; + } + return node; + } + function isCommentAtParentStart(token, nodeType) { + const parent = getParentNodeOfToken(token); + if (parent && isParentNodeType(parent, nodeType)) { + let parentStartNodeOrToken = parent; + if (parent.type === "StaticBlock") parentStartNodeOrToken = sourceCode.getFirstToken(parent, { skip: 1 }); + else if (parent.type === "SwitchStatement") parentStartNodeOrToken = sourceCode.getTokenAfter(parent.discriminant, { filter: ast_exports.isOpeningBraceToken }); + return !!parentStartNodeOrToken && token.loc.start.line - parentStartNodeOrToken.loc.start.line === 1; + } + return false; + } + function isCommentAtParentEnd(token, nodeType) { + const parent = getParentNodeOfToken(token); + return !!parent && isParentNodeType(parent, nodeType) && parent.loc.end.line - token.loc.end.line === 1; + } + function isCommentAtBlockStart(token) { + return isCommentAtParentStart(token, AST_NODE_TYPES.ClassBody) || isCommentAtParentStart(token, AST_NODE_TYPES.BlockStatement) || isCommentAtParentStart(token, AST_NODE_TYPES.StaticBlock) || isCommentAtParentStart(token, AST_NODE_TYPES.SwitchCase) || isCommentAtParentStart(token, AST_NODE_TYPES.SwitchStatement); + } + function isCommentAtBlockEnd(token) { + return isCommentAtParentEnd(token, AST_NODE_TYPES.ClassBody) || isCommentAtParentEnd(token, AST_NODE_TYPES.BlockStatement) || isCommentAtParentEnd(token, AST_NODE_TYPES.StaticBlock) || isCommentAtParentEnd(token, AST_NODE_TYPES.SwitchCase) || isCommentAtParentEnd(token, AST_NODE_TYPES.SwitchStatement); + } + function isCommentAtClassStart(token) { + return isCommentAtParentStart(token, AST_NODE_TYPES.ClassBody); + } + function isCommentAtClassEnd(token) { + return isCommentAtParentEnd(token, AST_NODE_TYPES.ClassBody); + } + function isCommentAtObjectStart(token) { + return isCommentAtParentStart(token, AST_NODE_TYPES.ObjectExpression) || isCommentAtParentStart(token, AST_NODE_TYPES.ObjectPattern); + } + function isCommentAtObjectEnd(token) { + return isCommentAtParentEnd(token, AST_NODE_TYPES.ObjectExpression) || isCommentAtParentEnd(token, AST_NODE_TYPES.ObjectPattern); + } + function isCommentAtArrayStart(token) { + return isCommentAtParentStart(token, AST_NODE_TYPES.ArrayExpression) || isCommentAtParentStart(token, AST_NODE_TYPES.ArrayPattern); + } + function isCommentAtArrayEnd(token) { + return isCommentAtParentEnd(token, AST_NODE_TYPES.ArrayExpression) || isCommentAtParentEnd(token, AST_NODE_TYPES.ArrayPattern); + } + function isCommentAtInterfaceStart(token) { + return isCommentAtParentStart(token, AST_NODE_TYPES.TSInterfaceBody); + } + function isCommentAtInterfaceEnd(token) { + return isCommentAtParentEnd(token, AST_NODE_TYPES.TSInterfaceBody); + } + function isCommentAtTypeStart(token) { + return isCommentAtParentStart(token, AST_NODE_TYPES.TSTypeLiteral); + } + function isCommentAtTypeEnd(token) { + return isCommentAtParentEnd(token, AST_NODE_TYPES.TSTypeLiteral); + } + function isCommentAtEnumStart(token) { + return isCommentAtParentStart(token, AST_NODE_TYPES.TSEnumBody) || isCommentAtParentStart(token, AST_NODE_TYPES.TSEnumDeclaration); + } + function isCommentAtEnumEnd(token) { + return isCommentAtParentEnd(token, AST_NODE_TYPES.TSEnumBody) || isCommentAtParentEnd(token, AST_NODE_TYPES.TSEnumDeclaration); + } + function isCommentAtModuleStart(token) { + return isCommentAtParentStart(token, AST_NODE_TYPES.TSModuleBlock); + } + function isCommentAtModuleEnd(token) { + return isCommentAtParentEnd(token, AST_NODE_TYPES.TSModuleBlock); + } + function checkForEmptyLine(token, { before, after }) { + if (options.applyDefaultIgnorePatterns !== false && defaultIgnoreRegExp.test(token.value)) return; + if (options.ignorePattern && customIgnoreRegExp.test(token.value)) return; + const prevLineNum = token.loc.start.line - 1; + const nextLineNum = token.loc.end.line + 1; + if (prevLineNum < 1) before = false; + if (nextLineNum >= numLines) after = false; + if (codeAroundComment(token)) return; + const blockStartAllowed = Boolean(options.allowBlockStart) && isCommentAtBlockStart(token) && !(options.allowClassStart === false && isCommentAtClassStart(token)); + const blockEndAllowed = Boolean(options.allowBlockEnd) && isCommentAtBlockEnd(token) && !(options.allowClassEnd === false && isCommentAtClassEnd(token)); + const classStartAllowed = Boolean(options.allowClassStart) && isCommentAtClassStart(token); + const classEndAllowed = Boolean(options.allowClassEnd) && isCommentAtClassEnd(token); + const objectStartAllowed = Boolean(options.allowObjectStart) && isCommentAtObjectStart(token); + const objectEndAllowed = Boolean(options.allowObjectEnd) && isCommentAtObjectEnd(token); + const arrayStartAllowed = Boolean(options.allowArrayStart) && isCommentAtArrayStart(token); + const arrayEndAllowed = Boolean(options.allowArrayEnd) && isCommentAtArrayEnd(token); + const interfaceStartAllowed = Boolean(options.allowInterfaceStart) && isCommentAtInterfaceStart(token); + const interfaceEndAllowed = Boolean(options.allowInterfaceEnd) && isCommentAtInterfaceEnd(token); + const typeStartAllowed = Boolean(options.allowTypeStart) && isCommentAtTypeStart(token); + const typeEndAllowed = Boolean(options.allowTypeEnd) && isCommentAtTypeEnd(token); + const enumStartAllowed = Boolean(options.allowEnumStart) && isCommentAtEnumStart(token); + const enumEndAllowed = Boolean(options.allowEnumEnd) && isCommentAtEnumEnd(token); + const moduleStartAllowed = Boolean(options.allowModuleStart) && isCommentAtModuleStart(token); + const moduleEndAllowed = Boolean(options.allowModuleEnd) && isCommentAtModuleEnd(token); + const exceptionStartAllowed = blockStartAllowed || classStartAllowed || objectStartAllowed || arrayStartAllowed || interfaceStartAllowed || typeStartAllowed || enumStartAllowed || moduleStartAllowed; + const exceptionEndAllowed = blockEndAllowed || classEndAllowed || objectEndAllowed || arrayEndAllowed || interfaceEndAllowed || typeEndAllowed || enumEndAllowed || moduleEndAllowed; + const previousTokenOrComment = sourceCode.getTokenBefore(token, { includeComments: true }); + const nextTokenOrComment = sourceCode.getTokenAfter(token, { includeComments: true }); + if (!exceptionStartAllowed && before && !commentAndEmptyLines.has(prevLineNum) && !((0, ast_exports.isCommentToken)(previousTokenOrComment) && (0, ast_exports.isTokenOnSameLine)(previousTokenOrComment, token))) { + const lineStart = token.range[0] - token.loc.start.column; + const range = [lineStart, lineStart]; + context.report({ + node: token, + messageId: "before", + fix(fixer) { + return fixer.insertTextBeforeRange(range, "\n"); + } + }); + } + if (!exceptionEndAllowed && after && !commentAndEmptyLines.has(nextLineNum) && !((0, ast_exports.isCommentToken)(nextTokenOrComment) && (0, ast_exports.isTokenOnSameLine)(token, nextTokenOrComment))) context.report({ + node: token, + messageId: "after", + fix(fixer) { + return fixer.insertTextAfter(token, "\n"); + } + }); + } + return { Program() { + comments.forEach((token) => { + if (token.type === AST_TOKEN_TYPES.Line) { + if (options.beforeLineComment || options.afterLineComment) checkForEmptyLine(token, { + after: options.afterLineComment, + before: options.beforeLineComment + }); + } else if (token.type === AST_TOKEN_TYPES.Block) { + if (options.beforeBlockComment || options.afterBlockComment) checkForEmptyLine(token, { + after: options.afterBlockComment, + before: options.beforeBlockComment + }); + } else if (isHashbangComment(token)) { + if (options.afterHashbangComment) checkForEmptyLine(token, { + after: options.afterHashbangComment, + before: false + }); + } + }); + } }; + } +}); +export { lines_around_comment_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/lines-between-class-members.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/lines-between-class-members.js new file mode 100644 index 0000000..e573f7e --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/lines-between-class-members.js @@ -0,0 +1,162 @@ +import { AST_NODE_TYPES, ast_exports, createRule } from "../utils.js"; +const ClassMemberTypes = { + "*": { test: () => true }, + "field": { test: (node) => node.type === "PropertyDefinition" }, + "method": { test: (node) => node.type === "MethodDefinition" } +}; +var lines_between_class_members_default = createRule({ + name: "lines-between-class-members", + meta: { + type: "layout", + docs: { description: "Require or disallow an empty line between class members" }, + fixable: "whitespace", + schema: [{ anyOf: [{ + type: "object", + properties: { enforce: { + type: "array", + items: { + type: "object", + properties: { + blankLine: { + type: "string", + enum: ["always", "never"] + }, + prev: { + type: "string", + enum: [ + "method", + "field", + "*" + ] + }, + next: { + type: "string", + enum: [ + "method", + "field", + "*" + ] + } + }, + additionalProperties: false, + required: [ + "blankLine", + "prev", + "next" + ] + }, + minItems: 1 + } }, + additionalProperties: false, + required: ["enforce"] + }, { + type: "string", + enum: ["always", "never"] + }] }, { + type: "object", + properties: { + exceptAfterSingleLine: { + type: "boolean", + default: false + }, + exceptAfterOverload: { + type: "boolean", + default: true + } + }, + additionalProperties: false + }], + messages: { + never: "Unexpected blank line between class members.", + always: "Expected blank line between class members." + } + }, + defaultOptions: ["always", { + exceptAfterOverload: true, + exceptAfterSingleLine: false + }], + create(context, [firstOption, secondOption]) { + const options = []; + options[0] = context.options[0] || "always"; + options[1] = context.options[1] || { exceptAfterSingleLine: false }; + const configureList = typeof options[0] === "object" ? options[0].enforce : [{ + blankLine: options[0], + prev: "*", + next: "*" + }]; + const sourceCode = context.sourceCode; + function getBoundaryTokens(curNode, nextNode) { + const lastToken = sourceCode.getLastToken(curNode); + const prevToken = sourceCode.getTokenBefore(lastToken); + const nextToken = sourceCode.getFirstToken(nextNode); + const isSemicolonLessStyle = (0, ast_exports.isSemicolonToken)(lastToken) && !(0, ast_exports.isTokenOnSameLine)(prevToken, lastToken) && (0, ast_exports.isTokenOnSameLine)(lastToken, nextToken); + return isSemicolonLessStyle ? { + curLast: prevToken, + nextFirst: lastToken + } : { + curLast: lastToken, + nextFirst: nextToken + }; + } + function findLastConsecutiveTokenAfter(prevLastToken, nextFirstToken, maxLine) { + const after = sourceCode.getTokenAfter(prevLastToken, { includeComments: true }); + if (after !== nextFirstToken && after.loc.start.line - prevLastToken.loc.end.line <= maxLine) return findLastConsecutiveTokenAfter(after, nextFirstToken, maxLine); + return prevLastToken; + } + function findFirstConsecutiveTokenBefore(nextFirstToken, prevLastToken, maxLine) { + const before = sourceCode.getTokenBefore(nextFirstToken, { includeComments: true }); + if (before !== prevLastToken && nextFirstToken.loc.start.line - before.loc.end.line <= maxLine) return findFirstConsecutiveTokenBefore(before, prevLastToken, maxLine); + return nextFirstToken; + } + function hasTokenOrCommentBetween(before, after) { + return sourceCode.getTokensBetween(before, after, { includeComments: true }).length !== 0; + } + function match(node, type) { + return ClassMemberTypes[type].test(node); + } + function getPaddingType(prevNode, nextNode) { + for (let i = configureList.length - 1; i >= 0; --i) { + const configure = configureList[i]; + const matched = match(prevNode, configure.prev) && match(nextNode, configure.next); + if (matched) return configure.blankLine; + } + return null; + } + const exceptAfterOverload = secondOption?.exceptAfterOverload && (firstOption === "always" || typeof firstOption !== "string" && firstOption?.enforce.some(({ blankLine, prev, next }) => blankLine === "always" && prev !== "field" && next !== "field")); + function isOverload(node) { + return (node.type === AST_NODE_TYPES.TSAbstractMethodDefinition || node.type === AST_NODE_TYPES.MethodDefinition) && node.value.type === AST_NODE_TYPES.TSEmptyBodyFunctionExpression; + } + return { ClassBody(node) { + const body = exceptAfterOverload ? node.body.filter((node$1) => !isOverload(node$1)) : node.body; + for (let i = 0; i < body.length - 1; i++) { + const curFirst = sourceCode.getFirstToken(body[i]); + const { curLast, nextFirst } = getBoundaryTokens(body[i], body[i + 1]); + const isMulti = !(0, ast_exports.isTokenOnSameLine)(curFirst, curLast); + const skip = !isMulti && options[1].exceptAfterSingleLine; + const beforePadding = findLastConsecutiveTokenAfter(curLast, nextFirst, 1); + const afterPadding = findFirstConsecutiveTokenBefore(nextFirst, curLast, 1); + const isPadded = afterPadding.loc.start.line - beforePadding.loc.end.line > 1; + const hasTokenInPadding = hasTokenOrCommentBetween(beforePadding, afterPadding); + const curLineLastToken = findLastConsecutiveTokenAfter(curLast, nextFirst, 0); + const paddingType = getPaddingType(body[i], body[i + 1]); + if (paddingType === "never" && isPadded) context.report({ + node: body[i + 1], + messageId: "never", + fix(fixer) { + if (hasTokenInPadding) return null; + return fixer.replaceTextRange([beforePadding.range[1], afterPadding.range[0]], "\n"); + } + }); + else if (paddingType === "always" && !skip && !isPadded) context.report({ + node: body[i + 1], + messageId: "always", + fix(fixer) { + if (hasTokenInPadding) return null; + return fixer.insertTextAfter(curLineLastToken, "\n"); + } + }); + } + } }; + } +}); +export { lines_between_class_members_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/max-len.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/max-len.js new file mode 100644 index 0000000..0151dd7 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/max-len.js @@ -0,0 +1,189 @@ +import { createRule, isSingleLine } from "../utils.js"; +const OPTIONS_SCHEMA = { + type: "object", + properties: { + code: { + type: "integer", + minimum: 0 + }, + comments: { + type: "integer", + minimum: 0 + }, + tabWidth: { + type: "integer", + minimum: 0 + }, + ignorePattern: { type: "string" }, + ignoreComments: { type: "boolean" }, + ignoreStrings: { type: "boolean" }, + ignoreUrls: { type: "boolean" }, + ignoreTemplateLiterals: { type: "boolean" }, + ignoreRegExpLiterals: { type: "boolean" }, + ignoreTrailingComments: { type: "boolean" } + }, + additionalProperties: false +}; +const OPTIONS_OR_INTEGER_SCHEMA = { anyOf: [OPTIONS_SCHEMA, { + type: "integer", + minimum: 0 +}] }; +var max_len_default = createRule({ + name: "max-len", + meta: { + type: "layout", + docs: { description: "Enforce a maximum line length" }, + schema: [ + OPTIONS_OR_INTEGER_SCHEMA, + OPTIONS_OR_INTEGER_SCHEMA, + OPTIONS_SCHEMA + ], + messages: { + max: "This line has a length of {{lineLength}}. Maximum allowed is {{maxLength}}.", + maxComment: "This line has a comment length of {{lineLength}}. Maximum allowed is {{maxCommentLength}}." + } + }, + create(context) { + const URL_REGEXP = /[^:/?#]:\/\/[^?#]/u; + const sourceCode = context.sourceCode; + function computeLineLength(line, tabWidth$1) { + let extraCharacterCount = 0; + line.replace(/\t/gu, (_, offset) => { + const totalOffset = offset + extraCharacterCount; + const previousTabStopOffset = tabWidth$1 ? totalOffset % tabWidth$1 : 0; + const spaceCount = tabWidth$1 - previousTabStopOffset; + extraCharacterCount += spaceCount - 1; + return ""; + }); + return Array.from(line).length + extraCharacterCount; + } + const options = Object.assign({}, context.options[context.options.length - 1]); + if (typeof context.options[0] === "number") options.code = context.options[0]; + if (typeof context.options[1] === "number") options.tabWidth = context.options[1]; + const maxLength = typeof options.code === "number" ? options.code : 80; + const tabWidth = typeof options.tabWidth === "number" ? options.tabWidth : 4; + const ignoreComments = !!options.ignoreComments; + const ignoreStrings = !!options.ignoreStrings; + const ignoreTemplateLiterals = !!options.ignoreTemplateLiterals; + const ignoreRegExpLiterals = !!options.ignoreRegExpLiterals; + const ignoreTrailingComments = !!options.ignoreTrailingComments || !!options.ignoreComments; + const ignoreUrls = !!options.ignoreUrls; + const maxCommentLength = options.comments; + let ignorePattern = null; + if (options.ignorePattern) ignorePattern = new RegExp(options.ignorePattern, "u"); + function isTrailingComment(line, lineNumber, comment) { + return comment && comment.loc.start.line === lineNumber && lineNumber <= comment.loc.end.line && (comment.loc.end.line > lineNumber || comment.loc.end.column === line.length); + } + function isFullLineComment(line, lineNumber, comment) { + const start = comment.loc.start; + const end = comment.loc.end; + const isFirstTokenOnLine = !line.slice(0, comment.loc.start.column).trim(); + return comment && (start.line < lineNumber || start.line === lineNumber && isFirstTokenOnLine) && (end.line > lineNumber || end.line === lineNumber && end.column === line.length); + } + function isJSXEmptyExpressionInSingleLineContainer(node) { + if (!node || !node.parent || node.type !== "JSXEmptyExpression" || node.parent.type !== "JSXExpressionContainer") return false; + const parent = node.parent; + return isSingleLine(parent); + } + function stripTrailingComment(line, comment) { + return line.slice(0, comment.loc.start.column).replace(/\s+$/u, ""); + } + function ensureArrayAndPush(object, key, value) { + if (!Array.isArray(object[key])) object[key] = []; + object[key].push(value); + } + function getAllStrings() { + return sourceCode.ast.tokens.filter((token) => token.type === "String" || token.type === "JSXText" && sourceCode.getNodeByRangeIndex(token.range[0] - 1).type === "JSXAttribute"); + } + function getAllTemplateLiterals() { + return sourceCode.ast.tokens.filter((token) => token.type === "Template"); + } + function getAllRegExpLiterals() { + return sourceCode.ast.tokens.filter((token) => token.type === "RegularExpression"); + } + function groupArrayByLineNumber(arr) { + const obj = {}; + for (let i = 0; i < arr.length; i++) { + const node = arr[i]; + for (let j = node.loc.start.line; j <= node.loc.end.line; ++j) ensureArrayAndPush(obj, j, node); + } + return obj; + } + function getAllComments() { + const comments = []; + sourceCode.getAllComments().forEach((commentNode) => { + const containingNode = sourceCode.getNodeByRangeIndex(commentNode.range[0]); + if (isJSXEmptyExpressionInSingleLineContainer(containingNode)) { + if (comments[comments.length - 1] !== containingNode.parent) comments.push(containingNode.parent); + } else comments.push(commentNode); + }); + return comments; + } + function checkProgramForMaxLength(node) { + const lines = sourceCode.lines; + const comments = ignoreComments || maxCommentLength || ignoreTrailingComments ? getAllComments() : []; + let commentsIndex = 0; + const strings = getAllStrings(); + const stringsByLine = groupArrayByLineNumber(strings); + const templateLiterals = getAllTemplateLiterals(); + const templateLiteralsByLine = groupArrayByLineNumber(templateLiterals); + const regExpLiterals = getAllRegExpLiterals(); + const regExpLiteralsByLine = groupArrayByLineNumber(regExpLiterals); + lines.forEach((line, i) => { + const lineNumber = i + 1; + let lineIsComment = false; + let textToMeasure; + if (commentsIndex < comments.length) { + let comment = null; + do + comment = comments[++commentsIndex]; + while (comment && comment.loc.start.line <= lineNumber); + comment = comments[--commentsIndex]; + if (isFullLineComment(line, lineNumber, comment)) { + lineIsComment = true; + textToMeasure = line; + } else if (ignoreTrailingComments && isTrailingComment(line, lineNumber, comment)) { + textToMeasure = stripTrailingComment(line, comment); + let lastIndex = commentsIndex; + while (isTrailingComment(textToMeasure, lineNumber, comments[--lastIndex])) textToMeasure = stripTrailingComment(textToMeasure, comments[lastIndex]); + } else textToMeasure = line; + } else textToMeasure = line; + if (ignorePattern && ignorePattern.test(textToMeasure) || ignoreUrls && URL_REGEXP.test(textToMeasure) || ignoreStrings && stringsByLine[lineNumber] || ignoreTemplateLiterals && templateLiteralsByLine[lineNumber] || ignoreRegExpLiterals && regExpLiteralsByLine[lineNumber]) return; + const lineLength = computeLineLength(textToMeasure, tabWidth); + const commentLengthApplies = lineIsComment && maxCommentLength; + if (lineIsComment && ignoreComments) return; + const loc = { + start: { + line: lineNumber, + column: 0 + }, + end: { + line: lineNumber, + column: textToMeasure.length + } + }; + if (commentLengthApplies) { + if (lineLength > maxCommentLength) context.report({ + node, + loc, + messageId: "maxComment", + data: { + lineLength, + maxCommentLength + } + }); + } else if (lineLength > maxLength) context.report({ + node, + loc, + messageId: "max", + data: { + lineLength, + maxLength + } + }); + }); + } + return { Program: checkProgramForMaxLength }; + } +}); +export { max_len_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/max-statements-per-line.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/max-statements-per-line.js new file mode 100644 index 0000000..e11a4fd --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/max-statements-per-line.js @@ -0,0 +1,104 @@ +import { ast_exports, createRule } from "../utils.js"; +const listeningNodes = [ + "BreakStatement", + "ClassDeclaration", + "ContinueStatement", + "DebuggerStatement", + "DoWhileStatement", + "ExpressionStatement", + "ForInStatement", + "ForOfStatement", + "ForStatement", + "FunctionDeclaration", + "IfStatement", + "ImportDeclaration", + "LabeledStatement", + "ReturnStatement", + "SwitchStatement", + "ThrowStatement", + "TryStatement", + "VariableDeclaration", + "WhileStatement", + "WithStatement", + "ExportNamedDeclaration", + "ExportDefaultDeclaration", + "ExportAllDeclaration" +]; +var max_statements_per_line_default = createRule({ + name: "max-statements-per-line", + meta: { + type: "layout", + docs: { description: "Enforce a maximum number of statements allowed per line" }, + schema: [{ + type: "object", + properties: { + max: { + type: "integer", + minimum: 1, + default: 1 + }, + ignoredNodes: { + type: "array", + items: { + type: "string", + enum: listeningNodes + } + } + }, + additionalProperties: false + }], + messages: { exceed: "This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}." } + }, + create(context) { + const sourceCode = context.sourceCode; + const options = context.options[0] || {}; + const maxStatementsPerLine = typeof options.max !== "undefined" ? options.max : 1; + const ignoredNodes = options.ignoredNodes || []; + let lastStatementLine = 0; + let numberOfStatementsOnThisLine = 0; + let firstExtraStatement = null; + const SINGLE_CHILD_ALLOWED = /^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u; + function reportFirstExtraStatementAndClear() { + if (firstExtraStatement) context.report({ + node: firstExtraStatement, + messageId: "exceed", + data: { + numberOfStatementsOnThisLine, + maxStatementsPerLine, + statements: numberOfStatementsOnThisLine === 1 ? "statement" : "statements" + } + }); + firstExtraStatement = null; + } + function getActualLastToken(node) { + return sourceCode.getLastToken(node, ast_exports.isNotSemicolonToken); + } + function enterStatement(node) { + const line = node.loc.start.line; + if (node.parent && SINGLE_CHILD_ALLOWED.test(node.parent.type) && (!("alternate" in node.parent) || node.parent.alternate !== node)) return; + if (line === lastStatementLine) numberOfStatementsOnThisLine += 1; + else { + reportFirstExtraStatementAndClear(); + numberOfStatementsOnThisLine = 1; + lastStatementLine = line; + } + if (numberOfStatementsOnThisLine === maxStatementsPerLine + 1) firstExtraStatement = firstExtraStatement || node; + } + function leaveStatement(node) { + const line = getActualLastToken(node).loc.end.line; + if (line !== lastStatementLine) { + reportFirstExtraStatementAndClear(); + numberOfStatementsOnThisLine = 1; + lastStatementLine = line; + } + } + const listeners = { "Program:exit": reportFirstExtraStatementAndClear }; + for (const node of listeningNodes) { + if (ignoredNodes.includes(node)) continue; + listeners[node] = enterStatement; + listeners[`${node}:exit`] = leaveStatement; + } + return listeners; + } +}); +export { max_statements_per_line_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/member-delimiter-style.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/member-delimiter-style.js new file mode 100644 index 0000000..2e6761b --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/member-delimiter-style.js @@ -0,0 +1,190 @@ +import { AST_NODE_TYPES, createRule, deepMerge, isSingleLine } from "../utils.js"; +function isLastTokenEndOfLine(token, line) { + const positionInLine = token.loc.start.column; + return positionInLine === line.length - 1; +} +function isCommentsEndOfLine(token, comments, line) { + if (!comments) return false; + if (comments.loc.end.line > token.loc.end.line) return true; + const positionInLine = comments.loc.end.column; + return positionInLine === line.length; +} +function makeFixFunction({ optsNone, optsSemi, lastToken, commentsAfterLastToken, missingDelimiter, lastTokenLine, isSingleLine: isSingleLine$1 }) { + if (optsNone && !isLastTokenEndOfLine(lastToken, lastTokenLine) && !isCommentsEndOfLine(lastToken, commentsAfterLastToken, lastTokenLine) && !isSingleLine$1) return; + return (fixer) => { + if (optsNone) return fixer.remove(lastToken); + const token = optsSemi ? ";" : ","; + if (missingDelimiter) return fixer.insertTextAfter(lastToken, token); + return fixer.replaceText(lastToken, token); + }; +} +const BASE_SCHEMA = { + type: "object", + properties: { + multiline: { + type: "object", + properties: { + delimiter: { $ref: "#/items/0/$defs/multiLineOption" }, + requireLast: { type: "boolean" } + }, + additionalProperties: false + }, + singleline: { + type: "object", + properties: { + delimiter: { $ref: "#/items/0/$defs/singleLineOption" }, + requireLast: { type: "boolean" } + }, + additionalProperties: false + } + }, + additionalProperties: false +}; +var member_delimiter_style_default = createRule({ + name: "member-delimiter-style", + meta: { + type: "layout", + docs: { description: "Require a specific member delimiter style for interfaces and type literals" }, + fixable: "whitespace", + messages: { + unexpectedComma: "Unexpected separator (,).", + unexpectedSemi: "Unexpected separator (;).", + expectedComma: "Expected a comma.", + expectedSemi: "Expected a semicolon." + }, + schema: [{ + $defs: { + multiLineOption: { + type: "string", + enum: [ + "none", + "semi", + "comma" + ] + }, + singleLineOption: { + type: "string", + enum: ["semi", "comma"] + }, + delimiterConfig: BASE_SCHEMA + }, + type: "object", + properties: { + ...BASE_SCHEMA.properties, + overrides: { + type: "object", + properties: { + interface: { $ref: "#/items/0/$defs/delimiterConfig" }, + typeLiteral: { $ref: "#/items/0/$defs/delimiterConfig" } + }, + additionalProperties: false + }, + multilineDetection: { + type: "string", + enum: ["brackets", "last-member"] + } + }, + additionalProperties: false + }] + }, + defaultOptions: [{ + multiline: { + delimiter: "semi", + requireLast: true + }, + singleline: { + delimiter: "semi", + requireLast: false + }, + multilineDetection: "brackets" + }], + create(context, [options]) { + const sourceCode = context.sourceCode; + const baseOptions = options; + const overrides = baseOptions.overrides ?? {}; + const interfaceOptions = deepMerge(baseOptions, overrides.interface); + const typeLiteralOptions = deepMerge(baseOptions, overrides.typeLiteral); + function checkLastToken(member, opts, isLast) { + function getOption(type) { + if (isLast && !opts.requireLast) return type === "none"; + return opts.delimiter === type; + } + let messageId = null; + let missingDelimiter = false; + const lastToken = sourceCode.getLastToken(member, { includeComments: false }); + if (!lastToken) return; + const commentsAfterLastToken = sourceCode.getCommentsAfter(lastToken).pop(); + const sourceCodeLines = sourceCode.getLines(); + const lastTokenLine = sourceCodeLines[lastToken?.loc.start.line - 1]; + const optsSemi = getOption("semi"); + const optsComma = getOption("comma"); + const optsNone = getOption("none"); + if (lastToken.value === ";") { + if (optsComma) messageId = "expectedComma"; + else if (optsNone) { + missingDelimiter = true; + messageId = "unexpectedSemi"; + } + } else if (lastToken.value === ",") { + if (optsSemi) messageId = "expectedSemi"; + else if (optsNone) { + missingDelimiter = true; + messageId = "unexpectedComma"; + } + } else if (optsSemi) { + missingDelimiter = true; + messageId = "expectedSemi"; + } else if (optsComma) { + missingDelimiter = true; + messageId = "expectedComma"; + } + if (messageId) context.report({ + node: lastToken, + loc: { + start: { + line: lastToken.loc.end.line, + column: lastToken.loc.end.column + }, + end: { + line: lastToken.loc.end.line, + column: lastToken.loc.end.column + } + }, + messageId, + fix: makeFixFunction({ + optsNone, + optsSemi, + lastToken, + commentsAfterLastToken, + missingDelimiter, + lastTokenLine, + isSingleLine: opts.type === "single-line" + }) + }); + } + function checkMemberSeparatorStyle(node) { + const members = node.type === AST_NODE_TYPES.TSInterfaceBody ? node.body : node.members; + let _isSingleLine = isSingleLine(node); + if (options.multilineDetection === "last-member" && !_isSingleLine && members.length > 0) { + const lastMember = members[members.length - 1]; + if (lastMember.loc.end.line === node.loc.end.line) _isSingleLine = true; + } + const typeOpts = node.type === AST_NODE_TYPES.TSInterfaceBody ? interfaceOptions : typeLiteralOptions; + const opts = _isSingleLine ? { + ...typeOpts.singleline, + type: "single-line" + } : { + ...typeOpts.multiline, + type: "multi-line" + }; + members.forEach((member, index) => { + checkLastToken(member, opts ?? {}, index === members.length - 1); + }); + } + return { + TSInterfaceBody: checkMemberSeparatorStyle, + TSTypeLiteral: checkMemberSeparatorStyle + }; + } +}); +export { member_delimiter_style_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/multiline-comment-style.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/multiline-comment-style.js new file mode 100644 index 0000000..c61a207 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/multiline-comment-style.js @@ -0,0 +1,272 @@ +import { COMMENTS_IGNORE_PATTERN, WHITE_SPACES_PATTERN, ast_exports, createRule, isHashbangComment, isSingleLine, isWhiteSpaces } from "../utils.js"; +var multiline_comment_style_default = createRule({ + name: "multiline-comment-style", + meta: { + type: "suggestion", + docs: { description: "Enforce a particular style for multiline comments" }, + fixable: "whitespace", + schema: { anyOf: [{ + type: "array", + items: [{ + enum: ["starred-block", "bare-block"], + type: "string" + }], + additionalItems: false + }, { + type: "array", + items: [{ + enum: ["separate-lines"], + type: "string" + }, { + type: "object", + properties: { + checkJSDoc: { type: "boolean" }, + checkExclamation: { type: "boolean" } + }, + additionalProperties: false + }], + additionalItems: false + }] }, + messages: { + expectedBlock: "Expected a block comment instead of consecutive line comments.", + expectedBareBlock: "Expected a block comment without padding stars.", + startNewline: "Expected a linebreak after '/*'.", + endNewline: "Expected a linebreak before '*/'.", + missingStar: "Expected a '*' at the start of this line.", + alignment: "Expected this line to be aligned with the start of the comment.", + expectedLines: "Expected multiple line comments instead of a block comment." + } + }, + create(context) { + const sourceCode = context.sourceCode; + const option = context.options[0] || "starred-block"; + const params = context.options[1] || {}; + const checkJSDoc = !!params.checkJSDoc; + const checkExclamation = !!params.checkExclamation; + function isStarredCommentLine(line) { + return /^\s*\*/u.test(line); + } + function isStarredBlockComment([firstComment]) { + if (firstComment.type !== "Block") return false; + const lines = firstComment.value.split(ast_exports.LINEBREAK_MATCHER); + return lines.length > 0 && lines.every((line, i) => i === 0 || i === lines.length - 1 ? isWhiteSpaces(line) : isStarredCommentLine(line)); + } + function isJSDocComment([firstComment]) { + if (firstComment.type !== "Block") return false; + const lines = firstComment.value.split(ast_exports.LINEBREAK_MATCHER); + return /^\*\s*$/u.test(lines[0]) && lines.slice(1, -1).every((line) => /^\s* /u.test(line)) && isWhiteSpaces(lines.at(-1)); + } + function isExclamationComment([firstComment]) { + if (firstComment.type !== "Block") return false; + const lines = firstComment.value.split(ast_exports.LINEBREAK_MATCHER); + return /^!\s*$/u.test(lines[0]) && lines.slice(1, -1).every((line) => /^\s* /u.test(line)) && isWhiteSpaces(lines.at(-1)); + } + function processSeparateLineComments(commentGroup) { + const allLinesHaveLeadingSpace = commentGroup.every(({ value: line }) => line.trim().length === 0 || line.startsWith(" ")); + return commentGroup.map(({ value }) => allLinesHaveLeadingSpace ? value.replace(/^ /u, "") : value); + } + function processStarredBlockComment(comment) { + const lines = comment.value.split(ast_exports.LINEBREAK_MATCHER).slice(1, -1).map((line) => line.replace(WHITE_SPACES_PATTERN, "")); + const allLinesHaveLeadingSpace = lines.every((line) => { + const lineWithoutPrefix = line.replace(/\s*\*/u, ""); + return lineWithoutPrefix.trim().length === 0 || lineWithoutPrefix.startsWith(" "); + }); + return lines.map((line) => line.replace(allLinesHaveLeadingSpace ? /\s*\* ?/u : /\s*\*/u, "")); + } + function processBareBlockComment(comment) { + const lines = comment.value.split(ast_exports.LINEBREAK_MATCHER).map((line) => line.replace(WHITE_SPACES_PATTERN, "")); + const leadingWhitespace = `${sourceCode.text.slice(comment.range[0] - comment.loc.start.column, comment.range[0])} `; + let offset = ""; + for (const [i, line] of lines.entries()) { + if (!line.trim().length || i === 0) continue; + const [, lineOffset] = line.match(/^(\s*\*?\s*)/u); + if (lineOffset.length < leadingWhitespace.length) { + const newOffset = leadingWhitespace.slice(lineOffset.length - leadingWhitespace.length); + if (newOffset.length > offset.length) offset = newOffset; + } + } + return lines.map((line) => { + const match = line.match(/^(\s*\*?\s*)(.*)/u); + const [, lineOffset, lineContents] = match; + if (lineOffset.length > leadingWhitespace.length) return `${lineOffset.slice(leadingWhitespace.length - (offset.length + lineOffset.length))}${lineContents}`; + if (lineOffset.length < leadingWhitespace.length) return `${lineOffset.slice(leadingWhitespace.length)}${lineContents}`; + return lineContents; + }); + } + function getCommentLines(commentGroup) { + const [firstComment] = commentGroup; + if (firstComment.type === "Line") return processSeparateLineComments(commentGroup); + if (isStarredBlockComment(commentGroup)) return processStarredBlockComment(firstComment); + return processBareBlockComment(firstComment); + } + function getInitialOffset(comment) { + return sourceCode.text.slice(comment.range[0] - comment.loc.start.column, comment.range[0]); + } + function convertToStarredBlock(firstComment, commentLinesList) { + const initialOffset = getInitialOffset(firstComment); + return `/*\n${commentLinesList.map((line) => `${initialOffset} * ${line}`).join("\n")}\n${initialOffset} */`; + } + function convertToSeparateLines(firstComment, commentLinesList) { + return commentLinesList.map((line) => `// ${line}`).join(`\n${getInitialOffset(firstComment)}`); + } + function convertToBlock(firstComment, commentLinesList) { + return `/* ${commentLinesList.join(`\n${getInitialOffset(firstComment)} `)} */`; + } + const commentGroupCheckers = { + "starred-block": function(commentGroup) { + const [firstComment] = commentGroup; + const commentLines = getCommentLines(commentGroup); + if (commentLines.some((value) => value.includes("*/"))) return; + if (commentGroup.length > 1) context.report({ + loc: { + start: firstComment.loc.start, + end: commentGroup.at(-1).loc.end + }, + messageId: "expectedBlock", + fix(fixer) { + const range = [firstComment.range[0], commentGroup.at(-1).range[1]]; + return commentLines.some((value) => value.startsWith("/")) ? null : fixer.replaceTextRange(range, convertToStarredBlock(firstComment, commentLines)); + } + }); + else { + const lines = firstComment.value.split(ast_exports.LINEBREAK_MATCHER); + const expectedLeadingWhitespace = getInitialOffset(firstComment); + const expectedLinePrefix = `${expectedLeadingWhitespace} *`; + if (!/^[*!]?\s*$/u.test(lines[0])) { + const start = /^[*!]/.test(firstComment.value) ? firstComment.range[0] + 1 : firstComment.range[0]; + context.report({ + loc: { + start: firstComment.loc.start, + end: { + line: firstComment.loc.start.line, + column: firstComment.loc.start.column + 2 + } + }, + messageId: "startNewline", + fix: (fixer) => fixer.insertTextAfterRange([start, start + 2], `\n${expectedLinePrefix}`) + }); + } + if (!isWhiteSpaces(lines.at(-1))) context.report({ + loc: { + start: { + line: firstComment.loc.end.line, + column: firstComment.loc.end.column - 2 + }, + end: firstComment.loc.end + }, + messageId: "endNewline", + fix: (fixer) => fixer.replaceTextRange([firstComment.range[1] - 2, firstComment.range[1]], `\n${expectedLinePrefix}/`) + }); + for (let lineNumber = firstComment.loc.start.line + 1; lineNumber <= firstComment.loc.end.line; lineNumber++) { + const lineText = sourceCode.lines[lineNumber - 1]; + const errorType = isStarredCommentLine(lineText) ? "alignment" : "missingStar"; + if (!lineText.startsWith(expectedLinePrefix)) context.report({ + loc: { + start: { + line: lineNumber, + column: 0 + }, + end: { + line: lineNumber, + column: lineText.length + } + }, + messageId: errorType, + fix(fixer) { + const lineStartIndex = sourceCode.getIndexFromLoc({ + line: lineNumber, + column: 0 + }); + if (errorType === "alignment") { + const [, commentTextPrefix$1 = ""] = lineText.match(/^(\s*\*)/u) || []; + const commentTextStartIndex$1 = lineStartIndex + commentTextPrefix$1.length; + return fixer.replaceTextRange([lineStartIndex, commentTextStartIndex$1], expectedLinePrefix); + } + const [, commentTextPrefix = ""] = lineText.match(/^(\s*)/u) || []; + const commentTextStartIndex = lineStartIndex + commentTextPrefix.length; + let offset; + for (const [idx, line] of lines.entries()) { + if (!/\S+/u.test(line)) continue; + const lineTextToAlignWith = sourceCode.lines[firstComment.loc.start.line - 1 + idx]; + const [, prefix = "", initialOffset = ""] = lineTextToAlignWith.match(/^(\s*(?:\/?\*)?(\s*))/u) || []; + offset = `${commentTextPrefix.slice(prefix.length)}${initialOffset}`; + if (/^\s*\//u.test(lineText) && offset.length === 0) offset += " "; + break; + } + return fixer.replaceTextRange([lineStartIndex, commentTextStartIndex], `${expectedLinePrefix}${offset}`); + } + }); + } + } + }, + "separate-lines": function(commentGroup) { + const [firstComment] = commentGroup; + const isJSDoc = isJSDocComment(commentGroup); + const isExclamation = isExclamationComment(commentGroup); + if (firstComment.type !== "Block" || !checkJSDoc && isJSDoc || !checkExclamation && isExclamation) return; + let commentLines = getCommentLines(commentGroup); + if (isJSDoc || isExclamation) commentLines = commentLines.slice(1, commentLines.length - 1); + const tokenAfter = sourceCode.getTokenAfter(firstComment, { includeComments: true }); + if (tokenAfter && (0, ast_exports.isTokenOnSameLine)(firstComment, tokenAfter)) return; + context.report({ + loc: { + start: firstComment.loc.start, + end: { + line: firstComment.loc.start.line, + column: firstComment.loc.start.column + 2 + } + }, + messageId: "expectedLines", + fix(fixer) { + return fixer.replaceText(firstComment, convertToSeparateLines(firstComment, commentLines)); + } + }); + }, + "bare-block": function(commentGroup) { + if (isJSDocComment(commentGroup) || isExclamationComment(commentGroup)) return; + const [firstComment] = commentGroup; + const commentLines = getCommentLines(commentGroup); + if (firstComment.type === "Line" && commentLines.length > 1 && !commentLines.some((value) => value.includes("*/"))) context.report({ + loc: { + start: firstComment.loc.start, + end: commentGroup.at(-1).loc.end + }, + messageId: "expectedBlock", + fix(fixer) { + return fixer.replaceTextRange([firstComment.range[0], commentGroup.at(-1).range[1]], convertToBlock(firstComment, commentLines)); + } + }); + if (isStarredBlockComment(commentGroup)) context.report({ + loc: { + start: firstComment.loc.start, + end: { + line: firstComment.loc.start.line, + column: firstComment.loc.start.column + 2 + } + }, + messageId: "expectedBareBlock", + fix(fixer) { + return fixer.replaceText(firstComment, convertToBlock(firstComment, commentLines)); + } + }); + } + }; + return { Program() { + return sourceCode.getAllComments().filter((comment) => { + if (isHashbangComment(comment) || COMMENTS_IGNORE_PATTERN.test(comment.value)) return false; + const tokenBefore = sourceCode.getTokenBefore(comment, { includeComments: true }); + return !tokenBefore || tokenBefore.loc.end.line < comment.loc.start.line; + }).reduce((commentGroups, comment, index, commentList) => { + const tokenBefore = sourceCode.getTokenBefore(comment, { includeComments: true }); + if (comment.type === "Line" && index && commentList[index - 1].type === "Line" && tokenBefore && tokenBefore.loc.end.line === comment.loc.start.line - 1 && tokenBefore === commentList[index - 1]) commentGroups.at(-1).push(comment); + else commentGroups.push([comment]); + return commentGroups; + }, []).forEach((commentGroup) => { + if (commentGroup.length === 1 && isSingleLine(commentGroup[0])) return; + const check = commentGroupCheckers[option]; + check(commentGroup); + }); + } }; + } +}); +export { multiline_comment_style_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/multiline-ternary.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/multiline-ternary.js new file mode 100644 index 0000000..b6900d6 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/multiline-ternary.js @@ -0,0 +1,108 @@ +import { ast_exports, createRule, isSingleLine } from "../utils.js"; +var multiline_ternary_default = createRule({ + name: "multiline-ternary", + meta: { + type: "layout", + docs: { description: "Enforce newlines between operands of ternary expressions" }, + schema: [{ + type: "string", + enum: [ + "always", + "always-multiline", + "never" + ] + }, { + type: "object", + properties: { ignoreJSX: { + type: "boolean", + default: false + } }, + additionalProperties: false + }], + messages: { + expectedTestCons: "Expected newline between test and consequent of ternary expression.", + expectedConsAlt: "Expected newline between consequent and alternate of ternary expression.", + unexpectedTestCons: "Unexpected newline between test and consequent of ternary expression.", + unexpectedConsAlt: "Unexpected newline between consequent and alternate of ternary expression." + }, + fixable: "whitespace" + }, + create(context) { + const sourceCode = context.sourceCode; + const multiline = context.options[0] !== "never"; + const allowSingleLine = context.options[0] === "always-multiline"; + const IGNORE_JSX = context.options[1] && context.options[1].ignoreJSX; + return { ConditionalExpression(node) { + const questionToken = sourceCode.getTokenAfter(node.test, ast_exports.isNotClosingParenToken); + const colonToken = sourceCode.getTokenAfter(node.consequent, ast_exports.isNotClosingParenToken); + const firstTokenOfTest = sourceCode.getFirstToken(node); + const lastTokenOfTest = sourceCode.getTokenBefore(questionToken); + const firstTokenOfConsequent = sourceCode.getTokenAfter(questionToken); + const lastTokenOfConsequent = sourceCode.getTokenBefore(colonToken); + const firstTokenOfAlternate = sourceCode.getTokenAfter(colonToken); + const areTestAndConsequentOnSameLine = (0, ast_exports.isTokenOnSameLine)(lastTokenOfTest, firstTokenOfConsequent); + const areConsequentAndAlternateOnSameLine = (0, ast_exports.isTokenOnSameLine)(lastTokenOfConsequent, firstTokenOfAlternate); + const hasComments = !!sourceCode.getCommentsInside(node).length; + if (IGNORE_JSX) { + if (node.parent.type === "JSXElement" || node.parent.type === "JSXFragment" || node.parent.type === "JSXExpressionContainer") return null; + } + if (!multiline) { + if (!areTestAndConsequentOnSameLine) context.report({ + node: node.test, + loc: { + start: firstTokenOfTest.loc.start, + end: lastTokenOfTest.loc.end + }, + messageId: "unexpectedTestCons", + fix(fixer) { + if (hasComments) return null; + const fixers = []; + const areTestAndQuestionOnSameLine = (0, ast_exports.isTokenOnSameLine)(lastTokenOfTest, questionToken); + const areQuestionAndConsOnSameLine = (0, ast_exports.isTokenOnSameLine)(questionToken, firstTokenOfConsequent); + if (!areTestAndQuestionOnSameLine) fixers.push(fixer.removeRange([lastTokenOfTest.range[1], questionToken.range[0]])); + if (!areQuestionAndConsOnSameLine) fixers.push(fixer.removeRange([questionToken.range[1], firstTokenOfConsequent.range[0]])); + return fixers; + } + }); + if (!areConsequentAndAlternateOnSameLine) context.report({ + node: node.consequent, + loc: { + start: firstTokenOfConsequent.loc.start, + end: lastTokenOfConsequent.loc.end + }, + messageId: "unexpectedConsAlt", + fix(fixer) { + if (hasComments) return null; + const fixers = []; + const areConsAndColonOnSameLine = (0, ast_exports.isTokenOnSameLine)(lastTokenOfConsequent, colonToken); + const areColonAndAltOnSameLine = (0, ast_exports.isTokenOnSameLine)(colonToken, firstTokenOfAlternate); + if (!areConsAndColonOnSameLine) fixers.push(fixer.removeRange([lastTokenOfConsequent.range[1], colonToken.range[0]])); + if (!areColonAndAltOnSameLine) fixers.push(fixer.removeRange([colonToken.range[1], firstTokenOfAlternate.range[0]])); + return fixers; + } + }); + } else { + if (allowSingleLine && isSingleLine(node)) return; + if (areTestAndConsequentOnSameLine) context.report({ + node: node.test, + loc: { + start: firstTokenOfTest.loc.start, + end: lastTokenOfTest.loc.end + }, + messageId: "expectedTestCons", + fix: (fixer) => hasComments ? null : fixer.replaceTextRange([lastTokenOfTest.range[1], questionToken.range[0]], "\n") + }); + if (areConsequentAndAlternateOnSameLine) context.report({ + node: node.consequent, + loc: { + start: firstTokenOfConsequent.loc.start, + end: lastTokenOfConsequent.loc.end + }, + messageId: "expectedConsAlt", + fix: (fixer) => hasComments ? null : fixer.replaceTextRange([lastTokenOfConsequent.range[1], colonToken.range[0]], "\n") + }); + } + } }; + } +}); +export { multiline_ternary_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/new-parens.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/new-parens.js new file mode 100644 index 0000000..3e9814e --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/new-parens.js @@ -0,0 +1,46 @@ +import { ast_exports, createRule } from "../utils.js"; +var new_parens_default = createRule({ + name: "new-parens", + meta: { + type: "layout", + docs: { description: "Enforce or disallow parentheses when invoking a constructor with no arguments" }, + fixable: "code", + schema: [{ + type: "string", + enum: ["always", "never"] + }], + messages: { + missing: "Missing '()' invoking a constructor.", + unnecessary: "Unnecessary '()' invoking a constructor with no arguments." + } + }, + create(context) { + const options = context.options; + const always = options[0] !== "never"; + const sourceCode = context.sourceCode; + return { NewExpression(node) { + if (node.arguments.length !== 0) return; + const lastToken = sourceCode.getLastToken(node); + const hasLastParen = lastToken && (0, ast_exports.isClosingParenToken)(lastToken); + const tokenBeforeLastToken = sourceCode.getTokenBefore(lastToken); + const hasParens = hasLastParen && (0, ast_exports.isOpeningParenToken)(tokenBeforeLastToken) && node.callee.range[1] < node.range[1]; + if (always) { + if (!hasParens) context.report({ + node, + messageId: "missing", + fix: (fixer) => fixer.insertTextAfter(node, "()") + }); + } else if (hasParens) context.report({ + node, + messageId: "unnecessary", + fix: (fixer) => [ + fixer.remove(tokenBeforeLastToken), + fixer.remove(lastToken), + fixer.insertTextBefore(node, "("), + fixer.insertTextAfter(node, ")") + ] + }); + } }; + } +}); +export { new_parens_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/newline-per-chained-call.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/newline-per-chained-call.js new file mode 100644 index 0000000..c06e830 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/newline-per-chained-call.js @@ -0,0 +1,67 @@ +import { ast_exports, createRule, skipChainExpression } from "../utils.js"; +var newline_per_chained_call_default = createRule({ + name: "newline-per-chained-call", + meta: { + type: "layout", + docs: { description: "Require a newline after each call in a method chain" }, + fixable: "whitespace", + schema: [{ + type: "object", + properties: { ignoreChainWithDepth: { + type: "integer", + minimum: 1, + maximum: 10, + default: 2 + } }, + additionalProperties: false + }], + messages: { expected: "Expected line break before `{{callee}}`." } + }, + create(context) { + const options = context.options[0] || {}; + const ignoreChainWithDepth = options.ignoreChainWithDepth || 2; + const sourceCode = context.sourceCode; + function getPrefix(node) { + if (node.computed) { + if (node.optional) return "?.["; + return "["; + } + if (node.optional) return "?."; + return "."; + } + function getPropertyText(node) { + const prefix = getPrefix(node); + const lines = sourceCode.getText(node.property).split(ast_exports.LINEBREAK_MATCHER); + const suffix = node.computed && lines.length === 1 ? "]" : ""; + return prefix + lines[0] + suffix; + } + return { "CallExpression:exit": function(node) { + const callee = skipChainExpression(node.callee); + if (callee.type !== "MemberExpression") return; + let parent = skipChainExpression(callee.object); + let depth = 1; + while (parent && "callee" in parent && parent.callee) { + depth += 1; + const parentCallee = skipChainExpression(parent.callee); + if (!("object" in parentCallee)) break; + parent = skipChainExpression(parentCallee.object); + } + if (depth > ignoreChainWithDepth && (0, ast_exports.isTokenOnSameLine)(callee.object, callee.property)) { + const firstTokenAfterObject = sourceCode.getTokenAfter(callee.object, ast_exports.isNotClosingParenToken); + context.report({ + node: callee.property, + loc: { + start: firstTokenAfterObject.loc.start, + end: callee.loc.end + }, + messageId: "expected", + data: { callee: getPropertyText(callee) }, + fix(fixer) { + return fixer.insertTextBefore(firstTokenAfterObject, "\n"); + } + }); + } + } }; + } +}); +export { newline_per_chained_call_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-confusing-arrow.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-confusing-arrow.js new file mode 100644 index 0000000..643eebd --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-confusing-arrow.js @@ -0,0 +1,45 @@ +import { createRule, isParenthesised } from "../utils.js"; +function isConditional(node) { + return node.type === "ConditionalExpression"; +} +var no_confusing_arrow_default = createRule({ + name: "no-confusing-arrow", + meta: { + type: "layout", + docs: { description: "Disallow arrow functions where they could be confused with comparisons" }, + fixable: "code", + schema: [{ + type: "object", + properties: { + allowParens: { + type: "boolean", + default: true + }, + onlyOneSimpleParam: { + type: "boolean", + default: false + } + }, + additionalProperties: false + }], + messages: { confusing: "Arrow function used ambiguously with a conditional expression." } + }, + create(context) { + const config = context.options[0] || {}; + const allowParens = config.allowParens || config.allowParens === void 0; + const onlyOneSimpleParam = config.onlyOneSimpleParam; + const sourceCode = context.sourceCode; + function checkArrowFunc(node) { + const body = node.body; + if (isConditional(body) && !(allowParens && isParenthesised(sourceCode, body)) && !(onlyOneSimpleParam && !(node.params.length === 1 && node.params[0].type === "Identifier"))) context.report({ + node, + messageId: "confusing", + fix(fixer) { + return allowParens ? fixer.replaceText(node.body, `(${sourceCode.getText(node.body)})`) : null; + } + }); + } + return { ArrowFunctionExpression: checkArrowFunc }; + } +}); +export { no_confusing_arrow_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-extra-parens.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-extra-parens.js new file mode 100644 index 0000000..9a0edf2 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-extra-parens.js @@ -0,0 +1,728 @@ +import { AST_NODE_TYPES, ast_exports, canTokensBeAdjacent, createRule, getPrecedence, getStaticPropertyName, isDecimalInteger, isKeywordToken, isMixedLogicalAndCoalesceExpressions, isRegExpLiteral, isSingleLine, isTopLevelExpressionStatement, skipChainExpression, warnDeprecatedOptions } from "../utils.js"; +const isTypeAssertion = (0, ast_exports.isNodeOfTypes)([ + AST_NODE_TYPES.TSAsExpression, + AST_NODE_TYPES.TSNonNullExpression, + AST_NODE_TYPES.TSSatisfiesExpression, + AST_NODE_TYPES.TSTypeAssertion +]); +var no_extra_parens_default = createRule({ + name: "no-extra-parens", + meta: { + type: "layout", + docs: { description: "Disallow unnecessary parentheses" }, + fixable: "code", + schema: { anyOf: [{ + type: "array", + items: [{ + type: "string", + enum: ["functions"] + }], + minItems: 0, + maxItems: 1 + }, { + type: "array", + items: [{ + type: "string", + enum: ["all"] + }, { + type: "object", + properties: { + conditionalAssign: { type: "boolean" }, + ternaryOperandBinaryExpressions: { type: "boolean" }, + nestedBinaryExpressions: { type: "boolean" }, + returnAssign: { type: "boolean" }, + ignoreJSX: { + type: "string", + enum: [ + "none", + "all", + "single-line", + "multi-line" + ] + }, + enforceForArrowConditionals: { type: "boolean" }, + enforceForSequenceExpressions: { type: "boolean" }, + enforceForNewInMemberExpressions: { type: "boolean" }, + enforceForFunctionPrototypeMethods: { type: "boolean" }, + allowParensAfterCommentPattern: { type: "string" }, + nestedConditionalExpressions: { type: "boolean" }, + allowNodesInSpreadElement: { + type: "object", + properties: { + ConditionalExpression: { type: "boolean" }, + LogicalExpression: { type: "boolean" }, + AwaitExpression: { type: "boolean" } + }, + additionalProperties: false + }, + ignoredNodes: { + type: "array", + items: { + type: "string", + not: { + type: "string", + pattern: ":exit$" + } + } + } + }, + additionalProperties: false + }], + minItems: 0, + maxItems: 2 + }] }, + messages: { unexpected: "Unnecessary parentheses around expression." } + }, + defaultOptions: ["all"], + create(context, [nodes, options]) { + const sourceCode = context.sourceCode; + const tokensToIgnore = /* @__PURE__ */ new WeakSet(); + const precedence = getPrecedence; + const ALL_NODES = nodes !== "functions"; + const EXCEPT_COND_ASSIGN = ALL_NODES && options?.conditionalAssign === false; + const EXCEPT_COND_TERNARY = ALL_NODES && options?.ternaryOperandBinaryExpressions === false; + const IGNORE_NESTED_BINARY = ALL_NODES && options?.nestedBinaryExpressions === false; + const EXCEPT_RETURN_ASSIGN = ALL_NODES && options?.returnAssign === false; + const IGNORE_JSX = ALL_NODES && options?.ignoreJSX; + const IGNORE_ARROW_CONDITIONALS = ALL_NODES && options?.enforceForArrowConditionals === false; + const IGNORE_SEQUENCE_EXPRESSIONS = ALL_NODES && options?.enforceForSequenceExpressions === false; + const IGNORE_NEW_IN_MEMBER_EXPR = ALL_NODES && options?.enforceForNewInMemberExpressions === false; + const IGNORE_FUNCTION_PROTOTYPE_METHODS = ALL_NODES && options?.enforceForFunctionPrototypeMethods === false; + const ALLOW_PARENS_AFTER_COMMENT_PATTERN = ALL_NODES && options?.allowParensAfterCommentPattern; + const ALLOW_NESTED_TERNARY = ALL_NODES && options?.nestedConditionalExpressions === false; + const ALLOW_NODES_IN_SPREAD = ALL_NODES && options && new Set(Object.entries(options.allowNodesInSpreadElement || {}).filter(([_, value]) => value).map(([key]) => key)); + warnDeprecatedOptions(options, [ + "enforceForArrowConditionals", + "enforceForNewInMemberExpressions", + "allowNodesInSpreadElement" + ], "ignoredNodes", "no-extra-parens"); + const PRECEDENCE_OF_ASSIGNMENT_EXPR = precedence({ type: "AssignmentExpression" }); + const PRECEDENCE_OF_UPDATE_EXPR = precedence({ type: "UpdateExpression" }); + let reportsBuffer; + function pathToAncestor(node, ancestor) { + const path = [node]; + let currentNode = node; + while (currentNode !== ancestor) { + currentNode = currentNode.parent; + /* c8 ignore start */ + if (currentNode === null || currentNode === void 0) throw new Error("Nodes are not in the ancestor-descendant relationship."); + /* c8 ignore stop */ + path.push(currentNode); + } + return path; + } + function pathToDescendant(node, descendant) { + return pathToAncestor(descendant, node).reverse(); + } + function isSafelyEnclosingInExpression(node, child) { + switch (node.type) { + case "ArrayExpression": + case "ArrayPattern": + case "BlockStatement": + case "ObjectExpression": + case "ObjectPattern": + case "TemplateLiteral": return true; + case "ArrowFunctionExpression": + case "FunctionExpression": return node.params.includes(child); + case "CallExpression": + case "NewExpression": return node.arguments.includes(child); + case "MemberExpression": return node.computed && node.property === child; + case "ConditionalExpression": return node.consequent === child; + default: return false; + } + } + function startNewReportsBuffering() { + reportsBuffer = { + upper: reportsBuffer, + inExpressionNodes: [], + reports: [] + }; + } + function endCurrentReportsBuffering() { + const { upper, inExpressionNodes, reports } = reportsBuffer ?? {}; + if (upper) { + upper.inExpressionNodes.push(...inExpressionNodes ?? []); + upper.reports.push(...reports ?? []); + } else reports?.forEach(({ finishReport }) => finishReport()); + reportsBuffer = upper; + } + function isInCurrentReportsBuffer(node) { + return reportsBuffer?.reports.some((r) => r.node === node); + } + function removeFromCurrentReportsBuffer(node) { + if (reportsBuffer) reportsBuffer.reports = reportsBuffer.reports.filter((r) => r.node !== node); + } + function isImmediateFunctionPrototypeMethodCall(node) { + const callNode = skipChainExpression(node); + if (callNode.type !== "CallExpression") return false; + const callee = skipChainExpression(callNode.callee); + return callee.type === "MemberExpression" && callee.object.type === "FunctionExpression" && ["call", "apply"].includes(getStaticPropertyName(callee)); + } + function ruleApplies(node) { + if (node.type === "JSXElement" || node.type === "JSXFragment") switch (IGNORE_JSX) { + case "all": return false; + case "multi-line": return isSingleLine(node); + case "single-line": return !isSingleLine(node); + case "none": break; + } + if (node.type === "SequenceExpression" && IGNORE_SEQUENCE_EXPRESSIONS) return false; + if (isImmediateFunctionPrototypeMethodCall(node) && IGNORE_FUNCTION_PROTOTYPE_METHODS) return false; + return ALL_NODES || node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression"; + } + function isParenthesised(node) { + return (0, ast_exports.isParenthesized)(1, node, sourceCode); + } + function isParenthesisedTwice(node) { + return (0, ast_exports.isParenthesized)(2, node, sourceCode); + } + function hasExcessParens(node) { + return ruleApplies(node) && isParenthesised(node); + } + function hasDoubleExcessParens(node) { + return ruleApplies(node) && isParenthesisedTwice(node); + } + function hasExcessParensWithPrecedence(node, precedenceLowerLimit) { + if (ruleApplies(node) && isParenthesised(node)) { + if (precedence(node) >= precedenceLowerLimit || isParenthesisedTwice(node)) return true; + } + return false; + } + function isCondAssignException(node) { + return EXCEPT_COND_ASSIGN && node.test && node.test.type === "AssignmentExpression"; + } + function isInReturnStatement(node) { + for (let currentNode = node; currentNode; currentNode = currentNode.parent) if (currentNode.type === "ReturnStatement" || currentNode.type === "ArrowFunctionExpression" && currentNode.body.type !== "BlockStatement") return true; + return false; + } + function isNewExpressionWithParens(newExpression) { + const lastToken = sourceCode.getLastToken(newExpression); + const penultimateToken = sourceCode.getTokenBefore(lastToken); + return newExpression.arguments.length > 0 || (0, ast_exports.isOpeningParenToken)(penultimateToken) && (0, ast_exports.isClosingParenToken)(lastToken) && newExpression.callee.range[1] < newExpression.range[1]; + } + function isMemberExpInNewCallee(node) { + if (node.type === "MemberExpression") return node.parent.type === "NewExpression" && node.parent.callee === node ? true : "object" in node.parent && node.parent.object === node && isMemberExpInNewCallee(node.parent); + return false; + } + function doesMemberExpressionContainCallExpression(node) { + let currentNode = node.object; + let currentNodeType = node.object.type; + while (currentNodeType === "MemberExpression") { + if (!("object" in currentNode)) break; + currentNode = currentNode.object; + currentNodeType = currentNode.type; + } + return currentNodeType === "CallExpression"; + } + function containsAssignment(node) { + if (node.type === "AssignmentExpression") return true; + if (node.type === "ConditionalExpression" && (node.consequent.type === "AssignmentExpression" || node.alternate.type === "AssignmentExpression")) return true; + if ("left" in node && (node.left && node.left.type === "AssignmentExpression" || node.right && node.right.type === "AssignmentExpression")) return true; + return false; + } + function isReturnAssignException(node) { + if (!EXCEPT_RETURN_ASSIGN || !isInReturnStatement(node)) return false; + if (node.type === "ReturnStatement") return node.argument && containsAssignment(node.argument); + if (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") return containsAssignment(node.body); + return containsAssignment(node); + } + function hasExcessParensNoLineTerminator(token, node) { + if ((0, ast_exports.isTokenOnSameLine)(token, node)) return hasExcessParens(node); + return hasDoubleExcessParens(node); + } + function requiresLeadingSpace(node) { + const leftParenToken = sourceCode.getTokenBefore(node); + const tokenBeforeLeftParen = sourceCode.getTokenBefore(leftParenToken, { includeComments: true }); + const tokenAfterLeftParen = sourceCode.getTokenAfter(leftParenToken, { includeComments: true }); + return tokenBeforeLeftParen && tokenBeforeLeftParen.range[1] === leftParenToken.range[0] && leftParenToken.range[1] === tokenAfterLeftParen.range[0] && !canTokensBeAdjacent(tokenBeforeLeftParen, tokenAfterLeftParen); + } + function requiresTrailingSpace(node) { + const nextTwoTokens = sourceCode.getTokensAfter(node, { count: 2 }); + const rightParenToken = nextTwoTokens[0]; + const tokenAfterRightParen = nextTwoTokens[1]; + const tokenBeforeRightParen = sourceCode.getLastToken(node); + return rightParenToken && tokenAfterRightParen && !sourceCode.isSpaceBetween(rightParenToken, tokenAfterRightParen) && !canTokensBeAdjacent(tokenBeforeRightParen, tokenAfterRightParen); + } + function isIIFE(node) { + const maybeCallNode = skipChainExpression(node); + return maybeCallNode.type === "CallExpression" && maybeCallNode.callee.type === "FunctionExpression"; + } + function canBeAssignmentTarget(node) { + return !!(node && (node.type === "Identifier" || node.type === "MemberExpression")); + } + function isAnonymousFunctionAssignmentException({ left, operator, right }) { + if (left.type === "Identifier" && [ + "=", + "&&=", + "||=", + "??=" + ].includes(operator)) { + const rhsType = right.type; + if (rhsType === "ArrowFunctionExpression") return true; + if ((rhsType === "FunctionExpression" || rhsType === "ClassExpression") && !right.id) return true; + } + return false; + } + function isFixable(node) { + if (node.type !== "Literal" || typeof node.value !== "string") return true; + if (isParenthesisedTwice(node)) return true; + return !isTopLevelExpressionStatement(node.parent); + } + function report(node) { + const leftParenToken = sourceCode.getTokenBefore(node); + const rightParenToken = sourceCode.getTokenAfter(node); + if (!isParenthesisedTwice(node)) { + if (tokensToIgnore.has(sourceCode.getFirstToken(node))) return; + if (isIIFE(node) && !("callee" in node && isParenthesised(node.callee))) return; + if (ALLOW_PARENS_AFTER_COMMENT_PATTERN) { + const commentsBeforeLeftParenToken = sourceCode.getCommentsBefore(leftParenToken); + const totalCommentsBeforeLeftParenTokenCount = commentsBeforeLeftParenToken.length; + const ignorePattern = new RegExp(ALLOW_PARENS_AFTER_COMMENT_PATTERN, "u"); + if (totalCommentsBeforeLeftParenTokenCount > 0 && ignorePattern.test(commentsBeforeLeftParenToken[totalCommentsBeforeLeftParenTokenCount - 1].value)) return; + } + } + function finishReport() { + context.report({ + node, + loc: leftParenToken.loc, + messageId: "unexpected", + fix: isFixable(node) ? (fixer) => { + const parenthesizedSource = sourceCode.text.slice(leftParenToken.range[1], rightParenToken.range[0]); + return fixer.replaceTextRange([leftParenToken.range[0], rightParenToken.range[1]], (requiresLeadingSpace(node) ? " " : "") + parenthesizedSource + (requiresTrailingSpace(node) ? " " : "")); + } : null + }); + } + if (reportsBuffer) { + reportsBuffer.reports.push({ + node, + finishReport + }); + return; + } + finishReport(); + } + function checkArgumentWithPrecedence(node) { + if ("argument" in node && node.argument && hasExcessParensWithPrecedence(node.argument, precedence(node))) report(node.argument); + } + function checkBinaryLogical(node) { + const isLeftTypeAssertion = isTypeAssertion(node.left); + const isRightTypeAssertion = isTypeAssertion(node.right); + if (isLeftTypeAssertion && isRightTypeAssertion) return; + const rule = (n) => { + const prec = precedence(n); + const leftPrecedence = precedence(n.left); + const rightPrecedence = precedence(n.right); + const isExponentiation = n.operator === "**"; + const shouldSkipLeft = IGNORE_NESTED_BINARY && (n.left.type === "BinaryExpression" || n.left.type === "LogicalExpression"); + const shouldSkipRight = IGNORE_NESTED_BINARY && (n.right.type === "BinaryExpression" || n.right.type === "LogicalExpression"); + if (!shouldSkipLeft && hasExcessParens(n.left)) { + if (!(["AwaitExpression", "UnaryExpression"].includes(n.left.type) && isExponentiation) && !isMixedLogicalAndCoalesceExpressions(n.left, n) && !(n.parent.type === "ReturnStatement" && n.parent.loc.start.line !== n.left.loc.start.line && !isParenthesised(n)) && (leftPrecedence > prec || leftPrecedence === prec && !isExponentiation) || isParenthesisedTwice(n.left)) report(n.left); + } + if (!shouldSkipRight && hasExcessParens(n.right)) { + if (!isMixedLogicalAndCoalesceExpressions(n.right, n) && (rightPrecedence > prec || rightPrecedence === prec && isExponentiation) || isParenthesisedTwice(n.right)) report(n.right); + } + }; + if (isLeftTypeAssertion) return rule({ + ...node, + left: { + ...node.left, + type: AST_NODE_TYPES.SequenceExpression + } + }); + if (isRightTypeAssertion) return rule({ + ...node, + right: { + ...node.right, + type: AST_NODE_TYPES.SequenceExpression + } + }); + return rule(node); + } + function checkCallNew(node) { + const rule = (node$1) => { + const callee = node$1.callee; + if (hasExcessParensWithPrecedence(callee, precedence(node$1))) { + if (hasDoubleExcessParens(callee) || !(isIIFE(node$1) || callee.type === "NewExpression" && !isNewExpressionWithParens(callee) && !(node$1.type === "NewExpression" && !isNewExpressionWithParens(node$1)) || node$1.type === "NewExpression" && callee.type === "MemberExpression" && doesMemberExpressionContainCallExpression(callee) || (!("optional" in node$1) || !node$1.optional) && callee.type === "ChainExpression")) report(node$1.callee); + } + node$1.arguments.forEach((arg) => { + if (hasExcessParensWithPrecedence(arg, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(arg); + }); + }; + if (isTypeAssertion(node.callee)) return rule({ + ...node, + callee: { + ...node.callee, + type: AST_NODE_TYPES.SequenceExpression + } + }); + if (node.typeArguments && node.arguments.length === 1 && sourceCode.getTokenAfter(node.callee, ast_exports.isOpeningParenToken) !== sourceCode.getTokenBefore(node.arguments[0], ast_exports.isOpeningParenToken)) return rule({ + ...node, + arguments: [{ + ...node.arguments[0], + type: AST_NODE_TYPES.SequenceExpression + }] + }); + return rule(node); + } + function checkClass(node) { + if (!node.superClass) return; + const hasExtraParens = precedence(node.superClass) > PRECEDENCE_OF_UPDATE_EXPR ? hasExcessParens(node.superClass) : hasDoubleExcessParens(node.superClass); + if (hasExtraParens) report(node.superClass); + } + function checkExpressionOrExportStatement(node) { + const firstToken = isParenthesised(node) ? sourceCode.getTokenBefore(node) : sourceCode.getFirstToken(node); + const secondToken = sourceCode.getTokenAfter(firstToken, ast_exports.isNotOpeningParenToken); + const thirdToken = secondToken ? sourceCode.getTokenAfter(secondToken) : null; + const tokenAfterClosingParens = secondToken ? sourceCode.getTokenAfter(secondToken, ast_exports.isNotClosingParenToken) : null; + if ((0, ast_exports.isOpeningParenToken)(firstToken) && ((0, ast_exports.isOpeningBraceToken)(secondToken) || isKeywordToken(secondToken) && (secondToken.value === "function" || secondToken.value === "class" || secondToken.value === "let" && tokenAfterClosingParens && ((0, ast_exports.isOpeningBracketToken)(tokenAfterClosingParens) || tokenAfterClosingParens.type === "Identifier")) || secondToken && secondToken.type === "Identifier" && secondToken.value === "async" && isKeywordToken(thirdToken) && thirdToken.value === "function")) tokensToIgnore.add(secondToken); + const hasExtraParens = node.parent.type === "ExportDefaultDeclaration" ? hasExcessParensWithPrecedence(node, PRECEDENCE_OF_ASSIGNMENT_EXPR) : hasExcessParens(node); + if (hasExtraParens) report(node); + } + function checkUnaryUpdate(node) { + if (isTypeAssertion(node.argument)) return checkArgumentWithPrecedence({ + ...node, + argument: { + ...node.argument, + type: AST_NODE_TYPES.SequenceExpression + } + }); + return checkArgumentWithPrecedence(node); + } + function checkClassProperty(node) { + if (node.computed && hasExcessParensWithPrecedence(node.key, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node.key); + if (node.value && hasExcessParensWithPrecedence(node.value, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node.value); + } + function checkTSBinaryType(node) { + node.types.forEach((type) => { + const shouldReport = IGNORE_NESTED_BINARY && (0, ast_exports.isNodeOfTypes)([AST_NODE_TYPES.TSUnionType, AST_NODE_TYPES.TSIntersectionType])(type) ? isParenthesisedTwice(type) : hasExcessParensWithPrecedence(type, precedence(node)); + if (shouldReport) report(type); + }); + } + const baseListeners = { + ArrayExpression(node) { + node.elements.map((element) => isTypeAssertion(element) ? { + ...element, + type: AST_NODE_TYPES.FunctionExpression + } : element).forEach((ele) => { + if (!!ele && hasExcessParensWithPrecedence(ele, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(ele); + }); + }, + ArrayPattern(node) { + node.elements.forEach((ele) => { + if (!!ele && canBeAssignmentTarget(ele) && hasExcessParens(ele)) report(ele); + }); + }, + ArrowFunctionExpression(node) { + if (isTypeAssertion(node.body)) return; + if (isReturnAssignException(node)) return; + if (node.body.type === "ConditionalExpression" && IGNORE_ARROW_CONDITIONALS) return; + if (node.body.type === "BlockStatement") return; + const firstBodyToken = sourceCode.getFirstToken(node.body, ast_exports.isNotOpeningParenToken); + const tokenBeforeFirst = sourceCode.getTokenBefore(firstBodyToken); + if ((0, ast_exports.isOpeningParenToken)(tokenBeforeFirst) && (0, ast_exports.isOpeningBraceToken)(firstBodyToken)) tokensToIgnore.add(firstBodyToken); + if (hasExcessParensWithPrecedence(node.body, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node.body); + }, + AssignmentExpression(node) { + if (canBeAssignmentTarget(node.left) && hasExcessParens(node.left) && (!isAnonymousFunctionAssignmentException(node) || isParenthesisedTwice(node.left))) report(node.left); + if (!isReturnAssignException(node) && hasExcessParensWithPrecedence(node.right, precedence(node))) report(node.right); + }, + AssignmentPattern(node) { + const { left, right } = node; + if (canBeAssignmentTarget(left) && hasExcessParens(left)) report(left); + if (right && hasExcessParensWithPrecedence(right, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(right); + }, + AwaitExpression(node) { + if (isTypeAssertion(node.argument)) return checkArgumentWithPrecedence({ + ...node, + argument: { + ...node.argument, + type: AST_NODE_TYPES.SequenceExpression + } + }); + return checkArgumentWithPrecedence(node); + }, + BinaryExpression(node) { + if (reportsBuffer && node.operator === "in") reportsBuffer.inExpressionNodes.push(node); + checkBinaryLogical(node); + }, + "CallExpression": checkCallNew, + ClassDeclaration(node) { + if (node.superClass?.type === AST_NODE_TYPES.TSAsExpression) return checkClass({ + ...node, + superClass: { + ...node.superClass, + type: AST_NODE_TYPES.SequenceExpression + } + }); + return checkClass(node); + }, + ClassExpression(node) { + if (node.superClass?.type === AST_NODE_TYPES.TSAsExpression) return checkClass({ + ...node, + superClass: { + ...node.superClass, + type: AST_NODE_TYPES.SequenceExpression + } + }); + return checkClass(node); + }, + ConditionalExpression(node) { + const rule = (node$1) => { + if (isReturnAssignException(node$1)) return; + const availableTypes = new Set(["BinaryExpression", "LogicalExpression"]); + if (!(EXCEPT_COND_TERNARY && availableTypes.has(node$1.test.type)) && !(ALLOW_NESTED_TERNARY && ["ConditionalExpression"].includes(node$1.test.type)) && !isCondAssignException(node$1) && hasExcessParensWithPrecedence(node$1.test, precedence({ + type: "LogicalExpression", + operator: "||" + }))) report(node$1.test); + if (!(EXCEPT_COND_TERNARY && availableTypes.has(node$1.consequent.type)) && !(ALLOW_NESTED_TERNARY && ["ConditionalExpression"].includes(node$1.consequent.type)) && hasExcessParensWithPrecedence(node$1.consequent, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node$1.consequent); + if (!(EXCEPT_COND_TERNARY && availableTypes.has(node$1.alternate.type)) && !(ALLOW_NESTED_TERNARY && ["ConditionalExpression"].includes(node$1.alternate.type)) && hasExcessParensWithPrecedence(node$1.alternate, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node$1.alternate); + }; + if (isTypeAssertion(node.test)) return rule({ + ...node, + test: { + ...node.test, + type: AST_NODE_TYPES.SequenceExpression + } + }); + if (isTypeAssertion(node.consequent)) return rule({ + ...node, + consequent: { + ...node.consequent, + type: AST_NODE_TYPES.SequenceExpression + } + }); + if (isTypeAssertion(node.alternate)) return rule({ + ...node, + alternate: { + ...node.alternate, + type: AST_NODE_TYPES.SequenceExpression + } + }); + return rule(node); + }, + DoWhileStatement(node) { + if (hasExcessParens(node.test) && !isCondAssignException(node)) report(node.test); + }, + ExportDefaultDeclaration(node) { + checkExpressionOrExportStatement(node.declaration); + }, + ExpressionStatement(node) { + checkExpressionOrExportStatement(node.expression); + }, + ForInStatement(node) { + if (isTypeAssertion(node.right)) return; + if (node.left.type !== "VariableDeclaration") { + const firstLeftToken = sourceCode.getFirstToken(node.left, ast_exports.isNotOpeningParenToken); + if (firstLeftToken.value === "let" && (0, ast_exports.isOpeningBracketToken)(sourceCode.getTokenAfter(firstLeftToken, ast_exports.isNotClosingParenToken))) tokensToIgnore.add(firstLeftToken); + } + if (hasExcessParens(node.left)) report(node.left); + if (hasExcessParens(node.right)) report(node.right); + }, + ForOfStatement(node) { + if (node.left.type !== "VariableDeclaration") { + const firstLeftToken = sourceCode.getFirstToken(node.left, ast_exports.isNotOpeningParenToken); + if (firstLeftToken.value === "let") tokensToIgnore.add(firstLeftToken); + } + if (hasExcessParens(node.left)) report(node.left); + if (!isTypeAssertion(node.right) && hasExcessParensWithPrecedence(node.right, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node.right); + }, + ForStatement(node) { + if (node.test && hasExcessParens(node.test) && !isCondAssignException(node) && !isTypeAssertion(node.test)) report(node.test); + if (node.update && hasExcessParens(node.update) && !isTypeAssertion(node.update)) report(node.update); + if (node.init && !isTypeAssertion(node.init)) { + if (node.init.type !== "VariableDeclaration") { + const firstToken = sourceCode.getFirstToken(node.init, ast_exports.isNotOpeningParenToken); + if (firstToken.value === "let" && (0, ast_exports.isOpeningBracketToken)(sourceCode.getTokenAfter(firstToken, ast_exports.isNotClosingParenToken))) tokensToIgnore.add(firstToken); + } + startNewReportsBuffering(); + if (hasExcessParens(node.init)) report(node.init); + } + }, + "ForStatement > *.init:exit": function(node) { + if (isTypeAssertion(node)) return; + if (reportsBuffer?.reports.length) reportsBuffer.inExpressionNodes.forEach((inExpressionNode) => { + const path = pathToDescendant(node, inExpressionNode); + let nodeToExclude = null; + for (let i = 0; i < path.length; i++) { + const pathNode = path[i]; + if (i < path.length - 1) { + const nextPathNode = path[i + 1]; + if (isSafelyEnclosingInExpression(pathNode, nextPathNode)) return; + } + if (isParenthesised(pathNode)) if (isInCurrentReportsBuffer(pathNode)) { + if (isParenthesisedTwice(pathNode)) return; + if (!nodeToExclude) nodeToExclude = pathNode; + } else return; + } + if (nodeToExclude) removeFromCurrentReportsBuffer(nodeToExclude); + }); + endCurrentReportsBuffering(); + }, + IfStatement(node) { + if (hasExcessParens(node.test) && !isCondAssignException(node)) report(node.test); + }, + ImportExpression(node) { + const { source } = node; + if (source.type === "SequenceExpression") { + if (hasDoubleExcessParens(source)) report(source); + } else if (hasExcessParens(source)) report(source); + }, + "LogicalExpression": checkBinaryLogical, + MemberExpression(node) { + const rule = (node$1) => { + const shouldAllowWrapOnce = isMemberExpInNewCallee(node$1) && doesMemberExpressionContainCallExpression(node$1); + const nodeObjHasExcessParens = shouldAllowWrapOnce ? hasDoubleExcessParens(node$1.object) : hasExcessParens(node$1.object) && !(isImmediateFunctionPrototypeMethodCall(node$1.parent) && "callee" in node$1.parent && node$1.parent.callee === node$1 && IGNORE_FUNCTION_PROTOTYPE_METHODS); + if (nodeObjHasExcessParens && precedence(node$1.object) >= precedence(node$1) && (node$1.computed || !(isDecimalInteger(node$1.object) || isRegExpLiteral(node$1.object)))) report(node$1.object); + if (nodeObjHasExcessParens && node$1.object.type === "CallExpression") report(node$1.object); + if (nodeObjHasExcessParens && !IGNORE_NEW_IN_MEMBER_EXPR && node$1.object.type === "NewExpression" && isNewExpressionWithParens(node$1.object)) report(node$1.object); + if (nodeObjHasExcessParens && node$1.optional && node$1.object.type === "ChainExpression") report(node$1.object); + if (node$1.computed && hasExcessParens(node$1.property)) report(node$1.property); + }; + if (isTypeAssertion(node.object)) return rule({ + ...node, + object: { + ...node.object, + type: AST_NODE_TYPES.SequenceExpression + } + }); + if (isTypeAssertion(node.property)) return rule({ + ...node, + property: { + ...node.property, + type: AST_NODE_TYPES.FunctionExpression + } + }); + return rule(node); + }, + MethodDefinition(node) { + if (!node.computed) return; + if (hasExcessParensWithPrecedence(node.key, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node.key); + }, + "NewExpression": checkCallNew, + ObjectExpression(node) { + node.properties.forEach((property) => { + if (property.type === "Property" && property.value && hasExcessParensWithPrecedence(property.value, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(property.value); + }); + }, + ObjectPattern(node) { + node.properties.forEach(({ value }) => { + if (value && canBeAssignmentTarget(value) && hasExcessParens(value)) report(value); + }); + }, + Property(node) { + if (node.computed) { + const { key } = node; + if (key && hasExcessParensWithPrecedence(key, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(key); + } + }, + "PropertyDefinition": checkClassProperty, + "AccessorProperty": checkClassProperty, + RestElement(node) { + const argument = node.argument; + if (canBeAssignmentTarget(argument) && hasExcessParens(argument)) report(argument); + }, + ReturnStatement(node) { + const returnToken = sourceCode.getFirstToken(node); + if (isReturnAssignException(node)) return; + if (node.argument && returnToken && hasExcessParensNoLineTerminator(returnToken, node.argument) && !isRegExpLiteral(node.argument)) report(node.argument); + }, + SequenceExpression(node) { + const precedenceOfNode = precedence(node); + node.expressions.forEach((expression) => { + if (hasExcessParensWithPrecedence(expression, precedenceOfNode)) report(expression); + }); + }, + SpreadElement(node) { + if (isTypeAssertion(node.argument)) return; + if (ALLOW_NODES_IN_SPREAD && ALLOW_NODES_IN_SPREAD.has(node.argument.type)) return; + if (!hasExcessParensWithPrecedence(node.argument, PRECEDENCE_OF_ASSIGNMENT_EXPR)) return; + report(node.argument); + }, + SwitchCase(node) { + if (node.test && !isTypeAssertion(node.test) && hasExcessParens(node.test)) report(node.test); + }, + SwitchStatement(node) { + if (hasExcessParens(node.discriminant)) report(node.discriminant); + }, + TemplateLiteral(node) { + node.expressions.forEach((expression) => { + if (hasExcessParens(expression)) report(expression); + }); + }, + ThrowStatement(node) { + if (!node.argument || isTypeAssertion(node.argument)) return; + const throwToken = sourceCode.getFirstToken(node); + if (!throwToken) return; + if (hasExcessParensNoLineTerminator(throwToken, node.argument)) report(node.argument); + }, + "UnaryExpression": checkUnaryUpdate, + UpdateExpression(node) { + if (isTypeAssertion(node.argument)) return checkUnaryUpdate(node); + if (node.prefix) checkArgumentWithPrecedence(node); + else { + const { argument } = node; + const operatorToken = sourceCode.getLastToken(node); + if ((0, ast_exports.isTokenOnSameLine)(argument, operatorToken)) checkArgumentWithPrecedence(node); + else if (hasDoubleExcessParens(argument)) report(argument); + } + }, + VariableDeclarator(node) { + const rule = (node$1) => { + if (node$1.init && hasExcessParensWithPrecedence(node$1.init, PRECEDENCE_OF_ASSIGNMENT_EXPR) && !isRegExpLiteral(node$1.init)) report(node$1.init); + }; + if (isTypeAssertion(node.init)) return rule({ + ...node, + type: AST_NODE_TYPES.VariableDeclarator, + init: { + ...node.init, + type: AST_NODE_TYPES.FunctionExpression + } + }); + return rule(node); + }, + WhileStatement(node) { + if (hasExcessParens(node.test) && !isCondAssignException(node)) report(node.test); + }, + WithStatement(node) { + if (hasExcessParens(node.object)) report(node.object); + }, + YieldExpression(node) { + if (!node.argument || isTypeAssertion(node.argument)) return; + const yieldToken = sourceCode.getFirstToken(node); + if (precedence(node.argument) >= precedence(node) && yieldToken && hasExcessParensNoLineTerminator(yieldToken, node.argument) || hasDoubleExcessParens(node.argument)) report(node.argument); + }, + TSArrayType(node) { + if (hasExcessParensWithPrecedence(node.elementType, precedence(node))) report(node.elementType); + }, + "TSIntersectionType": checkTSBinaryType, + "TSUnionType": checkTSBinaryType, + TSTypeAnnotation(node) { + if (hasExcessParens(node.typeAnnotation)) report(node.typeAnnotation); + }, + TSTypeAliasDeclaration(node) { + if (hasExcessParens(node.typeAnnotation)) report(node.typeAnnotation); + }, + TSEnumMember(node) { + if (!node.initializer) return; + if (hasExcessParens(node.initializer)) report(node.initializer); + } + }; + const listeners = {}; + const ignoreNodes = /* @__PURE__ */ new Set(); + const listenerCallQueue = []; + for (const key in baseListeners) listeners[key] = (node) => listenerCallQueue.push({ + node, + listener: baseListeners[key] + }); + return { + ...listeners, + ...options?.ignoredNodes?.reduce((listener, selector) => Object.assign(listener, { [selector]: (node) => ignoreNodes.add(node) }), {}), + "Program:exit": function() { + for (let i = 0; i < listenerCallQueue.length; i++) { + const { node, listener } = listenerCallQueue[i]; + if (!ignoreNodes.has(node)) listener(node); + } + } + }; + } +}); +export { no_extra_parens_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-extra-semi.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-extra-semi.js new file mode 100644 index 0000000..e897b09 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-extra-semi.js @@ -0,0 +1,69 @@ +import { FixTracker, ast_exports, createRule, isTopLevelExpressionStatement } from "../utils.js"; +var no_extra_semi_default = createRule({ + name: "no-extra-semi", + meta: { + type: "layout", + docs: { description: "Disallow unnecessary semicolons" }, + fixable: "code", + schema: [], + messages: { unexpected: "Unnecessary semicolon." } + }, + defaultOptions: [], + create(context) { + const sourceCode = context.sourceCode; + function isFixable(nodeOrToken) { + const nextToken = sourceCode.getTokenAfter(nodeOrToken); + if (!nextToken || nextToken.type !== "String") return true; + const stringNode = sourceCode.getNodeByRangeIndex(nextToken.range[0]); + return !isTopLevelExpressionStatement(stringNode.parent); + } + function report(nodeOrToken) { + context.report({ + node: nodeOrToken, + messageId: "unexpected", + fix: isFixable(nodeOrToken) ? (fixer) => new FixTracker(fixer, context.sourceCode).retainSurroundingTokens(nodeOrToken).remove(nodeOrToken) : null + }); + } + function checkForPartOfClassBody(firstToken) { + for (let token = firstToken; token.type === "Punctuator" && !(0, ast_exports.isClosingBraceToken)(token); token = sourceCode.getTokenAfter(token)) if ((0, ast_exports.isSemicolonToken)(token)) report(token); + } + return { + EmptyStatement(node) { + const parent = node.parent; + const allowedParentTypes = [ + "ForStatement", + "ForInStatement", + "ForOfStatement", + "WhileStatement", + "DoWhileStatement", + "IfStatement", + "LabeledStatement", + "WithStatement" + ]; + if (!allowedParentTypes.includes(parent.type)) report(node); + }, + ClassBody(node) { + checkForPartOfClassBody(sourceCode.getFirstToken(node, 1)); + }, + MethodDefinition(node) { + checkForPartOfClassBody(sourceCode.getTokenAfter(node)); + }, + PropertyDefinition(node) { + checkForPartOfClassBody(sourceCode.getTokenAfter(node)); + }, + AccessorProperty(node) { + checkForPartOfClassBody(sourceCode.getTokenAfter(node)); + }, + StaticBlock(node) { + checkForPartOfClassBody(sourceCode.getTokenAfter(node)); + }, + TSAbstractMethodDefinition(node) { + checkForPartOfClassBody(sourceCode.getTokenAfter(node)); + }, + TSAbstractPropertyDefinition(node) { + checkForPartOfClassBody(sourceCode.getTokenAfter(node)); + } + }; + } +}); +export { no_extra_semi_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-floating-decimal.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-floating-decimal.js new file mode 100644 index 0000000..696672e --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-floating-decimal.js @@ -0,0 +1,36 @@ +import { canTokensBeAdjacent, createRule } from "../utils.js"; +var no_floating_decimal_default = createRule({ + name: "no-floating-decimal", + meta: { + type: "layout", + docs: { description: "Disallow leading or trailing decimal points in numeric literals" }, + schema: [], + fixable: "code", + messages: { + leading: "A leading decimal point can be confused with a dot.", + trailing: "A trailing decimal point can be confused with a dot." + } + }, + create(context) { + const sourceCode = context.sourceCode; + return { Literal(node) { + if (typeof node.value === "number") { + if (node.raw.startsWith(".")) context.report({ + node, + messageId: "leading", + fix(fixer) { + const tokenBefore = sourceCode.getTokenBefore(node); + const needsSpaceBefore = tokenBefore && tokenBefore.range[1] === node.range[0] && !canTokensBeAdjacent(tokenBefore, `0${node.raw}`); + return fixer.insertTextBefore(node, needsSpaceBefore ? " 0" : "0"); + } + }); + if (node.raw.indexOf(".") === node.raw.length - 1) context.report({ + node, + messageId: "trailing", + fix: (fixer) => fixer.insertTextAfter(node, "0") + }); + } + } }; + } +}); +export { no_floating_decimal_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-mixed-operators.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-mixed-operators.js new file mode 100644 index 0000000..ca2a582 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-mixed-operators.js @@ -0,0 +1,131 @@ +import { ast_exports, createRule, getPrecedence, isParenthesised } from "../utils.js"; +const ARITHMETIC_OPERATORS = [ + "+", + "-", + "*", + "/", + "%", + "**" +]; +const BITWISE_OPERATORS = [ + "&", + "|", + "^", + "~", + "<<", + ">>", + ">>>" +]; +const COMPARISON_OPERATORS = [ + "==", + "!=", + "===", + "!==", + ">", + ">=", + "<", + "<=" +]; +const LOGICAL_OPERATORS = ["&&", "||"]; +const RELATIONAL_OPERATORS = ["in", "instanceof"]; +const TERNARY_OPERATOR = ["?:"]; +const COALESCE_OPERATOR = ["??"]; +const ALL_OPERATORS = [].concat(ARITHMETIC_OPERATORS, BITWISE_OPERATORS, COMPARISON_OPERATORS, LOGICAL_OPERATORS, RELATIONAL_OPERATORS, TERNARY_OPERATOR, COALESCE_OPERATOR); +const DEFAULT_GROUPS = [ + ARITHMETIC_OPERATORS, + BITWISE_OPERATORS, + COMPARISON_OPERATORS, + LOGICAL_OPERATORS, + RELATIONAL_OPERATORS +]; +const TARGET_NODE_TYPE = /^(?:Binary|Logical|Conditional)Expression$/u; +function normalizeOptions(options = {}) { + const hasGroups = options.groups && options.groups.length > 0; + const groups = hasGroups ? options.groups : DEFAULT_GROUPS; + const allowSamePrecedence = options.allowSamePrecedence !== false; + return { + groups, + allowSamePrecedence + }; +} +function includesBothInAGroup(groups, left, right) { + return groups.some((group) => group.includes(left) && group.includes(right)); +} +function getChildNode(node) { + return node.type === "ConditionalExpression" ? node.test : node.left; +} +var no_mixed_operators_default = createRule({ + name: "no-mixed-operators", + meta: { + type: "layout", + docs: { description: "Disallow mixed binary operators" }, + schema: [{ + type: "object", + properties: { + groups: { + type: "array", + items: { + type: "array", + items: { + type: "string", + enum: ALL_OPERATORS + }, + minItems: 2, + uniqueItems: true + }, + uniqueItems: true + }, + allowSamePrecedence: { + type: "boolean", + default: true + } + }, + additionalProperties: false + }], + messages: { unexpectedMixedOperator: "Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations." } + }, + create(context) { + const sourceCode = context.sourceCode; + const options = normalizeOptions(context.options[0]); + function shouldIgnore(node) { + const a = node; + const b = node.parent; + return !includesBothInAGroup(options.groups ?? [], a.operator, b.type === "ConditionalExpression" ? "?:" : b.operator) || options.allowSamePrecedence && getPrecedence(a) === getPrecedence(b); + } + function isMixedWithParent(node) { + return node.operator !== node.parent.operator && !isParenthesised(sourceCode, node); + } + function getOperatorToken(node) { + return sourceCode.getTokenAfter(getChildNode(node), ast_exports.isNotClosingParenToken); + } + function reportBothOperators(node) { + const parent = node.parent; + const left = getChildNode(parent) === node ? node : parent; + const right = getChildNode(parent) !== node ? node : parent; + const data = { + leftOperator: left.operator || "?:", + rightOperator: right.operator || "?:" + }; + context.report({ + node: left, + loc: getOperatorToken(left).loc, + messageId: "unexpectedMixedOperator", + data + }); + context.report({ + node: right, + loc: getOperatorToken(right).loc, + messageId: "unexpectedMixedOperator", + data + }); + } + function check(node) { + if (TARGET_NODE_TYPE.test(node.parent.type) && isMixedWithParent(node) && !shouldIgnore(node)) reportBothOperators(node); + } + return { + BinaryExpression: check, + LogicalExpression: check + }; + } +}); +export { no_mixed_operators_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-mixed-spaces-and-tabs.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-mixed-spaces-and-tabs.js new file mode 100644 index 0000000..37dc4f1 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-mixed-spaces-and-tabs.js @@ -0,0 +1,59 @@ +import { createRule } from "../utils.js"; +var no_mixed_spaces_and_tabs_default = createRule({ + name: "no-mixed-spaces-and-tabs", + meta: { + type: "layout", + docs: { description: "Disallow mixed spaces and tabs for indentation" }, + schema: [{ oneOf: [{ + type: "string", + enum: ["smart-tabs"] + }, { type: "boolean" }] }], + messages: { mixedSpacesAndTabs: "Mixed spaces and tabs." } + }, + create(context) { + const sourceCode = context.sourceCode; + let smartTabs; + switch (context.options[0]) { + case true: + case "smart-tabs": + smartTabs = true; + break; + default: smartTabs = false; + } + return { "Program:exit": function(node) { + const lines = sourceCode.lines; + const comments = sourceCode.getAllComments(); + const ignoredCommentLines = /* @__PURE__ */ new Set(); + comments.forEach((comment) => { + for (let i = comment.loc.start.line + 1; i <= comment.loc.end.line; i++) ignoredCommentLines.add(i); + }); + let regex = /^(?=( +|\t+))\1(?:\t| )/u; + if (smartTabs) regex = /^(?=(\t*))\1(?=( +))\2\t/u; + lines.forEach((line, i) => { + const match = regex.exec(line); + if (match) { + const lineNumber = i + 1; + const loc = { + start: { + line: lineNumber, + column: match[0].length - 2 + }, + end: { + line: lineNumber, + column: match[0].length + } + }; + if (!ignoredCommentLines.has(lineNumber)) { + const containingNode = sourceCode.getNodeByRangeIndex(sourceCode.getIndexFromLoc(loc.start)); + if (!(containingNode && ["Literal", "TemplateElement"].includes(containingNode.type))) context.report({ + node, + loc, + messageId: "mixedSpacesAndTabs" + }); + } + } + }); + } }; + } +}); +export { no_mixed_spaces_and_tabs_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-multi-spaces.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-multi-spaces.js new file mode 100644 index 0000000..3165083 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-multi-spaces.js @@ -0,0 +1,73 @@ +import { ast_exports, createRule } from "../utils.js"; +var no_multi_spaces_default = createRule({ + name: "no-multi-spaces", + meta: { + type: "layout", + docs: { description: "Disallow multiple spaces" }, + fixable: "whitespace", + schema: [{ + type: "object", + properties: { + exceptions: { + type: "object", + patternProperties: { "^([A-Z][a-z]*)+$": { type: "boolean" } }, + additionalProperties: false + }, + ignoreEOLComments: { + type: "boolean", + default: false + }, + includeTabs: { + type: "boolean", + default: true + } + }, + additionalProperties: false + }], + messages: { multipleSpaces: "Multiple spaces found before '{{displayValue}}'." } + }, + create(context) { + const sourceCode = context.sourceCode; + const options = context.options[0] || {}; + const ignoreEOLComments = options.ignoreEOLComments; + const exceptions = Object.assign({ + Property: true, + ImportAttribute: true + }, options.exceptions); + const hasExceptions = Object.keys(exceptions).some((key) => exceptions[key]); + const spacesRe = options.includeTabs === false ? / {2}/ : /[ \t]{2}/; + function formatReportedCommentValue(token) { + const valueLines = token.value.split("\n"); + const value = valueLines[0]; + const formattedValue = `${value.slice(0, 12)}...`; + return valueLines.length === 1 && value.length <= 12 ? value : formattedValue; + } + return { Program() { + sourceCode.tokensAndComments.forEach((leftToken, leftIndex, tokensAndComments) => { + if (leftIndex === tokensAndComments.length - 1) return; + const rightToken = tokensAndComments[leftIndex + 1]; + if (!spacesRe.test(sourceCode.text.slice(leftToken.range[1], rightToken.range[0])) || leftToken.loc.end.line < rightToken.loc.start.line) return; + if (ignoreEOLComments && (0, ast_exports.isCommentToken)(rightToken) && (leftIndex === tokensAndComments.length - 2 || rightToken.loc.end.line < tokensAndComments[leftIndex + 2].loc.start.line)) return; + if (hasExceptions) { + const parentNode = sourceCode.getNodeByRangeIndex(rightToken.range[0] - 1); + if (parentNode && exceptions[parentNode.type]) return; + } + let displayValue; + if (rightToken.type === "Block") displayValue = `/*${formatReportedCommentValue(rightToken)}*/`; + else if (rightToken.type === "Line") displayValue = `//${formatReportedCommentValue(rightToken)}`; + else displayValue = rightToken.value; + context.report({ + node: rightToken, + loc: { + start: leftToken.loc.end, + end: rightToken.loc.start + }, + messageId: "multipleSpaces", + data: { displayValue }, + fix: (fixer) => fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], " ") + }); + }); + } }; + } +}); +export { no_multi_spaces_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-multiple-empty-lines.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-multiple-empty-lines.js new file mode 100644 index 0000000..dc9b33f --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-multiple-empty-lines.js @@ -0,0 +1,103 @@ +import { createRule } from "../utils.js"; +var no_multiple_empty_lines_default = createRule({ + name: "no-multiple-empty-lines", + meta: { + type: "layout", + docs: { description: "Disallow multiple empty lines" }, + fixable: "whitespace", + schema: [{ + type: "object", + properties: { + max: { + type: "integer", + minimum: 0 + }, + maxEOF: { + type: "integer", + minimum: 0 + }, + maxBOF: { + type: "integer", + minimum: 0 + } + }, + required: ["max"], + additionalProperties: false + }], + messages: { + blankBeginningOfFile: "Too many blank lines at the beginning of file. Max of {{max}} allowed.", + blankEndOfFile: "Too many blank lines at the end of file. Max of {{max}} allowed.", + consecutiveBlank: "More than {{max}} blank {{pluralizedLines}} not allowed." + } + }, + create(context) { + let max = 2; + let maxEOF = max; + let maxBOF = max; + if (context.options.length && context.options[0]) { + max = context.options[0].max; + maxEOF = typeof context.options[0].maxEOF !== "undefined" ? context.options[0].maxEOF : max; + maxBOF = typeof context.options[0].maxBOF !== "undefined" ? context.options[0].maxBOF : max; + } + const sourceCode = context.sourceCode; + const allLines = sourceCode.lines[sourceCode.lines.length - 1] === "" ? sourceCode.lines.slice(0, -1) : sourceCode.lines; + const templateLiteralLines = /* @__PURE__ */ new Set(); + return { + TemplateLiteral(node) { + node.quasis.forEach((literalPart) => { + for (let ignoredLine = literalPart.loc.start.line; ignoredLine < literalPart.loc.end.line; ignoredLine++) templateLiteralLines.add(ignoredLine); + }); + }, + "Program:exit": function(node) { + return allLines.reduce((nonEmptyLineNumbers, line, index) => { + if (line.trim() || templateLiteralLines.has(index + 1)) nonEmptyLineNumbers.push(index + 1); + return nonEmptyLineNumbers; + }, []).concat(allLines.length + 1).reduce((lastLineNumber, lineNumber) => { + let messageId, maxAllowed; + if (lastLineNumber === 0) { + messageId = "blankBeginningOfFile"; + maxAllowed = maxBOF; + } else if (lineNumber === allLines.length + 1) { + messageId = "blankEndOfFile"; + maxAllowed = maxEOF; + } else { + messageId = "consecutiveBlank"; + maxAllowed = max; + } + if (lineNumber - lastLineNumber - 1 > maxAllowed) context.report({ + node, + loc: { + start: { + line: lastLineNumber + maxAllowed + 1, + column: 0 + }, + end: { + line: lineNumber, + column: 0 + } + }, + messageId, + data: { + max: maxAllowed, + pluralizedLines: maxAllowed === 1 ? "line" : "lines" + }, + fix(fixer) { + const rangeStart = sourceCode.getIndexFromLoc({ + line: lastLineNumber + 1, + column: 0 + }); + const lineNumberAfterRemovedLines = lineNumber - maxAllowed; + const rangeEnd = lineNumberAfterRemovedLines <= allLines.length ? sourceCode.getIndexFromLoc({ + line: lineNumberAfterRemovedLines, + column: 0 + }) : sourceCode.text.length; + return fixer.removeRange([rangeStart, rangeEnd]); + } + }); + return lineNumber; + }, 0); + } + }; + } +}); +export { no_multiple_empty_lines_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-tabs.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-tabs.js new file mode 100644 index 0000000..5387a8f --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-tabs.js @@ -0,0 +1,46 @@ +import { createRule } from "../utils.js"; +const tabRegex = /\t+/gu; +const anyNonWhitespaceRegex = /\S/u; +var no_tabs_default = createRule({ + name: "no-tabs", + meta: { + type: "layout", + docs: { description: "Disallow all tabs" }, + schema: [{ + type: "object", + properties: { allowIndentationTabs: { + type: "boolean", + default: false + } }, + additionalProperties: false + }], + messages: { unexpectedTab: "Unexpected tab character." } + }, + create(context) { + const sourceCode = context.sourceCode; + const allowIndentationTabs = context.options && context.options[0] && context.options[0].allowIndentationTabs; + return { Program(node) { + sourceCode.getLines().forEach((line, index) => { + let match; + while ((match = tabRegex.exec(line)) !== null) { + if (allowIndentationTabs && !anyNonWhitespaceRegex.test(line.slice(0, match.index))) continue; + context.report({ + node, + loc: { + start: { + line: index + 1, + column: match.index + }, + end: { + line: index + 1, + column: match.index + match[0].length + } + }, + messageId: "unexpectedTab" + }); + } + }); + } }; + } +}); +export { no_tabs_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-trailing-spaces.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-trailing-spaces.js new file mode 100644 index 0000000..c51d1d4 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-trailing-spaces.js @@ -0,0 +1,93 @@ +import { createGlobalLinebreakMatcher, createRule } from "../utils.js"; +var no_trailing_spaces_default = createRule({ + name: "no-trailing-spaces", + meta: { + type: "layout", + docs: { description: "Disallow trailing whitespace at the end of lines" }, + fixable: "whitespace", + schema: [{ + type: "object", + properties: { + skipBlankLines: { + type: "boolean", + default: false + }, + ignoreComments: { + type: "boolean", + default: false + } + }, + additionalProperties: false + }], + messages: { trailingSpace: "Trailing spaces not allowed." } + }, + create(context) { + const sourceCode = context.sourceCode; + const BLANK_CLASS = "[ \xA0 -​ ]"; + const SKIP_BLANK = `^${BLANK_CLASS}*$`; + const NONBLANK = `${BLANK_CLASS}+$`; + const options = context.options[0] || {}; + const skipBlankLines = options.skipBlankLines || false; + const ignoreComments = options.ignoreComments || false; + function report(node, location, fixRange) { + context.report({ + node, + loc: location, + messageId: "trailingSpace", + fix(fixer) { + return fixer.removeRange(fixRange); + } + }); + } + function getCommentLineNumbers(comments) { + const lines = /* @__PURE__ */ new Set(); + comments.forEach((comment) => { + const endLine = comment.type === "Block" ? comment.loc.end.line - 1 : comment.loc.end.line; + for (let i = comment.loc.start.line; i <= endLine; i++) lines.add(i); + }); + return lines; + } + return { Program: function checkTrailingSpaces(node) { + const re = new RegExp(NONBLANK, "u"); + const skipMatch = new RegExp(SKIP_BLANK, "u"); + const lines = sourceCode.lines; + const linebreaks = sourceCode.getText().match(createGlobalLinebreakMatcher()); + const comments = sourceCode.getAllComments(); + const commentLineNumbers = getCommentLineNumbers(comments); + let totalLength = 0; + for (let i = 0, ii = lines.length; i < ii; i++) { + const lineNumber = i + 1; + const linebreakLength = linebreaks && linebreaks[i] ? linebreaks[i].length : 1; + const lineLength = lines[i].length + linebreakLength; + const matches = re.exec(lines[i]); + if (matches) { + const location = { + start: { + line: lineNumber, + column: matches.index + }, + end: { + line: lineNumber, + column: lineLength - linebreakLength + } + }; + const rangeStart = totalLength + location.start.column; + const rangeEnd = totalLength + location.end.column; + const containingNode = sourceCode.getNodeByRangeIndex(rangeStart); + if (containingNode && containingNode.type === "TemplateElement" && rangeStart > containingNode.parent.range[0] && rangeEnd < containingNode.parent.range[1]) { + totalLength += lineLength; + continue; + } + if (skipBlankLines && skipMatch.test(lines[i])) { + totalLength += lineLength; + continue; + } + const fixRange = [rangeStart, rangeEnd]; + if (!ignoreComments || !commentLineNumbers.has(lineNumber)) report(node, location, fixRange); + } + totalLength += lineLength; + } + } }; + } +}); +export { no_trailing_spaces_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-whitespace-before-property.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-whitespace-before-property.js new file mode 100644 index 0000000..53e6acc --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/no-whitespace-before-property.js @@ -0,0 +1,43 @@ +import { ast_exports, createRule, isDecimalInteger } from "../utils.js"; +var no_whitespace_before_property_default = createRule({ + name: "no-whitespace-before-property", + meta: { + type: "layout", + docs: { description: "Disallow whitespace before properties" }, + fixable: "whitespace", + schema: [], + messages: { unexpectedWhitespace: "Unexpected whitespace before property {{propName}}." } + }, + create(context) { + const sourceCode = context.sourceCode; + function reportError(node, leftToken, rightToken) { + context.report({ + node, + messageId: "unexpectedWhitespace", + data: { propName: sourceCode.getText(node.property) }, + fix(fixer) { + let replacementText = ""; + if (!node.computed && !node.optional && isDecimalInteger(node.object)) return null; + if (sourceCode.commentsExistBetween(leftToken, rightToken)) return null; + if (node.optional) replacementText = "?."; + else if (!node.computed) replacementText = "."; + return fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], replacementText); + } + }); + } + return { MemberExpression(node) { + let rightToken; + let leftToken; + if (!(0, ast_exports.isTokenOnSameLine)(node.object, node.property)) return; + if (node.computed) { + rightToken = sourceCode.getTokenBefore(node.property, ast_exports.isOpeningBracketToken); + leftToken = sourceCode.getTokenBefore(rightToken, node.optional ? 1 : 0); + } else { + rightToken = sourceCode.getFirstToken(node.property); + leftToken = sourceCode.getTokenBefore(rightToken, 1); + } + if (sourceCode.isSpaceBetween(leftToken, rightToken)) reportError(node, leftToken, rightToken); + } }; + } +}); +export { no_whitespace_before_property_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/nonblock-statement-body-position.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/nonblock-statement-body-position.js new file mode 100644 index 0000000..1ddd8dc --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/nonblock-statement-body-position.js @@ -0,0 +1,73 @@ +import { ast_exports, createRule } from "../utils.js"; +const POSITION_SCHEMA = { + type: "string", + enum: [ + "beside", + "below", + "any" + ] +}; +var nonblock_statement_body_position_default = createRule({ + name: "nonblock-statement-body-position", + meta: { + type: "layout", + docs: { description: "Enforce the location of single-line statements" }, + fixable: "whitespace", + schema: [POSITION_SCHEMA, { + type: "object", + properties: { overrides: { + type: "object", + properties: { + if: POSITION_SCHEMA, + else: POSITION_SCHEMA, + while: POSITION_SCHEMA, + do: POSITION_SCHEMA, + for: POSITION_SCHEMA + }, + additionalProperties: false + } }, + additionalProperties: false + }], + messages: { + expectNoLinebreak: "Expected no linebreak before this statement.", + expectLinebreak: "Expected a linebreak before this statement." + } + }, + create(context) { + const sourceCode = context.sourceCode; + function getOption(keywordName) { + return context.options[1] && context.options[1].overrides && context.options[1].overrides[keywordName] || context.options[0] || "beside"; + } + function validateStatement(node, keywordName) { + const option = getOption(keywordName); + if (node.type === "BlockStatement" || option === "any") return; + const tokenBefore = sourceCode.getTokenBefore(node); + const onSameLine = (0, ast_exports.isTokenOnSameLine)(tokenBefore, node); + if (onSameLine && option === "below") context.report({ + node, + messageId: "expectLinebreak", + fix: (fixer) => fixer.insertTextBefore(node, "\n") + }); + else if (!onSameLine && option === "beside") context.report({ + node, + messageId: "expectNoLinebreak", + fix(fixer) { + if (sourceCode.getText().slice(tokenBefore.range[1], node.range[0]).trim()) return null; + return fixer.replaceTextRange([tokenBefore.range[1], node.range[0]], " "); + } + }); + } + return { + IfStatement(node) { + validateStatement(node.consequent, "if"); + if (node.alternate && node.alternate.type !== "IfStatement") validateStatement(node.alternate, "else"); + }, + WhileStatement: (node) => validateStatement(node.body, "while"), + DoWhileStatement: (node) => validateStatement(node.body, "do"), + ForStatement: (node) => validateStatement(node.body, "for"), + ForInStatement: (node) => validateStatement(node.body, "for"), + ForOfStatement: (node) => validateStatement(node.body, "for") + }; + } +}); +export { nonblock_statement_body_position_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/object-curly-newline.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/object-curly-newline.js new file mode 100644 index 0000000..011f4c6 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/object-curly-newline.js @@ -0,0 +1,183 @@ +import { ast_exports, createRule } from "../utils.js"; +const OPTION_VALUE = { oneOf: [{ + type: "string", + enum: ["always", "never"] +}, { + type: "object", + properties: { + multiline: { type: "boolean" }, + minProperties: { + type: "integer", + minimum: 0 + }, + consistent: { type: "boolean" } + }, + additionalProperties: false, + minProperties: 1 +}] }; +const defaultOptionValue = { + multiline: false, + minProperties: Number.POSITIVE_INFINITY, + consistent: true +}; +var object_curly_newline_default = createRule({ + name: "object-curly-newline", + meta: { + type: "layout", + docs: { description: "Enforce consistent line breaks after opening and before closing braces" }, + fixable: "whitespace", + schema: [{ oneOf: [OPTION_VALUE, { + type: "object", + properties: { + ObjectExpression: OPTION_VALUE, + ObjectPattern: OPTION_VALUE, + ImportDeclaration: OPTION_VALUE, + ExportDeclaration: OPTION_VALUE, + TSTypeLiteral: OPTION_VALUE, + TSInterfaceBody: OPTION_VALUE, + TSEnumBody: OPTION_VALUE + }, + additionalProperties: false, + minProperties: 1 + }] }], + messages: { + unexpectedLinebreakBeforeClosingBrace: "Unexpected line break before this closing brace.", + unexpectedLinebreakAfterOpeningBrace: "Unexpected line break after this opening brace.", + expectedLinebreakBeforeClosingBrace: "Expected a line break before this closing brace.", + expectedLinebreakAfterOpeningBrace: "Expected a line break after this opening brace." + } + }, + defaultOptions: [{ + ObjectExpression: defaultOptionValue, + ObjectPattern: defaultOptionValue, + ImportDeclaration: defaultOptionValue, + ExportDeclaration: defaultOptionValue, + TSTypeLiteral: defaultOptionValue, + TSInterfaceBody: defaultOptionValue + }], + create(context) { + const sourceCode = context.sourceCode; + function normalizeOptionValue(value) { + let multiline = false; + let minProperties = Number.POSITIVE_INFINITY; + let consistent = false; + if (value) if (value === "always") minProperties = 0; + else if (value === "never") minProperties = Number.POSITIVE_INFINITY; + else { + multiline = Boolean(value.multiline); + minProperties = value.minProperties || Number.POSITIVE_INFINITY; + consistent = Boolean(value.consistent); + } + else consistent = true; + return { + multiline, + minProperties, + consistent + }; + } + function isObject(value) { + return typeof value === "object" && value !== null; + } + function isNodeSpecificOption(option) { + return isObject(option) || typeof option === "string"; + } + function normalizeOptions(options) { + if (isObject(options) && Object.values(options).some(isNodeSpecificOption)) return { + ObjectExpression: normalizeOptionValue(options.ObjectExpression), + ObjectPattern: normalizeOptionValue(options.ObjectPattern), + ImportDeclaration: normalizeOptionValue(options.ImportDeclaration), + ExportNamedDeclaration: normalizeOptionValue(options.ExportDeclaration), + TSTypeLiteral: normalizeOptionValue(options.TSTypeLiteral), + TSInterfaceBody: normalizeOptionValue(options.TSInterfaceBody), + TSEnumBody: normalizeOptionValue(options.TSEnumBody) + }; + const value = normalizeOptionValue(options); + return { + ObjectExpression: value, + ObjectPattern: value, + ImportDeclaration: value, + ExportNamedDeclaration: value, + TSTypeLiteral: value, + TSInterfaceBody: value, + TSEnumBody: value + }; + } + const normalizedOptions = normalizeOptions(context.options[0]); + function areLineBreaksRequired(node, options, first, last) { + let objectProperties; + if (node.type === "ObjectExpression" || node.type === "ObjectPattern") objectProperties = node.properties; + else if (node.type === "TSTypeLiteral") objectProperties = node.members; + else if (node.type === "TSInterfaceBody") objectProperties = node.body; + else if (node.type === "TSEnumBody") objectProperties = node.members; + else objectProperties = node.specifiers.filter((s) => s.type === "ImportSpecifier" || s.type === "ExportSpecifier"); + return objectProperties.length >= options.minProperties || options.multiline && objectProperties.length > 0 && !(0, ast_exports.isTokenOnSameLine)(last, first); + } + function check(node) { + const options = normalizedOptions[node.type]; + if (node.type === "ImportDeclaration" && !node.specifiers.some((specifier) => specifier.type === "ImportSpecifier") || node.type === "ExportNamedDeclaration" && !node.specifiers.some((specifier) => specifier.type === "ExportSpecifier")) return; + const openBrace = sourceCode.getFirstToken(node, (token) => token.value === "{"); + let closeBrace; + if (node.type === "ObjectPattern" && node.typeAnnotation) closeBrace = sourceCode.getTokenBefore(node.typeAnnotation); + else closeBrace = sourceCode.getLastToken(node, (token) => token.value === "}"); + let first = sourceCode.getTokenAfter(openBrace, { includeComments: true }); + let last = sourceCode.getTokenBefore(closeBrace, { includeComments: true }); + const needsLineBreaks = areLineBreaksRequired(node, options, first, last); + const hasCommentsFirstToken = (0, ast_exports.isCommentToken)(first); + const hasCommentsLastToken = (0, ast_exports.isCommentToken)(last); + first = sourceCode.getTokenAfter(openBrace); + last = sourceCode.getTokenBefore(closeBrace); + if (needsLineBreaks) { + if ((0, ast_exports.isTokenOnSameLine)(openBrace, first)) context.report({ + messageId: "expectedLinebreakAfterOpeningBrace", + node, + loc: openBrace.loc, + fix(fixer) { + if (hasCommentsFirstToken) return null; + return fixer.insertTextAfter(openBrace, "\n"); + } + }); + if ((0, ast_exports.isTokenOnSameLine)(last, closeBrace)) context.report({ + messageId: "expectedLinebreakBeforeClosingBrace", + node, + loc: closeBrace.loc, + fix(fixer) { + if (hasCommentsLastToken) return null; + return fixer.insertTextBefore(closeBrace, "\n"); + } + }); + } else { + const consistent = options.consistent; + const hasLineBreakBetweenOpenBraceAndFirst = !(0, ast_exports.isTokenOnSameLine)(openBrace, first); + const hasLineBreakBetweenCloseBraceAndLast = !(0, ast_exports.isTokenOnSameLine)(last, closeBrace); + if (!consistent && hasLineBreakBetweenOpenBraceAndFirst || consistent && hasLineBreakBetweenOpenBraceAndFirst && !hasLineBreakBetweenCloseBraceAndLast) context.report({ + messageId: "unexpectedLinebreakAfterOpeningBrace", + node, + loc: openBrace.loc, + fix(fixer) { + if (hasCommentsFirstToken) return null; + return fixer.removeRange([openBrace.range[1], first.range[0]]); + } + }); + if (!consistent && hasLineBreakBetweenCloseBraceAndLast || consistent && !hasLineBreakBetweenOpenBraceAndFirst && hasLineBreakBetweenCloseBraceAndLast) context.report({ + messageId: "unexpectedLinebreakBeforeClosingBrace", + node, + loc: closeBrace.loc, + fix(fixer) { + if (hasCommentsLastToken) return null; + return fixer.removeRange([last.range[1], closeBrace.range[0]]); + } + }); + } + } + return { + ObjectExpression: check, + ObjectPattern: check, + ImportDeclaration: check, + ExportNamedDeclaration: check, + TSTypeLiteral: check, + TSInterfaceBody: check, + TSEnumBody: check + }; + } +}); +export { object_curly_newline_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/object-curly-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/object-curly-spacing.js new file mode 100644 index 0000000..984e3ae --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/object-curly-spacing.js @@ -0,0 +1,180 @@ +import { AST_NODE_TYPES, AST_TOKEN_TYPES, ast_exports, createRule } from "../utils.js"; +const SUPPORTED_NODES = [ + "ObjectPattern", + "ObjectExpression", + "ImportDeclaration", + "ImportAttributes", + "ExportNamedDeclaration", + "ExportAllDeclaration", + "TSMappedType", + "TSTypeLiteral", + "TSInterfaceBody", + "TSEnumBody" +]; +var object_curly_spacing_default = createRule({ + name: "object-curly-spacing", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing inside braces" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: ["always", "never"] + }, { + type: "object", + properties: { + arraysInObjects: { type: "boolean" }, + objectsInObjects: { type: "boolean" }, + overrides: { + type: "object", + properties: Object.fromEntries(SUPPORTED_NODES.map((node) => [node, { + type: "string", + enum: ["always", "never"] + }])), + additionalProperties: false + } + }, + additionalProperties: false + }], + messages: { + requireSpaceBefore: "A space is required before '{{token}}'.", + requireSpaceAfter: "A space is required after '{{token}}'.", + unexpectedSpaceBefore: "There should be no space before '{{token}}'.", + unexpectedSpaceAfter: "There should be no space after '{{token}}'." + } + }, + defaultOptions: ["never"], + create(context) { + const [firstOption, secondOption] = context.options; + const spaced = firstOption === "always"; + const sourceCode = context.sourceCode; + function isOptionSet(option) { + return secondOption ? secondOption[option] === !spaced : false; + } + const options = { + spaced, + arraysInObjectsException: isOptionSet("arraysInObjects"), + objectsInObjectsException: isOptionSet("objectsInObjects"), + overrides: secondOption?.overrides ?? {} + }; + function reportNoBeginningSpace(node, token) { + const nextToken = sourceCode.getTokenAfter(token, { includeComments: true }); + context.report({ + node, + loc: { + start: token.loc.end, + end: nextToken.loc.start + }, + messageId: "unexpectedSpaceAfter", + data: { token: token.value }, + fix(fixer) { + return fixer.removeRange([token.range[1], nextToken.range[0]]); + } + }); + } + function reportNoEndingSpace(node, token) { + const previousToken = sourceCode.getTokenBefore(token, { includeComments: true }); + context.report({ + node, + loc: { + start: previousToken.loc.end, + end: token.loc.start + }, + messageId: "unexpectedSpaceBefore", + data: { token: token.value }, + fix(fixer) { + return fixer.removeRange([previousToken.range[1], token.range[0]]); + } + }); + } + function reportRequiredBeginningSpace(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "requireSpaceAfter", + data: { token: token.value }, + fix(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); + } + function reportRequiredEndingSpace(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "requireSpaceBefore", + data: { token: token.value }, + fix(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + } + function validateBraceSpacing(node, openingToken, closingToken, nodeType = node.type) { + const tokenAfterOpening = sourceCode.getTokenAfter(openingToken, { includeComments: true }); + const spaced$1 = options.overrides[nodeType] ? options.overrides[nodeType] === "always" : options.spaced; + if ((0, ast_exports.isTokenOnSameLine)(openingToken, tokenAfterOpening)) { + const firstSpaced = sourceCode.isSpaceBetween(openingToken, tokenAfterOpening); + const secondType = sourceCode.getNodeByRangeIndex(tokenAfterOpening.range[0]).type; + const openingCurlyBraceMustBeSpaced = options.arraysInObjectsException && [AST_NODE_TYPES.TSMappedType, AST_NODE_TYPES.TSIndexSignature].includes(secondType) ? !spaced$1 : spaced$1; + if (openingCurlyBraceMustBeSpaced && !firstSpaced) reportRequiredBeginningSpace(node, openingToken); + if (!openingCurlyBraceMustBeSpaced && firstSpaced && tokenAfterOpening.type !== AST_TOKEN_TYPES.Line) reportNoBeginningSpace(node, openingToken); + } + const tokenBeforeClosing = sourceCode.getTokenBefore(closingToken, { includeComments: true }); + if ((0, ast_exports.isTokenOnSameLine)(tokenBeforeClosing, closingToken)) { + const shouldCheckPenultimate = options.arraysInObjectsException && (0, ast_exports.isClosingBracketToken)(tokenBeforeClosing) || options.objectsInObjectsException && (0, ast_exports.isClosingBraceToken)(tokenBeforeClosing); + const penultimateType = shouldCheckPenultimate ? sourceCode.getNodeByRangeIndex(tokenBeforeClosing.range[0]).type : void 0; + const closingCurlyBraceMustBeSpaced = options.arraysInObjectsException && [AST_NODE_TYPES.ArrayExpression, AST_NODE_TYPES.TSTupleType].includes(penultimateType) || options.objectsInObjectsException && penultimateType !== void 0 && [ + AST_NODE_TYPES.ObjectExpression, + AST_NODE_TYPES.ObjectPattern, + AST_NODE_TYPES.TSMappedType, + AST_NODE_TYPES.TSTypeLiteral + ].includes(penultimateType) ? !spaced$1 : spaced$1; + const lastSpaced = sourceCode.isSpaceBetween(tokenBeforeClosing, closingToken); + if (closingCurlyBraceMustBeSpaced && !lastSpaced) reportRequiredEndingSpace(node, closingToken); + if (!closingCurlyBraceMustBeSpaced && lastSpaced) reportNoEndingSpace(node, closingToken); + } + } + function checkForObjectLike(node, properties, nodeType = node.type) { + if (properties.length === 0) return; + const openingToken = sourceCode.getTokenBefore(properties[0], ast_exports.isOpeningBraceToken); + const closeToken = sourceCode.getTokenAfter(properties.at(-1), ast_exports.isClosingBraceToken); + validateBraceSpacing(node, openingToken, closeToken, nodeType); + } + return { + ObjectPattern(node) { + checkForObjectLike(node, node.properties); + }, + ObjectExpression(node) { + checkForObjectLike(node, node.properties); + }, + ImportDeclaration(node) { + if (node.attributes) checkForObjectLike(node, node.attributes, "ImportAttributes"); + const firstSpecifierIndex = node.specifiers.findIndex((specifier) => specifier.type === "ImportSpecifier"); + if (firstSpecifierIndex === -1) return; + checkForObjectLike(node, node.specifiers.slice(firstSpecifierIndex)); + }, + ExportNamedDeclaration(node) { + checkForObjectLike(node, node.specifiers); + if (node.attributes) checkForObjectLike(node, node.attributes, "ImportAttributes"); + }, + ExportAllDeclaration(node) { + if (node.attributes) checkForObjectLike(node, node.attributes, "ImportAttributes"); + }, + TSMappedType(node) { + const openingToken = sourceCode.getFirstToken(node); + const closeToken = sourceCode.getLastToken(node); + validateBraceSpacing(node, openingToken, closeToken); + }, + TSTypeLiteral(node) { + checkForObjectLike(node, node.members); + }, + TSInterfaceBody(node) { + checkForObjectLike(node, node.body); + }, + TSEnumBody(node) { + checkForObjectLike(node, node.members); + } + }; + } +}); +export { object_curly_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/object-property-newline.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/object-property-newline.js new file mode 100644 index 0000000..cb78fb9 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/object-property-newline.js @@ -0,0 +1,63 @@ +import { ast_exports, createRule } from "../utils.js"; +var object_property_newline_default = createRule({ + name: "object-property-newline", + meta: { + type: "layout", + docs: { description: "Enforce placing object properties on separate lines" }, + schema: [{ + type: "object", + properties: { allowAllPropertiesOnSameLine: { + type: "boolean", + default: false + } }, + additionalProperties: false + }], + fixable: "whitespace", + messages: { + propertiesOnNewlineAll: "Object properties must go on a new line if they aren't all on the same line.", + propertiesOnNewline: "Object properties must go on a new line." + } + }, + defaultOptions: [{ allowAllPropertiesOnSameLine: false }], + create(context) { + const allowSameLine = context.options[0] && context.options[0].allowAllPropertiesOnSameLine; + const messageId = allowSameLine ? "propertiesOnNewlineAll" : "propertiesOnNewline"; + const sourceCode = context.sourceCode; + function check(node, children) { + if (allowSameLine) { + if (children.length > 1) { + const firstTokenOfFirstProperty = sourceCode.getFirstToken(children[0]); + const lastTokenOfLastProperty = sourceCode.getLastToken(children[children.length - 1]); + if ((0, ast_exports.isTokenOnSameLine)(firstTokenOfFirstProperty, lastTokenOfLastProperty)) return; + } + } + for (let i = 1; i < children.length; i++) { + const lastTokenOfPreviousProperty = sourceCode.getLastToken(children[i - 1]); + const firstTokenOfCurrentProperty = sourceCode.getFirstToken(children[i]); + if ((0, ast_exports.isTokenOnSameLine)(lastTokenOfPreviousProperty, firstTokenOfCurrentProperty)) context.report({ + node, + loc: firstTokenOfCurrentProperty.loc, + messageId, + fix(fixer) { + const comma = sourceCode.getTokenBefore(firstTokenOfCurrentProperty); + const rangeAfterComma = [comma.range[1], firstTokenOfCurrentProperty.range[0]]; + if (sourceCode.text.slice(rangeAfterComma[0], rangeAfterComma[1]).trim()) return null; + return fixer.replaceTextRange(rangeAfterComma, "\n"); + } + }); + } + } + return { + ObjectExpression(node) { + check(node, node.properties); + }, + TSTypeLiteral(node) { + check(node, node.members); + }, + TSInterfaceBody(node) { + check(node, node.body); + } + }; + } +}); +export { object_property_newline_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/one-var-declaration-per-line.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/one-var-declaration-per-line.js new file mode 100644 index 0000000..c720339 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/one-var-declaration-per-line.js @@ -0,0 +1,47 @@ +import { ast_exports, createRule } from "../utils.js"; +var one_var_declaration_per_line_default = createRule({ + name: "one-var-declaration-per-line", + meta: { + type: "layout", + docs: { description: "Require or disallow newlines around variable declarations" }, + schema: [{ + type: "string", + enum: ["always", "initializations"] + }], + fixable: "whitespace", + messages: { expectVarOnNewline: "Expected variable declaration to be on a new line." } + }, + create(context) { + const { sourceCode } = context; + const always = context.options[0] === "always"; + function isForTypeSpecifier(keyword) { + return keyword === "ForStatement" || keyword === "ForInStatement" || keyword === "ForOfStatement"; + } + function checkForNewLine(node) { + if (isForTypeSpecifier(node.parent.type)) return; + const declarations = node.declarations; + let prev; + declarations.forEach((current) => { + if (prev && (0, ast_exports.isTokenOnSameLine)(prev, current)) { + if (always || prev.init || current.init) { + let fix = (fixer) => fixer.insertTextBefore(current, "\n"); + const tokenBeforeDeclarator = sourceCode.getTokenBefore(current, { includeComments: false }); + if (tokenBeforeDeclarator) { + const betweenText = sourceCode.text.slice(tokenBeforeDeclarator.range[1], current.range[0]); + fix = (fixer) => fixer.replaceTextRange([tokenBeforeDeclarator.range[1], current.range[0]], `${betweenText}\n`); + } + context.report({ + node, + messageId: "expectVarOnNewline", + loc: current.loc, + fix + }); + } + } + prev = current; + }); + } + return { VariableDeclaration: checkForNewLine }; + } +}); +export { one_var_declaration_per_line_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/operator-linebreak.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/operator-linebreak.js new file mode 100644 index 0000000..edab3cf --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/operator-linebreak.js @@ -0,0 +1,154 @@ +import { ast_exports, createGlobalLinebreakMatcher, createRule } from "../utils.js"; +var operator_linebreak_default = createRule({ + name: "operator-linebreak", + meta: { + type: "layout", + docs: { description: "Enforce consistent linebreak style for operators" }, + schema: [{ oneOf: [{ + type: "string", + enum: [ + "after", + "before", + "none" + ] + }, { type: "null" }] }, { + type: "object", + properties: { overrides: { + type: "object", + additionalProperties: { + type: "string", + enum: [ + "after", + "before", + "none", + "ignore" + ] + } + } }, + additionalProperties: false + }], + fixable: "code", + messages: { + operatorAtBeginning: "'{{operator}}' should be placed at the beginning of the line.", + operatorAtEnd: "'{{operator}}' should be placed at the end of the line.", + badLinebreak: "Bad line breaking before and after '{{operator}}'.", + noLinebreak: "There should be no line break before or after '{{operator}}'." + } + }, + create(context) { + const usedDefaultGlobal = !context.options[0]; + const globalStyle = context.options[0] || "after"; + const options = context.options[1] || {}; + const styleOverrides = options.overrides ? Object.assign({}, options.overrides) : {}; + if (usedDefaultGlobal && !styleOverrides["?"]) styleOverrides["?"] = "before"; + if (usedDefaultGlobal && !styleOverrides[":"]) styleOverrides[":"] = "before"; + const sourceCode = context.sourceCode; + function getFixer(operatorToken, desiredStyle) { + return (fixer) => { + const tokenBefore = sourceCode.getTokenBefore(operatorToken); + const tokenAfter = sourceCode.getTokenAfter(operatorToken); + const textBefore = sourceCode.text.slice(tokenBefore.range[1], operatorToken.range[0]); + const textAfter = sourceCode.text.slice(operatorToken.range[1], tokenAfter.range[0]); + const hasLinebreakBefore = !(0, ast_exports.isTokenOnSameLine)(tokenBefore, operatorToken); + const hasLinebreakAfter = !(0, ast_exports.isTokenOnSameLine)(operatorToken, tokenAfter); + let newTextBefore, newTextAfter; + if (hasLinebreakBefore !== hasLinebreakAfter && desiredStyle !== "none") { + if (sourceCode.getTokenBefore(operatorToken, { includeComments: true }) !== tokenBefore && sourceCode.getTokenAfter(operatorToken, { includeComments: true }) !== tokenAfter) return null; + newTextBefore = textAfter; + newTextAfter = textBefore; + } else { + const LINEBREAK_REGEX = createGlobalLinebreakMatcher(); + newTextBefore = desiredStyle === "before" || textBefore.trim() ? textBefore : textBefore.replace(LINEBREAK_REGEX, ""); + newTextAfter = desiredStyle === "after" || textAfter.trim() ? textAfter : textAfter.replace(LINEBREAK_REGEX, ""); + if (newTextBefore === textBefore && newTextAfter === textAfter) return null; + } + if (newTextAfter === "" && tokenAfter.type === "Punctuator" && "+-".includes(operatorToken.value) && tokenAfter.value === operatorToken.value) newTextAfter += " "; + return fixer.replaceTextRange([tokenBefore.range[1], tokenAfter.range[0]], newTextBefore + operatorToken.value + newTextAfter); + }; + } + function validateNode(node, rightSide, operator) { + const operatorToken = sourceCode.getTokenBefore(rightSide, (token) => token.value === operator); + const leftToken = sourceCode.getTokenBefore(operatorToken); + const rightToken = sourceCode.getTokenAfter(operatorToken); + const operatorStyleOverride = styleOverrides[operator]; + const style = operatorStyleOverride || globalStyle; + const fix = getFixer(operatorToken, style); + if ((0, ast_exports.isTokenOnSameLine)(leftToken, operatorToken) && (0, ast_exports.isTokenOnSameLine)(operatorToken, rightToken)) {} else if (operatorStyleOverride !== "ignore" && !(0, ast_exports.isTokenOnSameLine)(leftToken, operatorToken) && !(0, ast_exports.isTokenOnSameLine)(operatorToken, rightToken)) context.report({ + node, + loc: operatorToken.loc, + messageId: "badLinebreak", + data: { operator }, + fix + }); + else if (style === "before" && (0, ast_exports.isTokenOnSameLine)(leftToken, operatorToken)) context.report({ + node, + loc: operatorToken.loc, + messageId: "operatorAtBeginning", + data: { operator }, + fix + }); + else if (style === "after" && (0, ast_exports.isTokenOnSameLine)(operatorToken, rightToken)) context.report({ + node, + loc: operatorToken.loc, + messageId: "operatorAtEnd", + data: { operator }, + fix + }); + else if (style === "none") context.report({ + node, + loc: operatorToken.loc, + messageId: "noLinebreak", + data: { operator }, + fix + }); + } + function validateBinaryExpression(node) { + validateNode(node, node.right, node.operator); + } + return { + BinaryExpression: validateBinaryExpression, + LogicalExpression: validateBinaryExpression, + AssignmentExpression: validateBinaryExpression, + VariableDeclarator(node) { + if (node.init) validateNode(node, node.init, "="); + }, + PropertyDefinition(node) { + if (node.value) validateNode(node, node.value, "="); + }, + AccessorProperty(node) { + if (node.value) validateNode(node, node.value, "="); + }, + ConditionalExpression(node) { + validateNode(node, node.consequent, "?"); + validateNode(node, node.alternate, ":"); + }, + TSImportEqualsDeclaration(node) { + validateNode(node, node.moduleReference, "="); + }, + TSTypeAliasDeclaration(node) { + validateNode(node, node.typeAnnotation, "="); + }, + TSConditionalType(node) { + validateNode(node, node.trueType, "?"); + validateNode(node, node.falseType, ":"); + }, + TSIntersectionType(node) { + const { types } = node; + for (let idx = 0; idx < types.length - 1; idx++) validateNode(types[idx], types[idx + 1], "&"); + }, + TSUnionType(node) { + const { types } = node; + for (let idx = 0; idx < types.length - 1; idx++) validateNode(types[idx], types[idx + 1], "|"); + }, + TSTypeParameter(node) { + if (!node.default) return; + validateNode(node, node.default, "="); + }, + TSEnumMember(node) { + if (!node.initializer) return; + validateNode(node, node.initializer, "="); + } + }; + } +}); +export { operator_linebreak_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/padded-blocks.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/padded-blocks.js new file mode 100644 index 0000000..2b90fb7 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/padded-blocks.js @@ -0,0 +1,171 @@ +import { ast_exports, createRule } from "../utils.js"; +const OPTION_ENUMS = [ + "always", + "never", + "start", + "end" +]; +var padded_blocks_default = createRule({ + name: "padded-blocks", + meta: { + type: "layout", + docs: { description: "Require or disallow padding within blocks" }, + fixable: "whitespace", + schema: [{ oneOf: [{ + type: "string", + enum: OPTION_ENUMS + }, { + type: "object", + properties: { + blocks: { + type: "string", + enum: OPTION_ENUMS + }, + switches: { + type: "string", + enum: OPTION_ENUMS + }, + classes: { + type: "string", + enum: OPTION_ENUMS + } + }, + additionalProperties: false, + minProperties: 1 + }] }, { + type: "object", + properties: { allowSingleLineBlocks: { type: "boolean" } }, + additionalProperties: false + }], + messages: { + missingPadBlock: "Block must be padded by blank lines.", + extraPadBlock: "Block must not be padded by blank lines." + } + }, + create(context) { + const options = {}; + const typeOptions = context.options[0] || "always"; + const exceptOptions = context.options[1] || {}; + if (typeof typeOptions === "string") { + options.blocks = typeOptions; + options.switches = typeOptions; + options.classes = typeOptions; + } else Object.assign(options, typeOptions); + exceptOptions.allowSingleLineBlocks ??= false; + const sourceCode = context.sourceCode; + function getOpenBrace(node) { + if (node.type === "SwitchStatement") return sourceCode.getTokenBefore(node.cases[0]); + if (node.type === "StaticBlock") return sourceCode.getFirstToken(node, { skip: 1 }); + return sourceCode.getFirstToken(node); + } + function isComment(node) { + return node.type === "Line" || node.type === "Block"; + } + function isPaddingBetweenTokens(first, second) { + return second.loc.start.line - first.loc.end.line >= 2; + } + function getFirstBlockToken(token) { + let prev; + let first = token; + do { + prev = first; + first = sourceCode.getTokenAfter(first, { includeComments: true }); + } while (isComment(first) && (0, ast_exports.isTokenOnSameLine)(prev, first)); + return first; + } + function getLastBlockToken(token) { + let last = token; + let next; + do { + next = last; + last = sourceCode.getTokenBefore(last, { includeComments: true }); + } while (isComment(last) && (0, ast_exports.isTokenOnSameLine)(last, next)); + return last; + } + function requirePaddingFor(node) { + switch (node.type) { + case "BlockStatement": + case "StaticBlock": return options.blocks; + case "SwitchStatement": return options.switches; + case "ClassBody": return options.classes; + default: throw new Error("unreachable"); + } + } + function checkPadding(node) { + const openBrace = getOpenBrace(node); + const firstBlockToken = getFirstBlockToken(openBrace); + const tokenBeforeFirst = sourceCode.getTokenBefore(firstBlockToken, { includeComments: true }); + const closeBrace = sourceCode.getLastToken(node); + const lastBlockToken = getLastBlockToken(closeBrace); + const tokenAfterLast = sourceCode.getTokenAfter(lastBlockToken, { includeComments: true }); + const blockHasTopPadding = isPaddingBetweenTokens(tokenBeforeFirst, firstBlockToken); + const blockHasBottomPadding = isPaddingBetweenTokens(lastBlockToken, tokenAfterLast); + if (exceptOptions.allowSingleLineBlocks && (0, ast_exports.isTokenOnSameLine)(tokenBeforeFirst, tokenAfterLast)) return; + const requiredPadding = requirePaddingFor(node); + if (blockHasTopPadding) { + if (requiredPadding === "never" || requiredPadding === "end") context.report({ + node, + loc: { + start: tokenBeforeFirst.loc.start, + end: firstBlockToken.loc.start + }, + fix(fixer) { + return fixer.replaceTextRange([tokenBeforeFirst.range[1], firstBlockToken.range[0] - firstBlockToken.loc.start.column], "\n"); + }, + messageId: "extraPadBlock" + }); + } else if (requiredPadding === "always" || requiredPadding === "start") context.report({ + node, + loc: { + start: tokenBeforeFirst.loc.start, + end: firstBlockToken.loc.start + }, + fix(fixer) { + return fixer.insertTextAfter(tokenBeforeFirst, "\n"); + }, + messageId: "missingPadBlock" + }); + if (blockHasBottomPadding) { + if (requiredPadding === "never" || requiredPadding === "start") context.report({ + node, + loc: { + end: tokenAfterLast.loc.start, + start: lastBlockToken.loc.end + }, + messageId: "extraPadBlock", + fix(fixer) { + return fixer.replaceTextRange([lastBlockToken.range[1], tokenAfterLast.range[0] - tokenAfterLast.loc.start.column], "\n"); + } + }); + } else if (requiredPadding === "always" || requiredPadding === "end") context.report({ + node, + loc: { + end: tokenAfterLast.loc.start, + start: lastBlockToken.loc.end + }, + fix(fixer) { + return fixer.insertTextBefore(tokenAfterLast, "\n"); + }, + messageId: "missingPadBlock" + }); + } + const rule = {}; + if (Object.prototype.hasOwnProperty.call(options, "switches")) rule.SwitchStatement = function(node) { + if (node.cases.length === 0) return; + checkPadding(node); + }; + if (Object.prototype.hasOwnProperty.call(options, "blocks")) { + rule.BlockStatement = function(node) { + if (node.body.length === 0) return; + checkPadding(node); + }; + rule.StaticBlock = rule.BlockStatement; + } + if (Object.prototype.hasOwnProperty.call(options, "classes")) rule.ClassBody = function(node) { + if (node.body.length === 0) return; + checkPadding(node); + }; + return rule; + } +}); +export { padded_blocks_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/padding-line-between-statements.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/padding-line-between-statements.js new file mode 100644 index 0000000..60a34cf --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/padding-line-between-statements.js @@ -0,0 +1,323 @@ +import { AST_NODE_TYPES, LINEBREAKS, ast_exports, createRule, isSingleLine, isTopLevelExpressionStatement, skipChainExpression } from "../utils.js"; +const CJS_EXPORT = /^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u; +const CJS_IMPORT = /^require\(/u; +const LT = `[${Array.from(LINEBREAKS).join("")}]`; +const PADDING_LINE_SEQUENCE = new RegExp(String.raw`^(\s*?${LT})\s*${LT}(\s*;?)$`, "u"); +function newKeywordTester(type, keyword) { + return { test(node, sourceCode) { + const isSameKeyword = sourceCode.getFirstToken(node)?.value === keyword; + const isSameType = Array.isArray(type) ? type.includes(node.type) : type === node.type; + return isSameKeyword && isSameType; + } }; +} +function newNodeTypeTester(type) { + return { test: (node) => node.type === type }; +} +function isIIFEStatement(node) { + if (node.type === AST_NODE_TYPES.ExpressionStatement) { + let expression = skipChainExpression(node.expression); + if (expression.type === AST_NODE_TYPES.UnaryExpression) expression = skipChainExpression(expression.argument); + if (expression.type === AST_NODE_TYPES.CallExpression) { + let node$1 = expression.callee; + while (node$1.type === AST_NODE_TYPES.SequenceExpression) node$1 = node$1.expressions[node$1.expressions.length - 1]; + return (0, ast_exports.isFunction)(node$1); + } + } + return false; +} +function isCJSRequire(node) { + if (node.type === AST_NODE_TYPES.VariableDeclaration) { + const declaration = node.declarations[0]; + if (declaration?.init) { + let call = declaration?.init; + while (call.type === AST_NODE_TYPES.MemberExpression) call = call.object; + if (call.type === AST_NODE_TYPES.CallExpression && call.callee.type === AST_NODE_TYPES.Identifier) return call.callee.name === "require"; + } + } + return false; +} +function isBlockLikeStatement(node, sourceCode) { + if (node.type === AST_NODE_TYPES.DoWhileStatement && node.body.type === AST_NODE_TYPES.BlockStatement) return true; + if (isIIFEStatement(node)) return true; + const lastToken = sourceCode.getLastToken(node, ast_exports.isNotSemicolonToken); + const belongingNode = lastToken && (0, ast_exports.isClosingBraceToken)(lastToken) ? sourceCode.getNodeByRangeIndex(lastToken.range[0]) : null; + return !!belongingNode && (belongingNode.type === AST_NODE_TYPES.BlockStatement || belongingNode.type === AST_NODE_TYPES.SwitchStatement); +} +function isDirective(node, sourceCode) { + return isTopLevelExpressionStatement(node) && node.expression.type === AST_NODE_TYPES.Literal && typeof node.expression.value === "string" && !(0, ast_exports.isParenthesized)(node.expression, sourceCode); +} +function isDirectivePrologue(node, sourceCode) { + if (isDirective(node, sourceCode) && node.parent && "body" in node.parent && Array.isArray(node.parent.body)) { + for (const sibling of node.parent.body) { + if (sibling === node) break; + if (!isDirective(sibling, sourceCode)) return false; + } + return true; + } + return false; +} +function isCJSExport(node) { + if (node.type === AST_NODE_TYPES.ExpressionStatement) { + const expression = node.expression; + if (expression.type === AST_NODE_TYPES.AssignmentExpression) { + let left = expression.left; + if (left.type === AST_NODE_TYPES.MemberExpression) { + while (left.object.type === AST_NODE_TYPES.MemberExpression) left = left.object; + return left.object.type === AST_NODE_TYPES.Identifier && (left.object.name === "exports" || left.object.name === "module" && left.property.type === AST_NODE_TYPES.Identifier && left.property.name === "exports"); + } + } + } + return false; +} +function isExpression(node, sourceCode) { + return node.type === AST_NODE_TYPES.ExpressionStatement && !isDirectivePrologue(node, sourceCode); +} +function getActualLastToken(node, sourceCode) { + const semiToken = sourceCode.getLastToken(node); + const prevToken = sourceCode.getTokenBefore(semiToken); + const nextToken = sourceCode.getTokenAfter(semiToken); + const isSemicolonLessStyle = prevToken && nextToken && prevToken.range[0] >= node.range[0] && (0, ast_exports.isSemicolonToken)(semiToken) && !(0, ast_exports.isTokenOnSameLine)(prevToken, semiToken) && (0, ast_exports.isTokenOnSameLine)(semiToken, nextToken); + return isSemicolonLessStyle ? prevToken : semiToken; +} +function replacerToRemovePaddingLines(_, trailingSpaces, indentSpaces) { + return trailingSpaces + indentSpaces; +} +function verifyForAny() {} +function verifyForNever(context, _, nextNode, paddingLines) { + if (paddingLines.length === 0) return; + context.report({ + node: nextNode, + messageId: "unexpectedBlankLine", + fix(fixer) { + if (paddingLines.length >= 2) return null; + const prevToken = paddingLines[0][0]; + const nextToken = paddingLines[0][1]; + const start = prevToken.range[1]; + const end = nextToken.range[0]; + const text = context.getSourceCode().text.slice(start, end).replace(PADDING_LINE_SEQUENCE, replacerToRemovePaddingLines); + return fixer.replaceTextRange([start, end], text); + } + }); +} +function verifyForAlways(context, prevNode, nextNode, paddingLines) { + if (paddingLines.length > 0) return; + context.report({ + node: nextNode, + messageId: "expectedBlankLine", + fix(fixer) { + const sourceCode = context.sourceCode; + let prevToken = getActualLastToken(prevNode, sourceCode); + const nextToken = sourceCode.getFirstTokenBetween(prevToken, nextNode, { + includeComments: true, + filter(token) { + if ((0, ast_exports.isTokenOnSameLine)(prevToken, token)) { + prevToken = token; + return false; + } + return true; + } + }) || nextNode; + const insertText = (0, ast_exports.isTokenOnSameLine)(prevToken, nextToken) ? "\n\n" : "\n"; + return fixer.insertTextAfter(prevToken, insertText); + } + }); +} +const PaddingTypes = { + any: { verify: verifyForAny }, + never: { verify: verifyForNever }, + always: { verify: verifyForAlways } +}; +const MaybeMultilineStatementType = { + "block-like": { test: isBlockLikeStatement }, + "expression": { test: isExpression }, + "return": newKeywordTester(AST_NODE_TYPES.ReturnStatement, "return"), + "export": newKeywordTester([ + AST_NODE_TYPES.ExportAllDeclaration, + AST_NODE_TYPES.ExportDefaultDeclaration, + AST_NODE_TYPES.ExportNamedDeclaration + ], "export"), + "var": newKeywordTester(AST_NODE_TYPES.VariableDeclaration, "var"), + "let": newKeywordTester(AST_NODE_TYPES.VariableDeclaration, "let"), + "const": newKeywordTester(AST_NODE_TYPES.VariableDeclaration, "const"), + "using": { test: (node) => node.type === "VariableDeclaration" && (node.kind === "using" || node.kind === "await using") }, + "type": newKeywordTester(AST_NODE_TYPES.TSTypeAliasDeclaration, "type") +}; +const StatementTypes = { + "*": { test: () => true }, + "exports": { test: isCJSExport }, + "require": { test: isCJSRequire }, + "directive": { test: isDirectivePrologue }, + "iife": { test: isIIFEStatement }, + "block": newNodeTypeTester(AST_NODE_TYPES.BlockStatement), + "empty": newNodeTypeTester(AST_NODE_TYPES.EmptyStatement), + "function": newNodeTypeTester(AST_NODE_TYPES.FunctionDeclaration), + "ts-method": newNodeTypeTester(AST_NODE_TYPES.TSMethodSignature), + "break": newKeywordTester(AST_NODE_TYPES.BreakStatement, "break"), + "case": newKeywordTester(AST_NODE_TYPES.SwitchCase, "case"), + "class": newKeywordTester(AST_NODE_TYPES.ClassDeclaration, "class"), + "continue": newKeywordTester(AST_NODE_TYPES.ContinueStatement, "continue"), + "debugger": newKeywordTester(AST_NODE_TYPES.DebuggerStatement, "debugger"), + "default": newKeywordTester([AST_NODE_TYPES.SwitchCase, AST_NODE_TYPES.ExportDefaultDeclaration], "default"), + "do": newKeywordTester(AST_NODE_TYPES.DoWhileStatement, "do"), + "for": newKeywordTester([ + AST_NODE_TYPES.ForStatement, + AST_NODE_TYPES.ForInStatement, + AST_NODE_TYPES.ForOfStatement + ], "for"), + "if": newKeywordTester(AST_NODE_TYPES.IfStatement, "if"), + "import": newKeywordTester(AST_NODE_TYPES.ImportDeclaration, "import"), + "switch": newKeywordTester(AST_NODE_TYPES.SwitchStatement, "switch"), + "throw": newKeywordTester(AST_NODE_TYPES.ThrowStatement, "throw"), + "try": newKeywordTester(AST_NODE_TYPES.TryStatement, "try"), + "while": newKeywordTester([AST_NODE_TYPES.WhileStatement, AST_NODE_TYPES.DoWhileStatement], "while"), + "with": newKeywordTester(AST_NODE_TYPES.WithStatement, "with"), + "cjs-export": { test: (node, sourceCode) => node.type === "ExpressionStatement" && node.expression.type === "AssignmentExpression" && CJS_EXPORT.test(sourceCode.getText(node.expression.left)) }, + "cjs-import": { test: (node, sourceCode) => node.type === "VariableDeclaration" && node.declarations.length > 0 && Boolean(node.declarations[0].init) && CJS_IMPORT.test(sourceCode.getText(node.declarations[0].init)) }, + "enum": newKeywordTester(AST_NODE_TYPES.TSEnumDeclaration, "enum"), + "interface": newKeywordTester(AST_NODE_TYPES.TSInterfaceDeclaration, "interface"), + "function-overload": newNodeTypeTester(AST_NODE_TYPES.TSDeclareFunction), + ...Object.fromEntries(Object.entries(MaybeMultilineStatementType).flatMap(([key, value]) => [ + [key, value], + [`singleline-${key}`, { + ...value, + test: (node, sourceCode) => value.test(node, sourceCode) && isSingleLine(node) + }], + [`multiline-${key}`, { + ...value, + test: (node, sourceCode) => value.test(node, sourceCode) && !isSingleLine(node) + }] + ])) +}; +var padding_line_between_statements_default = createRule({ + name: "padding-line-between-statements", + meta: { + type: "layout", + docs: { description: "Require or disallow padding lines between statements" }, + fixable: "whitespace", + hasSuggestions: false, + schema: { + $defs: { + paddingType: { + type: "string", + enum: Object.keys(PaddingTypes) + }, + statementType: { + type: "string", + enum: Object.keys(StatementTypes) + }, + statementOption: { anyOf: [{ $ref: "#/$defs/statementType" }, { + type: "array", + items: { $ref: "#/$defs/statementType" }, + minItems: 1, + uniqueItems: true, + additionalItems: false + }] } + }, + type: "array", + additionalItems: false, + items: { + type: "object", + properties: { + blankLine: { $ref: "#/$defs/paddingType" }, + prev: { $ref: "#/$defs/statementOption" }, + next: { $ref: "#/$defs/statementOption" } + }, + additionalProperties: false, + required: [ + "blankLine", + "prev", + "next" + ] + } + }, + messages: { + unexpectedBlankLine: "Unexpected blank line before this statement.", + expectedBlankLine: "Expected blank line before this statement." + } + }, + defaultOptions: [], + create(context) { + const sourceCode = context.sourceCode; + const configureList = context.options || []; + let scopeInfo = null; + function enterScope() { + scopeInfo = { + upper: scopeInfo, + prevNode: null + }; + } + function exitScope() { + if (scopeInfo) scopeInfo = scopeInfo.upper; + } + function match(node, type) { + let innerStatementNode = node; + while (innerStatementNode.type === AST_NODE_TYPES.LabeledStatement) innerStatementNode = innerStatementNode.body; + if (Array.isArray(type)) return type.some(match.bind(null, innerStatementNode)); + return StatementTypes[type].test(innerStatementNode, sourceCode); + } + function getPaddingType(prevNode, nextNode) { + for (let i = configureList.length - 1; i >= 0; --i) { + const configure = configureList[i]; + if (match(prevNode, configure.prev) && match(nextNode, configure.next)) return PaddingTypes[configure.blankLine]; + } + return PaddingTypes.any; + } + function getPaddingLineSequences(prevNode, nextNode) { + const pairs = []; + let prevToken = getActualLastToken(prevNode, sourceCode); + if (nextNode.loc.start.line - prevToken.loc.end.line >= 2) do { + const token = sourceCode.getTokenAfter(prevToken, { includeComments: true }); + if (token.loc.start.line - prevToken.loc.end.line >= 2) pairs.push([prevToken, token]); + prevToken = token; + } while (prevToken.range[0] < nextNode.range[0]); + return pairs; + } + function verify(node) { + if (!node.parent || ![ + AST_NODE_TYPES.BlockStatement, + AST_NODE_TYPES.Program, + AST_NODE_TYPES.StaticBlock, + AST_NODE_TYPES.SwitchCase, + AST_NODE_TYPES.SwitchStatement, + AST_NODE_TYPES.TSInterfaceBody, + AST_NODE_TYPES.TSModuleBlock, + AST_NODE_TYPES.TSTypeLiteral + ].includes(node.parent.type)) return; + const prevNode = scopeInfo.prevNode; + if (prevNode) { + const type = getPaddingType(prevNode, node); + const paddingLines = getPaddingLineSequences(prevNode, node); + type.verify(context, prevNode, node, paddingLines); + } + scopeInfo.prevNode = node; + } + function verifyThenEnterScope(node) { + verify(node); + enterScope(); + } + return { + "Program": enterScope, + "Program:exit": exitScope, + "BlockStatement": enterScope, + "BlockStatement:exit": exitScope, + "SwitchStatement": enterScope, + "SwitchStatement:exit": exitScope, + "SwitchCase": verifyThenEnterScope, + "SwitchCase:exit": exitScope, + "StaticBlock": enterScope, + "StaticBlock:exit": exitScope, + "TSInterfaceBody": enterScope, + "TSInterfaceBody:exit": exitScope, + "TSModuleBlock": enterScope, + "TSModuleBlock:exit": exitScope, + "TSTypeLiteral": enterScope, + "TSTypeLiteral:exit": exitScope, + "TSDeclareFunction": verifyThenEnterScope, + "TSDeclareFunction:exit": exitScope, + "TSMethodSignature": verifyThenEnterScope, + "TSMethodSignature:exit": exitScope, + ":statement": verify + }; + } +}); +export { padding_line_between_statements_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/quote-props.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/quote-props.js new file mode 100644 index 0000000..31f56ae --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/quote-props.js @@ -0,0 +1,231 @@ +import { ES3_KEYWORDS, createRule, isNumericLiteral, isStringLiteral } from "../utils.js"; +import { tokenize } from "espree"; +var quote_props_default = createRule({ + name: "quote-props", + meta: { + type: "layout", + docs: { description: "Require quotes around object literal, type literal, interfaces and enums property names" }, + fixable: "code", + schema: { anyOf: [{ + type: "array", + items: [{ + type: "string", + enum: [ + "always", + "as-needed", + "consistent", + "consistent-as-needed" + ] + }], + minItems: 0, + maxItems: 1 + }, { + type: "array", + items: [{ + type: "string", + enum: [ + "always", + "as-needed", + "consistent", + "consistent-as-needed" + ] + }, { + type: "object", + properties: { + keywords: { type: "boolean" }, + unnecessary: { type: "boolean" }, + numbers: { type: "boolean" } + }, + additionalProperties: false + }], + minItems: 0, + maxItems: 2 + }] }, + messages: { + requireQuotesDueToReservedWord: "Properties should be quoted as '{{property}}' is a reserved word.", + inconsistentlyQuotedProperty: "Inconsistently quoted property '{{key}}' found.", + unnecessarilyQuotedProperty: "Unnecessarily quoted property '{{property}}' found.", + unquotedReservedProperty: "Unquoted reserved word '{{property}}' used as key.", + unquotedNumericProperty: "Unquoted number literal '{{property}}' used as key.", + unquotedPropertyFound: "Unquoted property '{{property}}' found.", + redundantQuoting: "Properties shouldn't be quoted as all quotes are redundant." + } + }, + defaultOptions: ["always"], + create(context) { + const MODE = context.options[0]; + const KEYWORDS = context.options[1] && context.options[1].keywords; + const CHECK_UNNECESSARY = !context.options[1] || context.options[1].unnecessary !== false; + const NUMBERS = context.options[1] && context.options[1].numbers; + const sourceCode = context.sourceCode; + function isKeyword(tokenStr) { + return ES3_KEYWORDS.includes(tokenStr); + } + function areQuotesRedundant(rawKey, tokens, skipNumberLiterals = false) { + return tokens.length === 1 && tokens[0].start === 0 && tokens[0].end === rawKey.length && ([ + "Identifier", + "Keyword", + "Null", + "Boolean" + ].includes(tokens[0].type) || tokens[0].type === "Numeric" && !skipNumberLiterals && String(+tokens[0].value) === tokens[0].value); + } + function getUnquotedKey(key) { + return key.type === "Identifier" ? key.name : key.value; + } + function getQuotedKey(key) { + if (isStringLiteral(key)) return sourceCode.getText(key); + return `"${key.type === "Identifier" ? key.name : key.value}"`; + } + function checkUnnecessaryQuotes(node) { + if (node.type === "Property" && (node.method || node.computed || node.shorthand)) return; + if (node.type !== "ImportAttribute" && node.computed) return; + const key = node.type === "TSEnumMember" ? node.id : node.key; + if (key.type === "Literal" && typeof key.value === "string") { + let tokens; + try { + tokens = tokenize(key.value); + } catch { + return; + } + if (tokens.length !== 1) return; + const isKeywordToken = isKeyword(tokens[0].value); + if (isKeywordToken && KEYWORDS) return; + if (CHECK_UNNECESSARY && areQuotesRedundant(key.value, tokens, NUMBERS)) context.report({ + node, + messageId: "unnecessarilyQuotedProperty", + data: { property: key.value }, + fix: (fixer) => fixer.replaceText(key, getUnquotedKey(key)) + }); + } else if (KEYWORDS && key.type === "Identifier" && isKeyword(key.name)) context.report({ + node, + messageId: "unquotedReservedProperty", + data: { property: key.name }, + fix: (fixer) => fixer.replaceText(key, getQuotedKey(key)) + }); + else if (NUMBERS && isNumericLiteral(key)) context.report({ + node, + messageId: "unquotedNumericProperty", + data: { property: key.value }, + fix: (fixer) => fixer.replaceText(key, getQuotedKey(key)) + }); + } + function checkOmittedQuotes(node) { + if (node.type === "Property" && (node.method || node.computed || node.shorthand)) return; + if (node.type !== "ImportAttribute" && node.computed) return; + const key = node.type === "TSEnumMember" ? node.id : node.key; + if (key.type === "Literal" && typeof key.value === "string") return; + context.report({ + node, + messageId: "unquotedPropertyFound", + data: { property: key.name || key.value }, + fix: (fixer) => fixer.replaceText(key, getQuotedKey(key)) + }); + } + function checkConsistencyForObject(properties, checkQuotesRedundancy) { + checkConsistency(properties.filter((property) => property.type !== "SpreadElement" && property.key && !property.method && !property.computed && !property.shorthand), checkQuotesRedundancy); + } + function checkImportAttributes(attributes) { + if (!attributes) return; + if (MODE === "consistent") checkConsistency(attributes, false); + if (MODE === "consistent-as-needed") checkConsistency(attributes, true); + } + function checkConsistency(properties, checkQuotesRedundancy) { + const quotedProps = []; + const unquotedProps = []; + let keywordKeyName = null; + let necessaryQuotes = false; + properties.forEach((property) => { + const key = property.key; + if (key.type === "Literal" && typeof key.value === "string") { + quotedProps.push(property); + if (checkQuotesRedundancy) { + let tokens; + try { + tokens = tokenize(key.value); + } catch { + necessaryQuotes = true; + return; + } + necessaryQuotes = necessaryQuotes || !areQuotesRedundant(key.value, tokens) || KEYWORDS && isKeyword(tokens[0].value); + } + } else if (KEYWORDS && checkQuotesRedundancy && key.type === "Identifier" && isKeyword(key.name)) { + unquotedProps.push(property); + necessaryQuotes = true; + keywordKeyName = key.name; + } else unquotedProps.push(property); + }); + if (checkQuotesRedundancy && quotedProps.length && !necessaryQuotes) quotedProps.forEach((property) => { + const key = property.key; + context.report({ + node: property, + messageId: "redundantQuoting", + fix: (fixer) => fixer.replaceText(key, getUnquotedKey(key)) + }); + }); + else if (unquotedProps.length && keywordKeyName) unquotedProps.forEach((property) => { + context.report({ + node: property, + messageId: "requireQuotesDueToReservedWord", + data: { property: keywordKeyName }, + fix: (fixer) => fixer.replaceText(property.key, getQuotedKey(property.key)) + }); + }); + else if (quotedProps.length && unquotedProps.length) unquotedProps.forEach((property) => { + context.report({ + node: property, + messageId: "inconsistentlyQuotedProperty", + data: { key: property.key.name || property.key.value }, + fix: (fixer) => fixer.replaceText(property.key, getQuotedKey(property.key)) + }); + }); + } + return { + Property(node) { + if (MODE === "always" || !MODE) checkOmittedQuotes(node); + if (MODE === "as-needed") checkUnnecessaryQuotes(node); + }, + ObjectExpression(node) { + if (MODE === "consistent") checkConsistencyForObject(node.properties, false); + if (MODE === "consistent-as-needed") checkConsistencyForObject(node.properties, true); + }, + ImportAttribute(node) { + if (MODE === "always" || !MODE) checkOmittedQuotes(node); + if (MODE === "as-needed") checkUnnecessaryQuotes(node); + }, + ImportDeclaration(node) { + checkImportAttributes(node.attributes); + }, + ExportAllDeclaration(node) { + checkImportAttributes(node.attributes); + }, + ExportNamedDeclaration(node) { + checkImportAttributes(node.attributes); + }, + TSPropertySignature(node) { + if (MODE === "always" || !MODE) checkOmittedQuotes(node); + if (MODE === "as-needed") checkUnnecessaryQuotes(node); + }, + TSEnumMember(node) { + if (MODE === "always" || !MODE) checkOmittedQuotes(node); + if (MODE === "as-needed") checkUnnecessaryQuotes(node); + }, + TSTypeLiteral(node) { + if (MODE === "consistent") checkConsistencyForObject(node.members, false); + if (MODE === "consistent-as-needed") checkConsistencyForObject(node.members, true); + }, + TSInterfaceBody(node) { + if (MODE === "consistent") checkConsistencyForObject(node.body, false); + if (MODE === "consistent-as-needed") checkConsistencyForObject(node.body, true); + }, + TSEnumDeclaration(node) { + const members = (node.body?.members || node.members).map((member) => ({ + ...member, + key: member.id + })); + if (MODE === "consistent") checkConsistencyForObject(members, false); + if (MODE === "consistent-as-needed") checkConsistencyForObject(members, true); + } + }; + } +}); +export { quote_props_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/quotes.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/quotes.js new file mode 100644 index 0000000..444f8cd --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/quotes.js @@ -0,0 +1,188 @@ +import { AST_NODE_TYPES, LINEBREAKS, createRule, hasOctalOrNonOctalDecimalEscapeSequence, isParenthesised, isSurroundedBy, isTopLevelExpressionStatement, warnDeprecation } from "../utils.js"; +function switchQuote(str) { + const newQuote = this.quote; + const oldQuote = str[0]; + if (newQuote === oldQuote) return str; + return newQuote + str.slice(1, -1).replace(/\\(\$\{|\r\n?|\n|.)|["'`]|\$\{|(\r\n?|\n)/gu, (match, escaped, newline) => { + if (escaped === oldQuote || oldQuote === "`" && escaped === "${") return escaped; + if (match === newQuote || newQuote === "`" && match === "${") return `\\${match}`; + if (newline && oldQuote === "`") return "\\n"; + return match; + }) + newQuote; +} +const QUOTE_SETTINGS = { + double: { + quote: "\"", + alternateQuote: "'", + description: "doublequote", + convert: switchQuote + }, + single: { + quote: "'", + alternateQuote: "\"", + description: "singlequote", + convert: switchQuote + }, + backtick: { + quote: "`", + alternateQuote: "\"", + description: "backtick", + convert: switchQuote + } +}; +const UNESCAPED_LINEBREAK_PATTERN = new RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(LINEBREAKS).join("")}]`, "u"); +const AVOID_ESCAPE = "avoid-escape"; +var quotes_default = createRule({ + name: "quotes", + meta: { + type: "layout", + docs: { description: "Enforce the consistent use of either backticks, double, or single quotes" }, + fixable: "code", + schema: [{ + type: "string", + enum: [ + "single", + "double", + "backtick" + ] + }, { anyOf: [{ + type: "string", + enum: ["avoid-escape"] + }, { + type: "object", + properties: { + avoidEscape: { type: "boolean" }, + allowTemplateLiterals: { anyOf: [{ type: "boolean" }, { + type: "string", + enum: [ + "never", + "avoidEscape", + "always" + ] + }] }, + ignoreStringLiterals: { type: "boolean" } + }, + additionalProperties: false + }] }], + messages: { wrongQuotes: "Strings must use {{description}}." } + }, + defaultOptions: ["double", { + allowTemplateLiterals: "never", + avoidEscape: false, + ignoreStringLiterals: false + }], + create(context) { + const quoteOption = context.options[0]; + const settings = QUOTE_SETTINGS[quoteOption || "double"]; + const options = context.options[1]; + const sourceCode = context.sourceCode; + let avoidEscape = false; + let ignoreStringLiterals = false; + let allowTemplateLiteralsAlways = false; + let allowTemplateLiteralsToAvoidEscape = false; + if (typeof options === "object") { + avoidEscape = options.avoidEscape === true; + ignoreStringLiterals = options.ignoreStringLiterals === true; + if (typeof options.allowTemplateLiterals === "string") { + allowTemplateLiteralsAlways = options.allowTemplateLiterals === "always"; + allowTemplateLiteralsToAvoidEscape = allowTemplateLiteralsAlways || options.allowTemplateLiterals === "avoidEscape"; + } else if (typeof options.allowTemplateLiterals === "boolean") { + warnDeprecation("value(boolean) for \"allowTemplateLiterals\"", "\"always\"/\"never\"", "quotes"); + allowTemplateLiteralsAlways = options.allowTemplateLiterals === true; + allowTemplateLiteralsToAvoidEscape = options.allowTemplateLiterals === true; + } + } else if (options === AVOID_ESCAPE) { + warnDeprecation(`option("${AVOID_ESCAPE}")`, "\"avoidEscape\"", "quotes"); + avoidEscape = true; + } + /* v8 ignore stop */ + function isJSXLiteral(node) { + if (!node.parent) return false; + return node.parent.type === "JSXAttribute" || node.parent.type === "JSXElement" || node.parent.type === "JSXFragment"; + } + function isDirective(node) { + return node.type === "ExpressionStatement" && node.expression.type === "Literal" && typeof node.expression.value === "string" && !isParenthesised(sourceCode, node.expression); + } + function isExpressionInOrJustAfterDirectivePrologue(node) { + if (!node.parent) return false; + if (!isTopLevelExpressionStatement(node.parent)) return false; + const block = node.parent.parent; + if (!block || !("body" in block) || !Array.isArray(block.body)) return false; + for (let i = 0; i < block.body.length; ++i) { + const statement = block.body[i]; + if (statement === node.parent) return true; + if (!isDirective(statement)) break; + } + return false; + } + function isAllowedAsNonBacktick(node) { + const parent = node.parent; + if (!parent) return false; + switch (parent.type) { + case AST_NODE_TYPES.ExpressionStatement: return !isParenthesised(sourceCode, node) && isExpressionInOrJustAfterDirectivePrologue(node); + case AST_NODE_TYPES.Property: + case AST_NODE_TYPES.MethodDefinition: return parent.key === node && !parent.computed; + case AST_NODE_TYPES.ImportDeclaration: + case AST_NODE_TYPES.ExportNamedDeclaration: return parent.source === node; + case AST_NODE_TYPES.ExportAllDeclaration: return parent.exported === node || parent.source === node; + case AST_NODE_TYPES.ImportSpecifier: return parent.imported === node; + case AST_NODE_TYPES.ExportSpecifier: return parent.local === node || parent.exported === node; + case AST_NODE_TYPES.ImportAttribute: return parent.value === node; + case AST_NODE_TYPES.TSAbstractMethodDefinition: + case AST_NODE_TYPES.TSMethodSignature: + case AST_NODE_TYPES.TSPropertySignature: + case AST_NODE_TYPES.TSModuleDeclaration: + case AST_NODE_TYPES.TSExternalModuleReference: return true; + case AST_NODE_TYPES.TSEnumMember: return node === parent.id; + case AST_NODE_TYPES.TSAbstractPropertyDefinition: + case AST_NODE_TYPES.PropertyDefinition: + case AST_NODE_TYPES.AccessorProperty: return parent.key === node && !parent.computed; + case AST_NODE_TYPES.TSLiteralType: return parent.parent?.type === AST_NODE_TYPES.TSImportType; + default: return false; + } + } + function isUsingFeatureOfTemplateLiteral(node) { + const hasTag = node.parent.type === "TaggedTemplateExpression" && node === node.parent.quasi; + if (hasTag) return true; + const hasStringInterpolation = node.expressions.length > 0; + if (hasStringInterpolation) return true; + const isMultilineString = node.quasis.length >= 1 && UNESCAPED_LINEBREAK_PATTERN.test(node.quasis[0].value.raw); + if (isMultilineString) return true; + return false; + } + return { + Literal(node) { + if (ignoreStringLiterals) return; + const val = node.value; + const rawVal = node.raw; + if (settings && typeof val === "string") { + let isValid = quoteOption === "backtick" && isAllowedAsNonBacktick(node) || isJSXLiteral(node) || isSurroundedBy(rawVal, settings.quote); + if (!isValid && avoidEscape) isValid = isSurroundedBy(rawVal, settings.alternateQuote) && rawVal.includes(settings.quote); + if (!isValid) context.report({ + node, + messageId: "wrongQuotes", + data: { description: settings.description }, + fix(fixer) { + if (quoteOption === "backtick" && hasOctalOrNonOctalDecimalEscapeSequence(rawVal)) return null; + return fixer.replaceText(node, settings.convert(node.raw)); + } + }); + } + }, + TemplateLiteral(node) { + if (allowTemplateLiteralsAlways || quoteOption === "backtick" || isUsingFeatureOfTemplateLiteral(node)) return; + if (allowTemplateLiteralsToAvoidEscape && avoidEscape && sourceCode.getText(node).includes(settings.quote)) return; + context.report({ + node, + messageId: "wrongQuotes", + data: { description: settings.description }, + fix(fixer) { + if (isTopLevelExpressionStatement(node.parent) && !isParenthesised(sourceCode, node)) return null; + return fixer.replaceText(node, settings.convert(sourceCode.getText(node))); + } + }); + } + }; + } +}); +export { quotes_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/rest-spread-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/rest-spread-spacing.js new file mode 100644 index 0000000..adffed5 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/rest-spread-spacing.js @@ -0,0 +1,64 @@ +import { createRule } from "../utils.js"; +var rest_spread_spacing_default = createRule({ + name: "rest-spread-spacing", + meta: { + type: "layout", + docs: { description: "Enforce spacing between rest and spread operators and their expressions" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: ["always", "never"] + }], + messages: { + unexpectedWhitespace: "Unexpected whitespace after {{type}} operator.", + expectedWhitespace: "Expected whitespace after {{type}} operator." + } + }, + create(context) { + const sourceCode = context.sourceCode; + const alwaysSpace = context.options[0] === "always"; + function checkWhiteSpace(node) { + const operator = sourceCode.getFirstToken(node); + const nextToken = sourceCode.getTokenAfter(operator); + const hasWhitespace = sourceCode.isSpaceBetween(operator, nextToken); + let type; + switch (node.type) { + case "SpreadElement": + type = "spread"; + if (node.parent.type === "ObjectExpression") type += " property"; + break; + case "RestElement": + type = "rest"; + if (node.parent.type === "ObjectPattern") type += " property"; + break; + default: return; + } + if (alwaysSpace && !hasWhitespace) context.report({ + node, + loc: operator.loc, + messageId: "expectedWhitespace", + data: { type }, + fix(fixer) { + return fixer.replaceTextRange([operator.range[1], nextToken.range[0]], " "); + } + }); + else if (!alwaysSpace && hasWhitespace) context.report({ + node, + loc: { + start: operator.loc.end, + end: nextToken.loc.start + }, + messageId: "unexpectedWhitespace", + data: { type }, + fix(fixer) { + return fixer.removeRange([operator.range[1], nextToken.range[0]]); + } + }); + } + return { + SpreadElement: checkWhiteSpace, + RestElement: checkWhiteSpace + }; + } +}); +export { rest_spread_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/semi-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/semi-spacing.js new file mode 100644 index 0000000..4f98675 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/semi-spacing.js @@ -0,0 +1,150 @@ +import { AST_NODE_TYPES, ast_exports, createRule } from "../utils.js"; +var semi_spacing_default = createRule({ + name: "semi-spacing", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing before and after semicolons" }, + fixable: "whitespace", + schema: [{ + type: "object", + properties: { + before: { + type: "boolean", + default: false + }, + after: { + type: "boolean", + default: true + } + }, + additionalProperties: false + }], + messages: { + unexpectedWhitespaceBefore: "Unexpected whitespace before semicolon.", + unexpectedWhitespaceAfter: "Unexpected whitespace after semicolon.", + missingWhitespaceBefore: "Missing whitespace before semicolon.", + missingWhitespaceAfter: "Missing whitespace after semicolon." + } + }, + create(context) { + const config = context.options[0]; + const sourceCode = context.sourceCode; + let requireSpaceBefore = false; + let requireSpaceAfter = true; + if (typeof config === "object") { + requireSpaceBefore = config.before; + requireSpaceAfter = config.after; + } + function hasLeadingSpace(token) { + const tokenBefore = sourceCode.getTokenBefore(token); + return tokenBefore && (0, ast_exports.isTokenOnSameLine)(tokenBefore, token) && sourceCode.isSpaceBetween(tokenBefore, token); + } + function hasTrailingSpace(token) { + const tokenAfter = sourceCode.getTokenAfter(token); + return tokenAfter && (0, ast_exports.isTokenOnSameLine)(token, tokenAfter) && sourceCode.isSpaceBetween(token, tokenAfter); + } + function isLastTokenInCurrentLine(token) { + const tokenAfter = sourceCode.getTokenAfter(token); + return !(tokenAfter && (0, ast_exports.isTokenOnSameLine)(token, tokenAfter)); + } + function isFirstTokenInCurrentLine(token) { + const tokenBefore = sourceCode.getTokenBefore(token); + return !(tokenBefore && (0, ast_exports.isTokenOnSameLine)(token, tokenBefore)); + } + function isBeforeClosingParen(token) { + const nextToken = sourceCode.getTokenAfter(token); + return nextToken && (0, ast_exports.isClosingBraceToken)(nextToken) || (0, ast_exports.isClosingParenToken)(nextToken); + } + function checkSemicolonSpacing(token, node) { + if ((0, ast_exports.isSemicolonToken)(token)) { + if (hasLeadingSpace(token)) { + if (!requireSpaceBefore) { + const tokenBefore = sourceCode.getTokenBefore(token); + const loc = { + start: tokenBefore.loc.end, + end: token.loc.start + }; + context.report({ + node, + loc, + messageId: "unexpectedWhitespaceBefore", + fix(fixer) { + return fixer.removeRange([tokenBefore.range[1], token.range[0]]); + } + }); + } + } else if (requireSpaceBefore) { + const loc = token.loc; + context.report({ + node, + loc, + messageId: "missingWhitespaceBefore", + fix(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + } + if (!isFirstTokenInCurrentLine(token) && !isLastTokenInCurrentLine(token) && !isBeforeClosingParen(token)) { + if (hasTrailingSpace(token)) { + if (!requireSpaceAfter) { + const tokenAfter = sourceCode.getTokenAfter(token); + const loc = { + start: token.loc.end, + end: tokenAfter.loc.start + }; + context.report({ + node, + loc, + messageId: "unexpectedWhitespaceAfter", + fix(fixer) { + return fixer.removeRange([token.range[1], tokenAfter.range[0]]); + } + }); + } + } else if (requireSpaceAfter) { + const loc = token.loc; + context.report({ + node, + loc, + messageId: "missingWhitespaceAfter", + fix(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); + } + } + } + } + function checkNode(node) { + const token = sourceCode.getLastToken(node); + checkSemicolonSpacing(token, node); + } + return { + VariableDeclaration: checkNode, + ExpressionStatement: checkNode, + BreakStatement: checkNode, + ContinueStatement: checkNode, + DebuggerStatement: checkNode, + DoWhileStatement: checkNode, + ReturnStatement: checkNode, + ThrowStatement: checkNode, + ImportDeclaration: checkNode, + ExportNamedDeclaration: checkNode, + ExportAllDeclaration: checkNode, + ExportDefaultDeclaration: checkNode, + ForStatement(node) { + if (node.init) checkSemicolonSpacing(sourceCode.getTokenAfter(node.init), node); + if (node.test) checkSemicolonSpacing(sourceCode.getTokenAfter(node.test), node); + }, + PropertyDefinition: checkNode, + AccessorProperty: checkNode, + TSDeclareFunction: checkNode, + TSTypeAliasDeclaration: checkNode, + TSTypeAnnotation(node) { + const excludeNodeTypes = new Set([AST_NODE_TYPES.TSDeclareFunction]); + if (node.parent && !excludeNodeTypes.has(node.parent.type)) checkNode(node.parent); + } + }; + } +}); +export { semi_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/semi-style.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/semi-style.js new file mode 100644 index 0000000..120da1c --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/semi-style.js @@ -0,0 +1,80 @@ +import { ast_exports, createRule } from "../utils.js"; +const SELECTOR = [ + "BreakStatement", + "ContinueStatement", + "DebuggerStatement", + "DoWhileStatement", + "ExportAllDeclaration", + "ExportDefaultDeclaration", + "ExportNamedDeclaration", + "ExpressionStatement", + "ImportDeclaration", + "ReturnStatement", + "ThrowStatement", + "VariableDeclaration", + "PropertyDefinition", + "AccessorProperty" +].join(","); +function getChildren(node) { + const t = node.type; + if (t === "BlockStatement" || t === "StaticBlock" || t === "Program" || t === "ClassBody") return node.body; + if (t === "SwitchCase") return node.consequent; + return null; +} +function isLastChild(node) { + if (!node.parent) return true; + const t = node.parent.type; + if (t === "IfStatement" && node.parent.consequent === node && node.parent.alternate) return true; + if (t === "DoWhileStatement") return true; + const nodeList = getChildren(node.parent); + return nodeList !== null && nodeList[nodeList.length - 1] === node; +} +var semi_style_default = createRule({ + name: "semi-style", + meta: { + type: "layout", + docs: { description: "Enforce location of semicolons" }, + schema: [{ + type: "string", + enum: ["last", "first"] + }], + fixable: "whitespace", + messages: { expectedSemiColon: "Expected this semicolon to be at {{pos}}." } + }, + create(context) { + const sourceCode = context.sourceCode; + const option = context.options[0] || "last"; + function check(semiToken, expected) { + const prevToken = sourceCode.getTokenBefore(semiToken); + const nextToken = sourceCode.getTokenAfter(semiToken); + const prevIsSameLine = !prevToken || (0, ast_exports.isTokenOnSameLine)(prevToken, semiToken); + const nextIsSameLine = !nextToken || (0, ast_exports.isTokenOnSameLine)(semiToken, nextToken); + if (expected === "last" && !prevIsSameLine || expected === "first" && !nextIsSameLine) context.report({ + loc: semiToken.loc, + messageId: "expectedSemiColon", + data: { pos: expected === "last" ? "the end of the previous line" : "the beginning of the next line" }, + fix(fixer) { + if (prevToken && nextToken && sourceCode.commentsExistBetween(prevToken, nextToken)) return null; + const start = prevToken ? prevToken.range[1] : semiToken.range[0]; + const end = nextToken ? nextToken.range[0] : semiToken.range[1]; + const text = expected === "last" ? ";\n" : "\n;"; + return fixer.replaceTextRange([start, end], text); + } + }); + } + return { + [SELECTOR](node) { + if (option === "first" && isLastChild(node)) return; + const lastToken = sourceCode.getLastToken(node); + if ((0, ast_exports.isSemicolonToken)(lastToken)) check(lastToken, option); + }, + ForStatement(node) { + const firstSemi = node.init && sourceCode.getTokenAfter(node.init, ast_exports.isSemicolonToken); + const secondSemi = node.test && sourceCode.getTokenAfter(node.test, ast_exports.isSemicolonToken); + if (firstSemi) check(firstSemi, "last"); + if (secondSemi) check(secondSemi, "last"); + } + }; + } +}); +export { semi_style_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/semi.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/semi.js new file mode 100644 index 0000000..4f4d90e --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/semi.js @@ -0,0 +1,207 @@ +import { AST_NODE_TYPES, FixTracker, ast_exports, createRule, getNextLocation, isSingleLine } from "../utils.js"; +var semi_default = createRule({ + name: "semi", + meta: { + type: "layout", + docs: { description: "Require or disallow semicolons instead of ASI" }, + fixable: "code", + schema: { anyOf: [{ + type: "array", + items: [{ + type: "string", + enum: ["never"] + }, { + type: "object", + properties: { beforeStatementContinuationChars: { + type: "string", + enum: [ + "always", + "any", + "never" + ] + } }, + additionalProperties: false + }], + minItems: 0, + maxItems: 2 + }, { + type: "array", + items: [{ + type: "string", + enum: ["always"] + }, { + type: "object", + properties: { + omitLastInOneLineBlock: { type: "boolean" }, + omitLastInOneLineClassBody: { type: "boolean" } + }, + additionalProperties: false + }], + minItems: 0, + maxItems: 2 + }] }, + messages: { + missingSemi: "Missing semicolon.", + extraSemi: "Extra semicolon." + } + }, + defaultOptions: ["always", { + omitLastInOneLineBlock: false, + beforeStatementContinuationChars: "any" + }], + create(context) { + const OPT_OUT_PATTERN = /^[-[(/+`]/u; + const unsafeClassFieldNames = new Set([ + "get", + "set", + "static" + ]); + const unsafeClassFieldFollowers = new Set([ + "*", + "in", + "instanceof" + ]); + const options = context.options[1]; + const never = context.options[0] === "never"; + const exceptOneLine = Boolean(options && "omitLastInOneLineBlock" in options && options.omitLastInOneLineBlock); + const exceptOneLineClassBody = Boolean(options && "omitLastInOneLineClassBody" in options && options.omitLastInOneLineClassBody); + const beforeStatementContinuationChars = options && "beforeStatementContinuationChars" in options && options.beforeStatementContinuationChars || "any"; + const sourceCode = context.sourceCode; + function report(node, missing = false) { + const lastToken = sourceCode.getLastToken(node); + let messageId = "missingSemi"; + let fix, loc; + if (!missing) { + loc = { + start: lastToken.loc.end, + end: getNextLocation(sourceCode, lastToken.loc.end) + }; + fix = function(fixer) { + return fixer.insertTextAfter(lastToken, ";"); + }; + } else { + messageId = "extraSemi"; + loc = lastToken.loc; + fix = function(fixer) { + return new FixTracker(fixer, sourceCode).retainSurroundingTokens(lastToken).remove(lastToken); + }; + } + context.report({ + node, + loc, + messageId, + fix + }); + } + function isRedundantSemi(semiToken) { + const nextToken = sourceCode.getTokenAfter(semiToken); + return !nextToken || (0, ast_exports.isClosingBraceToken)(nextToken) || (0, ast_exports.isSemicolonToken)(nextToken); + } + function isEndOfArrowBlock(lastToken) { + if (!(0, ast_exports.isClosingBraceToken)(lastToken)) return false; + const node = sourceCode.getNodeByRangeIndex(lastToken.range[0]); + return node.type === "BlockStatement" && node.parent.type === "ArrowFunctionExpression"; + } + function maybeClassFieldAsiHazard(node) { + if (node.type !== "PropertyDefinition") return false; + const needsNameCheck = !node.computed && node.key.type === "Identifier"; + if (needsNameCheck && "name" in node.key && unsafeClassFieldNames.has(node.key.name)) { + const isStaticStatic = node.static && node.key.name === "static"; + if (!isStaticStatic && !node.value) return true; + } + const followingToken = sourceCode.getTokenAfter(node); + return unsafeClassFieldFollowers.has(followingToken.value); + } + function isOnSameLineWithNextToken(node) { + const prevToken = sourceCode.getLastToken(node, 1); + const nextToken = sourceCode.getTokenAfter(node); + return !!nextToken && (0, ast_exports.isTokenOnSameLine)(prevToken, nextToken); + } + function maybeAsiHazardAfter(node) { + const t = node.type; + if (t === "DoWhileStatement" || t === "BreakStatement" || t === "ContinueStatement" || t === "DebuggerStatement" || t === "ImportDeclaration" || t === "ExportAllDeclaration") return false; + if (t === "ReturnStatement") return Boolean(node.argument); + if (t === "ExportNamedDeclaration") return Boolean(node.declaration); + const lastToken = sourceCode.getLastToken(node, 1); + if (isEndOfArrowBlock(lastToken)) return false; + return true; + } + function maybeAsiHazardBefore(token) { + return Boolean(token) && OPT_OUT_PATTERN.test(token.value) && token.value !== "++" && token.value !== "--"; + } + function canRemoveSemicolon(node) { + const lastToken = sourceCode.getLastToken(node); + if (isRedundantSemi(lastToken)) return true; + if (maybeClassFieldAsiHazard(node)) return false; + if (isOnSameLineWithNextToken(node)) return false; + if (node.type !== "PropertyDefinition" && beforeStatementContinuationChars === "never" && !maybeAsiHazardAfter(node)) return true; + const nextToken = sourceCode.getTokenAfter(node); + if (!maybeAsiHazardBefore(nextToken)) return true; + return false; + } + function isLastInOneLinerBlock(node) { + const parent = node.parent; + const nextToken = sourceCode.getTokenAfter(node); + if (!nextToken || nextToken.value !== "}") return false; + if (parent.type === "BlockStatement") return isSingleLine(parent); + if (parent.type === "StaticBlock") { + const openingBrace = sourceCode.getFirstToken(parent, { skip: 1 }); + return (0, ast_exports.isTokenOnSameLine)(parent, openingBrace); + } + return false; + } + function isLastInOneLinerClassBody(node) { + const parent = node.parent; + const nextToken = sourceCode.getTokenAfter(node); + if (!nextToken || nextToken.value !== "}") return false; + if (parent.type === "ClassBody") return isSingleLine(parent); + return false; + } + function checkForSemicolon(node) { + const lastToken = sourceCode.getLastToken(node); + const isSemi = (0, ast_exports.isSemicolonToken)(lastToken); + if (never) { + const nextToken = sourceCode.getTokenAfter(node); + if (isSemi && canRemoveSemicolon(node)) report(node, true); + else if (!isSemi && beforeStatementContinuationChars === "always" && node.type !== "PropertyDefinition" && maybeAsiHazardBefore(nextToken)) report(node); + } else { + const oneLinerBlock = exceptOneLine && isLastInOneLinerBlock(node); + const oneLinerClassBody = exceptOneLineClassBody && isLastInOneLinerClassBody(node); + const oneLinerBlockOrClassBody = oneLinerBlock || oneLinerClassBody; + if (isSemi && oneLinerBlockOrClassBody) report(node, true); + else if (!isSemi && !oneLinerBlockOrClassBody) report(node); + } + } + return { + VariableDeclaration(node) { + const parent = node.parent; + if ((parent.type !== "ForStatement" || parent.init !== node) && (!/^For(?:In|Of)Statement/u.test(parent.type) || parent.left !== node)) checkForSemicolon(node); + }, + ExpressionStatement: checkForSemicolon, + ReturnStatement: checkForSemicolon, + ThrowStatement: checkForSemicolon, + DoWhileStatement: checkForSemicolon, + DebuggerStatement: checkForSemicolon, + BreakStatement: checkForSemicolon, + ContinueStatement: checkForSemicolon, + ImportDeclaration: checkForSemicolon, + ExportAllDeclaration: checkForSemicolon, + ExportNamedDeclaration(node) { + if (!node.declaration) checkForSemicolon(node); + }, + ExportDefaultDeclaration(node) { + if (node.declaration.type === AST_NODE_TYPES.TSInterfaceDeclaration) return; + if (!/(?:Class|Function)Declaration/u.test(node.declaration.type)) checkForSemicolon(node); + }, + PropertyDefinition: checkForSemicolon, + AccessorProperty: checkForSemicolon, + TSAbstractPropertyDefinition: checkForSemicolon, + TSDeclareFunction: checkForSemicolon, + TSExportAssignment: checkForSemicolon, + TSImportEqualsDeclaration: checkForSemicolon, + TSTypeAliasDeclaration: checkForSemicolon, + TSEmptyBodyFunctionExpression: checkForSemicolon + }; + } +}); +export { semi_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-before-blocks.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-before-blocks.js new file mode 100644 index 0000000..4f48724 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-before-blocks.js @@ -0,0 +1,143 @@ +import { ast_exports, createRule, getSwitchCaseColonToken, isKeywordToken } from "../utils.js"; +var space_before_blocks_default = createRule({ + name: "space-before-blocks", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing before blocks" }, + fixable: "whitespace", + schema: [{ oneOf: [{ + type: "string", + enum: ["always", "never"] + }, { + type: "object", + properties: { + keywords: { + type: "string", + enum: [ + "always", + "never", + "off" + ] + }, + functions: { + type: "string", + enum: [ + "always", + "never", + "off" + ] + }, + classes: { + type: "string", + enum: [ + "always", + "never", + "off" + ] + }, + modules: { + type: "string", + enum: [ + "always", + "never", + "off" + ] + } + }, + additionalProperties: false + }] }], + messages: { + unexpectedSpace: "Unexpected space before opening brace.", + missingSpace: "Missing space before opening brace." + } + }, + defaultOptions: ["always"], + create(context, [config]) { + const sourceCode = context.sourceCode; + let alwaysFunctions = true; + let alwaysKeywords = true; + let alwaysClasses = true; + let alwaysModules = true; + let neverFunctions = false; + let neverKeywords = false; + let neverClasses = false; + let neverModules = false; + if (typeof config === "object") { + alwaysFunctions = config.functions === "always"; + alwaysKeywords = config.keywords === "always"; + alwaysClasses = config.classes === "always"; + alwaysModules = config.modules === "always"; + neverFunctions = config.functions === "never"; + neverKeywords = config.keywords === "never"; + neverClasses = config.classes === "never"; + neverModules = config.modules === "never"; + } else if (config === "never") { + alwaysFunctions = false; + alwaysKeywords = false; + alwaysClasses = false; + alwaysModules = false; + neverFunctions = true; + neverKeywords = true; + neverClasses = true; + neverModules = true; + } + function isFunctionBody(node) { + if (!("parent" in node)) return false; + const parent = node.parent; + return node.type === "BlockStatement" && (0, ast_exports.isFunction)(parent) && parent.body === node; + } + function isConflicted(precedingToken, node) { + return (0, ast_exports.isArrowToken)(precedingToken) || isKeywordToken(precedingToken) && !isFunctionBody(node) || (0, ast_exports.isColonToken)(precedingToken) && "parent" in node && node.parent && node.parent.type === "SwitchCase" && precedingToken === getSwitchCaseColonToken(node.parent, sourceCode); + } + function checkPrecedingSpace(node) { + const precedingToken = sourceCode.getTokenBefore(node); + if (precedingToken && !isConflicted(precedingToken, node) && (0, ast_exports.isTokenOnSameLine)(precedingToken, node)) { + const hasSpace = sourceCode.isSpaceBetween(precedingToken, node); + let requireSpace; + let requireNoSpace; + if (isFunctionBody(node)) { + requireSpace = alwaysFunctions; + requireNoSpace = neverFunctions; + } else if (node.type === "ClassBody" || node.type === "TSEnumBody" || node.type === "TSInterfaceBody") { + requireSpace = alwaysClasses; + requireNoSpace = neverClasses; + } else if (node.type === "TSModuleBlock") { + requireSpace = alwaysModules; + requireNoSpace = neverModules; + } else { + requireSpace = alwaysKeywords; + requireNoSpace = neverKeywords; + } + if (requireSpace && !hasSpace) context.report({ + node, + messageId: "missingSpace", + fix(fixer) { + return fixer.insertTextBefore(node, " "); + } + }); + else if (requireNoSpace && hasSpace) context.report({ + node, + messageId: "unexpectedSpace", + fix(fixer) { + return fixer.removeRange([precedingToken.range[1], node.range[0]]); + } + }); + } + } + return { + BlockStatement: checkPrecedingSpace, + ClassBody: checkPrecedingSpace, + SwitchStatement(node) { + const cases = node.cases; + let openingBrace; + if (cases.length > 0) openingBrace = sourceCode.getTokenBefore(cases[0]); + else openingBrace = sourceCode.getLastToken(node, 1); + checkPrecedingSpace(openingBrace); + }, + TSEnumBody: checkPrecedingSpace, + TSInterfaceBody: checkPrecedingSpace, + TSModuleBlock: checkPrecedingSpace + }; + } +}); +export { space_before_blocks_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-before-function-paren.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-before-function-paren.js new file mode 100644 index 0000000..3503735 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-before-function-paren.js @@ -0,0 +1,125 @@ +import { AST_NODE_TYPES, ast_exports, createRule } from "../utils.js"; +var space_before_function_paren_default = createRule({ + name: "space-before-function-paren", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing before function parenthesis" }, + fixable: "whitespace", + schema: [{ oneOf: [{ + type: "string", + enum: ["always", "never"] + }, { + type: "object", + properties: { + anonymous: { + type: "string", + enum: [ + "always", + "never", + "ignore" + ] + }, + named: { + type: "string", + enum: [ + "always", + "never", + "ignore" + ] + }, + asyncArrow: { + type: "string", + enum: [ + "always", + "never", + "ignore" + ] + }, + catch: { + type: "string", + enum: [ + "always", + "never", + "ignore" + ] + } + }, + additionalProperties: false + }] }], + messages: { + unexpectedSpace: "Unexpected space before function parentheses.", + missingSpace: "Missing space before function parentheses." + } + }, + defaultOptions: ["always"], + create(context, [firstOption]) { + const sourceCode = context.sourceCode; + const baseConfig = typeof firstOption === "string" ? firstOption : "always"; + const overrideConfig = typeof firstOption === "object" ? firstOption : {}; + function isNamedFunction(node) { + if (node.id != null) return true; + const parent = node.parent; + return parent.type === AST_NODE_TYPES.MethodDefinition || parent.type === AST_NODE_TYPES.TSAbstractMethodDefinition || parent.type === AST_NODE_TYPES.Property && (parent.kind === "get" || parent.kind === "set" || parent.method); + } + function getConfigForFunction(node) { + if (node.type === AST_NODE_TYPES.ArrowFunctionExpression) { + if (node.async && (0, ast_exports.isOpeningParenToken)(sourceCode.getFirstToken(node, { skip: 1 }))) return overrideConfig.asyncArrow ?? baseConfig; + } else if (isNamedFunction(node)) return overrideConfig.named ?? baseConfig; + else if (!node.generator) return overrideConfig.anonymous ?? baseConfig; + return "ignore"; + } + function checkFunction(node) { + const functionConfig = getConfigForFunction(node); + if (functionConfig === "ignore") return; + if (functionConfig === "always" && node.typeParameters && !node.id) return; + let leftToken; + let rightToken; + if (node.typeParameters) { + leftToken = sourceCode.getLastToken(node.typeParameters); + rightToken = sourceCode.getTokenAfter(leftToken); + } else { + rightToken = sourceCode.getFirstToken(node, ast_exports.isOpeningParenToken); + leftToken = sourceCode.getTokenBefore(rightToken); + } + checkSpace(node, leftToken, rightToken, functionConfig); + } + function checkSpace(node, leftToken, rightToken, option) { + const hasSpacing = sourceCode.isSpaceBetween(leftToken, rightToken); + if (hasSpacing && option === "never") context.report({ + node, + loc: { + start: leftToken.loc.end, + end: rightToken.loc.start + }, + messageId: "unexpectedSpace", + fix: (fixer) => { + const comments = sourceCode.getCommentsBefore(rightToken); + if (comments.some((comment) => comment.type === "Line")) return null; + return fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], comments.reduce((text, comment) => text + sourceCode.getText(comment), "")); + } + }); + else if (!hasSpacing && option === "always") context.report({ + node, + loc: rightToken.loc, + messageId: "missingSpace", + fix: (fixer) => fixer.insertTextAfter(leftToken, " ") + }); + } + return { + ArrowFunctionExpression: checkFunction, + FunctionDeclaration: checkFunction, + FunctionExpression: checkFunction, + TSEmptyBodyFunctionExpression: checkFunction, + TSDeclareFunction: checkFunction, + CatchClause(node) { + if (!node.param) return; + const option = overrideConfig.catch ?? baseConfig; + if (option === "ignore") return; + const rightToken = sourceCode.getFirstToken(node, ast_exports.isOpeningParenToken); + const leftToken = sourceCode.getTokenBefore(rightToken); + checkSpace(node, leftToken, rightToken, option); + } + }; + } +}); +export { space_before_function_paren_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-in-parens.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-in-parens.js new file mode 100644 index 0000000..c974ad9 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-in-parens.js @@ -0,0 +1,159 @@ +import { ast_exports, createRule } from "../utils.js"; +var space_in_parens_default = createRule({ + name: "space-in-parens", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing inside parentheses" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: ["always", "never"] + }, { + type: "object", + properties: { exceptions: { + type: "array", + items: { + type: "string", + enum: [ + "{}", + "[]", + "()", + "empty" + ] + }, + uniqueItems: true + } }, + additionalProperties: false + }], + messages: { + missingOpeningSpace: "There must be a space after this paren.", + missingClosingSpace: "There must be a space before this paren.", + rejectedOpeningSpace: "There should be no space after this paren.", + rejectedClosingSpace: "There should be no space before this paren." + } + }, + create(context) { + const ALWAYS = context.options[0] === "always"; + const exceptionsArrayOptions = context.options[1] && context.options[1].exceptions || []; + const options = { + braceException: false, + bracketException: false, + parenException: false, + empty: false + }; + let exceptions = { + openers: [], + closers: [] + }; + if (exceptionsArrayOptions.length) { + options.braceException = exceptionsArrayOptions.includes("{}"); + options.bracketException = exceptionsArrayOptions.includes("[]"); + options.parenException = exceptionsArrayOptions.includes("()"); + options.empty = exceptionsArrayOptions.includes("empty"); + } + function getExceptions() { + const openers = []; + const closers = []; + if (options.braceException) { + openers.push("{"); + closers.push("}"); + } + if (options.bracketException) { + openers.push("["); + closers.push("]"); + } + if (options.parenException) { + openers.push("("); + closers.push(")"); + } + if (options.empty) { + openers.push(")"); + closers.push("("); + } + return { + openers, + closers + }; + } + const sourceCode = context.sourceCode; + function isOpenerException(token) { + return exceptions.openers.includes(token.value); + } + function isCloserException(token) { + return exceptions.closers.includes(token.value); + } + function openerMissingSpace(openingParenToken, tokenAfterOpeningParen) { + if (sourceCode.isSpaceBetween(openingParenToken, tokenAfterOpeningParen)) return false; + if (!options.empty && (0, ast_exports.isClosingParenToken)(tokenAfterOpeningParen)) return false; + if (ALWAYS) return !isOpenerException(tokenAfterOpeningParen); + return isOpenerException(tokenAfterOpeningParen); + } + function openerRejectsSpace(openingParenToken, tokenAfterOpeningParen) { + if (!(0, ast_exports.isTokenOnSameLine)(openingParenToken, tokenAfterOpeningParen)) return false; + if (tokenAfterOpeningParen.type === "Line") return false; + if (!sourceCode.isSpaceBetween(openingParenToken, tokenAfterOpeningParen)) return false; + if (ALWAYS) return isOpenerException(tokenAfterOpeningParen); + return !isOpenerException(tokenAfterOpeningParen); + } + function closerMissingSpace(tokenBeforeClosingParen, closingParenToken) { + if (sourceCode.isSpaceBetween(tokenBeforeClosingParen, closingParenToken)) return false; + if (!options.empty && (0, ast_exports.isOpeningParenToken)(tokenBeforeClosingParen)) return false; + if (ALWAYS) return !isCloserException(tokenBeforeClosingParen); + return isCloserException(tokenBeforeClosingParen); + } + function closerRejectsSpace(tokenBeforeClosingParen, closingParenToken) { + if (!(0, ast_exports.isTokenOnSameLine)(tokenBeforeClosingParen, closingParenToken)) return false; + if (!sourceCode.isSpaceBetween(tokenBeforeClosingParen, closingParenToken)) return false; + if (ALWAYS) return isCloserException(tokenBeforeClosingParen); + return !isCloserException(tokenBeforeClosingParen); + } + return { Program: function checkParenSpaces(node) { + exceptions = getExceptions(); + const tokens = sourceCode.tokensAndComments; + tokens.forEach((token, i) => { + const prevToken = tokens[i - 1]; + const nextToken = tokens[i + 1]; + if (!(0, ast_exports.isOpeningParenToken)(token) && !(0, ast_exports.isClosingParenToken)(token)) return; + if (token.value === "(" && openerMissingSpace(token, nextToken)) context.report({ + node, + loc: token.loc, + messageId: "missingOpeningSpace", + fix(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); + if (token.value === "(" && openerRejectsSpace(token, nextToken)) context.report({ + node, + loc: { + start: token.loc.end, + end: nextToken.loc.start + }, + messageId: "rejectedOpeningSpace", + fix(fixer) { + return fixer.removeRange([token.range[1], nextToken.range[0]]); + } + }); + if (token.value === ")" && closerMissingSpace(prevToken, token)) context.report({ + node, + loc: token.loc, + messageId: "missingClosingSpace", + fix(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + if (token.value === ")" && closerRejectsSpace(prevToken, token)) context.report({ + node, + loc: { + start: prevToken.loc.end, + end: token.loc.start + }, + messageId: "rejectedClosingSpace", + fix(fixer) { + return fixer.removeRange([prevToken.range[1], token.range[0]]); + } + }); + }); + } }; + } +}); +export { space_in_parens_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-infix-ops.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-infix-ops.js new file mode 100644 index 0000000..616d0e4 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-infix-ops.js @@ -0,0 +1,133 @@ +import { AST_NODE_TYPES, AST_TOKEN_TYPES, ast_exports, createRule } from "../utils.js"; +const UNIONS = ["|", "&"]; +var space_infix_ops_default = createRule({ + name: "space-infix-ops", + meta: { + type: "layout", + docs: { description: "Require spacing around infix operators" }, + fixable: "whitespace", + schema: [{ + type: "object", + properties: { + int32Hint: { + type: "boolean", + default: false + }, + ignoreTypes: { + type: "boolean", + default: false + } + }, + additionalProperties: false + }], + messages: { missingSpace: "Operator '{{operator}}' must be spaced." } + }, + defaultOptions: [{ + int32Hint: false, + ignoreTypes: false + }], + create(context) { + const int32Hint = context.options[0] ? context.options[0].int32Hint === true : false; + const ignoreTypes = context.options[0] ? context.options[0].ignoreTypes === true : false; + const sourceCode = context.sourceCode; + function report(node, operator) { + context.report({ + node, + loc: operator.loc, + messageId: "missingSpace", + data: { operator: operator.value }, + fix(fixer) { + const previousToken = sourceCode.getTokenBefore(operator); + const afterToken = sourceCode.getTokenAfter(operator); + let fixString = ""; + if (operator.range[0] - previousToken.range[1] === 0) fixString = " "; + fixString += operator.value; + if (afterToken.range[0] - operator.range[1] === 0) fixString += " "; + return fixer.replaceText(operator, fixString); + } + }); + } + function getFirstNonSpacedToken(left, right, op) { + const operator = sourceCode.getFirstTokenBetween(left, right, (token) => token.value === op); + const prev = sourceCode.getTokenBefore(operator); + const next = sourceCode.getTokenAfter(operator); + if (!sourceCode.isSpaceBetween(prev, operator) || !sourceCode.isSpaceBetween(operator, next)) return operator; + return null; + } + function checkBinary(node) { + const leftNode = "typeAnnotation" in node.left && node.left.typeAnnotation ? node.left.typeAnnotation : node.left; + const rightNode = node.right; + const operator = "operator" in node && node.operator ? node.operator : "="; + const nonSpacedNode = getFirstNonSpacedToken(leftNode, rightNode, operator); + if (nonSpacedNode) { + if (!(int32Hint && sourceCode.getText(node).endsWith("|0"))) report(node, nonSpacedNode); + } + } + function checkConditional(node) { + const nonSpacedConsequentNode = getFirstNonSpacedToken(node.test, node.consequent, "?"); + const nonSpacedAlternateNode = getFirstNonSpacedToken(node.consequent, node.alternate, ":"); + if (nonSpacedConsequentNode) report(node, nonSpacedConsequentNode); + if (nonSpacedAlternateNode) report(node, nonSpacedAlternateNode); + } + function checkVar(node) { + const leftNode = node.id.typeAnnotation ? node.id.typeAnnotation : node.id; + const rightNode = node.init; + if (rightNode) { + const nonSpacedNode = getFirstNonSpacedToken(leftNode, rightNode, "="); + if (nonSpacedNode) report(node, nonSpacedNode); + } + } + function isSpaceChar(token) { + return token.type === AST_TOKEN_TYPES.Punctuator && /^[=?:]$/.test(token.value); + } + function checkAndReportAssignmentSpace(node, leftNode, rightNode) { + if (!rightNode || !leftNode) return; + const operator = sourceCode.getFirstTokenBetween(leftNode, rightNode, isSpaceChar); + const prev = sourceCode.getTokenBefore(operator); + const next = sourceCode.getTokenAfter(operator); + if (!sourceCode.isSpaceBetween(prev, operator) || !sourceCode.isSpaceBetween(operator, next)) report(node, operator); + } + function checkForEnumAssignmentSpace(node) { + checkAndReportAssignmentSpace(node, node.id, node.initializer); + } + function checkForPropertyDefinitionAssignmentSpace(node) { + const leftNode = node.optional && !node.typeAnnotation ? sourceCode.getTokenAfter(node.key) : node.typeAnnotation ?? node.key; + checkAndReportAssignmentSpace(node, leftNode, node.value); + } + function checkForTypeAnnotationSpace(typeAnnotation) { + const types = typeAnnotation.types; + types.forEach((type) => { + const skipFunctionParenthesis = type.type === AST_NODE_TYPES.TSFunctionType ? ast_exports.isNotOpeningParenToken : 0; + const operator = sourceCode.getTokenBefore(type, skipFunctionParenthesis); + if (!ignoreTypes && operator != null && UNIONS.includes(operator.value)) { + const prev = sourceCode.getTokenBefore(operator); + const next = sourceCode.getTokenAfter(operator); + if (!sourceCode.isSpaceBetween(prev, operator) || !sourceCode.isSpaceBetween(operator, next)) report(typeAnnotation, operator); + } + }); + } + function checkForTypeAliasAssignment(node) { + checkAndReportAssignmentSpace(node, node.typeParameters ?? node.id, node.typeAnnotation); + } + function checkForTypeConditional(node) { + checkAndReportAssignmentSpace(node, node.extendsType, node.trueType); + checkAndReportAssignmentSpace(node, node.trueType, node.falseType); + } + return { + AssignmentExpression: checkBinary, + AssignmentPattern: checkBinary, + BinaryExpression: checkBinary, + LogicalExpression: checkBinary, + ConditionalExpression: checkConditional, + VariableDeclarator: checkVar, + TSEnumMember: checkForEnumAssignmentSpace, + PropertyDefinition: checkForPropertyDefinitionAssignmentSpace, + AccessorProperty: checkForPropertyDefinitionAssignmentSpace, + TSTypeAliasDeclaration: checkForTypeAliasAssignment, + TSUnionType: checkForTypeAnnotationSpace, + TSIntersectionType: checkForTypeAnnotationSpace, + TSConditionalType: checkForTypeConditional + }; + } +}); +export { space_infix_ops_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-unary-ops.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-unary-ops.js new file mode 100644 index 0000000..51d6f83 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/space-unary-ops.js @@ -0,0 +1,158 @@ +import { canTokensBeAdjacent, createRule, isKeywordToken } from "../utils.js"; +var space_unary_ops_default = createRule({ + name: "space-unary-ops", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing before or after unary operators" }, + fixable: "whitespace", + schema: [{ + type: "object", + properties: { + words: { + type: "boolean", + default: true + }, + nonwords: { + type: "boolean", + default: false + }, + overrides: { + type: "object", + additionalProperties: { type: "boolean" } + } + }, + additionalProperties: false + }], + messages: { + unexpectedBefore: "Unexpected space before unary operator '{{operator}}'.", + unexpectedAfter: "Unexpected space after unary operator '{{operator}}'.", + unexpectedAfterWord: "Unexpected space after unary word operator '{{word}}'.", + requireAfterWord: "Unary word operator '{{word}}' must be followed by whitespace.", + requireAfter: "Unary operator '{{operator}}' must be followed by whitespace.", + requireBefore: "Space is required before unary operator '{{operator}}'." + } + }, + create(context) { + const options = context.options[0] || { + words: true, + nonwords: false + }; + const sourceCode = context.sourceCode; + function isFirstBangInBangBangExpression(node) { + return node && node.type === "UnaryExpression" && node.argument && node.argument.type === "UnaryExpression" && node.argument.operator === "!"; + } + function overrideExistsForOperator(operator) { + return options.overrides && Object.prototype.hasOwnProperty.call(options.overrides, operator); + } + function overrideEnforcesSpaces(operator) { + return options.overrides?.[operator]; + } + function verifyWordHasSpaces(node, firstToken, secondToken, word) { + if (secondToken.range[0] === firstToken.range[1]) context.report({ + node, + messageId: "requireAfterWord", + data: { word }, + fix(fixer) { + return fixer.insertTextAfter(firstToken, " "); + } + }); + } + function verifyWordDoesntHaveSpaces(node, firstToken, secondToken, word) { + if (canTokensBeAdjacent(firstToken, secondToken)) { + if (secondToken.range[0] > firstToken.range[1]) context.report({ + node, + messageId: "unexpectedAfterWord", + data: { word }, + fix(fixer) { + return fixer.removeRange([firstToken.range[1], secondToken.range[0]]); + } + }); + } + } + function checkUnaryWordOperatorForSpaces(node, firstToken, secondToken, word) { + const shouldHaveSpace = overrideExistsForOperator(word) ? overrideEnforcesSpaces(word) : options.words; + if (shouldHaveSpace) verifyWordHasSpaces(node, firstToken, secondToken, word); + else verifyWordDoesntHaveSpaces(node, firstToken, secondToken, word); + } + function checkForSpacesAroundNonNull(node) { + const operator = "!"; + const operatorToken = sourceCode.getLastToken(node, (token) => token.value === operator); + const prefixToken = sourceCode.getTokenBefore(operatorToken); + const shouldHaveSpace = overrideExistsForOperator(operator) ? overrideEnforcesSpaces(operator) : options.nonwords; + if (shouldHaveSpace) verifyNonWordsHaveSpaces(node, prefixToken, operatorToken); + else verifyNonWordsDontHaveSpaces(node, prefixToken, operatorToken); + } + function checkForSpacesAfterYield(node) { + const tokens = sourceCode.getFirstTokens(node, 3); + const word = "yield"; + if (!node.argument || node.delegate) return; + checkUnaryWordOperatorForSpaces(node, tokens[0], tokens[1], word); + } + function checkForSpacesAfterAwait(node) { + const tokens = sourceCode.getFirstTokens(node, 3); + checkUnaryWordOperatorForSpaces(node, tokens[0], tokens[1], "await"); + } + function verifyNonWordsHaveSpaces(node, firstToken, secondToken) { + if ("prefix" in node && node.prefix) { + if (isFirstBangInBangBangExpression(node)) return; + if (firstToken.range[1] === secondToken.range[0]) context.report({ + node, + messageId: "requireAfter", + data: { operator: firstToken.value }, + fix(fixer) { + return fixer.insertTextAfter(firstToken, " "); + } + }); + } else if (firstToken.range[1] === secondToken.range[0]) context.report({ + node, + messageId: "requireBefore", + data: { operator: secondToken.value }, + fix(fixer) { + return fixer.insertTextBefore(secondToken, " "); + } + }); + } + function verifyNonWordsDontHaveSpaces(node, firstToken, secondToken) { + if ("prefix" in node && node.prefix) { + if (secondToken.range[0] > firstToken.range[1]) context.report({ + node, + messageId: "unexpectedAfter", + data: { operator: firstToken.value }, + fix(fixer) { + if (canTokensBeAdjacent(firstToken, secondToken)) return fixer.removeRange([firstToken.range[1], secondToken.range[0]]); + return null; + } + }); + } else if (secondToken.range[0] > firstToken.range[1]) context.report({ + node, + messageId: "unexpectedBefore", + data: { operator: secondToken.value }, + fix(fixer) { + return fixer.removeRange([firstToken.range[1], secondToken.range[0]]); + } + }); + } + function checkForSpaces(node) { + const tokens = node.type === "UpdateExpression" && !node.prefix ? sourceCode.getLastTokens(node, 2) : sourceCode.getFirstTokens(node, 2); + const firstToken = tokens[0]; + const secondToken = tokens[1]; + if ((node.type === "NewExpression" || node.prefix) && isKeywordToken(firstToken)) { + checkUnaryWordOperatorForSpaces(node, firstToken, secondToken, firstToken.value); + return; + } + const operator = "prefix" in node && node.prefix ? tokens[0].value : tokens[1].value; + const shouldHaveSpace = overrideExistsForOperator(operator) ? overrideEnforcesSpaces(operator) : options.nonwords; + if (shouldHaveSpace) verifyNonWordsHaveSpaces(node, firstToken, secondToken); + else verifyNonWordsDontHaveSpaces(node, firstToken, secondToken); + } + return { + UnaryExpression: checkForSpaces, + UpdateExpression: checkForSpaces, + NewExpression: checkForSpaces, + YieldExpression: checkForSpacesAfterYield, + AwaitExpression: checkForSpacesAfterAwait, + TSNonNullExpression: checkForSpacesAroundNonNull + }; + } +}); +export { space_unary_ops_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/spaced-comment.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/spaced-comment.js new file mode 100644 index 0000000..9ad0322 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/spaced-comment.js @@ -0,0 +1,189 @@ +import { LINEBREAKS, createRule, isHashbangComment } from "../utils.js"; +import { escapeStringRegexp } from "../vendor.js"; +function escape(s) { + return `(?:${escapeStringRegexp(s)})`; +} +function escapeAndRepeat(s) { + return `${escape(s)}+`; +} +function parseMarkersOption(markers) { + if (!markers.includes("*")) return markers.concat("*"); + return markers; +} +function createExceptionsPattern(exceptions) { + let pattern = ""; + if (exceptions.length === 0) pattern += "\\s"; + else { + pattern += "(?:\\s|"; + if (exceptions.length === 1) pattern += escapeAndRepeat(exceptions[0]); + else { + pattern += "(?:"; + pattern += exceptions.map(escapeAndRepeat).join("|"); + pattern += ")"; + } + pattern += `(?:$|[${Array.from(LINEBREAKS).join("")}]))`; + } + return pattern; +} +function createAlwaysStylePattern(markers, exceptions) { + let pattern = "^"; + if (markers.length === 1) pattern += escape(markers[0]); + else { + pattern += "(?:"; + pattern += markers.map(escape).join("|"); + pattern += ")"; + } + pattern += "?"; + pattern += createExceptionsPattern(exceptions); + return new RegExp(pattern, "u"); +} +function createNeverStylePattern(markers) { + const pattern = `^(${markers.map(escape).join("|")})?[ \t]+`; + return new RegExp(pattern, "u"); +} +var spaced_comment_default = createRule({ + name: "spaced-comment", + meta: { + type: "layout", + docs: { description: "Enforce consistent spacing after the `//` or `/*` in a comment" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: ["always", "never"] + }, { + type: "object", + properties: { + exceptions: { + type: "array", + items: { type: "string" } + }, + markers: { + type: "array", + items: { type: "string" } + }, + line: { + type: "object", + properties: { + exceptions: { + type: "array", + items: { type: "string" } + }, + markers: { + type: "array", + items: { type: "string" } + } + }, + additionalProperties: false + }, + block: { + type: "object", + properties: { + exceptions: { + type: "array", + items: { type: "string" } + }, + markers: { + type: "array", + items: { type: "string" } + }, + balanced: { + type: "boolean", + default: false + } + }, + additionalProperties: false + } + }, + additionalProperties: false + }], + messages: { + unexpectedSpaceAfterMarker: "Unexpected space or tab after marker ({{refChar}}) in comment.", + expectedExceptionAfter: "Expected exception block, space or tab after '{{refChar}}' in comment.", + unexpectedSpaceBefore: "Unexpected space or tab before '*/' in comment.", + unexpectedSpaceAfter: "Unexpected space or tab after '{{refChar}}' in comment.", + expectedSpaceBefore: "Expected space or tab before '*/' in comment.", + expectedSpaceAfter: "Expected space or tab after '{{refChar}}' in comment." + } + }, + create(context) { + const sourceCode = context.sourceCode; + const requireSpace = context.options[0] !== "never"; + const config = context.options[1] || {}; + const balanced = config.block && config.block.balanced; + const styleRules = ["block", "line"].reduce((rule, type) => { + const nodeType = type; + const markers = parseMarkersOption(config[nodeType] && config[nodeType]?.markers || config.markers || []); + const exceptions = config[nodeType] && config[nodeType]?.exceptions || config.exceptions || []; + const endNeverPattern = "[ ]+$"; + rule[nodeType] = { + beginRegex: requireSpace ? createAlwaysStylePattern(markers, exceptions) : createNeverStylePattern(markers), + endRegex: balanced && requireSpace ? new RegExp(`${createExceptionsPattern(exceptions)}$`, "u") : new RegExp(endNeverPattern, "u"), + hasExceptions: exceptions.length > 0, + captureMarker: new RegExp(`^(${markers.map(escape).join("|")})`, "u"), + markers: new Set(markers) + }; + return rule; + }, {}); + function reportBegin(node, messageId, match, refChar) { + const type = node.type.toLowerCase(); + const commentIdentifier = type === "block" ? "/*" : "//"; + context.report({ + node, + fix(fixer) { + const start = node.range[0]; + let end = start + 2; + if (requireSpace) { + if (match) end += match[0].length; + return fixer.insertTextAfterRange([start, end], " "); + } + if (match) end += match[0].length; + return fixer.replaceTextRange([start, end], commentIdentifier + (match && match[1] ? match[1] : "")); + }, + messageId, + data: { refChar } + }); + } + function reportEnd(node, messageId, match) { + context.report({ + node, + fix(fixer) { + if (requireSpace) return fixer.insertTextAfterRange([node.range[0], node.range[1] - 2], " "); + const end = node.range[1] - 2; + let start = end; + if (match) start -= match[0].length; + return fixer.replaceTextRange([start, end], ""); + }, + messageId + }); + } + function checkCommentForSpace(node) { + const type = node.type.toLowerCase(); + const rule = styleRules[type]; + const commentIdentifier = type === "block" ? "/*" : "//"; + if (node.value.length === 0 || rule.markers.has(node.value)) return; + if (type === "line" && (node.value.startsWith("/ { + if (!isHashbangComment(comment)) checkCommentForSpace(comment); + }); + } }; + } +}); +export { spaced_comment_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/switch-colon-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/switch-colon-spacing.js new file mode 100644 index 0000000..8f3f1b2 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/switch-colon-spacing.js @@ -0,0 +1,61 @@ +import { ast_exports, createRule, getSwitchCaseColonToken, hasCommentsBetween } from "../utils.js"; +var switch_colon_spacing_default = createRule({ + name: "switch-colon-spacing", + meta: { + type: "layout", + docs: { description: "Enforce spacing around colons of switch statements" }, + schema: [{ + type: "object", + properties: { + before: { + type: "boolean", + default: false + }, + after: { + type: "boolean", + default: true + } + }, + additionalProperties: false + }], + fixable: "whitespace", + messages: { + expectedBefore: "Expected space(s) before this colon.", + expectedAfter: "Expected space(s) after this colon.", + unexpectedBefore: "Unexpected space(s) before this colon.", + unexpectedAfter: "Unexpected space(s) after this colon." + } + }, + create(context) { + const sourceCode = context.sourceCode; + const options = context.options[0] || {}; + const beforeSpacing = options.before === true; + const afterSpacing = options.after !== false; + function isValidSpacing(left, right, expected) { + return (0, ast_exports.isClosingBraceToken)(right) || !(0, ast_exports.isTokenOnSameLine)(left, right) || sourceCode.isSpaceBetween(left, right) === expected; + } + function fix(fixer, left, right, spacing) { + if (hasCommentsBetween(sourceCode, left, right)) return null; + if (spacing) return fixer.insertTextAfter(left, " "); + return fixer.removeRange([left.range[1], right.range[0]]); + } + return { SwitchCase(node) { + const colonToken = getSwitchCaseColonToken(node, sourceCode); + const beforeToken = sourceCode.getTokenBefore(colonToken); + const afterToken = sourceCode.getTokenAfter(colonToken); + if (!isValidSpacing(beforeToken, colonToken, beforeSpacing)) context.report({ + node, + loc: colonToken.loc, + messageId: beforeSpacing ? "expectedBefore" : "unexpectedBefore", + fix: (fixer) => fix(fixer, beforeToken, colonToken, beforeSpacing) + }); + if (!isValidSpacing(colonToken, afterToken, afterSpacing)) context.report({ + node, + loc: colonToken.loc, + messageId: afterSpacing ? "expectedAfter" : "unexpectedAfter", + fix: (fixer) => fix(fixer, colonToken, afterToken, afterSpacing) + }); + } }; + } +}); +export { switch_colon_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/template-curly-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/template-curly-spacing.js new file mode 100644 index 0000000..919266e --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/template-curly-spacing.js @@ -0,0 +1,79 @@ +import { ast_exports, createRule } from "../utils.js"; +var template_curly_spacing_default = createRule({ + name: "template-curly-spacing", + meta: { + type: "layout", + docs: { description: "Require or disallow spacing around embedded expressions of template strings" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: ["always", "never"] + }], + messages: { + expectedBefore: "Expected space(s) before '}'.", + expectedAfter: "Expected space(s) after '${'.", + unexpectedBefore: "Unexpected space(s) before '}'.", + unexpectedAfter: "Unexpected space(s) after '${'." + } + }, + create(context) { + const sourceCode = context.sourceCode; + const always = context.options[0] === "always"; + function checkSpacingBefore(token) { + if (!token.value.startsWith("}")) return; + const prevToken = sourceCode.getTokenBefore(token, { includeComments: true }); + const hasSpace = sourceCode.isSpaceBetween(prevToken, token); + if (!(0, ast_exports.isTokenOnSameLine)(prevToken, token)) return; + if (always && !hasSpace) context.report({ + loc: { + start: token.loc.start, + end: { + line: token.loc.start.line, + column: token.loc.start.column + 1 + } + }, + messageId: "expectedBefore", + fix: (fixer) => fixer.insertTextBefore(token, " ") + }); + if (!always && hasSpace) context.report({ + loc: { + start: prevToken.loc.end, + end: token.loc.start + }, + messageId: "unexpectedBefore", + fix: (fixer) => fixer.removeRange([prevToken.range[1], token.range[0]]) + }); + } + function checkSpacingAfter(token) { + if (!token.value.endsWith("${")) return; + const nextToken = sourceCode.getTokenAfter(token, { includeComments: true }); + const hasSpace = sourceCode.isSpaceBetween(token, nextToken); + if (!(0, ast_exports.isTokenOnSameLine)(token, nextToken)) return; + if (always && !hasSpace) context.report({ + loc: { + start: { + line: token.loc.end.line, + column: token.loc.end.column - 2 + }, + end: token.loc.end + }, + messageId: "expectedAfter", + fix: (fixer) => fixer.insertTextAfter(token, " ") + }); + if (!always && hasSpace) context.report({ + loc: { + start: token.loc.end, + end: nextToken.loc.start + }, + messageId: "unexpectedAfter", + fix: (fixer) => fixer.removeRange([token.range[1], nextToken.range[0]]) + }); + } + return { TemplateElement(node) { + const token = sourceCode.getFirstToken(node); + checkSpacingBefore(token); + checkSpacingAfter(token); + } }; + } +}); +export { template_curly_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/template-tag-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/template-tag-spacing.js new file mode 100644 index 0000000..a12b352 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/template-tag-spacing.js @@ -0,0 +1,52 @@ +import { createRule } from "../utils.js"; +var template_tag_spacing_default = createRule({ + name: "template-tag-spacing", + meta: { + type: "layout", + docs: { description: "Require or disallow spacing between template tags and their literals" }, + fixable: "whitespace", + schema: [{ + type: "string", + enum: ["always", "never"] + }], + messages: { + unexpected: "Unexpected space between template tag and template literal.", + missing: "Missing space between template tag and template literal." + } + }, + create(context) { + const never = context.options[0] !== "always"; + const sourceCode = context.sourceCode; + function checkSpacing(node) { + const tagToken = sourceCode.getTokenBefore(node.quasi); + const literalToken = sourceCode.getFirstToken(node.quasi); + const hasWhitespace = sourceCode.isSpaceBetween(tagToken, literalToken); + if (never && hasWhitespace) context.report({ + node, + loc: { + start: tagToken.loc.end, + end: literalToken.loc.start + }, + messageId: "unexpected", + fix(fixer) { + const comments = sourceCode.getCommentsBefore(node.quasi); + if (comments.some((comment) => comment.type === "Line")) return null; + return fixer.replaceTextRange([tagToken.range[1], literalToken.range[0]], comments.reduce((text, comment) => text + sourceCode.getText(comment), "")); + } + }); + else if (!never && !hasWhitespace) context.report({ + node, + loc: { + start: node.loc.start, + end: literalToken.loc.start + }, + messageId: "missing", + fix(fixer) { + return fixer.insertTextAfter(tagToken, " "); + } + }); + } + return { TaggedTemplateExpression: checkSpacing }; + } +}); +export { template_tag_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/type-annotation-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/type-annotation-spacing.js new file mode 100644 index 0000000..355c916 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/type-annotation-spacing.js @@ -0,0 +1,175 @@ +import { ast_exports, createRule } from "../utils.js"; +function createRules(options) { + const globals = { + ...options?.before !== void 0 ? { before: options.before } : {}, + ...options?.after !== void 0 ? { after: options.after } : {} + }; + const override = options?.overrides ?? {}; + const colon = { + before: false, + after: true, + ...globals, + ...override?.colon + }; + const arrow = { + before: true, + after: true, + ...globals, + ...override?.arrow + }; + return { + colon, + arrow, + variable: { + ...colon, + ...override?.variable + }, + property: { + ...colon, + ...override?.property + }, + parameter: { + ...colon, + ...override?.parameter + }, + returnType: { + ...colon, + ...override?.returnType + } + }; +} +function getIdentifierRules(rules, node) { + const scope = node?.parent; + if ((0, ast_exports.isVariableDeclarator)(scope)) return rules.variable; + else if ((0, ast_exports.isFunctionOrFunctionType)(scope)) return rules.parameter; + return rules.colon; +} +function getRules(rules, node) { + const scope = node?.parent?.parent; + if ((0, ast_exports.isTSFunctionType)(scope) || (0, ast_exports.isTSConstructorType)(scope)) return rules.arrow; + else if ((0, ast_exports.isIdentifier)(scope)) return getIdentifierRules(rules, scope); + else if ((0, ast_exports.isClassOrTypeElement)(scope)) return rules.property; + else if ((0, ast_exports.isFunction)(scope)) return rules.returnType; + return rules.colon; +} +var type_annotation_spacing_default = createRule({ + name: "type-annotation-spacing", + meta: { + type: "layout", + docs: { description: "Require consistent spacing around type annotations" }, + fixable: "whitespace", + messages: { + expectedSpaceAfter: "Expected a space after the '{{type}}'.", + expectedSpaceBefore: "Expected a space before the '{{type}}'.", + unexpectedSpaceAfter: "Unexpected space after the '{{type}}'.", + unexpectedSpaceBefore: "Unexpected space before the '{{type}}'.", + unexpectedSpaceBetween: "Unexpected space between the '{{previousToken}}' and the '{{type}}'." + }, + schema: [{ + $defs: { spacingConfig: { + type: "object", + properties: { + before: { type: "boolean" }, + after: { type: "boolean" } + }, + additionalProperties: false + } }, + type: "object", + properties: { + before: { type: "boolean" }, + after: { type: "boolean" }, + overrides: { + type: "object", + properties: { + colon: { $ref: "#/items/0/$defs/spacingConfig" }, + arrow: { $ref: "#/items/0/$defs/spacingConfig" }, + variable: { $ref: "#/items/0/$defs/spacingConfig" }, + parameter: { $ref: "#/items/0/$defs/spacingConfig" }, + property: { $ref: "#/items/0/$defs/spacingConfig" }, + returnType: { $ref: "#/items/0/$defs/spacingConfig" } + }, + additionalProperties: false + } + }, + additionalProperties: false + }] + }, + defaultOptions: [{}], + create(context, [options]) { + const punctuators = [":", "=>"]; + const sourceCode = context.sourceCode; + const ruleSet = createRules(options); + function checkTypeAnnotationSpacing(typeAnnotation) { + const punctuatorTokenEnd = sourceCode.getTokenBefore(typeAnnotation, ast_exports.isNotOpeningParenToken); + let punctuatorTokenStart = punctuatorTokenEnd; + let previousToken = sourceCode.getTokenBefore(punctuatorTokenEnd); + let type = punctuatorTokenEnd.value; + if (!punctuators.includes(type)) return; + const { before, after } = getRules(ruleSet, typeAnnotation); + if (type === ":" && previousToken.value === "?") { + if (sourceCode.isSpaceBetween(previousToken, punctuatorTokenStart)) context.report({ + node: punctuatorTokenStart, + messageId: "unexpectedSpaceBetween", + data: { + type, + previousToken: previousToken.value + }, + fix(fixer) { + return fixer.removeRange([previousToken.range[1], punctuatorTokenStart.range[0]]); + } + }); + type = "?:"; + punctuatorTokenStart = previousToken; + previousToken = sourceCode.getTokenBefore(previousToken); + if (previousToken.value === "+" || previousToken.value === "-") { + type = `${previousToken.value}?:`; + punctuatorTokenStart = previousToken; + previousToken = sourceCode.getTokenBefore(previousToken); + } + } + const hasNextSpace = sourceCode.isSpaceBetween(punctuatorTokenEnd, typeAnnotation); + if (after && !hasNextSpace) context.report({ + node: punctuatorTokenEnd, + messageId: "expectedSpaceAfter", + data: { type }, + fix(fixer) { + return fixer.insertTextAfter(punctuatorTokenEnd, " "); + } + }); + else if (!after && hasNextSpace) context.report({ + node: punctuatorTokenEnd, + messageId: "unexpectedSpaceAfter", + data: { type }, + fix(fixer) { + return fixer.removeRange([punctuatorTokenEnd.range[1], typeAnnotation.range[0]]); + } + }); + const hasPrevSpace = sourceCode.isSpaceBetween(previousToken, punctuatorTokenStart); + if (before && !hasPrevSpace) context.report({ + node: punctuatorTokenStart, + messageId: "expectedSpaceBefore", + data: { type }, + fix(fixer) { + return fixer.insertTextAfter(previousToken, " "); + } + }); + else if (!before && hasPrevSpace) context.report({ + node: punctuatorTokenStart, + messageId: "unexpectedSpaceBefore", + data: { type }, + fix(fixer) { + return fixer.removeRange([previousToken.range[1], punctuatorTokenStart.range[0]]); + } + }); + } + return { + TSMappedType(node) { + if (node.typeAnnotation) checkTypeAnnotationSpacing(node.typeAnnotation); + }, + TSTypeAnnotation(node) { + checkTypeAnnotationSpacing(node.typeAnnotation); + } + }; + } +}); +export { type_annotation_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/type-generic-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/type-generic-spacing.js new file mode 100644 index 0000000..4c4b75b --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/type-generic-spacing.js @@ -0,0 +1,109 @@ +import { createRule } from "../utils.js"; +const PRESERVE_PREFIX_SPACE_BEFORE_GENERIC = new Set([ + "TSCallSignatureDeclaration", + "ArrowFunctionExpression", + "TSFunctionType", + "FunctionExpression", + "ClassExpression" +]); +var type_generic_spacing_default = createRule({ + name: "type-generic-spacing", + meta: { + type: "layout", + docs: { description: "Enforces consistent spacing inside TypeScript type generics" }, + fixable: "whitespace", + schema: [], + messages: { genericSpacingMismatch: "Generic spaces mismatch" } + }, + defaultOptions: [], + create: (context) => { + const sourceCode = context.sourceCode; + function removeSpaceBetween(left, right) { + const textBetween = sourceCode.text.slice(left.range[1], right.range[0]); + if (/\s/.test(textBetween) && !/^[\r\n]/.test(textBetween)) context.report({ + loc: { + start: left.loc.end, + end: right.loc.start + }, + messageId: "genericSpacingMismatch", + *fix(fixer) { + yield fixer.replaceTextRange([left.range[1], right.range[0]], ""); + } + }); + } + function checkBracketSpacing(openToken, closeToken) { + if (openToken) { + const firstToken = sourceCode.getTokenAfter(openToken); + if (firstToken) removeSpaceBetween(openToken, firstToken); + } + if (closeToken) { + const lastToken = sourceCode.getTokenBefore(closeToken); + if (lastToken) removeSpaceBetween(lastToken, closeToken); + } + } + return { + TSTypeParameterInstantiation: (node) => { + const params = node.params; + if (params.length === 0) return; + const openToken = sourceCode.getTokenBefore(params[0]); + const closeToken = sourceCode.getTokenAfter(params[params.length - 1]); + checkBracketSpacing(openToken, closeToken); + }, + TSTypeParameterDeclaration: (node) => { + if (!PRESERVE_PREFIX_SPACE_BEFORE_GENERIC.has(node.parent.type)) { + const pre = sourceCode.text.slice(0, node.range[0]); + const preSpace = pre.match(/(\s+)$/)?.[0]; + if (preSpace && preSpace.length) context.report({ + node, + messageId: "genericSpacingMismatch", + *fix(fixer) { + yield fixer.replaceTextRange([node.range[0] - preSpace.length, node.range[0]], ""); + } + }); + } + const params = node.params; + if (params.length === 0) return; + const openToken = sourceCode.getTokenBefore(params[0]); + const closeToken = sourceCode.getTokenAfter(params[params.length - 1]); + checkBracketSpacing(openToken, closeToken); + for (let i = 1; i < params.length; i++) { + const prev = params[i - 1]; + const current = params[i]; + const from = prev.range[1]; + const to = current.range[0]; + const span = sourceCode.text.slice(from, to); + if (span !== ", " && !span.match(/,\s*\n/)) context.report({ + *fix(fixer) { + yield fixer.replaceTextRange([from, to], ", "); + }, + loc: { + start: prev.loc.end, + end: current.loc.start + }, + messageId: "genericSpacingMismatch", + node + }); + } + }, + TSTypeParameter: (node) => { + if (!node.default) return; + const endNode = node.constraint || node.name; + const from = endNode.range[1]; + const to = node.default.range[0]; + const span = sourceCode.text.slice(from, to); + if (!span.match(/(?:^|[^ ]) = (?:$|[^ ])/)) context.report({ + *fix(fixer) { + yield fixer.replaceTextRange([from, to], span.replace(/\s*=\s*/, " = ")); + }, + loc: { + start: endNode.loc.end, + end: node.default.loc.start + }, + messageId: "genericSpacingMismatch", + node + }); + } + }; + } +}); +export { type_generic_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/type-named-tuple-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/type-named-tuple-spacing.js new file mode 100644 index 0000000..1bd3c1e --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/type-named-tuple-spacing.js @@ -0,0 +1,59 @@ +import { createRule } from "../utils.js"; +const tupleRe = /^([\w$]+)(\s*)(\?\s*)?:(\s*)(.*)$/; +var type_named_tuple_spacing_default = createRule({ + name: "type-named-tuple-spacing", + meta: { + type: "layout", + docs: { description: "Expect space before the type declaration in the named tuple" }, + fixable: "whitespace", + schema: [], + messages: { + expectedSpaceAfter: "Expected a space after the ':'.", + unexpectedSpaceBetween: "Unexpected space between '?' and the ':'.", + unexpectedSpaceBefore: "Unexpected space before the ':'." + } + }, + defaultOptions: [], + create: (context) => { + const sourceCode = context.getSourceCode(); + return { TSNamedTupleMember: (node) => { + const code = sourceCode.text.slice(node.range[0], node.range[1]); + const match = code.match(tupleRe); + if (!match) return; + const labelName = node.label.name; + const spaceBeforeColon = match[2]; + const optionalMark = match[3]; + const spacesAfterColon = match[4]; + const elementType = match[5]; + function getReplaceValue() { + let ret = labelName; + if (node.optional) ret += "?"; + ret += ": "; + ret += elementType; + return ret; + } + if (optionalMark?.length > 1) context.report({ + node, + messageId: "unexpectedSpaceBetween", + *fix(fixer) { + yield fixer.replaceTextRange(node.range, code.replace(tupleRe, getReplaceValue())); + } + }); + if (spaceBeforeColon?.length) context.report({ + node, + messageId: "unexpectedSpaceBefore", + *fix(fixer) { + yield fixer.replaceTextRange(node.range, code.replace(tupleRe, getReplaceValue())); + } + }); + if (spacesAfterColon != null && spacesAfterColon.length !== 1) context.report({ + node, + messageId: "expectedSpaceAfter", + *fix(fixer) { + yield fixer.replaceTextRange(node.range, code.replace(tupleRe, getReplaceValue())); + } + }); + } }; + } +}); +export { type_named_tuple_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/wrap-iife.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/wrap-iife.js new file mode 100644 index 0000000..fc16245 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/wrap-iife.js @@ -0,0 +1,84 @@ +import { ast_exports, createRule, getStaticPropertyName, isParenthesised, skipChainExpression } from "../utils.js"; +function isCalleeOfNewExpression(node) { + const maybeCallee = node.parent?.type === "ChainExpression" ? node.parent : node; + return maybeCallee.parent?.type === "NewExpression" && maybeCallee.parent.callee === maybeCallee; +} +var wrap_iife_default = createRule({ + name: "wrap-iife", + meta: { + type: "layout", + docs: { description: "Require parentheses around immediate `function` invocations" }, + schema: [{ + type: "string", + enum: [ + "outside", + "inside", + "any" + ] + }, { + type: "object", + properties: { functionPrototypeMethods: { + type: "boolean", + default: false + } }, + additionalProperties: false + }], + fixable: "code", + messages: { + wrapInvocation: "Wrap an immediate function invocation in parentheses.", + wrapExpression: "Wrap only the function expression in parens.", + moveInvocation: "Move the invocation into the parens that contain the function." + } + }, + create(context) { + const style = context.options[0] || "outside"; + const includeFunctionPrototypeMethods = context.options[1] && context.options[1].functionPrototypeMethods; + const sourceCode = context.sourceCode; + function isWrappedInAnyParens(node) { + return isParenthesised(sourceCode, node); + } + function isWrappedInGroupingParens(node) { + return (0, ast_exports.isParenthesized)(node, sourceCode); + } + function getFunctionNodeFromIIFE(node) { + const callee = skipChainExpression(node.callee); + if (callee.type === "FunctionExpression") return callee; + if (includeFunctionPrototypeMethods && callee.type === "MemberExpression" && callee.object.type === "FunctionExpression" && (getStaticPropertyName(callee) === "call" || getStaticPropertyName(callee) === "apply")) return callee.object; + return null; + } + return { CallExpression(node) { + const innerNode = getFunctionNodeFromIIFE(node); + if (!innerNode) return; + const isCallExpressionWrapped = isWrappedInAnyParens(node); + const isFunctionExpressionWrapped = isWrappedInAnyParens(innerNode); + if (!isCallExpressionWrapped && !isFunctionExpressionWrapped) context.report({ + node, + messageId: "wrapInvocation", + fix(fixer) { + const nodeToSurround = style === "inside" ? innerNode : node; + return fixer.replaceText(nodeToSurround, `(${sourceCode.getText(nodeToSurround)})`); + } + }); + else if (style === "inside" && !isFunctionExpressionWrapped) context.report({ + node, + messageId: "wrapExpression", + fix(fixer) { + if (isWrappedInGroupingParens(node) && !isCalleeOfNewExpression(node)) { + const parenAfter = sourceCode.getTokenAfter(node); + return fixer.replaceTextRange([innerNode.range[1], parenAfter.range[1]], `)${sourceCode.getText().slice(innerNode.range[1], parenAfter.range[0])}`); + } + return fixer.replaceText(innerNode, `(${sourceCode.getText(innerNode)})`); + } + }); + else if (style === "outside" && !isCallExpressionWrapped) context.report({ + node, + messageId: "moveInvocation", + fix(fixer) { + const parenAfter = sourceCode.getTokenAfter(innerNode); + return fixer.replaceTextRange([parenAfter.range[0], node.range[1]], `${sourceCode.getText().slice(parenAfter.range[1], node.range[1])})`); + } + }); + } }; + } +}); +export { wrap_iife_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/wrap-regex.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/wrap-regex.js new file mode 100644 index 0000000..94528ba --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/wrap-regex.js @@ -0,0 +1,29 @@ +import { createRule } from "../utils.js"; +var wrap_regex_default = createRule({ + name: "wrap-regex", + meta: { + type: "layout", + docs: { description: "Require parenthesis around regex literals" }, + schema: [], + fixable: "code", + messages: { requireParens: "Wrap the regexp literal in parens to disambiguate the slash." } + }, + create(context) { + const sourceCode = context.sourceCode; + return { Literal(node) { + const token = sourceCode.getFirstToken(node); + const nodeType = token.type; + if (nodeType === "RegularExpression") { + const beforeToken = sourceCode.getTokenBefore(node); + const afterToken = sourceCode.getTokenAfter(node); + const { parent } = node; + if (parent.type === "MemberExpression" && parent.object === node && !(beforeToken && beforeToken.value === "(" && afterToken && afterToken.value === ")")) context.report({ + node, + messageId: "requireParens", + fix: (fixer) => fixer.replaceText(node, `(${sourceCode.getText(node)})`) + }); + } + } }; + } +}); +export { wrap_regex_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/rules/yield-star-spacing.js b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/yield-star-spacing.js new file mode 100644 index 0000000..83f1a41 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/rules/yield-star-spacing.js @@ -0,0 +1,85 @@ +import { createRule } from "../utils.js"; +var yield_star_spacing_default = createRule({ + name: "yield-star-spacing", + meta: { + type: "layout", + docs: { description: "Require or disallow spacing around the `*` in `yield*` expressions" }, + fixable: "whitespace", + schema: [{ oneOf: [{ + type: "string", + enum: [ + "before", + "after", + "both", + "neither" + ] + }, { + type: "object", + properties: { + before: { type: "boolean" }, + after: { type: "boolean" } + }, + additionalProperties: false + }] }], + messages: { + missingBefore: "Missing space before *.", + missingAfter: "Missing space after *.", + unexpectedBefore: "Unexpected space before *.", + unexpectedAfter: "Unexpected space after *." + } + }, + create(context) { + const sourceCode = context.sourceCode; + const mode = function(option = "after") { + if (typeof option === "string") return { + before: { + before: true, + after: false + }, + after: { + before: false, + after: true + }, + both: { + before: true, + after: true + }, + neither: { + before: false, + after: false + } + }[option]; + return option; + }(context.options[0]); + function checkSpacing(side, leftToken, rightToken) { + if (sourceCode.isSpaceBetween(leftToken, rightToken) !== mode[side]) { + const after = leftToken.value === "*"; + const spaceRequired = mode[side]; + const node = after ? leftToken : rightToken; + const messageId = spaceRequired ? side === "before" ? "missingBefore" : "missingAfter" : side === "before" ? "unexpectedBefore" : "unexpectedAfter"; + context.report({ + node, + messageId, + fix(fixer) { + if (spaceRequired) { + if (after) return fixer.insertTextAfter(node, " "); + return fixer.insertTextBefore(node, " "); + } + return fixer.removeRange([leftToken.range[1], rightToken.range[0]]); + } + }); + } + } + function checkExpression(node) { + if (!("delegate" in node && node.delegate)) return; + const tokens = sourceCode.getFirstTokens(node, 3); + const yieldToken = tokens[0]; + const starToken = tokens[1]; + const nextToken = tokens[2]; + checkSpacing("before", yieldToken, starToken); + checkSpacing("after", starToken, nextToken); + } + return { YieldExpression: checkExpression }; + } +}); +export { yield_star_spacing_default }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/utils.js b/slider/node_modules/@stylistic/eslint-plugin/dist/utils.js new file mode 100644 index 0000000..a76500b --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/utils.js @@ -0,0 +1,664 @@ +import { __export, __reExport, __toESM } from "./rolldown-runtime.js"; +import { require_ast_utils } from "./vendor.js"; +import { env } from "node:process"; +import { AST_NODE_TYPES, AST_TOKEN_TYPES } from "@typescript-eslint/types"; +import { KEYS } from "eslint-visitor-keys"; +import { latestEcmaVersion, tokenize } from "espree"; +import { traverse } from "estraverse"; +function createAllConfigs(plugin, name, filter) { + const rules = Object.fromEntries(Object.entries(plugin.rules).filter(([key, rule]) => rule.meta.fixable && !rule.meta.deprecated && key === rule.meta.docs.url.split("/").pop() && (!filter || filter(key, rule))).map(([key]) => [`${name}/${key}`, 2])); + return { + plugins: { [name]: plugin }, + rules + }; +} +const warned = /* @__PURE__ */ new Set(); +function warnOnce(text) { + if (env.TEST || warned.has(text)) return; + warned.add(text); + console.warn(`[@stylistic/eslint-plugin]: ${text}`); +} +function warnDeprecation(value, instead, rule = "") { + let message = `You are using deprecated ${value}${rule ? ` in "${rule}"` : ""}`; + if (instead) message += `, please use ${instead} instead.`; + return warnOnce(message); +} +function warnDeprecatedOptions(options, keys, instead, rule = "") { + if (!Array.isArray(keys)) keys = [keys]; + keys.forEach((key) => { + if (options && Object.hasOwn(options, key)) warnDeprecation(`option("${key.toString()}")`, instead ? `"${instead.toString()}"` : void 0, rule); + }); +} +var import_ast_utils = /* @__PURE__ */ __toESM(require_ast_utils(), 1); +const COMMENTS_IGNORE_PATTERN = /^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u; +const LINEBREAKS = /* @__PURE__ */ new Set([ + "\r\n", + "\r", + "\n", + "\u2028", + "\u2029" +]); +const STATEMENT_LIST_PARENTS = /* @__PURE__ */ new Set([ + "Program", + "BlockStatement", + "StaticBlock", + "SwitchCase" +]); +const DECIMAL_INTEGER_PATTERN = /^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u; +const OCTAL_OR_NON_OCTAL_DECIMAL_ESCAPE_PATTERN = /^(?:[^\\]|\\.)*\\(?:[1-9]|0\d)/su; +const ASSIGNMENT_OPERATOR = [ + "=", + "+=", + "-=", + "*=", + "/=", + "%=", + "<<=", + ">>=", + ">>>=", + "|=", + "^=", + "&=", + "**=", + "||=", + "&&=", + "??=" +]; +const ES3_KEYWORDS = [ + "abstract", + "boolean", + "break", + "byte", + "case", + "catch", + "char", + "class", + "const", + "continue", + "debugger", + "default", + "delete", + "do", + "double", + "else", + "enum", + "export", + "extends", + "false", + "final", + "finally", + "float", + "for", + "function", + "goto", + "if", + "implements", + "import", + "in", + "instanceof", + "int", + "interface", + "long", + "native", + "new", + "null", + "package", + "private", + "protected", + "public", + "return", + "short", + "static", + "super", + "switch", + "synchronized", + "this", + "throw", + "throws", + "transient", + "true", + "try", + "typeof", + "var", + "void", + "volatile", + "while", + "with" +]; +const KEYWORDS = [ + ...ES3_KEYWORDS, + "arguments", + "as", + "async", + "await", + "eval", + "from", + "get", + "let", + "of", + "set", + "type", + "using", + "yield" +].concat(["accessor", "satisfies"]); +function createGlobalLinebreakMatcher() { + return new RegExp(import_ast_utils.LINEBREAK_MATCHER.source, "gu"); +} +const anyFunctionPattern = /^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u; +function getUpperFunction(node) { + for (let currentNode = node; currentNode; currentNode = currentNode.parent) if (anyFunctionPattern.test(currentNode.type)) return currentNode; + return null; +} +function isNullLiteral(node) { + return node.type === "Literal" && node.value === null && !("regex" in node) && !("bigint" in node); +} +function getStaticStringValue(node) { + switch (node.type) { + case "Literal": + if (node.value === null) { + if (isNullLiteral(node)) return String(node.value); + if (isRegExpLiteral(node)) return `/${node.regex.pattern}/${node.regex.flags}`; + if ("bigint" in node && node.bigint) return node.bigint; + } else return String(node.value); + break; + case "TemplateLiteral": + if (node.expressions.length === 0 && node.quasis.length === 1) return node.quasis[0].value.cooked; + break; + } + return null; +} +function getStaticPropertyName(node) { + let prop; + if (node) switch (node.type) { + case "ChainExpression": return getStaticPropertyName(node.expression); + case "Property": + case "PropertyDefinition": + case "MethodDefinition": + case "ImportAttribute": + prop = node.key; + break; + case "MemberExpression": + prop = node.property; + break; + } + if (prop) { + if (prop.type === "Identifier" && !("computed" in node && node.computed)) return prop.name; + return getStaticStringValue(prop); + } + return null; +} +function skipChainExpression(node) { + return node && node.type === "ChainExpression" ? node.expression : node; +} +function isParenthesised(sourceCode, node) { + const previousToken = sourceCode.getTokenBefore(node); + const nextToken = sourceCode.getTokenAfter(node); + return !!previousToken && !!nextToken && (0, import_ast_utils.isOpeningParenToken)(previousToken) && previousToken.range[1] <= node.range[0] && (0, import_ast_utils.isClosingParenToken)(nextToken) && nextToken.range[0] >= node.range[1]; +} +function isEqToken(token) { + return token.value === "=" && token.type === "Punctuator"; +} +function isQuestionToken(token) { + return token.value === "?" && token.type === "Punctuator"; +} +function isKeywordToken(token) { + return token?.type === "Keyword"; +} +function isHashbangComment(comment) { + return comment.type === "Shebang" || comment.type === "Hashbang"; +} +function isLogicalExpression(node) { + return node.type === "LogicalExpression" && (node.operator === "&&" || node.operator === "||"); +} +function isCoalesceExpression(node) { + return node.type === "LogicalExpression" && node.operator === "??"; +} +function isMixedLogicalAndCoalesceExpressions(left, right) { + return isLogicalExpression(left) && isCoalesceExpression(right) || isCoalesceExpression(left) && isLogicalExpression(right); +} +function getSwitchCaseColonToken(node, sourceCode) { + if (node.test) return sourceCode.getTokenAfter(node.test, (token) => (0, import_ast_utils.isColonToken)(token)); + return sourceCode.getFirstToken(node, 1); +} +function isTopLevelExpressionStatement(node) { + if (node.type !== "ExpressionStatement") return false; + const parent = node.parent; + return parent.type === "Program" || parent.type === "BlockStatement" && (0, import_ast_utils.isFunction)(parent.parent); +} +function isStringLiteral(node) { + return node.type === "Literal" && typeof node.value === "string" || node.type === "TemplateLiteral"; +} +function isRegExpLiteral(node) { + return node.type === "Literal" && "regex" in node; +} +function isSurroundedBy(val, character) { + return val[0] === character && val[val.length - 1] === character; +} +function getPrecedence(node) { + switch (node.type) { + case "SequenceExpression": return 0; + case "AssignmentExpression": + case "ArrowFunctionExpression": + case "YieldExpression": return 1; + case "ConditionalExpression": + case "TSConditionalType": return 3; + case "LogicalExpression": switch (node.operator) { + case "||": + case "??": return 4; + case "&&": return 5; + } + case "BinaryExpression": switch (node.operator) { + case "|": return 6; + case "^": return 7; + case "&": return 8; + case "==": + case "!=": + case "===": + case "!==": return 9; + case "<": + case "<=": + case ">": + case ">=": + case "in": + case "instanceof": return 10; + case "<<": + case ">>": + case ">>>": return 11; + case "+": + case "-": return 12; + case "*": + case "/": + case "%": return 13; + case "**": return 15; + } + case "TSUnionType": return 6; + case "TSIntersectionType": return 8; + case "UnaryExpression": + case "AwaitExpression": return 16; + case "UpdateExpression": return 17; + case "CallExpression": + case "ChainExpression": + case "ImportExpression": return 18; + case "NewExpression": return 19; + case "TSImportType": + case "TSArrayType": return 20; + default: + if (node.type in KEYS) return 20; + return -1; + } +} +function isDecimalInteger(node) { + return node.type === "Literal" && typeof node.value === "number" && DECIMAL_INTEGER_PATTERN.test(node.raw); +} +function isDecimalIntegerNumericToken(token) { + return token.type === "Numeric" && DECIMAL_INTEGER_PATTERN.test(token.value); +} +function getNextLocation(sourceCode, { column, line }) { + if (column < sourceCode.lines[line - 1].length) return { + column: column + 1, + line + }; + if (line < sourceCode.lines.length) return { + column: 0, + line: line + 1 + }; + return null; +} +function isNumericLiteral(node) { + return node.type === "Literal" && (typeof node.value === "number" || Boolean("bigint" in node && node.bigint)); +} +function canTokensBeAdjacent(leftValue, rightValue) { + const espreeOptions = { + comment: true, + ecmaVersion: latestEcmaVersion, + range: true + }; + let leftToken; + if (typeof leftValue === "string") { + let tokens; + try { + tokens = tokenize(leftValue, espreeOptions); + } catch { + return false; + } + const comments = tokens.comments; + leftToken = tokens[tokens.length - 1]; + if (comments.length) { + const lastComment = comments[comments.length - 1]; + if (!leftToken || lastComment.range[0] > leftToken.range[0]) leftToken = lastComment; + } + } else leftToken = leftValue; + if (isHashbangComment(leftToken)) return false; + let rightToken; + if (typeof rightValue === "string") { + let tokens; + try { + tokens = tokenize(rightValue, espreeOptions); + } catch { + return false; + } + const comments = tokens.comments; + rightToken = tokens[0]; + if (comments.length) { + const firstComment = comments[0]; + if (!rightToken || firstComment.range[0] < rightToken.range[0]) rightToken = firstComment; + } + } else rightToken = rightValue; + if (leftToken.type === "Punctuator" || rightToken.type === "Punctuator") { + if (leftToken.type === "Punctuator" && rightToken.type === "Punctuator") { + const PLUS_TOKENS = new Set(["+", "++"]); + const MINUS_TOKENS = new Set(["-", "--"]); + return !(PLUS_TOKENS.has(leftToken.value) && PLUS_TOKENS.has(rightToken.value) || MINUS_TOKENS.has(leftToken.value) && MINUS_TOKENS.has(rightToken.value)); + } + if (leftToken.type === "Punctuator" && leftToken.value === "/") return ![ + "Block", + "Line", + "RegularExpression" + ].includes(rightToken.type); + return true; + } + if (leftToken.type === "String" || rightToken.type === "String" || leftToken.type === "Template" || rightToken.type === "Template") return true; + if (leftToken.type !== "Numeric" && rightToken.type === "Numeric" && rightToken.value.startsWith(".")) return true; + if (leftToken.type === "Block" || rightToken.type === "Block" || rightToken.type === "Line") return true; + if (rightToken.type === "PrivateIdentifier") return true; + return false; +} +function hasOctalOrNonOctalDecimalEscapeSequence(rawString) { + return OCTAL_OR_NON_OCTAL_DECIMAL_ESCAPE_PATTERN.test(rawString); +} +const WHITE_SPACES_PATTERN = /^\s*$/u; +function isWhiteSpaces(value) { + return typeof value === "string" ? WHITE_SPACES_PATTERN.test(value) : false; +} +function getFirstNodeInLine(context, node) { + const sourceCode = context.sourceCode; + let token = node; + let lines = null; + do { + token = sourceCode.getTokenBefore(token); + lines = token.type === "JSXText" ? token.value.split("\n") : null; + } while (token.type === "JSXText" && lines && isWhiteSpaces(lines.at(-1))); + return token; +} +function isNodeFirstInLine(context, node) { + const token = getFirstNodeInLine(context, node); + if (!token) return false; + return !(0, import_ast_utils.isTokenOnSameLine)(token, node); +} +function getTokenBeforeClosingBracket(node) { + const attributes = "attributes" in node && node.attributes; + if (!attributes || attributes.length === 0) return node.name; + return attributes[attributes.length - 1]; +} +function isSingleLine(node) { + return node.loc.start.line === node.loc.end.line; +} +function hasCommentsBetween(sourceCode, left, right) { + return sourceCode.getFirstTokenBetween(left, right, { + includeComments: true, + filter: import_ast_utils.isCommentToken + }) !== null; +} +function getCommentsBetween(sourceCode, left, right) { + return sourceCode.getTokensBetween(left, right, { + includeComments: true, + filter: import_ast_utils.isCommentToken + }); +} +var ast_exports = {}; +__export(ast_exports, { + ASSIGNMENT_OPERATOR: () => ASSIGNMENT_OPERATOR, + AST_NODE_TYPES: () => AST_NODE_TYPES, + AST_TOKEN_TYPES: () => AST_TOKEN_TYPES, + COMMENTS_IGNORE_PATTERN: () => COMMENTS_IGNORE_PATTERN, + DECIMAL_INTEGER_PATTERN: () => DECIMAL_INTEGER_PATTERN, + ES3_KEYWORDS: () => ES3_KEYWORDS, + KEYWORDS: () => KEYWORDS, + LINEBREAKS: () => LINEBREAKS, + OCTAL_OR_NON_OCTAL_DECIMAL_ESCAPE_PATTERN: () => OCTAL_OR_NON_OCTAL_DECIMAL_ESCAPE_PATTERN, + STATEMENT_LIST_PARENTS: () => STATEMENT_LIST_PARENTS, + WHITE_SPACES_PATTERN: () => WHITE_SPACES_PATTERN, + canTokensBeAdjacent: () => canTokensBeAdjacent, + createGlobalLinebreakMatcher: () => createGlobalLinebreakMatcher, + getCommentsBetween: () => getCommentsBetween, + getFirstNodeInLine: () => getFirstNodeInLine, + getNextLocation: () => getNextLocation, + getPrecedence: () => getPrecedence, + getStaticPropertyName: () => getStaticPropertyName, + getStaticStringValue: () => getStaticStringValue, + getSwitchCaseColonToken: () => getSwitchCaseColonToken, + getTokenBeforeClosingBracket: () => getTokenBeforeClosingBracket, + getUpperFunction: () => getUpperFunction, + hasCommentsBetween: () => hasCommentsBetween, + hasOctalOrNonOctalDecimalEscapeSequence: () => hasOctalOrNonOctalDecimalEscapeSequence, + isCoalesceExpression: () => isCoalesceExpression, + isDecimalInteger: () => isDecimalInteger, + isDecimalIntegerNumericToken: () => isDecimalIntegerNumericToken, + isEqToken: () => isEqToken, + isHashbangComment: () => isHashbangComment, + isKeywordToken: () => isKeywordToken, + isLogicalExpression: () => isLogicalExpression, + isMixedLogicalAndCoalesceExpressions: () => isMixedLogicalAndCoalesceExpressions, + isNodeFirstInLine: () => isNodeFirstInLine, + isNullLiteral: () => isNullLiteral, + isNumericLiteral: () => isNumericLiteral, + isParenthesised: () => isParenthesised, + isQuestionToken: () => isQuestionToken, + isRegExpLiteral: () => isRegExpLiteral, + isSingleLine: () => isSingleLine, + isStringLiteral: () => isStringLiteral, + isSurroundedBy: () => isSurroundedBy, + isTopLevelExpressionStatement: () => isTopLevelExpressionStatement, + isWhiteSpaces: () => isWhiteSpaces, + skipChainExpression: () => skipChainExpression +}); +__reExport(ast_exports, /* @__PURE__ */ __toESM(require_ast_utils(), 1)); +function isObjectNotArray(obj) { + return typeof obj === "object" && obj != null && !Array.isArray(obj); +} +function deepMerge(first = {}, second = {}) { + const keys = new Set(Object.keys(first).concat(Object.keys(second))); + return Array.from(keys).reduce((acc, key) => { + const firstHasKey = key in first; + const secondHasKey = key in second; + const firstValue = first[key]; + const secondValue = second[key]; + if (firstHasKey && secondHasKey) if (isObjectNotArray(firstValue) && isObjectNotArray(secondValue)) acc[key] = deepMerge(firstValue, secondValue); + else acc[key] = secondValue; + else if (firstHasKey) acc[key] = firstValue; + else acc[key] = secondValue; + return acc; + }, {}); +} +function createRule({ name, create, defaultOptions = [], meta }) { + return { + create: ((context) => { + if (meta.deprecated) { + let insted; + if (typeof meta.deprecated !== "boolean") { + const { replacedBy } = meta.deprecated; + if (replacedBy) insted = replacedBy.map(({ rule, plugin }) => `"${rule?.name}"${plugin?.name ? ` in "${plugin.name}"` : ""}`).join(", "); + } + warnDeprecation(`rule("${name}")`, insted); + } + const optionsCount = Math.max(context.options.length, defaultOptions.length); + const optionsWithDefault = Array.from({ length: optionsCount }, (_, i) => { + if (isObjectNotArray(context.options[i]) && isObjectNotArray(defaultOptions[i])) return deepMerge(defaultOptions[i], context.options[i]); + return context.options[i] ?? defaultOptions[i]; + }); + return create(context, optionsWithDefault); + }), + defaultOptions, + meta: { + ...meta, + docs: { + ...meta.docs, + url: `https://eslint.style/rules/${name}` + } + } + }; +} +function traverse$1(ASTnode, visitor) { + const opts = Object.assign({}, { fallback(node) { + return Object.keys(node).filter((key) => key === "children" || key === "argument"); + } }, visitor); + opts.keys = Object.assign({}, visitor.keys, { + JSXElement: ["children"], + JSXFragment: ["children"] + }); + traverse(ASTnode, opts); +} +function traverseReturns(ASTNode, onReturn) { + const nodeType = ASTNode.type; + if (nodeType === "ReturnStatement") { + onReturn(ASTNode.argument, () => {}); + return; + } + if (nodeType === "ArrowFunctionExpression" && ASTNode.expression) { + onReturn(ASTNode.body, () => {}); + return; + } + if (nodeType !== "FunctionExpression" && nodeType !== "FunctionDeclaration" && nodeType !== "ArrowFunctionExpression" && nodeType !== "MethodDefinition") return; + traverse$1(ASTNode.body, { enter(node) { + const breakTraverse = () => { + this.break(); + }; + switch (node.type) { + case "ReturnStatement": + this.skip(); + onReturn(node.argument, breakTraverse); + return; + case "BlockStatement": + case "IfStatement": + case "ForStatement": + case "WhileStatement": + case "SwitchStatement": + case "SwitchCase": return; + default: this.skip(); + } + } }); +} +function getVariable(variables, name) { + return variables.find((variable) => variable.name === name); +} +function variablesInScope(context) { + let scope = context.getScope(); + let variables = scope.variables; + while (scope.type !== "global") { + scope = scope.upper; + variables = scope.variables.concat(variables); + } + if (scope.childScopes.length) { + variables = scope.childScopes[0].variables.concat(variables); + if (scope.childScopes[0].childScopes.length) variables = scope.childScopes[0].childScopes[0].variables.concat(variables); + } + variables.reverse(); + return variables; +} +function findVariableByName(context, name) { + const variable = getVariable(variablesInScope(context), name); + if (!variable || !variable.defs[0] || !variable.defs[0].node) return null; + if (variable.defs[0].node.type === "TypeAlias") return variable.defs[0].node.right; + if (variable.defs[0].type === "ImportBinding") return variable.defs[0].node; + return variable.defs[0].node.init; +} +const COMPAT_TAG_REGEX = /^[a-z]/; +function isDOMComponent(node) { + const name = getElementType(node); + return COMPAT_TAG_REGEX.test(name); +} +function isJSX(node) { + return node && ["JSXElement", "JSXFragment"].includes(node.type); +} +function isReturningJSX(ASTnode, context, strict = false, ignoreNull = false) { + const isJSXValue = (node) => { + if (!node) return false; + switch (node.type) { + case "ConditionalExpression": + if (strict) return isJSXValue(node.consequent) && isJSXValue(node.alternate); + return isJSXValue(node.consequent) || isJSXValue(node.alternate); + case "LogicalExpression": + if (strict) return isJSXValue(node.left) && isJSXValue(node.right); + return isJSXValue(node.left) || isJSXValue(node.right); + case "SequenceExpression": return isJSXValue(node.expressions[node.expressions.length - 1]); + case "JSXElement": + case "JSXFragment": return true; + case "Literal": + if (!ignoreNull && node.value === null) return true; + return false; + case "Identifier": { + const variable = findVariableByName(context, node.name); + return isJSX(variable); + } + default: return false; + } + }; + let found = false; + traverseReturns(ASTnode, (node, breakTraverse) => { + if (isJSXValue(node)) { + found = true; + breakTraverse(); + } + }); + return found; +} +function getPropName(prop) { + if (!prop.type || prop.type !== "JSXAttribute") throw new Error("The prop must be a JSXAttribute collected by the AST parser."); + if (prop.name.type === "JSXNamespacedName") return `${prop.name.namespace.name}:${prop.name.name.name}`; + return prop.name.name; +} +function resolveMemberExpressions(object, property) { + if (object.type === "JSXMemberExpression") return `${resolveMemberExpressions(object.object, object.property)}.${property.name}`; + return `${object.name}.${property.name}`; +} +function getElementType(node) { + if (node.type === "JSXOpeningFragment") return "<>"; + const { name } = node; + if (!name) throw new Error("The argument provided is not a JSXElement node."); + if (name.type === "JSXMemberExpression") { + const { object, property } = name; + return resolveMemberExpressions(object, property); + } + if (name.type === "JSXNamespacedName") return `${name.namespace.name}:${name.name.name}`; + return node.name.name; +} +let segmenter; +function isASCII(value) { + return /^[\u0020-\u007F]*$/u.test(value); +} +function getStringLength(value) { + if (isASCII(value)) return value.length; + segmenter ??= new Intl.Segmenter(); + return [...segmenter.segment(value)].length; +} +var FixTracker = class { + retainedRange; + constructor(fixer, sourceCode) { + this.fixer = fixer; + this.sourceCode = sourceCode; + this.retainedRange = null; + } + retainRange(range) { + this.retainedRange = range; + return this; + } + retainEnclosingFunction(node) { + const functionNode = getUpperFunction(node); + return this.retainRange(functionNode ? functionNode.range : this.sourceCode.ast.range); + } + retainSurroundingTokens(nodeOrToken) { + const tokenBefore = this.sourceCode.getTokenBefore(nodeOrToken) || nodeOrToken; + const tokenAfter = this.sourceCode.getTokenAfter(nodeOrToken) || nodeOrToken; + return this.retainRange([tokenBefore.range[0], tokenAfter.range[1]]); + } + replaceTextRange(range, text) { + let actualRange; + if (this.retainedRange) actualRange = [Math.min(this.retainedRange[0], range[0]), Math.max(this.retainedRange[1], range[1])]; + else actualRange = range; + return this.fixer.replaceTextRange(actualRange, this.sourceCode.text.slice(actualRange[0], range[0]) + text + this.sourceCode.text.slice(range[1], actualRange[1])); + } + remove(nodeOrToken) { + return this.replaceTextRange(nodeOrToken.range, ""); + } +}; +export { ASSIGNMENT_OPERATOR, AST_NODE_TYPES, AST_TOKEN_TYPES, COMMENTS_IGNORE_PATTERN, ES3_KEYWORDS, FixTracker, KEYWORDS, LINEBREAKS, STATEMENT_LIST_PARENTS, WHITE_SPACES_PATTERN, ast_exports, canTokensBeAdjacent, createAllConfigs, createGlobalLinebreakMatcher, createRule, deepMerge, getCommentsBetween, getElementType, getFirstNodeInLine, getNextLocation, getPrecedence, getPropName, getStaticPropertyName, getStringLength, getSwitchCaseColonToken, getTokenBeforeClosingBracket, hasCommentsBetween, hasOctalOrNonOctalDecimalEscapeSequence, isDOMComponent, isDecimalInteger, isDecimalIntegerNumericToken, isEqToken, isHashbangComment, isJSX, isKeywordToken, isMixedLogicalAndCoalesceExpressions, isNodeFirstInLine, isNumericLiteral, isParenthesised, isQuestionToken, isRegExpLiteral, isReturningJSX, isSingleLine, isStringLiteral, isSurroundedBy, isTopLevelExpressionStatement, isWhiteSpaces, skipChainExpression, warnDeprecatedOptions, warnDeprecation }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/dist/vendor.js b/slider/node_modules/@stylistic/eslint-plugin/dist/vendor.js new file mode 100644 index 0000000..12512a9 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/dist/vendor.js @@ -0,0 +1,437 @@ +import { __commonJSMin, __require } from "./rolldown-runtime.js"; +var require_astUtilities = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding$6 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault$4 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar$4 = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o$1) { + var ar = []; + for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$6(result, mod, k[i]); + } + __setModuleDefault$4(result, mod); + return result; + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isParenthesized = exports.hasSideEffect = exports.getStringIfConstant = exports.getStaticValue = exports.getPropertyName = exports.getFunctionNameWithKind = exports.getFunctionHeadLocation = void 0; + const eslintUtils$4 = __importStar$4(__require("@eslint-community/eslint-utils")); + exports.getFunctionHeadLocation = eslintUtils$4.getFunctionHeadLocation; + exports.getFunctionNameWithKind = eslintUtils$4.getFunctionNameWithKind; + exports.getPropertyName = eslintUtils$4.getPropertyName; + exports.getStaticValue = eslintUtils$4.getStaticValue; + exports.getStringIfConstant = eslintUtils$4.getStringIfConstant; + exports.hasSideEffect = eslintUtils$4.hasSideEffect; + exports.isParenthesized = eslintUtils$4.isParenthesized; +})); +var require_PatternMatcher = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding$5 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault$3 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar$3 = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o$1) { + var ar = []; + for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$5(result, mod, k[i]); + } + __setModuleDefault$3(result, mod); + return result; + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PatternMatcher = void 0; + const eslintUtils$3 = __importStar$3(__require("@eslint-community/eslint-utils")); + exports.PatternMatcher = eslintUtils$3.PatternMatcher; +})); +var require_predicates$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding$4 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault$2 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar$2 = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o$1) { + var ar = []; + for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$4(result, mod, k[i]); + } + __setModuleDefault$2(result, mod); + return result; + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isNotSemicolonToken = exports.isSemicolonToken = exports.isNotOpeningParenToken = exports.isOpeningParenToken = exports.isNotOpeningBracketToken = exports.isOpeningBracketToken = exports.isNotOpeningBraceToken = exports.isOpeningBraceToken = exports.isNotCommentToken = exports.isCommentToken = exports.isNotCommaToken = exports.isCommaToken = exports.isNotColonToken = exports.isColonToken = exports.isNotClosingParenToken = exports.isClosingParenToken = exports.isNotClosingBracketToken = exports.isClosingBracketToken = exports.isNotClosingBraceToken = exports.isClosingBraceToken = exports.isNotArrowToken = exports.isArrowToken = void 0; + const eslintUtils$2 = __importStar$2(__require("@eslint-community/eslint-utils")); + exports.isArrowToken = eslintUtils$2.isArrowToken; + exports.isNotArrowToken = eslintUtils$2.isNotArrowToken; + exports.isClosingBraceToken = eslintUtils$2.isClosingBraceToken; + exports.isNotClosingBraceToken = eslintUtils$2.isNotClosingBraceToken; + exports.isClosingBracketToken = eslintUtils$2.isClosingBracketToken; + exports.isNotClosingBracketToken = eslintUtils$2.isNotClosingBracketToken; + exports.isClosingParenToken = eslintUtils$2.isClosingParenToken; + exports.isNotClosingParenToken = eslintUtils$2.isNotClosingParenToken; + exports.isColonToken = eslintUtils$2.isColonToken; + exports.isNotColonToken = eslintUtils$2.isNotColonToken; + exports.isCommaToken = eslintUtils$2.isCommaToken; + exports.isNotCommaToken = eslintUtils$2.isNotCommaToken; + exports.isCommentToken = eslintUtils$2.isCommentToken; + exports.isNotCommentToken = eslintUtils$2.isNotCommentToken; + exports.isOpeningBraceToken = eslintUtils$2.isOpeningBraceToken; + exports.isNotOpeningBraceToken = eslintUtils$2.isNotOpeningBraceToken; + exports.isOpeningBracketToken = eslintUtils$2.isOpeningBracketToken; + exports.isNotOpeningBracketToken = eslintUtils$2.isNotOpeningBracketToken; + exports.isOpeningParenToken = eslintUtils$2.isOpeningParenToken; + exports.isNotOpeningParenToken = eslintUtils$2.isNotOpeningParenToken; + exports.isSemicolonToken = eslintUtils$2.isSemicolonToken; + exports.isNotSemicolonToken = eslintUtils$2.isNotSemicolonToken; +})); +var require_ReferenceTracker = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding$3 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault$1 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar$1 = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o$1) { + var ar = []; + for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$3(result, mod, k[i]); + } + __setModuleDefault$1(result, mod); + return result; + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ReferenceTracker = void 0; + const eslintUtils$1 = __importStar$1(__require("@eslint-community/eslint-utils")); + eslintUtils$1.ReferenceTracker.READ; + eslintUtils$1.ReferenceTracker.CALL; + eslintUtils$1.ReferenceTracker.CONSTRUCT; + eslintUtils$1.ReferenceTracker.ESM; + exports.ReferenceTracker = eslintUtils$1.ReferenceTracker; +})); +var require_scopeAnalysis = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding$2 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o$1) { + var ar = []; + for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$2(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getInnermostScope = exports.findVariable = void 0; + const eslintUtils = __importStar(__require("@eslint-community/eslint-utils")); + exports.findVariable = eslintUtils.findVariable; + exports.getInnermostScope = eslintUtils.getInnermostScope; +})); +var require_eslint_utils = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding$1 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar$1 = exports && exports.__exportStar || function(m, exports$1) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding$1(exports$1, m, p); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + __exportStar$1(require_astUtilities(), exports); + __exportStar$1(require_PatternMatcher(), exports); + __exportStar$1(require_predicates$1(), exports); + __exportStar$1(require_ReferenceTracker(), exports); + __exportStar$1(require_scopeAnalysis(), exports); +})); +var require_helpers = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isNotTokenOfTypeWithConditions = exports.isTokenOfTypeWithConditions = exports.isNodeOfTypeWithConditions = exports.isNodeOfTypes = exports.isNodeOfType = void 0; + const isNodeOfType = (nodeType) => (node) => node?.type === nodeType; + exports.isNodeOfType = isNodeOfType; + const isNodeOfTypes = (nodeTypes) => (node) => !!node && nodeTypes.includes(node.type); + exports.isNodeOfTypes = isNodeOfTypes; + const isNodeOfTypeWithConditions = (nodeType, conditions) => { + const entries = Object.entries(conditions); + return (node) => node?.type === nodeType && entries.every(([key, value]) => node[key] === value); + }; + exports.isNodeOfTypeWithConditions = isNodeOfTypeWithConditions; + const isTokenOfTypeWithConditions = (tokenType, conditions) => { + const entries = Object.entries(conditions); + return (token) => token?.type === tokenType && entries.every(([key, value]) => token[key] === value); + }; + exports.isTokenOfTypeWithConditions = isTokenOfTypeWithConditions; + const isNotTokenOfTypeWithConditions = (tokenType, conditions) => (token) => !(0, exports.isTokenOfTypeWithConditions)(tokenType, conditions)(token); + exports.isNotTokenOfTypeWithConditions = isNotTokenOfTypeWithConditions; +})); +var require_misc = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.LINEBREAK_MATCHER = void 0; + exports.isTokenOnSameLine = isTokenOnSameLine; + exports.LINEBREAK_MATCHER = /\r\n|[\r\n\u2028\u2029]/; + function isTokenOnSameLine(left, right) { + return left.loc.end.line === right.loc.start.line; + } +})); +var require_ts_estree = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.TSESTree = exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0; + var types_1 = __require("@typescript-eslint/types"); + Object.defineProperty(exports, "AST_NODE_TYPES", { + enumerable: true, + get: function() { + return types_1.AST_NODE_TYPES; + } + }); + Object.defineProperty(exports, "AST_TOKEN_TYPES", { + enumerable: true, + get: function() { + return types_1.AST_TOKEN_TYPES; + } + }); + Object.defineProperty(exports, "TSESTree", { + enumerable: true, + get: function() { + return types_1.TSESTree; + } + }); +})); +var require_predicates = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isLoop = exports.isImportKeyword = exports.isTypeKeyword = exports.isAwaitKeyword = exports.isAwaitExpression = exports.isIdentifier = exports.isConstructor = exports.isClassOrTypeElement = exports.isTSConstructorType = exports.isTSFunctionType = exports.isFunctionOrFunctionType = exports.isFunctionType = exports.isFunction = exports.isVariableDeclarator = exports.isTypeAssertion = exports.isLogicalOrOperator = exports.isOptionalCallExpression = exports.isNotNonNullAssertionPunctuator = exports.isNonNullAssertionPunctuator = exports.isNotOptionalChainPunctuator = exports.isOptionalChainPunctuator = void 0; + exports.isSetter = isSetter; + const ts_estree_1 = require_ts_estree(); + const helpers_1 = require_helpers(); + exports.isOptionalChainPunctuator = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "?." }); + exports.isNotOptionalChainPunctuator = (0, helpers_1.isNotTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "?." }); + exports.isNonNullAssertionPunctuator = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "!" }); + exports.isNotNonNullAssertionPunctuator = (0, helpers_1.isNotTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "!" }); + exports.isOptionalCallExpression = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.CallExpression, { optional: true }); + exports.isLogicalOrOperator = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.LogicalExpression, { operator: "||" }); + exports.isTypeAssertion = (0, helpers_1.isNodeOfTypes)([ts_estree_1.AST_NODE_TYPES.TSAsExpression, ts_estree_1.AST_NODE_TYPES.TSTypeAssertion]); + exports.isVariableDeclarator = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.VariableDeclarator); + const functionTypes = [ + ts_estree_1.AST_NODE_TYPES.ArrowFunctionExpression, + ts_estree_1.AST_NODE_TYPES.FunctionDeclaration, + ts_estree_1.AST_NODE_TYPES.FunctionExpression + ]; + exports.isFunction = (0, helpers_1.isNodeOfTypes)(functionTypes); + const functionTypeTypes = [ + ts_estree_1.AST_NODE_TYPES.TSCallSignatureDeclaration, + ts_estree_1.AST_NODE_TYPES.TSConstructorType, + ts_estree_1.AST_NODE_TYPES.TSConstructSignatureDeclaration, + ts_estree_1.AST_NODE_TYPES.TSDeclareFunction, + ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression, + ts_estree_1.AST_NODE_TYPES.TSFunctionType, + ts_estree_1.AST_NODE_TYPES.TSMethodSignature + ]; + exports.isFunctionType = (0, helpers_1.isNodeOfTypes)(functionTypeTypes); + exports.isFunctionOrFunctionType = (0, helpers_1.isNodeOfTypes)([...functionTypes, ...functionTypeTypes]); + exports.isTSFunctionType = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.TSFunctionType); + exports.isTSConstructorType = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.TSConstructorType); + exports.isClassOrTypeElement = (0, helpers_1.isNodeOfTypes)([ + ts_estree_1.AST_NODE_TYPES.PropertyDefinition, + ts_estree_1.AST_NODE_TYPES.FunctionExpression, + ts_estree_1.AST_NODE_TYPES.MethodDefinition, + ts_estree_1.AST_NODE_TYPES.TSAbstractPropertyDefinition, + ts_estree_1.AST_NODE_TYPES.TSAbstractMethodDefinition, + ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression, + ts_estree_1.AST_NODE_TYPES.TSIndexSignature, + ts_estree_1.AST_NODE_TYPES.TSCallSignatureDeclaration, + ts_estree_1.AST_NODE_TYPES.TSConstructSignatureDeclaration, + ts_estree_1.AST_NODE_TYPES.TSMethodSignature, + ts_estree_1.AST_NODE_TYPES.TSPropertySignature + ]); + exports.isConstructor = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.MethodDefinition, { kind: "constructor" }); + function isSetter(node) { + return !!node && (node.type === ts_estree_1.AST_NODE_TYPES.MethodDefinition || node.type === ts_estree_1.AST_NODE_TYPES.Property) && node.kind === "set"; + } + exports.isIdentifier = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.Identifier); + exports.isAwaitExpression = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.AwaitExpression); + exports.isAwaitKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Identifier, { value: "await" }); + exports.isTypeKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Identifier, { value: "type" }); + exports.isImportKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Keyword, { value: "import" }); + exports.isLoop = (0, helpers_1.isNodeOfTypes)([ + ts_estree_1.AST_NODE_TYPES.DoWhileStatement, + ts_estree_1.AST_NODE_TYPES.ForStatement, + ts_estree_1.AST_NODE_TYPES.ForInStatement, + ts_estree_1.AST_NODE_TYPES.ForOfStatement, + ts_estree_1.AST_NODE_TYPES.WhileStatement + ]); +})); +var require_ast_utils = /* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar = exports && exports.__exportStar || function(m, exports$1) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + __exportStar(require_eslint_utils(), exports); + __exportStar(require_helpers(), exports); + __exportStar(require_misc(), exports); + __exportStar(require_predicates(), exports); +})); +function escapeStringRegexp(string) { + if (typeof string !== "string") throw new TypeError("Expected a string"); + return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); +} +export { escapeStringRegexp, require_ast_utils }; diff --git a/slider/node_modules/@stylistic/eslint-plugin/package.json b/slider/node_modules/@stylistic/eslint-plugin/package.json new file mode 100644 index 0000000..0fc82b7 --- /dev/null +++ b/slider/node_modules/@stylistic/eslint-plugin/package.json @@ -0,0 +1,147 @@ +{ + "name": "@stylistic/eslint-plugin", + "type": "module", + "version": "5.4.0", + "author": "Anthony Fu ", + "license": "MIT", + "homepage": "https://github.com/eslint-stylistic/eslint-stylistic#readme", + "repository": { + "directory": "packages/eslint-plugin", + "type": "git", + "url": "git+https://github.com/eslint-stylistic/eslint-stylistic.git" + }, + "bugs": { + "url": "https://github.com/eslint-stylistic/eslint-stylistic/issues" + }, + "exports": { + ".": { + "types": "./dist/dts/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.js" + }, + "./define-config-support": { + "types": "./dist/dts/define-config-support.d.ts" + }, + "./rule-options": { + "types": "./dist/dts/rule-options.d.ts" + }, + "./rules/array-bracket-newline": "./dist/rules/array-bracket-newline.js", + "./rules/array-bracket-spacing": "./dist/rules/array-bracket-spacing.js", + "./rules/array-element-newline": "./dist/rules/array-element-newline.js", + "./rules/arrow-parens": "./dist/rules/arrow-parens.js", + "./rules/arrow-spacing": "./dist/rules/arrow-spacing.js", + "./rules/block-spacing": "./dist/rules/block-spacing.js", + "./rules/brace-style": "./dist/rules/brace-style.js", + "./rules/comma-dangle": "./dist/rules/comma-dangle.js", + "./rules/comma-spacing": "./dist/rules/comma-spacing.js", + "./rules/comma-style": "./dist/rules/comma-style.js", + "./rules/computed-property-spacing": "./dist/rules/computed-property-spacing.js", + "./rules/curly-newline": "./dist/rules/curly-newline.js", + "./rules/dot-location": "./dist/rules/dot-location.js", + "./rules/eol-last": "./dist/rules/eol-last.js", + "./rules/function-call-argument-newline": "./dist/rules/function-call-argument-newline.js", + "./rules/function-call-spacing": "./dist/rules/function-call-spacing.js", + "./rules/function-paren-newline": "./dist/rules/function-paren-newline.js", + "./rules/generator-star-spacing": "./dist/rules/generator-star-spacing.js", + "./rules/implicit-arrow-linebreak": "./dist/rules/implicit-arrow-linebreak.js", + "./rules/indent": "./dist/rules/indent.js", + "./rules/indent-binary-ops": "./dist/rules/indent-binary-ops.js", + "./rules/jsx-child-element-spacing": "./dist/rules/jsx-child-element-spacing.js", + "./rules/jsx-closing-bracket-location": "./dist/rules/jsx-closing-bracket-location.js", + "./rules/jsx-closing-tag-location": "./dist/rules/jsx-closing-tag-location.js", + "./rules/jsx-curly-brace-presence": "./dist/rules/jsx-curly-brace-presence.js", + "./rules/jsx-curly-newline": "./dist/rules/jsx-curly-newline.js", + "./rules/jsx-curly-spacing": "./dist/rules/jsx-curly-spacing.js", + "./rules/jsx-equals-spacing": "./dist/rules/jsx-equals-spacing.js", + "./rules/jsx-first-prop-new-line": "./dist/rules/jsx-first-prop-new-line.js", + "./rules/jsx-function-call-newline": "./dist/rules/jsx-function-call-newline.js", + "./rules/jsx-indent": "./dist/rules/jsx-indent.js", + "./rules/jsx-indent-props": "./dist/rules/jsx-indent-props.js", + "./rules/jsx-max-props-per-line": "./dist/rules/jsx-max-props-per-line.js", + "./rules/jsx-newline": "./dist/rules/jsx-newline.js", + "./rules/jsx-one-expression-per-line": "./dist/rules/jsx-one-expression-per-line.js", + "./rules/jsx-pascal-case": "./dist/rules/jsx-pascal-case.js", + "./rules/jsx-props-no-multi-spaces": "./dist/rules/jsx-props-no-multi-spaces.js", + "./rules/jsx-quotes": "./dist/rules/jsx-quotes.js", + "./rules/jsx-self-closing-comp": "./dist/rules/jsx-self-closing-comp.js", + "./rules/jsx-sort-props": "./dist/rules/jsx-sort-props.js", + "./rules/jsx-tag-spacing": "./dist/rules/jsx-tag-spacing.js", + "./rules/jsx-wrap-multilines": "./dist/rules/jsx-wrap-multilines.js", + "./rules/key-spacing": "./dist/rules/key-spacing.js", + "./rules/keyword-spacing": "./dist/rules/keyword-spacing.js", + "./rules/line-comment-position": "./dist/rules/line-comment-position.js", + "./rules/linebreak-style": "./dist/rules/linebreak-style.js", + "./rules/lines-around-comment": "./dist/rules/lines-around-comment.js", + "./rules/lines-between-class-members": "./dist/rules/lines-between-class-members.js", + "./rules/max-len": "./dist/rules/max-len.js", + "./rules/max-statements-per-line": "./dist/rules/max-statements-per-line.js", + "./rules/member-delimiter-style": "./dist/rules/member-delimiter-style.js", + "./rules/multiline-comment-style": "./dist/rules/multiline-comment-style.js", + "./rules/multiline-ternary": "./dist/rules/multiline-ternary.js", + "./rules/new-parens": "./dist/rules/new-parens.js", + "./rules/newline-per-chained-call": "./dist/rules/newline-per-chained-call.js", + "./rules/no-confusing-arrow": "./dist/rules/no-confusing-arrow.js", + "./rules/no-extra-parens": "./dist/rules/no-extra-parens.js", + "./rules/no-extra-semi": "./dist/rules/no-extra-semi.js", + "./rules/no-floating-decimal": "./dist/rules/no-floating-decimal.js", + "./rules/no-mixed-operators": "./dist/rules/no-mixed-operators.js", + "./rules/no-mixed-spaces-and-tabs": "./dist/rules/no-mixed-spaces-and-tabs.js", + "./rules/no-multi-spaces": "./dist/rules/no-multi-spaces.js", + "./rules/no-multiple-empty-lines": "./dist/rules/no-multiple-empty-lines.js", + "./rules/no-tabs": "./dist/rules/no-tabs.js", + "./rules/no-trailing-spaces": "./dist/rules/no-trailing-spaces.js", + "./rules/no-whitespace-before-property": "./dist/rules/no-whitespace-before-property.js", + "./rules/nonblock-statement-body-position": "./dist/rules/nonblock-statement-body-position.js", + "./rules/object-curly-newline": "./dist/rules/object-curly-newline.js", + "./rules/object-curly-spacing": "./dist/rules/object-curly-spacing.js", + "./rules/object-property-newline": "./dist/rules/object-property-newline.js", + "./rules/one-var-declaration-per-line": "./dist/rules/one-var-declaration-per-line.js", + "./rules/operator-linebreak": "./dist/rules/operator-linebreak.js", + "./rules/padded-blocks": "./dist/rules/padded-blocks.js", + "./rules/padding-line-between-statements": "./dist/rules/padding-line-between-statements.js", + "./rules/quote-props": "./dist/rules/quote-props.js", + "./rules/quotes": "./dist/rules/quotes.js", + "./rules/rest-spread-spacing": "./dist/rules/rest-spread-spacing.js", + "./rules/semi": "./dist/rules/semi.js", + "./rules/semi-spacing": "./dist/rules/semi-spacing.js", + "./rules/semi-style": "./dist/rules/semi-style.js", + "./rules/space-before-blocks": "./dist/rules/space-before-blocks.js", + "./rules/space-before-function-paren": "./dist/rules/space-before-function-paren.js", + "./rules/space-in-parens": "./dist/rules/space-in-parens.js", + "./rules/space-infix-ops": "./dist/rules/space-infix-ops.js", + "./rules/space-unary-ops": "./dist/rules/space-unary-ops.js", + "./rules/spaced-comment": "./dist/rules/spaced-comment.js", + "./rules/switch-colon-spacing": "./dist/rules/switch-colon-spacing.js", + "./rules/template-curly-spacing": "./dist/rules/template-curly-spacing.js", + "./rules/template-tag-spacing": "./dist/rules/template-tag-spacing.js", + "./rules/type-annotation-spacing": "./dist/rules/type-annotation-spacing.js", + "./rules/type-generic-spacing": "./dist/rules/type-generic-spacing.js", + "./rules/type-named-tuple-spacing": "./dist/rules/type-named-tuple-spacing.js", + "./rules/wrap-iife": "./dist/rules/wrap-iife.js", + "./rules/wrap-regex": "./dist/rules/wrap-regex.js", + "./rules/yield-star-spacing": "./dist/rules/yield-star-spacing.js" + }, + "main": "./dist/index.js", + "types": "./dist/dts/index.d.ts", + "files": [ + "dist" + ], + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=9.0.0" + }, + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.0", + "@typescript-eslint/types": "^8.44.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "estraverse": "^5.3.0", + "picomatch": "^4.0.3" + }, + "scripts": { + "build": "tsdown", + "dev": "tsdown --watch" + } +} \ No newline at end of file diff --git a/slider/node_modules/@types/estree/LICENSE b/slider/node_modules/@types/estree/LICENSE new file mode 100644 index 0000000..d0cb763 --- /dev/null +++ b/slider/node_modules/@types/estree/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/slider/node_modules/@types/estree/README.md b/slider/node_modules/@types/estree/README.md new file mode 100644 index 0000000..5ac6bfd --- /dev/null +++ b/slider/node_modules/@types/estree/README.md @@ -0,0 +1,15 @@ +# Installation +> `npm install --save @types/estree` + +# Summary +This package contains type definitions for estree (https://github.com/estree/estree). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree. + +### Additional Details + * Last updated: Fri, 06 Jun 2025 00:04:33 GMT + * Dependencies: none + +# Credits +These definitions were written by [RReverser](https://github.com/RReverser). diff --git a/slider/node_modules/@types/estree/flow.d.ts b/slider/node_modules/@types/estree/flow.d.ts new file mode 100644 index 0000000..c72e462 --- /dev/null +++ b/slider/node_modules/@types/estree/flow.d.ts @@ -0,0 +1,167 @@ +declare namespace ESTree { + interface FlowTypeAnnotation extends Node {} + + interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {} + + interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {} + + interface FlowDeclaration extends Declaration {} + + interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {} + + interface ArrayTypeAnnotation extends FlowTypeAnnotation { + elementType: FlowTypeAnnotation; + } + + interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} + + interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {} + + interface ClassImplements extends Node { + id: Identifier; + typeParameters?: TypeParameterInstantiation | null; + } + + interface ClassProperty { + key: Expression; + value?: Expression | null; + typeAnnotation?: TypeAnnotation | null; + computed: boolean; + static: boolean; + } + + interface DeclareClass extends FlowDeclaration { + id: Identifier; + typeParameters?: TypeParameterDeclaration | null; + body: ObjectTypeAnnotation; + extends: InterfaceExtends[]; + } + + interface DeclareFunction extends FlowDeclaration { + id: Identifier; + } + + interface DeclareModule extends FlowDeclaration { + id: Literal | Identifier; + body: BlockStatement; + } + + interface DeclareVariable extends FlowDeclaration { + id: Identifier; + } + + interface FunctionTypeAnnotation extends FlowTypeAnnotation { + params: FunctionTypeParam[]; + returnType: FlowTypeAnnotation; + rest?: FunctionTypeParam | null; + typeParameters?: TypeParameterDeclaration | null; + } + + interface FunctionTypeParam { + name: Identifier; + typeAnnotation: FlowTypeAnnotation; + optional: boolean; + } + + interface GenericTypeAnnotation extends FlowTypeAnnotation { + id: Identifier | QualifiedTypeIdentifier; + typeParameters?: TypeParameterInstantiation | null; + } + + interface InterfaceExtends extends Node { + id: Identifier | QualifiedTypeIdentifier; + typeParameters?: TypeParameterInstantiation | null; + } + + interface InterfaceDeclaration extends FlowDeclaration { + id: Identifier; + typeParameters?: TypeParameterDeclaration | null; + extends: InterfaceExtends[]; + body: ObjectTypeAnnotation; + } + + interface IntersectionTypeAnnotation extends FlowTypeAnnotation { + types: FlowTypeAnnotation[]; + } + + interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {} + + interface NullableTypeAnnotation extends FlowTypeAnnotation { + typeAnnotation: TypeAnnotation; + } + + interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} + + interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {} + + interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} + + interface StringTypeAnnotation extends FlowBaseTypeAnnotation {} + + interface TupleTypeAnnotation extends FlowTypeAnnotation { + types: FlowTypeAnnotation[]; + } + + interface TypeofTypeAnnotation extends FlowTypeAnnotation { + argument: FlowTypeAnnotation; + } + + interface TypeAlias extends FlowDeclaration { + id: Identifier; + typeParameters?: TypeParameterDeclaration | null; + right: FlowTypeAnnotation; + } + + interface TypeAnnotation extends Node { + typeAnnotation: FlowTypeAnnotation; + } + + interface TypeCastExpression extends Expression { + expression: Expression; + typeAnnotation: TypeAnnotation; + } + + interface TypeParameterDeclaration extends Node { + params: Identifier[]; + } + + interface TypeParameterInstantiation extends Node { + params: FlowTypeAnnotation[]; + } + + interface ObjectTypeAnnotation extends FlowTypeAnnotation { + properties: ObjectTypeProperty[]; + indexers: ObjectTypeIndexer[]; + callProperties: ObjectTypeCallProperty[]; + } + + interface ObjectTypeCallProperty extends Node { + value: FunctionTypeAnnotation; + static: boolean; + } + + interface ObjectTypeIndexer extends Node { + id: Identifier; + key: FlowTypeAnnotation; + value: FlowTypeAnnotation; + static: boolean; + } + + interface ObjectTypeProperty extends Node { + key: Expression; + value: FlowTypeAnnotation; + optional: boolean; + static: boolean; + } + + interface QualifiedTypeIdentifier extends Node { + qualification: Identifier | QualifiedTypeIdentifier; + id: Identifier; + } + + interface UnionTypeAnnotation extends FlowTypeAnnotation { + types: FlowTypeAnnotation[]; + } + + interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {} +} diff --git a/slider/node_modules/@types/estree/index.d.ts b/slider/node_modules/@types/estree/index.d.ts new file mode 100644 index 0000000..ef00a6d --- /dev/null +++ b/slider/node_modules/@types/estree/index.d.ts @@ -0,0 +1,694 @@ +// This definition file follows a somewhat unusual format. ESTree allows +// runtime type checks based on the `type` parameter. In order to explain this +// to typescript we want to use discriminated union types: +// https://github.com/Microsoft/TypeScript/pull/9163 +// +// For ESTree this is a bit tricky because the high level interfaces like +// Node or Function are pulling double duty. We want to pass common fields down +// to the interfaces that extend them (like Identifier or +// ArrowFunctionExpression), but you can't extend a type union or enforce +// common fields on them. So we've split the high level interfaces into two +// types, a base type which passes down inherited fields, and a type union of +// all types which extend the base type. Only the type union is exported, and +// the union is how other types refer to the collection of inheriting types. +// +// This makes the definitions file here somewhat more difficult to maintain, +// but it has the notable advantage of making ESTree much easier to use as +// an end user. + +export interface BaseNodeWithoutComments { + // Every leaf interface that extends BaseNode must specify a type property. + // The type property should be a string literal. For example, Identifier + // has: `type: "Identifier"` + type: string; + loc?: SourceLocation | null | undefined; + range?: [number, number] | undefined; +} + +export interface BaseNode extends BaseNodeWithoutComments { + leadingComments?: Comment[] | undefined; + trailingComments?: Comment[] | undefined; +} + +export interface NodeMap { + AssignmentProperty: AssignmentProperty; + CatchClause: CatchClause; + Class: Class; + ClassBody: ClassBody; + Expression: Expression; + Function: Function; + Identifier: Identifier; + Literal: Literal; + MethodDefinition: MethodDefinition; + ModuleDeclaration: ModuleDeclaration; + ModuleSpecifier: ModuleSpecifier; + Pattern: Pattern; + PrivateIdentifier: PrivateIdentifier; + Program: Program; + Property: Property; + PropertyDefinition: PropertyDefinition; + SpreadElement: SpreadElement; + Statement: Statement; + Super: Super; + SwitchCase: SwitchCase; + TemplateElement: TemplateElement; + VariableDeclarator: VariableDeclarator; +} + +export type Node = NodeMap[keyof NodeMap]; + +export interface Comment extends BaseNodeWithoutComments { + type: "Line" | "Block"; + value: string; +} + +export interface SourceLocation { + source?: string | null | undefined; + start: Position; + end: Position; +} + +export interface Position { + /** >= 1 */ + line: number; + /** >= 0 */ + column: number; +} + +export interface Program extends BaseNode { + type: "Program"; + sourceType: "script" | "module"; + body: Array; + comments?: Comment[] | undefined; +} + +export interface Directive extends BaseNode { + type: "ExpressionStatement"; + expression: Literal; + directive: string; +} + +export interface BaseFunction extends BaseNode { + params: Pattern[]; + generator?: boolean | undefined; + async?: boolean | undefined; + // The body is either BlockStatement or Expression because arrow functions + // can have a body that's either. FunctionDeclarations and + // FunctionExpressions have only BlockStatement bodies. + body: BlockStatement | Expression; +} + +export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression; + +export type Statement = + | ExpressionStatement + | BlockStatement + | StaticBlock + | EmptyStatement + | DebuggerStatement + | WithStatement + | ReturnStatement + | LabeledStatement + | BreakStatement + | ContinueStatement + | IfStatement + | SwitchStatement + | ThrowStatement + | TryStatement + | WhileStatement + | DoWhileStatement + | ForStatement + | ForInStatement + | ForOfStatement + | Declaration; + +export interface BaseStatement extends BaseNode {} + +export interface EmptyStatement extends BaseStatement { + type: "EmptyStatement"; +} + +export interface BlockStatement extends BaseStatement { + type: "BlockStatement"; + body: Statement[]; + innerComments?: Comment[] | undefined; +} + +export interface StaticBlock extends Omit { + type: "StaticBlock"; +} + +export interface ExpressionStatement extends BaseStatement { + type: "ExpressionStatement"; + expression: Expression; +} + +export interface IfStatement extends BaseStatement { + type: "IfStatement"; + test: Expression; + consequent: Statement; + alternate?: Statement | null | undefined; +} + +export interface LabeledStatement extends BaseStatement { + type: "LabeledStatement"; + label: Identifier; + body: Statement; +} + +export interface BreakStatement extends BaseStatement { + type: "BreakStatement"; + label?: Identifier | null | undefined; +} + +export interface ContinueStatement extends BaseStatement { + type: "ContinueStatement"; + label?: Identifier | null | undefined; +} + +export interface WithStatement extends BaseStatement { + type: "WithStatement"; + object: Expression; + body: Statement; +} + +export interface SwitchStatement extends BaseStatement { + type: "SwitchStatement"; + discriminant: Expression; + cases: SwitchCase[]; +} + +export interface ReturnStatement extends BaseStatement { + type: "ReturnStatement"; + argument?: Expression | null | undefined; +} + +export interface ThrowStatement extends BaseStatement { + type: "ThrowStatement"; + argument: Expression; +} + +export interface TryStatement extends BaseStatement { + type: "TryStatement"; + block: BlockStatement; + handler?: CatchClause | null | undefined; + finalizer?: BlockStatement | null | undefined; +} + +export interface WhileStatement extends BaseStatement { + type: "WhileStatement"; + test: Expression; + body: Statement; +} + +export interface DoWhileStatement extends BaseStatement { + type: "DoWhileStatement"; + body: Statement; + test: Expression; +} + +export interface ForStatement extends BaseStatement { + type: "ForStatement"; + init?: VariableDeclaration | Expression | null | undefined; + test?: Expression | null | undefined; + update?: Expression | null | undefined; + body: Statement; +} + +export interface BaseForXStatement extends BaseStatement { + left: VariableDeclaration | Pattern; + right: Expression; + body: Statement; +} + +export interface ForInStatement extends BaseForXStatement { + type: "ForInStatement"; +} + +export interface DebuggerStatement extends BaseStatement { + type: "DebuggerStatement"; +} + +export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration; + +export interface BaseDeclaration extends BaseStatement {} + +export interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration { + type: "FunctionDeclaration"; + /** It is null when a function declaration is a part of the `export default function` statement */ + id: Identifier | null; + body: BlockStatement; +} + +export interface FunctionDeclaration extends MaybeNamedFunctionDeclaration { + id: Identifier; +} + +export interface VariableDeclaration extends BaseDeclaration { + type: "VariableDeclaration"; + declarations: VariableDeclarator[]; + kind: "var" | "let" | "const" | "using" | "await using"; +} + +export interface VariableDeclarator extends BaseNode { + type: "VariableDeclarator"; + id: Pattern; + init?: Expression | null | undefined; +} + +export interface ExpressionMap { + ArrayExpression: ArrayExpression; + ArrowFunctionExpression: ArrowFunctionExpression; + AssignmentExpression: AssignmentExpression; + AwaitExpression: AwaitExpression; + BinaryExpression: BinaryExpression; + CallExpression: CallExpression; + ChainExpression: ChainExpression; + ClassExpression: ClassExpression; + ConditionalExpression: ConditionalExpression; + FunctionExpression: FunctionExpression; + Identifier: Identifier; + ImportExpression: ImportExpression; + Literal: Literal; + LogicalExpression: LogicalExpression; + MemberExpression: MemberExpression; + MetaProperty: MetaProperty; + NewExpression: NewExpression; + ObjectExpression: ObjectExpression; + SequenceExpression: SequenceExpression; + TaggedTemplateExpression: TaggedTemplateExpression; + TemplateLiteral: TemplateLiteral; + ThisExpression: ThisExpression; + UnaryExpression: UnaryExpression; + UpdateExpression: UpdateExpression; + YieldExpression: YieldExpression; +} + +export type Expression = ExpressionMap[keyof ExpressionMap]; + +export interface BaseExpression extends BaseNode {} + +export type ChainElement = SimpleCallExpression | MemberExpression; + +export interface ChainExpression extends BaseExpression { + type: "ChainExpression"; + expression: ChainElement; +} + +export interface ThisExpression extends BaseExpression { + type: "ThisExpression"; +} + +export interface ArrayExpression extends BaseExpression { + type: "ArrayExpression"; + elements: Array; +} + +export interface ObjectExpression extends BaseExpression { + type: "ObjectExpression"; + properties: Array; +} + +export interface PrivateIdentifier extends BaseNode { + type: "PrivateIdentifier"; + name: string; +} + +export interface Property extends BaseNode { + type: "Property"; + key: Expression | PrivateIdentifier; + value: Expression | Pattern; // Could be an AssignmentProperty + kind: "init" | "get" | "set"; + method: boolean; + shorthand: boolean; + computed: boolean; +} + +export interface PropertyDefinition extends BaseNode { + type: "PropertyDefinition"; + key: Expression | PrivateIdentifier; + value?: Expression | null | undefined; + computed: boolean; + static: boolean; +} + +export interface FunctionExpression extends BaseFunction, BaseExpression { + id?: Identifier | null | undefined; + type: "FunctionExpression"; + body: BlockStatement; +} + +export interface SequenceExpression extends BaseExpression { + type: "SequenceExpression"; + expressions: Expression[]; +} + +export interface UnaryExpression extends BaseExpression { + type: "UnaryExpression"; + operator: UnaryOperator; + prefix: true; + argument: Expression; +} + +export interface BinaryExpression extends BaseExpression { + type: "BinaryExpression"; + operator: BinaryOperator; + left: Expression | PrivateIdentifier; + right: Expression; +} + +export interface AssignmentExpression extends BaseExpression { + type: "AssignmentExpression"; + operator: AssignmentOperator; + left: Pattern | MemberExpression; + right: Expression; +} + +export interface UpdateExpression extends BaseExpression { + type: "UpdateExpression"; + operator: UpdateOperator; + argument: Expression; + prefix: boolean; +} + +export interface LogicalExpression extends BaseExpression { + type: "LogicalExpression"; + operator: LogicalOperator; + left: Expression; + right: Expression; +} + +export interface ConditionalExpression extends BaseExpression { + type: "ConditionalExpression"; + test: Expression; + alternate: Expression; + consequent: Expression; +} + +export interface BaseCallExpression extends BaseExpression { + callee: Expression | Super; + arguments: Array; +} +export type CallExpression = SimpleCallExpression | NewExpression; + +export interface SimpleCallExpression extends BaseCallExpression { + type: "CallExpression"; + optional: boolean; +} + +export interface NewExpression extends BaseCallExpression { + type: "NewExpression"; +} + +export interface MemberExpression extends BaseExpression, BasePattern { + type: "MemberExpression"; + object: Expression | Super; + property: Expression | PrivateIdentifier; + computed: boolean; + optional: boolean; +} + +export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression; + +export interface BasePattern extends BaseNode {} + +export interface SwitchCase extends BaseNode { + type: "SwitchCase"; + test?: Expression | null | undefined; + consequent: Statement[]; +} + +export interface CatchClause extends BaseNode { + type: "CatchClause"; + param: Pattern | null; + body: BlockStatement; +} + +export interface Identifier extends BaseNode, BaseExpression, BasePattern { + type: "Identifier"; + name: string; +} + +export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral; + +export interface SimpleLiteral extends BaseNode, BaseExpression { + type: "Literal"; + value: string | boolean | number | null; + raw?: string | undefined; +} + +export interface RegExpLiteral extends BaseNode, BaseExpression { + type: "Literal"; + value?: RegExp | null | undefined; + regex: { + pattern: string; + flags: string; + }; + raw?: string | undefined; +} + +export interface BigIntLiteral extends BaseNode, BaseExpression { + type: "Literal"; + value?: bigint | null | undefined; + bigint: string; + raw?: string | undefined; +} + +export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; + +export type BinaryOperator = + | "==" + | "!=" + | "===" + | "!==" + | "<" + | "<=" + | ">" + | ">=" + | "<<" + | ">>" + | ">>>" + | "+" + | "-" + | "*" + | "/" + | "%" + | "**" + | "|" + | "^" + | "&" + | "in" + | "instanceof"; + +export type LogicalOperator = "||" | "&&" | "??"; + +export type AssignmentOperator = + | "=" + | "+=" + | "-=" + | "*=" + | "/=" + | "%=" + | "**=" + | "<<=" + | ">>=" + | ">>>=" + | "|=" + | "^=" + | "&=" + | "||=" + | "&&=" + | "??="; + +export type UpdateOperator = "++" | "--"; + +export interface ForOfStatement extends BaseForXStatement { + type: "ForOfStatement"; + await: boolean; +} + +export interface Super extends BaseNode { + type: "Super"; +} + +export interface SpreadElement extends BaseNode { + type: "SpreadElement"; + argument: Expression; +} + +export interface ArrowFunctionExpression extends BaseExpression, BaseFunction { + type: "ArrowFunctionExpression"; + expression: boolean; + body: BlockStatement | Expression; +} + +export interface YieldExpression extends BaseExpression { + type: "YieldExpression"; + argument?: Expression | null | undefined; + delegate: boolean; +} + +export interface TemplateLiteral extends BaseExpression { + type: "TemplateLiteral"; + quasis: TemplateElement[]; + expressions: Expression[]; +} + +export interface TaggedTemplateExpression extends BaseExpression { + type: "TaggedTemplateExpression"; + tag: Expression; + quasi: TemplateLiteral; +} + +export interface TemplateElement extends BaseNode { + type: "TemplateElement"; + tail: boolean; + value: { + /** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */ + cooked?: string | null | undefined; + raw: string; + }; +} + +export interface AssignmentProperty extends Property { + value: Pattern; + kind: "init"; + method: boolean; // false +} + +export interface ObjectPattern extends BasePattern { + type: "ObjectPattern"; + properties: Array; +} + +export interface ArrayPattern extends BasePattern { + type: "ArrayPattern"; + elements: Array; +} + +export interface RestElement extends BasePattern { + type: "RestElement"; + argument: Pattern; +} + +export interface AssignmentPattern extends BasePattern { + type: "AssignmentPattern"; + left: Pattern; + right: Expression; +} + +export type Class = ClassDeclaration | ClassExpression; +export interface BaseClass extends BaseNode { + superClass?: Expression | null | undefined; + body: ClassBody; +} + +export interface ClassBody extends BaseNode { + type: "ClassBody"; + body: Array; +} + +export interface MethodDefinition extends BaseNode { + type: "MethodDefinition"; + key: Expression | PrivateIdentifier; + value: FunctionExpression; + kind: "constructor" | "method" | "get" | "set"; + computed: boolean; + static: boolean; +} + +export interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration { + type: "ClassDeclaration"; + /** It is null when a class declaration is a part of the `export default class` statement */ + id: Identifier | null; +} + +export interface ClassDeclaration extends MaybeNamedClassDeclaration { + id: Identifier; +} + +export interface ClassExpression extends BaseClass, BaseExpression { + type: "ClassExpression"; + id?: Identifier | null | undefined; +} + +export interface MetaProperty extends BaseExpression { + type: "MetaProperty"; + meta: Identifier; + property: Identifier; +} + +export type ModuleDeclaration = + | ImportDeclaration + | ExportNamedDeclaration + | ExportDefaultDeclaration + | ExportAllDeclaration; +export interface BaseModuleDeclaration extends BaseNode {} + +export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier; +export interface BaseModuleSpecifier extends BaseNode { + local: Identifier; +} + +export interface ImportDeclaration extends BaseModuleDeclaration { + type: "ImportDeclaration"; + specifiers: Array; + attributes: ImportAttribute[]; + source: Literal; +} + +export interface ImportSpecifier extends BaseModuleSpecifier { + type: "ImportSpecifier"; + imported: Identifier | Literal; +} + +export interface ImportAttribute extends BaseNode { + type: "ImportAttribute"; + key: Identifier | Literal; + value: Literal; +} + +export interface ImportExpression extends BaseExpression { + type: "ImportExpression"; + source: Expression; + options?: Expression | null | undefined; +} + +export interface ImportDefaultSpecifier extends BaseModuleSpecifier { + type: "ImportDefaultSpecifier"; +} + +export interface ImportNamespaceSpecifier extends BaseModuleSpecifier { + type: "ImportNamespaceSpecifier"; +} + +export interface ExportNamedDeclaration extends BaseModuleDeclaration { + type: "ExportNamedDeclaration"; + declaration?: Declaration | null | undefined; + specifiers: ExportSpecifier[]; + attributes: ImportAttribute[]; + source?: Literal | null | undefined; +} + +export interface ExportSpecifier extends Omit { + type: "ExportSpecifier"; + local: Identifier | Literal; + exported: Identifier | Literal; +} + +export interface ExportDefaultDeclaration extends BaseModuleDeclaration { + type: "ExportDefaultDeclaration"; + declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression; +} + +export interface ExportAllDeclaration extends BaseModuleDeclaration { + type: "ExportAllDeclaration"; + exported: Identifier | Literal | null; + attributes: ImportAttribute[]; + source: Literal; +} + +export interface AwaitExpression extends BaseExpression { + type: "AwaitExpression"; + argument: Expression; +} diff --git a/slider/node_modules/@types/estree/package.json b/slider/node_modules/@types/estree/package.json new file mode 100644 index 0000000..c033f39 --- /dev/null +++ b/slider/node_modules/@types/estree/package.json @@ -0,0 +1,27 @@ +{ + "name": "@types/estree", + "version": "1.0.8", + "description": "TypeScript definitions for estree", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree", + "license": "MIT", + "contributors": [ + { + "name": "RReverser", + "githubUsername": "RReverser", + "url": "https://github.com/RReverser" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/estree" + }, + "scripts": {}, + "dependencies": {}, + "peerDependencies": {}, + "typesPublisherContentHash": "7a167b6e4a4d9f6e9a2cb9fd3fc45c885f89cbdeb44b3e5961bb057a45c082fd", + "typeScriptVersion": "5.1", + "nonNpm": true +} \ No newline at end of file diff --git a/slider/node_modules/@types/json-schema/LICENSE b/slider/node_modules/@types/json-schema/LICENSE new file mode 100644 index 0000000..d0cb763 --- /dev/null +++ b/slider/node_modules/@types/json-schema/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/slider/node_modules/@types/json-schema/README.md b/slider/node_modules/@types/json-schema/README.md new file mode 100644 index 0000000..7d84d7b --- /dev/null +++ b/slider/node_modules/@types/json-schema/README.md @@ -0,0 +1,15 @@ +# Installation +> `npm install --save @types/json-schema` + +# Summary +This package contains type definitions for json-schema (https://github.com/kriszyp/json-schema). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 03:09:37 GMT + * Dependencies: none + +# Credits +These definitions were written by [Boris Cherny](https://github.com/bcherny), [Lucian Buzzo](https://github.com/lucianbuzzo), [Roland Groza](https://github.com/rolandjitsu), and [Jason Kwok](https://github.com/JasonHK). diff --git a/slider/node_modules/@types/json-schema/index.d.ts b/slider/node_modules/@types/json-schema/index.d.ts new file mode 100644 index 0000000..d0e968b --- /dev/null +++ b/slider/node_modules/@types/json-schema/index.d.ts @@ -0,0 +1,749 @@ +// ================================================================================================== +// JSON Schema Draft 04 +// ================================================================================================== + +/** + * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1 + */ +export type JSONSchema4TypeName = + | "string" // + | "number" + | "integer" + | "boolean" + | "object" + | "array" + | "null" + | "any"; + +/** + * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5 + */ +export type JSONSchema4Type = + | string // + | number + | boolean + | JSONSchema4Object + | JSONSchema4Array + | null; + +// Workaround for infinite type recursion +export interface JSONSchema4Object { + [key: string]: JSONSchema4Type; +} + +// Workaround for infinite type recursion +// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540 +export interface JSONSchema4Array extends Array {} + +/** + * Meta schema + * + * Recommended values: + * - 'http://json-schema.org/schema#' + * - 'http://json-schema.org/hyper-schema#' + * - 'http://json-schema.org/draft-04/schema#' + * - 'http://json-schema.org/draft-04/hyper-schema#' + * - 'http://json-schema.org/draft-03/schema#' + * - 'http://json-schema.org/draft-03/hyper-schema#' + * + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5 + */ +export type JSONSchema4Version = string; + +/** + * JSON Schema V4 + * @see https://tools.ietf.org/html/draft-zyp-json-schema-04 + */ +export interface JSONSchema4 { + id?: string | undefined; + $ref?: string | undefined; + $schema?: JSONSchema4Version | undefined; + + /** + * This attribute is a string that provides a short description of the + * instance property. + * + * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21 + */ + title?: string | undefined; + + /** + * This attribute is a string that provides a full description of the of + * purpose the instance property. + * + * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22 + */ + description?: string | undefined; + + default?: JSONSchema4Type | undefined; + multipleOf?: number | undefined; + maximum?: number | undefined; + exclusiveMaximum?: boolean | undefined; + minimum?: number | undefined; + exclusiveMinimum?: boolean | undefined; + maxLength?: number | undefined; + minLength?: number | undefined; + pattern?: string | undefined; + + /** + * May only be defined when "items" is defined, and is a tuple of JSONSchemas. + * + * This provides a definition for additional items in an array instance + * when tuple definitions of the items is provided. This can be false + * to indicate additional items in the array are not allowed, or it can + * be a schema that defines the schema of the additional items. + * + * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6 + */ + additionalItems?: boolean | JSONSchema4 | undefined; + + /** + * This attribute defines the allowed items in an instance array, and + * MUST be a schema or an array of schemas. The default value is an + * empty schema which allows any value for items in the instance array. + * + * When this attribute value is a schema and the instance value is an + * array, then all the items in the array MUST be valid according to the + * schema. + * + * When this attribute value is an array of schemas and the instance + * value is an array, each position in the instance array MUST conform + * to the schema in the corresponding position for this array. This + * called tuple typing. When tuple typing is used, additional items are + * allowed, disallowed, or constrained by the "additionalItems" + * (Section 5.6) attribute using the same rules as + * "additionalProperties" (Section 5.4) for objects. + * + * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5 + */ + items?: JSONSchema4 | JSONSchema4[] | undefined; + + maxItems?: number | undefined; + minItems?: number | undefined; + uniqueItems?: boolean | undefined; + maxProperties?: number | undefined; + minProperties?: number | undefined; + + /** + * This attribute indicates if the instance must have a value, and not + * be undefined. This is false by default, making the instance + * optional. + * + * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7 + */ + required?: boolean | string[] | undefined; + + /** + * This attribute defines a schema for all properties that are not + * explicitly defined in an object type definition. If specified, the + * value MUST be a schema or a boolean. If false is provided, no + * additional properties are allowed beyond the properties defined in + * the schema. The default value is an empty schema which allows any + * value for additional properties. + * + * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4 + */ + additionalProperties?: boolean | JSONSchema4 | undefined; + + definitions?: { + [k: string]: JSONSchema4; + } | undefined; + + /** + * This attribute is an object with property definitions that define the + * valid values of instance object property values. When the instance + * value is an object, the property values of the instance object MUST + * conform to the property definitions in this object. In this object, + * each property definition's value MUST be a schema, and the property's + * name MUST be the name of the instance property that it defines. The + * instance property value MUST be valid according to the schema from + * the property definition. Properties are considered unordered, the + * order of the instance properties MAY be in any order. + * + * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2 + */ + properties?: { + [k: string]: JSONSchema4; + } | undefined; + + /** + * This attribute is an object that defines the schema for a set of + * property names of an object instance. The name of each property of + * this attribute's object is a regular expression pattern in the ECMA + * 262/Perl 5 format, while the value is a schema. If the pattern + * matches the name of a property on the instance object, the value of + * the instance's property MUST be valid against the pattern name's + * schema value. + * + * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3 + */ + patternProperties?: { + [k: string]: JSONSchema4; + } | undefined; + dependencies?: { + [k: string]: JSONSchema4 | string[]; + } | undefined; + + /** + * This provides an enumeration of all possible values that are valid + * for the instance property. This MUST be an array, and each item in + * the array represents a possible value for the instance value. If + * this attribute is defined, the instance value MUST be one of the + * values in the array in order for the schema to be valid. + * + * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19 + */ + enum?: JSONSchema4Type[] | undefined; + + /** + * A single type, or a union of simple types + */ + type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined; + + allOf?: JSONSchema4[] | undefined; + anyOf?: JSONSchema4[] | undefined; + oneOf?: JSONSchema4[] | undefined; + not?: JSONSchema4 | undefined; + + /** + * The value of this property MUST be another schema which will provide + * a base schema which the current schema will inherit from. The + * inheritance rules are such that any instance that is valid according + * to the current schema MUST be valid according to the referenced + * schema. This MAY also be an array, in which case, the instance MUST + * be valid for all the schemas in the array. A schema that extends + * another schema MAY define additional attributes, constrain existing + * attributes, or add other constraints. + * + * Conceptually, the behavior of extends can be seen as validating an + * instance against all constraints in the extending schema as well as + * the extended schema(s). + * + * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26 + */ + extends?: string | string[] | undefined; + + /** + * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6 + */ + [k: string]: any; + + format?: string | undefined; +} + +// ================================================================================================== +// JSON Schema Draft 06 +// ================================================================================================== + +export type JSONSchema6TypeName = + | "string" // + | "number" + | "integer" + | "boolean" + | "object" + | "array" + | "null" + | "any"; + +export type JSONSchema6Type = + | string // + | number + | boolean + | JSONSchema6Object + | JSONSchema6Array + | null; + +// Workaround for infinite type recursion +export interface JSONSchema6Object { + [key: string]: JSONSchema6Type; +} + +// Workaround for infinite type recursion +// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540 +export interface JSONSchema6Array extends Array {} + +/** + * Meta schema + * + * Recommended values: + * - 'http://json-schema.org/schema#' + * - 'http://json-schema.org/hyper-schema#' + * - 'http://json-schema.org/draft-06/schema#' + * - 'http://json-schema.org/draft-06/hyper-schema#' + * + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5 + */ +export type JSONSchema6Version = string; + +/** + * JSON Schema V6 + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01 + */ +export type JSONSchema6Definition = JSONSchema6 | boolean; +export interface JSONSchema6 { + $id?: string | undefined; + $ref?: string | undefined; + $schema?: JSONSchema6Version | undefined; + + /** + * Must be strictly greater than 0. + * A numeric instance is valid only if division by this keyword's value results in an integer. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1 + */ + multipleOf?: number | undefined; + + /** + * Representing an inclusive upper limit for a numeric instance. + * This keyword validates only if the instance is less than or exactly equal to "maximum". + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2 + */ + maximum?: number | undefined; + + /** + * Representing an exclusive upper limit for a numeric instance. + * This keyword validates only if the instance is strictly less than (not equal to) to "exclusiveMaximum". + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3 + */ + exclusiveMaximum?: number | undefined; + + /** + * Representing an inclusive lower limit for a numeric instance. + * This keyword validates only if the instance is greater than or exactly equal to "minimum". + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4 + */ + minimum?: number | undefined; + + /** + * Representing an exclusive lower limit for a numeric instance. + * This keyword validates only if the instance is strictly greater than (not equal to) to "exclusiveMinimum". + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5 + */ + exclusiveMinimum?: number | undefined; + + /** + * Must be a non-negative integer. + * A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6 + */ + maxLength?: number | undefined; + + /** + * Must be a non-negative integer. + * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword. + * Omitting this keyword has the same behavior as a value of 0. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7 + */ + minLength?: number | undefined; + + /** + * Should be a valid regular expression, according to the ECMA 262 regular expression dialect. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8 + */ + pattern?: string | undefined; + + /** + * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself. + * Omitting this keyword has the same behavior as an empty schema. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9 + */ + items?: JSONSchema6Definition | JSONSchema6Definition[] | undefined; + + /** + * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself. + * If "items" is an array of schemas, validation succeeds if every instance element + * at a position greater than the size of "items" validates against "additionalItems". + * Otherwise, "additionalItems" MUST be ignored, as the "items" schema + * (possibly the default value of an empty schema) is applied to all elements. + * Omitting this keyword has the same behavior as an empty schema. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10 + */ + additionalItems?: JSONSchema6Definition | undefined; + + /** + * Must be a non-negative integer. + * An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11 + */ + maxItems?: number | undefined; + + /** + * Must be a non-negative integer. + * An array instance is valid against "maxItems" if its size is greater than, or equal to, the value of this keyword. + * Omitting this keyword has the same behavior as a value of 0. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12 + */ + minItems?: number | undefined; + + /** + * If this keyword has boolean value false, the instance validates successfully. + * If it has boolean value true, the instance validates successfully if all of its elements are unique. + * Omitting this keyword has the same behavior as a value of false. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13 + */ + uniqueItems?: boolean | undefined; + + /** + * An array instance is valid against "contains" if at least one of its elements is valid against the given schema. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14 + */ + contains?: JSONSchema6Definition | undefined; + + /** + * Must be a non-negative integer. + * An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this keyword. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15 + */ + maxProperties?: number | undefined; + + /** + * Must be a non-negative integer. + * An object instance is valid against "maxProperties" if its number of properties is greater than, + * or equal to, the value of this keyword. + * Omitting this keyword has the same behavior as a value of 0. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16 + */ + minProperties?: number | undefined; + + /** + * Elements of this array must be unique. + * An object instance is valid against this keyword if every item in the array is the name of a property in the instance. + * Omitting this keyword has the same behavior as an empty array. + * + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17 + */ + required?: string[] | undefined; + + /** + * This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself. + * Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value, + * the child instance for that name successfully validates against the corresponding schema. + * Omitting this keyword has the same behavior as an empty object. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18 + */ + properties?: { + [k: string]: JSONSchema6Definition; + } | undefined; + + /** + * This attribute is an object that defines the schema for a set of property names of an object instance. + * The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema. + * If the pattern matches the name of a property on the instance object, the value of the instance's property + * MUST be valid against the pattern name's schema value. + * Omitting this keyword has the same behavior as an empty object. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19 + */ + patternProperties?: { + [k: string]: JSONSchema6Definition; + } | undefined; + + /** + * This attribute defines a schema for all properties that are not explicitly defined in an object type definition. + * If specified, the value MUST be a schema or a boolean. + * If false is provided, no additional properties are allowed beyond the properties defined in the schema. + * The default value is an empty schema which allows any value for additional properties. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20 + */ + additionalProperties?: JSONSchema6Definition | undefined; + + /** + * This keyword specifies rules that are evaluated if the instance is an object and contains a certain property. + * Each property specifies a dependency. + * If the dependency value is an array, each element in the array must be unique. + * Omitting this keyword has the same behavior as an empty object. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21 + */ + dependencies?: { + [k: string]: JSONSchema6Definition | string[]; + } | undefined; + + /** + * Takes a schema which validates the names of all properties rather than their values. + * Note the property name that the schema is testing will always be a string. + * Omitting this keyword has the same behavior as an empty schema. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22 + */ + propertyNames?: JSONSchema6Definition | undefined; + + /** + * This provides an enumeration of all possible values that are valid + * for the instance property. This MUST be an array, and each item in + * the array represents a possible value for the instance value. If + * this attribute is defined, the instance value MUST be one of the + * values in the array in order for the schema to be valid. + * + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.23 + */ + enum?: JSONSchema6Type[] | undefined; + + /** + * More readable form of a one-element "enum" + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24 + */ + const?: JSONSchema6Type | undefined; + + /** + * A single type, or a union of simple types + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25 + */ + type?: JSONSchema6TypeName | JSONSchema6TypeName[] | undefined; + + /** + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26 + */ + allOf?: JSONSchema6Definition[] | undefined; + + /** + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27 + */ + anyOf?: JSONSchema6Definition[] | undefined; + + /** + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28 + */ + oneOf?: JSONSchema6Definition[] | undefined; + + /** + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29 + */ + not?: JSONSchema6Definition | undefined; + + /** + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1 + */ + definitions?: { + [k: string]: JSONSchema6Definition; + } | undefined; + + /** + * This attribute is a string that provides a short description of the instance property. + * + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2 + */ + title?: string | undefined; + + /** + * This attribute is a string that provides a full description of the of purpose the instance property. + * + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2 + */ + description?: string | undefined; + + /** + * This keyword can be used to supply a default JSON value associated with a particular schema. + * It is RECOMMENDED that a default value be valid against the associated schema. + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3 + */ + default?: JSONSchema6Type | undefined; + + /** + * Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4 + */ + examples?: JSONSchema6Type[] | undefined; + + /** + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8 + */ + format?: string | undefined; +} + +// ================================================================================================== +// JSON Schema Draft 07 +// ================================================================================================== +// https://tools.ietf.org/html/draft-handrews-json-schema-validation-01 +// -------------------------------------------------------------------------------------------------- + +/** + * Primitive type + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1 + */ +export type JSONSchema7TypeName = + | "string" // + | "number" + | "integer" + | "boolean" + | "object" + | "array" + | "null"; + +/** + * Primitive type + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1 + */ +export type JSONSchema7Type = + | string // + | number + | boolean + | JSONSchema7Object + | JSONSchema7Array + | null; + +// Workaround for infinite type recursion +export interface JSONSchema7Object { + [key: string]: JSONSchema7Type; +} + +// Workaround for infinite type recursion +// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540 +export interface JSONSchema7Array extends Array {} + +/** + * Meta schema + * + * Recommended values: + * - 'http://json-schema.org/schema#' + * - 'http://json-schema.org/hyper-schema#' + * - 'http://json-schema.org/draft-07/schema#' + * - 'http://json-schema.org/draft-07/hyper-schema#' + * + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5 + */ +export type JSONSchema7Version = string; + +/** + * JSON Schema v7 + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01 + */ +export type JSONSchema7Definition = JSONSchema7 | boolean; +export interface JSONSchema7 { + $id?: string | undefined; + $ref?: string | undefined; + $schema?: JSONSchema7Version | undefined; + $comment?: string | undefined; + + /** + * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4 + * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A + */ + $defs?: { + [key: string]: JSONSchema7Definition; + } | undefined; + + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1 + */ + type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined; + enum?: JSONSchema7Type[] | undefined; + const?: JSONSchema7Type | undefined; + + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2 + */ + multipleOf?: number | undefined; + maximum?: number | undefined; + exclusiveMaximum?: number | undefined; + minimum?: number | undefined; + exclusiveMinimum?: number | undefined; + + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3 + */ + maxLength?: number | undefined; + minLength?: number | undefined; + pattern?: string | undefined; + + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4 + */ + items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined; + additionalItems?: JSONSchema7Definition | undefined; + maxItems?: number | undefined; + minItems?: number | undefined; + uniqueItems?: boolean | undefined; + contains?: JSONSchema7Definition | undefined; + + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5 + */ + maxProperties?: number | undefined; + minProperties?: number | undefined; + required?: string[] | undefined; + properties?: { + [key: string]: JSONSchema7Definition; + } | undefined; + patternProperties?: { + [key: string]: JSONSchema7Definition; + } | undefined; + additionalProperties?: JSONSchema7Definition | undefined; + dependencies?: { + [key: string]: JSONSchema7Definition | string[]; + } | undefined; + propertyNames?: JSONSchema7Definition | undefined; + + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6 + */ + if?: JSONSchema7Definition | undefined; + then?: JSONSchema7Definition | undefined; + else?: JSONSchema7Definition | undefined; + + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7 + */ + allOf?: JSONSchema7Definition[] | undefined; + anyOf?: JSONSchema7Definition[] | undefined; + oneOf?: JSONSchema7Definition[] | undefined; + not?: JSONSchema7Definition | undefined; + + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7 + */ + format?: string | undefined; + + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8 + */ + contentMediaType?: string | undefined; + contentEncoding?: string | undefined; + + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9 + */ + definitions?: { + [key: string]: JSONSchema7Definition; + } | undefined; + + /** + * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10 + */ + title?: string | undefined; + description?: string | undefined; + default?: JSONSchema7Type | undefined; + readOnly?: boolean | undefined; + writeOnly?: boolean | undefined; + examples?: JSONSchema7Type | undefined; +} + +export interface ValidationResult { + valid: boolean; + errors: ValidationError[]; +} + +export interface ValidationError { + property: string; + message: string; +} + +/** + * To use the validator call JSONSchema.validate with an instance object and an optional schema object. + * If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating), + * that schema will be used to validate and the schema parameter is not necessary (if both exist, + * both validations will occur). + */ +export function validate(instance: {}, schema: JSONSchema4 | JSONSchema6 | JSONSchema7): ValidationResult; + +/** + * The checkPropertyChange method will check to see if an value can legally be in property with the given schema + * This is slightly different than the validate method in that it will fail if the schema is readonly and it will + * not check for self-validation, it is assumed that the passed in value is already internally valid. + */ +export function checkPropertyChange( + value: any, + schema: JSONSchema4 | JSONSchema6 | JSONSchema7, + property: string, +): ValidationResult; + +/** + * This checks to ensure that the result is valid and will throw an appropriate error message if it is not. + */ +export function mustBeValid(result: ValidationResult): void; diff --git a/slider/node_modules/@types/json-schema/package.json b/slider/node_modules/@types/json-schema/package.json new file mode 100644 index 0000000..3e0b6d9 --- /dev/null +++ b/slider/node_modules/@types/json-schema/package.json @@ -0,0 +1,40 @@ +{ + "name": "@types/json-schema", + "version": "7.0.15", + "description": "TypeScript definitions for json-schema", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema", + "license": "MIT", + "contributors": [ + { + "name": "Boris Cherny", + "githubUsername": "bcherny", + "url": "https://github.com/bcherny" + }, + { + "name": "Lucian Buzzo", + "githubUsername": "lucianbuzzo", + "url": "https://github.com/lucianbuzzo" + }, + { + "name": "Roland Groza", + "githubUsername": "rolandjitsu", + "url": "https://github.com/rolandjitsu" + }, + { + "name": "Jason Kwok", + "githubUsername": "JasonHK", + "url": "https://github.com/JasonHK" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/json-schema" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "79984fd70cd25c3f7d72b84368778c763c89728ea0073832d745d4691b705257", + "typeScriptVersion": "4.5" +} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/LICENSE b/slider/node_modules/@typescript-eslint/eslint-plugin/LICENSE new file mode 100644 index 0000000..5de6cb6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 typescript-eslint and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/README.md b/slider/node_modules/@typescript-eslint/eslint-plugin/README.md new file mode 100644 index 0000000..a171a1a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/README.md @@ -0,0 +1,12 @@ +# `@typescript-eslint/eslint-plugin` + +An ESLint plugin which provides lint rules for TypeScript codebases. + +[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/eslint-plugin.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin) +[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/eslint-plugin.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin) + +👉 See **https://typescript-eslint.io/getting-started** for our Getting Started docs. + +> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code. + + diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended-raw.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended-raw.d.ts new file mode 100644 index 0000000..189cb49 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended-raw.d.ts @@ -0,0 +1,11 @@ +/** + * This is a compatibility ruleset that: + * - disables rules from eslint:recommended which are already handled by TypeScript. + * - enables rules that make sense due to TS's typechecking / transpilation. + */ +declare const config: (style: "glob" | "minimatch") => { + files: string[]; + rules: Record; +}; +export = config; +//# sourceMappingURL=eslint-recommended-raw.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended-raw.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended-raw.d.ts.map new file mode 100644 index 0000000..3c41966 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended-raw.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"eslint-recommended-raw.d.ts","sourceRoot":"","sources":["../../src/configs/eslint-recommended-raw.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,QAAA,MAAM,MAAM,GACV,OAAO,MAAM,GAAG,WAAW,KAC1B;IACD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC,CAAC;CAkChD,CAAC;AAEH,SAAS,MAAM,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended-raw.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended-raw.js new file mode 100644 index 0000000..ff3c961 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended-raw.js @@ -0,0 +1,41 @@ +"use strict"; +// NOTE: this file is isolated to be shared across legacy and flat configs. +/** + * This is a compatibility ruleset that: + * - disables rules from eslint:recommended which are already handled by TypeScript. + * - enables rules that make sense due to TS's typechecking / transpilation. + */ +const config = (style) => ({ + files: style === 'glob' + ? // classic configs use glob syntax + ['*.ts', '*.tsx', '*.mts', '*.cts'] + : // flat configs use minimatch syntax + ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'], + rules: { + 'constructor-super': 'off', // ts(2335) & ts(2377) + 'getter-return': 'off', // ts(2378) + 'no-class-assign': 'off', // ts(2629) + 'no-const-assign': 'off', // ts(2588) + 'no-dupe-args': 'off', // ts(2300) + 'no-dupe-class-members': 'off', // ts(2393) & ts(2300) + 'no-dupe-keys': 'off', // ts(1117) + 'no-func-assign': 'off', // ts(2630) + 'no-import-assign': 'off', // ts(2632) & ts(2540) + // TODO - remove this once we no longer support ESLint v8 + 'no-new-native-nonconstructor': 'off', // ts(7009) + 'no-new-symbol': 'off', // ts(7009) + 'no-obj-calls': 'off', // ts(2349) + 'no-redeclare': 'off', // ts(2451) + 'no-setter-return': 'off', // ts(2408) + 'no-this-before-super': 'off', // ts(2376) & ts(17009) + 'no-undef': 'off', // ts(2304) & ts(2552) + 'no-unreachable': 'off', // ts(7027) + 'no-unsafe-negation': 'off', // ts(2365) & ts(2322) & ts(2358) + 'no-var': 'error', // ts transpiles let/const to var, so no need for vars any more + 'no-with': 'off', // ts(1101) & ts(2410) + 'prefer-const': 'error', // ts provides better types with const + 'prefer-rest-params': 'error', // ts provides better types with rest args over arguments + 'prefer-spread': 'error', // ts transpiles spread to apply, so no need for manual apply + }, +}); +module.exports = config; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.d.ts new file mode 100644 index 0000000..21b7b5f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.d.ts @@ -0,0 +1,156 @@ +declare const _default: { + extends: string[]; + rules: { + '@typescript-eslint/adjacent-overload-signatures': "error"; + '@typescript-eslint/array-type': "error"; + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/ban-ts-comment': "error"; + '@typescript-eslint/ban-tslint-comment': "error"; + '@typescript-eslint/class-literal-property-style': "error"; + 'class-methods-use-this': "off"; + '@typescript-eslint/class-methods-use-this': "error"; + '@typescript-eslint/consistent-generic-constructors': "error"; + '@typescript-eslint/consistent-indexed-object-style': "error"; + 'consistent-return': "off"; + '@typescript-eslint/consistent-return': "error"; + '@typescript-eslint/consistent-type-assertions': "error"; + '@typescript-eslint/consistent-type-definitions': "error"; + '@typescript-eslint/consistent-type-exports': "error"; + '@typescript-eslint/consistent-type-imports': "error"; + 'default-param-last': "off"; + '@typescript-eslint/default-param-last': "error"; + 'dot-notation': "off"; + '@typescript-eslint/dot-notation': "error"; + '@typescript-eslint/explicit-function-return-type': "error"; + '@typescript-eslint/explicit-member-accessibility': "error"; + '@typescript-eslint/explicit-module-boundary-types': "error"; + 'init-declarations': "off"; + '@typescript-eslint/init-declarations': "error"; + 'max-params': "off"; + '@typescript-eslint/max-params': "error"; + '@typescript-eslint/member-ordering': "error"; + '@typescript-eslint/method-signature-style': "error"; + '@typescript-eslint/naming-convention': "error"; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-confusing-non-null-assertion': "error"; + '@typescript-eslint/no-confusing-void-expression': "error"; + '@typescript-eslint/no-deprecated': "error"; + 'no-dupe-class-members': "off"; + '@typescript-eslint/no-dupe-class-members': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-dynamic-delete': "error"; + 'no-empty-function': "off"; + '@typescript-eslint/no-empty-function': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-extraneous-class': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-import-type-side-effects': "error"; + '@typescript-eslint/no-inferrable-types': "error"; + 'no-invalid-this': "off"; + '@typescript-eslint/no-invalid-this': "error"; + '@typescript-eslint/no-invalid-void-type': "error"; + 'no-loop-func': "off"; + '@typescript-eslint/no-loop-func': "error"; + 'no-magic-numbers': "off"; + '@typescript-eslint/no-magic-numbers': "error"; + '@typescript-eslint/no-meaningless-void-operator': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-misused-spread': "error"; + '@typescript-eslint/no-mixed-enums': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-non-null-assertion': "error"; + 'no-redeclare': "off"; + '@typescript-eslint/no-redeclare': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-require-imports': "error"; + 'no-restricted-imports': "off"; + '@typescript-eslint/no-restricted-imports': "error"; + '@typescript-eslint/no-restricted-types': "error"; + 'no-shadow': "off"; + '@typescript-eslint/no-shadow': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-boolean-literal-compare': "error"; + '@typescript-eslint/no-unnecessary-condition': "error"; + '@typescript-eslint/no-unnecessary-parameter-property-assignment': "error"; + '@typescript-eslint/no-unnecessary-qualifier': "error"; + '@typescript-eslint/no-unnecessary-template-expression': "error"; + '@typescript-eslint/no-unnecessary-type-arguments': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unnecessary-type-conversion': "error"; + '@typescript-eslint/no-unnecessary-type-parameters': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-type-assertion': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + 'no-use-before-define': "off"; + '@typescript-eslint/no-use-before-define': "error"; + 'no-useless-constructor': "off"; + '@typescript-eslint/no-useless-constructor': "error"; + '@typescript-eslint/no-useless-empty-export': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + '@typescript-eslint/non-nullable-type-assertion-style': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + '@typescript-eslint/parameter-properties': "error"; + '@typescript-eslint/prefer-as-const': "error"; + 'prefer-destructuring': "off"; + '@typescript-eslint/prefer-destructuring': "error"; + '@typescript-eslint/prefer-enum-initializers': "error"; + '@typescript-eslint/prefer-find': "error"; + '@typescript-eslint/prefer-for-of': "error"; + '@typescript-eslint/prefer-function-type': "error"; + '@typescript-eslint/prefer-includes': "error"; + '@typescript-eslint/prefer-literal-enum-member': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + '@typescript-eslint/prefer-nullish-coalescing': "error"; + '@typescript-eslint/prefer-optional-chain': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + '@typescript-eslint/prefer-readonly': "error"; + '@typescript-eslint/prefer-readonly-parameter-types': "error"; + '@typescript-eslint/prefer-reduce-type-parameter': "error"; + '@typescript-eslint/prefer-regexp-exec': "error"; + '@typescript-eslint/prefer-return-this-type': "error"; + '@typescript-eslint/prefer-string-starts-ends-with': "error"; + '@typescript-eslint/promise-function-async': "error"; + '@typescript-eslint/related-getter-setter-pairs': "error"; + '@typescript-eslint/require-array-sort-compare': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': "error"; + '@typescript-eslint/restrict-template-expressions': "error"; + 'no-return-await': "off"; + '@typescript-eslint/return-await': "error"; + '@typescript-eslint/strict-boolean-expressions': "error"; + '@typescript-eslint/switch-exhaustiveness-check': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unbound-method': "error"; + '@typescript-eslint/unified-signatures': "error"; + '@typescript-eslint/use-unknown-in-catch-callback-variable': "error"; + }; +}; +export = _default; +//# sourceMappingURL=all.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.d.ts.map new file mode 100644 index 0000000..b919350 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/all.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,kBAyJiC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.js new file mode 100644 index 0000000..b18ebcd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.js @@ -0,0 +1,161 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +module.exports = { + extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'], + rules: { + '@typescript-eslint/adjacent-overload-signatures': 'error', + '@typescript-eslint/array-type': 'error', + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/ban-ts-comment': 'error', + '@typescript-eslint/ban-tslint-comment': 'error', + '@typescript-eslint/class-literal-property-style': 'error', + 'class-methods-use-this': 'off', + '@typescript-eslint/class-methods-use-this': 'error', + '@typescript-eslint/consistent-generic-constructors': 'error', + '@typescript-eslint/consistent-indexed-object-style': 'error', + 'consistent-return': 'off', + '@typescript-eslint/consistent-return': 'error', + '@typescript-eslint/consistent-type-assertions': 'error', + '@typescript-eslint/consistent-type-definitions': 'error', + '@typescript-eslint/consistent-type-exports': 'error', + '@typescript-eslint/consistent-type-imports': 'error', + 'default-param-last': 'off', + '@typescript-eslint/default-param-last': 'error', + 'dot-notation': 'off', + '@typescript-eslint/dot-notation': 'error', + '@typescript-eslint/explicit-function-return-type': 'error', + '@typescript-eslint/explicit-member-accessibility': 'error', + '@typescript-eslint/explicit-module-boundary-types': 'error', + 'init-declarations': 'off', + '@typescript-eslint/init-declarations': 'error', + 'max-params': 'off', + '@typescript-eslint/max-params': 'error', + '@typescript-eslint/member-ordering': 'error', + '@typescript-eslint/method-signature-style': 'error', + '@typescript-eslint/naming-convention': 'error', + 'no-array-constructor': 'off', + '@typescript-eslint/no-array-constructor': 'error', + '@typescript-eslint/no-array-delete': 'error', + '@typescript-eslint/no-base-to-string': 'error', + '@typescript-eslint/no-confusing-non-null-assertion': 'error', + '@typescript-eslint/no-confusing-void-expression': 'error', + '@typescript-eslint/no-deprecated': 'error', + 'no-dupe-class-members': 'off', + '@typescript-eslint/no-dupe-class-members': 'error', + '@typescript-eslint/no-duplicate-enum-values': 'error', + '@typescript-eslint/no-duplicate-type-constituents': 'error', + '@typescript-eslint/no-dynamic-delete': 'error', + 'no-empty-function': 'off', + '@typescript-eslint/no-empty-function': 'error', + '@typescript-eslint/no-empty-object-type': 'error', + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-extra-non-null-assertion': 'error', + '@typescript-eslint/no-extraneous-class': 'error', + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-for-in-array': 'error', + 'no-implied-eval': 'off', + '@typescript-eslint/no-implied-eval': 'error', + '@typescript-eslint/no-import-type-side-effects': 'error', + '@typescript-eslint/no-inferrable-types': 'error', + 'no-invalid-this': 'off', + '@typescript-eslint/no-invalid-this': 'error', + '@typescript-eslint/no-invalid-void-type': 'error', + 'no-loop-func': 'off', + '@typescript-eslint/no-loop-func': 'error', + 'no-magic-numbers': 'off', + '@typescript-eslint/no-magic-numbers': 'error', + '@typescript-eslint/no-meaningless-void-operator': 'error', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-misused-promises': 'error', + '@typescript-eslint/no-misused-spread': 'error', + '@typescript-eslint/no-mixed-enums': 'error', + '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', + '@typescript-eslint/no-non-null-assertion': 'error', + 'no-redeclare': 'off', + '@typescript-eslint/no-redeclare': 'error', + '@typescript-eslint/no-redundant-type-constituents': 'error', + '@typescript-eslint/no-require-imports': 'error', + 'no-restricted-imports': 'off', + '@typescript-eslint/no-restricted-imports': 'error', + '@typescript-eslint/no-restricted-types': 'error', + 'no-shadow': 'off', + '@typescript-eslint/no-shadow': 'error', + '@typescript-eslint/no-this-alias': 'error', + '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error', + '@typescript-eslint/no-unnecessary-condition': 'error', + '@typescript-eslint/no-unnecessary-parameter-property-assignment': 'error', + '@typescript-eslint/no-unnecessary-qualifier': 'error', + '@typescript-eslint/no-unnecessary-template-expression': 'error', + '@typescript-eslint/no-unnecessary-type-arguments': 'error', + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-unnecessary-type-constraint': 'error', + '@typescript-eslint/no-unnecessary-type-conversion': 'error', + '@typescript-eslint/no-unnecessary-type-parameters': 'error', + '@typescript-eslint/no-unsafe-argument': 'error', + '@typescript-eslint/no-unsafe-assignment': 'error', + '@typescript-eslint/no-unsafe-call': 'error', + '@typescript-eslint/no-unsafe-declaration-merging': 'error', + '@typescript-eslint/no-unsafe-enum-comparison': 'error', + '@typescript-eslint/no-unsafe-function-type': 'error', + '@typescript-eslint/no-unsafe-member-access': 'error', + '@typescript-eslint/no-unsafe-return': 'error', + '@typescript-eslint/no-unsafe-type-assertion': 'error', + '@typescript-eslint/no-unsafe-unary-minus': 'error', + 'no-unused-expressions': 'off', + '@typescript-eslint/no-unused-expressions': 'error', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'error', + 'no-use-before-define': 'off', + '@typescript-eslint/no-use-before-define': 'error', + 'no-useless-constructor': 'off', + '@typescript-eslint/no-useless-constructor': 'error', + '@typescript-eslint/no-useless-empty-export': 'error', + '@typescript-eslint/no-wrapper-object-types': 'error', + '@typescript-eslint/non-nullable-type-assertion-style': 'error', + 'no-throw-literal': 'off', + '@typescript-eslint/only-throw-error': 'error', + '@typescript-eslint/parameter-properties': 'error', + '@typescript-eslint/prefer-as-const': 'error', + 'prefer-destructuring': 'off', + '@typescript-eslint/prefer-destructuring': 'error', + '@typescript-eslint/prefer-enum-initializers': 'error', + '@typescript-eslint/prefer-find': 'error', + '@typescript-eslint/prefer-for-of': 'error', + '@typescript-eslint/prefer-function-type': 'error', + '@typescript-eslint/prefer-includes': 'error', + '@typescript-eslint/prefer-literal-enum-member': 'error', + '@typescript-eslint/prefer-namespace-keyword': 'error', + '@typescript-eslint/prefer-nullish-coalescing': 'error', + '@typescript-eslint/prefer-optional-chain': 'error', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'error', + '@typescript-eslint/prefer-readonly': 'error', + '@typescript-eslint/prefer-readonly-parameter-types': 'error', + '@typescript-eslint/prefer-reduce-type-parameter': 'error', + '@typescript-eslint/prefer-regexp-exec': 'error', + '@typescript-eslint/prefer-return-this-type': 'error', + '@typescript-eslint/prefer-string-starts-ends-with': 'error', + '@typescript-eslint/promise-function-async': 'error', + '@typescript-eslint/related-getter-setter-pairs': 'error', + '@typescript-eslint/require-array-sort-compare': 'error', + 'require-await': 'off', + '@typescript-eslint/require-await': 'error', + '@typescript-eslint/restrict-plus-operands': 'error', + '@typescript-eslint/restrict-template-expressions': 'error', + 'no-return-await': 'off', + '@typescript-eslint/return-await': 'error', + '@typescript-eslint/strict-boolean-expressions': 'error', + '@typescript-eslint/switch-exhaustiveness-check': 'error', + '@typescript-eslint/triple-slash-reference': 'error', + '@typescript-eslint/unbound-method': 'error', + '@typescript-eslint/unified-signatures': 'error', + '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error', + }, +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/base.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/base.d.ts new file mode 100644 index 0000000..42f2bb8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/base.d.ts @@ -0,0 +1,9 @@ +declare const _default: { + parser: string; + parserOptions: { + sourceType: "module"; + }; + plugins: string[]; +}; +export = _default; +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/base.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/base.d.ts.map new file mode 100644 index 0000000..2fcaf4e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/base.ts"],"names":[],"mappings":";;;;;;;AAEA,kBAIiC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/base.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/base.js new file mode 100644 index 0000000..ea87d35 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/base.js @@ -0,0 +1,6 @@ +"use strict"; +module.exports = { + parser: '@typescript-eslint/parser', + parserOptions: { sourceType: 'module' }, + plugins: ['@typescript-eslint'], +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/disable-type-checked.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/disable-type-checked.d.ts new file mode 100644 index 0000000..c8baaac --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/disable-type-checked.d.ts @@ -0,0 +1,70 @@ +declare const _default: { + parserOptions: { + program: null; + project: false; + projectService: false; + }; + rules: { + '@typescript-eslint/await-thenable': "off"; + '@typescript-eslint/consistent-return': "off"; + '@typescript-eslint/consistent-type-exports': "off"; + '@typescript-eslint/dot-notation': "off"; + '@typescript-eslint/naming-convention': "off"; + '@typescript-eslint/no-array-delete': "off"; + '@typescript-eslint/no-base-to-string': "off"; + '@typescript-eslint/no-confusing-void-expression': "off"; + '@typescript-eslint/no-deprecated': "off"; + '@typescript-eslint/no-duplicate-type-constituents': "off"; + '@typescript-eslint/no-floating-promises': "off"; + '@typescript-eslint/no-for-in-array': "off"; + '@typescript-eslint/no-implied-eval': "off"; + '@typescript-eslint/no-meaningless-void-operator': "off"; + '@typescript-eslint/no-misused-promises': "off"; + '@typescript-eslint/no-misused-spread': "off"; + '@typescript-eslint/no-mixed-enums': "off"; + '@typescript-eslint/no-redundant-type-constituents': "off"; + '@typescript-eslint/no-unnecessary-boolean-literal-compare': "off"; + '@typescript-eslint/no-unnecessary-condition': "off"; + '@typescript-eslint/no-unnecessary-qualifier': "off"; + '@typescript-eslint/no-unnecessary-template-expression': "off"; + '@typescript-eslint/no-unnecessary-type-arguments': "off"; + '@typescript-eslint/no-unnecessary-type-assertion': "off"; + '@typescript-eslint/no-unnecessary-type-conversion': "off"; + '@typescript-eslint/no-unnecessary-type-parameters': "off"; + '@typescript-eslint/no-unsafe-argument': "off"; + '@typescript-eslint/no-unsafe-assignment': "off"; + '@typescript-eslint/no-unsafe-call': "off"; + '@typescript-eslint/no-unsafe-enum-comparison': "off"; + '@typescript-eslint/no-unsafe-member-access': "off"; + '@typescript-eslint/no-unsafe-return': "off"; + '@typescript-eslint/no-unsafe-type-assertion': "off"; + '@typescript-eslint/no-unsafe-unary-minus': "off"; + '@typescript-eslint/non-nullable-type-assertion-style': "off"; + '@typescript-eslint/only-throw-error': "off"; + '@typescript-eslint/prefer-destructuring': "off"; + '@typescript-eslint/prefer-find': "off"; + '@typescript-eslint/prefer-includes': "off"; + '@typescript-eslint/prefer-nullish-coalescing': "off"; + '@typescript-eslint/prefer-optional-chain': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-readonly': "off"; + '@typescript-eslint/prefer-readonly-parameter-types': "off"; + '@typescript-eslint/prefer-reduce-type-parameter': "off"; + '@typescript-eslint/prefer-regexp-exec': "off"; + '@typescript-eslint/prefer-return-this-type': "off"; + '@typescript-eslint/prefer-string-starts-ends-with': "off"; + '@typescript-eslint/promise-function-async': "off"; + '@typescript-eslint/related-getter-setter-pairs': "off"; + '@typescript-eslint/require-array-sort-compare': "off"; + '@typescript-eslint/require-await': "off"; + '@typescript-eslint/restrict-plus-operands': "off"; + '@typescript-eslint/restrict-template-expressions': "off"; + '@typescript-eslint/return-await': "off"; + '@typescript-eslint/strict-boolean-expressions': "off"; + '@typescript-eslint/switch-exhaustiveness-check': "off"; + '@typescript-eslint/unbound-method': "off"; + '@typescript-eslint/use-unknown-in-catch-callback-variable': "off"; + }; +}; +export = _default; +//# sourceMappingURL=disable-type-checked.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/disable-type-checked.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/disable-type-checked.d.ts.map new file mode 100644 index 0000000..00551d2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/disable-type-checked.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"disable-type-checked.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/disable-type-checked.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,kBA+DiC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/disable-type-checked.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/disable-type-checked.js new file mode 100644 index 0000000..bf672a4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/disable-type-checked.js @@ -0,0 +1,71 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +module.exports = { + parserOptions: { program: null, project: false, projectService: false }, + rules: { + '@typescript-eslint/await-thenable': 'off', + '@typescript-eslint/consistent-return': 'off', + '@typescript-eslint/consistent-type-exports': 'off', + '@typescript-eslint/dot-notation': 'off', + '@typescript-eslint/naming-convention': 'off', + '@typescript-eslint/no-array-delete': 'off', + '@typescript-eslint/no-base-to-string': 'off', + '@typescript-eslint/no-confusing-void-expression': 'off', + '@typescript-eslint/no-deprecated': 'off', + '@typescript-eslint/no-duplicate-type-constituents': 'off', + '@typescript-eslint/no-floating-promises': 'off', + '@typescript-eslint/no-for-in-array': 'off', + '@typescript-eslint/no-implied-eval': 'off', + '@typescript-eslint/no-meaningless-void-operator': 'off', + '@typescript-eslint/no-misused-promises': 'off', + '@typescript-eslint/no-misused-spread': 'off', + '@typescript-eslint/no-mixed-enums': 'off', + '@typescript-eslint/no-redundant-type-constituents': 'off', + '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off', + '@typescript-eslint/no-unnecessary-condition': 'off', + '@typescript-eslint/no-unnecessary-qualifier': 'off', + '@typescript-eslint/no-unnecessary-template-expression': 'off', + '@typescript-eslint/no-unnecessary-type-arguments': 'off', + '@typescript-eslint/no-unnecessary-type-assertion': 'off', + '@typescript-eslint/no-unnecessary-type-conversion': 'off', + '@typescript-eslint/no-unnecessary-type-parameters': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-enum-comparison': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-unsafe-type-assertion': 'off', + '@typescript-eslint/no-unsafe-unary-minus': 'off', + '@typescript-eslint/non-nullable-type-assertion-style': 'off', + '@typescript-eslint/only-throw-error': 'off', + '@typescript-eslint/prefer-destructuring': 'off', + '@typescript-eslint/prefer-find': 'off', + '@typescript-eslint/prefer-includes': 'off', + '@typescript-eslint/prefer-nullish-coalescing': 'off', + '@typescript-eslint/prefer-optional-chain': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-readonly': 'off', + '@typescript-eslint/prefer-readonly-parameter-types': 'off', + '@typescript-eslint/prefer-reduce-type-parameter': 'off', + '@typescript-eslint/prefer-regexp-exec': 'off', + '@typescript-eslint/prefer-return-this-type': 'off', + '@typescript-eslint/prefer-string-starts-ends-with': 'off', + '@typescript-eslint/promise-function-async': 'off', + '@typescript-eslint/related-getter-setter-pairs': 'off', + '@typescript-eslint/require-array-sort-compare': 'off', + '@typescript-eslint/require-await': 'off', + '@typescript-eslint/restrict-plus-operands': 'off', + '@typescript-eslint/restrict-template-expressions': 'off', + '@typescript-eslint/return-await': 'off', + '@typescript-eslint/strict-boolean-expressions': 'off', + '@typescript-eslint/switch-exhaustiveness-check': 'off', + '@typescript-eslint/unbound-method': 'off', + '@typescript-eslint/use-unknown-in-catch-callback-variable': 'off', + }, +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/eslint-recommended.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/eslint-recommended.d.ts new file mode 100644 index 0000000..1d14fd4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/eslint-recommended.d.ts @@ -0,0 +1,13 @@ +/** + * This is a compatibility ruleset that: + * - disables rules from eslint:recommended which are already handled by TypeScript. + * - enables rules that make sense due to TS's typechecking / transpilation. + */ +declare const _default: { + overrides: { + files: string[]; + rules: Record; + }[]; +}; +export = _default; +//# sourceMappingURL=eslint-recommended.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/eslint-recommended.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/eslint-recommended.d.ts.map new file mode 100644 index 0000000..7dfaee3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/eslint-recommended.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"eslint-recommended.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/eslint-recommended.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;AAMH,kBAEiC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/eslint-recommended.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/eslint-recommended.js new file mode 100644 index 0000000..c544796 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/eslint-recommended.js @@ -0,0 +1,13 @@ +"use strict"; +/** + * This is a compatibility ruleset that: + * - disables rules from eslint:recommended which are already handled by TypeScript. + * - enables rules that make sense due to TS's typechecking / transpilation. + */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const eslint_recommended_raw_1 = __importDefault(require("../eslint-recommended-raw")); +module.exports = { + overrides: [(0, eslint_recommended_raw_1.default)('glob')], +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked-only.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked-only.d.ts new file mode 100644 index 0000000..efc408f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked-only.d.ts @@ -0,0 +1,34 @@ +declare const _default: { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': "error"; + '@typescript-eslint/restrict-template-expressions': "error"; + '@typescript-eslint/unbound-method': "error"; + }; +}; +export = _default; +//# sourceMappingURL=recommended-type-checked-only.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked-only.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked-only.d.ts.map new file mode 100644 index 0000000..e5c7da8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked-only.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"recommended-type-checked-only.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/recommended-type-checked-only.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,kBA+BiC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked-only.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked-only.js new file mode 100644 index 0000000..b5d6f6b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked-only.js @@ -0,0 +1,39 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +module.exports = { + extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'], + rules: { + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/no-array-delete': 'error', + '@typescript-eslint/no-base-to-string': 'error', + '@typescript-eslint/no-duplicate-type-constituents': 'error', + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-for-in-array': 'error', + 'no-implied-eval': 'off', + '@typescript-eslint/no-implied-eval': 'error', + '@typescript-eslint/no-misused-promises': 'error', + '@typescript-eslint/no-redundant-type-constituents': 'error', + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-unsafe-argument': 'error', + '@typescript-eslint/no-unsafe-assignment': 'error', + '@typescript-eslint/no-unsafe-call': 'error', + '@typescript-eslint/no-unsafe-enum-comparison': 'error', + '@typescript-eslint/no-unsafe-member-access': 'error', + '@typescript-eslint/no-unsafe-return': 'error', + '@typescript-eslint/no-unsafe-unary-minus': 'error', + 'no-throw-literal': 'off', + '@typescript-eslint/only-throw-error': 'error', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'error', + 'require-await': 'off', + '@typescript-eslint/require-await': 'error', + '@typescript-eslint/restrict-plus-operands': 'error', + '@typescript-eslint/restrict-template-expressions': 'error', + '@typescript-eslint/unbound-method': 'error', + }, +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked.d.ts new file mode 100644 index 0000000..7a6da5a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked.d.ts @@ -0,0 +1,57 @@ +declare const _default: { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/ban-ts-comment': "error"; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': "error"; + '@typescript-eslint/restrict-template-expressions': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unbound-method': "error"; + }; +}; +export = _default; +//# sourceMappingURL=recommended-type-checked.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked.d.ts.map new file mode 100644 index 0000000..82f319b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"recommended-type-checked.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/recommended-type-checked.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,kBAsDiC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked.js new file mode 100644 index 0000000..f9a84f8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked.js @@ -0,0 +1,62 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +module.exports = { + extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'], + rules: { + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/ban-ts-comment': 'error', + 'no-array-constructor': 'off', + '@typescript-eslint/no-array-constructor': 'error', + '@typescript-eslint/no-array-delete': 'error', + '@typescript-eslint/no-base-to-string': 'error', + '@typescript-eslint/no-duplicate-enum-values': 'error', + '@typescript-eslint/no-duplicate-type-constituents': 'error', + '@typescript-eslint/no-empty-object-type': 'error', + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-extra-non-null-assertion': 'error', + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-for-in-array': 'error', + 'no-implied-eval': 'off', + '@typescript-eslint/no-implied-eval': 'error', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-misused-promises': 'error', + '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', + '@typescript-eslint/no-redundant-type-constituents': 'error', + '@typescript-eslint/no-require-imports': 'error', + '@typescript-eslint/no-this-alias': 'error', + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-unnecessary-type-constraint': 'error', + '@typescript-eslint/no-unsafe-argument': 'error', + '@typescript-eslint/no-unsafe-assignment': 'error', + '@typescript-eslint/no-unsafe-call': 'error', + '@typescript-eslint/no-unsafe-declaration-merging': 'error', + '@typescript-eslint/no-unsafe-enum-comparison': 'error', + '@typescript-eslint/no-unsafe-function-type': 'error', + '@typescript-eslint/no-unsafe-member-access': 'error', + '@typescript-eslint/no-unsafe-return': 'error', + '@typescript-eslint/no-unsafe-unary-minus': 'error', + 'no-unused-expressions': 'off', + '@typescript-eslint/no-unused-expressions': 'error', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'error', + '@typescript-eslint/no-wrapper-object-types': 'error', + 'no-throw-literal': 'off', + '@typescript-eslint/only-throw-error': 'error', + '@typescript-eslint/prefer-as-const': 'error', + '@typescript-eslint/prefer-namespace-keyword': 'error', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'error', + 'require-await': 'off', + '@typescript-eslint/require-await': 'error', + '@typescript-eslint/restrict-plus-operands': 'error', + '@typescript-eslint/restrict-template-expressions': 'error', + '@typescript-eslint/triple-slash-reference': 'error', + '@typescript-eslint/unbound-method': 'error', + }, +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended.d.ts new file mode 100644 index 0000000..f7a2dd7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended.d.ts @@ -0,0 +1,30 @@ +declare const _default: { + extends: string[]; + rules: { + '@typescript-eslint/ban-ts-comment': "error"; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + }; +}; +export = _default; +//# sourceMappingURL=recommended.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended.d.ts.map new file mode 100644 index 0000000..ba2bd73 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"recommended.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/recommended.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,kBA2BiC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended.js new file mode 100644 index 0000000..f1c1793 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended.js @@ -0,0 +1,35 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +module.exports = { + extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'], + rules: { + '@typescript-eslint/ban-ts-comment': 'error', + 'no-array-constructor': 'off', + '@typescript-eslint/no-array-constructor': 'error', + '@typescript-eslint/no-duplicate-enum-values': 'error', + '@typescript-eslint/no-empty-object-type': 'error', + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-extra-non-null-assertion': 'error', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', + '@typescript-eslint/no-require-imports': 'error', + '@typescript-eslint/no-this-alias': 'error', + '@typescript-eslint/no-unnecessary-type-constraint': 'error', + '@typescript-eslint/no-unsafe-declaration-merging': 'error', + '@typescript-eslint/no-unsafe-function-type': 'error', + 'no-unused-expressions': 'off', + '@typescript-eslint/no-unused-expressions': 'error', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'error', + '@typescript-eslint/no-wrapper-object-types': 'error', + '@typescript-eslint/prefer-as-const': 'error', + '@typescript-eslint/prefer-namespace-keyword': 'error', + '@typescript-eslint/triple-slash-reference': 'error', + }, +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked-only.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked-only.d.ts new file mode 100644 index 0000000..b23e5ca --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked-only.d.ts @@ -0,0 +1,64 @@ +declare const _default: { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-confusing-void-expression': "error"; + '@typescript-eslint/no-deprecated': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-meaningless-void-operator': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-misused-spread': "error"; + '@typescript-eslint/no-mixed-enums': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-unnecessary-boolean-literal-compare': "error"; + '@typescript-eslint/no-unnecessary-condition': "error"; + '@typescript-eslint/no-unnecessary-template-expression': "error"; + '@typescript-eslint/no-unnecessary-type-arguments': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-conversion': "error"; + '@typescript-eslint/no-unnecessary-type-parameters': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + '@typescript-eslint/prefer-reduce-type-parameter': "error"; + '@typescript-eslint/prefer-return-this-type': "error"; + '@typescript-eslint/related-getter-setter-pairs': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': ["error", { + allowAny: boolean; + allowBoolean: boolean; + allowNullish: boolean; + allowNumberAndString: boolean; + allowRegExp: boolean; + }]; + '@typescript-eslint/restrict-template-expressions': ["error", { + allowAny: boolean; + allowBoolean: boolean; + allowNever: boolean; + allowNullish: boolean; + allowNumber: boolean; + allowRegExp: boolean; + }]; + 'no-return-await': "off"; + '@typescript-eslint/return-await': ["error", string]; + '@typescript-eslint/unbound-method': "error"; + '@typescript-eslint/use-unknown-in-catch-callback-variable': "error"; + }; +}; +export = _default; +//# sourceMappingURL=strict-type-checked-only.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked-only.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked-only.d.ts.map new file mode 100644 index 0000000..ce2600c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked-only.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strict-type-checked-only.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/strict-type-checked-only.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,kBAsEiC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked-only.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked-only.js new file mode 100644 index 0000000..e79eee2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked-only.js @@ -0,0 +1,78 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +module.exports = { + extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'], + rules: { + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/no-array-delete': 'error', + '@typescript-eslint/no-base-to-string': 'error', + '@typescript-eslint/no-confusing-void-expression': 'error', + '@typescript-eslint/no-deprecated': 'error', + '@typescript-eslint/no-duplicate-type-constituents': 'error', + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-for-in-array': 'error', + 'no-implied-eval': 'off', + '@typescript-eslint/no-implied-eval': 'error', + '@typescript-eslint/no-meaningless-void-operator': 'error', + '@typescript-eslint/no-misused-promises': 'error', + '@typescript-eslint/no-misused-spread': 'error', + '@typescript-eslint/no-mixed-enums': 'error', + '@typescript-eslint/no-redundant-type-constituents': 'error', + '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error', + '@typescript-eslint/no-unnecessary-condition': 'error', + '@typescript-eslint/no-unnecessary-template-expression': 'error', + '@typescript-eslint/no-unnecessary-type-arguments': 'error', + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-unnecessary-type-conversion': 'error', + '@typescript-eslint/no-unnecessary-type-parameters': 'error', + '@typescript-eslint/no-unsafe-argument': 'error', + '@typescript-eslint/no-unsafe-assignment': 'error', + '@typescript-eslint/no-unsafe-call': 'error', + '@typescript-eslint/no-unsafe-enum-comparison': 'error', + '@typescript-eslint/no-unsafe-member-access': 'error', + '@typescript-eslint/no-unsafe-return': 'error', + '@typescript-eslint/no-unsafe-unary-minus': 'error', + 'no-throw-literal': 'off', + '@typescript-eslint/only-throw-error': 'error', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'error', + '@typescript-eslint/prefer-reduce-type-parameter': 'error', + '@typescript-eslint/prefer-return-this-type': 'error', + '@typescript-eslint/related-getter-setter-pairs': 'error', + 'require-await': 'off', + '@typescript-eslint/require-await': 'error', + '@typescript-eslint/restrict-plus-operands': [ + 'error', + { + allowAny: false, + allowBoolean: false, + allowNullish: false, + allowNumberAndString: false, + allowRegExp: false, + }, + ], + '@typescript-eslint/restrict-template-expressions': [ + 'error', + { + allowAny: false, + allowBoolean: false, + allowNever: false, + allowNullish: false, + allowNumber: false, + allowRegExp: false, + }, + ], + 'no-return-await': 'off', + '@typescript-eslint/return-await': [ + 'error', + 'error-handling-correctness-only', + ], + '@typescript-eslint/unbound-method': 'error', + '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error', + }, +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked.d.ts new file mode 100644 index 0000000..2995c7e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked.d.ts @@ -0,0 +1,98 @@ +declare const _default: { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/ban-ts-comment': ["error", { + minimumDescriptionLength: number; + }]; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-confusing-void-expression': "error"; + '@typescript-eslint/no-deprecated': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-dynamic-delete': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-extraneous-class': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-invalid-void-type': "error"; + '@typescript-eslint/no-meaningless-void-operator': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-misused-spread': "error"; + '@typescript-eslint/no-mixed-enums': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-non-null-assertion': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-boolean-literal-compare': "error"; + '@typescript-eslint/no-unnecessary-condition': "error"; + '@typescript-eslint/no-unnecessary-template-expression': "error"; + '@typescript-eslint/no-unnecessary-type-arguments': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unnecessary-type-conversion': "error"; + '@typescript-eslint/no-unnecessary-type-parameters': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + 'no-useless-constructor': "off"; + '@typescript-eslint/no-useless-constructor': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-literal-enum-member': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + '@typescript-eslint/prefer-reduce-type-parameter': "error"; + '@typescript-eslint/prefer-return-this-type': "error"; + '@typescript-eslint/related-getter-setter-pairs': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': ["error", { + allowAny: boolean; + allowBoolean: boolean; + allowNullish: boolean; + allowNumberAndString: boolean; + allowRegExp: boolean; + }]; + '@typescript-eslint/restrict-template-expressions': ["error", { + allowAny: boolean; + allowBoolean: boolean; + allowNever: boolean; + allowNullish: boolean; + allowNumber: boolean; + allowRegExp: boolean; + }]; + 'no-return-await': "off"; + '@typescript-eslint/return-await': ["error", string]; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unbound-method': "error"; + '@typescript-eslint/unified-signatures': "error"; + '@typescript-eslint/use-unknown-in-catch-callback-variable': "error"; + }; +}; +export = _default; +//# sourceMappingURL=strict-type-checked.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked.d.ts.map new file mode 100644 index 0000000..22efb69 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strict-type-checked.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/strict-type-checked.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,kBAyGiC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked.js new file mode 100644 index 0000000..3c27cc4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked.js @@ -0,0 +1,113 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +module.exports = { + extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'], + rules: { + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/ban-ts-comment': [ + 'error', + { minimumDescriptionLength: 10 }, + ], + 'no-array-constructor': 'off', + '@typescript-eslint/no-array-constructor': 'error', + '@typescript-eslint/no-array-delete': 'error', + '@typescript-eslint/no-base-to-string': 'error', + '@typescript-eslint/no-confusing-void-expression': 'error', + '@typescript-eslint/no-deprecated': 'error', + '@typescript-eslint/no-duplicate-enum-values': 'error', + '@typescript-eslint/no-duplicate-type-constituents': 'error', + '@typescript-eslint/no-dynamic-delete': 'error', + '@typescript-eslint/no-empty-object-type': 'error', + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-extra-non-null-assertion': 'error', + '@typescript-eslint/no-extraneous-class': 'error', + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-for-in-array': 'error', + 'no-implied-eval': 'off', + '@typescript-eslint/no-implied-eval': 'error', + '@typescript-eslint/no-invalid-void-type': 'error', + '@typescript-eslint/no-meaningless-void-operator': 'error', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-misused-promises': 'error', + '@typescript-eslint/no-misused-spread': 'error', + '@typescript-eslint/no-mixed-enums': 'error', + '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', + '@typescript-eslint/no-non-null-assertion': 'error', + '@typescript-eslint/no-redundant-type-constituents': 'error', + '@typescript-eslint/no-require-imports': 'error', + '@typescript-eslint/no-this-alias': 'error', + '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error', + '@typescript-eslint/no-unnecessary-condition': 'error', + '@typescript-eslint/no-unnecessary-template-expression': 'error', + '@typescript-eslint/no-unnecessary-type-arguments': 'error', + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-unnecessary-type-constraint': 'error', + '@typescript-eslint/no-unnecessary-type-conversion': 'error', + '@typescript-eslint/no-unnecessary-type-parameters': 'error', + '@typescript-eslint/no-unsafe-argument': 'error', + '@typescript-eslint/no-unsafe-assignment': 'error', + '@typescript-eslint/no-unsafe-call': 'error', + '@typescript-eslint/no-unsafe-declaration-merging': 'error', + '@typescript-eslint/no-unsafe-enum-comparison': 'error', + '@typescript-eslint/no-unsafe-function-type': 'error', + '@typescript-eslint/no-unsafe-member-access': 'error', + '@typescript-eslint/no-unsafe-return': 'error', + '@typescript-eslint/no-unsafe-unary-minus': 'error', + 'no-unused-expressions': 'off', + '@typescript-eslint/no-unused-expressions': 'error', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'error', + 'no-useless-constructor': 'off', + '@typescript-eslint/no-useless-constructor': 'error', + '@typescript-eslint/no-wrapper-object-types': 'error', + 'no-throw-literal': 'off', + '@typescript-eslint/only-throw-error': 'error', + '@typescript-eslint/prefer-as-const': 'error', + '@typescript-eslint/prefer-literal-enum-member': 'error', + '@typescript-eslint/prefer-namespace-keyword': 'error', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'error', + '@typescript-eslint/prefer-reduce-type-parameter': 'error', + '@typescript-eslint/prefer-return-this-type': 'error', + '@typescript-eslint/related-getter-setter-pairs': 'error', + 'require-await': 'off', + '@typescript-eslint/require-await': 'error', + '@typescript-eslint/restrict-plus-operands': [ + 'error', + { + allowAny: false, + allowBoolean: false, + allowNullish: false, + allowNumberAndString: false, + allowRegExp: false, + }, + ], + '@typescript-eslint/restrict-template-expressions': [ + 'error', + { + allowAny: false, + allowBoolean: false, + allowNever: false, + allowNullish: false, + allowNumber: false, + allowRegExp: false, + }, + ], + 'no-return-await': 'off', + '@typescript-eslint/return-await': [ + 'error', + 'error-handling-correctness-only', + ], + '@typescript-eslint/triple-slash-reference': 'error', + '@typescript-eslint/unbound-method': 'error', + '@typescript-eslint/unified-signatures': 'error', + '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error', + }, +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict.d.ts new file mode 100644 index 0000000..45252e7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict.d.ts @@ -0,0 +1,41 @@ +declare const _default: { + extends: string[]; + rules: { + '@typescript-eslint/ban-ts-comment': ["error", { + minimumDescriptionLength: number; + }]; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-dynamic-delete': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-extraneous-class': "error"; + '@typescript-eslint/no-invalid-void-type': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-non-null-assertion': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + 'no-useless-constructor': "off"; + '@typescript-eslint/no-useless-constructor': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-literal-enum-member': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unified-signatures': "error"; + }; +}; +export = _default; +//# sourceMappingURL=strict.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict.d.ts.map new file mode 100644 index 0000000..c27dcd6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strict.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/strict.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,kBAuCiC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict.js new file mode 100644 index 0000000..d8caf2d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict.js @@ -0,0 +1,47 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +module.exports = { + extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'], + rules: { + '@typescript-eslint/ban-ts-comment': [ + 'error', + { minimumDescriptionLength: 10 }, + ], + 'no-array-constructor': 'off', + '@typescript-eslint/no-array-constructor': 'error', + '@typescript-eslint/no-duplicate-enum-values': 'error', + '@typescript-eslint/no-dynamic-delete': 'error', + '@typescript-eslint/no-empty-object-type': 'error', + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-extra-non-null-assertion': 'error', + '@typescript-eslint/no-extraneous-class': 'error', + '@typescript-eslint/no-invalid-void-type': 'error', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', + '@typescript-eslint/no-non-null-assertion': 'error', + '@typescript-eslint/no-require-imports': 'error', + '@typescript-eslint/no-this-alias': 'error', + '@typescript-eslint/no-unnecessary-type-constraint': 'error', + '@typescript-eslint/no-unsafe-declaration-merging': 'error', + '@typescript-eslint/no-unsafe-function-type': 'error', + 'no-unused-expressions': 'off', + '@typescript-eslint/no-unused-expressions': 'error', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'error', + 'no-useless-constructor': 'off', + '@typescript-eslint/no-useless-constructor': 'error', + '@typescript-eslint/no-wrapper-object-types': 'error', + '@typescript-eslint/prefer-as-const': 'error', + '@typescript-eslint/prefer-literal-enum-member': 'error', + '@typescript-eslint/prefer-namespace-keyword': 'error', + '@typescript-eslint/triple-slash-reference': 'error', + '@typescript-eslint/unified-signatures': 'error', + }, +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked-only.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked-only.d.ts new file mode 100644 index 0000000..fe56486 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked-only.d.ts @@ -0,0 +1,16 @@ +declare const _default: { + extends: string[]; + rules: { + 'dot-notation': "off"; + '@typescript-eslint/dot-notation': "error"; + '@typescript-eslint/non-nullable-type-assertion-style': "error"; + '@typescript-eslint/prefer-find': "error"; + '@typescript-eslint/prefer-includes': "error"; + '@typescript-eslint/prefer-nullish-coalescing': "error"; + '@typescript-eslint/prefer-optional-chain': "error"; + '@typescript-eslint/prefer-regexp-exec': "error"; + '@typescript-eslint/prefer-string-starts-ends-with': "error"; + }; +}; +export = _default; +//# sourceMappingURL=stylistic-type-checked-only.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked-only.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked-only.d.ts.map new file mode 100644 index 0000000..3b5e987 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked-only.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stylistic-type-checked-only.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/stylistic-type-checked-only.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AASA,kBAaiC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked-only.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked-only.js new file mode 100644 index 0000000..a6250f1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked-only.js @@ -0,0 +1,21 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +module.exports = { + extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'], + rules: { + 'dot-notation': 'off', + '@typescript-eslint/dot-notation': 'error', + '@typescript-eslint/non-nullable-type-assertion-style': 'error', + '@typescript-eslint/prefer-find': 'error', + '@typescript-eslint/prefer-includes': 'error', + '@typescript-eslint/prefer-nullish-coalescing': 'error', + '@typescript-eslint/prefer-optional-chain': 'error', + '@typescript-eslint/prefer-regexp-exec': 'error', + '@typescript-eslint/prefer-string-starts-ends-with': 'error', + }, +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked.d.ts new file mode 100644 index 0000000..7c37858 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked.d.ts @@ -0,0 +1,30 @@ +declare const _default: { + extends: string[]; + rules: { + '@typescript-eslint/adjacent-overload-signatures': "error"; + '@typescript-eslint/array-type': "error"; + '@typescript-eslint/ban-tslint-comment': "error"; + '@typescript-eslint/class-literal-property-style': "error"; + '@typescript-eslint/consistent-generic-constructors': "error"; + '@typescript-eslint/consistent-indexed-object-style': "error"; + '@typescript-eslint/consistent-type-assertions': "error"; + '@typescript-eslint/consistent-type-definitions': "error"; + 'dot-notation': "off"; + '@typescript-eslint/dot-notation': "error"; + '@typescript-eslint/no-confusing-non-null-assertion': "error"; + 'no-empty-function': "off"; + '@typescript-eslint/no-empty-function': "error"; + '@typescript-eslint/no-inferrable-types': "error"; + '@typescript-eslint/non-nullable-type-assertion-style': "error"; + '@typescript-eslint/prefer-find': "error"; + '@typescript-eslint/prefer-for-of': "error"; + '@typescript-eslint/prefer-function-type': "error"; + '@typescript-eslint/prefer-includes': "error"; + '@typescript-eslint/prefer-nullish-coalescing': "error"; + '@typescript-eslint/prefer-optional-chain': "error"; + '@typescript-eslint/prefer-regexp-exec': "error"; + '@typescript-eslint/prefer-string-starts-ends-with': "error"; + }; +}; +export = _default; +//# sourceMappingURL=stylistic-type-checked.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked.d.ts.map new file mode 100644 index 0000000..4072692 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stylistic-type-checked.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/stylistic-type-checked.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,kBA2BiC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked.js new file mode 100644 index 0000000..82491bd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked.js @@ -0,0 +1,35 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +module.exports = { + extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'], + rules: { + '@typescript-eslint/adjacent-overload-signatures': 'error', + '@typescript-eslint/array-type': 'error', + '@typescript-eslint/ban-tslint-comment': 'error', + '@typescript-eslint/class-literal-property-style': 'error', + '@typescript-eslint/consistent-generic-constructors': 'error', + '@typescript-eslint/consistent-indexed-object-style': 'error', + '@typescript-eslint/consistent-type-assertions': 'error', + '@typescript-eslint/consistent-type-definitions': 'error', + 'dot-notation': 'off', + '@typescript-eslint/dot-notation': 'error', + '@typescript-eslint/no-confusing-non-null-assertion': 'error', + 'no-empty-function': 'off', + '@typescript-eslint/no-empty-function': 'error', + '@typescript-eslint/no-inferrable-types': 'error', + '@typescript-eslint/non-nullable-type-assertion-style': 'error', + '@typescript-eslint/prefer-find': 'error', + '@typescript-eslint/prefer-for-of': 'error', + '@typescript-eslint/prefer-function-type': 'error', + '@typescript-eslint/prefer-includes': 'error', + '@typescript-eslint/prefer-nullish-coalescing': 'error', + '@typescript-eslint/prefer-optional-chain': 'error', + '@typescript-eslint/prefer-regexp-exec': 'error', + '@typescript-eslint/prefer-string-starts-ends-with': 'error', + }, +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic.d.ts new file mode 100644 index 0000000..47725a0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic.d.ts @@ -0,0 +1,21 @@ +declare const _default: { + extends: string[]; + rules: { + '@typescript-eslint/adjacent-overload-signatures': "error"; + '@typescript-eslint/array-type': "error"; + '@typescript-eslint/ban-tslint-comment': "error"; + '@typescript-eslint/class-literal-property-style': "error"; + '@typescript-eslint/consistent-generic-constructors': "error"; + '@typescript-eslint/consistent-indexed-object-style': "error"; + '@typescript-eslint/consistent-type-assertions': "error"; + '@typescript-eslint/consistent-type-definitions': "error"; + '@typescript-eslint/no-confusing-non-null-assertion': "error"; + 'no-empty-function': "off"; + '@typescript-eslint/no-empty-function': "error"; + '@typescript-eslint/no-inferrable-types': "error"; + '@typescript-eslint/prefer-for-of': "error"; + '@typescript-eslint/prefer-function-type': "error"; + }; +}; +export = _default; +//# sourceMappingURL=stylistic.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic.d.ts.map new file mode 100644 index 0000000..ef207f5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stylistic.d.ts","sourceRoot":"","sources":["../../../src/configs/eslintrc/stylistic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AASA,kBAkBiC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic.js new file mode 100644 index 0000000..fbcf163 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic.js @@ -0,0 +1,26 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +module.exports = { + extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'], + rules: { + '@typescript-eslint/adjacent-overload-signatures': 'error', + '@typescript-eslint/array-type': 'error', + '@typescript-eslint/ban-tslint-comment': 'error', + '@typescript-eslint/class-literal-property-style': 'error', + '@typescript-eslint/consistent-generic-constructors': 'error', + '@typescript-eslint/consistent-indexed-object-style': 'error', + '@typescript-eslint/consistent-type-assertions': 'error', + '@typescript-eslint/consistent-type-definitions': 'error', + '@typescript-eslint/no-confusing-non-null-assertion': 'error', + 'no-empty-function': 'off', + '@typescript-eslint/no-empty-function': 'error', + '@typescript-eslint/no-inferrable-types': 'error', + '@typescript-eslint/prefer-for-of': 'error', + '@typescript-eslint/prefer-function-type': 'error', + }, +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/all.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/all.d.ts new file mode 100644 index 0000000..9c185d0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/all.d.ts @@ -0,0 +1,8 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +/** + * Enables each the rules provided as a part of typescript-eslint. Note that many rules are not applicable in all codebases, or are meant to be configured. + * @see {@link https://typescript-eslint.io/users/configs#all} + */ +declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray; +export default _default; +//# sourceMappingURL=all.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/all.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/all.d.ts.map new file mode 100644 index 0000000..e4e01b6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/all.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/all.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAKrE;;;GAGG;yBAED,QAAQ,UAAU,CAAC,MAAM,EACzB,QAAQ,UAAU,CAAC,MAAM,KACxB,UAAU,CAAC,WAAW;AAHzB,wBAiKE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/all.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/all.js new file mode 100644 index 0000000..6708592 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/all.js @@ -0,0 +1,175 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = __importDefault(require("./base")); +const eslint_recommended_1 = __importDefault(require("./eslint-recommended")); +/** + * Enables each the rules provided as a part of typescript-eslint. Note that many rules are not applicable in all codebases, or are meant to be configured. + * @see {@link https://typescript-eslint.io/users/configs#all} + */ +exports.default = (plugin, parser) => [ + (0, base_1.default)(plugin, parser), + (0, eslint_recommended_1.default)(plugin, parser), + { + name: 'typescript-eslint/all', + rules: { + '@typescript-eslint/adjacent-overload-signatures': 'error', + '@typescript-eslint/array-type': 'error', + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/ban-ts-comment': 'error', + '@typescript-eslint/ban-tslint-comment': 'error', + '@typescript-eslint/class-literal-property-style': 'error', + 'class-methods-use-this': 'off', + '@typescript-eslint/class-methods-use-this': 'error', + '@typescript-eslint/consistent-generic-constructors': 'error', + '@typescript-eslint/consistent-indexed-object-style': 'error', + 'consistent-return': 'off', + '@typescript-eslint/consistent-return': 'error', + '@typescript-eslint/consistent-type-assertions': 'error', + '@typescript-eslint/consistent-type-definitions': 'error', + '@typescript-eslint/consistent-type-exports': 'error', + '@typescript-eslint/consistent-type-imports': 'error', + 'default-param-last': 'off', + '@typescript-eslint/default-param-last': 'error', + 'dot-notation': 'off', + '@typescript-eslint/dot-notation': 'error', + '@typescript-eslint/explicit-function-return-type': 'error', + '@typescript-eslint/explicit-member-accessibility': 'error', + '@typescript-eslint/explicit-module-boundary-types': 'error', + 'init-declarations': 'off', + '@typescript-eslint/init-declarations': 'error', + 'max-params': 'off', + '@typescript-eslint/max-params': 'error', + '@typescript-eslint/member-ordering': 'error', + '@typescript-eslint/method-signature-style': 'error', + '@typescript-eslint/naming-convention': 'error', + 'no-array-constructor': 'off', + '@typescript-eslint/no-array-constructor': 'error', + '@typescript-eslint/no-array-delete': 'error', + '@typescript-eslint/no-base-to-string': 'error', + '@typescript-eslint/no-confusing-non-null-assertion': 'error', + '@typescript-eslint/no-confusing-void-expression': 'error', + '@typescript-eslint/no-deprecated': 'error', + 'no-dupe-class-members': 'off', + '@typescript-eslint/no-dupe-class-members': 'error', + '@typescript-eslint/no-duplicate-enum-values': 'error', + '@typescript-eslint/no-duplicate-type-constituents': 'error', + '@typescript-eslint/no-dynamic-delete': 'error', + 'no-empty-function': 'off', + '@typescript-eslint/no-empty-function': 'error', + '@typescript-eslint/no-empty-object-type': 'error', + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-extra-non-null-assertion': 'error', + '@typescript-eslint/no-extraneous-class': 'error', + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-for-in-array': 'error', + 'no-implied-eval': 'off', + '@typescript-eslint/no-implied-eval': 'error', + '@typescript-eslint/no-import-type-side-effects': 'error', + '@typescript-eslint/no-inferrable-types': 'error', + 'no-invalid-this': 'off', + '@typescript-eslint/no-invalid-this': 'error', + '@typescript-eslint/no-invalid-void-type': 'error', + 'no-loop-func': 'off', + '@typescript-eslint/no-loop-func': 'error', + 'no-magic-numbers': 'off', + '@typescript-eslint/no-magic-numbers': 'error', + '@typescript-eslint/no-meaningless-void-operator': 'error', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-misused-promises': 'error', + '@typescript-eslint/no-misused-spread': 'error', + '@typescript-eslint/no-mixed-enums': 'error', + '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', + '@typescript-eslint/no-non-null-assertion': 'error', + 'no-redeclare': 'off', + '@typescript-eslint/no-redeclare': 'error', + '@typescript-eslint/no-redundant-type-constituents': 'error', + '@typescript-eslint/no-require-imports': 'error', + 'no-restricted-imports': 'off', + '@typescript-eslint/no-restricted-imports': 'error', + '@typescript-eslint/no-restricted-types': 'error', + 'no-shadow': 'off', + '@typescript-eslint/no-shadow': 'error', + '@typescript-eslint/no-this-alias': 'error', + '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error', + '@typescript-eslint/no-unnecessary-condition': 'error', + '@typescript-eslint/no-unnecessary-parameter-property-assignment': 'error', + '@typescript-eslint/no-unnecessary-qualifier': 'error', + '@typescript-eslint/no-unnecessary-template-expression': 'error', + '@typescript-eslint/no-unnecessary-type-arguments': 'error', + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-unnecessary-type-constraint': 'error', + '@typescript-eslint/no-unnecessary-type-conversion': 'error', + '@typescript-eslint/no-unnecessary-type-parameters': 'error', + '@typescript-eslint/no-unsafe-argument': 'error', + '@typescript-eslint/no-unsafe-assignment': 'error', + '@typescript-eslint/no-unsafe-call': 'error', + '@typescript-eslint/no-unsafe-declaration-merging': 'error', + '@typescript-eslint/no-unsafe-enum-comparison': 'error', + '@typescript-eslint/no-unsafe-function-type': 'error', + '@typescript-eslint/no-unsafe-member-access': 'error', + '@typescript-eslint/no-unsafe-return': 'error', + '@typescript-eslint/no-unsafe-type-assertion': 'error', + '@typescript-eslint/no-unsafe-unary-minus': 'error', + 'no-unused-expressions': 'off', + '@typescript-eslint/no-unused-expressions': 'error', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'error', + 'no-use-before-define': 'off', + '@typescript-eslint/no-use-before-define': 'error', + 'no-useless-constructor': 'off', + '@typescript-eslint/no-useless-constructor': 'error', + '@typescript-eslint/no-useless-empty-export': 'error', + '@typescript-eslint/no-wrapper-object-types': 'error', + '@typescript-eslint/non-nullable-type-assertion-style': 'error', + 'no-throw-literal': 'off', + '@typescript-eslint/only-throw-error': 'error', + '@typescript-eslint/parameter-properties': 'error', + '@typescript-eslint/prefer-as-const': 'error', + 'prefer-destructuring': 'off', + '@typescript-eslint/prefer-destructuring': 'error', + '@typescript-eslint/prefer-enum-initializers': 'error', + '@typescript-eslint/prefer-find': 'error', + '@typescript-eslint/prefer-for-of': 'error', + '@typescript-eslint/prefer-function-type': 'error', + '@typescript-eslint/prefer-includes': 'error', + '@typescript-eslint/prefer-literal-enum-member': 'error', + '@typescript-eslint/prefer-namespace-keyword': 'error', + '@typescript-eslint/prefer-nullish-coalescing': 'error', + '@typescript-eslint/prefer-optional-chain': 'error', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'error', + '@typescript-eslint/prefer-readonly': 'error', + '@typescript-eslint/prefer-readonly-parameter-types': 'error', + '@typescript-eslint/prefer-reduce-type-parameter': 'error', + '@typescript-eslint/prefer-regexp-exec': 'error', + '@typescript-eslint/prefer-return-this-type': 'error', + '@typescript-eslint/prefer-string-starts-ends-with': 'error', + '@typescript-eslint/promise-function-async': 'error', + '@typescript-eslint/related-getter-setter-pairs': 'error', + '@typescript-eslint/require-array-sort-compare': 'error', + 'require-await': 'off', + '@typescript-eslint/require-await': 'error', + '@typescript-eslint/restrict-plus-operands': 'error', + '@typescript-eslint/restrict-template-expressions': 'error', + 'no-return-await': 'off', + '@typescript-eslint/return-await': 'error', + '@typescript-eslint/strict-boolean-expressions': 'error', + '@typescript-eslint/switch-exhaustiveness-check': 'error', + '@typescript-eslint/triple-slash-reference': 'error', + '@typescript-eslint/unbound-method': 'error', + '@typescript-eslint/unified-signatures': 'error', + '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error', + }, + }, +]; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/base.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/base.d.ts new file mode 100644 index 0000000..a905d14 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/base.d.ts @@ -0,0 +1,9 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +/** + * A minimal ruleset that sets only the required parser and plugin options needed to run typescript-eslint. + * We don't recommend using this directly; instead, extend from an earlier recommended rule. + * @see {@link https://typescript-eslint.io/users/configs#base} + */ +declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.Config; +export default _default; +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/base.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/base.d.ts.map new file mode 100644 index 0000000..73cf3d1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAErE;;;;GAIG;yBAED,QAAQ,UAAU,CAAC,MAAM,EACzB,QAAQ,UAAU,CAAC,MAAM,KACxB,UAAU,CAAC,MAAM;AAHpB,wBAYG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/base.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/base.js new file mode 100644 index 0000000..504323a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/base.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * A minimal ruleset that sets only the required parser and plugin options needed to run typescript-eslint. + * We don't recommend using this directly; instead, extend from an earlier recommended rule. + * @see {@link https://typescript-eslint.io/users/configs#base} + */ +exports.default = (plugin, parser) => ({ + name: 'typescript-eslint/base', + languageOptions: { + parser, + sourceType: 'module', + }, + plugins: { + '@typescript-eslint': plugin, + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/disable-type-checked.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/disable-type-checked.d.ts new file mode 100644 index 0000000..f947a1b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/disable-type-checked.d.ts @@ -0,0 +1,8 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +/** + * A utility ruleset that will disable type-aware linting and all type-aware rules available in our project. + * @see {@link https://typescript-eslint.io/users/configs#disable-type-checked} + */ +declare const _default: (_plugin: FlatConfig.Plugin, _parser: FlatConfig.Parser) => FlatConfig.Config; +export default _default; +//# sourceMappingURL=disable-type-checked.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/disable-type-checked.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/disable-type-checked.d.ts.map new file mode 100644 index 0000000..5df9393 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/disable-type-checked.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"disable-type-checked.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/disable-type-checked.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAErE;;;GAGG;yBAED,SAAS,UAAU,CAAC,MAAM,EAC1B,SAAS,UAAU,CAAC,MAAM,KACzB,UAAU,CAAC,MAAM;AAHpB,wBAqEG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/disable-type-checked.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/disable-type-checked.js new file mode 100644 index 0000000..3d3971b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/disable-type-checked.js @@ -0,0 +1,79 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * A utility ruleset that will disable type-aware linting and all type-aware rules available in our project. + * @see {@link https://typescript-eslint.io/users/configs#disable-type-checked} + */ +exports.default = (_plugin, _parser) => ({ + name: 'typescript-eslint/disable-type-checked', + rules: { + '@typescript-eslint/await-thenable': 'off', + '@typescript-eslint/consistent-return': 'off', + '@typescript-eslint/consistent-type-exports': 'off', + '@typescript-eslint/dot-notation': 'off', + '@typescript-eslint/naming-convention': 'off', + '@typescript-eslint/no-array-delete': 'off', + '@typescript-eslint/no-base-to-string': 'off', + '@typescript-eslint/no-confusing-void-expression': 'off', + '@typescript-eslint/no-deprecated': 'off', + '@typescript-eslint/no-duplicate-type-constituents': 'off', + '@typescript-eslint/no-floating-promises': 'off', + '@typescript-eslint/no-for-in-array': 'off', + '@typescript-eslint/no-implied-eval': 'off', + '@typescript-eslint/no-meaningless-void-operator': 'off', + '@typescript-eslint/no-misused-promises': 'off', + '@typescript-eslint/no-misused-spread': 'off', + '@typescript-eslint/no-mixed-enums': 'off', + '@typescript-eslint/no-redundant-type-constituents': 'off', + '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off', + '@typescript-eslint/no-unnecessary-condition': 'off', + '@typescript-eslint/no-unnecessary-qualifier': 'off', + '@typescript-eslint/no-unnecessary-template-expression': 'off', + '@typescript-eslint/no-unnecessary-type-arguments': 'off', + '@typescript-eslint/no-unnecessary-type-assertion': 'off', + '@typescript-eslint/no-unnecessary-type-conversion': 'off', + '@typescript-eslint/no-unnecessary-type-parameters': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-enum-comparison': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-unsafe-type-assertion': 'off', + '@typescript-eslint/no-unsafe-unary-minus': 'off', + '@typescript-eslint/non-nullable-type-assertion-style': 'off', + '@typescript-eslint/only-throw-error': 'off', + '@typescript-eslint/prefer-destructuring': 'off', + '@typescript-eslint/prefer-find': 'off', + '@typescript-eslint/prefer-includes': 'off', + '@typescript-eslint/prefer-nullish-coalescing': 'off', + '@typescript-eslint/prefer-optional-chain': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-readonly': 'off', + '@typescript-eslint/prefer-readonly-parameter-types': 'off', + '@typescript-eslint/prefer-reduce-type-parameter': 'off', + '@typescript-eslint/prefer-regexp-exec': 'off', + '@typescript-eslint/prefer-return-this-type': 'off', + '@typescript-eslint/prefer-string-starts-ends-with': 'off', + '@typescript-eslint/promise-function-async': 'off', + '@typescript-eslint/related-getter-setter-pairs': 'off', + '@typescript-eslint/require-array-sort-compare': 'off', + '@typescript-eslint/require-await': 'off', + '@typescript-eslint/restrict-plus-operands': 'off', + '@typescript-eslint/restrict-template-expressions': 'off', + '@typescript-eslint/return-await': 'off', + '@typescript-eslint/strict-boolean-expressions': 'off', + '@typescript-eslint/switch-exhaustiveness-check': 'off', + '@typescript-eslint/unbound-method': 'off', + '@typescript-eslint/use-unknown-in-catch-callback-variable': 'off', + }, + languageOptions: { + parserOptions: { program: null, project: false, projectService: false }, + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/eslint-recommended.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/eslint-recommended.d.ts new file mode 100644 index 0000000..dfe6612 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/eslint-recommended.d.ts @@ -0,0 +1,10 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +/** + * This is a compatibility ruleset that: + * - disables rules from eslint:recommended which are already handled by TypeScript. + * - enables rules that make sense due to TS's typechecking / transpilation. + * @see {@link https://typescript-eslint.io/users/configs/#eslint-recommended} + */ +declare const _default: (_plugin: FlatConfig.Plugin, _parser: FlatConfig.Parser) => FlatConfig.Config; +export default _default; +//# sourceMappingURL=eslint-recommended.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/eslint-recommended.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/eslint-recommended.d.ts.map new file mode 100644 index 0000000..1e6fc59 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/eslint-recommended.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"eslint-recommended.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/eslint-recommended.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAIrE;;;;;GAKG;yBAED,SAAS,UAAU,CAAC,MAAM,EAC1B,SAAS,UAAU,CAAC,MAAM,KACzB,UAAU,CAAC,MAAM;AAHpB,wBAMG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/eslint-recommended.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/eslint-recommended.js new file mode 100644 index 0000000..fdeddd2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/eslint-recommended.js @@ -0,0 +1,16 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const eslint_recommended_raw_1 = __importDefault(require("../eslint-recommended-raw")); +/** + * This is a compatibility ruleset that: + * - disables rules from eslint:recommended which are already handled by TypeScript. + * - enables rules that make sense due to TS's typechecking / transpilation. + * @see {@link https://typescript-eslint.io/users/configs/#eslint-recommended} + */ +exports.default = (_plugin, _parser) => ({ + ...(0, eslint_recommended_raw_1.default)('minimatch'), + name: 'typescript-eslint/eslint-recommended', +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked-only.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked-only.d.ts new file mode 100644 index 0000000..db16c0e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked-only.d.ts @@ -0,0 +1,8 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +/** + * A version of `recommended` that only contains type-checked rules and disables of any corresponding core ESLint rules. + * @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked-only} + */ +declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray; +export default _default; +//# sourceMappingURL=recommended-type-checked-only.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked-only.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked-only.d.ts.map new file mode 100644 index 0000000..1c59bfa --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked-only.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"recommended-type-checked-only.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/recommended-type-checked-only.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAKrE;;;GAGG;yBAED,QAAQ,UAAU,CAAC,MAAM,EACzB,QAAQ,UAAU,CAAC,MAAM,KACxB,UAAU,CAAC,WAAW;AAHzB,wBAsCE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked-only.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked-only.js new file mode 100644 index 0000000..be25b31 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked-only.js @@ -0,0 +1,53 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = __importDefault(require("./base")); +const eslint_recommended_1 = __importDefault(require("./eslint-recommended")); +/** + * A version of `recommended` that only contains type-checked rules and disables of any corresponding core ESLint rules. + * @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked-only} + */ +exports.default = (plugin, parser) => [ + (0, base_1.default)(plugin, parser), + (0, eslint_recommended_1.default)(plugin, parser), + { + name: 'typescript-eslint/recommended-type-checked-only', + rules: { + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/no-array-delete': 'error', + '@typescript-eslint/no-base-to-string': 'error', + '@typescript-eslint/no-duplicate-type-constituents': 'error', + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-for-in-array': 'error', + 'no-implied-eval': 'off', + '@typescript-eslint/no-implied-eval': 'error', + '@typescript-eslint/no-misused-promises': 'error', + '@typescript-eslint/no-redundant-type-constituents': 'error', + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-unsafe-argument': 'error', + '@typescript-eslint/no-unsafe-assignment': 'error', + '@typescript-eslint/no-unsafe-call': 'error', + '@typescript-eslint/no-unsafe-enum-comparison': 'error', + '@typescript-eslint/no-unsafe-member-access': 'error', + '@typescript-eslint/no-unsafe-return': 'error', + '@typescript-eslint/no-unsafe-unary-minus': 'error', + 'no-throw-literal': 'off', + '@typescript-eslint/only-throw-error': 'error', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'error', + 'require-await': 'off', + '@typescript-eslint/require-await': 'error', + '@typescript-eslint/restrict-plus-operands': 'error', + '@typescript-eslint/restrict-template-expressions': 'error', + '@typescript-eslint/unbound-method': 'error', + }, + }, +]; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked.d.ts new file mode 100644 index 0000000..9f6cb66 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked.d.ts @@ -0,0 +1,8 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +/** + * Contains all of `recommended` along with additional recommended rules that require type information. + * @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked} + */ +declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray; +export default _default; +//# sourceMappingURL=recommended-type-checked.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked.d.ts.map new file mode 100644 index 0000000..41f5ff7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"recommended-type-checked.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/recommended-type-checked.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAKrE;;;GAGG;yBAED,QAAQ,UAAU,CAAC,MAAM,EACzB,QAAQ,UAAU,CAAC,MAAM,KACxB,UAAU,CAAC,WAAW;AAHzB,wBA6DE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked.js new file mode 100644 index 0000000..0c48d48 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked.js @@ -0,0 +1,76 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = __importDefault(require("./base")); +const eslint_recommended_1 = __importDefault(require("./eslint-recommended")); +/** + * Contains all of `recommended` along with additional recommended rules that require type information. + * @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked} + */ +exports.default = (plugin, parser) => [ + (0, base_1.default)(plugin, parser), + (0, eslint_recommended_1.default)(plugin, parser), + { + name: 'typescript-eslint/recommended-type-checked', + rules: { + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/ban-ts-comment': 'error', + 'no-array-constructor': 'off', + '@typescript-eslint/no-array-constructor': 'error', + '@typescript-eslint/no-array-delete': 'error', + '@typescript-eslint/no-base-to-string': 'error', + '@typescript-eslint/no-duplicate-enum-values': 'error', + '@typescript-eslint/no-duplicate-type-constituents': 'error', + '@typescript-eslint/no-empty-object-type': 'error', + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-extra-non-null-assertion': 'error', + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-for-in-array': 'error', + 'no-implied-eval': 'off', + '@typescript-eslint/no-implied-eval': 'error', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-misused-promises': 'error', + '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', + '@typescript-eslint/no-redundant-type-constituents': 'error', + '@typescript-eslint/no-require-imports': 'error', + '@typescript-eslint/no-this-alias': 'error', + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-unnecessary-type-constraint': 'error', + '@typescript-eslint/no-unsafe-argument': 'error', + '@typescript-eslint/no-unsafe-assignment': 'error', + '@typescript-eslint/no-unsafe-call': 'error', + '@typescript-eslint/no-unsafe-declaration-merging': 'error', + '@typescript-eslint/no-unsafe-enum-comparison': 'error', + '@typescript-eslint/no-unsafe-function-type': 'error', + '@typescript-eslint/no-unsafe-member-access': 'error', + '@typescript-eslint/no-unsafe-return': 'error', + '@typescript-eslint/no-unsafe-unary-minus': 'error', + 'no-unused-expressions': 'off', + '@typescript-eslint/no-unused-expressions': 'error', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'error', + '@typescript-eslint/no-wrapper-object-types': 'error', + 'no-throw-literal': 'off', + '@typescript-eslint/only-throw-error': 'error', + '@typescript-eslint/prefer-as-const': 'error', + '@typescript-eslint/prefer-namespace-keyword': 'error', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'error', + 'require-await': 'off', + '@typescript-eslint/require-await': 'error', + '@typescript-eslint/restrict-plus-operands': 'error', + '@typescript-eslint/restrict-template-expressions': 'error', + '@typescript-eslint/triple-slash-reference': 'error', + '@typescript-eslint/unbound-method': 'error', + }, + }, +]; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended.d.ts new file mode 100644 index 0000000..d6db872 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended.d.ts @@ -0,0 +1,8 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +/** + * Recommended rules for code correctness that you can drop in without additional configuration. + * @see {@link https://typescript-eslint.io/users/configs#recommended} + */ +declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray; +export default _default; +//# sourceMappingURL=recommended.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended.d.ts.map new file mode 100644 index 0000000..1810855 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"recommended.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/recommended.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAKrE;;;GAGG;yBAED,QAAQ,UAAU,CAAC,MAAM,EACzB,QAAQ,UAAU,CAAC,MAAM,KACxB,UAAU,CAAC,WAAW;AAHzB,wBAkCE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended.js new file mode 100644 index 0000000..97c23a8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended.js @@ -0,0 +1,49 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = __importDefault(require("./base")); +const eslint_recommended_1 = __importDefault(require("./eslint-recommended")); +/** + * Recommended rules for code correctness that you can drop in without additional configuration. + * @see {@link https://typescript-eslint.io/users/configs#recommended} + */ +exports.default = (plugin, parser) => [ + (0, base_1.default)(plugin, parser), + (0, eslint_recommended_1.default)(plugin, parser), + { + name: 'typescript-eslint/recommended', + rules: { + '@typescript-eslint/ban-ts-comment': 'error', + 'no-array-constructor': 'off', + '@typescript-eslint/no-array-constructor': 'error', + '@typescript-eslint/no-duplicate-enum-values': 'error', + '@typescript-eslint/no-empty-object-type': 'error', + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-extra-non-null-assertion': 'error', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', + '@typescript-eslint/no-require-imports': 'error', + '@typescript-eslint/no-this-alias': 'error', + '@typescript-eslint/no-unnecessary-type-constraint': 'error', + '@typescript-eslint/no-unsafe-declaration-merging': 'error', + '@typescript-eslint/no-unsafe-function-type': 'error', + 'no-unused-expressions': 'off', + '@typescript-eslint/no-unused-expressions': 'error', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'error', + '@typescript-eslint/no-wrapper-object-types': 'error', + '@typescript-eslint/prefer-as-const': 'error', + '@typescript-eslint/prefer-namespace-keyword': 'error', + '@typescript-eslint/triple-slash-reference': 'error', + }, + }, +]; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked-only.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked-only.d.ts new file mode 100644 index 0000000..3b53690 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked-only.d.ts @@ -0,0 +1,8 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +/** + * A version of `strict` that only contains type-checked rules and disables of any corresponding core ESLint rules. + * @see {@link https://typescript-eslint.io/users/configs#strict-type-checked-only} + */ +declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray; +export default _default; +//# sourceMappingURL=strict-type-checked-only.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked-only.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked-only.d.ts.map new file mode 100644 index 0000000..e48720b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked-only.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strict-type-checked-only.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/strict-type-checked-only.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAKrE;;;GAGG;yBAED,QAAQ,UAAU,CAAC,MAAM,EACzB,QAAQ,UAAU,CAAC,MAAM,KACxB,UAAU,CAAC,WAAW;AAHzB,wBA6EE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked-only.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked-only.js new file mode 100644 index 0000000..4078b9f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked-only.js @@ -0,0 +1,92 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = __importDefault(require("./base")); +const eslint_recommended_1 = __importDefault(require("./eslint-recommended")); +/** + * A version of `strict` that only contains type-checked rules and disables of any corresponding core ESLint rules. + * @see {@link https://typescript-eslint.io/users/configs#strict-type-checked-only} + */ +exports.default = (plugin, parser) => [ + (0, base_1.default)(plugin, parser), + (0, eslint_recommended_1.default)(plugin, parser), + { + name: 'typescript-eslint/strict-type-checked-only', + rules: { + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/no-array-delete': 'error', + '@typescript-eslint/no-base-to-string': 'error', + '@typescript-eslint/no-confusing-void-expression': 'error', + '@typescript-eslint/no-deprecated': 'error', + '@typescript-eslint/no-duplicate-type-constituents': 'error', + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-for-in-array': 'error', + 'no-implied-eval': 'off', + '@typescript-eslint/no-implied-eval': 'error', + '@typescript-eslint/no-meaningless-void-operator': 'error', + '@typescript-eslint/no-misused-promises': 'error', + '@typescript-eslint/no-misused-spread': 'error', + '@typescript-eslint/no-mixed-enums': 'error', + '@typescript-eslint/no-redundant-type-constituents': 'error', + '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error', + '@typescript-eslint/no-unnecessary-condition': 'error', + '@typescript-eslint/no-unnecessary-template-expression': 'error', + '@typescript-eslint/no-unnecessary-type-arguments': 'error', + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-unnecessary-type-conversion': 'error', + '@typescript-eslint/no-unnecessary-type-parameters': 'error', + '@typescript-eslint/no-unsafe-argument': 'error', + '@typescript-eslint/no-unsafe-assignment': 'error', + '@typescript-eslint/no-unsafe-call': 'error', + '@typescript-eslint/no-unsafe-enum-comparison': 'error', + '@typescript-eslint/no-unsafe-member-access': 'error', + '@typescript-eslint/no-unsafe-return': 'error', + '@typescript-eslint/no-unsafe-unary-minus': 'error', + 'no-throw-literal': 'off', + '@typescript-eslint/only-throw-error': 'error', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'error', + '@typescript-eslint/prefer-reduce-type-parameter': 'error', + '@typescript-eslint/prefer-return-this-type': 'error', + '@typescript-eslint/related-getter-setter-pairs': 'error', + 'require-await': 'off', + '@typescript-eslint/require-await': 'error', + '@typescript-eslint/restrict-plus-operands': [ + 'error', + { + allowAny: false, + allowBoolean: false, + allowNullish: false, + allowNumberAndString: false, + allowRegExp: false, + }, + ], + '@typescript-eslint/restrict-template-expressions': [ + 'error', + { + allowAny: false, + allowBoolean: false, + allowNever: false, + allowNullish: false, + allowNumber: false, + allowRegExp: false, + }, + ], + 'no-return-await': 'off', + '@typescript-eslint/return-await': [ + 'error', + 'error-handling-correctness-only', + ], + '@typescript-eslint/unbound-method': 'error', + '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error', + }, + }, +]; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked.d.ts new file mode 100644 index 0000000..9805025 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked.d.ts @@ -0,0 +1,8 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +/** + * Contains all of `recommended`, `recommended-type-checked`, and `strict`, along with additional strict rules that require type information. + * @see {@link https://typescript-eslint.io/users/configs#strict-type-checked} + */ +declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray; +export default _default; +//# sourceMappingURL=strict-type-checked.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked.d.ts.map new file mode 100644 index 0000000..53b79d2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strict-type-checked.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/strict-type-checked.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAKrE;;;GAGG;yBAED,QAAQ,UAAU,CAAC,MAAM,EACzB,QAAQ,UAAU,CAAC,MAAM,KACxB,UAAU,CAAC,WAAW;AAHzB,wBAgHE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked.js new file mode 100644 index 0000000..1bf5de5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked.js @@ -0,0 +1,127 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = __importDefault(require("./base")); +const eslint_recommended_1 = __importDefault(require("./eslint-recommended")); +/** + * Contains all of `recommended`, `recommended-type-checked`, and `strict`, along with additional strict rules that require type information. + * @see {@link https://typescript-eslint.io/users/configs#strict-type-checked} + */ +exports.default = (plugin, parser) => [ + (0, base_1.default)(plugin, parser), + (0, eslint_recommended_1.default)(plugin, parser), + { + name: 'typescript-eslint/strict-type-checked', + rules: { + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/ban-ts-comment': [ + 'error', + { minimumDescriptionLength: 10 }, + ], + 'no-array-constructor': 'off', + '@typescript-eslint/no-array-constructor': 'error', + '@typescript-eslint/no-array-delete': 'error', + '@typescript-eslint/no-base-to-string': 'error', + '@typescript-eslint/no-confusing-void-expression': 'error', + '@typescript-eslint/no-deprecated': 'error', + '@typescript-eslint/no-duplicate-enum-values': 'error', + '@typescript-eslint/no-duplicate-type-constituents': 'error', + '@typescript-eslint/no-dynamic-delete': 'error', + '@typescript-eslint/no-empty-object-type': 'error', + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-extra-non-null-assertion': 'error', + '@typescript-eslint/no-extraneous-class': 'error', + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-for-in-array': 'error', + 'no-implied-eval': 'off', + '@typescript-eslint/no-implied-eval': 'error', + '@typescript-eslint/no-invalid-void-type': 'error', + '@typescript-eslint/no-meaningless-void-operator': 'error', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-misused-promises': 'error', + '@typescript-eslint/no-misused-spread': 'error', + '@typescript-eslint/no-mixed-enums': 'error', + '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', + '@typescript-eslint/no-non-null-assertion': 'error', + '@typescript-eslint/no-redundant-type-constituents': 'error', + '@typescript-eslint/no-require-imports': 'error', + '@typescript-eslint/no-this-alias': 'error', + '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error', + '@typescript-eslint/no-unnecessary-condition': 'error', + '@typescript-eslint/no-unnecessary-template-expression': 'error', + '@typescript-eslint/no-unnecessary-type-arguments': 'error', + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-unnecessary-type-constraint': 'error', + '@typescript-eslint/no-unnecessary-type-conversion': 'error', + '@typescript-eslint/no-unnecessary-type-parameters': 'error', + '@typescript-eslint/no-unsafe-argument': 'error', + '@typescript-eslint/no-unsafe-assignment': 'error', + '@typescript-eslint/no-unsafe-call': 'error', + '@typescript-eslint/no-unsafe-declaration-merging': 'error', + '@typescript-eslint/no-unsafe-enum-comparison': 'error', + '@typescript-eslint/no-unsafe-function-type': 'error', + '@typescript-eslint/no-unsafe-member-access': 'error', + '@typescript-eslint/no-unsafe-return': 'error', + '@typescript-eslint/no-unsafe-unary-minus': 'error', + 'no-unused-expressions': 'off', + '@typescript-eslint/no-unused-expressions': 'error', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'error', + 'no-useless-constructor': 'off', + '@typescript-eslint/no-useless-constructor': 'error', + '@typescript-eslint/no-wrapper-object-types': 'error', + 'no-throw-literal': 'off', + '@typescript-eslint/only-throw-error': 'error', + '@typescript-eslint/prefer-as-const': 'error', + '@typescript-eslint/prefer-literal-enum-member': 'error', + '@typescript-eslint/prefer-namespace-keyword': 'error', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'error', + '@typescript-eslint/prefer-reduce-type-parameter': 'error', + '@typescript-eslint/prefer-return-this-type': 'error', + '@typescript-eslint/related-getter-setter-pairs': 'error', + 'require-await': 'off', + '@typescript-eslint/require-await': 'error', + '@typescript-eslint/restrict-plus-operands': [ + 'error', + { + allowAny: false, + allowBoolean: false, + allowNullish: false, + allowNumberAndString: false, + allowRegExp: false, + }, + ], + '@typescript-eslint/restrict-template-expressions': [ + 'error', + { + allowAny: false, + allowBoolean: false, + allowNever: false, + allowNullish: false, + allowNumber: false, + allowRegExp: false, + }, + ], + 'no-return-await': 'off', + '@typescript-eslint/return-await': [ + 'error', + 'error-handling-correctness-only', + ], + '@typescript-eslint/triple-slash-reference': 'error', + '@typescript-eslint/unbound-method': 'error', + '@typescript-eslint/unified-signatures': 'error', + '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error', + }, + }, +]; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict.d.ts new file mode 100644 index 0000000..9ec2d9b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict.d.ts @@ -0,0 +1,8 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +/** + * Contains all of `recommended`, as well as additional strict rules that can also catch bugs. + * @see {@link https://typescript-eslint.io/users/configs#strict} + */ +declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray; +export default _default; +//# sourceMappingURL=strict.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict.d.ts.map new file mode 100644 index 0000000..fe1911a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strict.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/strict.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAKrE;;;GAGG;yBAED,QAAQ,UAAU,CAAC,MAAM,EACzB,QAAQ,UAAU,CAAC,MAAM,KACxB,UAAU,CAAC,WAAW;AAHzB,wBA8CE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict.js new file mode 100644 index 0000000..635a7cf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict.js @@ -0,0 +1,61 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = __importDefault(require("./base")); +const eslint_recommended_1 = __importDefault(require("./eslint-recommended")); +/** + * Contains all of `recommended`, as well as additional strict rules that can also catch bugs. + * @see {@link https://typescript-eslint.io/users/configs#strict} + */ +exports.default = (plugin, parser) => [ + (0, base_1.default)(plugin, parser), + (0, eslint_recommended_1.default)(plugin, parser), + { + name: 'typescript-eslint/strict', + rules: { + '@typescript-eslint/ban-ts-comment': [ + 'error', + { minimumDescriptionLength: 10 }, + ], + 'no-array-constructor': 'off', + '@typescript-eslint/no-array-constructor': 'error', + '@typescript-eslint/no-duplicate-enum-values': 'error', + '@typescript-eslint/no-dynamic-delete': 'error', + '@typescript-eslint/no-empty-object-type': 'error', + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-extra-non-null-assertion': 'error', + '@typescript-eslint/no-extraneous-class': 'error', + '@typescript-eslint/no-invalid-void-type': 'error', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', + '@typescript-eslint/no-non-null-assertion': 'error', + '@typescript-eslint/no-require-imports': 'error', + '@typescript-eslint/no-this-alias': 'error', + '@typescript-eslint/no-unnecessary-type-constraint': 'error', + '@typescript-eslint/no-unsafe-declaration-merging': 'error', + '@typescript-eslint/no-unsafe-function-type': 'error', + 'no-unused-expressions': 'off', + '@typescript-eslint/no-unused-expressions': 'error', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'error', + 'no-useless-constructor': 'off', + '@typescript-eslint/no-useless-constructor': 'error', + '@typescript-eslint/no-wrapper-object-types': 'error', + '@typescript-eslint/prefer-as-const': 'error', + '@typescript-eslint/prefer-literal-enum-member': 'error', + '@typescript-eslint/prefer-namespace-keyword': 'error', + '@typescript-eslint/triple-slash-reference': 'error', + '@typescript-eslint/unified-signatures': 'error', + }, + }, +]; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked-only.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked-only.d.ts new file mode 100644 index 0000000..8a0f2b6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked-only.d.ts @@ -0,0 +1,8 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +/** + * A version of `stylistic` that only contains type-checked rules and disables of any corresponding core ESLint rules. + * @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked-only} + */ +declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray; +export default _default; +//# sourceMappingURL=stylistic-type-checked-only.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked-only.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked-only.d.ts.map new file mode 100644 index 0000000..a317a84 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked-only.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stylistic-type-checked-only.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/stylistic-type-checked-only.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAKrE;;;GAGG;yBAED,QAAQ,UAAU,CAAC,MAAM,EACzB,QAAQ,UAAU,CAAC,MAAM,KACxB,UAAU,CAAC,WAAW;AAHzB,wBAoBE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked-only.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked-only.js new file mode 100644 index 0000000..73a4d8a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked-only.js @@ -0,0 +1,35 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = __importDefault(require("./base")); +const eslint_recommended_1 = __importDefault(require("./eslint-recommended")); +/** + * A version of `stylistic` that only contains type-checked rules and disables of any corresponding core ESLint rules. + * @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked-only} + */ +exports.default = (plugin, parser) => [ + (0, base_1.default)(plugin, parser), + (0, eslint_recommended_1.default)(plugin, parser), + { + name: 'typescript-eslint/stylistic-type-checked-only', + rules: { + 'dot-notation': 'off', + '@typescript-eslint/dot-notation': 'error', + '@typescript-eslint/non-nullable-type-assertion-style': 'error', + '@typescript-eslint/prefer-find': 'error', + '@typescript-eslint/prefer-includes': 'error', + '@typescript-eslint/prefer-nullish-coalescing': 'error', + '@typescript-eslint/prefer-optional-chain': 'error', + '@typescript-eslint/prefer-regexp-exec': 'error', + '@typescript-eslint/prefer-string-starts-ends-with': 'error', + }, + }, +]; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked.d.ts new file mode 100644 index 0000000..0764d04 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked.d.ts @@ -0,0 +1,8 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +/** + * Contains all of `stylistic`, along with additional stylistic rules that require type information. + * @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked} + */ +declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray; +export default _default; +//# sourceMappingURL=stylistic-type-checked.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked.d.ts.map new file mode 100644 index 0000000..18bf93c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stylistic-type-checked.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/stylistic-type-checked.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAKrE;;;GAGG;yBAED,QAAQ,UAAU,CAAC,MAAM,EACzB,QAAQ,UAAU,CAAC,MAAM,KACxB,UAAU,CAAC,WAAW;AAHzB,wBAkCE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked.js new file mode 100644 index 0000000..05efefa --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked.js @@ -0,0 +1,49 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = __importDefault(require("./base")); +const eslint_recommended_1 = __importDefault(require("./eslint-recommended")); +/** + * Contains all of `stylistic`, along with additional stylistic rules that require type information. + * @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked} + */ +exports.default = (plugin, parser) => [ + (0, base_1.default)(plugin, parser), + (0, eslint_recommended_1.default)(plugin, parser), + { + name: 'typescript-eslint/stylistic-type-checked', + rules: { + '@typescript-eslint/adjacent-overload-signatures': 'error', + '@typescript-eslint/array-type': 'error', + '@typescript-eslint/ban-tslint-comment': 'error', + '@typescript-eslint/class-literal-property-style': 'error', + '@typescript-eslint/consistent-generic-constructors': 'error', + '@typescript-eslint/consistent-indexed-object-style': 'error', + '@typescript-eslint/consistent-type-assertions': 'error', + '@typescript-eslint/consistent-type-definitions': 'error', + 'dot-notation': 'off', + '@typescript-eslint/dot-notation': 'error', + '@typescript-eslint/no-confusing-non-null-assertion': 'error', + 'no-empty-function': 'off', + '@typescript-eslint/no-empty-function': 'error', + '@typescript-eslint/no-inferrable-types': 'error', + '@typescript-eslint/non-nullable-type-assertion-style': 'error', + '@typescript-eslint/prefer-find': 'error', + '@typescript-eslint/prefer-for-of': 'error', + '@typescript-eslint/prefer-function-type': 'error', + '@typescript-eslint/prefer-includes': 'error', + '@typescript-eslint/prefer-nullish-coalescing': 'error', + '@typescript-eslint/prefer-optional-chain': 'error', + '@typescript-eslint/prefer-regexp-exec': 'error', + '@typescript-eslint/prefer-string-starts-ends-with': 'error', + }, + }, +]; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic.d.ts new file mode 100644 index 0000000..0eda7bd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic.d.ts @@ -0,0 +1,8 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +/** + * Rules considered to be best practice for modern TypeScript codebases, but that do not impact program logic. + * @see {@link https://typescript-eslint.io/users/configs#stylistic} + */ +declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray; +export default _default; +//# sourceMappingURL=stylistic.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic.d.ts.map new file mode 100644 index 0000000..5a0d266 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stylistic.d.ts","sourceRoot":"","sources":["../../../src/configs/flat/stylistic.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAKrE;;;GAGG;yBAED,QAAQ,UAAU,CAAC,MAAM,EACzB,QAAQ,UAAU,CAAC,MAAM,KACxB,UAAU,CAAC,WAAW;AAHzB,wBAyBE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic.js new file mode 100644 index 0000000..9e63815 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic.js @@ -0,0 +1,40 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// SEE https://typescript-eslint.io/users/configs +// +// For developers working in the typescript-eslint monorepo: +// You can regenerate it using `yarn generate-configs` +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = __importDefault(require("./base")); +const eslint_recommended_1 = __importDefault(require("./eslint-recommended")); +/** + * Rules considered to be best practice for modern TypeScript codebases, but that do not impact program logic. + * @see {@link https://typescript-eslint.io/users/configs#stylistic} + */ +exports.default = (plugin, parser) => [ + (0, base_1.default)(plugin, parser), + (0, eslint_recommended_1.default)(plugin, parser), + { + name: 'typescript-eslint/stylistic', + rules: { + '@typescript-eslint/adjacent-overload-signatures': 'error', + '@typescript-eslint/array-type': 'error', + '@typescript-eslint/ban-tslint-comment': 'error', + '@typescript-eslint/class-literal-property-style': 'error', + '@typescript-eslint/consistent-generic-constructors': 'error', + '@typescript-eslint/consistent-indexed-object-style': 'error', + '@typescript-eslint/consistent-type-assertions': 'error', + '@typescript-eslint/consistent-type-definitions': 'error', + '@typescript-eslint/no-confusing-non-null-assertion': 'error', + 'no-empty-function': 'off', + '@typescript-eslint/no-empty-function': 'error', + '@typescript-eslint/no-inferrable-types': 'error', + '@typescript-eslint/prefer-for-of': 'error', + '@typescript-eslint/prefer-function-type': 'error', + }, + }, +]; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/index.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/index.d.ts new file mode 100644 index 0000000..cf8f2f0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/index.d.ts @@ -0,0 +1,845 @@ +declare const _default: { + configs: { + all: { + extends: string[]; + rules: { + '@typescript-eslint/adjacent-overload-signatures': "error"; + '@typescript-eslint/array-type': "error"; + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/ban-ts-comment': "error"; + '@typescript-eslint/ban-tslint-comment': "error"; + '@typescript-eslint/class-literal-property-style': "error"; + 'class-methods-use-this': "off"; + '@typescript-eslint/class-methods-use-this': "error"; + '@typescript-eslint/consistent-generic-constructors': "error"; + '@typescript-eslint/consistent-indexed-object-style': "error"; + 'consistent-return': "off"; + '@typescript-eslint/consistent-return': "error"; + '@typescript-eslint/consistent-type-assertions': "error"; + '@typescript-eslint/consistent-type-definitions': "error"; + '@typescript-eslint/consistent-type-exports': "error"; + '@typescript-eslint/consistent-type-imports': "error"; + 'default-param-last': "off"; + '@typescript-eslint/default-param-last': "error"; + 'dot-notation': "off"; + '@typescript-eslint/dot-notation': "error"; + '@typescript-eslint/explicit-function-return-type': "error"; + '@typescript-eslint/explicit-member-accessibility': "error"; + '@typescript-eslint/explicit-module-boundary-types': "error"; + 'init-declarations': "off"; + '@typescript-eslint/init-declarations': "error"; + 'max-params': "off"; + '@typescript-eslint/max-params': "error"; + '@typescript-eslint/member-ordering': "error"; + '@typescript-eslint/method-signature-style': "error"; + '@typescript-eslint/naming-convention': "error"; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-confusing-non-null-assertion': "error"; + '@typescript-eslint/no-confusing-void-expression': "error"; + '@typescript-eslint/no-deprecated': "error"; + 'no-dupe-class-members': "off"; + '@typescript-eslint/no-dupe-class-members': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-dynamic-delete': "error"; + 'no-empty-function': "off"; + '@typescript-eslint/no-empty-function': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-extraneous-class': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-import-type-side-effects': "error"; + '@typescript-eslint/no-inferrable-types': "error"; + 'no-invalid-this': "off"; + '@typescript-eslint/no-invalid-this': "error"; + '@typescript-eslint/no-invalid-void-type': "error"; + 'no-loop-func': "off"; + '@typescript-eslint/no-loop-func': "error"; + 'no-magic-numbers': "off"; + '@typescript-eslint/no-magic-numbers': "error"; + '@typescript-eslint/no-meaningless-void-operator': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-misused-spread': "error"; + '@typescript-eslint/no-mixed-enums': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-non-null-assertion': "error"; + 'no-redeclare': "off"; + '@typescript-eslint/no-redeclare': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-require-imports': "error"; + 'no-restricted-imports': "off"; + '@typescript-eslint/no-restricted-imports': "error"; + '@typescript-eslint/no-restricted-types': "error"; + 'no-shadow': "off"; + '@typescript-eslint/no-shadow': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-boolean-literal-compare': "error"; + '@typescript-eslint/no-unnecessary-condition': "error"; + '@typescript-eslint/no-unnecessary-parameter-property-assignment': "error"; + '@typescript-eslint/no-unnecessary-qualifier': "error"; + '@typescript-eslint/no-unnecessary-template-expression': "error"; + '@typescript-eslint/no-unnecessary-type-arguments': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unnecessary-type-conversion': "error"; + '@typescript-eslint/no-unnecessary-type-parameters': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-type-assertion': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + 'no-use-before-define': "off"; + '@typescript-eslint/no-use-before-define': "error"; + 'no-useless-constructor': "off"; + '@typescript-eslint/no-useless-constructor': "error"; + '@typescript-eslint/no-useless-empty-export': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + '@typescript-eslint/non-nullable-type-assertion-style': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + '@typescript-eslint/parameter-properties': "error"; + '@typescript-eslint/prefer-as-const': "error"; + 'prefer-destructuring': "off"; + '@typescript-eslint/prefer-destructuring': "error"; + '@typescript-eslint/prefer-enum-initializers': "error"; + '@typescript-eslint/prefer-find': "error"; + '@typescript-eslint/prefer-for-of': "error"; + '@typescript-eslint/prefer-function-type': "error"; + '@typescript-eslint/prefer-includes': "error"; + '@typescript-eslint/prefer-literal-enum-member': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + '@typescript-eslint/prefer-nullish-coalescing': "error"; + '@typescript-eslint/prefer-optional-chain': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + '@typescript-eslint/prefer-readonly': "error"; + '@typescript-eslint/prefer-readonly-parameter-types': "error"; + '@typescript-eslint/prefer-reduce-type-parameter': "error"; + '@typescript-eslint/prefer-regexp-exec': "error"; + '@typescript-eslint/prefer-return-this-type': "error"; + '@typescript-eslint/prefer-string-starts-ends-with': "error"; + '@typescript-eslint/promise-function-async': "error"; + '@typescript-eslint/related-getter-setter-pairs': "error"; + '@typescript-eslint/require-array-sort-compare': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': "error"; + '@typescript-eslint/restrict-template-expressions': "error"; + 'no-return-await': "off"; + '@typescript-eslint/return-await': "error"; + '@typescript-eslint/strict-boolean-expressions': "error"; + '@typescript-eslint/switch-exhaustiveness-check': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unbound-method': "error"; + '@typescript-eslint/unified-signatures': "error"; + '@typescript-eslint/use-unknown-in-catch-callback-variable': "error"; + }; + }; + base: { + parser: string; + parserOptions: { + sourceType: "module"; + }; + plugins: string[]; + }; + 'disable-type-checked': { + parserOptions: { + program: null; + project: false; + projectService: false; + }; + rules: { + '@typescript-eslint/await-thenable': "off"; + '@typescript-eslint/consistent-return': "off"; + '@typescript-eslint/consistent-type-exports': "off"; + '@typescript-eslint/dot-notation': "off"; + '@typescript-eslint/naming-convention': "off"; + '@typescript-eslint/no-array-delete': "off"; + '@typescript-eslint/no-base-to-string': "off"; + '@typescript-eslint/no-confusing-void-expression': "off"; + '@typescript-eslint/no-deprecated': "off"; + '@typescript-eslint/no-duplicate-type-constituents': "off"; + '@typescript-eslint/no-floating-promises': "off"; + '@typescript-eslint/no-for-in-array': "off"; + '@typescript-eslint/no-implied-eval': "off"; + '@typescript-eslint/no-meaningless-void-operator': "off"; + '@typescript-eslint/no-misused-promises': "off"; + '@typescript-eslint/no-misused-spread': "off"; + '@typescript-eslint/no-mixed-enums': "off"; + '@typescript-eslint/no-redundant-type-constituents': "off"; + '@typescript-eslint/no-unnecessary-boolean-literal-compare': "off"; + '@typescript-eslint/no-unnecessary-condition': "off"; + '@typescript-eslint/no-unnecessary-qualifier': "off"; + '@typescript-eslint/no-unnecessary-template-expression': "off"; + '@typescript-eslint/no-unnecessary-type-arguments': "off"; + '@typescript-eslint/no-unnecessary-type-assertion': "off"; + '@typescript-eslint/no-unnecessary-type-conversion': "off"; + '@typescript-eslint/no-unnecessary-type-parameters': "off"; + '@typescript-eslint/no-unsafe-argument': "off"; + '@typescript-eslint/no-unsafe-assignment': "off"; + '@typescript-eslint/no-unsafe-call': "off"; + '@typescript-eslint/no-unsafe-enum-comparison': "off"; + '@typescript-eslint/no-unsafe-member-access': "off"; + '@typescript-eslint/no-unsafe-return': "off"; + '@typescript-eslint/no-unsafe-type-assertion': "off"; + '@typescript-eslint/no-unsafe-unary-minus': "off"; + '@typescript-eslint/non-nullable-type-assertion-style': "off"; + '@typescript-eslint/only-throw-error': "off"; + '@typescript-eslint/prefer-destructuring': "off"; + '@typescript-eslint/prefer-find': "off"; + '@typescript-eslint/prefer-includes': "off"; + '@typescript-eslint/prefer-nullish-coalescing': "off"; + '@typescript-eslint/prefer-optional-chain': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-readonly': "off"; + '@typescript-eslint/prefer-readonly-parameter-types': "off"; + '@typescript-eslint/prefer-reduce-type-parameter': "off"; + '@typescript-eslint/prefer-regexp-exec': "off"; + '@typescript-eslint/prefer-return-this-type': "off"; + '@typescript-eslint/prefer-string-starts-ends-with': "off"; + '@typescript-eslint/promise-function-async': "off"; + '@typescript-eslint/related-getter-setter-pairs': "off"; + '@typescript-eslint/require-array-sort-compare': "off"; + '@typescript-eslint/require-await': "off"; + '@typescript-eslint/restrict-plus-operands': "off"; + '@typescript-eslint/restrict-template-expressions': "off"; + '@typescript-eslint/return-await': "off"; + '@typescript-eslint/strict-boolean-expressions': "off"; + '@typescript-eslint/switch-exhaustiveness-check': "off"; + '@typescript-eslint/unbound-method': "off"; + '@typescript-eslint/use-unknown-in-catch-callback-variable': "off"; + }; + }; + 'eslint-recommended': { + overrides: { + files: string[]; + rules: Record; + }[]; + }; + recommended: { + extends: string[]; + rules: { + '@typescript-eslint/ban-ts-comment': "error"; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + }; + }; + 'recommended-requiring-type-checking': { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/ban-ts-comment': "error"; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': "error"; + '@typescript-eslint/restrict-template-expressions': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unbound-method': "error"; + }; + }; + 'recommended-type-checked': { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/ban-ts-comment': "error"; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': "error"; + '@typescript-eslint/restrict-template-expressions': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unbound-method': "error"; + }; + }; + 'recommended-type-checked-only': { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': "error"; + '@typescript-eslint/restrict-template-expressions': "error"; + '@typescript-eslint/unbound-method': "error"; + }; + }; + strict: { + extends: string[]; + rules: { + '@typescript-eslint/ban-ts-comment': ["error", { + minimumDescriptionLength: number; + }]; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-dynamic-delete': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-extraneous-class': "error"; + '@typescript-eslint/no-invalid-void-type': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-non-null-assertion': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + 'no-useless-constructor': "off"; + '@typescript-eslint/no-useless-constructor': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-literal-enum-member': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unified-signatures': "error"; + }; + }; + 'strict-type-checked': { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/ban-ts-comment': ["error", { + minimumDescriptionLength: number; + }]; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-confusing-void-expression': "error"; + '@typescript-eslint/no-deprecated': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-dynamic-delete': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-extraneous-class': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-invalid-void-type': "error"; + '@typescript-eslint/no-meaningless-void-operator': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-misused-spread': "error"; + '@typescript-eslint/no-mixed-enums': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-non-null-assertion': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-boolean-literal-compare': "error"; + '@typescript-eslint/no-unnecessary-condition': "error"; + '@typescript-eslint/no-unnecessary-template-expression': "error"; + '@typescript-eslint/no-unnecessary-type-arguments': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unnecessary-type-conversion': "error"; + '@typescript-eslint/no-unnecessary-type-parameters': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + 'no-useless-constructor': "off"; + '@typescript-eslint/no-useless-constructor': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-literal-enum-member': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + '@typescript-eslint/prefer-reduce-type-parameter': "error"; + '@typescript-eslint/prefer-return-this-type': "error"; + '@typescript-eslint/related-getter-setter-pairs': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': ["error", { + allowAny: boolean; + allowBoolean: boolean; + allowNullish: boolean; + allowNumberAndString: boolean; + allowRegExp: boolean; + }]; + '@typescript-eslint/restrict-template-expressions': ["error", { + allowAny: boolean; + allowBoolean: boolean; + allowNever: boolean; + allowNullish: boolean; + allowNumber: boolean; + allowRegExp: boolean; + }]; + 'no-return-await': "off"; + '@typescript-eslint/return-await': ["error", string]; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unbound-method': "error"; + '@typescript-eslint/unified-signatures': "error"; + '@typescript-eslint/use-unknown-in-catch-callback-variable': "error"; + }; + }; + 'strict-type-checked-only': { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-confusing-void-expression': "error"; + '@typescript-eslint/no-deprecated': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-meaningless-void-operator': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-misused-spread': "error"; + '@typescript-eslint/no-mixed-enums': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-unnecessary-boolean-literal-compare': "error"; + '@typescript-eslint/no-unnecessary-condition': "error"; + '@typescript-eslint/no-unnecessary-template-expression': "error"; + '@typescript-eslint/no-unnecessary-type-arguments': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-conversion': "error"; + '@typescript-eslint/no-unnecessary-type-parameters': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + '@typescript-eslint/prefer-reduce-type-parameter': "error"; + '@typescript-eslint/prefer-return-this-type': "error"; + '@typescript-eslint/related-getter-setter-pairs': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': ["error", { + allowAny: boolean; + allowBoolean: boolean; + allowNullish: boolean; + allowNumberAndString: boolean; + allowRegExp: boolean; + }]; + '@typescript-eslint/restrict-template-expressions': ["error", { + allowAny: boolean; + allowBoolean: boolean; + allowNever: boolean; + allowNullish: boolean; + allowNumber: boolean; + allowRegExp: boolean; + }]; + 'no-return-await': "off"; + '@typescript-eslint/return-await': ["error", string]; + '@typescript-eslint/unbound-method': "error"; + '@typescript-eslint/use-unknown-in-catch-callback-variable': "error"; + }; + }; + stylistic: { + extends: string[]; + rules: { + '@typescript-eslint/adjacent-overload-signatures': "error"; + '@typescript-eslint/array-type': "error"; + '@typescript-eslint/ban-tslint-comment': "error"; + '@typescript-eslint/class-literal-property-style': "error"; + '@typescript-eslint/consistent-generic-constructors': "error"; + '@typescript-eslint/consistent-indexed-object-style': "error"; + '@typescript-eslint/consistent-type-assertions': "error"; + '@typescript-eslint/consistent-type-definitions': "error"; + '@typescript-eslint/no-confusing-non-null-assertion': "error"; + 'no-empty-function': "off"; + '@typescript-eslint/no-empty-function': "error"; + '@typescript-eslint/no-inferrable-types': "error"; + '@typescript-eslint/prefer-for-of': "error"; + '@typescript-eslint/prefer-function-type': "error"; + }; + }; + 'stylistic-type-checked': { + extends: string[]; + rules: { + '@typescript-eslint/adjacent-overload-signatures': "error"; + '@typescript-eslint/array-type': "error"; + '@typescript-eslint/ban-tslint-comment': "error"; + '@typescript-eslint/class-literal-property-style': "error"; + '@typescript-eslint/consistent-generic-constructors': "error"; + '@typescript-eslint/consistent-indexed-object-style': "error"; + '@typescript-eslint/consistent-type-assertions': "error"; + '@typescript-eslint/consistent-type-definitions': "error"; + 'dot-notation': "off"; + '@typescript-eslint/dot-notation': "error"; + '@typescript-eslint/no-confusing-non-null-assertion': "error"; + 'no-empty-function': "off"; + '@typescript-eslint/no-empty-function': "error"; + '@typescript-eslint/no-inferrable-types': "error"; + '@typescript-eslint/non-nullable-type-assertion-style': "error"; + '@typescript-eslint/prefer-find': "error"; + '@typescript-eslint/prefer-for-of': "error"; + '@typescript-eslint/prefer-function-type': "error"; + '@typescript-eslint/prefer-includes': "error"; + '@typescript-eslint/prefer-nullish-coalescing': "error"; + '@typescript-eslint/prefer-optional-chain': "error"; + '@typescript-eslint/prefer-regexp-exec': "error"; + '@typescript-eslint/prefer-string-starts-ends-with': "error"; + }; + }; + 'stylistic-type-checked-only': { + extends: string[]; + rules: { + 'dot-notation': "off"; + '@typescript-eslint/dot-notation': "error"; + '@typescript-eslint/non-nullable-type-assertion-style': "error"; + '@typescript-eslint/prefer-find': "error"; + '@typescript-eslint/prefer-includes': "error"; + '@typescript-eslint/prefer-nullish-coalescing': "error"; + '@typescript-eslint/prefer-optional-chain': "error"; + '@typescript-eslint/prefer-regexp-exec': "error"; + '@typescript-eslint/prefer-string-starts-ends-with': "error"; + }; + }; + }; + meta: { + name: string; + version: string; + }; + rules: { + 'adjacent-overload-signatures': import("@typescript-eslint/utils/ts-eslint").RuleModule<"adjacentSignature", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'array-type': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'await-thenable': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'ban-ts-comment': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'ban-tslint-comment': import("@typescript-eslint/utils/ts-eslint").RuleModule<"commentDetected", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'class-literal-property-style': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'class-methods-use-this': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingThis", import("./rules/class-methods-use-this").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'consistent-generic-constructors': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'consistent-indexed-object-style': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'consistent-return': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingReturn" | "missingReturnValue" | "unexpectedReturnValue", [({ + treatUndefinedAsUnspecified?: boolean; + } | undefined)?], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'consistent-type-assertions': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'consistent-type-definitions': import("@typescript-eslint/utils/ts-eslint").RuleModule<"interfaceOverType" | "typeOverInterface", [string], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'consistent-type-exports': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'consistent-type-imports': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'default-param-last': import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldBeLast", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'dot-notation': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useBrackets" | "useDot", [{ + allowIndexSignaturePropertyAccess?: boolean; + allowKeywords?: boolean; + allowPattern?: string; + allowPrivateClassPropertyAccess?: boolean; + allowProtectedClassPropertyAccess?: boolean; + }], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'explicit-function-return-type': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingReturnType", import("./rules/explicit-function-return-type").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'explicit-member-accessibility': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'explicit-module-boundary-types': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'init-declarations': import("@typescript-eslint/utils/ts-eslint").RuleModule<"initialized" | "notInitialized", ["always" | "never", ({ + ignoreForLoopInit?: boolean; + } | undefined)?], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'max-params': import("@typescript-eslint/utils/ts-eslint").RuleModule<"exceed", ({ + countVoidThis?: boolean; + max: number; + } | { + countVoidThis?: boolean; + maximum: number; + })[], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'member-ordering': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'method-signature-style': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'naming-convention': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-array-constructor': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useLiteral", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-array-delete': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-base-to-string': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-confusing-non-null-assertion': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-confusing-void-expression': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-deprecated': import("@typescript-eslint/utils/ts-eslint").RuleModule<"deprecated" | "deprecatedWithReason", [{ + allow?: import("@typescript-eslint/type-utils").TypeOrValueSpecifier[]; + }], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-dupe-class-members': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpected", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-duplicate-enum-values': import("@typescript-eslint/utils/ts-eslint").RuleModule<"duplicateValue", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-duplicate-type-constituents': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-dynamic-delete': import("@typescript-eslint/utils/ts-eslint").RuleModule<"dynamicDelete", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-empty-function': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpected" | "suggestComment", [{ + allow?: string[]; + }], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-empty-interface': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-empty-object-type': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-explicit-any': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-extra-non-null-assertion': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noExtraNonNullAssertion", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-extraneous-class': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-floating-promises': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-for-in-array': import("@typescript-eslint/utils/ts-eslint").RuleModule<"forInViolation", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-implied-eval': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noFunctionConstructor" | "noImpliedEvalError", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-import-type-side-effects': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useTopLevelQualifier", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-inferrable-types': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noInferrableType", import("./rules/no-inferrable-types").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-invalid-this': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpectedThis", [({ + capIsConstructor?: boolean; + } | undefined)?], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-invalid-void-type': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-loop-func': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeRefs", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-loss-of-precision': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noLossOfPrecision", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-magic-numbers': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noMagic", [{ + detectObjects?: boolean; + enforceConst?: boolean; + ignore?: (number | string)[]; + ignoreArrayIndexes?: boolean; + ignoreEnums?: boolean; + ignoreNumericLiteralTypes?: boolean; + ignoreReadonlyClassProperties?: boolean; + ignoreTypeIndexes?: boolean; + }], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-meaningless-void-operator': import("@typescript-eslint/utils/ts-eslint").RuleModule<"meaninglessVoidOperator" | "removeVoid", import("./rules/no-meaningless-void-operator").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-misused-new': import("@typescript-eslint/utils/ts-eslint").RuleModule<"errorMessageClass" | "errorMessageInterface", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-misused-promises': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-misused-spread': import("@typescript-eslint/utils/ts-eslint").RuleModule<"addAwait" | "noArraySpreadInObject" | "noClassDeclarationSpreadInObject" | "noClassInstanceSpreadInObject" | "noFunctionSpreadInObject" | "noIterableSpreadInObject" | "noMapSpreadInObject" | "noPromiseSpreadInObject" | "noStringSpread" | "replaceMapSpreadInObject", [{ + allow?: import("@typescript-eslint/type-utils").TypeOrValueSpecifier[]; + }], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-mixed-enums': import("@typescript-eslint/utils/ts-eslint").RuleModule<"mixed", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-namespace': import("@typescript-eslint/utils/ts-eslint").RuleModule<"moduleSyntaxIsPreferred", import("./rules/no-namespace").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-non-null-asserted-nullish-coalescing': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noNonNullAssertedNullishCoalescing" | "suggestRemovingNonNull", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-non-null-asserted-optional-chain': import("@typescript-eslint/utils/ts-eslint").RuleModule<"suggestRemovingNonNull" | "noNonNullOptionalChain", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-non-null-assertion': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-redeclare': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-redundant-type-constituents': import("@typescript-eslint/utils/ts-eslint").RuleModule<"overrides" | "errorTypeOverrides" | "literalOverridden" | "overridden" | "primitiveOverridden", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-require-imports': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noRequireImports", import("./rules/no-require-imports").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-restricted-imports': import("@typescript-eslint/utils/ts-eslint").RuleModule<"everything" | "everythingWithCustomMessage" | "importName" | "importNameWithCustomMessage" | "path" | "pathWithCustomMessage" | "patterns" | "patternWithCustomMessage", [import("eslint/lib/rules/no-restricted-imports").ObjectOfPathsAndPatterns] | import("eslint/lib/rules/no-restricted-imports").ArrayOfStringOrObject, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-restricted-types': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-shadow': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-this-alias': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-type-alias': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-unnecessary-boolean-literal-compare': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-unnecessary-condition': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-unnecessary-parameter-property-assignment': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unnecessaryAssign", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unnecessary-qualifier': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unnecessaryQualifier", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unnecessary-template-expression': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noUnnecessaryTemplateExpression", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unnecessary-type-arguments': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unnecessaryTypeParameter", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unnecessary-type-assertion': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-unnecessary-type-constraint': import("@typescript-eslint/utils/ts-eslint").RuleModule<"removeUnnecessaryConstraint" | "unnecessaryConstraint", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unnecessary-type-conversion': import("@typescript-eslint/utils/ts-eslint").RuleModule<"suggestRemove" | "suggestSatisfies" | "unnecessaryTypeConversion", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unnecessary-type-parameters': import("@typescript-eslint/utils/ts-eslint").RuleModule<"replaceUsagesWithConstraint" | "sole", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-argument': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-unsafe-assignment': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeArraySpread" | "anyAssignment" | "anyAssignmentThis" | "unsafeArrayPattern" | "unsafeArrayPatternFromTuple" | "unsafeAssignment" | "unsafeObjectPattern", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-call': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-unsafe-declaration-merging': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeMerging", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-enum-comparison': import("@typescript-eslint/utils/ts-eslint").RuleModule<"mismatchedCase" | "mismatchedCondition" | "replaceValueWithEnum", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-function-type': import("@typescript-eslint/utils/ts-eslint").RuleModule<"bannedFunctionType", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-member-access': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeComputedMemberAccess" | "unsafeMemberExpression" | "unsafeThisMemberExpression", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-return': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeReturn" | "unsafeReturnAssignment" | "unsafeReturnThis", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-type-assertion': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeOfAnyTypeAssertion" | "unsafeToAnyTypeAssertion" | "unsafeToUnconstrainedTypeAssertion" | "unsafeTypeAssertion" | "unsafeTypeAssertionAssignableToConstraint", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-unary-minus': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unaryMinus", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unused-expressions': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unusedExpression", [{ + allowShortCircuit?: boolean; + allowTaggedTemplates?: boolean; + allowTernary?: boolean; + }], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unused-vars': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-use-before-define': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noUseBeforeDefine", import("./rules/no-use-before-define").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-useless-constructor': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noUselessConstructor" | "removeConstructor", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-useless-empty-export': import("@typescript-eslint/utils/ts-eslint").RuleModule<"uselessExport", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-var-requires': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noVarReqs", import("./rules/no-var-requires").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-wrapper-object-types': import("@typescript-eslint/utils/ts-eslint").RuleModule<"bannedClassType", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'non-nullable-type-assertion-style': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferNonNullAssertion", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'only-throw-error': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'parameter-properties': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'prefer-as-const': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferConstAssertion" | "variableConstAssertion" | "variableSuggest", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-destructuring': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferDestructuring", import("./rules/prefer-destructuring").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-enum-initializers': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'prefer-find': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferFind" | "preferFindSuggestion", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-for-of': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferForOf", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-function-type': import("@typescript-eslint/utils/ts-eslint").RuleModule<"functionTypeOverCallableType" | "unexpectedThisOnFunctionOnlyInterface", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-includes': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferIncludes" | "preferStringIncludes", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-literal-enum-member': import("@typescript-eslint/utils/ts-eslint").RuleModule<"notLiteral" | "notLiteralOrBitwiseExpression", [{ + allowBitwiseExpressions: boolean; + }], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-namespace-keyword': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useNamespace", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-nullish-coalescing': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'prefer-optional-chain': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'prefer-promise-reject-errors': import("@typescript-eslint/utils/ts-eslint").RuleModule<"rejectAnError", import("./rules/prefer-promise-reject-errors").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-readonly': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferReadonly", import("./rules/prefer-readonly").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-readonly-parameter-types': import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldBeReadonly", import("./rules/prefer-readonly-parameter-types").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-reduce-type-parameter': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferTypeParameter", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-regexp-exec': import("@typescript-eslint/utils/ts-eslint").RuleModule<"regExpExecOverStringMatch", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-return-this-type': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useThisType", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-string-starts-ends-with': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'prefer-ts-expect-error': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferExpectErrorComment", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'promise-function-async': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'related-getter-setter-pairs': import("@typescript-eslint/utils/ts-eslint").RuleModule<"mismatch", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'require-array-sort-compare': import("@typescript-eslint/utils/ts-eslint").RuleModule<"requireCompare", import("./rules/require-array-sort-compare").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'require-await': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingAwait" | "removeAsync", [], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'restrict-plus-operands': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'restrict-template-expressions': import("@typescript-eslint/utils/ts-eslint").RuleModule<"invalidType", import("./rules/restrict-template-expressions").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'return-await': import("@typescript-eslint/utils/ts-eslint").RuleModule<"disallowedPromiseAwait" | "disallowedPromiseAwaitSuggestion" | "nonPromiseAwait" | "requiredPromiseAwait" | "requiredPromiseAwaitSuggestion", [string], import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'sort-type-constituents': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'strict-boolean-expressions': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'switch-exhaustiveness-check': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'triple-slash-reference': import("@typescript-eslint/utils/ts-eslint").RuleModule<"tripleSlashReference", import("./rules/triple-slash-reference").Options, import("../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + typedef: import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'unbound-method': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'unified-signatures': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'use-unknown-in-catch-callback-variable': import("@typescript-eslint/utils/ts-eslint").RuleModule; + }; +}; +export = _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/index.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/index.d.ts.map new file mode 100644 index 0000000..3d2b680 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,kBAA0B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/index.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/index.js new file mode 100644 index 0000000..386ba0d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/index.js @@ -0,0 +1,6 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const raw_plugin_1 = __importDefault(require("./raw-plugin")); +module.exports = raw_plugin_1.default.plugin; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.d.ts new file mode 100644 index 0000000..d556417 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.d.ts @@ -0,0 +1,869 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; +declare const _default: { + flatConfigs: { + 'flat/all': FlatConfig.ConfigArray; + 'flat/base': FlatConfig.Config; + 'flat/disable-type-checked': FlatConfig.Config; + 'flat/eslint-recommended': FlatConfig.Config; + 'flat/recommended': FlatConfig.ConfigArray; + 'flat/recommended-type-checked': FlatConfig.ConfigArray; + 'flat/recommended-type-checked-only': FlatConfig.ConfigArray; + 'flat/strict': FlatConfig.ConfigArray; + 'flat/strict-type-checked': FlatConfig.ConfigArray; + 'flat/strict-type-checked-only': FlatConfig.ConfigArray; + 'flat/stylistic': FlatConfig.ConfigArray; + 'flat/stylistic-type-checked': FlatConfig.ConfigArray; + 'flat/stylistic-type-checked-only': FlatConfig.ConfigArray; + }; + parser: { + meta?: { [K in keyof TSESLint.Parser.ParserMeta]?: TSESLint.Parser.ParserMeta[K] | undefined; }; + parseForESLint(text: string, options?: unknown): { [k in keyof TSESLint.Parser.ParseResult]: unknown; }; + }; + plugin: { + configs: { + all: { + extends: string[]; + rules: { + '@typescript-eslint/adjacent-overload-signatures': "error"; + '@typescript-eslint/array-type': "error"; + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/ban-ts-comment': "error"; + '@typescript-eslint/ban-tslint-comment': "error"; + '@typescript-eslint/class-literal-property-style': "error"; + 'class-methods-use-this': "off"; + '@typescript-eslint/class-methods-use-this': "error"; + '@typescript-eslint/consistent-generic-constructors': "error"; + '@typescript-eslint/consistent-indexed-object-style': "error"; + 'consistent-return': "off"; + '@typescript-eslint/consistent-return': "error"; + '@typescript-eslint/consistent-type-assertions': "error"; + '@typescript-eslint/consistent-type-definitions': "error"; + '@typescript-eslint/consistent-type-exports': "error"; + '@typescript-eslint/consistent-type-imports': "error"; + 'default-param-last': "off"; + '@typescript-eslint/default-param-last': "error"; + 'dot-notation': "off"; + '@typescript-eslint/dot-notation': "error"; + '@typescript-eslint/explicit-function-return-type': "error"; + '@typescript-eslint/explicit-member-accessibility': "error"; + '@typescript-eslint/explicit-module-boundary-types': "error"; + 'init-declarations': "off"; + '@typescript-eslint/init-declarations': "error"; + 'max-params': "off"; + '@typescript-eslint/max-params': "error"; + '@typescript-eslint/member-ordering': "error"; + '@typescript-eslint/method-signature-style': "error"; + '@typescript-eslint/naming-convention': "error"; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-confusing-non-null-assertion': "error"; + '@typescript-eslint/no-confusing-void-expression': "error"; + '@typescript-eslint/no-deprecated': "error"; + 'no-dupe-class-members': "off"; + '@typescript-eslint/no-dupe-class-members': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-dynamic-delete': "error"; + 'no-empty-function': "off"; + '@typescript-eslint/no-empty-function': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-extraneous-class': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-import-type-side-effects': "error"; + '@typescript-eslint/no-inferrable-types': "error"; + 'no-invalid-this': "off"; + '@typescript-eslint/no-invalid-this': "error"; + '@typescript-eslint/no-invalid-void-type': "error"; + 'no-loop-func': "off"; + '@typescript-eslint/no-loop-func': "error"; + 'no-magic-numbers': "off"; + '@typescript-eslint/no-magic-numbers': "error"; + '@typescript-eslint/no-meaningless-void-operator': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-misused-spread': "error"; + '@typescript-eslint/no-mixed-enums': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-non-null-assertion': "error"; + 'no-redeclare': "off"; + '@typescript-eslint/no-redeclare': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-require-imports': "error"; + 'no-restricted-imports': "off"; + '@typescript-eslint/no-restricted-imports': "error"; + '@typescript-eslint/no-restricted-types': "error"; + 'no-shadow': "off"; + '@typescript-eslint/no-shadow': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-boolean-literal-compare': "error"; + '@typescript-eslint/no-unnecessary-condition': "error"; + '@typescript-eslint/no-unnecessary-parameter-property-assignment': "error"; + '@typescript-eslint/no-unnecessary-qualifier': "error"; + '@typescript-eslint/no-unnecessary-template-expression': "error"; + '@typescript-eslint/no-unnecessary-type-arguments': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unnecessary-type-conversion': "error"; + '@typescript-eslint/no-unnecessary-type-parameters': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-type-assertion': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + 'no-use-before-define': "off"; + '@typescript-eslint/no-use-before-define': "error"; + 'no-useless-constructor': "off"; + '@typescript-eslint/no-useless-constructor': "error"; + '@typescript-eslint/no-useless-empty-export': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + '@typescript-eslint/non-nullable-type-assertion-style': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + '@typescript-eslint/parameter-properties': "error"; + '@typescript-eslint/prefer-as-const': "error"; + 'prefer-destructuring': "off"; + '@typescript-eslint/prefer-destructuring': "error"; + '@typescript-eslint/prefer-enum-initializers': "error"; + '@typescript-eslint/prefer-find': "error"; + '@typescript-eslint/prefer-for-of': "error"; + '@typescript-eslint/prefer-function-type': "error"; + '@typescript-eslint/prefer-includes': "error"; + '@typescript-eslint/prefer-literal-enum-member': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + '@typescript-eslint/prefer-nullish-coalescing': "error"; + '@typescript-eslint/prefer-optional-chain': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + '@typescript-eslint/prefer-readonly': "error"; + '@typescript-eslint/prefer-readonly-parameter-types': "error"; + '@typescript-eslint/prefer-reduce-type-parameter': "error"; + '@typescript-eslint/prefer-regexp-exec': "error"; + '@typescript-eslint/prefer-return-this-type': "error"; + '@typescript-eslint/prefer-string-starts-ends-with': "error"; + '@typescript-eslint/promise-function-async': "error"; + '@typescript-eslint/related-getter-setter-pairs': "error"; + '@typescript-eslint/require-array-sort-compare': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': "error"; + '@typescript-eslint/restrict-template-expressions': "error"; + 'no-return-await': "off"; + '@typescript-eslint/return-await': "error"; + '@typescript-eslint/strict-boolean-expressions': "error"; + '@typescript-eslint/switch-exhaustiveness-check': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unbound-method': "error"; + '@typescript-eslint/unified-signatures': "error"; + '@typescript-eslint/use-unknown-in-catch-callback-variable': "error"; + }; + }; + base: { + parser: string; + parserOptions: { + sourceType: "module"; + }; + plugins: string[]; + }; + 'disable-type-checked': { + parserOptions: { + program: null; + project: false; + projectService: false; + }; + rules: { + '@typescript-eslint/await-thenable': "off"; + '@typescript-eslint/consistent-return': "off"; + '@typescript-eslint/consistent-type-exports': "off"; + '@typescript-eslint/dot-notation': "off"; + '@typescript-eslint/naming-convention': "off"; + '@typescript-eslint/no-array-delete': "off"; + '@typescript-eslint/no-base-to-string': "off"; + '@typescript-eslint/no-confusing-void-expression': "off"; + '@typescript-eslint/no-deprecated': "off"; + '@typescript-eslint/no-duplicate-type-constituents': "off"; + '@typescript-eslint/no-floating-promises': "off"; + '@typescript-eslint/no-for-in-array': "off"; + '@typescript-eslint/no-implied-eval': "off"; + '@typescript-eslint/no-meaningless-void-operator': "off"; + '@typescript-eslint/no-misused-promises': "off"; + '@typescript-eslint/no-misused-spread': "off"; + '@typescript-eslint/no-mixed-enums': "off"; + '@typescript-eslint/no-redundant-type-constituents': "off"; + '@typescript-eslint/no-unnecessary-boolean-literal-compare': "off"; + '@typescript-eslint/no-unnecessary-condition': "off"; + '@typescript-eslint/no-unnecessary-qualifier': "off"; + '@typescript-eslint/no-unnecessary-template-expression': "off"; + '@typescript-eslint/no-unnecessary-type-arguments': "off"; + '@typescript-eslint/no-unnecessary-type-assertion': "off"; + '@typescript-eslint/no-unnecessary-type-conversion': "off"; + '@typescript-eslint/no-unnecessary-type-parameters': "off"; + '@typescript-eslint/no-unsafe-argument': "off"; + '@typescript-eslint/no-unsafe-assignment': "off"; + '@typescript-eslint/no-unsafe-call': "off"; + '@typescript-eslint/no-unsafe-enum-comparison': "off"; + '@typescript-eslint/no-unsafe-member-access': "off"; + '@typescript-eslint/no-unsafe-return': "off"; + '@typescript-eslint/no-unsafe-type-assertion': "off"; + '@typescript-eslint/no-unsafe-unary-minus': "off"; + '@typescript-eslint/non-nullable-type-assertion-style': "off"; + '@typescript-eslint/only-throw-error': "off"; + '@typescript-eslint/prefer-destructuring': "off"; + '@typescript-eslint/prefer-find': "off"; + '@typescript-eslint/prefer-includes': "off"; + '@typescript-eslint/prefer-nullish-coalescing': "off"; + '@typescript-eslint/prefer-optional-chain': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-readonly': "off"; + '@typescript-eslint/prefer-readonly-parameter-types': "off"; + '@typescript-eslint/prefer-reduce-type-parameter': "off"; + '@typescript-eslint/prefer-regexp-exec': "off"; + '@typescript-eslint/prefer-return-this-type': "off"; + '@typescript-eslint/prefer-string-starts-ends-with': "off"; + '@typescript-eslint/promise-function-async': "off"; + '@typescript-eslint/related-getter-setter-pairs': "off"; + '@typescript-eslint/require-array-sort-compare': "off"; + '@typescript-eslint/require-await': "off"; + '@typescript-eslint/restrict-plus-operands': "off"; + '@typescript-eslint/restrict-template-expressions': "off"; + '@typescript-eslint/return-await': "off"; + '@typescript-eslint/strict-boolean-expressions': "off"; + '@typescript-eslint/switch-exhaustiveness-check': "off"; + '@typescript-eslint/unbound-method': "off"; + '@typescript-eslint/use-unknown-in-catch-callback-variable': "off"; + }; + }; + 'eslint-recommended': { + overrides: { + files: string[]; + rules: Record; + }[]; + }; + recommended: { + extends: string[]; + rules: { + '@typescript-eslint/ban-ts-comment': "error"; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + }; + }; + /** @deprecated - please use "recommended-type-checked" instead. */ + 'recommended-requiring-type-checking': { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/ban-ts-comment': "error"; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': "error"; + '@typescript-eslint/restrict-template-expressions': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unbound-method': "error"; + }; + }; + 'recommended-type-checked': { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/ban-ts-comment': "error"; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': "error"; + '@typescript-eslint/restrict-template-expressions': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unbound-method': "error"; + }; + }; + 'recommended-type-checked-only': { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': "error"; + '@typescript-eslint/restrict-template-expressions': "error"; + '@typescript-eslint/unbound-method': "error"; + }; + }; + strict: { + extends: string[]; + rules: { + '@typescript-eslint/ban-ts-comment': ["error", { + minimumDescriptionLength: number; + }]; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-dynamic-delete': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-extraneous-class': "error"; + '@typescript-eslint/no-invalid-void-type': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-non-null-assertion': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + 'no-useless-constructor': "off"; + '@typescript-eslint/no-useless-constructor': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-literal-enum-member': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unified-signatures': "error"; + }; + }; + 'strict-type-checked': { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/ban-ts-comment': ["error", { + minimumDescriptionLength: number; + }]; + 'no-array-constructor': "off"; + '@typescript-eslint/no-array-constructor': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-confusing-void-expression': "error"; + '@typescript-eslint/no-deprecated': "error"; + '@typescript-eslint/no-duplicate-enum-values': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-dynamic-delete': "error"; + '@typescript-eslint/no-empty-object-type': "error"; + '@typescript-eslint/no-explicit-any': "error"; + '@typescript-eslint/no-extra-non-null-assertion': "error"; + '@typescript-eslint/no-extraneous-class': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-invalid-void-type': "error"; + '@typescript-eslint/no-meaningless-void-operator': "error"; + '@typescript-eslint/no-misused-new': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-misused-spread': "error"; + '@typescript-eslint/no-mixed-enums': "error"; + '@typescript-eslint/no-namespace': "error"; + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error"; + '@typescript-eslint/no-non-null-asserted-optional-chain': "error"; + '@typescript-eslint/no-non-null-assertion': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-require-imports': "error"; + '@typescript-eslint/no-this-alias': "error"; + '@typescript-eslint/no-unnecessary-boolean-literal-compare': "error"; + '@typescript-eslint/no-unnecessary-condition': "error"; + '@typescript-eslint/no-unnecessary-template-expression': "error"; + '@typescript-eslint/no-unnecessary-type-arguments': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-constraint': "error"; + '@typescript-eslint/no-unnecessary-type-conversion': "error"; + '@typescript-eslint/no-unnecessary-type-parameters': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-declaration-merging': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-function-type': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-unused-expressions': "off"; + '@typescript-eslint/no-unused-expressions': "error"; + 'no-unused-vars': "off"; + '@typescript-eslint/no-unused-vars': "error"; + 'no-useless-constructor': "off"; + '@typescript-eslint/no-useless-constructor': "error"; + '@typescript-eslint/no-wrapper-object-types': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + '@typescript-eslint/prefer-as-const': "error"; + '@typescript-eslint/prefer-literal-enum-member': "error"; + '@typescript-eslint/prefer-namespace-keyword': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + '@typescript-eslint/prefer-reduce-type-parameter': "error"; + '@typescript-eslint/prefer-return-this-type': "error"; + '@typescript-eslint/related-getter-setter-pairs': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': ["error", { + allowAny: boolean; + allowBoolean: boolean; + allowNullish: boolean; + allowNumberAndString: boolean; + allowRegExp: boolean; + }]; + '@typescript-eslint/restrict-template-expressions': ["error", { + allowAny: boolean; + allowBoolean: boolean; + allowNever: boolean; + allowNullish: boolean; + allowNumber: boolean; + allowRegExp: boolean; + }]; + 'no-return-await': "off"; + '@typescript-eslint/return-await': ["error", string]; + '@typescript-eslint/triple-slash-reference': "error"; + '@typescript-eslint/unbound-method': "error"; + '@typescript-eslint/unified-signatures': "error"; + '@typescript-eslint/use-unknown-in-catch-callback-variable': "error"; + }; + }; + 'strict-type-checked-only': { + extends: string[]; + rules: { + '@typescript-eslint/await-thenable': "error"; + '@typescript-eslint/no-array-delete': "error"; + '@typescript-eslint/no-base-to-string': "error"; + '@typescript-eslint/no-confusing-void-expression': "error"; + '@typescript-eslint/no-deprecated': "error"; + '@typescript-eslint/no-duplicate-type-constituents': "error"; + '@typescript-eslint/no-floating-promises': "error"; + '@typescript-eslint/no-for-in-array': "error"; + 'no-implied-eval': "off"; + '@typescript-eslint/no-implied-eval': "error"; + '@typescript-eslint/no-meaningless-void-operator': "error"; + '@typescript-eslint/no-misused-promises': "error"; + '@typescript-eslint/no-misused-spread': "error"; + '@typescript-eslint/no-mixed-enums': "error"; + '@typescript-eslint/no-redundant-type-constituents': "error"; + '@typescript-eslint/no-unnecessary-boolean-literal-compare': "error"; + '@typescript-eslint/no-unnecessary-condition': "error"; + '@typescript-eslint/no-unnecessary-template-expression': "error"; + '@typescript-eslint/no-unnecessary-type-arguments': "error"; + '@typescript-eslint/no-unnecessary-type-assertion': "error"; + '@typescript-eslint/no-unnecessary-type-conversion': "error"; + '@typescript-eslint/no-unnecessary-type-parameters': "error"; + '@typescript-eslint/no-unsafe-argument': "error"; + '@typescript-eslint/no-unsafe-assignment': "error"; + '@typescript-eslint/no-unsafe-call': "error"; + '@typescript-eslint/no-unsafe-enum-comparison': "error"; + '@typescript-eslint/no-unsafe-member-access': "error"; + '@typescript-eslint/no-unsafe-return': "error"; + '@typescript-eslint/no-unsafe-unary-minus': "error"; + 'no-throw-literal': "off"; + '@typescript-eslint/only-throw-error': "error"; + 'prefer-promise-reject-errors': "off"; + '@typescript-eslint/prefer-promise-reject-errors': "error"; + '@typescript-eslint/prefer-reduce-type-parameter': "error"; + '@typescript-eslint/prefer-return-this-type': "error"; + '@typescript-eslint/related-getter-setter-pairs': "error"; + 'require-await': "off"; + '@typescript-eslint/require-await': "error"; + '@typescript-eslint/restrict-plus-operands': ["error", { + allowAny: boolean; + allowBoolean: boolean; + allowNullish: boolean; + allowNumberAndString: boolean; + allowRegExp: boolean; + }]; + '@typescript-eslint/restrict-template-expressions': ["error", { + allowAny: boolean; + allowBoolean: boolean; + allowNever: boolean; + allowNullish: boolean; + allowNumber: boolean; + allowRegExp: boolean; + }]; + 'no-return-await': "off"; + '@typescript-eslint/return-await': ["error", string]; + '@typescript-eslint/unbound-method': "error"; + '@typescript-eslint/use-unknown-in-catch-callback-variable': "error"; + }; + }; + stylistic: { + extends: string[]; + rules: { + '@typescript-eslint/adjacent-overload-signatures': "error"; + '@typescript-eslint/array-type': "error"; + '@typescript-eslint/ban-tslint-comment': "error"; + '@typescript-eslint/class-literal-property-style': "error"; + '@typescript-eslint/consistent-generic-constructors': "error"; + '@typescript-eslint/consistent-indexed-object-style': "error"; + '@typescript-eslint/consistent-type-assertions': "error"; + '@typescript-eslint/consistent-type-definitions': "error"; + '@typescript-eslint/no-confusing-non-null-assertion': "error"; + 'no-empty-function': "off"; + '@typescript-eslint/no-empty-function': "error"; + '@typescript-eslint/no-inferrable-types': "error"; + '@typescript-eslint/prefer-for-of': "error"; + '@typescript-eslint/prefer-function-type': "error"; + }; + }; + 'stylistic-type-checked': { + extends: string[]; + rules: { + '@typescript-eslint/adjacent-overload-signatures': "error"; + '@typescript-eslint/array-type': "error"; + '@typescript-eslint/ban-tslint-comment': "error"; + '@typescript-eslint/class-literal-property-style': "error"; + '@typescript-eslint/consistent-generic-constructors': "error"; + '@typescript-eslint/consistent-indexed-object-style': "error"; + '@typescript-eslint/consistent-type-assertions': "error"; + '@typescript-eslint/consistent-type-definitions': "error"; + 'dot-notation': "off"; + '@typescript-eslint/dot-notation': "error"; + '@typescript-eslint/no-confusing-non-null-assertion': "error"; + 'no-empty-function': "off"; + '@typescript-eslint/no-empty-function': "error"; + '@typescript-eslint/no-inferrable-types': "error"; + '@typescript-eslint/non-nullable-type-assertion-style': "error"; + '@typescript-eslint/prefer-find': "error"; + '@typescript-eslint/prefer-for-of': "error"; + '@typescript-eslint/prefer-function-type': "error"; + '@typescript-eslint/prefer-includes': "error"; + '@typescript-eslint/prefer-nullish-coalescing': "error"; + '@typescript-eslint/prefer-optional-chain': "error"; + '@typescript-eslint/prefer-regexp-exec': "error"; + '@typescript-eslint/prefer-string-starts-ends-with': "error"; + }; + }; + 'stylistic-type-checked-only': { + extends: string[]; + rules: { + 'dot-notation': "off"; + '@typescript-eslint/dot-notation': "error"; + '@typescript-eslint/non-nullable-type-assertion-style': "error"; + '@typescript-eslint/prefer-find': "error"; + '@typescript-eslint/prefer-includes': "error"; + '@typescript-eslint/prefer-nullish-coalescing': "error"; + '@typescript-eslint/prefer-optional-chain': "error"; + '@typescript-eslint/prefer-regexp-exec': "error"; + '@typescript-eslint/prefer-string-starts-ends-with': "error"; + }; + }; + }; + meta: { + name: string; + version: string; + }; + rules: { + 'adjacent-overload-signatures': TSESLint.RuleModule<"adjacentSignature", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'array-type': TSESLint.RuleModule; + 'await-thenable': TSESLint.RuleModule; + 'ban-ts-comment': TSESLint.RuleModule; + 'ban-tslint-comment': TSESLint.RuleModule<"commentDetected", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'class-literal-property-style': TSESLint.RuleModule; + 'class-methods-use-this': TSESLint.RuleModule<"missingThis", import("./rules/class-methods-use-this").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'consistent-generic-constructors': TSESLint.RuleModule; + 'consistent-indexed-object-style': TSESLint.RuleModule; + 'consistent-return': TSESLint.RuleModule<"missingReturn" | "missingReturnValue" | "unexpectedReturnValue", [({ + treatUndefinedAsUnspecified?: boolean; + } | undefined)?], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'consistent-type-assertions': TSESLint.RuleModule; + 'consistent-type-definitions': TSESLint.RuleModule<"interfaceOverType" | "typeOverInterface", [string], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'consistent-type-exports': TSESLint.RuleModule; + 'consistent-type-imports': TSESLint.RuleModule; + 'default-param-last': TSESLint.RuleModule<"shouldBeLast", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'dot-notation': TSESLint.RuleModule<"useBrackets" | "useDot", [{ + allowIndexSignaturePropertyAccess?: boolean; + allowKeywords?: boolean; + allowPattern?: string; + allowPrivateClassPropertyAccess?: boolean; + allowProtectedClassPropertyAccess?: boolean; + }], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'explicit-function-return-type': TSESLint.RuleModule<"missingReturnType", import("./rules/explicit-function-return-type").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'explicit-member-accessibility': TSESLint.RuleModule; + 'explicit-module-boundary-types': TSESLint.RuleModule; + 'init-declarations': TSESLint.RuleModule<"initialized" | "notInitialized", ["always" | "never", ({ + ignoreForLoopInit?: boolean; + } | undefined)?], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'max-params': TSESLint.RuleModule<"exceed", ({ + countVoidThis?: boolean; + max: number; + } | { + countVoidThis?: boolean; + maximum: number; + })[], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'member-ordering': TSESLint.RuleModule; + 'method-signature-style': TSESLint.RuleModule; + 'naming-convention': TSESLint.RuleModule; + 'no-array-constructor': TSESLint.RuleModule<"useLiteral", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-array-delete': TSESLint.RuleModule; + 'no-base-to-string': TSESLint.RuleModule; + 'no-confusing-non-null-assertion': TSESLint.RuleModule; + 'no-confusing-void-expression': TSESLint.RuleModule; + 'no-deprecated': TSESLint.RuleModule<"deprecated" | "deprecatedWithReason", [{ + allow?: import("@typescript-eslint/type-utils").TypeOrValueSpecifier[]; + }], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-dupe-class-members': TSESLint.RuleModule<"unexpected", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-duplicate-enum-values': TSESLint.RuleModule<"duplicateValue", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-duplicate-type-constituents': TSESLint.RuleModule; + 'no-dynamic-delete': TSESLint.RuleModule<"dynamicDelete", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-empty-function': TSESLint.RuleModule<"unexpected" | "suggestComment", [{ + allow?: string[]; + }], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-empty-interface': TSESLint.RuleModule; + 'no-empty-object-type': TSESLint.RuleModule; + 'no-explicit-any': TSESLint.RuleModule; + 'no-extra-non-null-assertion': TSESLint.RuleModule<"noExtraNonNullAssertion", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-extraneous-class': TSESLint.RuleModule; + 'no-floating-promises': TSESLint.RuleModule; + 'no-for-in-array': TSESLint.RuleModule<"forInViolation", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-implied-eval': TSESLint.RuleModule<"noFunctionConstructor" | "noImpliedEvalError", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-import-type-side-effects': TSESLint.RuleModule<"useTopLevelQualifier", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-inferrable-types': TSESLint.RuleModule<"noInferrableType", import("./rules/no-inferrable-types").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-invalid-this': TSESLint.RuleModule<"unexpectedThis", [({ + capIsConstructor?: boolean; + } | undefined)?], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-invalid-void-type': TSESLint.RuleModule; + 'no-loop-func': TSESLint.RuleModule<"unsafeRefs", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-loss-of-precision': TSESLint.RuleModule<"noLossOfPrecision", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-magic-numbers': TSESLint.RuleModule<"noMagic", [{ + detectObjects?: boolean; + enforceConst?: boolean; + ignore?: (number | string)[]; + ignoreArrayIndexes?: boolean; + ignoreEnums?: boolean; + ignoreNumericLiteralTypes?: boolean; + ignoreReadonlyClassProperties?: boolean; + ignoreTypeIndexes?: boolean; + }], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-meaningless-void-operator': TSESLint.RuleModule<"meaninglessVoidOperator" | "removeVoid", import("./rules/no-meaningless-void-operator").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-misused-new': TSESLint.RuleModule<"errorMessageClass" | "errorMessageInterface", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-misused-promises': TSESLint.RuleModule; + 'no-misused-spread': TSESLint.RuleModule<"addAwait" | "noArraySpreadInObject" | "noClassDeclarationSpreadInObject" | "noClassInstanceSpreadInObject" | "noFunctionSpreadInObject" | "noIterableSpreadInObject" | "noMapSpreadInObject" | "noPromiseSpreadInObject" | "noStringSpread" | "replaceMapSpreadInObject", [{ + allow?: import("@typescript-eslint/type-utils").TypeOrValueSpecifier[]; + }], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-mixed-enums': TSESLint.RuleModule<"mixed", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-namespace': TSESLint.RuleModule<"moduleSyntaxIsPreferred", import("./rules/no-namespace").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-non-null-asserted-nullish-coalescing': TSESLint.RuleModule<"noNonNullAssertedNullishCoalescing" | "suggestRemovingNonNull", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-non-null-asserted-optional-chain': TSESLint.RuleModule<"suggestRemovingNonNull" | "noNonNullOptionalChain", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-non-null-assertion': TSESLint.RuleModule; + 'no-redeclare': TSESLint.RuleModule; + 'no-redundant-type-constituents': TSESLint.RuleModule<"overrides" | "errorTypeOverrides" | "literalOverridden" | "overridden" | "primitiveOverridden", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-require-imports': TSESLint.RuleModule<"noRequireImports", import("./rules/no-require-imports").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-restricted-imports': TSESLint.RuleModule<"everything" | "everythingWithCustomMessage" | "importName" | "importNameWithCustomMessage" | "path" | "pathWithCustomMessage" | "patterns" | "patternWithCustomMessage", [import("eslint/lib/rules/no-restricted-imports").ObjectOfPathsAndPatterns] | import("eslint/lib/rules/no-restricted-imports").ArrayOfStringOrObject, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-restricted-types': TSESLint.RuleModule; + 'no-shadow': TSESLint.RuleModule; + 'no-this-alias': TSESLint.RuleModule; + 'no-type-alias': TSESLint.RuleModule; + 'no-unnecessary-boolean-literal-compare': TSESLint.RuleModule; + 'no-unnecessary-condition': TSESLint.RuleModule; + 'no-unnecessary-parameter-property-assignment': TSESLint.RuleModule<"unnecessaryAssign", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unnecessary-qualifier': TSESLint.RuleModule<"unnecessaryQualifier", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unnecessary-template-expression': TSESLint.RuleModule<"noUnnecessaryTemplateExpression", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unnecessary-type-arguments': TSESLint.RuleModule<"unnecessaryTypeParameter", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unnecessary-type-assertion': TSESLint.RuleModule; + 'no-unnecessary-type-constraint': TSESLint.RuleModule<"removeUnnecessaryConstraint" | "unnecessaryConstraint", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unnecessary-type-conversion': TSESLint.RuleModule<"suggestRemove" | "suggestSatisfies" | "unnecessaryTypeConversion", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unnecessary-type-parameters': TSESLint.RuleModule<"replaceUsagesWithConstraint" | "sole", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unsafe-argument': TSESLint.RuleModule; + 'no-unsafe-assignment': TSESLint.RuleModule<"unsafeArraySpread" | "anyAssignment" | "anyAssignmentThis" | "unsafeArrayPattern" | "unsafeArrayPatternFromTuple" | "unsafeAssignment" | "unsafeObjectPattern", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unsafe-call': TSESLint.RuleModule; + 'no-unsafe-declaration-merging': TSESLint.RuleModule<"unsafeMerging", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unsafe-enum-comparison': TSESLint.RuleModule<"mismatchedCase" | "mismatchedCondition" | "replaceValueWithEnum", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unsafe-function-type': TSESLint.RuleModule<"bannedFunctionType", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unsafe-member-access': TSESLint.RuleModule<"unsafeComputedMemberAccess" | "unsafeMemberExpression" | "unsafeThisMemberExpression", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unsafe-return': TSESLint.RuleModule<"unsafeReturn" | "unsafeReturnAssignment" | "unsafeReturnThis", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unsafe-type-assertion': TSESLint.RuleModule<"unsafeOfAnyTypeAssertion" | "unsafeToAnyTypeAssertion" | "unsafeToUnconstrainedTypeAssertion" | "unsafeTypeAssertion" | "unsafeTypeAssertionAssignableToConstraint", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unsafe-unary-minus': TSESLint.RuleModule<"unaryMinus", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unused-expressions': TSESLint.RuleModule<"unusedExpression", [{ + allowShortCircuit?: boolean; + allowTaggedTemplates?: boolean; + allowTernary?: boolean; + }], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-unused-vars': TSESLint.RuleModule; + 'no-use-before-define': TSESLint.RuleModule<"noUseBeforeDefine", import("./rules/no-use-before-define").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-useless-constructor': TSESLint.RuleModule<"noUselessConstructor" | "removeConstructor", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-useless-empty-export': TSESLint.RuleModule<"uselessExport", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-var-requires': TSESLint.RuleModule<"noVarReqs", import("./rules/no-var-requires").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'no-wrapper-object-types': TSESLint.RuleModule<"bannedClassType", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'non-nullable-type-assertion-style': TSESLint.RuleModule<"preferNonNullAssertion", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'only-throw-error': TSESLint.RuleModule; + 'parameter-properties': TSESLint.RuleModule; + 'prefer-as-const': TSESLint.RuleModule<"preferConstAssertion" | "variableConstAssertion" | "variableSuggest", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-destructuring': TSESLint.RuleModule<"preferDestructuring", import("./rules/prefer-destructuring").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-enum-initializers': TSESLint.RuleModule; + 'prefer-find': TSESLint.RuleModule<"preferFind" | "preferFindSuggestion", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-for-of': TSESLint.RuleModule<"preferForOf", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-function-type': TSESLint.RuleModule<"functionTypeOverCallableType" | "unexpectedThisOnFunctionOnlyInterface", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-includes': TSESLint.RuleModule<"preferIncludes" | "preferStringIncludes", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-literal-enum-member': TSESLint.RuleModule<"notLiteral" | "notLiteralOrBitwiseExpression", [{ + allowBitwiseExpressions: boolean; + }], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-namespace-keyword': TSESLint.RuleModule<"useNamespace", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-nullish-coalescing': TSESLint.RuleModule; + 'prefer-optional-chain': TSESLint.RuleModule; + 'prefer-promise-reject-errors': TSESLint.RuleModule<"rejectAnError", import("./rules/prefer-promise-reject-errors").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-readonly': TSESLint.RuleModule<"preferReadonly", import("./rules/prefer-readonly").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-readonly-parameter-types': TSESLint.RuleModule<"shouldBeReadonly", import("./rules/prefer-readonly-parameter-types").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-reduce-type-parameter': TSESLint.RuleModule<"preferTypeParameter", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-regexp-exec': TSESLint.RuleModule<"regExpExecOverStringMatch", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-return-this-type': TSESLint.RuleModule<"useThisType", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'prefer-string-starts-ends-with': TSESLint.RuleModule; + 'prefer-ts-expect-error': TSESLint.RuleModule<"preferExpectErrorComment", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'promise-function-async': TSESLint.RuleModule; + 'related-getter-setter-pairs': TSESLint.RuleModule<"mismatch", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'require-array-sort-compare': TSESLint.RuleModule<"requireCompare", import("./rules/require-array-sort-compare").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'require-await': TSESLint.RuleModule<"missingAwait" | "removeAsync", [], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'restrict-plus-operands': TSESLint.RuleModule; + 'restrict-template-expressions': TSESLint.RuleModule<"invalidType", import("./rules/restrict-template-expressions").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'return-await': TSESLint.RuleModule<"disallowedPromiseAwait" | "disallowedPromiseAwaitSuggestion" | "nonPromiseAwait" | "requiredPromiseAwait" | "requiredPromiseAwaitSuggestion", [string], import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + 'sort-type-constituents': TSESLint.RuleModule; + 'strict-boolean-expressions': TSESLint.RuleModule; + 'switch-exhaustiveness-check': TSESLint.RuleModule; + 'triple-slash-reference': TSESLint.RuleModule<"tripleSlashReference", import("./rules/triple-slash-reference").Options, import("../rules").ESLintPluginDocs, TSESLint.RuleListener>; + typedef: TSESLint.RuleModule; + 'unbound-method': TSESLint.RuleModule; + 'unified-signatures': TSESLint.RuleModule; + 'use-unknown-in-catch-callback-variable': TSESLint.RuleModule; + }; + }; +}; +export = _default; +//# sourceMappingURL=raw-plugin.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.d.ts.map new file mode 100644 index 0000000..13a8001 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"raw-plugin.d.ts","sourceRoot":"","sources":["../src/raw-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAU,MAAM,oCAAoC,CAAC;;;;;;;;;;;;;;;;;;wDAetD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAqCpB,mEAAmE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDvE,kBAIE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.js new file mode 100644 index 0000000..334f4ff --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.js @@ -0,0 +1,121 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const parserBase = __importStar(require("@typescript-eslint/parser")); +const all_1 = __importDefault(require("./configs/eslintrc/all")); +const base_1 = __importDefault(require("./configs/eslintrc/base")); +const disable_type_checked_1 = __importDefault(require("./configs/eslintrc/disable-type-checked")); +const eslint_recommended_1 = __importDefault(require("./configs/eslintrc/eslint-recommended")); +const recommended_1 = __importDefault(require("./configs/eslintrc/recommended")); +const recommended_type_checked_1 = __importDefault(require("./configs/eslintrc/recommended-type-checked")); +const recommended_type_checked_only_1 = __importDefault(require("./configs/eslintrc/recommended-type-checked-only")); +const strict_1 = __importDefault(require("./configs/eslintrc/strict")); +const strict_type_checked_1 = __importDefault(require("./configs/eslintrc/strict-type-checked")); +const strict_type_checked_only_1 = __importDefault(require("./configs/eslintrc/strict-type-checked-only")); +const stylistic_1 = __importDefault(require("./configs/eslintrc/stylistic")); +const stylistic_type_checked_1 = __importDefault(require("./configs/eslintrc/stylistic-type-checked")); +const stylistic_type_checked_only_1 = __importDefault(require("./configs/eslintrc/stylistic-type-checked-only")); +const all_2 = __importDefault(require("./configs/flat/all")); +const base_2 = __importDefault(require("./configs/flat/base")); +const disable_type_checked_2 = __importDefault(require("./configs/flat/disable-type-checked")); +const eslint_recommended_2 = __importDefault(require("./configs/flat/eslint-recommended")); +const recommended_2 = __importDefault(require("./configs/flat/recommended")); +const recommended_type_checked_2 = __importDefault(require("./configs/flat/recommended-type-checked")); +const recommended_type_checked_only_2 = __importDefault(require("./configs/flat/recommended-type-checked-only")); +const strict_2 = __importDefault(require("./configs/flat/strict")); +const strict_type_checked_2 = __importDefault(require("./configs/flat/strict-type-checked")); +const strict_type_checked_only_2 = __importDefault(require("./configs/flat/strict-type-checked-only")); +const stylistic_2 = __importDefault(require("./configs/flat/stylistic")); +const stylistic_type_checked_2 = __importDefault(require("./configs/flat/stylistic-type-checked")); +const stylistic_type_checked_only_2 = __importDefault(require("./configs/flat/stylistic-type-checked-only")); +const rules_1 = __importDefault(require("./rules")); +const parser = { + meta: parserBase.meta, + parseForESLint: parserBase.parseForESLint, +}; +// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder +const { name, version } = require('../package.json'); +const plugin = { + // not fully initialized yet. + // See https://eslint.org/docs/latest/extend/plugins#configs-in-plugins + configs: { + all: all_1.default, + base: base_1.default, + 'disable-type-checked': disable_type_checked_1.default, + 'eslint-recommended': eslint_recommended_1.default, + recommended: recommended_1.default, + /** @deprecated - please use "recommended-type-checked" instead. */ + 'recommended-requiring-type-checking': recommended_type_checked_1.default, + 'recommended-type-checked': recommended_type_checked_1.default, + 'recommended-type-checked-only': recommended_type_checked_only_1.default, + strict: strict_1.default, + 'strict-type-checked': strict_type_checked_1.default, + 'strict-type-checked-only': strict_type_checked_only_1.default, + stylistic: stylistic_1.default, + 'stylistic-type-checked': stylistic_type_checked_1.default, + 'stylistic-type-checked-only': stylistic_type_checked_only_1.default, + }, + meta: { + name, + version, + }, + rules: rules_1.default, +}; +// @ts-expect-error -- upstream type incompatibility stuff +const flatPlugin = plugin; +// included due to https://github.com/eslint/eslint/issues/19513 +const flatConfigs = { + 'flat/all': (0, all_2.default)(flatPlugin, parser), + 'flat/base': (0, base_2.default)(flatPlugin, parser), + 'flat/disable-type-checked': (0, disable_type_checked_2.default)(flatPlugin, parser), + 'flat/eslint-recommended': (0, eslint_recommended_2.default)(flatPlugin, parser), + 'flat/recommended': (0, recommended_2.default)(flatPlugin, parser), + 'flat/recommended-type-checked': (0, recommended_type_checked_2.default)(flatPlugin, parser), + 'flat/recommended-type-checked-only': (0, recommended_type_checked_only_2.default)(flatPlugin, parser), + 'flat/strict': (0, strict_2.default)(flatPlugin, parser), + 'flat/strict-type-checked': (0, strict_type_checked_2.default)(flatPlugin, parser), + 'flat/strict-type-checked-only': (0, strict_type_checked_only_2.default)(flatPlugin, parser), + 'flat/stylistic': (0, stylistic_2.default)(flatPlugin, parser), + 'flat/stylistic-type-checked': (0, stylistic_type_checked_2.default)(flatPlugin, parser), + 'flat/stylistic-type-checked-only': (0, stylistic_type_checked_only_2.default)(flatPlugin, parser), +}; +Object.assign(plugin.configs, flatConfigs); +module.exports = { + flatConfigs, + parser, + plugin, +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.d.ts new file mode 100644 index 0000000..cf32b1b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"adjacentSignature", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=adjacent-overload-signatures.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.d.ts.map new file mode 100644 index 0000000..4c0e0d5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"adjacent-overload-signatures.d.ts","sourceRoot":"","sources":["../../src/rules/adjacent-overload-signatures.ts"],"names":[],"mappings":";AAuBA,wBA8IG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js new file mode 100644 index 0000000..598a8b3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js @@ -0,0 +1,124 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'adjacent-overload-signatures', + meta: { + type: 'suggestion', + docs: { + description: 'Require that function overload signatures be consecutive', + recommended: 'stylistic', + }, + messages: { + adjacentSignature: 'All {{name}} signatures should be adjacent.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + /** + * Gets the name and attribute of the member being processed. + * @param member the member being processed. + * @returns the name and attribute of the member or null if it's a member not relevant to the rule. + */ + function getMemberMethod(member) { + switch (member.type) { + case utils_1.AST_NODE_TYPES.ExportDefaultDeclaration: + case utils_1.AST_NODE_TYPES.ExportNamedDeclaration: { + // export statements (e.g. export { a };) + // have no declarations, so ignore them + if (!member.declaration) { + return null; + } + return getMemberMethod(member.declaration); + } + case utils_1.AST_NODE_TYPES.TSDeclareFunction: + case utils_1.AST_NODE_TYPES.FunctionDeclaration: { + const name = member.id?.name ?? null; + if (name == null) { + return null; + } + return { + name, + type: util_1.MemberNameType.Normal, + callSignature: false, + }; + } + case utils_1.AST_NODE_TYPES.TSMethodSignature: + case utils_1.AST_NODE_TYPES.MethodDefinition: + return { + ...(0, util_1.getNameFromMember)(member, context.sourceCode), + callSignature: false, + static: member.static, + }; + case utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration: + return { + name: 'call', + type: util_1.MemberNameType.Normal, + callSignature: true, + }; + case utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration: + return { + name: 'new', + type: util_1.MemberNameType.Normal, + callSignature: false, + }; + } + return null; + } + function isSameMethod(method1, method2) { + return (!!method2 && + method1.name === method2.name && + method1.static === method2.static && + method1.callSignature === method2.callSignature && + method1.type === method2.type); + } + function getMembers(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.ClassBody: + case utils_1.AST_NODE_TYPES.Program: + case utils_1.AST_NODE_TYPES.TSModuleBlock: + case utils_1.AST_NODE_TYPES.TSInterfaceBody: + case utils_1.AST_NODE_TYPES.BlockStatement: + return node.body; + case utils_1.AST_NODE_TYPES.TSTypeLiteral: + return node.members; + } + } + function checkBodyForOverloadMethods(node) { + const members = getMembers(node); + let lastMethod = null; + const seenMethods = []; + members.forEach(member => { + const method = getMemberMethod(member); + if (method == null) { + lastMethod = null; + return; + } + const index = seenMethods.findIndex(seenMethod => isSameMethod(method, seenMethod)); + if (index > -1 && !isSameMethod(method, lastMethod)) { + context.report({ + node: member, + messageId: 'adjacentSignature', + data: { + name: `${method.static ? 'static ' : ''}${method.name}`, + }, + }); + } + else if (index === -1) { + seenMethods.push(method); + } + lastMethod = method; + }); + } + return { + BlockStatement: checkBodyForOverloadMethods, + ClassBody: checkBodyForOverloadMethods, + Program: checkBodyForOverloadMethods, + TSInterfaceBody: checkBodyForOverloadMethods, + TSModuleBlock: checkBodyForOverloadMethods, + TSTypeLiteral: checkBodyForOverloadMethods, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.d.ts new file mode 100644 index 0000000..ce0e3d4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.d.ts @@ -0,0 +1,11 @@ +export type OptionString = 'array' | 'array-simple' | 'generic'; +export type Options = [ + { + default: OptionString; + readonly?: OptionString; + } +]; +export type MessageIds = 'errorStringArray' | 'errorStringArrayReadonly' | 'errorStringArraySimple' | 'errorStringArraySimpleReadonly' | 'errorStringGeneric' | 'errorStringGenericSimple'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=array-type.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.d.ts.map new file mode 100644 index 0000000..7e9cf06 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"array-type.d.ts","sourceRoot":"","sources":["../../src/rules/array-type.ts"],"names":[],"mappings":"AA2EA,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,cAAc,GAAG,SAAS,CAAC;AAChE,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,OAAO,EAAE,YAAY,CAAC;QACtB,QAAQ,CAAC,EAAE,YAAY,CAAC;KACzB;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAClB,kBAAkB,GAClB,0BAA0B,GAC1B,wBAAwB,GACxB,gCAAgC,GAChC,oBAAoB,GACpB,0BAA0B,CAAC;;AAE/B,wBAgNG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js new file mode 100644 index 0000000..18e39db --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js @@ -0,0 +1,232 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +/** + * Check whatever node can be considered as simple + * @param node the node to be evaluated. + */ +function isSimpleType(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.Identifier: + case utils_1.AST_NODE_TYPES.TSAnyKeyword: + case utils_1.AST_NODE_TYPES.TSBooleanKeyword: + case utils_1.AST_NODE_TYPES.TSNeverKeyword: + case utils_1.AST_NODE_TYPES.TSNumberKeyword: + case utils_1.AST_NODE_TYPES.TSBigIntKeyword: + case utils_1.AST_NODE_TYPES.TSObjectKeyword: + case utils_1.AST_NODE_TYPES.TSStringKeyword: + case utils_1.AST_NODE_TYPES.TSSymbolKeyword: + case utils_1.AST_NODE_TYPES.TSUnknownKeyword: + case utils_1.AST_NODE_TYPES.TSVoidKeyword: + case utils_1.AST_NODE_TYPES.TSNullKeyword: + case utils_1.AST_NODE_TYPES.TSArrayType: + case utils_1.AST_NODE_TYPES.TSUndefinedKeyword: + case utils_1.AST_NODE_TYPES.TSThisType: + case utils_1.AST_NODE_TYPES.TSQualifiedName: + return true; + case utils_1.AST_NODE_TYPES.TSTypeReference: + if (node.typeName.type === utils_1.AST_NODE_TYPES.Identifier && + node.typeName.name === 'Array') { + if (!node.typeArguments) { + return true; + } + if (node.typeArguments.params.length === 1) { + return isSimpleType(node.typeArguments.params[0]); + } + } + else { + if (node.typeArguments) { + return false; + } + return isSimpleType(node.typeName); + } + return false; + default: + return false; + } +} +/** + * Check if node needs parentheses + * @param node the node to be evaluated. + */ +function typeNeedsParentheses(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.TSTypeReference: + return typeNeedsParentheses(node.typeName); + case utils_1.AST_NODE_TYPES.TSUnionType: + case utils_1.AST_NODE_TYPES.TSFunctionType: + case utils_1.AST_NODE_TYPES.TSIntersectionType: + case utils_1.AST_NODE_TYPES.TSTypeOperator: + case utils_1.AST_NODE_TYPES.TSInferType: + case utils_1.AST_NODE_TYPES.TSConstructorType: + case utils_1.AST_NODE_TYPES.TSConditionalType: + return true; + case utils_1.AST_NODE_TYPES.Identifier: + return node.name === 'ReadonlyArray'; + default: + return false; + } +} +exports.default = (0, util_1.createRule)({ + name: 'array-type', + meta: { + type: 'suggestion', + docs: { + description: 'Require consistently using either `T[]` or `Array` for arrays', + recommended: 'stylistic', + }, + fixable: 'code', + messages: { + errorStringArray: "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}[]' instead.", + errorStringArrayReadonly: "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}' instead.", + errorStringArraySimple: "Array type using '{{className}}<{{type}}>' is forbidden for simple types. Use '{{readonlyPrefix}}{{type}}[]' instead.", + errorStringArraySimpleReadonly: "Array type using '{{className}}<{{type}}>' is forbidden for simple types. Use '{{readonlyPrefix}}{{type}}' instead.", + errorStringGeneric: "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden. Use '{{className}}<{{type}}>' instead.", + errorStringGenericSimple: "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden for non-simple types. Use '{{className}}<{{type}}>' instead.", + }, + schema: [ + { + type: 'object', + $defs: { + arrayOption: { + type: 'string', + enum: ['array', 'generic', 'array-simple'], + }, + }, + additionalProperties: false, + properties: { + default: { + $ref: '#/items/0/$defs/arrayOption', + description: 'The array type expected for mutable cases.', + }, + readonly: { + $ref: '#/items/0/$defs/arrayOption', + description: 'The array type expected for readonly cases. If omitted, the value for `default` will be used.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + default: 'array', + }, + ], + create(context, [options]) { + const defaultOption = options.default; + const readonlyOption = options.readonly ?? defaultOption; + /** + * @param node the node to be evaluated. + */ + function getMessageType(node) { + if (isSimpleType(node)) { + return context.sourceCode.getText(node); + } + return 'T'; + } + return { + TSArrayType(node) { + const isReadonly = node.parent.type === utils_1.AST_NODE_TYPES.TSTypeOperator && + node.parent.operator === 'readonly'; + const currentOption = isReadonly ? readonlyOption : defaultOption; + if (currentOption === 'array' || + (currentOption === 'array-simple' && isSimpleType(node.elementType))) { + return; + } + const messageId = currentOption === 'generic' + ? 'errorStringGeneric' + : 'errorStringGenericSimple'; + const errorNode = isReadonly ? node.parent : node; + context.report({ + node: errorNode, + messageId, + data: { + type: getMessageType(node.elementType), + className: isReadonly ? 'ReadonlyArray' : 'Array', + readonlyPrefix: isReadonly ? 'readonly ' : '', + }, + fix(fixer) { + const typeNode = node.elementType; + const arrayType = isReadonly ? 'ReadonlyArray' : 'Array'; + return [ + fixer.replaceTextRange([errorNode.range[0], typeNode.range[0]], `${arrayType}<`), + fixer.replaceTextRange([typeNode.range[1], errorNode.range[1]], '>'), + ]; + }, + }); + }, + TSTypeReference(node) { + if (node.typeName.type !== utils_1.AST_NODE_TYPES.Identifier || + !(node.typeName.name === 'Array' || + node.typeName.name === 'ReadonlyArray' || + node.typeName.name === 'Readonly') || + (node.typeName.name === 'Readonly' && + node.typeArguments?.params[0].type !== utils_1.AST_NODE_TYPES.TSArrayType)) { + return; + } + const isReadonlyWithGenericArrayType = node.typeName.name === 'Readonly' && + node.typeArguments?.params[0].type === utils_1.AST_NODE_TYPES.TSArrayType; + const isReadonlyArrayType = node.typeName.name === 'ReadonlyArray' || + isReadonlyWithGenericArrayType; + const currentOption = isReadonlyArrayType + ? readonlyOption + : defaultOption; + if (currentOption === 'generic') { + return; + } + const readonlyPrefix = isReadonlyArrayType ? 'readonly ' : ''; + const typeParams = node.typeArguments?.params; + const messageId = currentOption === 'array' + ? isReadonlyWithGenericArrayType + ? 'errorStringArrayReadonly' + : 'errorStringArray' + : isReadonlyArrayType && node.typeName.name !== 'ReadonlyArray' + ? 'errorStringArraySimpleReadonly' + : 'errorStringArraySimple'; + if (!typeParams) { + // Create an 'any' array + context.report({ + node, + messageId, + data: { + type: 'any', + className: isReadonlyArrayType ? 'ReadonlyArray' : 'Array', + readonlyPrefix, + }, + fix(fixer) { + return fixer.replaceText(node, `${readonlyPrefix}any[]`); + }, + }); + return; + } + if (typeParams.length !== 1 || + (currentOption === 'array-simple' && !isSimpleType(typeParams[0]))) { + return; + } + const type = typeParams[0]; + const typeParens = typeNeedsParentheses(type); + const parentParens = readonlyPrefix && + node.parent.type === utils_1.AST_NODE_TYPES.TSArrayType && + !(0, util_1.isParenthesized)(node.parent.elementType, context.sourceCode); + const start = `${parentParens ? '(' : ''}${readonlyPrefix}${typeParens ? '(' : ''}`; + const end = `${typeParens ? ')' : ''}${isReadonlyWithGenericArrayType ? '' : `[]`}${parentParens ? ')' : ''}`; + context.report({ + node, + messageId, + data: { + type: getMessageType(type), + className: isReadonlyArrayType ? node.typeName.name : 'Array', + readonlyPrefix, + }, + fix(fixer) { + return [ + fixer.replaceTextRange([node.range[0], type.range[0]], start), + fixer.replaceTextRange([type.range[1], node.range[1]], end), + ]; + }, + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.d.ts new file mode 100644 index 0000000..b244027 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.d.ts @@ -0,0 +1,5 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type MessageId = 'await' | 'awaitUsingOfNonAsyncDisposable' | 'convertToOrdinaryFor' | 'forAwaitOfNonAsyncIterable' | 'invalidPromiseAggregatorInput' | 'removeAwait'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=await-thenable.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.d.ts.map new file mode 100644 index 0000000..2145eb5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"await-thenable.d.ts","sourceRoot":"","sources":["../../src/rules/await-thenable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAqBzD,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,gCAAgC,GAChC,sBAAsB,GACtB,4BAA4B,GAC5B,+BAA+B,GAC/B,aAAa,CAAC;;AAElB,wBA0MG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js new file mode 100644 index 0000000..4d983b0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js @@ -0,0 +1,228 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const util_1 = require("../util"); +const getForStatementHeadLoc_1 = require("../util/getForStatementHeadLoc"); +const isPromiseAggregatorMethod_1 = require("../util/isPromiseAggregatorMethod"); +exports.default = (0, util_1.createRule)({ + name: 'await-thenable', + meta: { + type: 'problem', + docs: { + description: 'Disallow awaiting a value that is not a Thenable', + recommended: 'recommended', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + await: 'Unexpected `await` of a non-Promise (non-"Thenable") value.', + awaitUsingOfNonAsyncDisposable: 'Unexpected `await using` of a value that is not async disposable.', + convertToOrdinaryFor: 'Convert to an ordinary `for...of` loop.', + forAwaitOfNonAsyncIterable: 'Unexpected `for await...of` of a value that is not async iterable.', + invalidPromiseAggregatorInput: 'Unexpected iterable of non-Promise (non-"Thenable") values passed to promise aggregator.', + removeAwait: 'Remove unnecessary `await`.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + return { + AwaitExpression(node) { + const awaitArgumentEsNode = node.argument; + const awaitArgumentType = services.getTypeAtLocation(awaitArgumentEsNode); + const awaitArgumentTsNode = services.esTreeNodeToTSNodeMap.get(awaitArgumentEsNode); + const certainty = (0, util_1.needsToBeAwaited)(checker, awaitArgumentTsNode, awaitArgumentType); + if (certainty === util_1.Awaitable.Never) { + context.report({ + node, + messageId: 'await', + suggest: [ + { + messageId: 'removeAwait', + fix(fixer) { + const awaitKeyword = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isAwaitKeyword), util_1.NullThrowsReasons.MissingToken('await', 'await expression')); + return fixer.remove(awaitKeyword); + }, + }, + ], + }); + } + }, + CallExpression(node) { + if (!(0, isPromiseAggregatorMethod_1.isPromiseAggregatorMethod)(context, services, node)) { + return; + } + const argument = node.arguments.at(0); + if (argument == null) { + return; + } + if (argument.type === utils_1.TSESTree.AST_NODE_TYPES.ArrayExpression) { + for (const element of argument.elements) { + if (element == null) { + continue; + } + const type = (0, util_1.getConstrainedTypeAtLocation)(services, element); + const tsNode = services.esTreeNodeToTSNodeMap.get(element); + if (isAlwaysNonAwaitableType(type, tsNode, checker)) { + context.report({ + node: element, + messageId: 'invalidPromiseAggregatorInput', + }); + } + } + return; + } + const type = (0, util_1.getConstrainedTypeAtLocation)(services, argument); + if (isInvalidPromiseAggregatorInput(checker, services.esTreeNodeToTSNodeMap.get(argument), type)) { + context.report({ + node: argument, + messageId: 'invalidPromiseAggregatorInput', + }); + } + }, + 'ForOfStatement[await=true]'(node) { + const type = services.getTypeAtLocation(node.right); + if ((0, util_1.isTypeAnyType)(type)) { + return; + } + const hasAsyncIteratorSymbol = tsutils + .unionConstituents(type) + .some(typePart => tsutils.getWellKnownSymbolPropertyOfType(typePart, 'asyncIterator', checker) != null); + if (!hasAsyncIteratorSymbol) { + context.report({ + loc: (0, getForStatementHeadLoc_1.getForStatementHeadLoc)(context.sourceCode, node), + messageId: 'forAwaitOfNonAsyncIterable', + suggest: [ + // Note that this suggestion causes broken code for sync iterables + // of promises, since the loop variable is not awaited. + { + messageId: 'convertToOrdinaryFor', + fix(fixer) { + const awaitToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isAwaitKeyword), util_1.NullThrowsReasons.MissingToken('await', 'for await loop')); + return fixer.remove(awaitToken); + }, + }, + ], + }); + } + }, + 'VariableDeclaration[kind="await using"]'(node) { + for (const declarator of node.declarations) { + const init = declarator.init; + if (init == null) { + continue; + } + const type = services.getTypeAtLocation(init); + if ((0, util_1.isTypeAnyType)(type)) { + continue; + } + const hasAsyncDisposeSymbol = tsutils + .unionConstituents(type) + .some(typePart => tsutils.getWellKnownSymbolPropertyOfType(typePart, 'asyncDispose', checker) != null); + if (!hasAsyncDisposeSymbol) { + context.report({ + node: init, + messageId: 'awaitUsingOfNonAsyncDisposable', + // let the user figure out what to do if there's + // await using a = b, c = d, e = f; + // it's rare and not worth the complexity to handle. + ...(0, util_1.getFixOrSuggest)({ + fixOrSuggest: node.declarations.length === 1 ? 'suggest' : 'none', + suggestion: { + messageId: 'removeAwait', + fix(fixer) { + const awaitToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isAwaitKeyword), util_1.NullThrowsReasons.MissingToken('await', 'await using')); + return fixer.remove(awaitToken); + }, + }, + }), + }); + } + } + }, + }; + }, +}); +function isInvalidPromiseAggregatorInput(checker, node, type) { + // non array/tuple/iterable types already show up as a type error + if (!isIterable(type, checker)) { + return false; + } + for (const part of tsutils.unionConstituents(type)) { + const valueTypes = getValueTypesOfArrayLike(part, checker); + if (valueTypes != null) { + for (const typeArgument of valueTypes) { + if (containsNonAwaitableType(typeArgument, node, checker)) { + return true; + } + } + } + } + return false; +} +function getValueTypesOfArrayLike(type, checker) { + if (checker.isTupleType(type)) { + return checker.getTypeArguments(type); + } + if (checker.isArrayLikeType(type)) { + return [ + (0, util_1.nullThrows)(type.getNumberIndexType(), 'number index type should exist on an array-like'), + ]; + } + // `Iterable<...>` + if (tsutils.isTypeReference(type)) { + return checker.getTypeArguments(type).slice(0, 1); + } + return null; +} +function isAlwaysNonAwaitableType(type, node, checker) { + return tsutils + .unionConstituents(type) + .every(typeArgumentPart => (0, util_1.needsToBeAwaited)(checker, node, typeArgumentPart) === util_1.Awaitable.Never); +} +function containsNonAwaitableType(type, node, checker) { + return tsutils + .unionConstituents(type) + .some(typeArgumentPart => (0, util_1.needsToBeAwaited)(checker, node, typeArgumentPart) === util_1.Awaitable.Never); +} +function isIterable(type, checker) { + return tsutils + .unionConstituents(type) + .every(part => !!tsutils.getWellKnownSymbolPropertyOfType(part, 'iterator', checker)); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.d.ts new file mode 100644 index 0000000..2f190a4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.d.ts @@ -0,0 +1,16 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type DirectiveConfig = boolean | 'allow-with-description' | { + descriptionFormat: string; +}; +export interface OptionsShape { + minimumDescriptionLength?: number; + 'ts-check'?: DirectiveConfig; + 'ts-expect-error'?: DirectiveConfig; + 'ts-ignore'?: DirectiveConfig; + 'ts-nocheck'?: DirectiveConfig; +} +export type Options = [OptionsShape]; +export type MessageIds = 'replaceTsIgnoreWithTsExpectError' | 'tsDirectiveComment' | 'tsDirectiveCommentDescriptionNotMatchPattern' | 'tsDirectiveCommentRequiresDescription' | 'tsIgnoreInsteadOfExpectError'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=ban-ts-comment.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.d.ts.map new file mode 100644 index 0000000..efabe29 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ban-ts-comment.d.ts","sourceRoot":"","sources":["../../src/rules/ban-ts-comment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAQnE,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,wBAAwB,GACxB;IAAE,iBAAiB,EAAE,MAAM,CAAA;CAAE,CAAC;AAElC,MAAM,WAAW,YAAY;IAC3B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,iBAAiB,CAAC,EAAE,eAAe,CAAC;IACpC,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,YAAY,CAAC,CAAC;AAErC,MAAM,MAAM,UAAU,GAClB,kCAAkC,GAClC,oBAAoB,GACpB,8CAA8C,GAC9C,uCAAuC,GACvC,8BAA8B,CAAC;;AAOnC,wBA6OG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js new file mode 100644 index 0000000..bffa4e3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js @@ -0,0 +1,183 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const defaultMinimumDescriptionLength = 3; +exports.default = (0, util_1.createRule)({ + name: 'ban-ts-comment', + meta: { + type: 'problem', + docs: { + description: 'Disallow `@ts-` comments or require descriptions after directives', + recommended: { + recommended: true, + strict: [{ minimumDescriptionLength: 10 }], + }, + }, + hasSuggestions: true, + messages: { + replaceTsIgnoreWithTsExpectError: 'Replace "@ts-ignore" with "@ts-expect-error".', + tsDirectiveComment: 'Do not use "@ts-{{directive}}" because it alters compilation errors.', + tsDirectiveCommentDescriptionNotMatchPattern: 'The description for the "@ts-{{directive}}" directive must match the {{format}} format.', + tsDirectiveCommentRequiresDescription: 'Include a description after the "@ts-{{directive}}" directive to explain why the @ts-{{directive}} is necessary. The description must be {{minimumDescriptionLength}} characters or longer.', + tsIgnoreInsteadOfExpectError: 'Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free.', + }, + schema: [ + { + type: 'object', + $defs: { + directiveConfigSchema: { + oneOf: [ + { + type: 'boolean', + default: true, + }, + { + type: 'string', + enum: ['allow-with-description'], + }, + { + type: 'object', + additionalProperties: false, + properties: { + descriptionFormat: { type: 'string' }, + }, + }, + ], + }, + }, + additionalProperties: false, + properties: { + minimumDescriptionLength: { + type: 'number', + description: 'A minimum character length for descriptions when `allow-with-description` is enabled.', + }, + 'ts-check': { $ref: '#/items/0/$defs/directiveConfigSchema' }, + 'ts-expect-error': { $ref: '#/items/0/$defs/directiveConfigSchema' }, + 'ts-ignore': { $ref: '#/items/0/$defs/directiveConfigSchema' }, + 'ts-nocheck': { $ref: '#/items/0/$defs/directiveConfigSchema' }, + }, + }, + ], + }, + defaultOptions: [ + { + minimumDescriptionLength: defaultMinimumDescriptionLength, + 'ts-check': false, + 'ts-expect-error': 'allow-with-description', + 'ts-ignore': true, + 'ts-nocheck': true, + }, + ], + create(context, [options]) { + // https://github.com/microsoft/TypeScript/blob/6f1ad5ad8bec5671f7e951a3524b62d82ec4be68/src/compiler/parser.ts#L10591 + const singleLinePragmaRegEx = /^\/\/\/?\s*@ts-(?check|nocheck)(?.*)$/; + /* + The regex used are taken from the ones used in the official TypeScript repo - + https://github.com/microsoft/TypeScript/blob/6f1ad5ad8bec5671f7e951a3524b62d82ec4be68/src/compiler/scanner.ts#L340-L348 + */ + const commentDirectiveRegExSingleLine = /^\/*\s*@ts-(?expect-error|ignore)(?.*)/; + const commentDirectiveRegExMultiLine = /^\s*(?:\/|\*)*\s*@ts-(?expect-error|ignore)(?.*)/; + const descriptionFormats = new Map(); + for (const directive of [ + 'ts-expect-error', + 'ts-ignore', + 'ts-nocheck', + 'ts-check', + ]) { + const option = options[directive]; + if (typeof option === 'object' && option.descriptionFormat) { + descriptionFormats.set(directive, new RegExp(option.descriptionFormat)); + } + } + function execDirectiveRegEx(regex, str) { + const match = regex.exec(str); + if (!match) { + return null; + } + const { description, directive } = (0, util_1.nullThrows)(match.groups, 'RegExp should contain groups'); + return { + description: (0, util_1.nullThrows)(description, 'RegExp should contain "description" group'), + directive: (0, util_1.nullThrows)(directive, 'RegExp should contain "directive" group'), + }; + } + function findDirectiveInComment(comment) { + if (comment.type === utils_1.AST_TOKEN_TYPES.Line) { + const matchedPragma = execDirectiveRegEx(singleLinePragmaRegEx, `//${comment.value}`); + if (matchedPragma) { + return matchedPragma; + } + return execDirectiveRegEx(commentDirectiveRegExSingleLine, comment.value); + } + const commentLines = comment.value.split('\n'); + return execDirectiveRegEx(commentDirectiveRegExMultiLine, commentLines[commentLines.length - 1]); + } + return { + Program(node) { + const firstStatement = node.body.at(0); + const comments = context.sourceCode.getAllComments(); + comments.forEach(comment => { + const match = findDirectiveInComment(comment); + if (!match) { + return; + } + const { description, directive } = match; + if (directive === 'nocheck' && + firstStatement && + firstStatement.loc.start.line <= comment.loc.start.line) { + return; + } + const fullDirective = `ts-${directive}`; + const option = options[fullDirective]; + if (option === true) { + if (directive === 'ignore') { + // Special case to suggest @ts-expect-error instead of @ts-ignore + context.report({ + node: comment, + messageId: 'tsIgnoreInsteadOfExpectError', + suggest: [ + { + messageId: 'replaceTsIgnoreWithTsExpectError', + fix(fixer) { + const commentText = comment.value.replace(/@ts-ignore/, '@ts-expect-error'); + return fixer.replaceText(comment, comment.type === utils_1.AST_TOKEN_TYPES.Line + ? `//${commentText}` + : `/*${commentText}*/`); + }, + }, + ], + }); + } + else { + context.report({ + node: comment, + messageId: 'tsDirectiveComment', + data: { directive }, + }); + } + } + if (option === 'allow-with-description' || + (typeof option === 'object' && option.descriptionFormat)) { + const { minimumDescriptionLength } = options; + const format = descriptionFormats.get(fullDirective); + if ((0, util_1.getStringLength)(description.trim()) < + (0, util_1.nullThrows)(minimumDescriptionLength, 'Expected minimumDescriptionLength to be set')) { + context.report({ + node: comment, + messageId: 'tsDirectiveCommentRequiresDescription', + data: { directive, minimumDescriptionLength }, + }); + } + else if (format && !format.test(description)) { + context.report({ + node: comment, + messageId: 'tsDirectiveCommentDescriptionNotMatchPattern', + data: { directive, format: format.source }, + }); + } + } + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.d.ts new file mode 100644 index 0000000..ca9e09f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"commentDetected", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=ban-tslint-comment.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.d.ts.map new file mode 100644 index 0000000..337c650 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ban-tslint-comment.d.ts","sourceRoot":"","sources":["../../src/rules/ban-tslint-comment.ts"],"names":[],"mappings":";AAiBA,wBA0CG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js new file mode 100644 index 0000000..dea5dd9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js @@ -0,0 +1,53 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +// tslint regex +// https://github.com/palantir/tslint/blob/95d9d958833fd9dc0002d18cbe34db20d0fbf437/src/enableDisableRules.ts#L32 +const ENABLE_DISABLE_REGEX = /^\s*tslint:(enable|disable)(?:-(line|next-line))?(:|\s|$)/; +const toText = (text, type) => type === utils_1.AST_TOKEN_TYPES.Line + ? ['//', text.trim()].join(' ') + : ['/*', text.trim(), '*/'].join(' '); +exports.default = (0, util_1.createRule)({ + name: 'ban-tslint-comment', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow `// tslint:` comments', + recommended: 'stylistic', + }, + fixable: 'code', + messages: { + commentDetected: 'tslint comment detected: "{{ text }}"', + }, + schema: [], + }, + defaultOptions: [], + create: context => { + return { + Program() { + const comments = context.sourceCode.getAllComments(); + comments.forEach(c => { + if (ENABLE_DISABLE_REGEX.test(c.value)) { + context.report({ + node: c, + messageId: 'commentDetected', + data: { text: toText(c.value, c.type) }, + fix(fixer) { + const rangeStart = context.sourceCode.getIndexFromLoc({ + column: c.loc.start.column > 0 ? c.loc.start.column - 1 : 0, + line: c.loc.start.line, + }); + const rangeEnd = context.sourceCode.getIndexFromLoc({ + column: c.loc.end.column, + line: c.loc.end.line, + }); + return fixer.removeRange([rangeStart, rangeEnd + 1]); + }, + }); + } + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.d.ts new file mode 100644 index 0000000..2b8efbf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.d.ts @@ -0,0 +1,6 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type Options = ['fields' | 'getters']; +export type MessageIds = 'preferFieldStyle' | 'preferFieldStyleSuggestion' | 'preferGetterStyle' | 'preferGetterStyleSuggestion'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=class-literal-property-style.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.d.ts.map new file mode 100644 index 0000000..63c1612 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"class-literal-property-style.d.ts","sourceRoot":"","sources":["../../src/rules/class-literal-property-style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAanE,MAAM,MAAM,OAAO,GAAG,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;AAC7C,MAAM,MAAM,UAAU,GAClB,kBAAkB,GAClB,4BAA4B,GAC5B,mBAAmB,GACnB,6BAA6B,CAAC;;AAsClC,wBAoLG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js new file mode 100644 index 0000000..8c301df --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js @@ -0,0 +1,160 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const printNodeModifiers = (node, final) => `${node.accessibility ?? ''}${node.static ? ' static' : ''} ${final} `.trimStart(); +const isSupportedLiteral = (node) => { + switch (node.type) { + case utils_1.AST_NODE_TYPES.Literal: + return true; + case utils_1.AST_NODE_TYPES.TaggedTemplateExpression: + return node.quasi.quasis.length === 1; + case utils_1.AST_NODE_TYPES.TemplateLiteral: + return node.quasis.length === 1; + default: + return false; + } +}; +exports.default = (0, util_1.createRule)({ + name: 'class-literal-property-style', + meta: { + type: 'problem', + docs: { + description: 'Enforce that literals on classes are exposed in a consistent style', + recommended: 'stylistic', + }, + hasSuggestions: true, + messages: { + preferFieldStyle: 'Literals should be exposed using readonly fields.', + preferFieldStyleSuggestion: 'Replace the literals with readonly fields.', + preferGetterStyle: 'Literals should be exposed using getters.', + preferGetterStyleSuggestion: 'Replace the literals with getters.', + }, + schema: [ + { + type: 'string', + description: 'Which literal class member syntax to prefer.', + enum: ['fields', 'getters'], + }, + ], + }, + defaultOptions: ['fields'], + create(context, [style]) { + const propertiesInfoStack = []; + function enterClassBody() { + propertiesInfoStack.push({ + excludeSet: new Set(), + properties: [], + }); + } + function exitClassBody() { + const { excludeSet, properties } = (0, util_1.nullThrows)(propertiesInfoStack.pop(), 'Stack should exist on class exit'); + properties.forEach(node => { + const { value } = node; + if (!value || !isSupportedLiteral(value)) { + return; + } + const name = (0, util_1.getStaticMemberAccessValue)(node, context); + if (name && excludeSet.has(name)) { + return; + } + context.report({ + node: node.key, + messageId: 'preferGetterStyle', + suggest: [ + { + messageId: 'preferGetterStyleSuggestion', + fix(fixer) { + const name = context.sourceCode.getText(node.key); + let text = ''; + text += printNodeModifiers(node, 'get'); + text += node.computed ? `[${name}]` : name; + text += `() { return ${context.sourceCode.getText(value)}; }`; + return fixer.replaceText(node, text); + }, + }, + ], + }); + }); + } + function excludeAssignedProperty(node) { + if ((0, util_1.isAssignee)(node)) { + const { excludeSet } = propertiesInfoStack[propertiesInfoStack.length - 1]; + const name = (0, util_1.getStaticMemberAccessValue)(node, context); + if (name) { + excludeSet.add(name); + } + } + } + return { + ...(style === 'fields' && { + MethodDefinition(node) { + if (node.kind !== 'get' || + node.override || + !node.value.body || + node.value.body.body.length === 0) { + return; + } + const [statement] = node.value.body.body; + if (statement.type !== utils_1.AST_NODE_TYPES.ReturnStatement) { + return; + } + const { argument } = statement; + if (!argument || !isSupportedLiteral(argument)) { + return; + } + const name = (0, util_1.getStaticMemberAccessValue)(node, context); + const hasDuplicateKeySetter = name && + node.parent.body.some(element => { + return (element.type === utils_1.AST_NODE_TYPES.MethodDefinition && + element.kind === 'set' && + (0, util_1.isStaticMemberAccessOfValue)(element, context, name)); + }); + if (hasDuplicateKeySetter) { + return; + } + context.report({ + node: node.key, + messageId: 'preferFieldStyle', + suggest: [ + { + messageId: 'preferFieldStyleSuggestion', + fix(fixer) { + const name = context.sourceCode.getText(node.key); + let text = ''; + text += printNodeModifiers(node, 'readonly'); + text += node.computed ? `[${name}]` : name; + text += ` = ${context.sourceCode.getText(argument)};`; + return fixer.replaceText(node, text); + }, + }, + ], + }); + }, + }), + ...(style === 'getters' && { + ClassBody: enterClassBody, + 'ClassBody:exit': exitClassBody, + 'MethodDefinition[kind="constructor"] ThisExpression'(node) { + if (node.parent.type === utils_1.AST_NODE_TYPES.MemberExpression) { + let parent = node.parent; + while (!(0, util_1.isFunction)(parent)) { + parent = parent.parent; + } + if (parent.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition && + parent.parent.kind === 'constructor') { + excludeAssignedProperty(node.parent); + } + } + }, + PropertyDefinition(node) { + if (!node.readonly || node.declare || node.override) { + return; + } + const { properties } = propertiesInfoStack[propertiesInfoStack.length - 1]; + properties.push(node); + }, + }), + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-methods-use-this.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-methods-use-this.d.ts new file mode 100644 index 0000000..16e8c92 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-methods-use-this.d.ts @@ -0,0 +1,12 @@ +export type Options = [ + { + enforceForClassFields?: boolean; + exceptMethods?: string[]; + ignoreClassesThatImplementAnInterface?: boolean | 'public-fields'; + ignoreOverrideMethods?: boolean; + } +]; +export type MessageIds = 'missingThis'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingThis", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=class-methods-use-this.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-methods-use-this.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-methods-use-this.d.ts.map new file mode 100644 index 0000000..7bb3dbf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-methods-use-this.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"class-methods-use-this.d.ts","sourceRoot":"","sources":["../../src/rules/class-methods-use-this.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAChC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;QACzB,qCAAqC,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;QAClE,qBAAqB,CAAC,EAAE,OAAO,CAAC;KACjC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC;;AAEvC,wBAiSG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-methods-use-this.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-methods-use-this.js new file mode 100644 index 0000000..03e0d59 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-methods-use-this.js @@ -0,0 +1,219 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'class-methods-use-this', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce that class methods utilize `this`', + extendsBaseRule: true, + requiresTypeChecking: false, + }, + messages: { + missingThis: "Expected 'this' to be used by class {{name}}.", + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + enforceForClassFields: { + type: 'boolean', + description: 'Enforces that functions used as instance field initializers utilize `this`.', + }, + exceptMethods: { + type: 'array', + description: 'Allows specified method names to be ignored with this rule.', + items: { + type: 'string', + }, + }, + ignoreClassesThatImplementAnInterface: { + description: 'Whether to ignore class members that are defined within a class that `implements` a type.', + oneOf: [ + { + type: 'boolean', + description: 'Ignore all classes that implement an interface', + }, + { + type: 'string', + description: 'Ignore only the public fields of classes that implement an interface', + enum: ['public-fields'], + }, + ], + }, + ignoreOverrideMethods: { + type: 'boolean', + description: 'Whether to ignore members marked with the `override` modifier.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + enforceForClassFields: true, + exceptMethods: [], + ignoreClassesThatImplementAnInterface: false, + ignoreOverrideMethods: false, + }, + ], + create(context, [{ enforceForClassFields, exceptMethods: exceptMethodsRaw, ignoreClassesThatImplementAnInterface, ignoreOverrideMethods, },]) { + const exceptMethods = new Set(exceptMethodsRaw); + let stack; + function pushContext(member) { + if (member?.parent.type === utils_1.AST_NODE_TYPES.ClassBody) { + stack = { + class: member.parent.parent, + member, + parent: stack, + usesThis: false, + }; + } + else { + stack = { + class: null, + member: null, + parent: stack, + usesThis: false, + }; + } + } + function enterFunction(node) { + if (node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition || + node.parent.type === utils_1.AST_NODE_TYPES.PropertyDefinition || + node.parent.type === utils_1.AST_NODE_TYPES.AccessorProperty) { + pushContext(node.parent); + } + else { + pushContext(); + } + } + /** + * Pop `this` used flag from the stack. + */ + function popContext() { + const oldStack = stack; + stack = stack?.parent; + return oldStack; + } + function isPublicField(accessibility) { + if (!accessibility || accessibility === 'public') { + return true; + } + return false; + } + /** + * Check if the node is an instance method not excluded by config + */ + function isIncludedInstanceMethod(node) { + if (node.static || + (node.type === utils_1.AST_NODE_TYPES.MethodDefinition && + node.kind === 'constructor') || + ((node.type === utils_1.AST_NODE_TYPES.PropertyDefinition || + node.type === utils_1.AST_NODE_TYPES.AccessorProperty) && + !enforceForClassFields)) { + return false; + } + if (node.computed || exceptMethods.size === 0) { + return true; + } + const hashIfNeeded = node.key.type === utils_1.AST_NODE_TYPES.PrivateIdentifier ? '#' : ''; + const name = (0, util_1.getStaticMemberAccessValue)(node, context); + return (typeof name !== 'string' || !exceptMethods.has(hashIfNeeded + name)); + } + /** + * Checks if we are leaving a function that is a method, and reports if 'this' has not been used. + * Static methods and the constructor are exempt. + * Then pops the context off the stack. + */ + function exitFunction(node) { + const stackContext = popContext(); + if (stackContext?.member == null || + stackContext.usesThis || + (ignoreOverrideMethods && stackContext.member.override) || + (ignoreClassesThatImplementAnInterface === true && + stackContext.class.implements.length > 0) || + (ignoreClassesThatImplementAnInterface === 'public-fields' && + stackContext.class.implements.length > 0 && + isPublicField(stackContext.member.accessibility))) { + return; + } + if (isIncludedInstanceMethod(stackContext.member)) { + context.report({ + loc: (0, util_1.getFunctionHeadLoc)(node, context.sourceCode), + node, + messageId: 'missingThis', + data: { + name: (0, util_1.getFunctionNameWithKind)(node), + }, + }); + } + } + return { + // function declarations have their own `this` context + FunctionDeclaration() { + pushContext(); + }, + 'FunctionDeclaration:exit'() { + popContext(); + }, + FunctionExpression(node) { + enterFunction(node); + }, + 'FunctionExpression:exit'(node) { + exitFunction(node); + }, + ...(enforceForClassFields + ? { + 'AccessorProperty > ArrowFunctionExpression.value'(node) { + enterFunction(node); + }, + 'AccessorProperty > ArrowFunctionExpression.value:exit'(node) { + exitFunction(node); + }, + 'PropertyDefinition > ArrowFunctionExpression.value'(node) { + enterFunction(node); + }, + 'PropertyDefinition > ArrowFunctionExpression.value:exit'(node) { + exitFunction(node); + }, + } + : {}), + /* + * Class field value are implicit functions. + */ + 'AccessorProperty:exit'() { + popContext(); + }, + 'AccessorProperty > *.key:exit'() { + pushContext(); + }, + 'PropertyDefinition:exit'() { + popContext(); + }, + 'PropertyDefinition > *.key:exit'() { + pushContext(); + }, + /* + * Class static blocks are implicit functions. They aren't required to use `this`, + * but we have to push context so that it captures any use of `this` in the static block + * separately from enclosing contexts, because static blocks have their own `this` and it + * shouldn't count as used `this` in enclosing contexts. + */ + StaticBlock() { + pushContext(); + }, + 'StaticBlock:exit'() { + popContext(); + }, + 'ThisExpression, Super'() { + if (stack) { + stack.usesThis = true; + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.d.ts new file mode 100644 index 0000000..619f869 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.d.ts @@ -0,0 +1,5 @@ +export type MessageIds = 'preferConstructor' | 'preferTypeAnnotation'; +export type Options = ['constructor' | 'type-annotation']; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=consistent-generic-constructors.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.d.ts.map new file mode 100644 index 0000000..cc63109 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"consistent-generic-constructors.d.ts","sourceRoot":"","sources":["../../src/rules/consistent-generic-constructors.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,sBAAsB,CAAC;AACtE,MAAM,MAAM,OAAO,GAAG,CAAC,aAAa,GAAG,iBAAiB,CAAC,CAAC;;AAE1D,wBAsJG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js new file mode 100644 index 0000000..8bb72ee --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js @@ -0,0 +1,111 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'consistent-generic-constructors', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce specifying generic type arguments on type annotation or constructor name of a constructor call', + recommended: 'stylistic', + }, + fixable: 'code', + messages: { + preferConstructor: 'The generic type arguments should be specified as part of the constructor type arguments.', + preferTypeAnnotation: 'The generic type arguments should be specified as part of the type annotation.', + }, + schema: [ + { + type: 'string', + description: 'Which constructor call syntax to prefer.', + enum: ['type-annotation', 'constructor'], + }, + ], + }, + defaultOptions: ['constructor'], + create(context, [mode]) { + return { + 'VariableDeclarator,PropertyDefinition,AccessorProperty,:matches(FunctionDeclaration,FunctionExpression) > AssignmentPattern'(node) { + function getLHSRHS() { + switch (node.type) { + case utils_1.AST_NODE_TYPES.VariableDeclarator: + return [node.id, node.init]; + case utils_1.AST_NODE_TYPES.PropertyDefinition: + case utils_1.AST_NODE_TYPES.AccessorProperty: + return [node, node.value]; + case utils_1.AST_NODE_TYPES.AssignmentPattern: + return [node.left, node.right]; + default: + throw new Error(`Unhandled node type: ${node.type}`); + } + } + const [lhsName, rhs] = getLHSRHS(); + const lhs = lhsName.typeAnnotation?.typeAnnotation; + if (!rhs || + rhs.type !== utils_1.AST_NODE_TYPES.NewExpression || + rhs.callee.type !== utils_1.AST_NODE_TYPES.Identifier) { + return; + } + if (lhs && + (lhs.type !== utils_1.AST_NODE_TYPES.TSTypeReference || + lhs.typeName.type !== utils_1.AST_NODE_TYPES.Identifier || + lhs.typeName.name !== rhs.callee.name)) { + return; + } + if (mode === 'type-annotation') { + if (!lhs && rhs.typeArguments) { + const { callee, typeArguments } = rhs; + const typeAnnotation = context.sourceCode.getText(callee) + + context.sourceCode.getText(typeArguments); + context.report({ + node, + messageId: 'preferTypeAnnotation', + fix(fixer) { + function getIDToAttachAnnotation() { + if (node.type !== utils_1.AST_NODE_TYPES.PropertyDefinition && + node.type !== utils_1.AST_NODE_TYPES.AccessorProperty) { + return lhsName; + } + if (!node.computed) { + return node.key; + } + // If the property's computed, we have to attach the + // annotation after the square bracket, not the enclosed expression + return (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.key), util_1.NullThrowsReasons.MissingToken(']', 'key')); + } + return [ + fixer.remove(typeArguments), + fixer.insertTextAfter(getIDToAttachAnnotation(), `: ${typeAnnotation}`), + ]; + }, + }); + } + return; + } + const isolatedDeclarations = context.parserOptions.isolatedDeclarations; + if (!isolatedDeclarations && lhs?.typeArguments && !rhs.typeArguments) { + const hasParens = context.sourceCode.getTokenAfter(rhs.callee)?.value === '('; + const extraComments = new Set(context.sourceCode.getCommentsInside(lhs.parent)); + context.sourceCode + .getCommentsInside(lhs.typeArguments) + .forEach(c => extraComments.delete(c)); + context.report({ + node, + messageId: 'preferConstructor', + *fix(fixer) { + yield fixer.remove(lhs.parent); + for (const comment of extraComments) { + yield fixer.insertTextAfter(rhs.callee, context.sourceCode.getText(comment)); + } + yield fixer.insertTextAfter(rhs.callee, context.sourceCode.getText(lhs.typeArguments)); + if (!hasParens) { + yield fixer.insertTextAfter(rhs.callee, '()'); + } + }, + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.d.ts new file mode 100644 index 0000000..ecdecf2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.d.ts @@ -0,0 +1,6 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type MessageIds = 'preferIndexSignature' | 'preferIndexSignatureSuggestion' | 'preferRecord'; +export type Options = ['index-signature' | 'record']; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=consistent-indexed-object-style.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.d.ts.map new file mode 100644 index 0000000..e673503 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"consistent-indexed-object-style.d.ts","sourceRoot":"","sources":["../../src/rules/consistent-indexed-object-style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAanE,MAAM,MAAM,UAAU,GAClB,sBAAsB,GACtB,gCAAgC,GAChC,cAAc,CAAC;AACnB,MAAM,MAAM,OAAO,GAAG,CAAC,iBAAiB,GAAG,QAAQ,CAAC,CAAC;;AAErD,wBA2OG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js new file mode 100644 index 0000000..5a3fde1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js @@ -0,0 +1,255 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'consistent-indexed-object-style', + meta: { + type: 'suggestion', + docs: { + description: 'Require or disallow the `Record` type', + recommended: 'stylistic', + }, + fixable: 'code', + // eslint-disable-next-line eslint-plugin/require-meta-has-suggestions -- suggestions are exposed through a helper. + hasSuggestions: true, + messages: { + preferIndexSignature: 'An index signature is preferred over a record.', + preferIndexSignatureSuggestion: 'Change into an index signature instead of a record.', + preferRecord: 'A record is preferred over an index signature.', + }, + schema: [ + { + type: 'string', + description: 'Which indexed object syntax to prefer.', + enum: ['record', 'index-signature'], + }, + ], + }, + defaultOptions: ['record'], + create(context, [mode]) { + function checkMembers(members, node, parentId, prefix, postfix, safeFix = true) { + if (members.length !== 1) { + return; + } + const [member] = members; + if (member.type !== utils_1.AST_NODE_TYPES.TSIndexSignature) { + return; + } + const parameter = member.parameters.at(0); + if (parameter?.type !== utils_1.AST_NODE_TYPES.Identifier) { + return; + } + const keyType = parameter.typeAnnotation; + if (!keyType) { + return; + } + const valueType = member.typeAnnotation; + if (!valueType) { + return; + } + if (parentId) { + const scope = context.sourceCode.getScope(parentId); + const superVar = utils_1.ASTUtils.findVariable(scope, parentId.name); + if (superVar && + isDeeplyReferencingType(node, superVar, new Set([parentId]))) { + return; + } + } + context.report({ + node, + messageId: 'preferRecord', + fix: safeFix + ? (fixer) => { + const key = context.sourceCode.getText(keyType.typeAnnotation); + const value = context.sourceCode.getText(valueType.typeAnnotation); + const record = member.readonly + ? `Readonly>` + : `Record<${key}, ${value}>`; + return fixer.replaceText(node, `${prefix}${record}${postfix}`); + } + : null, + }); + } + return { + ...(mode === 'index-signature' && { + TSTypeReference(node) { + const typeName = node.typeName; + if (typeName.type !== utils_1.AST_NODE_TYPES.Identifier) { + return; + } + if (typeName.name !== 'Record') { + return; + } + const params = node.typeArguments?.params; + if (params?.length !== 2) { + return; + } + const indexParam = params[0]; + const shouldFix = indexParam.type === utils_1.AST_NODE_TYPES.TSStringKeyword || + indexParam.type === utils_1.AST_NODE_TYPES.TSNumberKeyword || + indexParam.type === utils_1.AST_NODE_TYPES.TSSymbolKeyword; + context.report({ + node, + messageId: 'preferIndexSignature', + ...(0, util_1.getFixOrSuggest)({ + fixOrSuggest: shouldFix ? 'fix' : 'suggest', + suggestion: { + messageId: 'preferIndexSignatureSuggestion', + fix: fixer => { + const key = context.sourceCode.getText(params[0]); + const type = context.sourceCode.getText(params[1]); + return fixer.replaceText(node, `{ [key: ${key}]: ${type} }`); + }, + }, + }), + }); + }, + }), + ...(mode === 'record' && { + TSInterfaceDeclaration(node) { + let genericTypes = ''; + if (node.typeParameters?.params.length) { + genericTypes = `<${node.typeParameters.params + .map(p => context.sourceCode.getText(p)) + .join(', ')}>`; + } + checkMembers(node.body.body, node, node.id, `type ${node.id.name}${genericTypes} = `, ';', !node.extends.length); + }, + TSMappedType(node) { + const key = node.key; + const scope = context.sourceCode.getScope(key); + const scopeManagerKey = (0, util_1.nullThrows)(scope.variables.find(value => value.name === key.name && value.isTypeVariable), 'key type parameter must be a defined type variable in its scope'); + // If the key is used to compute the value, we can't convert to a Record. + if (scopeManagerKey.references.some(reference => reference.isTypeReference)) { + return; + } + const constraint = node.constraint; + if (constraint.type === utils_1.AST_NODE_TYPES.TSTypeOperator && + constraint.operator === 'keyof' && + !(0, util_1.isParenthesized)(constraint, context.sourceCode)) { + // This is a weird special case, since modifiers are preserved by + // the mapped type, but not by the Record type. So this type is not, + // in general, equivalent to a Record type. + return; + } + // If the mapped type is circular, we can't convert it to a Record. + const parentId = findParentDeclaration(node)?.id; + if (parentId) { + const scope = context.sourceCode.getScope(key); + const superVar = utils_1.ASTUtils.findVariable(scope, parentId.name); + if (superVar) { + const isCircular = isDeeplyReferencingType(node.parent, superVar, new Set([parentId])); + if (isCircular) { + return; + } + } + } + // There's no builtin Mutable type, so we can't autofix it really. + const canFix = node.readonly !== '-'; + context.report({ + node, + messageId: 'preferRecord', + ...(canFix && { + fix: (fixer) => { + const keyType = context.sourceCode.getText(constraint); + const valueType = node.typeAnnotation + ? context.sourceCode.getText(node.typeAnnotation) + : 'any'; + let recordText = `Record<${keyType}, ${valueType}>`; + if (node.optional === '+' || node.optional === true) { + recordText = `Partial<${recordText}>`; + } + else if (node.optional === '-') { + recordText = `Required<${recordText}>`; + } + if (node.readonly === '+' || node.readonly === true) { + recordText = `Readonly<${recordText}>`; + } + return fixer.replaceText(node, recordText); + }, + }), + }); + }, + TSTypeLiteral(node) { + const parent = findParentDeclaration(node); + checkMembers(node.members, node, parent?.id, '', ''); + }, + }), + }; + }, +}); +function findParentDeclaration(node) { + if (node.parent && node.parent.type !== utils_1.AST_NODE_TYPES.TSTypeAnnotation) { + if (node.parent.type === utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration) { + return node.parent; + } + return findParentDeclaration(node.parent); + } + return undefined; +} +function isDeeplyReferencingType(node, superVar, visited) { + if (visited.has(node)) { + // something on the chain is circular but it's not the reference being checked + return false; + } + visited.add(node); + switch (node.type) { + case utils_1.AST_NODE_TYPES.TSTypeLiteral: + return node.members.some(member => isDeeplyReferencingType(member, superVar, visited)); + case utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration: + return isDeeplyReferencingType(node.typeAnnotation, superVar, visited); + case utils_1.AST_NODE_TYPES.TSIndexedAccessType: + return [node.indexType, node.objectType].some(type => isDeeplyReferencingType(type, superVar, visited)); + case utils_1.AST_NODE_TYPES.TSMappedType: + if (node.typeAnnotation) { + return isDeeplyReferencingType(node.typeAnnotation, superVar, visited); + } + break; + case utils_1.AST_NODE_TYPES.TSConditionalType: + return [ + node.checkType, + node.extendsType, + node.falseType, + node.trueType, + ].some(type => isDeeplyReferencingType(type, superVar, visited)); + case utils_1.AST_NODE_TYPES.TSUnionType: + case utils_1.AST_NODE_TYPES.TSIntersectionType: + return node.types.some(type => isDeeplyReferencingType(type, superVar, visited)); + case utils_1.AST_NODE_TYPES.TSInterfaceDeclaration: + return node.body.body.some(type => isDeeplyReferencingType(type, superVar, visited)); + case utils_1.AST_NODE_TYPES.TSTypeAnnotation: + return isDeeplyReferencingType(node.typeAnnotation, superVar, visited); + case utils_1.AST_NODE_TYPES.TSIndexSignature: { + if (node.typeAnnotation) { + return isDeeplyReferencingType(node.typeAnnotation, superVar, visited); + } + break; + } + case utils_1.AST_NODE_TYPES.TSTypeParameterInstantiation: { + return node.params.some(param => isDeeplyReferencingType(param, superVar, visited)); + } + case utils_1.AST_NODE_TYPES.TSTypeReference: { + if (isDeeplyReferencingType(node.typeName, superVar, visited)) { + return true; + } + if (node.typeArguments && + isDeeplyReferencingType(node.typeArguments, superVar, visited)) { + return true; + } + break; + } + case utils_1.AST_NODE_TYPES.Identifier: { + // check if the identifier is a reference of the type being checked + if (superVar.references.some(ref => (0, util_1.isNodeEqual)(ref.identifier, node))) { + return true; + } + // otherwise, follow its definition(s) + const refVar = utils_1.ASTUtils.findVariable(superVar.scope, node.name); + if (refVar) { + return refVar.defs.some(def => isDeeplyReferencingType(def.node, superVar, visited)); + } + } + } + return false; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-return.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-return.d.ts new file mode 100644 index 0000000..2d86b5c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-return.d.ts @@ -0,0 +1,17 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingReturn" | "missingReturnValue" | "unexpectedReturnValue", [({ + treatUndefinedAsUnspecified?: boolean; +} | undefined)?], unknown, { + 'ArrowFunctionExpression:exit'(node: TSESTree.ArrowFunctionExpression): void; + 'FunctionDeclaration:exit'(node: TSESTree.FunctionDeclaration): void; + 'FunctionExpression:exit'(node: TSESTree.FunctionExpression): void; + ReturnStatement(node: TSESTree.ReturnStatement): void; +}>; +export type Options = InferOptionsTypeFromRule; +export type MessageIds = InferMessageIdsTypeFromRule; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingReturn" | "missingReturnValue" | "unexpectedReturnValue", [({ + treatUndefinedAsUnspecified?: boolean; +} | undefined)?], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=consistent-return.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-return.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-return.d.ts.map new file mode 100644 index 0000000..60c33b2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-return.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"consistent-return.d.ts","sourceRoot":"","sources":["../../src/rules/consistent-return.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAKzD,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAKjB,QAAA,MAAM,QAAQ;;;;;;;EAAyC,CAAC;AAExD,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC,OAAO,QAAQ,CAAC,CAAC;;;;AAQtE,wBA2GG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-return.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-return.js new file mode 100644 index 0000000..cd38313 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-return.js @@ -0,0 +1,135 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('consistent-return'); +const defaultOptions = [{ treatUndefinedAsUnspecified: false }]; +exports.default = (0, util_1.createRule)({ + name: 'consistent-return', + meta: { + type: 'suggestion', + defaultOptions, + docs: { + description: 'Require `return` statements to either always or never specify values', + extendsBaseRule: true, + requiresTypeChecking: true, + }, + hasSuggestions: baseRule.meta.hasSuggestions, + messages: baseRule.meta.messages, + schema: baseRule.meta.schema, + }, + defaultOptions, + create(context, [options]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const rules = baseRule.create(context); + const functions = []; + const treatUndefinedAsUnspecified = options?.treatUndefinedAsUnspecified === true; + function enterFunction(node) { + functions.push(node); + } + function exitFunction() { + functions.pop(); + } + function getCurrentFunction() { + return functions[functions.length - 1] ?? null; + } + function isPromiseVoid(node, type) { + if (tsutils.isThenableType(checker, node, type) && + tsutils.isTypeReference(type)) { + const awaitedType = type.typeArguments?.[0]; + if (awaitedType) { + if ((0, util_1.isTypeFlagSet)(awaitedType, ts.TypeFlags.Void)) { + return true; + } + return isPromiseVoid(node, awaitedType); + } + } + return false; + } + function isReturnVoidOrThenableVoid(node) { + const functionType = services.getTypeAtLocation(node); + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + const callSignatures = functionType.getCallSignatures(); + return callSignatures.some(signature => { + const returnType = signature.getReturnType(); + if (node.async) { + return isPromiseVoid(tsNode, returnType); + } + return (0, util_1.isTypeFlagSet)(returnType, ts.TypeFlags.Void); + }); + } + return { + ...rules, + ArrowFunctionExpression: enterFunction, + 'ArrowFunctionExpression:exit'(node) { + exitFunction(); + rules['ArrowFunctionExpression:exit'](node); + }, + FunctionDeclaration: enterFunction, + 'FunctionDeclaration:exit'(node) { + exitFunction(); + rules['FunctionDeclaration:exit'](node); + }, + FunctionExpression: enterFunction, + 'FunctionExpression:exit'(node) { + exitFunction(); + rules['FunctionExpression:exit'](node); + }, + ReturnStatement(node) { + const functionNode = getCurrentFunction(); + if (!node.argument && + functionNode && + isReturnVoidOrThenableVoid(functionNode)) { + return; + } + if (treatUndefinedAsUnspecified && node.argument) { + const returnValueType = services.getTypeAtLocation(node.argument); + if (returnValueType.flags === ts.TypeFlags.Undefined) { + rules.ReturnStatement({ + ...node, + argument: null, + }); + return; + } + } + rules.ReturnStatement(node); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.d.ts new file mode 100644 index 0000000..45911b7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.d.ts @@ -0,0 +1,13 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type MessageIds = 'angle-bracket' | 'as' | 'never' | 'replaceArrayTypeAssertionWithAnnotation' | 'replaceArrayTypeAssertionWithSatisfies' | 'replaceObjectTypeAssertionWithAnnotation' | 'replaceObjectTypeAssertionWithSatisfies' | 'unexpectedArrayTypeAssertion' | 'unexpectedObjectTypeAssertion'; +type OptUnion = { + assertionStyle: 'angle-bracket' | 'as'; + objectLiteralTypeAssertions?: 'allow' | 'allow-as-parameter' | 'never'; + arrayLiteralTypeAssertions?: 'allow' | 'allow-as-parameter' | 'never'; +} | { + assertionStyle: 'never'; +}; +export type Options = readonly [OptUnion]; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=consistent-type-assertions.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.d.ts.map new file mode 100644 index 0000000..271e23f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"consistent-type-assertions.d.ts","sourceRoot":"","sources":["../../src/rules/consistent-type-assertions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAgBnE,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,IAAI,GACJ,OAAO,GACP,yCAAyC,GACzC,wCAAwC,GACxC,0CAA0C,GAC1C,yCAAyC,GACzC,8BAA8B,GAC9B,+BAA+B,CAAC;AACpC,KAAK,QAAQ,GACT;IACE,cAAc,EAAE,eAAe,GAAG,IAAI,CAAC;IACvC,2BAA2B,CAAC,EAAE,OAAO,GAAG,oBAAoB,GAAG,OAAO,CAAC;IACvE,0BAA0B,CAAC,EAAE,OAAO,GAAG,oBAAoB,GAAG,OAAO,CAAC;CACvE,GACD;IACE,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AACN,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;;AAM1C,wBA2TG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js new file mode 100644 index 0000000..db2b2fb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js @@ -0,0 +1,256 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const getWrappedCode_1 = require("../util/getWrappedCode"); +exports.default = (0, util_1.createRule)({ + name: 'consistent-type-assertions', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce consistent usage of type assertions', + recommended: 'stylistic', + }, + fixable: 'code', + hasSuggestions: true, + messages: { + 'angle-bracket': "Use '<{{cast}}>' instead of 'as {{cast}}'.", + as: "Use 'as {{cast}}' instead of '<{{cast}}>'.", + never: 'Do not use any type assertions.', + replaceArrayTypeAssertionWithAnnotation: 'Use const x: {{cast}} = [ ... ] instead.', + replaceArrayTypeAssertionWithSatisfies: 'Use const x = [ ... ] satisfies {{cast}} instead.', + replaceObjectTypeAssertionWithAnnotation: 'Use const x: {{cast}} = { ... } instead.', + replaceObjectTypeAssertionWithSatisfies: 'Use const x = { ... } satisfies {{cast}} instead.', + unexpectedArrayTypeAssertion: 'Always prefer const x: T[] = [ ... ].', + unexpectedObjectTypeAssertion: 'Always prefer const x: T = { ... }.', + }, + schema: [ + { + oneOf: [ + { + type: 'object', + additionalProperties: false, + properties: { + assertionStyle: { + type: 'string', + description: 'The expected assertion style to enforce.', + enum: ['never'], + }, + }, + required: ['assertionStyle'], + }, + { + type: 'object', + additionalProperties: false, + properties: { + arrayLiteralTypeAssertions: { + type: 'string', + description: 'Whether to always prefer type declarations for array literals used as variable initializers, rather than type assertions.', + enum: ['allow', 'allow-as-parameter', 'never'], + }, + assertionStyle: { + type: 'string', + description: 'The expected assertion style to enforce.', + enum: ['as', 'angle-bracket'], + }, + objectLiteralTypeAssertions: { + type: 'string', + description: 'Whether to always prefer type declarations for object literals used as variable initializers, rather than type assertions.', + enum: ['allow', 'allow-as-parameter', 'never'], + }, + }, + }, + ], + }, + ], + }, + defaultOptions: [ + { + arrayLiteralTypeAssertions: 'allow', + assertionStyle: 'as', + objectLiteralTypeAssertions: 'allow', + }, + ], + create(context, [options]) { + function isConst(node) { + if (node.type !== utils_1.AST_NODE_TYPES.TSTypeReference) { + return false; + } + return (node.typeName.type === utils_1.AST_NODE_TYPES.Identifier && + node.typeName.name === 'const'); + } + function reportIncorrectAssertionType(node) { + const messageId = options.assertionStyle; + // If this node is `as const`, then don't report an error. + if (isConst(node.typeAnnotation) && messageId === 'never') { + return; + } + context.report({ + node, + messageId, + data: messageId !== 'never' + ? { cast: context.sourceCode.getText(node.typeAnnotation) } + : {}, + fix: messageId === 'as' + ? (fixer) => { + // lazily access parserServices to avoid crashing on non TS files (#9860) + const tsNode = (0, util_1.getParserServices)(context, true).esTreeNodeToTSNodeMap.get(node); + const expressionCode = context.sourceCode.getText(node.expression); + const typeAnnotationCode = context.sourceCode.getText(node.typeAnnotation); + const asPrecedence = (0, util_1.getOperatorPrecedence)(ts.SyntaxKind.AsExpression, ts.SyntaxKind.Unknown); + const parentPrecedence = (0, util_1.getOperatorPrecedence)(tsNode.parent.kind, ts.isBinaryExpression(tsNode.parent) + ? tsNode.parent.operatorToken.kind + : ts.SyntaxKind.Unknown, ts.isNewExpression(tsNode.parent) + ? tsNode.parent.arguments != null && + tsNode.parent.arguments.length > 0 + : undefined); + const expressionPrecedence = (0, util_1.getOperatorPrecedenceForNode)(node.expression); + const expressionCodeWrapped = (0, getWrappedCode_1.getWrappedCode)(expressionCode, expressionPrecedence, asPrecedence); + const text = `${expressionCodeWrapped} as ${typeAnnotationCode}`; + return fixer.replaceText(node, (0, util_1.isParenthesized)(node, context.sourceCode) + ? text + : (0, getWrappedCode_1.getWrappedCode)(text, asPrecedence, parentPrecedence)); + } + : undefined, + }); + } + function checkType(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.TSAnyKeyword: + case utils_1.AST_NODE_TYPES.TSUnknownKeyword: + return false; + case utils_1.AST_NODE_TYPES.TSTypeReference: + return ( + // Ignore `as const` and `` + !isConst(node) || + // Allow qualified names which have dots between identifiers, `Foo.Bar` + node.typeName.type === utils_1.AST_NODE_TYPES.TSQualifiedName); + default: + return true; + } + } + function getSuggestions(node, annotationMessageId, satisfiesMessageId) { + const suggestions = []; + if (node.parent.type === utils_1.AST_NODE_TYPES.VariableDeclarator && + !node.parent.id.typeAnnotation) { + const { parent } = node; + suggestions.push({ + messageId: annotationMessageId, + data: { cast: context.sourceCode.getText(node.typeAnnotation) }, + fix: fixer => [ + fixer.insertTextAfter(parent.id, `: ${context.sourceCode.getText(node.typeAnnotation)}`), + fixer.replaceText(node, (0, util_1.getTextWithParentheses)(context.sourceCode, node.expression)), + ], + }); + } + suggestions.push({ + messageId: satisfiesMessageId, + data: { cast: context.sourceCode.getText(node.typeAnnotation) }, + fix: fixer => [ + fixer.replaceText(node, (0, util_1.getTextWithParentheses)(context.sourceCode, node.expression)), + fixer.insertTextAfter(node, ` satisfies ${context.sourceCode.getText(node.typeAnnotation)}`), + ], + }); + return suggestions; + } + function isAsParameter(node) { + return (node.parent.type === utils_1.AST_NODE_TYPES.NewExpression || + node.parent.type === utils_1.AST_NODE_TYPES.CallExpression || + node.parent.type === utils_1.AST_NODE_TYPES.ThrowStatement || + node.parent.type === utils_1.AST_NODE_TYPES.AssignmentPattern || + node.parent.type === utils_1.AST_NODE_TYPES.JSXExpressionContainer || + (node.parent.type === utils_1.AST_NODE_TYPES.TemplateLiteral && + node.parent.parent.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression)); + } + function checkExpressionForObjectAssertion(node) { + if (options.assertionStyle === 'never' || + options.objectLiteralTypeAssertions === 'allow' || + node.expression.type !== utils_1.AST_NODE_TYPES.ObjectExpression) { + return; + } + if (options.objectLiteralTypeAssertions === 'allow-as-parameter' && + isAsParameter(node)) { + return; + } + if (checkType(node.typeAnnotation)) { + const suggest = getSuggestions(node, 'replaceObjectTypeAssertionWithAnnotation', 'replaceObjectTypeAssertionWithSatisfies'); + context.report({ + node, + messageId: 'unexpectedObjectTypeAssertion', + suggest, + }); + } + } + function checkExpressionForArrayAssertion(node) { + if (options.assertionStyle === 'never' || + options.arrayLiteralTypeAssertions === 'allow' || + node.expression.type !== utils_1.AST_NODE_TYPES.ArrayExpression) { + return; + } + if (options.arrayLiteralTypeAssertions === 'allow-as-parameter' && + isAsParameter(node)) { + return; + } + if (checkType(node.typeAnnotation)) { + const suggest = getSuggestions(node, 'replaceArrayTypeAssertionWithAnnotation', 'replaceArrayTypeAssertionWithSatisfies'); + context.report({ + node, + messageId: 'unexpectedArrayTypeAssertion', + suggest, + }); + } + } + return { + TSAsExpression(node) { + if (options.assertionStyle !== 'as') { + reportIncorrectAssertionType(node); + return; + } + checkExpressionForObjectAssertion(node); + checkExpressionForArrayAssertion(node); + }, + TSTypeAssertion(node) { + if (options.assertionStyle !== 'angle-bracket') { + reportIncorrectAssertionType(node); + return; + } + checkExpressionForObjectAssertion(node); + checkExpressionForArrayAssertion(node); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.d.ts new file mode 100644 index 0000000..79f171d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.d.ts @@ -0,0 +1,4 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule<"interfaceOverType" | "typeOverInterface", [string], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=consistent-type-definitions.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.d.ts.map new file mode 100644 index 0000000..90380cc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"consistent-type-definitions.d.ts","sourceRoot":"","sources":["../../src/rules/consistent-type-definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;;AAMnE,wBAkJG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js new file mode 100644 index 0000000..a11c857 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js @@ -0,0 +1,100 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'consistent-type-definitions', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce type definitions to consistently use either `interface` or `type`', + recommended: 'stylistic', + }, + fixable: 'code', + messages: { + interfaceOverType: 'Use an `interface` instead of a `type`.', + typeOverInterface: 'Use a `type` instead of an `interface`.', + }, + schema: [ + { + type: 'string', + description: 'Which type definition syntax to prefer.', + enum: ['interface', 'type'], + }, + ], + }, + defaultOptions: ['interface'], + create(context, [option]) { + /** + * Iterates from the highest parent to the currently traversed node + * to determine whether any node in tree is globally declared module declaration + */ + function isCurrentlyTraversedNodeWithinModuleDeclaration(node) { + return context.sourceCode + .getAncestors(node) + .some(node => node.type === utils_1.AST_NODE_TYPES.TSModuleDeclaration && + node.declare && + node.kind === 'global'); + } + return { + ...(option === 'interface' && { + "TSTypeAliasDeclaration[typeAnnotation.type='TSTypeLiteral']"(node) { + context.report({ + node: node.id, + messageId: 'interfaceOverType', + fix(fixer) { + const typeToken = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(node.id, token => token.value === 'type'), util_1.NullThrowsReasons.MissingToken('type keyword', 'type alias')); + const equalsToken = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(node.typeAnnotation, token => token.value === '='), util_1.NullThrowsReasons.MissingToken('=', 'type alias')); + const beforeEqualsToken = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(equalsToken, { + includeComments: true, + }), util_1.NullThrowsReasons.MissingToken('before =', 'type alias')); + return [ + // replace 'type' with 'interface'. + fixer.replaceText(typeToken, 'interface'), + // delete from the = to the { of the type, and put a space to be pretty. + fixer.replaceTextRange([beforeEqualsToken.range[1], node.typeAnnotation.range[0]], ' '), + // remove from the closing } through the end of the statement. + fixer.removeRange([ + node.typeAnnotation.range[1], + node.range[1], + ]), + ]; + }, + }); + }, + }), + ...(option === 'type' && { + TSInterfaceDeclaration(node) { + const fix = isCurrentlyTraversedNodeWithinModuleDeclaration(node) + ? null + : (fixer) => { + const typeNode = node.typeParameters ?? node.id; + const fixes = []; + const firstToken = context.sourceCode.getTokenBefore(node.id); + if (firstToken) { + fixes.push(fixer.replaceText(firstToken, 'type')); + fixes.push(fixer.replaceTextRange([typeNode.range[1], node.body.range[0]], ' = ')); + } + node.extends.forEach(heritage => { + const typeIdentifier = context.sourceCode.getText(heritage); + fixes.push(fixer.insertTextAfter(node.body, ` & ${typeIdentifier}`)); + }); + if (node.parent.type === utils_1.AST_NODE_TYPES.ExportDefaultDeclaration) { + fixes.push(fixer.removeRange([node.parent.range[0], node.range[0]]), fixer.insertTextAfter(node.body, `\nexport default ${node.id.name}`)); + } + return fixes; + }; + context.report({ + node: node.id, + messageId: 'typeOverInterface', + /** + * remove automatically fix when the interface is within a declare global + * @see {@link https://github.com/typescript-eslint/typescript-eslint/issues/2707} + */ + fix, + }); + }, + }), + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.d.ts new file mode 100644 index 0000000..c3b03a4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.d.ts @@ -0,0 +1,10 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type Options = [ + { + fixMixedExportsWithInlineTypeSpecifier: boolean; + } +]; +export type MessageIds = 'multipleExportsAreTypes' | 'singleExportIsType' | 'typeOverValue'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=consistent-type-exports.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.d.ts.map new file mode 100644 index 0000000..45dd678 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"consistent-type-exports.d.ts","sourceRoot":"","sources":["../../src/rules/consistent-type-exports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAenE,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,sCAAsC,EAAE,OAAO,CAAC;KACjD;CACF,CAAC;AAgBF,MAAM,MAAM,UAAU,GAClB,yBAAyB,GACzB,oBAAoB,GACpB,eAAe,CAAC;;AAEpB,wBA0RG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.js new file mode 100644 index 0000000..3106bae --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.js @@ -0,0 +1,332 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'consistent-type-exports', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce consistent usage of type exports', + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + multipleExportsAreTypes: 'Type exports {{exportNames}} are not values and should be exported using `export type`.', + singleExportIsType: 'Type export {{exportNames}} is not a value and should be exported using `export type`.', + typeOverValue: 'All exports in the declaration are only used as types. Use `export type`.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + fixMixedExportsWithInlineTypeSpecifier: { + type: 'boolean', + description: 'Whether the rule will autofix "mixed" export cases using TS inline type specifiers.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + fixMixedExportsWithInlineTypeSpecifier: false, + }, + ], + create(context, [{ fixMixedExportsWithInlineTypeSpecifier }]) { + const sourceExportsMap = {}; + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + /** + * Helper for identifying if a symbol resolves to a + * JavaScript value or a TypeScript type. + * + * @returns True/false if is a type or not, or undefined if the specifier + * can't be resolved. + */ + function isSymbolTypeBased(symbol) { + while (symbol && symbol.flags & ts.SymbolFlags.Alias) { + symbol = checker.getAliasedSymbol(symbol); + if (symbol.getDeclarations()?.find(ts.isTypeOnlyImportOrExportDeclaration)) { + return true; + } + } + if (!symbol || checker.isUnknownSymbol(symbol)) { + return undefined; + } + return !(symbol.flags & ts.SymbolFlags.Value); + } + return { + ExportAllDeclaration(node) { + if (node.exportKind === 'type') { + return; + } + const sourceModule = ts.resolveModuleName(node.source.value, context.filename, services.program.getCompilerOptions(), ts.sys); + if (sourceModule.resolvedModule == null) { + return; + } + const sourceFile = services.program.getSourceFile(sourceModule.resolvedModule.resolvedFileName); + if (sourceFile == null) { + return; + } + const sourceFileSymbol = checker.getSymbolAtLocation(sourceFile); + if (sourceFileSymbol == null) { + return; + } + const sourceFileType = checker.getTypeOfSymbol(sourceFileSymbol); + // Module can explicitly export types or values, and it's not difficult + // to distinguish one from the other, since we can get the flags of + // the exported symbols or check if symbol export declaration has + // the "type" keyword in it. + // + // Things get a lot more complicated when we're dealing with + // export * from './module-with-type-only-exports' + // export type * from './module-with-type-and-value-exports' + // + // TS checker has an internal function getExportsOfModuleWorker that + // recursively visits all module exports, including "export *". It then + // puts type-only-star-exported symbols into the typeOnlyExportStarMap + // property of sourceFile's SymbolLinks. Since symbol links aren't + // exposed outside the checker, we cannot access it directly. + // + // Therefore, to filter out value properties, we use the following hack: + // checker.getPropertiesOfType returns all exports that were originally + // values, but checker.getPropertyOfType returns undefined for + // properties that are mentioned in the typeOnlyExportStarMap. + const isThereAnyExportedValue = checker + .getPropertiesOfType(sourceFileType) + .some(propertyTypeSymbol => checker.getPropertyOfType(sourceFileType, propertyTypeSymbol.escapedName.toString()) != null); + if (isThereAnyExportedValue) { + return; + } + context.report({ + node, + messageId: 'typeOverValue', + fix(fixer) { + const asteriskToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, token => token.type === utils_1.AST_TOKEN_TYPES.Punctuator && + token.value === '*'), util_1.NullThrowsReasons.MissingToken('asterisk', 'export all declaration')); + return fixer.insertTextBefore(asteriskToken, 'type '); + }, + }); + }, + ExportNamedDeclaration(node) { + // Coerce the source into a string for use as a lookup entry. + const source = getSourceFromExport(node) ?? 'undefined'; + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + const sourceExports = (sourceExportsMap[source] ||= { + reportValueExports: [], + source, + typeOnlyNamedExport: null, + valueOnlyNamedExport: null, + }); + // Cache the first encountered exports for the package. We will need to come + // back to these later when fixing the problems. + if (node.exportKind === 'type') { + // The export is a type export + sourceExports.typeOnlyNamedExport ??= node; + } + else { + // The export is a value export + sourceExports.valueOnlyNamedExport ??= node; + } + // Next for the current export, we will separate type/value specifiers. + const typeBasedSpecifiers = []; + const inlineTypeSpecifiers = []; + const valueSpecifiers = []; + // Note: it is valid to export values as types. We will avoid reporting errors + // when this is encountered. + if (node.exportKind !== 'type') { + for (const specifier of node.specifiers) { + if (specifier.exportKind === 'type') { + inlineTypeSpecifiers.push(specifier); + continue; + } + const isTypeBased = isSymbolTypeBased(services.getSymbolAtLocation(specifier.exported)); + if (isTypeBased === true) { + typeBasedSpecifiers.push(specifier); + } + else if (isTypeBased === false) { + // When isTypeBased is undefined, we should avoid reporting them. + valueSpecifiers.push(specifier); + } + } + } + if ((node.exportKind === 'value' && typeBasedSpecifiers.length) || + (node.exportKind === 'type' && valueSpecifiers.length)) { + sourceExports.reportValueExports.push({ + node, + inlineTypeSpecifiers, + typeBasedSpecifiers, + valueSpecifiers, + }); + } + }, + 'Program:exit'() { + for (const sourceExports of Object.values(sourceExportsMap)) { + // If this export has no issues, move on. + if (sourceExports.reportValueExports.length === 0) { + continue; + } + for (const report of sourceExports.reportValueExports) { + if (report.valueSpecifiers.length === 0) { + // Export is all type-only with no type specifiers; convert the entire export to `export type`. + context.report({ + node: report.node, + messageId: 'typeOverValue', + *fix(fixer) { + yield* fixExportInsertType(fixer, context.sourceCode, report.node); + }, + }); + continue; + } + // We have both type and value violations. + const allExportNames = report.typeBasedSpecifiers.map(specifier => specifier.local.type === utils_1.AST_NODE_TYPES.Identifier + ? specifier.local.name + : specifier.local.value); + if (allExportNames.length === 1) { + const exportNames = allExportNames[0]; + context.report({ + node: report.node, + messageId: 'singleExportIsType', + data: { exportNames }, + *fix(fixer) { + if (fixMixedExportsWithInlineTypeSpecifier) { + yield* fixAddTypeSpecifierToNamedExports(fixer, report); + } + else { + yield* fixSeparateNamedExports(fixer, context.sourceCode, report); + } + }, + }); + } + else { + const exportNames = (0, util_1.formatWordList)(allExportNames); + context.report({ + node: report.node, + messageId: 'multipleExportsAreTypes', + data: { exportNames }, + *fix(fixer) { + if (fixMixedExportsWithInlineTypeSpecifier) { + yield* fixAddTypeSpecifierToNamedExports(fixer, report); + } + else { + yield* fixSeparateNamedExports(fixer, context.sourceCode, report); + } + }, + }); + } + } + } + }, + }; + }, +}); +/** + * Inserts "type" into an export. + * + * Example: + * + * export type { Foo } from 'foo'; + * ^^^^ + */ +function* fixExportInsertType(fixer, sourceCode, node) { + const exportToken = (0, util_1.nullThrows)(sourceCode.getFirstToken(node), util_1.NullThrowsReasons.MissingToken('export', node.type)); + yield fixer.insertTextAfter(exportToken, ' type'); + for (const specifier of node.specifiers) { + if (specifier.exportKind === 'type') { + const kindToken = (0, util_1.nullThrows)(sourceCode.getFirstToken(specifier), util_1.NullThrowsReasons.MissingToken('export', specifier.type)); + const firstTokenAfter = (0, util_1.nullThrows)(sourceCode.getTokenAfter(kindToken, { + includeComments: true, + }), 'Missing token following the export kind.'); + yield fixer.removeRange([kindToken.range[0], firstTokenAfter.range[0]]); + } + } +} +/** + * Separates the exports which mismatch the kind of export the given + * node represents. For example, a type export's named specifiers which + * represent values will be inserted in a separate `export` statement. + */ +function* fixSeparateNamedExports(fixer, sourceCode, report) { + const { node, inlineTypeSpecifiers, typeBasedSpecifiers, valueSpecifiers } = report; + const typeSpecifiers = [...typeBasedSpecifiers, ...inlineTypeSpecifiers]; + const source = getSourceFromExport(node); + const specifierNames = typeSpecifiers.map(getSpecifierText).join(', '); + const exportToken = (0, util_1.nullThrows)(sourceCode.getFirstToken(node), util_1.NullThrowsReasons.MissingToken('export', node.type)); + // Filter the bad exports from the current line. + const filteredSpecifierNames = valueSpecifiers + .map(getSpecifierText) + .join(', '); + const openToken = (0, util_1.nullThrows)(sourceCode.getFirstToken(node, util_1.isOpeningBraceToken), util_1.NullThrowsReasons.MissingToken('{', node.type)); + const closeToken = (0, util_1.nullThrows)(sourceCode.getLastToken(node, util_1.isClosingBraceToken), util_1.NullThrowsReasons.MissingToken('}', node.type)); + // Remove exports from the current line which we're going to re-insert. + yield fixer.replaceTextRange([openToken.range[1], closeToken.range[0]], ` ${filteredSpecifierNames} `); + // Insert the bad exports into a new export line above. + yield fixer.insertTextBefore(exportToken, `export type { ${specifierNames} }${source ? ` from '${source}'` : ''};\n`); +} +function* fixAddTypeSpecifierToNamedExports(fixer, report) { + if (report.node.exportKind === 'type') { + return; + } + for (const specifier of report.typeBasedSpecifiers) { + yield fixer.insertTextBefore(specifier, 'type '); + } +} +/** + * Returns the source of the export, or undefined if the named export has no source. + */ +function getSourceFromExport(node) { + if (node.source?.type === utils_1.AST_NODE_TYPES.Literal && + typeof node.source.value === 'string') { + return node.source.value; + } + return undefined; +} +/** + * Returns the specifier text for the export. If it is aliased, we take care to return + * the proper formatting. + */ +function getSpecifierText(specifier) { + const exportedName = specifier.exported.type === utils_1.AST_NODE_TYPES.Literal + ? specifier.exported.raw + : specifier.exported.name; + const localName = specifier.local.type === utils_1.AST_NODE_TYPES.Literal + ? specifier.local.raw + : specifier.local.name; + return `${localName}${exportedName !== localName ? ` as ${exportedName}` : ''}`; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.d.ts new file mode 100644 index 0000000..dafd683 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.d.ts @@ -0,0 +1,14 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +type Prefer = 'no-type-imports' | 'type-imports'; +type FixStyle = 'inline-type-imports' | 'separate-type-imports'; +export type Options = [ + { + disallowTypeAnnotations?: boolean; + fixStyle?: FixStyle; + prefer?: Prefer; + } +]; +export type MessageIds = 'avoidImportType' | 'noImportTypeAnnotations' | 'someImportsAreOnlyTypes' | 'typeOverValue'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=consistent-type-imports.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.d.ts.map new file mode 100644 index 0000000..f076adf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"consistent-type-imports.d.ts","sourceRoot":"","sources":["../../src/rules/consistent-type-imports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAkBnE,KAAK,MAAM,GAAG,iBAAiB,GAAG,cAAc,CAAC;AACjD,KAAK,QAAQ,GAAG,qBAAqB,GAAG,uBAAuB,CAAC;AAEhE,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,uBAAuB,CAAC,EAAE,OAAO,CAAC;QAClC,QAAQ,CAAC,EAAE,QAAQ,CAAC;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB;CACF,CAAC;AAoBF,MAAM,MAAM,UAAU,GAClB,iBAAiB,GACjB,yBAAyB,GACzB,yBAAyB,GACzB,eAAe,CAAC;;AACpB,wBAw4BG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js new file mode 100644 index 0000000..e771baf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js @@ -0,0 +1,608 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'consistent-type-imports', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce consistent usage of type imports', + }, + fixable: 'code', + messages: { + avoidImportType: 'Use an `import` instead of an `import type`.', + noImportTypeAnnotations: '`import()` type annotations are forbidden.', + someImportsAreOnlyTypes: 'Imports {{typeImports}} are only used as type.', + typeOverValue: 'All imports in the declaration are only used as types. Use `import type`.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + disallowTypeAnnotations: { + type: 'boolean', + description: 'Whether to disallow type imports in type annotations (`import()`).', + }, + fixStyle: { + type: 'string', + description: 'The expected type modifier to be added when an import is detected as used only in the type position.', + enum: ['separate-type-imports', 'inline-type-imports'], + }, + prefer: { + type: 'string', + description: 'The expected import kind for type-only imports.', + enum: ['type-imports', 'no-type-imports'], + }, + }, + }, + ], + }, + defaultOptions: [ + { + disallowTypeAnnotations: true, + fixStyle: 'separate-type-imports', + prefer: 'type-imports', + }, + ], + create(context, [option]) { + const prefer = option.prefer ?? 'type-imports'; + const disallowTypeAnnotations = option.disallowTypeAnnotations !== false; + const selectors = {}; + if (disallowTypeAnnotations) { + selectors.TSImportType = (node) => { + context.report({ + node, + messageId: 'noImportTypeAnnotations', + }); + }; + } + if (prefer === 'no-type-imports') { + return { + ...selectors, + 'ImportDeclaration[importKind = "type"]'(node) { + context.report({ + node, + messageId: 'avoidImportType', + fix(fixer) { + return fixRemoveTypeSpecifierFromImportDeclaration(fixer, node); + }, + }); + }, + 'ImportSpecifier[importKind = "type"]'(node) { + context.report({ + node, + messageId: 'avoidImportType', + fix(fixer) { + return fixRemoveTypeSpecifierFromImportSpecifier(fixer, node); + }, + }); + }, + }; + } + // prefer type imports + const fixStyle = option.fixStyle ?? 'separate-type-imports'; + let hasDecoratorMetadata = false; + const sourceImportsMap = {}; + const emitDecoratorMetadata = (0, util_1.getParserServices)(context, true).emitDecoratorMetadata ?? false; + const experimentalDecorators = (0, util_1.getParserServices)(context, true).experimentalDecorators ?? false; + if (experimentalDecorators && emitDecoratorMetadata) { + selectors.Decorator = () => { + hasDecoratorMetadata = true; + }; + } + return { + ...selectors, + ImportDeclaration(node) { + const source = node.source.value; + // sourceImports is the object containing all the specifics for a particular import source, type or value + sourceImportsMap[source] ??= { + reportValueImports: [], // if there is a mismatch where type importKind but value specifiers + source, + typeOnlyNamedImport: null, // if only type imports + valueImport: null, // if only value imports + valueOnlyNamedImport: null, // if only value imports with named specifiers + }; + const sourceImports = sourceImportsMap[source]; + if (node.importKind === 'type') { + if (!sourceImports.typeOnlyNamedImport && + node.specifiers.every(specifier => specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier)) { + // definitely import type { TypeX } + sourceImports.typeOnlyNamedImport = node; + } + } + else if (!sourceImports.valueOnlyNamedImport && + node.specifiers.length && + node.specifiers.every(specifier => specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier)) { + sourceImports.valueOnlyNamedImport = node; + sourceImports.valueImport = node; + } + else if (!sourceImports.valueImport && + node.specifiers.some(specifier => specifier.type === utils_1.AST_NODE_TYPES.ImportDefaultSpecifier)) { + sourceImports.valueImport = node; + } + const typeSpecifiers = []; + const inlineTypeSpecifiers = []; + const valueSpecifiers = []; + const unusedSpecifiers = []; + for (const specifier of node.specifiers) { + if (specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier && + specifier.importKind === 'type') { + inlineTypeSpecifiers.push(specifier); + continue; + } + const [variable] = context.sourceCode.getDeclaredVariables(specifier); + if (variable.references.length === 0) { + unusedSpecifiers.push(specifier); + } + else { + const onlyHasTypeReferences = variable.references.every(ref => { + /** + * keep origin import kind when export + * export { Type } + * export default Type; + * export = Type; + */ + if ((ref.identifier.parent.type === + utils_1.AST_NODE_TYPES.ExportSpecifier || + ref.identifier.parent.type === + utils_1.AST_NODE_TYPES.ExportDefaultDeclaration || + ref.identifier.parent.type === + utils_1.AST_NODE_TYPES.TSExportAssignment) && + ref.isValueReference && + ref.isTypeReference) { + return node.importKind === 'type'; + } + if (ref.isValueReference) { + let parent = ref.identifier.parent; + let child = ref.identifier; + while (parent) { + switch (parent.type) { + // CASE 1: + // `type T = typeof foo` will create a value reference because "foo" must be a value type + // however this value reference is safe to use with type-only imports + case utils_1.AST_NODE_TYPES.TSTypeQuery: + return true; + case utils_1.AST_NODE_TYPES.TSQualifiedName: + // TSTypeQuery must have a TSESTree.EntityName as its child, so we can filter here and break early + if (parent.left !== child) { + return false; + } + child = parent; + parent = parent.parent; + continue; + // END CASE 1 + ////////////// + // CASE 2: + // `type T = { [foo]: string }` will create a value reference because "foo" must be a value type + // however this value reference is safe to use with type-only imports. + // Also this is represented as a non-type AST - hence it uses MemberExpression + case utils_1.AST_NODE_TYPES.TSPropertySignature: + return parent.key === child; + case utils_1.AST_NODE_TYPES.MemberExpression: + if (parent.object !== child) { + return false; + } + child = parent; + parent = parent.parent; + continue; + // END CASE 2 + default: + return false; + } + } + } + return ref.isTypeReference; + }); + if (onlyHasTypeReferences) { + typeSpecifiers.push(specifier); + } + else { + valueSpecifiers.push(specifier); + } + } + } + if (node.importKind === 'value' && typeSpecifiers.length) { + sourceImports.reportValueImports.push({ + node, + inlineTypeSpecifiers, + typeSpecifiers, + unusedSpecifiers, + valueSpecifiers, + }); + } + }, + 'Program:exit'() { + if (hasDecoratorMetadata) { + // Experimental decorator metadata is bowl of poop that cannot be + // supported based on pure syntactic analysis. + // + // So we can do one of two things: + // 1) add type-information to the rule in a breaking change and + // prevent users from using it so that we can fully support this + // case. + // 2) make the rule ignore all imports that are used in a file that + // might have decorator metadata. + // + // (1) is has huge impact and prevents the rule from being used by 99% + // of users Frankly - it's a straight-up bad option. So instead we + // choose with option (2) and just avoid reporting on any imports in a + // file with both emitDecoratorMetadata AND decorators + // + // For more context see the discussion in this issue and its linked + // issues: + // https://github.com/typescript-eslint/typescript-eslint/issues/5468 + // + // + // NOTE - in TS 5.0 `experimentalDecorators` became the legacy option, + // replaced with un-flagged, stable decorators and thus the type-aware + // emitDecoratorMetadata implementation also became legacy. in TS 5.2 + // support for the new, stable decorator metadata proposal was added - + // however this proposal does not include type information + // + // + // PHEW. So TL;DR what does all this mean? + // - if you use experimentalDecorators:true, + // emitDecoratorMetadata:true, and have a decorator in the file - + // the rule will do nothing in the file out of an abundance of + // caution. + // - else the rule will work as normal. + return; + } + for (const sourceImports of Object.values(sourceImportsMap)) { + if (sourceImports.reportValueImports.length === 0) { + // nothing to fix. value specifiers and type specifiers are correctly written + continue; + } + for (const report of sourceImports.reportValueImports) { + if (report.valueSpecifiers.length === 0 && + report.unusedSpecifiers.length === 0 && + report.node.importKind !== 'type') { + /** + * checks if import has type assertions + * @example + * ```ts + * import * as type from 'mod' assert \{ type: 'json' \}; + * ``` + * https://github.com/typescript-eslint/typescript-eslint/issues/7527 + */ + if (report.node.attributes.length === 0) { + context.report({ + node: report.node, + messageId: 'typeOverValue', + *fix(fixer) { + yield* fixToTypeImportDeclaration(fixer, report, sourceImports); + }, + }); + } + } + else { + // we have a mixed type/value import or just value imports, so we need to split them out into multiple imports if separate-type-imports is configured + const importNames = report.typeSpecifiers.map(specifier => `"${specifier.local.name}"`); + const message = (() => { + const typeImports = (0, util_1.formatWordList)(importNames); + if (importNames.length === 1) { + return { + messageId: 'someImportsAreOnlyTypes', + data: { + typeImports, + }, + }; + } + return { + messageId: 'someImportsAreOnlyTypes', + data: { + typeImports, + }, + }; + })(); + context.report({ + node: report.node, + ...message, + *fix(fixer) { + // take all the typeSpecifiers and put them on a new line + yield* fixToTypeImportDeclaration(fixer, report, sourceImports); + }, + }); + } + } + } + }, + }; + function classifySpecifier(node) { + const defaultSpecifier = node.specifiers[0].type === utils_1.AST_NODE_TYPES.ImportDefaultSpecifier + ? node.specifiers[0] + : null; + const namespaceSpecifier = node.specifiers.find((specifier) => specifier.type === utils_1.AST_NODE_TYPES.ImportNamespaceSpecifier) ?? null; + const namedSpecifiers = node.specifiers.filter((specifier) => specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier); + return { + defaultSpecifier, + namedSpecifiers, + namespaceSpecifier, + }; + } + /** + * Returns information for fixing named specifiers, type or value + */ + function getFixesNamedSpecifiers(fixer, node, subsetNamedSpecifiers, allNamedSpecifiers) { + if (allNamedSpecifiers.length === 0) { + return { + removeTypeNamedSpecifiers: [], + typeNamedSpecifiersText: '', + }; + } + const typeNamedSpecifiersTexts = []; + const removeTypeNamedSpecifiers = []; + if (subsetNamedSpecifiers.length === allNamedSpecifiers.length) { + // import Foo, {Type1, Type2} from 'foo' + // import DefType, {Type1, Type2} from 'foo' + const openingBraceToken = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(subsetNamedSpecifiers[0], util_1.isOpeningBraceToken), util_1.NullThrowsReasons.MissingToken('{', node.type)); + const commaToken = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(openingBraceToken, util_1.isCommaToken), util_1.NullThrowsReasons.MissingToken(',', node.type)); + const closingBraceToken = (0, util_1.nullThrows)(context.sourceCode.getFirstTokenBetween(openingBraceToken, node.source, util_1.isClosingBraceToken), util_1.NullThrowsReasons.MissingToken('}', node.type)); + // import DefType, {...} from 'foo' + // ^^^^^^^ remove + removeTypeNamedSpecifiers.push(fixer.removeRange([commaToken.range[0], closingBraceToken.range[1]])); + typeNamedSpecifiersTexts.push(context.sourceCode.text.slice(openingBraceToken.range[1], closingBraceToken.range[0])); + } + else { + const namedSpecifierGroups = []; + let group = []; + for (const namedSpecifier of allNamedSpecifiers) { + if (subsetNamedSpecifiers.includes(namedSpecifier)) { + group.push(namedSpecifier); + } + else if (group.length) { + namedSpecifierGroups.push(group); + group = []; + } + } + if (group.length) { + namedSpecifierGroups.push(group); + } + for (const namedSpecifiers of namedSpecifierGroups) { + const { removeRange, textRange } = getNamedSpecifierRanges(namedSpecifiers, allNamedSpecifiers); + removeTypeNamedSpecifiers.push(fixer.removeRange(removeRange)); + typeNamedSpecifiersTexts.push(context.sourceCode.text.slice(...textRange)); + } + } + return { + removeTypeNamedSpecifiers, + typeNamedSpecifiersText: typeNamedSpecifiersTexts.join(','), + }; + } + /** + * Returns ranges for fixing named specifier. + */ + function getNamedSpecifierRanges(namedSpecifierGroup, allNamedSpecifiers) { + const first = namedSpecifierGroup[0]; + const last = namedSpecifierGroup[namedSpecifierGroup.length - 1]; + const removeRange = [first.range[0], last.range[1]]; + const textRange = [...removeRange]; + const before = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(first), util_1.NullThrowsReasons.MissingToken('token', 'first specifier')); + textRange[0] = before.range[1]; + if ((0, util_1.isCommaToken)(before)) { + removeRange[0] = before.range[0]; + } + else { + removeRange[0] = before.range[1]; + } + const isFirst = allNamedSpecifiers[0] === first; + const isLast = allNamedSpecifiers[allNamedSpecifiers.length - 1] === last; + const after = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(last), util_1.NullThrowsReasons.MissingToken('token', 'last specifier')); + textRange[1] = after.range[0]; + if ((isFirst || isLast) && (0, util_1.isCommaToken)(after)) { + removeRange[1] = after.range[1]; + } + return { + removeRange, + textRange, + }; + } + /** + * insert specifiers to named import node. + * e.g. + * import type { Already, Type1, Type2 } from 'foo' + * ^^^^^^^^^^^^^ insert + */ + function fixInsertNamedSpecifiersInNamedSpecifierList(fixer, target, insertText) { + const closingBraceToken = (0, util_1.nullThrows)(context.sourceCode.getFirstTokenBetween((0, util_1.nullThrows)(context.sourceCode.getFirstToken(target), util_1.NullThrowsReasons.MissingToken('token before', 'import')), target.source, util_1.isClosingBraceToken), util_1.NullThrowsReasons.MissingToken('}', target.type)); + const before = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(closingBraceToken), util_1.NullThrowsReasons.MissingToken('token before', 'closing brace')); + if (!(0, util_1.isCommaToken)(before) && !(0, util_1.isOpeningBraceToken)(before)) { + insertText = `,${insertText}`; + } + return fixer.insertTextBefore(closingBraceToken, insertText); + } + /** + * insert type keyword to named import node. + * e.g. + * import ADefault, { Already, type Type1, type Type2 } from 'foo' + * ^^^^ insert + */ + function* fixInsertTypeKeywordInNamedSpecifierList(fixer, typeSpecifiers) { + for (const spec of typeSpecifiers) { + const insertText = context.sourceCode.text.slice(...spec.range); + yield fixer.replaceTextRange(spec.range, `type ${insertText}`); + } + } + function* fixInlineTypeImportDeclaration(fixer, report, sourceImports) { + const { node } = report; + // For a value import, will only add an inline type to named specifiers + const { namedSpecifiers } = classifySpecifier(node); + const typeNamedSpecifiers = namedSpecifiers.filter(specifier => report.typeSpecifiers.includes(specifier)); + if (sourceImports.valueImport) { + // add import named type specifiers to its value import + // import ValueA, { type A } + // ^^^^ insert + const { namedSpecifiers: valueImportNamedSpecifiers } = classifySpecifier(sourceImports.valueImport); + if (sourceImports.valueOnlyNamedImport || + valueImportNamedSpecifiers.length) { + yield* fixInsertTypeKeywordInNamedSpecifierList(fixer, typeNamedSpecifiers); + } + } + } + function* fixToTypeImportDeclaration(fixer, report, sourceImports) { + const { node } = report; + const { defaultSpecifier, namedSpecifiers, namespaceSpecifier } = classifySpecifier(node); + if (namespaceSpecifier && !defaultSpecifier) { + // import * as types from 'foo' + // checks for presence of import assertions + if (node.attributes.length === 0) { + yield* fixInsertTypeSpecifierForImportDeclaration(fixer, node, false); + } + return; + } + if (defaultSpecifier) { + if (report.typeSpecifiers.includes(defaultSpecifier) && + namedSpecifiers.length === 0 && + !namespaceSpecifier) { + // import Type from 'foo' + yield* fixInsertTypeSpecifierForImportDeclaration(fixer, node, true); + return; + } + if (fixStyle === 'inline-type-imports' && + !report.typeSpecifiers.includes(defaultSpecifier) && + namedSpecifiers.length > 0 && + !namespaceSpecifier) { + // if there is a default specifier but it isn't a type specifier, then just add the inline type modifier to the named specifiers + // import AValue, {BValue, Type1, Type2} from 'foo' + yield* fixInlineTypeImportDeclaration(fixer, report, sourceImports); + return; + } + } + else if (!namespaceSpecifier) { + if (fixStyle === 'inline-type-imports' && + namedSpecifiers.some(specifier => report.typeSpecifiers.includes(specifier))) { + // import {AValue, Type1, Type2} from 'foo' + yield* fixInlineTypeImportDeclaration(fixer, report, sourceImports); + return; + } + if (namedSpecifiers.every(specifier => report.typeSpecifiers.includes(specifier))) { + // import {Type1, Type2} from 'foo' + yield* fixInsertTypeSpecifierForImportDeclaration(fixer, node, false); + return; + } + } + const typeNamedSpecifiers = namedSpecifiers.filter(specifier => report.typeSpecifiers.includes(specifier)); + const fixesNamedSpecifiers = getFixesNamedSpecifiers(fixer, node, typeNamedSpecifiers, namedSpecifiers); + const afterFixes = []; + if (typeNamedSpecifiers.length) { + if (sourceImports.typeOnlyNamedImport) { + const insertTypeNamedSpecifiers = fixInsertNamedSpecifiersInNamedSpecifierList(fixer, sourceImports.typeOnlyNamedImport, fixesNamedSpecifiers.typeNamedSpecifiersText); + if (sourceImports.typeOnlyNamedImport.range[1] <= node.range[0]) { + yield insertTypeNamedSpecifiers; + } + else { + afterFixes.push(insertTypeNamedSpecifiers); + } + } + else { + // The import is both default and named. Insert named on new line because can't mix default type import and named type imports + // eslint-disable-next-line no-lonely-if + if (fixStyle === 'inline-type-imports') { + yield fixer.insertTextBefore(node, `import {${typeNamedSpecifiers + .map(spec => { + const insertText = context.sourceCode.text.slice(...spec.range); + return `type ${insertText}`; + }) + .join(', ')}} from ${context.sourceCode.getText(node.source)};\n`); + } + else { + yield fixer.insertTextBefore(node, `import type {${fixesNamedSpecifiers.typeNamedSpecifiersText}} from ${context.sourceCode.getText(node.source)};\n`); + } + } + } + const fixesRemoveTypeNamespaceSpecifier = []; + if (namespaceSpecifier && + report.typeSpecifiers.includes(namespaceSpecifier)) { + // import Foo, * as Type from 'foo' + // import DefType, * as Type from 'foo' + // import DefType, * as Type from 'foo' + const commaToken = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(namespaceSpecifier, util_1.isCommaToken), util_1.NullThrowsReasons.MissingToken(',', node.type)); + // import Def, * as Ns from 'foo' + // ^^^^^^^^^ remove + fixesRemoveTypeNamespaceSpecifier.push(fixer.removeRange([commaToken.range[0], namespaceSpecifier.range[1]])); + // import type * as Ns from 'foo' + // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ insert + yield fixer.insertTextBefore(node, `import type ${context.sourceCode.getText(namespaceSpecifier)} from ${context.sourceCode.getText(node.source)};\n`); + } + if (defaultSpecifier && + report.typeSpecifiers.includes(defaultSpecifier)) { + if (report.typeSpecifiers.length === node.specifiers.length) { + const importToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isImportKeyword), util_1.NullThrowsReasons.MissingToken('import', node.type)); + // import type Type from 'foo' + // ^^^^ insert + yield fixer.insertTextAfter(importToken, ' type'); + } + else { + const commaToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(defaultSpecifier, util_1.isCommaToken), util_1.NullThrowsReasons.MissingToken(',', defaultSpecifier.type)); + // import Type , {...} from 'foo' + // ^^^^^ pick + const defaultText = context.sourceCode.text + .slice(defaultSpecifier.range[0], commaToken.range[0]) + .trim(); + yield fixer.insertTextBefore(node, `import type ${defaultText} from ${context.sourceCode.getText(node.source)};\n`); + const afterToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(commaToken, { + includeComments: true, + }), util_1.NullThrowsReasons.MissingToken('any token', node.type)); + // import Type , {...} from 'foo' + // ^^^^^^^ remove + yield fixer.removeRange([ + defaultSpecifier.range[0], + afterToken.range[0], + ]); + } + } + yield* fixesNamedSpecifiers.removeTypeNamedSpecifiers; + yield* fixesRemoveTypeNamespaceSpecifier; + yield* afterFixes; + } + function* fixInsertTypeSpecifierForImportDeclaration(fixer, node, isDefaultImport) { + // import type Foo from 'foo' + // ^^^^^ insert + const importToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isImportKeyword), util_1.NullThrowsReasons.MissingToken('import', node.type)); + yield fixer.insertTextAfter(importToken, ' type'); + if (isDefaultImport) { + // Has default import + const openingBraceToken = context.sourceCode.getFirstTokenBetween(importToken, node.source, util_1.isOpeningBraceToken); + if (openingBraceToken) { + // Only braces. e.g. import Foo, {} from 'foo' + const commaToken = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(openingBraceToken, util_1.isCommaToken), util_1.NullThrowsReasons.MissingToken(',', node.type)); + const closingBraceToken = (0, util_1.nullThrows)(context.sourceCode.getFirstTokenBetween(openingBraceToken, node.source, util_1.isClosingBraceToken), util_1.NullThrowsReasons.MissingToken('}', node.type)); + // import type Foo, {} from 'foo' + // ^^ remove + yield fixer.removeRange([ + commaToken.range[0], + closingBraceToken.range[1], + ]); + const specifiersText = context.sourceCode.text.slice(commaToken.range[1], closingBraceToken.range[1]); + if (node.specifiers.length > 1) { + yield fixer.insertTextAfter(node, `\nimport type${specifiersText} from ${context.sourceCode.getText(node.source)};`); + } + } + } + // make sure we don't do anything like `import type {type T} from 'foo';` + for (const specifier of node.specifiers) { + if (specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier && + specifier.importKind === 'type') { + yield* fixRemoveTypeSpecifierFromImportSpecifier(fixer, specifier); + } + } + } + function* fixRemoveTypeSpecifierFromImportDeclaration(fixer, node) { + // import type Foo from 'foo' + // ^^^^ remove + const importToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isImportKeyword), util_1.NullThrowsReasons.MissingToken('import', node.type)); + const typeToken = (0, util_1.nullThrows)(context.sourceCode.getFirstTokenBetween(importToken, node.specifiers[0]?.local ?? node.source, util_1.isTypeKeyword), util_1.NullThrowsReasons.MissingToken('type', node.type)); + const afterToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(typeToken, { includeComments: true }), util_1.NullThrowsReasons.MissingToken('any token', node.type)); + yield fixer.removeRange([typeToken.range[0], afterToken.range[0]]); + } + function* fixRemoveTypeSpecifierFromImportSpecifier(fixer, node) { + // import { type Foo } from 'foo' + // ^^^^ remove + const typeToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isTypeKeyword), util_1.NullThrowsReasons.MissingToken('type', node.type)); + const afterToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(typeToken, { includeComments: true }), util_1.NullThrowsReasons.MissingToken('any token', node.type)); + yield fixer.removeRange([typeToken.range[0], afterToken.range[0]]); + } + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.d.ts new file mode 100644 index 0000000..7b520ce --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldBeLast", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=default-param-last.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.d.ts.map new file mode 100644 index 0000000..ec59a8e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"default-param-last.d.ts","sourceRoot":"","sources":["../../src/rules/default-param-last.ts"],"names":[],"mappings":";AAMA,wBAgFG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.js new file mode 100644 index 0000000..9866de2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.js @@ -0,0 +1,68 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'default-param-last', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce default parameters to be last', + extendsBaseRule: true, + frozen: true, + }, + messages: { + shouldBeLast: 'Default parameters should be last.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + /** + * checks if node is optional parameter + * @param node the node to be evaluated + * @private + */ + function isOptionalParam(node) { + return ((node.type === utils_1.AST_NODE_TYPES.ArrayPattern || + node.type === utils_1.AST_NODE_TYPES.AssignmentPattern || + node.type === utils_1.AST_NODE_TYPES.Identifier || + node.type === utils_1.AST_NODE_TYPES.ObjectPattern || + node.type === utils_1.AST_NODE_TYPES.RestElement) && + node.optional); + } + /** + * checks if node is plain parameter + * @param node the node to be evaluated + * @private + */ + function isPlainParam(node) { + return !(node.type === utils_1.AST_NODE_TYPES.AssignmentPattern || + node.type === utils_1.AST_NODE_TYPES.RestElement || + isOptionalParam(node)); + } + function checkDefaultParamLast(node) { + let hasSeenPlainParam = false; + for (let i = node.params.length - 1; i >= 0; i--) { + const current = node.params[i]; + const param = current.type === utils_1.AST_NODE_TYPES.TSParameterProperty + ? current.parameter + : current; + if (isPlainParam(param)) { + hasSeenPlainParam = true; + continue; + } + if (hasSeenPlainParam && + (isOptionalParam(param) || + param.type === utils_1.AST_NODE_TYPES.AssignmentPattern)) { + context.report({ node: current, messageId: 'shouldBeLast' }); + } + } + } + return { + ArrowFunctionExpression: checkDefaultParamLast, + FunctionDeclaration: checkDefaultParamLast, + FunctionExpression: checkDefaultParamLast, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.d.ts new file mode 100644 index 0000000..972b77e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.d.ts @@ -0,0 +1,22 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"useBrackets" | "useDot", [{ + allowIndexSignaturePropertyAccess?: boolean; + allowKeywords?: boolean; + allowPattern?: string; + allowPrivateClassPropertyAccess?: boolean; + allowProtectedClassPropertyAccess?: boolean; +}], unknown, { + MemberExpression(node: TSESTree.MemberExpression): void; +}>; +export type Options = InferOptionsTypeFromRule; +export type MessageIds = InferMessageIdsTypeFromRule; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"useBrackets" | "useDot", [{ + allowIndexSignaturePropertyAccess?: boolean; + allowKeywords?: boolean; + allowPattern?: string; + allowPrivateClassPropertyAccess?: boolean; + allowProtectedClassPropertyAccess?: boolean; +}], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=dot-notation.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.d.ts.map new file mode 100644 index 0000000..3b8e4d3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dot-notation.d.ts","sourceRoot":"","sources":["../../src/rules/dot-notation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAMzD,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAKjB,QAAA,MAAM,QAAQ;;;;;;;;EAAoC,CAAC;AAEnD,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC,OAAO,QAAQ,CAAC,CAAC;;;;;;;;AAYtE,wBAgHG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js new file mode 100644 index 0000000..a363cdc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js @@ -0,0 +1,139 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('dot-notation'); +const defaultOptions = [ + { + allowIndexSignaturePropertyAccess: false, + allowKeywords: true, + allowPattern: '', + allowPrivateClassPropertyAccess: false, + allowProtectedClassPropertyAccess: false, + }, +]; +exports.default = (0, util_1.createRule)({ + name: 'dot-notation', + meta: { + type: 'suggestion', + defaultOptions, + docs: { + description: 'Enforce dot notation whenever possible', + extendsBaseRule: true, + frozen: true, + recommended: 'stylistic', + requiresTypeChecking: true, + }, + fixable: baseRule.meta.fixable, + hasSuggestions: baseRule.meta.hasSuggestions, + messages: baseRule.meta.messages, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowIndexSignaturePropertyAccess: { + type: 'boolean', + description: 'Whether to allow accessing properties matching an index signature with array notation.', + }, + allowKeywords: { + type: 'boolean', + description: 'Whether to allow keywords such as ["class"]`.', + }, + allowPattern: { + type: 'string', + description: 'Regular expression of names to allow.', + }, + allowPrivateClassPropertyAccess: { + type: 'boolean', + description: 'Whether to allow accessing class members marked as `private` with array notation.', + }, + allowProtectedClassPropertyAccess: { + type: 'boolean', + description: 'Whether to allow accessing class members marked as `protected` with array notation.', + }, + }, + }, + ], + }, + defaultOptions, + create(context, [options]) { + const rules = baseRule.create(context); + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const allowPrivateClassPropertyAccess = options.allowPrivateClassPropertyAccess; + const allowProtectedClassPropertyAccess = options.allowProtectedClassPropertyAccess; + const allowIndexSignaturePropertyAccess = (options.allowIndexSignaturePropertyAccess ?? false) || + tsutils.isCompilerOptionEnabled(services.program.getCompilerOptions(), 'noPropertyAccessFromIndexSignature'); + return { + MemberExpression(node) { + if ((allowPrivateClassPropertyAccess || + allowProtectedClassPropertyAccess || + allowIndexSignaturePropertyAccess) && + node.computed) { + // for perf reasons - only fetch symbols if we have to + const propertySymbol = services.getSymbolAtLocation(node.property) ?? + services + .getTypeAtLocation(node.object) + .getNonNullableType() + .getProperties() + .find(propertySymbol => node.property.type === utils_1.AST_NODE_TYPES.Literal && + propertySymbol.escapedName === node.property.value); + const modifierKind = (0, util_1.getModifiers)(propertySymbol?.getDeclarations()?.[0])?.[0].kind; + if ((allowPrivateClassPropertyAccess && + modifierKind === ts.SyntaxKind.PrivateKeyword) || + (allowProtectedClassPropertyAccess && + modifierKind === ts.SyntaxKind.ProtectedKeyword)) { + return; + } + if (propertySymbol == null && allowIndexSignaturePropertyAccess) { + const objectType = services + .getTypeAtLocation(node.object) + .getNonNullableType(); + const indexInfos = checker.getIndexInfosOfType(objectType); + if (indexInfos.some(info => info.keyType.flags & ts.TypeFlags.StringLike)) { + return; + } + } + } + rules.MemberExpression(node); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.d.ts new file mode 100644 index 0000000..b3cedff --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.d.ts @@ -0,0 +1,37 @@ +import * as ts from 'typescript'; +/** + * Retrieve only the Enum literals from a type. for example: + * - 123 --> [] + * - {} --> [] + * - Fruit.Apple --> [Fruit.Apple] + * - Fruit.Apple | Vegetable.Lettuce --> [Fruit.Apple, Vegetable.Lettuce] + * - Fruit.Apple | Vegetable.Lettuce | 123 --> [Fruit.Apple, Vegetable.Lettuce] + * - T extends Fruit --> [Fruit] + */ +export declare function getEnumLiterals(type: ts.Type): ts.LiteralType[]; +/** + * A type can have 0 or more enum types. For example: + * - 123 --> [] + * - {} --> [] + * - Fruit.Apple --> [Fruit] + * - Fruit.Apple | Vegetable.Lettuce --> [Fruit, Vegetable] + * - Fruit.Apple | Vegetable.Lettuce | 123 --> [Fruit, Vegetable] + * - T extends Fruit --> [Fruit] + */ +export declare function getEnumTypes(typeChecker: ts.TypeChecker, type: ts.Type): ts.Type[]; +/** + * Returns the enum key that matches the given literal node, or null if none + * match. For example: + * ```ts + * enum Fruit { + * Apple = 'apple', + * Banana = 'banana', + * } + * + * getEnumKeyForLiteral([Fruit.Apple, Fruit.Banana], 'apple') --> 'Fruit.Apple' + * getEnumKeyForLiteral([Fruit.Apple, Fruit.Banana], 'banana') --> 'Fruit.Banana' + * getEnumKeyForLiteral([Fruit.Apple, Fruit.Banana], 'cherry') --> null + * ``` + */ +export declare function getEnumKeyForLiteral(enumLiterals: ts.LiteralType[], literal: unknown): string | null; +//# sourceMappingURL=shared.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.d.ts.map new file mode 100644 index 0000000..fa326dd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/rules/enum-utils/shared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAwBjC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,WAAW,EAAE,CAM/D;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,WAAW,EAAE,EAAE,CAAC,WAAW,EAC3B,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,EAAE,CAAC,IAAI,EAAE,CAEX;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,EAAE,CAAC,WAAW,EAAE,EAC9B,OAAO,EAAE,OAAO,GACf,MAAM,GAAG,IAAI,CA+Bf"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js new file mode 100644 index 0000000..0be0c08 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js @@ -0,0 +1,121 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getEnumLiterals = getEnumLiterals; +exports.getEnumTypes = getEnumTypes; +exports.getEnumKeyForLiteral = getEnumKeyForLiteral; +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../../util"); +/* + * If passed an enum member, returns the type of the parent. Otherwise, + * returns itself. + * + * For example: + * - `Fruit` --> `Fruit` + * - `Fruit.Apple` --> `Fruit` + */ +function getBaseEnumType(typeChecker, type) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const symbol = type.getSymbol(); + if (!tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.EnumMember)) { + return type; + } + return typeChecker.getTypeAtLocation(symbol.valueDeclaration.parent); +} +/** + * Retrieve only the Enum literals from a type. for example: + * - 123 --> [] + * - {} --> [] + * - Fruit.Apple --> [Fruit.Apple] + * - Fruit.Apple | Vegetable.Lettuce --> [Fruit.Apple, Vegetable.Lettuce] + * - Fruit.Apple | Vegetable.Lettuce | 123 --> [Fruit.Apple, Vegetable.Lettuce] + * - T extends Fruit --> [Fruit] + */ +function getEnumLiterals(type) { + return tsutils + .unionConstituents(type) + .filter((subType) => (0, util_1.isTypeFlagSet)(subType, ts.TypeFlags.EnumLiteral)); +} +/** + * A type can have 0 or more enum types. For example: + * - 123 --> [] + * - {} --> [] + * - Fruit.Apple --> [Fruit] + * - Fruit.Apple | Vegetable.Lettuce --> [Fruit, Vegetable] + * - Fruit.Apple | Vegetable.Lettuce | 123 --> [Fruit, Vegetable] + * - T extends Fruit --> [Fruit] + */ +function getEnumTypes(typeChecker, type) { + return getEnumLiterals(type).map(type => getBaseEnumType(typeChecker, type)); +} +/** + * Returns the enum key that matches the given literal node, or null if none + * match. For example: + * ```ts + * enum Fruit { + * Apple = 'apple', + * Banana = 'banana', + * } + * + * getEnumKeyForLiteral([Fruit.Apple, Fruit.Banana], 'apple') --> 'Fruit.Apple' + * getEnumKeyForLiteral([Fruit.Apple, Fruit.Banana], 'banana') --> 'Fruit.Banana' + * getEnumKeyForLiteral([Fruit.Apple, Fruit.Banana], 'cherry') --> null + * ``` + */ +function getEnumKeyForLiteral(enumLiterals, literal) { + for (const enumLiteral of enumLiterals) { + if (enumLiteral.value === literal) { + const { symbol } = enumLiteral; + const memberDeclaration = symbol.valueDeclaration; + const enumDeclaration = memberDeclaration.parent; + const memberNameIdentifier = memberDeclaration.name; + const enumName = enumDeclaration.name.text; + switch (memberNameIdentifier.kind) { + case ts.SyntaxKind.Identifier: + return `${enumName}.${memberNameIdentifier.text}`; + case ts.SyntaxKind.StringLiteral: { + const memberName = memberNameIdentifier.text.replaceAll("'", "\\'"); + return `${enumName}['${memberName}']`; + } + case ts.SyntaxKind.ComputedPropertyName: + return `${enumName}[${memberNameIdentifier.expression.getText()}]`; + default: + break; + } + } + } + return null; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.d.ts new file mode 100644 index 0000000..c57a5df --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.d.ts @@ -0,0 +1,16 @@ +export type Options = [ + { + allowConciseArrowFunctionExpressionsStartingWithVoid?: boolean; + allowDirectConstAssertionInArrowFunctions?: boolean; + allowedNames?: string[]; + allowExpressions?: boolean; + allowFunctionsWithoutTypeParameters?: boolean; + allowHigherOrderFunctions?: boolean; + allowIIFEs?: boolean; + allowTypedFunctionExpressions?: boolean; + } +]; +export type MessageIds = 'missingReturnType'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingReturnType", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=explicit-function-return-type.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.d.ts.map new file mode 100644 index 0000000..262691c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"explicit-function-return-type.d.ts","sourceRoot":"","sources":["../../src/rules/explicit-function-return-type.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,oDAAoD,CAAC,EAAE,OAAO,CAAC;QAC/D,yCAAyC,CAAC,EAAE,OAAO,CAAC;QACpD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,mCAAmC,CAAC,EAAE,OAAO,CAAC;QAC9C,yBAAyB,CAAC,EAAE,OAAO,CAAC;QACpC,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,6BAA6B,CAAC,EAAE,OAAO,CAAC;KACzC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC;;AAO7C,wBAiOG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js new file mode 100644 index 0000000..c7d75a9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js @@ -0,0 +1,179 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const explicitReturnTypeUtils_1 = require("../util/explicitReturnTypeUtils"); +exports.default = (0, util_1.createRule)({ + name: 'explicit-function-return-type', + meta: { + type: 'problem', + docs: { + description: 'Require explicit return types on functions and class methods', + }, + messages: { + missingReturnType: 'Missing return type on function.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowConciseArrowFunctionExpressionsStartingWithVoid: { + type: 'boolean', + description: 'Whether to allow arrow functions that start with the `void` keyword.', + }, + allowDirectConstAssertionInArrowFunctions: { + type: 'boolean', + description: 'Whether to ignore arrow functions immediately returning a `as const` value.', + }, + allowedNames: { + type: 'array', + description: 'An array of function/method names that will not have their arguments or return values checked.', + items: { + type: 'string', + }, + }, + allowExpressions: { + type: 'boolean', + description: 'Whether to ignore function expressions (functions which are not part of a declaration).', + }, + allowFunctionsWithoutTypeParameters: { + type: 'boolean', + description: "Whether to ignore functions that don't have generic type parameters.", + }, + allowHigherOrderFunctions: { + type: 'boolean', + description: 'Whether to ignore functions immediately returning another function expression.', + }, + allowIIFEs: { + type: 'boolean', + description: 'Whether to ignore immediately invoked function expressions (IIFEs).', + }, + allowTypedFunctionExpressions: { + type: 'boolean', + description: 'Whether to ignore type annotations on the variable of function expressions.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowConciseArrowFunctionExpressionsStartingWithVoid: false, + allowDirectConstAssertionInArrowFunctions: true, + allowedNames: [], + allowExpressions: false, + allowFunctionsWithoutTypeParameters: false, + allowHigherOrderFunctions: true, + allowIIFEs: false, + allowTypedFunctionExpressions: true, + }, + ], + create(context, [options]) { + const functionInfoStack = []; + function enterFunction(node) { + functionInfoStack.push({ + node, + returns: [], + }); + } + function popFunctionInfo(exitNodeType) { + return (0, util_1.nullThrows)(functionInfoStack.pop(), `Stack should exist on ${exitNodeType} exit`); + } + function isAllowedFunction(node) { + if (options.allowFunctionsWithoutTypeParameters && !node.typeParameters) { + return true; + } + if (options.allowIIFEs && isIIFE(node)) { + return true; + } + if (!options.allowedNames?.length) { + return false; + } + if (node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression || + node.type === utils_1.AST_NODE_TYPES.FunctionExpression) { + const parent = node.parent; + let funcName; + if (node.id?.name) { + funcName = node.id.name; + } + else { + switch (parent.type) { + case utils_1.AST_NODE_TYPES.VariableDeclarator: { + if (parent.id.type === utils_1.AST_NODE_TYPES.Identifier) { + funcName = parent.id.name; + } + break; + } + case utils_1.AST_NODE_TYPES.MethodDefinition: + case utils_1.AST_NODE_TYPES.PropertyDefinition: + case utils_1.AST_NODE_TYPES.Property: { + if (parent.key.type === utils_1.AST_NODE_TYPES.Identifier && + !parent.computed) { + funcName = parent.key.name; + } + break; + } + } + } + if (!!funcName && options.allowedNames.includes(funcName)) { + return true; + } + } + if (node.type === utils_1.AST_NODE_TYPES.FunctionDeclaration && + node.id && + options.allowedNames.includes(node.id.name)) { + return true; + } + return false; + } + function isIIFE(node) { + return node.parent.type === utils_1.AST_NODE_TYPES.CallExpression; + } + function exitFunctionExpression(node) { + const info = popFunctionInfo('function expression'); + if (options.allowConciseArrowFunctionExpressionsStartingWithVoid && + node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression && + node.expression && + node.body.type === utils_1.AST_NODE_TYPES.UnaryExpression && + node.body.operator === 'void') { + return; + } + if (isAllowedFunction(node)) { + return; + } + if (options.allowTypedFunctionExpressions && + ((0, explicitReturnTypeUtils_1.isValidFunctionExpressionReturnType)(node, options) || + (0, explicitReturnTypeUtils_1.ancestorHasReturnType)(node))) { + return; + } + (0, explicitReturnTypeUtils_1.checkFunctionReturnType)(info, options, context.sourceCode, loc => context.report({ + loc, + node, + messageId: 'missingReturnType', + })); + } + return { + 'ArrowFunctionExpression, FunctionExpression, FunctionDeclaration': enterFunction, + 'ArrowFunctionExpression:exit': exitFunctionExpression, + 'FunctionDeclaration:exit'(node) { + const info = popFunctionInfo('function declaration'); + if (isAllowedFunction(node)) { + return; + } + if (options.allowTypedFunctionExpressions && node.returnType) { + return; + } + (0, explicitReturnTypeUtils_1.checkFunctionReturnType)(info, options, context.sourceCode, loc => context.report({ + loc, + node, + messageId: 'missingReturnType', + })); + }, + 'FunctionExpression:exit': exitFunctionExpression, + ReturnStatement(node) { + functionInfoStack.at(-1)?.returns.push(node); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.d.ts new file mode 100644 index 0000000..0ed1a68 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.d.ts @@ -0,0 +1,18 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +type AccessibilityLevel = 'explicit' | 'no-public' | 'off'; +export interface Config { + accessibility?: AccessibilityLevel; + ignoredMethodNames?: string[]; + overrides?: { + accessors?: AccessibilityLevel; + constructors?: AccessibilityLevel; + methods?: AccessibilityLevel; + parameterProperties?: AccessibilityLevel; + properties?: AccessibilityLevel; + }; +} +export type Options = [Config]; +export type MessageIds = 'addExplicitAccessibility' | 'missingAccessibility' | 'unwantedPublicAccessibility'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=explicit-member-accessibility.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.d.ts.map new file mode 100644 index 0000000..da34fc5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"explicit-member-accessibility.d.ts","sourceRoot":"","sources":["../../src/rules/explicit-member-accessibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAgBnE,KAAK,kBAAkB,GACnB,UAAU,GACV,WAAW,GACX,KAAK,CAAC;AAEV,MAAM,WAAW,MAAM;IACrB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE;QACV,SAAS,CAAC,EAAE,kBAAkB,CAAC;QAC/B,YAAY,CAAC,EAAE,kBAAkB,CAAC;QAClC,OAAO,CAAC,EAAE,kBAAkB,CAAC;QAC7B,mBAAmB,CAAC,EAAE,kBAAkB,CAAC;QACzC,UAAU,CAAC,EAAE,kBAAkB,CAAC;KACjC,CAAC;CACH;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC;AAE/B,MAAM,MAAM,UAAU,GAClB,0BAA0B,GAC1B,sBAAsB,GACtB,6BAA6B,CAAC;;AAElC,wBA0WG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js new file mode 100644 index 0000000..1de442b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js @@ -0,0 +1,292 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const getMemberHeadLoc_1 = require("../util/getMemberHeadLoc"); +const rangeToLoc_1 = require("../util/rangeToLoc"); +exports.default = (0, util_1.createRule)({ + name: 'explicit-member-accessibility', + meta: { + type: 'problem', + docs: { + description: 'Require explicit accessibility modifiers on class properties and methods', + // too opinionated to be recommended + }, + fixable: 'code', + hasSuggestions: true, + messages: { + addExplicitAccessibility: "Add '{{ type }}' accessibility modifier", + missingAccessibility: 'Missing accessibility modifier on {{type}} {{name}}.', + unwantedPublicAccessibility: 'Public accessibility modifier on {{type}} {{name}}.', + }, + schema: [ + { + type: 'object', + $defs: { + accessibilityLevel: { + oneOf: [ + { + type: 'string', + description: 'Always require an accessor.', + enum: ['explicit'], + }, + { + type: 'string', + description: 'Require an accessor except when public.', + enum: ['no-public'], + }, + { + type: 'string', + description: 'Never check whether there is an accessor.', + enum: ['off'], + }, + ], + }, + }, + additionalProperties: false, + properties: { + accessibility: { + $ref: '#/items/0/$defs/accessibilityLevel', + description: 'Which accessibility modifier is required to exist or not exist.', + }, + ignoredMethodNames: { + type: 'array', + description: 'Specific method names that may be ignored.', + items: { + type: 'string', + }, + }, + overrides: { + type: 'object', + additionalProperties: false, + description: 'Changes to required accessibility modifiers for specific kinds of class members.', + properties: { + accessors: { $ref: '#/items/0/$defs/accessibilityLevel' }, + constructors: { $ref: '#/items/0/$defs/accessibilityLevel' }, + methods: { $ref: '#/items/0/$defs/accessibilityLevel' }, + parameterProperties: { + $ref: '#/items/0/$defs/accessibilityLevel', + }, + properties: { $ref: '#/items/0/$defs/accessibilityLevel' }, + }, + }, + }, + }, + ], + }, + defaultOptions: [{ accessibility: 'explicit' }], + create(context, [option]) { + const baseCheck = option.accessibility ?? 'explicit'; + const overrides = option.overrides ?? {}; + const ctorCheck = overrides.constructors ?? baseCheck; + const accessorCheck = overrides.accessors ?? baseCheck; + const methodCheck = overrides.methods ?? baseCheck; + const propCheck = overrides.properties ?? baseCheck; + const paramPropCheck = overrides.parameterProperties ?? baseCheck; + const ignoredMethodNames = new Set(option.ignoredMethodNames ?? []); + /** + * Checks if a method declaration has an accessibility modifier. + * @param methodDefinition The node representing a MethodDefinition. + */ + function checkMethodAccessibilityModifier(methodDefinition) { + if (methodDefinition.key.type === utils_1.AST_NODE_TYPES.PrivateIdentifier) { + return; + } + let nodeType = 'method definition'; + let check = baseCheck; + switch (methodDefinition.kind) { + case 'method': + check = methodCheck; + break; + case 'constructor': + check = ctorCheck; + break; + case 'get': + case 'set': + check = accessorCheck; + nodeType = `${methodDefinition.kind} property accessor`; + break; + } + const { name: methodName } = (0, util_1.getNameFromMember)(methodDefinition, context.sourceCode); + if (check === 'off' || ignoredMethodNames.has(methodName)) { + return; + } + if (check === 'no-public' && + methodDefinition.accessibility === 'public') { + const publicKeyword = findPublicKeyword(methodDefinition); + context.report({ + loc: (0, rangeToLoc_1.rangeToLoc)(context.sourceCode, publicKeyword.range), + messageId: 'unwantedPublicAccessibility', + data: { + name: methodName, + type: nodeType, + }, + fix: fixer => fixer.removeRange(publicKeyword.rangeToRemove), + }); + } + else if (check === 'explicit' && !methodDefinition.accessibility) { + context.report({ + loc: (0, getMemberHeadLoc_1.getMemberHeadLoc)(context.sourceCode, methodDefinition), + messageId: 'missingAccessibility', + data: { + name: methodName, + type: nodeType, + }, + suggest: getMissingAccessibilitySuggestions(methodDefinition), + }); + } + } + /** + * Returns an object containing a range that corresponds to the "public" + * keyword for a node, and the range that would need to be removed to + * remove the "public" keyword (including associated whitespace). + */ + function findPublicKeyword(node) { + const tokens = context.sourceCode.getTokens(node); + let rangeToRemove; + let keywordRange; + for (let i = 0; i < tokens.length; i++) { + const token = tokens[i]; + if (token.type === utils_1.AST_TOKEN_TYPES.Keyword && + token.value === 'public') { + keywordRange = structuredClone(token.range); + const commensAfterPublicKeyword = context.sourceCode.getCommentsAfter(token); + if (commensAfterPublicKeyword.length) { + // public /* Hi there! */ static foo() + // ^^^^^^^ + rangeToRemove = [ + token.range[0], + commensAfterPublicKeyword[0].range[0], + ]; + break; + } + else { + // public static foo() + // ^^^^^^^ + rangeToRemove = [token.range[0], tokens[i + 1].range[0]]; + break; + } + } + } + return { range: keywordRange, rangeToRemove }; + } + /** + * Creates a fixer that adds an accessibility modifier keyword + */ + function getMissingAccessibilitySuggestions(node) { + function fix(accessibility, fixer) { + if (node.decorators.length) { + const lastDecorator = node.decorators[node.decorators.length - 1]; + const nextToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(lastDecorator), util_1.NullThrowsReasons.MissingToken('token', 'last decorator')); + return fixer.insertTextBefore(nextToken, `${accessibility} `); + } + return fixer.insertTextBefore(node, `${accessibility} `); + } + return [ + { + messageId: 'addExplicitAccessibility', + data: { type: 'public' }, + fix: fixer => fix('public', fixer), + }, + { + messageId: 'addExplicitAccessibility', + data: { type: 'private' }, + fix: fixer => fix('private', fixer), + }, + { + messageId: 'addExplicitAccessibility', + data: { type: 'protected' }, + fix: fixer => fix('protected', fixer), + }, + ]; + } + /** + * Checks if property has an accessibility modifier. + * @param propertyDefinition The node representing a PropertyDefinition. + */ + function checkPropertyAccessibilityModifier(propertyDefinition) { + if (propertyDefinition.key.type === utils_1.AST_NODE_TYPES.PrivateIdentifier) { + return; + } + const nodeType = 'class property'; + const { name: propertyName } = (0, util_1.getNameFromMember)(propertyDefinition, context.sourceCode); + if (propCheck === 'no-public' && + propertyDefinition.accessibility === 'public') { + const publicKeywordRange = findPublicKeyword(propertyDefinition); + context.report({ + loc: (0, rangeToLoc_1.rangeToLoc)(context.sourceCode, publicKeywordRange.range), + messageId: 'unwantedPublicAccessibility', + data: { + name: propertyName, + type: nodeType, + }, + fix: fixer => fixer.removeRange(publicKeywordRange.rangeToRemove), + }); + } + else if (propCheck === 'explicit' && + !propertyDefinition.accessibility) { + context.report({ + loc: (0, getMemberHeadLoc_1.getMemberHeadLoc)(context.sourceCode, propertyDefinition), + messageId: 'missingAccessibility', + data: { + name: propertyName, + type: nodeType, + }, + suggest: getMissingAccessibilitySuggestions(propertyDefinition), + }); + } + } + /** + * Checks that the parameter property has the desired accessibility modifiers set. + * @param node The node representing a Parameter Property + */ + function checkParameterPropertyAccessibilityModifier(node) { + const nodeType = 'parameter property'; + // HAS to be an identifier or assignment or TSC will throw + if (node.parameter.type !== utils_1.AST_NODE_TYPES.Identifier && + node.parameter.type !== utils_1.AST_NODE_TYPES.AssignmentPattern) { + return; + } + const nodeName = node.parameter.type === utils_1.AST_NODE_TYPES.Identifier + ? node.parameter.name + : // has to be an Identifier or TSC will throw an error + node.parameter.left.name; + switch (paramPropCheck) { + case 'explicit': { + if (!node.accessibility) { + context.report({ + loc: (0, getMemberHeadLoc_1.getParameterPropertyHeadLoc)(context.sourceCode, node, nodeName), + messageId: 'missingAccessibility', + data: { + name: nodeName, + type: nodeType, + }, + suggest: getMissingAccessibilitySuggestions(node), + }); + } + break; + } + case 'no-public': { + if (node.accessibility === 'public' && node.readonly) { + const publicKeyword = findPublicKeyword(node); + context.report({ + loc: (0, rangeToLoc_1.rangeToLoc)(context.sourceCode, publicKeyword.range), + messageId: 'unwantedPublicAccessibility', + data: { + name: nodeName, + type: nodeType, + }, + fix: fixer => fixer.removeRange(publicKeyword.rangeToRemove), + }); + } + break; + } + } + } + return { + 'MethodDefinition, TSAbstractMethodDefinition': checkMethodAccessibilityModifier, + 'PropertyDefinition, TSAbstractPropertyDefinition, AccessorProperty, TSAbstractAccessorProperty': checkPropertyAccessibilityModifier, + TSParameterProperty: checkParameterPropertyAccessibilityModifier, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.d.ts new file mode 100644 index 0000000..4092818 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.d.ts @@ -0,0 +1,14 @@ +export type Options = [ + { + allowArgumentsExplicitlyTypedAsAny?: boolean; + allowDirectConstAssertionInArrowFunctions?: boolean; + allowedNames?: string[]; + allowHigherOrderFunctions?: boolean; + allowTypedFunctionExpressions?: boolean; + allowOverloadFunctions?: boolean; + } +]; +export type MessageIds = 'anyTypedArg' | 'anyTypedArgUnnamed' | 'missingArgType' | 'missingArgTypeUnnamed' | 'missingReturnType'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=explicit-module-boundary-types.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.d.ts.map new file mode 100644 index 0000000..beb9078 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"explicit-module-boundary-types.d.ts","sourceRoot":"","sources":["../../src/rules/explicit-module-boundary-types.ts"],"names":[],"mappings":"AAyBA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,kCAAkC,CAAC,EAAE,OAAO,CAAC;QAC7C,yCAAyC,CAAC,EAAE,OAAO,CAAC;QACpD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,yBAAyB,CAAC,EAAE,OAAO,CAAC;QACpC,6BAA6B,CAAC,EAAE,OAAO,CAAC;QACxC,sBAAsB,CAAC,EAAE,OAAO,CAAC;KAClC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAClB,aAAa,GACb,oBAAoB,GACpB,gBAAgB,GAChB,uBAAuB,GACvB,mBAAmB,CAAC;;AAExB,wBAweG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js new file mode 100644 index 0000000..a3cc4da --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js @@ -0,0 +1,386 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const scope_manager_1 = require("@typescript-eslint/scope-manager"); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const explicitReturnTypeUtils_1 = require("../util/explicitReturnTypeUtils"); +exports.default = (0, util_1.createRule)({ + name: 'explicit-module-boundary-types', + meta: { + type: 'problem', + docs: { + description: "Require explicit return and argument types on exported functions' and classes' public class methods", + }, + messages: { + anyTypedArg: "Argument '{{name}}' should be typed with a non-any type.", + anyTypedArgUnnamed: '{{type}} argument should be typed with a non-any type.', + missingArgType: "Argument '{{name}}' should be typed.", + missingArgTypeUnnamed: '{{type}} argument should be typed.', + missingReturnType: 'Missing return type on function.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowArgumentsExplicitlyTypedAsAny: { + type: 'boolean', + description: 'Whether to ignore arguments that are explicitly typed as `any`.', + }, + allowDirectConstAssertionInArrowFunctions: { + type: 'boolean', + description: [ + 'Whether to ignore return type annotations on body-less arrow functions that return an `as const` type assertion.', + 'You must still type the parameters of the function.', + ].join('\n'), + }, + allowedNames: { + type: 'array', + description: 'An array of function/method names that will not have their arguments or return values checked.', + items: { + type: 'string', + }, + }, + allowHigherOrderFunctions: { + type: 'boolean', + description: [ + 'Whether to ignore return type annotations on functions immediately returning another function expression.', + 'You must still type the parameters of the function.', + ].join('\n'), + }, + allowOverloadFunctions: { + type: 'boolean', + description: 'Whether to ignore return type annotations on functions with overload signatures.', + }, + allowTypedFunctionExpressions: { + type: 'boolean', + description: 'Whether to ignore type annotations on the variable of a function expression.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowArgumentsExplicitlyTypedAsAny: false, + allowDirectConstAssertionInArrowFunctions: true, + allowedNames: [], + allowHigherOrderFunctions: true, + allowOverloadFunctions: false, + allowTypedFunctionExpressions: true, + }, + ], + create(context, [options]) { + // tracks all of the functions we've already checked + const checkedFunctions = new Set(); + const functionStack = []; + const functionReturnsMap = new Map(); + // all nodes visited, avoids infinite recursion for cyclic references + // (such as class member referring to itself) + const alreadyVisited = new Set(); + function getReturnsInFunction(node) { + return functionReturnsMap.get(node) ?? []; + } + function enterFunction(node) { + functionStack.push(node); + functionReturnsMap.set(node, []); + } + function exitFunction() { + functionStack.pop(); + } + /* + # How the rule works: + + As the rule traverses the AST, it immediately checks every single function that it finds is exported. + "exported" means that it is either directly exported, or that its name is exported. + + It also collects a list of every single function it finds on the way, but does not check them. + After it's finished traversing the AST, it then iterates through the list of found functions, and checks to see if + any of them are part of a higher-order function + */ + return { + 'ArrowFunctionExpression, FunctionDeclaration, FunctionExpression': enterFunction, + 'ArrowFunctionExpression:exit': exitFunction, + 'ExportDefaultDeclaration:exit'(node) { + checkNode(node.declaration); + }, + 'ExportNamedDeclaration:not([source]):exit'(node) { + if (node.declaration) { + checkNode(node.declaration); + } + else { + for (const specifier of node.specifiers) { + followReference(specifier.local); + } + } + }, + 'FunctionDeclaration:exit': exitFunction, + 'FunctionExpression:exit': exitFunction, + 'Program:exit'() { + for (const [node, returns] of functionReturnsMap) { + if (isExportedHigherOrderFunction({ node, returns })) { + checkNode(node); + } + } + }, + ReturnStatement(node) { + const current = functionStack[functionStack.length - 1]; + functionReturnsMap.get(current)?.push(node); + }, + 'TSExportAssignment:exit'(node) { + checkNode(node.expression); + }, + }; + function checkParameters(node) { + function checkParameter(param) { + function report(namedMessageId, unnamedMessageId) { + if (param.type === utils_1.AST_NODE_TYPES.Identifier) { + context.report({ + node: param, + messageId: namedMessageId, + data: { name: param.name }, + }); + } + else if (param.type === utils_1.AST_NODE_TYPES.ArrayPattern) { + context.report({ + node: param, + messageId: unnamedMessageId, + data: { type: 'Array pattern' }, + }); + } + else if (param.type === utils_1.AST_NODE_TYPES.ObjectPattern) { + context.report({ + node: param, + messageId: unnamedMessageId, + data: { type: 'Object pattern' }, + }); + } + else if (param.type === utils_1.AST_NODE_TYPES.RestElement) { + if (param.argument.type === utils_1.AST_NODE_TYPES.Identifier) { + context.report({ + node: param, + messageId: namedMessageId, + data: { name: param.argument.name }, + }); + } + else { + context.report({ + node: param, + messageId: unnamedMessageId, + data: { type: 'Rest' }, + }); + } + } + } + switch (param.type) { + case utils_1.AST_NODE_TYPES.ArrayPattern: + case utils_1.AST_NODE_TYPES.Identifier: + case utils_1.AST_NODE_TYPES.ObjectPattern: + case utils_1.AST_NODE_TYPES.RestElement: + if (!param.typeAnnotation) { + report('missingArgType', 'missingArgTypeUnnamed'); + } + else if (options.allowArgumentsExplicitlyTypedAsAny !== true && + param.typeAnnotation.typeAnnotation.type === + utils_1.AST_NODE_TYPES.TSAnyKeyword) { + report('anyTypedArg', 'anyTypedArgUnnamed'); + } + return; + case utils_1.AST_NODE_TYPES.TSParameterProperty: + return checkParameter(param.parameter); + case utils_1.AST_NODE_TYPES.AssignmentPattern: // ignored as it has a type via its assignment + return; + } + } + for (const arg of node.params) { + checkParameter(arg); + } + } + /** + * Checks if a function name is allowed and should not be checked. + */ + function isAllowedName(node) { + if (!node || !options.allowedNames || options.allowedNames.length === 0) { + return false; + } + if (node.type === utils_1.AST_NODE_TYPES.VariableDeclarator || + node.type === utils_1.AST_NODE_TYPES.FunctionDeclaration) { + return (node.id?.type === utils_1.AST_NODE_TYPES.Identifier && + options.allowedNames.includes(node.id.name)); + } + if (node.type === utils_1.AST_NODE_TYPES.MethodDefinition || + node.type === utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition || + (node.type === utils_1.AST_NODE_TYPES.Property && node.method) || + node.type === utils_1.AST_NODE_TYPES.PropertyDefinition || + node.type === utils_1.AST_NODE_TYPES.AccessorProperty) { + return (0, util_1.isStaticMemberAccessOfValue)(node, context, ...options.allowedNames); + } + return false; + } + function isExportedHigherOrderFunction({ node, }) { + let current = node.parent; + while (current) { + if (current.type === utils_1.AST_NODE_TYPES.ReturnStatement) { + // the parent of a return will always be a block statement, so we can skip over it + current = current.parent.parent; + continue; + } + if (!(0, util_1.isFunction)(current)) { + return false; + } + const returns = getReturnsInFunction(current); + if (!(0, explicitReturnTypeUtils_1.doesImmediatelyReturnFunctionExpression)({ node: current, returns })) { + return false; + } + if (checkedFunctions.has(current)) { + return true; + } + current = current.parent; + } + return false; + } + function followReference(node) { + const scope = context.sourceCode.getScope(node); + const variable = scope.set.get(node.name); + /* istanbul ignore if */ if (!variable) { + return; + } + // check all of the definitions + for (const definition of variable.defs) { + // cases we don't care about in this rule + if ([ + scope_manager_1.DefinitionType.CatchClause, + scope_manager_1.DefinitionType.ImplicitGlobalVariable, + scope_manager_1.DefinitionType.ImportBinding, + scope_manager_1.DefinitionType.Parameter, + ].includes(definition.type)) { + continue; + } + checkNode(definition.node); + } + // follow references to find writes to the variable + for (const reference of variable.references) { + if ( + // we don't want to check the initialization ref, as this is handled by the declaration check + !reference.init && + reference.writeExpr) { + checkNode(reference.writeExpr); + } + } + } + function checkNode(node) { + if (node == null || alreadyVisited.has(node)) { + return; + } + alreadyVisited.add(node); + switch (node.type) { + case utils_1.AST_NODE_TYPES.ArrowFunctionExpression: + case utils_1.AST_NODE_TYPES.FunctionExpression: { + const returns = getReturnsInFunction(node); + return checkFunctionExpression({ node, returns }); + } + case utils_1.AST_NODE_TYPES.ArrayExpression: + for (const element of node.elements) { + checkNode(element); + } + return; + case utils_1.AST_NODE_TYPES.PropertyDefinition: + case utils_1.AST_NODE_TYPES.AccessorProperty: + case utils_1.AST_NODE_TYPES.MethodDefinition: + case utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition: + if (node.accessibility === 'private' || + node.key.type === utils_1.AST_NODE_TYPES.PrivateIdentifier) { + return; + } + return checkNode(node.value); + case utils_1.AST_NODE_TYPES.ClassDeclaration: + case utils_1.AST_NODE_TYPES.ClassExpression: + for (const element of node.body.body) { + checkNode(element); + } + return; + case utils_1.AST_NODE_TYPES.FunctionDeclaration: { + const returns = getReturnsInFunction(node); + return checkFunction({ node, returns }); + } + case utils_1.AST_NODE_TYPES.Identifier: + return followReference(node); + case utils_1.AST_NODE_TYPES.ObjectExpression: + for (const property of node.properties) { + checkNode(property); + } + return; + case utils_1.AST_NODE_TYPES.Property: + return checkNode(node.value); + case utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression: + return checkEmptyBodyFunctionExpression(node); + case utils_1.AST_NODE_TYPES.VariableDeclaration: + for (const declaration of node.declarations) { + checkNode(declaration); + } + return; + case utils_1.AST_NODE_TYPES.VariableDeclarator: + return checkNode(node.init); + } + } + function checkEmptyBodyFunctionExpression(node) { + const isConstructor = node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition && + node.parent.kind === 'constructor'; + const isSetAccessor = (node.parent.type === utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition || + node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition) && + node.parent.kind === 'set'; + if (!isConstructor && !isSetAccessor && !node.returnType) { + context.report({ + node, + messageId: 'missingReturnType', + }); + } + checkParameters(node); + } + function checkFunctionExpression({ node, returns, }) { + if (checkedFunctions.has(node)) { + return; + } + checkedFunctions.add(node); + if (isAllowedName(node.parent) || + (0, explicitReturnTypeUtils_1.isTypedFunctionExpression)(node, options) || + (0, explicitReturnTypeUtils_1.ancestorHasReturnType)(node)) { + return; + } + if (options.allowOverloadFunctions && + node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition && + (0, util_1.hasOverloadSignatures)(node.parent, context)) { + return; + } + (0, explicitReturnTypeUtils_1.checkFunctionExpressionReturnType)({ node, returns }, options, context.sourceCode, loc => { + context.report({ + loc, + node, + messageId: 'missingReturnType', + }); + }); + checkParameters(node); + } + function checkFunction({ node, returns, }) { + if (checkedFunctions.has(node)) { + return; + } + checkedFunctions.add(node); + if (isAllowedName(node) || (0, explicitReturnTypeUtils_1.ancestorHasReturnType)(node)) { + return; + } + if (options.allowOverloadFunctions && + (0, util_1.hasOverloadSignatures)(node, context)) { + return; + } + (0, explicitReturnTypeUtils_1.checkFunctionReturnType)({ node, returns }, options, context.sourceCode, loc => { + context.report({ + loc, + node, + messageId: 'missingReturnType', + }); + }); + checkParameters(node); + } + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.d.ts new file mode 100644 index 0000000..f878a54 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.d.ts @@ -0,0 +1,174 @@ +declare const rules: { + 'adjacent-overload-signatures': import("@typescript-eslint/utils/ts-eslint").RuleModule<"adjacentSignature", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'array-type': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'await-thenable': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'ban-ts-comment': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'ban-tslint-comment': import("@typescript-eslint/utils/ts-eslint").RuleModule<"commentDetected", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'class-literal-property-style': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'class-methods-use-this': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingThis", import("./class-methods-use-this").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'consistent-generic-constructors': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'consistent-indexed-object-style': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'consistent-return': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingReturn" | "missingReturnValue" | "unexpectedReturnValue", [({ + treatUndefinedAsUnspecified?: boolean; + } | undefined)?], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'consistent-type-assertions': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'consistent-type-definitions': import("@typescript-eslint/utils/ts-eslint").RuleModule<"interfaceOverType" | "typeOverInterface", [string], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'consistent-type-exports': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'consistent-type-imports': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'default-param-last': import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldBeLast", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'dot-notation': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useBrackets" | "useDot", [{ + allowIndexSignaturePropertyAccess?: boolean; + allowKeywords?: boolean; + allowPattern?: string; + allowPrivateClassPropertyAccess?: boolean; + allowProtectedClassPropertyAccess?: boolean; + }], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'explicit-function-return-type': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingReturnType", import("./explicit-function-return-type").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'explicit-member-accessibility': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'explicit-module-boundary-types': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'init-declarations': import("@typescript-eslint/utils/ts-eslint").RuleModule<"initialized" | "notInitialized", ["always" | "never", ({ + ignoreForLoopInit?: boolean; + } | undefined)?], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'max-params': import("@typescript-eslint/utils/ts-eslint").RuleModule<"exceed", ({ + countVoidThis?: boolean; + max: number; + } | { + countVoidThis?: boolean; + maximum: number; + })[], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'member-ordering': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'method-signature-style': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'naming-convention': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-array-constructor': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useLiteral", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-array-delete': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-base-to-string': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-confusing-non-null-assertion': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-confusing-void-expression': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-deprecated': import("@typescript-eslint/utils/ts-eslint").RuleModule<"deprecated" | "deprecatedWithReason", [{ + allow?: import("@typescript-eslint/type-utils").TypeOrValueSpecifier[]; + }], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-dupe-class-members': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpected", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-duplicate-enum-values': import("@typescript-eslint/utils/ts-eslint").RuleModule<"duplicateValue", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-duplicate-type-constituents': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-dynamic-delete': import("@typescript-eslint/utils/ts-eslint").RuleModule<"dynamicDelete", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-empty-function': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpected" | "suggestComment", [{ + allow?: string[]; + }], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-empty-interface': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-empty-object-type': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-explicit-any': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-extra-non-null-assertion': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noExtraNonNullAssertion", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-extraneous-class': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-floating-promises': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-for-in-array': import("@typescript-eslint/utils/ts-eslint").RuleModule<"forInViolation", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-implied-eval': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noFunctionConstructor" | "noImpliedEvalError", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-import-type-side-effects': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useTopLevelQualifier", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-inferrable-types': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noInferrableType", import("./no-inferrable-types").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-invalid-this': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpectedThis", [({ + capIsConstructor?: boolean; + } | undefined)?], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-invalid-void-type': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-loop-func': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeRefs", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-loss-of-precision': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noLossOfPrecision", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-magic-numbers': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noMagic", [{ + detectObjects?: boolean; + enforceConst?: boolean; + ignore?: (number | string)[]; + ignoreArrayIndexes?: boolean; + ignoreEnums?: boolean; + ignoreNumericLiteralTypes?: boolean; + ignoreReadonlyClassProperties?: boolean; + ignoreTypeIndexes?: boolean; + }], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-meaningless-void-operator': import("@typescript-eslint/utils/ts-eslint").RuleModule<"meaninglessVoidOperator" | "removeVoid", import("./no-meaningless-void-operator").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-misused-new': import("@typescript-eslint/utils/ts-eslint").RuleModule<"errorMessageClass" | "errorMessageInterface", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-misused-promises': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-misused-spread': import("@typescript-eslint/utils/ts-eslint").RuleModule<"addAwait" | "noArraySpreadInObject" | "noClassDeclarationSpreadInObject" | "noClassInstanceSpreadInObject" | "noFunctionSpreadInObject" | "noIterableSpreadInObject" | "noMapSpreadInObject" | "noPromiseSpreadInObject" | "noStringSpread" | "replaceMapSpreadInObject", [{ + allow?: import("@typescript-eslint/type-utils").TypeOrValueSpecifier[]; + }], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-mixed-enums': import("@typescript-eslint/utils/ts-eslint").RuleModule<"mixed", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-namespace': import("@typescript-eslint/utils/ts-eslint").RuleModule<"moduleSyntaxIsPreferred", import("./no-namespace").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-non-null-asserted-nullish-coalescing': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noNonNullAssertedNullishCoalescing" | "suggestRemovingNonNull", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-non-null-asserted-optional-chain': import("@typescript-eslint/utils/ts-eslint").RuleModule<"suggestRemovingNonNull" | "noNonNullOptionalChain", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-non-null-assertion': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-redeclare': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-redundant-type-constituents': import("@typescript-eslint/utils/ts-eslint").RuleModule<"overrides" | "errorTypeOverrides" | "literalOverridden" | "overridden" | "primitiveOverridden", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-require-imports': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noRequireImports", import("./no-require-imports").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-restricted-imports': import("@typescript-eslint/utils/ts-eslint").RuleModule<"everything" | "everythingWithCustomMessage" | "importName" | "importNameWithCustomMessage" | "path" | "pathWithCustomMessage" | "patterns" | "patternWithCustomMessage", [import("eslint/lib/rules/no-restricted-imports").ObjectOfPathsAndPatterns] | import("eslint/lib/rules/no-restricted-imports").ArrayOfStringOrObject, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-restricted-types': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-shadow': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-this-alias': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-type-alias': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-unnecessary-boolean-literal-compare': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-unnecessary-condition': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-unnecessary-parameter-property-assignment': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unnecessaryAssign", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unnecessary-qualifier': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unnecessaryQualifier", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unnecessary-template-expression': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noUnnecessaryTemplateExpression", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unnecessary-type-arguments': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unnecessaryTypeParameter", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unnecessary-type-assertion': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-unnecessary-type-constraint': import("@typescript-eslint/utils/ts-eslint").RuleModule<"removeUnnecessaryConstraint" | "unnecessaryConstraint", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unnecessary-type-conversion': import("@typescript-eslint/utils/ts-eslint").RuleModule<"suggestRemove" | "suggestSatisfies" | "unnecessaryTypeConversion", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unnecessary-type-parameters': import("@typescript-eslint/utils/ts-eslint").RuleModule<"replaceUsagesWithConstraint" | "sole", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-argument': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-unsafe-assignment': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeArraySpread" | "anyAssignment" | "anyAssignmentThis" | "unsafeArrayPattern" | "unsafeArrayPatternFromTuple" | "unsafeAssignment" | "unsafeObjectPattern", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-call': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-unsafe-declaration-merging': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeMerging", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-enum-comparison': import("@typescript-eslint/utils/ts-eslint").RuleModule<"mismatchedCase" | "mismatchedCondition" | "replaceValueWithEnum", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-function-type': import("@typescript-eslint/utils/ts-eslint").RuleModule<"bannedFunctionType", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-member-access': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeComputedMemberAccess" | "unsafeMemberExpression" | "unsafeThisMemberExpression", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-return': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeReturn" | "unsafeReturnAssignment" | "unsafeReturnThis", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-type-assertion': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeOfAnyTypeAssertion" | "unsafeToAnyTypeAssertion" | "unsafeToUnconstrainedTypeAssertion" | "unsafeTypeAssertion" | "unsafeTypeAssertionAssignableToConstraint", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unsafe-unary-minus': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unaryMinus", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unused-expressions': import("@typescript-eslint/utils/ts-eslint").RuleModule<"unusedExpression", [{ + allowShortCircuit?: boolean; + allowTaggedTemplates?: boolean; + allowTernary?: boolean; + }], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-unused-vars': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'no-use-before-define': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noUseBeforeDefine", import("./no-use-before-define").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-useless-constructor': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noUselessConstructor" | "removeConstructor", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-useless-empty-export': import("@typescript-eslint/utils/ts-eslint").RuleModule<"uselessExport", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-var-requires': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noVarReqs", import("./no-var-requires").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'no-wrapper-object-types': import("@typescript-eslint/utils/ts-eslint").RuleModule<"bannedClassType", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'non-nullable-type-assertion-style': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferNonNullAssertion", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'only-throw-error': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'parameter-properties': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'prefer-as-const': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferConstAssertion" | "variableConstAssertion" | "variableSuggest", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-destructuring': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferDestructuring", import("./prefer-destructuring").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-enum-initializers': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'prefer-find': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferFind" | "preferFindSuggestion", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-for-of': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferForOf", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-function-type': import("@typescript-eslint/utils/ts-eslint").RuleModule<"functionTypeOverCallableType" | "unexpectedThisOnFunctionOnlyInterface", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-includes': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferIncludes" | "preferStringIncludes", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-literal-enum-member': import("@typescript-eslint/utils/ts-eslint").RuleModule<"notLiteral" | "notLiteralOrBitwiseExpression", [{ + allowBitwiseExpressions: boolean; + }], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-namespace-keyword': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useNamespace", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-nullish-coalescing': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'prefer-optional-chain': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'prefer-promise-reject-errors': import("@typescript-eslint/utils/ts-eslint").RuleModule<"rejectAnError", import("./prefer-promise-reject-errors").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-readonly': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferReadonly", import("./prefer-readonly").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-readonly-parameter-types': import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldBeReadonly", import("./prefer-readonly-parameter-types").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-reduce-type-parameter': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferTypeParameter", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-regexp-exec': import("@typescript-eslint/utils/ts-eslint").RuleModule<"regExpExecOverStringMatch", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-return-this-type': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useThisType", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'prefer-string-starts-ends-with': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'prefer-ts-expect-error': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferExpectErrorComment", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'promise-function-async': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'related-getter-setter-pairs': import("@typescript-eslint/utils/ts-eslint").RuleModule<"mismatch", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'require-array-sort-compare': import("@typescript-eslint/utils/ts-eslint").RuleModule<"requireCompare", import("./require-array-sort-compare").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'require-await': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingAwait" | "removeAsync", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'restrict-plus-operands': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'restrict-template-expressions': import("@typescript-eslint/utils/ts-eslint").RuleModule<"invalidType", import("./restrict-template-expressions").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'return-await': import("@typescript-eslint/utils/ts-eslint").RuleModule<"disallowedPromiseAwait" | "disallowedPromiseAwaitSuggestion" | "nonPromiseAwait" | "requiredPromiseAwait" | "requiredPromiseAwaitSuggestion", [string], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + 'sort-type-constituents': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'strict-boolean-expressions': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'switch-exhaustiveness-check': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'triple-slash-reference': import("@typescript-eslint/utils/ts-eslint").RuleModule<"tripleSlashReference", import("./triple-slash-reference").Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; + typedef: import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'unbound-method': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'unified-signatures': import("@typescript-eslint/utils/ts-eslint").RuleModule; + 'use-unknown-in-catch-callback-variable': import("@typescript-eslint/utils/ts-eslint").RuleModule; +}; +export = rules; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.d.ts.map new file mode 100644 index 0000000..8ff1c57 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAsIA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqImB,CAAC;AAE/B,SAAS,KAAK,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js new file mode 100644 index 0000000..c90d0c4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js @@ -0,0 +1,269 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const adjacent_overload_signatures_1 = __importDefault(require("./adjacent-overload-signatures")); +const array_type_1 = __importDefault(require("./array-type")); +const await_thenable_1 = __importDefault(require("./await-thenable")); +const ban_ts_comment_1 = __importDefault(require("./ban-ts-comment")); +const ban_tslint_comment_1 = __importDefault(require("./ban-tslint-comment")); +const class_literal_property_style_1 = __importDefault(require("./class-literal-property-style")); +const class_methods_use_this_1 = __importDefault(require("./class-methods-use-this")); +const consistent_generic_constructors_1 = __importDefault(require("./consistent-generic-constructors")); +const consistent_indexed_object_style_1 = __importDefault(require("./consistent-indexed-object-style")); +const consistent_return_1 = __importDefault(require("./consistent-return")); +const consistent_type_assertions_1 = __importDefault(require("./consistent-type-assertions")); +const consistent_type_definitions_1 = __importDefault(require("./consistent-type-definitions")); +const consistent_type_exports_1 = __importDefault(require("./consistent-type-exports")); +const consistent_type_imports_1 = __importDefault(require("./consistent-type-imports")); +const default_param_last_1 = __importDefault(require("./default-param-last")); +const dot_notation_1 = __importDefault(require("./dot-notation")); +const explicit_function_return_type_1 = __importDefault(require("./explicit-function-return-type")); +const explicit_member_accessibility_1 = __importDefault(require("./explicit-member-accessibility")); +const explicit_module_boundary_types_1 = __importDefault(require("./explicit-module-boundary-types")); +const init_declarations_1 = __importDefault(require("./init-declarations")); +const max_params_1 = __importDefault(require("./max-params")); +const member_ordering_1 = __importDefault(require("./member-ordering")); +const method_signature_style_1 = __importDefault(require("./method-signature-style")); +const naming_convention_1 = __importDefault(require("./naming-convention")); +const no_array_constructor_1 = __importDefault(require("./no-array-constructor")); +const no_array_delete_1 = __importDefault(require("./no-array-delete")); +const no_base_to_string_1 = __importDefault(require("./no-base-to-string")); +const no_confusing_non_null_assertion_1 = __importDefault(require("./no-confusing-non-null-assertion")); +const no_confusing_void_expression_1 = __importDefault(require("./no-confusing-void-expression")); +const no_deprecated_1 = __importDefault(require("./no-deprecated")); +const no_dupe_class_members_1 = __importDefault(require("./no-dupe-class-members")); +const no_duplicate_enum_values_1 = __importDefault(require("./no-duplicate-enum-values")); +const no_duplicate_type_constituents_1 = __importDefault(require("./no-duplicate-type-constituents")); +const no_dynamic_delete_1 = __importDefault(require("./no-dynamic-delete")); +const no_empty_function_1 = __importDefault(require("./no-empty-function")); +const no_empty_interface_1 = __importDefault(require("./no-empty-interface")); +const no_empty_object_type_1 = __importDefault(require("./no-empty-object-type")); +const no_explicit_any_1 = __importDefault(require("./no-explicit-any")); +const no_extra_non_null_assertion_1 = __importDefault(require("./no-extra-non-null-assertion")); +const no_extraneous_class_1 = __importDefault(require("./no-extraneous-class")); +const no_floating_promises_1 = __importDefault(require("./no-floating-promises")); +const no_for_in_array_1 = __importDefault(require("./no-for-in-array")); +const no_implied_eval_1 = __importDefault(require("./no-implied-eval")); +const no_import_type_side_effects_1 = __importDefault(require("./no-import-type-side-effects")); +const no_inferrable_types_1 = __importDefault(require("./no-inferrable-types")); +const no_invalid_this_1 = __importDefault(require("./no-invalid-this")); +const no_invalid_void_type_1 = __importDefault(require("./no-invalid-void-type")); +const no_loop_func_1 = __importDefault(require("./no-loop-func")); +const no_loss_of_precision_1 = __importDefault(require("./no-loss-of-precision")); +const no_magic_numbers_1 = __importDefault(require("./no-magic-numbers")); +const no_meaningless_void_operator_1 = __importDefault(require("./no-meaningless-void-operator")); +const no_misused_new_1 = __importDefault(require("./no-misused-new")); +const no_misused_promises_1 = __importDefault(require("./no-misused-promises")); +const no_misused_spread_1 = __importDefault(require("./no-misused-spread")); +const no_mixed_enums_1 = __importDefault(require("./no-mixed-enums")); +const no_namespace_1 = __importDefault(require("./no-namespace")); +const no_non_null_asserted_nullish_coalescing_1 = __importDefault(require("./no-non-null-asserted-nullish-coalescing")); +const no_non_null_asserted_optional_chain_1 = __importDefault(require("./no-non-null-asserted-optional-chain")); +const no_non_null_assertion_1 = __importDefault(require("./no-non-null-assertion")); +const no_redeclare_1 = __importDefault(require("./no-redeclare")); +const no_redundant_type_constituents_1 = __importDefault(require("./no-redundant-type-constituents")); +const no_require_imports_1 = __importDefault(require("./no-require-imports")); +const no_restricted_imports_1 = __importDefault(require("./no-restricted-imports")); +const no_restricted_types_1 = __importDefault(require("./no-restricted-types")); +const no_shadow_1 = __importDefault(require("./no-shadow")); +const no_this_alias_1 = __importDefault(require("./no-this-alias")); +const no_type_alias_1 = __importDefault(require("./no-type-alias")); +const no_unnecessary_boolean_literal_compare_1 = __importDefault(require("./no-unnecessary-boolean-literal-compare")); +const no_unnecessary_condition_1 = __importDefault(require("./no-unnecessary-condition")); +const no_unnecessary_parameter_property_assignment_1 = __importDefault(require("./no-unnecessary-parameter-property-assignment")); +const no_unnecessary_qualifier_1 = __importDefault(require("./no-unnecessary-qualifier")); +const no_unnecessary_template_expression_1 = __importDefault(require("./no-unnecessary-template-expression")); +const no_unnecessary_type_arguments_1 = __importDefault(require("./no-unnecessary-type-arguments")); +const no_unnecessary_type_assertion_1 = __importDefault(require("./no-unnecessary-type-assertion")); +const no_unnecessary_type_constraint_1 = __importDefault(require("./no-unnecessary-type-constraint")); +const no_unnecessary_type_conversion_1 = __importDefault(require("./no-unnecessary-type-conversion")); +const no_unnecessary_type_parameters_1 = __importDefault(require("./no-unnecessary-type-parameters")); +const no_unsafe_argument_1 = __importDefault(require("./no-unsafe-argument")); +const no_unsafe_assignment_1 = __importDefault(require("./no-unsafe-assignment")); +const no_unsafe_call_1 = __importDefault(require("./no-unsafe-call")); +const no_unsafe_declaration_merging_1 = __importDefault(require("./no-unsafe-declaration-merging")); +const no_unsafe_enum_comparison_1 = __importDefault(require("./no-unsafe-enum-comparison")); +const no_unsafe_function_type_1 = __importDefault(require("./no-unsafe-function-type")); +const no_unsafe_member_access_1 = __importDefault(require("./no-unsafe-member-access")); +const no_unsafe_return_1 = __importDefault(require("./no-unsafe-return")); +const no_unsafe_type_assertion_1 = __importDefault(require("./no-unsafe-type-assertion")); +const no_unsafe_unary_minus_1 = __importDefault(require("./no-unsafe-unary-minus")); +const no_unused_expressions_1 = __importDefault(require("./no-unused-expressions")); +const no_unused_vars_1 = __importDefault(require("./no-unused-vars")); +const no_use_before_define_1 = __importDefault(require("./no-use-before-define")); +const no_useless_constructor_1 = __importDefault(require("./no-useless-constructor")); +const no_useless_empty_export_1 = __importDefault(require("./no-useless-empty-export")); +const no_var_requires_1 = __importDefault(require("./no-var-requires")); +const no_wrapper_object_types_1 = __importDefault(require("./no-wrapper-object-types")); +const non_nullable_type_assertion_style_1 = __importDefault(require("./non-nullable-type-assertion-style")); +const only_throw_error_1 = __importDefault(require("./only-throw-error")); +const parameter_properties_1 = __importDefault(require("./parameter-properties")); +const prefer_as_const_1 = __importDefault(require("./prefer-as-const")); +const prefer_destructuring_1 = __importDefault(require("./prefer-destructuring")); +const prefer_enum_initializers_1 = __importDefault(require("./prefer-enum-initializers")); +const prefer_find_1 = __importDefault(require("./prefer-find")); +const prefer_for_of_1 = __importDefault(require("./prefer-for-of")); +const prefer_function_type_1 = __importDefault(require("./prefer-function-type")); +const prefer_includes_1 = __importDefault(require("./prefer-includes")); +const prefer_literal_enum_member_1 = __importDefault(require("./prefer-literal-enum-member")); +const prefer_namespace_keyword_1 = __importDefault(require("./prefer-namespace-keyword")); +const prefer_nullish_coalescing_1 = __importDefault(require("./prefer-nullish-coalescing")); +const prefer_optional_chain_1 = __importDefault(require("./prefer-optional-chain")); +const prefer_promise_reject_errors_1 = __importDefault(require("./prefer-promise-reject-errors")); +const prefer_readonly_1 = __importDefault(require("./prefer-readonly")); +const prefer_readonly_parameter_types_1 = __importDefault(require("./prefer-readonly-parameter-types")); +const prefer_reduce_type_parameter_1 = __importDefault(require("./prefer-reduce-type-parameter")); +const prefer_regexp_exec_1 = __importDefault(require("./prefer-regexp-exec")); +const prefer_return_this_type_1 = __importDefault(require("./prefer-return-this-type")); +const prefer_string_starts_ends_with_1 = __importDefault(require("./prefer-string-starts-ends-with")); +const prefer_ts_expect_error_1 = __importDefault(require("./prefer-ts-expect-error")); +const promise_function_async_1 = __importDefault(require("./promise-function-async")); +const related_getter_setter_pairs_1 = __importDefault(require("./related-getter-setter-pairs")); +const require_array_sort_compare_1 = __importDefault(require("./require-array-sort-compare")); +const require_await_1 = __importDefault(require("./require-await")); +const restrict_plus_operands_1 = __importDefault(require("./restrict-plus-operands")); +const restrict_template_expressions_1 = __importDefault(require("./restrict-template-expressions")); +const return_await_1 = __importDefault(require("./return-await")); +const sort_type_constituents_1 = __importDefault(require("./sort-type-constituents")); +const strict_boolean_expressions_1 = __importDefault(require("./strict-boolean-expressions")); +const switch_exhaustiveness_check_1 = __importDefault(require("./switch-exhaustiveness-check")); +const triple_slash_reference_1 = __importDefault(require("./triple-slash-reference")); +const typedef_1 = __importDefault(require("./typedef")); +const unbound_method_1 = __importDefault(require("./unbound-method")); +const unified_signatures_1 = __importDefault(require("./unified-signatures")); +const use_unknown_in_catch_callback_variable_1 = __importDefault(require("./use-unknown-in-catch-callback-variable")); +const rules = { + 'adjacent-overload-signatures': adjacent_overload_signatures_1.default, + 'array-type': array_type_1.default, + 'await-thenable': await_thenable_1.default, + 'ban-ts-comment': ban_ts_comment_1.default, + 'ban-tslint-comment': ban_tslint_comment_1.default, + 'class-literal-property-style': class_literal_property_style_1.default, + 'class-methods-use-this': class_methods_use_this_1.default, + 'consistent-generic-constructors': consistent_generic_constructors_1.default, + 'consistent-indexed-object-style': consistent_indexed_object_style_1.default, + 'consistent-return': consistent_return_1.default, + 'consistent-type-assertions': consistent_type_assertions_1.default, + 'consistent-type-definitions': consistent_type_definitions_1.default, + 'consistent-type-exports': consistent_type_exports_1.default, + 'consistent-type-imports': consistent_type_imports_1.default, + 'default-param-last': default_param_last_1.default, + 'dot-notation': dot_notation_1.default, + 'explicit-function-return-type': explicit_function_return_type_1.default, + 'explicit-member-accessibility': explicit_member_accessibility_1.default, + 'explicit-module-boundary-types': explicit_module_boundary_types_1.default, + 'init-declarations': init_declarations_1.default, + 'max-params': max_params_1.default, + 'member-ordering': member_ordering_1.default, + 'method-signature-style': method_signature_style_1.default, + 'naming-convention': naming_convention_1.default, + 'no-array-constructor': no_array_constructor_1.default, + 'no-array-delete': no_array_delete_1.default, + 'no-base-to-string': no_base_to_string_1.default, + 'no-confusing-non-null-assertion': no_confusing_non_null_assertion_1.default, + 'no-confusing-void-expression': no_confusing_void_expression_1.default, + 'no-deprecated': no_deprecated_1.default, + 'no-dupe-class-members': no_dupe_class_members_1.default, + 'no-duplicate-enum-values': no_duplicate_enum_values_1.default, + 'no-duplicate-type-constituents': no_duplicate_type_constituents_1.default, + 'no-dynamic-delete': no_dynamic_delete_1.default, + 'no-empty-function': no_empty_function_1.default, + 'no-empty-interface': no_empty_interface_1.default, + 'no-empty-object-type': no_empty_object_type_1.default, + 'no-explicit-any': no_explicit_any_1.default, + 'no-extra-non-null-assertion': no_extra_non_null_assertion_1.default, + 'no-extraneous-class': no_extraneous_class_1.default, + 'no-floating-promises': no_floating_promises_1.default, + 'no-for-in-array': no_for_in_array_1.default, + 'no-implied-eval': no_implied_eval_1.default, + 'no-import-type-side-effects': no_import_type_side_effects_1.default, + 'no-inferrable-types': no_inferrable_types_1.default, + 'no-invalid-this': no_invalid_this_1.default, + 'no-invalid-void-type': no_invalid_void_type_1.default, + 'no-loop-func': no_loop_func_1.default, + 'no-loss-of-precision': no_loss_of_precision_1.default, + 'no-magic-numbers': no_magic_numbers_1.default, + 'no-meaningless-void-operator': no_meaningless_void_operator_1.default, + 'no-misused-new': no_misused_new_1.default, + 'no-misused-promises': no_misused_promises_1.default, + 'no-misused-spread': no_misused_spread_1.default, + 'no-mixed-enums': no_mixed_enums_1.default, + 'no-namespace': no_namespace_1.default, + 'no-non-null-asserted-nullish-coalescing': no_non_null_asserted_nullish_coalescing_1.default, + 'no-non-null-asserted-optional-chain': no_non_null_asserted_optional_chain_1.default, + 'no-non-null-assertion': no_non_null_assertion_1.default, + 'no-redeclare': no_redeclare_1.default, + 'no-redundant-type-constituents': no_redundant_type_constituents_1.default, + 'no-require-imports': no_require_imports_1.default, + 'no-restricted-imports': no_restricted_imports_1.default, + 'no-restricted-types': no_restricted_types_1.default, + 'no-shadow': no_shadow_1.default, + 'no-this-alias': no_this_alias_1.default, + 'no-type-alias': no_type_alias_1.default, + 'no-unnecessary-boolean-literal-compare': no_unnecessary_boolean_literal_compare_1.default, + 'no-unnecessary-condition': no_unnecessary_condition_1.default, + 'no-unnecessary-parameter-property-assignment': no_unnecessary_parameter_property_assignment_1.default, + 'no-unnecessary-qualifier': no_unnecessary_qualifier_1.default, + 'no-unnecessary-template-expression': no_unnecessary_template_expression_1.default, + 'no-unnecessary-type-arguments': no_unnecessary_type_arguments_1.default, + 'no-unnecessary-type-assertion': no_unnecessary_type_assertion_1.default, + 'no-unnecessary-type-constraint': no_unnecessary_type_constraint_1.default, + 'no-unnecessary-type-conversion': no_unnecessary_type_conversion_1.default, + 'no-unnecessary-type-parameters': no_unnecessary_type_parameters_1.default, + 'no-unsafe-argument': no_unsafe_argument_1.default, + 'no-unsafe-assignment': no_unsafe_assignment_1.default, + 'no-unsafe-call': no_unsafe_call_1.default, + 'no-unsafe-declaration-merging': no_unsafe_declaration_merging_1.default, + 'no-unsafe-enum-comparison': no_unsafe_enum_comparison_1.default, + 'no-unsafe-function-type': no_unsafe_function_type_1.default, + 'no-unsafe-member-access': no_unsafe_member_access_1.default, + 'no-unsafe-return': no_unsafe_return_1.default, + 'no-unsafe-type-assertion': no_unsafe_type_assertion_1.default, + 'no-unsafe-unary-minus': no_unsafe_unary_minus_1.default, + 'no-unused-expressions': no_unused_expressions_1.default, + 'no-unused-vars': no_unused_vars_1.default, + 'no-use-before-define': no_use_before_define_1.default, + 'no-useless-constructor': no_useless_constructor_1.default, + 'no-useless-empty-export': no_useless_empty_export_1.default, + 'no-var-requires': no_var_requires_1.default, + 'no-wrapper-object-types': no_wrapper_object_types_1.default, + 'non-nullable-type-assertion-style': non_nullable_type_assertion_style_1.default, + 'only-throw-error': only_throw_error_1.default, + 'parameter-properties': parameter_properties_1.default, + 'prefer-as-const': prefer_as_const_1.default, + 'prefer-destructuring': prefer_destructuring_1.default, + 'prefer-enum-initializers': prefer_enum_initializers_1.default, + 'prefer-find': prefer_find_1.default, + 'prefer-for-of': prefer_for_of_1.default, + 'prefer-function-type': prefer_function_type_1.default, + 'prefer-includes': prefer_includes_1.default, + 'prefer-literal-enum-member': prefer_literal_enum_member_1.default, + 'prefer-namespace-keyword': prefer_namespace_keyword_1.default, + 'prefer-nullish-coalescing': prefer_nullish_coalescing_1.default, + 'prefer-optional-chain': prefer_optional_chain_1.default, + 'prefer-promise-reject-errors': prefer_promise_reject_errors_1.default, + 'prefer-readonly': prefer_readonly_1.default, + 'prefer-readonly-parameter-types': prefer_readonly_parameter_types_1.default, + 'prefer-reduce-type-parameter': prefer_reduce_type_parameter_1.default, + 'prefer-regexp-exec': prefer_regexp_exec_1.default, + 'prefer-return-this-type': prefer_return_this_type_1.default, + 'prefer-string-starts-ends-with': prefer_string_starts_ends_with_1.default, + 'prefer-ts-expect-error': prefer_ts_expect_error_1.default, + 'promise-function-async': promise_function_async_1.default, + 'related-getter-setter-pairs': related_getter_setter_pairs_1.default, + 'require-array-sort-compare': require_array_sort_compare_1.default, + 'require-await': require_await_1.default, + 'restrict-plus-operands': restrict_plus_operands_1.default, + 'restrict-template-expressions': restrict_template_expressions_1.default, + 'return-await': return_await_1.default, + 'sort-type-constituents': sort_type_constituents_1.default, + 'strict-boolean-expressions': strict_boolean_expressions_1.default, + 'switch-exhaustiveness-check': switch_exhaustiveness_check_1.default, + 'triple-slash-reference': triple_slash_reference_1.default, + typedef: typedef_1.default, + 'unbound-method': unbound_method_1.default, + 'unified-signatures': unified_signatures_1.default, + 'use-unknown-in-catch-callback-variable': use_unknown_in_catch_callback_variable_1.default, +}; +module.exports = rules; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.d.ts new file mode 100644 index 0000000..d6108d5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.d.ts @@ -0,0 +1,14 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"initialized" | "notInitialized", ["always" | "never", ({ + ignoreForLoopInit?: boolean; +} | undefined)?], unknown, { + 'VariableDeclaration:exit'(node: TSESTree.VariableDeclaration): void; +}>; +export type Options = InferOptionsTypeFromRule; +export type MessageIds = InferMessageIdsTypeFromRule; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"initialized" | "notInitialized", ["always" | "never", ({ + ignoreForLoopInit?: boolean; +} | undefined)?], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=init-declarations.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.d.ts.map new file mode 100644 index 0000000..565ea62 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"init-declarations.d.ts","sourceRoot":"","sources":["../../src/rules/init-declarations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAKjB,QAAA,MAAM,QAAQ;;;;EAAyC,CAAC;AAExD,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC,OAAO,QAAQ,CAAC,CAAC;;;;AAEtE,wBAiGG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js new file mode 100644 index 0000000..c526212 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js @@ -0,0 +1,105 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('init-declarations'); +exports.default = (0, util_1.createRule)({ + name: 'init-declarations', + meta: { + type: 'suggestion', + // defaultOptions, -- base rule does not use defaultOptions + docs: { + description: 'Require or disallow initialization in variable declarations', + extendsBaseRule: true, + frozen: true, + }, + hasSuggestions: baseRule.meta.hasSuggestions, + messages: baseRule.meta.messages, + schema: baseRule.meta.schema, + }, + defaultOptions: ['always'], + create(context, [mode]) { + // Make a custom context to adjust the loc of reports where the base + // rule's behavior is a bit too aggressive with TS-specific syntax (namely, + // type annotations). + function getBaseContextOverride() { + const reportOverride = descriptor => { + if ('node' in descriptor && descriptor.loc == null) { + const { node, ...rest } = descriptor; + // We only want to special case the report loc when reporting on + // variables declarations that are not initialized. Declarations that + // _are_ initialized get reported by the base rule due to a setting to + // prohibit initializing variables entirely, in which case underlining + // the whole node including the type annotation and initializer is + // appropriate. + if (node.type === utils_1.AST_NODE_TYPES.VariableDeclarator && + node.init == null) { + context.report({ + ...rest, + loc: getReportLoc(node), + }); + return; + } + } + context.report(descriptor); + }; + // `return { ...context, report: reportOverride }` isn't safe because the + // `context` object has some getters that need to be preserved. + // + // `return new Proxy(context, ...)` doesn't work because `context` has + // non-configurable properties that throw when constructing a Proxy. + // + // So, we'll just use Proxy on a dummy object and use the `get` trap to + // proxy `context`'s properties. + return new Proxy({}, { + get: (target, prop, receiver) => prop === 'report' + ? reportOverride + : Reflect.get(context, prop, receiver), + }); + } + const rules = baseRule.create(getBaseContextOverride()); + return { + 'VariableDeclaration:exit'(node) { + if (mode === 'always') { + if (node.declare) { + return; + } + if (isAncestorNamespaceDeclared(node)) { + return; + } + } + rules['VariableDeclaration:exit'](node); + }, + }; + function isAncestorNamespaceDeclared(node) { + let ancestor = node.parent; + while (ancestor) { + if (ancestor.type === utils_1.AST_NODE_TYPES.TSModuleDeclaration && + ancestor.declare) { + return true; + } + ancestor = ancestor.parent; + } + return false; + } + }, +}); +/** + * When reporting an uninitialized variable declarator, get the loc excluding + * the type annotation. + */ +function getReportLoc(node) { + const start = structuredClone(node.loc.start); + const end = { + line: node.loc.start.line, + // `if (id.type === AST_NODE_TYPES.Identifier)` is a condition for + // reporting in the base rule (as opposed to things like destructuring + // assignment), so the type assertion should always be valid. + column: node.loc.start.column + node.id.name.length, + }; + return { + start, + end, + }; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/max-params.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/max-params.d.ts new file mode 100644 index 0000000..e2cfb0c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/max-params.d.ts @@ -0,0 +1,24 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"exceed", ({ + countVoidThis?: boolean; + max: number; +} | { + countVoidThis?: boolean; + maximum: number; +})[], unknown, { + ArrowFunctionExpression(node: TSESTree.ArrowFunctionExpression): void; + FunctionDeclaration(node: TSESTree.FunctionDeclaration | TSESTree.TSDeclareFunction | TSESTree.TSFunctionType): void; + FunctionExpression(node: TSESTree.FunctionExpression): void; +}>; +export type Options = InferOptionsTypeFromRule; +export type MessageIds = InferMessageIdsTypeFromRule; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"exceed", ({ + countVoidThis?: boolean; + max: number; +} | { + countVoidThis?: boolean; + maximum: number; +})[], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=max-params.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/max-params.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/max-params.d.ts.map new file mode 100644 index 0000000..4489777 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/max-params.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"max-params.d.ts","sourceRoot":"","sources":["../../src/rules/max-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAcjB,QAAA,MAAM,QAAQ;;;;;;;;;;EAAkC,CAAC;AAEjD,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC,OAAO,QAAQ,CAAC,CAAC;;;;;;;;AAEtE,wBA+EG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/max-params.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/max-params.js new file mode 100644 index 0000000..8c070d3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/max-params.js @@ -0,0 +1,72 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('max-params'); +exports.default = (0, util_1.createRule)({ + name: 'max-params', + meta: { + type: 'suggestion', + // defaultOptions, -- base rule does not use defaultOptions + docs: { + description: 'Enforce a maximum number of parameters in function definitions', + extendsBaseRule: true, + }, + messages: baseRule.meta.messages, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + countVoidThis: { + type: 'boolean', + description: 'Whether to count a `this` declaration when the type is `void`.', + }, + max: { + type: 'integer', + description: 'A maximum number of parameters in function definitions.', + minimum: 0, + }, + maximum: { + type: 'integer', + description: '(deprecated) A maximum number of parameters in function definitions.', + minimum: 0, + }, + }, + }, + ], + }, + defaultOptions: [{ countVoidThis: false, max: 3 }], + create(context, [{ countVoidThis }]) { + const baseRules = baseRule.create(context); + if (countVoidThis === true) { + return baseRules; + } + const removeVoidThisParam = (node) => { + if (node.params.length === 0 || + node.params[0].type !== utils_1.AST_NODE_TYPES.Identifier || + node.params[0].name !== 'this' || + node.params[0].typeAnnotation?.typeAnnotation.type !== + utils_1.AST_NODE_TYPES.TSVoidKeyword) { + return node; + } + return { + ...node, + params: node.params.slice(1), + }; + }; + const wrapListener = (listener) => { + return (node) => { + listener(removeVoidThisParam(node)); + }; + }; + return { + ArrowFunctionExpression: wrapListener(baseRules.ArrowFunctionExpression), + FunctionDeclaration: wrapListener(baseRules.FunctionDeclaration), + FunctionExpression: wrapListener(baseRules.FunctionExpression), + TSDeclareFunction: wrapListener(baseRules.FunctionDeclaration), + TSFunctionType: wrapListener(baseRules.FunctionDeclaration), + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.d.ts new file mode 100644 index 0000000..fb00a90 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.d.ts @@ -0,0 +1,32 @@ +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; +export type MessageIds = 'incorrectGroupOrder' | 'incorrectOrder' | 'incorrectRequiredMembersOrder'; +type ReadonlyType = 'readonly-field' | 'readonly-signature'; +type MemberKind = 'accessor' | 'call-signature' | 'constructor' | 'field' | 'get' | 'method' | 'set' | 'signature' | 'static-initialization' | ReadonlyType; +type DecoratedMemberKind = 'accessor' | 'field' | 'get' | 'method' | 'set' | Exclude; +type NonCallableMemberKind = Exclude; +type MemberScope = 'abstract' | 'instance' | 'static'; +type Accessibility = '#private' | TSESTree.Accessibility; +type BaseMemberType = `${Accessibility}-${Exclude}` | `${Accessibility}-${MemberScope}-${NonCallableMemberKind}` | `${Accessibility}-decorated-${DecoratedMemberKind}` | `${MemberScope}-${NonCallableMemberKind}` | `decorated-${DecoratedMemberKind}` | MemberKind; +type MemberType = BaseMemberType | BaseMemberType[]; +type AlphabeticalOrder = 'alphabetically' | 'alphabetically-case-insensitive' | 'natural' | 'natural-case-insensitive'; +type Order = 'as-written' | AlphabeticalOrder; +interface SortedOrderConfig { + memberTypes?: 'never' | MemberType[]; + optionalityOrder?: OptionalityOrder; + order?: Order; +} +type OrderConfig = 'never' | MemberType[] | SortedOrderConfig; +type OptionalityOrder = 'optional-first' | 'required-first'; +export type Options = [ + { + classes?: OrderConfig; + classExpressions?: OrderConfig; + default?: OrderConfig; + interfaces?: OrderConfig; + typeLiterals?: OrderConfig; + } +]; +export declare const defaultOrder: MemberType[]; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=member-ordering.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.d.ts.map new file mode 100644 index 0000000..1a4443c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"member-ordering.d.ts","sourceRoot":"","sources":["../../src/rules/member-ordering.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAc,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAY/E,MAAM,MAAM,UAAU,GAClB,qBAAqB,GACrB,gBAAgB,GAChB,+BAA+B,CAAC;AAEpC,KAAK,YAAY,GAAG,gB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B,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAE5D,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,OAAO,CAAC,EAAE,WAAW,CAAC;QACtB,gBAAgB,CAAC,EAAE,WAAW,CAAC;QAC/B,OAAO,CAAC,EAAE,WAAW,CAAC;QACtB,UAAU,CAAC,EAAE,WAAW,CAAC;QACzB,YAAY,CAAC,EAAE,WAAW,CAAC;KAC5B;CACF,CAAC;AAwCF,eAAO,MAAM,YAAY,EAAE,UAAU,EAyKpC,CAAC;;AAwaF,wBA4YG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js new file mode 100644 index 0000000..eb02543 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js @@ -0,0 +1,828 @@ +"use strict"; +// This rule was feature-frozen before we enabled no-property-in-node. +/* eslint-disable eslint-plugin/no-property-in-node */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultOrder = void 0; +const utils_1 = require("@typescript-eslint/utils"); +const natural_compare_1 = __importDefault(require("natural-compare")); +const util_1 = require("../util"); +const neverConfig = { + type: 'string', + enum: ['never'], +}; +const arrayConfig = (memberTypes) => ({ + type: 'array', + items: { + oneOf: [ + { + $ref: memberTypes, + }, + { + type: 'array', + items: { + $ref: memberTypes, + }, + }, + ], + }, +}); +const objectConfig = (memberTypes) => ({ + type: 'object', + additionalProperties: false, + properties: { + memberTypes: { + oneOf: [arrayConfig(memberTypes), neverConfig], + }, + optionalityOrder: { + $ref: '#/items/0/$defs/optionalityOrderOptions', + }, + order: { + $ref: '#/items/0/$defs/orderOptions', + }, + }, +}); +exports.defaultOrder = [ + // Index signature + 'signature', + 'call-signature', + // Fields + 'public-static-field', + 'protected-static-field', + 'private-static-field', + '#private-static-field', + 'public-decorated-field', + 'protected-decorated-field', + 'private-decorated-field', + 'public-instance-field', + 'protected-instance-field', + 'private-instance-field', + '#private-instance-field', + 'public-abstract-field', + 'protected-abstract-field', + 'public-field', + 'protected-field', + 'private-field', + '#private-field', + 'static-field', + 'instance-field', + 'abstract-field', + 'decorated-field', + 'field', + // Static initialization + 'static-initialization', + // Constructors + 'public-constructor', + 'protected-constructor', + 'private-constructor', + 'constructor', + // Accessors + 'public-static-accessor', + 'protected-static-accessor', + 'private-static-accessor', + '#private-static-accessor', + 'public-decorated-accessor', + 'protected-decorated-accessor', + 'private-decorated-accessor', + 'public-instance-accessor', + 'protected-instance-accessor', + 'private-instance-accessor', + '#private-instance-accessor', + 'public-abstract-accessor', + 'protected-abstract-accessor', + 'public-accessor', + 'protected-accessor', + 'private-accessor', + '#private-accessor', + 'static-accessor', + 'instance-accessor', + 'abstract-accessor', + 'decorated-accessor', + 'accessor', + // Getters + 'public-static-get', + 'protected-static-get', + 'private-static-get', + '#private-static-get', + 'public-decorated-get', + 'protected-decorated-get', + 'private-decorated-get', + 'public-instance-get', + 'protected-instance-get', + 'private-instance-get', + '#private-instance-get', + 'public-abstract-get', + 'protected-abstract-get', + 'public-get', + 'protected-get', + 'private-get', + '#private-get', + 'static-get', + 'instance-get', + 'abstract-get', + 'decorated-get', + 'get', + // Setters + 'public-static-set', + 'protected-static-set', + 'private-static-set', + '#private-static-set', + 'public-decorated-set', + 'protected-decorated-set', + 'private-decorated-set', + 'public-instance-set', + 'protected-instance-set', + 'private-instance-set', + '#private-instance-set', + 'public-abstract-set', + 'protected-abstract-set', + 'public-set', + 'protected-set', + 'private-set', + '#private-set', + 'static-set', + 'instance-set', + 'abstract-set', + 'decorated-set', + 'set', + // Methods + 'public-static-method', + 'protected-static-method', + 'private-static-method', + '#private-static-method', + 'public-decorated-method', + 'protected-decorated-method', + 'private-decorated-method', + 'public-instance-method', + 'protected-instance-method', + 'private-instance-method', + '#private-instance-method', + 'public-abstract-method', + 'protected-abstract-method', + 'public-method', + 'protected-method', + 'private-method', + '#private-method', + 'static-method', + 'instance-method', + 'abstract-method', + 'decorated-method', + 'method', +]; +const allMemberTypes = [ + ...new Set([ + 'readonly-signature', + 'signature', + 'readonly-field', + 'field', + 'method', + 'call-signature', + 'constructor', + 'accessor', + 'get', + 'set', + 'static-initialization', + ].flatMap(type => [ + type, + ...['public', 'protected', 'private', '#private'] + .flatMap(accessibility => [ + type !== 'readonly-signature' && + type !== 'signature' && + type !== 'static-initialization' && + type !== 'call-signature' && + !(type === 'constructor' && accessibility === '#private') + ? `${accessibility}-${type}` // e.g. `public-field` + : [], + // Only class instance fields, methods, accessors, get and set can have decorators attached to them + accessibility !== '#private' && + (type === 'readonly-field' || + type === 'field' || + type === 'method' || + type === 'accessor' || + type === 'get' || + type === 'set') + ? [`${accessibility}-decorated-${type}`, `decorated-${type}`] + : [], + type !== 'constructor' && + type !== 'readonly-signature' && + type !== 'signature' && + type !== 'call-signature' + ? [ + 'static', + 'instance', + // There is no `static-constructor` or `instance-constructor` or `abstract-constructor` + ...(accessibility === '#private' || + accessibility === 'private' + ? [] + : ['abstract']), + ].flatMap(scope => [ + `${scope}-${type}`, + `${accessibility}-${scope}-${type}`, + ]) + : [], + ]) + .flat(), + ])), +]; +const functionExpressions = [ + utils_1.AST_NODE_TYPES.FunctionExpression, + utils_1.AST_NODE_TYPES.ArrowFunctionExpression, +]; +/** + * Gets the node type. + * + * @param node the node to be evaluated. + */ +function getNodeType(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition: + case utils_1.AST_NODE_TYPES.MethodDefinition: + case utils_1.AST_NODE_TYPES.TSMethodSignature: + return node.kind; + case utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration: + return 'call-signature'; + case utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration: + return 'constructor'; + case utils_1.AST_NODE_TYPES.TSAbstractPropertyDefinition: + case utils_1.AST_NODE_TYPES.TSPropertySignature: + return node.readonly ? 'readonly-field' : 'field'; + case utils_1.AST_NODE_TYPES.TSAbstractAccessorProperty: + case utils_1.AST_NODE_TYPES.AccessorProperty: + return 'accessor'; + case utils_1.AST_NODE_TYPES.PropertyDefinition: + return node.value && functionExpressions.includes(node.value.type) + ? 'method' + : node.readonly + ? 'readonly-field' + : 'field'; + case utils_1.AST_NODE_TYPES.TSIndexSignature: + return node.readonly ? 'readonly-signature' : 'signature'; + case utils_1.AST_NODE_TYPES.StaticBlock: + return 'static-initialization'; + default: + return null; + } +} +/** + * Gets the raw string value of a member's name + */ +function getMemberRawName(member, sourceCode) { + const { name, type } = (0, util_1.getNameFromMember)(member, sourceCode); + if (type === util_1.MemberNameType.Quoted) { + return name.slice(1, -1); + } + if (type === util_1.MemberNameType.Private) { + return name.slice(1); + } + return name; +} +/** + * Gets the member name based on the member type. + * + * @param node the node to be evaluated. + */ +function getMemberName(node, sourceCode) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.TSPropertySignature: + case utils_1.AST_NODE_TYPES.TSMethodSignature: + case utils_1.AST_NODE_TYPES.TSAbstractAccessorProperty: + case utils_1.AST_NODE_TYPES.TSAbstractPropertyDefinition: + case utils_1.AST_NODE_TYPES.AccessorProperty: + case utils_1.AST_NODE_TYPES.PropertyDefinition: + return getMemberRawName(node, sourceCode); + case utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition: + case utils_1.AST_NODE_TYPES.MethodDefinition: + return node.kind === 'constructor' + ? 'constructor' + : getMemberRawName(node, sourceCode); + case utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration: + return 'new'; + case utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration: + return 'call'; + case utils_1.AST_NODE_TYPES.TSIndexSignature: + return (0, util_1.getNameFromIndexSignature)(node); + case utils_1.AST_NODE_TYPES.StaticBlock: + return 'static block'; + default: + return null; + } +} +/** + * Returns true if the member is optional based on the member type. + * + * @param node the node to be evaluated. + * + * @returns Whether the member is optional, or false if it cannot be optional at all. + */ +function isMemberOptional(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.TSPropertySignature: + case utils_1.AST_NODE_TYPES.TSMethodSignature: + case utils_1.AST_NODE_TYPES.TSAbstractAccessorProperty: + case utils_1.AST_NODE_TYPES.TSAbstractPropertyDefinition: + case utils_1.AST_NODE_TYPES.AccessorProperty: + case utils_1.AST_NODE_TYPES.PropertyDefinition: + case utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition: + case utils_1.AST_NODE_TYPES.MethodDefinition: + return node.optional; + } + return false; +} +/** + * Gets the calculated rank using the provided method definition. + * The algorithm is as follows: + * - Get the rank based on the accessibility-scope-type name, e.g. public-instance-field + * - If there is no order for accessibility-scope-type, then strip out the accessibility. + * - If there is no order for scope-type, then strip out the scope. + * - If there is no order for type, then return -1 + * @param memberGroups the valid names to be validated. + * @param orderConfig the current order to be validated. + * + * @return Index of the matching member type in the order configuration. + */ +function getRankOrder(memberGroups, orderConfig) { + let rank = -1; + const stack = [...memberGroups]; // Get a copy of the member groups + while (stack.length > 0 && rank === -1) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const memberGroup = stack.shift(); + rank = orderConfig.findIndex(memberType => Array.isArray(memberType) + ? memberType.includes(memberGroup) + : memberType === memberGroup); + } + return rank; +} +function getAccessibility(node) { + if ('accessibility' in node && node.accessibility) { + return node.accessibility; + } + if ('key' in node && node.key.type === utils_1.AST_NODE_TYPES.PrivateIdentifier) { + return '#private'; + } + return 'public'; +} +/** + * Gets the rank of the node given the order. + * @param node the node to be evaluated. + * @param orderConfig the current order to be validated. + * @param supportsModifiers a flag indicating whether the type supports modifiers (scope or accessibility) or not. + */ +function getRank(node, orderConfig, supportsModifiers) { + const type = getNodeType(node); + if (node.type === utils_1.AST_NODE_TYPES.MethodDefinition && + node.value.type === utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression) { + return -1; + } + if (type == null) { + // shouldn't happen but just in case, put it on the end + return orderConfig.length - 1; + } + const abstract = node.type === utils_1.AST_NODE_TYPES.TSAbstractAccessorProperty || + node.type === utils_1.AST_NODE_TYPES.TSAbstractPropertyDefinition || + node.type === utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition; + const scope = 'static' in node && node.static + ? 'static' + : abstract + ? 'abstract' + : 'instance'; + const accessibility = getAccessibility(node); + // Collect all existing member groups that apply to this node... + // (e.g. 'public-instance-field', 'instance-field', 'public-field', 'constructor' etc.) + const memberGroups = []; + if (supportsModifiers) { + const decorated = 'decorators' in node && node.decorators.length > 0; + if (decorated && + (type === 'readonly-field' || + type === 'field' || + type === 'method' || + type === 'accessor' || + type === 'get' || + type === 'set')) { + memberGroups.push(`${accessibility}-decorated-${type}`); + memberGroups.push(`decorated-${type}`); + if (type === 'readonly-field') { + memberGroups.push(`${accessibility}-decorated-field`); + memberGroups.push(`decorated-field`); + } + } + if (type !== 'readonly-signature' && + type !== 'signature' && + type !== 'static-initialization') { + if (type !== 'constructor') { + // Constructors have no scope + memberGroups.push(`${accessibility}-${scope}-${type}`); + memberGroups.push(`${scope}-${type}`); + if (type === 'readonly-field') { + memberGroups.push(`${accessibility}-${scope}-field`); + memberGroups.push(`${scope}-field`); + } + } + memberGroups.push(`${accessibility}-${type}`); + if (type === 'readonly-field') { + memberGroups.push(`${accessibility}-field`); + } + } + } + memberGroups.push(type); + if (type === 'readonly-signature') { + memberGroups.push('signature'); + } + else if (type === 'readonly-field') { + memberGroups.push('field'); + } + // ...then get the rank order for those member groups based on the node + return getRankOrder(memberGroups, orderConfig); +} +/** + * Groups members into arrays of consecutive members with the same rank. + * If, for example, the memberSet parameter looks like the following... + * @example + * ``` + * interface Foo { + * [a: string]: number; + * + * a: x; + * B: x; + * c: x; + * + * c(): void; + * B(): void; + * a(): void; + * + * (): Baz; + * + * new (): Bar; + * } + * ``` + * ...the resulting array will look like: [[a, B, c], [c, B, a]]. + * @param memberSet The members to be grouped. + * @param memberType The configured order of member types. + * @param supportsModifiers It'll get passed to getRank(). + * @returns The array of groups of members. + */ +function groupMembersByType(members, memberTypes, supportsModifiers) { + const groupedMembers = []; + const memberRanks = members.map(member => getRank(member, memberTypes, supportsModifiers)); + let previousRank = undefined; + members.forEach((member, index) => { + if (index === members.length - 1) { + return; + } + const rankOfCurrentMember = memberRanks[index]; + const rankOfNextMember = memberRanks[index + 1]; + if (rankOfCurrentMember === previousRank) { + groupedMembers.at(-1)?.push(member); + } + else if (rankOfCurrentMember === rankOfNextMember) { + groupedMembers.push([member]); + previousRank = rankOfCurrentMember; + } + }); + return groupedMembers; +} +/** + * Gets the lowest possible rank(s) higher than target. + * e.g. given the following order: + * ... + * public-static-method + * protected-static-method + * private-static-method + * public-instance-method + * protected-instance-method + * private-instance-method + * ... + * and considering that a public-instance-method has already been declared, so ranks contains + * public-instance-method, then the lowest possible rank for public-static-method is + * public-instance-method. + * If a lowest possible rank is a member group, a comma separated list of ranks is returned. + * @param ranks the existing ranks in the object. + * @param target the minimum target rank to filter on. + * @param order the current order to be validated. + * @returns the name(s) of the lowest possible rank without dashes (-). + */ +function getLowestRank(ranks, target, order) { + let lowest = ranks[ranks.length - 1]; + ranks.forEach(rank => { + if (rank > target) { + lowest = Math.min(lowest, rank); + } + }); + const lowestRank = order[lowest]; + const lowestRanks = Array.isArray(lowestRank) ? lowestRank : [lowestRank]; + return lowestRanks.map(rank => rank.replaceAll('-', ' ')).join(', '); +} +exports.default = (0, util_1.createRule)({ + name: 'member-ordering', + meta: { + type: 'suggestion', + docs: { + description: 'Require a consistent member declaration order', + frozen: true, + }, + messages: { + incorrectGroupOrder: 'Member {{name}} should be declared before all {{rank}} definitions.', + incorrectOrder: 'Member {{member}} should be declared before member {{beforeMember}}.', + incorrectRequiredMembersOrder: `Member {{member}} should be declared after all {{optionalOrRequired}} members.`, + }, + schema: [ + { + type: 'object', + $defs: { + allItems: { + type: 'string', + enum: allMemberTypes, + }, + optionalityOrderOptions: { + type: 'string', + enum: ['optional-first', 'required-first'], + }, + orderOptions: { + type: 'string', + enum: [ + 'alphabetically', + 'alphabetically-case-insensitive', + 'as-written', + 'natural', + 'natural-case-insensitive', + ], + }, + typeItems: { + type: 'string', + enum: [ + 'readonly-signature', + 'signature', + 'readonly-field', + 'field', + 'method', + 'constructor', + ], + }, + // ajv is order-dependent; these configs must come last + baseConfig: { + oneOf: [ + neverConfig, + arrayConfig('#/items/0/$defs/allItems'), + objectConfig('#/items/0/$defs/allItems'), + ], + }, + typesConfig: { + oneOf: [ + neverConfig, + arrayConfig('#/items/0/$defs/typeItems'), + objectConfig('#/items/0/$defs/typeItems'), + ], + }, + }, + additionalProperties: false, + properties: { + classes: { + $ref: '#/items/0/$defs/baseConfig', + }, + classExpressions: { + $ref: '#/items/0/$defs/baseConfig', + }, + default: { + $ref: '#/items/0/$defs/baseConfig', + }, + interfaces: { + $ref: '#/items/0/$defs/typesConfig', + }, + typeLiterals: { + $ref: '#/items/0/$defs/typesConfig', + }, + }, + }, + ], + }, + defaultOptions: [ + { + default: { + memberTypes: exports.defaultOrder, + }, + }, + ], + create(context, [options]) { + /** + * Checks if the member groups are correctly sorted. + * + * @param members Members to be validated. + * @param groupOrder Group order to be validated. + * @param supportsModifiers A flag indicating whether the type supports modifiers (scope or accessibility) or not. + * + * @return Array of member groups or null if one of the groups is not correctly sorted. + */ + function checkGroupSort(members, groupOrder, supportsModifiers) { + const previousRanks = []; + const memberGroups = []; + let isCorrectlySorted = true; + // Find first member which isn't correctly sorted + for (const member of members) { + const rank = getRank(member, groupOrder, supportsModifiers); + const name = getMemberName(member, context.sourceCode); + const rankLastMember = previousRanks[previousRanks.length - 1]; + if (rank === -1) { + continue; + } + // Works for 1st item because x < undefined === false for any x (typeof string) + if (rank < rankLastMember) { + context.report({ + node: member, + messageId: 'incorrectGroupOrder', + data: { + name, + rank: getLowestRank(previousRanks, rank, groupOrder), + }, + }); + isCorrectlySorted = false; + } + else if (rank === rankLastMember) { + // Same member group --> Push to existing member group array + memberGroups[memberGroups.length - 1].push(member); + } + else { + // New member group --> Create new member group array + previousRanks.push(rank); + memberGroups.push([member]); + } + } + return isCorrectlySorted ? memberGroups : null; + } + /** + * Checks if the members are alphabetically sorted. + * + * @param members Members to be validated. + * @param order What order the members should be sorted in. + * + * @return True if all members are correctly sorted. + */ + function checkAlphaSort(members, order) { + let previousName = ''; + let isCorrectlySorted = true; + // Find first member which isn't correctly sorted + members.forEach(member => { + const name = getMemberName(member, context.sourceCode); + // Note: Not all members have names + if (name) { + if (naturalOutOfOrder(name, previousName, order)) { + context.report({ + node: member, + messageId: 'incorrectOrder', + data: { + beforeMember: previousName, + member: name, + }, + }); + isCorrectlySorted = false; + } + previousName = name; + } + }); + return isCorrectlySorted; + } + function naturalOutOfOrder(name, previousName, order) { + if (name === previousName) { + return false; + } + switch (order) { + case 'alphabetically': + return name < previousName; + case 'alphabetically-case-insensitive': + return name.toLowerCase() < previousName.toLowerCase(); + case 'natural': + return (0, natural_compare_1.default)(name, previousName) !== 1; + case 'natural-case-insensitive': + return ((0, natural_compare_1.default)(name.toLowerCase(), previousName.toLowerCase()) !== 1); + } + } + /** + * Checks if the order of optional and required members is correct based + * on the given 'required' parameter. + * + * @param members Members to be validated. + * @param optionalityOrder Where to place optional members, if not intermixed. + * + * @return True if all required and optional members are correctly sorted. + */ + function checkRequiredOrder(members, optionalityOrder) { + const switchIndex = members.findIndex((member, i) => i && isMemberOptional(member) !== isMemberOptional(members[i - 1])); + const report = (member) => context.report({ + loc: member.loc, + messageId: 'incorrectRequiredMembersOrder', + data: { + member: getMemberName(member, context.sourceCode), + optionalOrRequired: optionalityOrder === 'required-first' ? 'required' : 'optional', + }, + }); + // if the optionality of the first item is correct (based on optionalityOrder) + // then the first 0 inclusive to switchIndex exclusive members all + // have the correct optionality + if (isMemberOptional(members[0]) !== + (optionalityOrder === 'optional-first')) { + report(members[0]); + return false; + } + for (let i = switchIndex + 1; i < members.length; i++) { + if (isMemberOptional(members[i]) !== + isMemberOptional(members[switchIndex])) { + report(members[switchIndex]); + return false; + } + } + return true; + } + /** + * Validates if all members are correctly sorted. + * + * @param members Members to be validated. + * @param orderConfig Order config to be validated. + * @param supportsModifiers A flag indicating whether the type supports modifiers (scope or accessibility) or not. + */ + function validateMembersOrder(members, orderConfig, supportsModifiers) { + if (orderConfig === 'never') { + return; + } + // Standardize config + let order; + let memberTypes; + let optionalityOrder; + /** + * It runs an alphabetic sort on the groups of the members of the class in the source code. + * @param memberSet The members in the class of the source code on which the grouping operation will be performed. + */ + const checkAlphaSortForAllMembers = (memberSet) => { + const hasAlphaSort = !!(order && order !== 'as-written'); + if (hasAlphaSort && Array.isArray(memberTypes)) { + groupMembersByType(memberSet, memberTypes, supportsModifiers).forEach(members => { + checkAlphaSort(members, order); + }); + } + }; + // returns true if everything is good and false if an error was reported + const checkOrder = (memberSet) => { + const hasAlphaSort = !!(order && order !== 'as-written'); + // Check order + if (Array.isArray(memberTypes)) { + const grouped = checkGroupSort(memberSet, memberTypes, supportsModifiers); + if (grouped == null) { + checkAlphaSortForAllMembers(members); + return false; + } + if (hasAlphaSort) { + grouped.map(groupMember => checkAlphaSort(groupMember, order)); + } + } + else if (hasAlphaSort) { + return checkAlphaSort(memberSet, order); + } + return false; + }; + if (Array.isArray(orderConfig)) { + memberTypes = orderConfig; + } + else { + order = orderConfig.order; + memberTypes = orderConfig.memberTypes; + optionalityOrder = orderConfig.optionalityOrder; + } + if (!optionalityOrder) { + checkOrder(members); + return; + } + const switchIndex = members.findIndex((member, i) => i && isMemberOptional(member) !== isMemberOptional(members[i - 1])); + if (switchIndex !== -1) { + if (!checkRequiredOrder(members, optionalityOrder)) { + return; + } + checkOrder(members.slice(0, switchIndex)); + checkOrder(members.slice(switchIndex)); + } + else { + checkOrder(members); + } + } + // https://github.com/typescript-eslint/typescript-eslint/issues/5439 + /* eslint-disable @typescript-eslint/no-non-null-assertion */ + return { + ClassDeclaration(node) { + validateMembersOrder(node.body.body, options.classes ?? options.default, true); + }, + 'ClassDeclaration, FunctionDeclaration'(node) { + if ('superClass' in node) { + // ... + } + }, + ClassExpression(node) { + validateMembersOrder(node.body.body, options.classExpressions ?? options.default, true); + }, + TSInterfaceDeclaration(node) { + validateMembersOrder(node.body.body, options.interfaces ?? options.default, false); + }, + TSTypeLiteral(node) { + validateMembersOrder(node.members, options.typeLiterals ?? options.default, false); + }, + }; + /* eslint-enable @typescript-eslint/no-non-null-assertion */ + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.d.ts new file mode 100644 index 0000000..b244351 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.d.ts @@ -0,0 +1,5 @@ +export type Options = [('method' | 'property')?]; +export type MessageIds = 'errorMethod' | 'errorProperty'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=method-signature-style.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.d.ts.map new file mode 100644 index 0000000..5e58c71 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"method-signature-style.d.ts","sourceRoot":"","sources":["../../src/rules/method-signature-style.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AACjD,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,eAAe,CAAC;;AAEzD,wBAmOG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js new file mode 100644 index 0000000..d426c7e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js @@ -0,0 +1,176 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'method-signature-style', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce using a particular method signature syntax', + }, + fixable: 'code', + messages: { + errorMethod: 'Shorthand method signature is forbidden. Use a function property instead.', + errorProperty: 'Function property signature is forbidden. Use a method shorthand instead.', + }, + schema: [ + { + type: 'string', + enum: ['property', 'method'], + }, + ], + }, + defaultOptions: ['property'], + create(context, [mode]) { + function getMethodKey(node) { + let key = context.sourceCode.getText(node.key); + if (node.computed) { + key = `[${key}]`; + } + if (node.optional) { + key = `${key}?`; + } + if (node.readonly) { + key = `readonly ${key}`; + } + return key; + } + function getMethodParams(node) { + let params = '()'; + if (node.params.length > 0) { + const openingParen = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(node.params[0], util_1.isOpeningParenToken), 'Missing opening paren before first parameter'); + const closingParen = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.params[node.params.length - 1], util_1.isClosingParenToken), 'Missing closing paren after last parameter'); + params = context.sourceCode.text.substring(openingParen.range[0], closingParen.range[1]); + } + if (node.typeParameters != null) { + const typeParams = context.sourceCode.getText(node.typeParameters); + params = `${typeParams}${params}`; + } + return params; + } + function getMethodReturnType(node) { + return node.returnType == null + ? // if the method has no return type, it implicitly has an `any` return type + // we just make it explicit here so we can do the fix + 'any' + : context.sourceCode.getText(node.returnType.typeAnnotation); + } + function getDelimiter(node) { + const lastToken = context.sourceCode.getLastToken(node); + if (lastToken && + ((0, util_1.isSemicolonToken)(lastToken) || (0, util_1.isCommaToken)(lastToken))) { + return lastToken.value; + } + return ''; + } + function isNodeParentModuleDeclaration(node) { + if (!node.parent) { + return false; + } + if (node.parent.type === utils_1.AST_NODE_TYPES.TSModuleDeclaration) { + return true; + } + if (node.parent.type === utils_1.AST_NODE_TYPES.Program) { + return false; + } + return isNodeParentModuleDeclaration(node.parent); + } + return { + ...(mode === 'property' && { + TSMethodSignature(methodNode) { + if (methodNode.kind !== 'method') { + return; + } + const parent = methodNode.parent; + const members = parent.type === utils_1.AST_NODE_TYPES.TSInterfaceBody + ? parent.body + : parent.members; + const duplicatedKeyMethodNodes = members.filter((element) => element.type === utils_1.AST_NODE_TYPES.TSMethodSignature && + element !== methodNode && + getMethodKey(element) === getMethodKey(methodNode)); + const isParentModule = isNodeParentModuleDeclaration(methodNode); + if (duplicatedKeyMethodNodes.length > 0) { + if (isParentModule) { + context.report({ + node: methodNode, + messageId: 'errorMethod', + }); + } + else { + context.report({ + node: methodNode, + messageId: 'errorMethod', + *fix(fixer) { + const methodNodes = [ + methodNode, + ...duplicatedKeyMethodNodes, + ].sort((a, b) => (a.range[0] < b.range[0] ? -1 : 1)); + const typeString = methodNodes + .map(node => { + const params = getMethodParams(node); + const returnType = getMethodReturnType(node); + return `(${params} => ${returnType})`; + }) + .join(' & '); + const key = getMethodKey(methodNode); + const delimiter = getDelimiter(methodNode); + yield fixer.replaceText(methodNode, `${key}: ${typeString}${delimiter}`); + for (const node of duplicatedKeyMethodNodes) { + const lastToken = context.sourceCode.getLastToken(node); + if (lastToken) { + const nextToken = context.sourceCode.getTokenAfter(lastToken); + if (nextToken) { + yield fixer.remove(node); + yield fixer.replaceTextRange([lastToken.range[1], nextToken.range[0]], ''); + } + } + } + }, + }); + } + return; + } + if (isParentModule) { + context.report({ + node: methodNode, + messageId: 'errorMethod', + }); + } + else { + context.report({ + node: methodNode, + messageId: 'errorMethod', + fix: fixer => { + const key = getMethodKey(methodNode); + const params = getMethodParams(methodNode); + const returnType = getMethodReturnType(methodNode); + const delimiter = getDelimiter(methodNode); + return fixer.replaceText(methodNode, `${key}: ${params} => ${returnType}${delimiter}`); + }, + }); + } + }, + }), + ...(mode === 'method' && { + TSPropertySignature(propertyNode) { + const typeNode = propertyNode.typeAnnotation?.typeAnnotation; + if (typeNode?.type !== utils_1.AST_NODE_TYPES.TSFunctionType) { + return; + } + context.report({ + node: propertyNode, + messageId: 'errorProperty', + fix: fixer => { + const key = getMethodKey(propertyNode); + const params = getMethodParams(typeNode); + const returnType = getMethodReturnType(typeNode); + const delimiter = getDelimiter(propertyNode); + return fixer.replaceText(propertyNode, `${key}${params}: ${returnType}${delimiter}`); + }, + }); + }, + }), + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.d.ts new file mode 100644 index 0000000..1e557bb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.d.ts @@ -0,0 +1,80 @@ +export declare enum PredefinedFormats { + camelCase = 1, + strictCamelCase = 2, + PascalCase = 3, + StrictPascalCase = 4, + snake_case = 5, + UPPER_CASE = 6 +} +export type PredefinedFormatsString = keyof typeof PredefinedFormats; +export declare enum UnderscoreOptions { + forbid = 1, + allow = 2, + require = 3, + requireDouble = 4, + allowDouble = 5, + allowSingleOrDouble = 6 +} +export type UnderscoreOptionsString = keyof typeof UnderscoreOptions; +export declare enum Selectors { + variable = 1, + function = 2, + parameter = 4, + parameterProperty = 8, + classicAccessor = 16, + enumMember = 32, + classMethod = 64, + objectLiteralMethod = 128, + typeMethod = 256, + classProperty = 512, + objectLiteralProperty = 1024, + typeProperty = 2048, + autoAccessor = 4096, + class = 8192, + interface = 16384, + typeAlias = 32768, + enum = 65536, + typeParameter = 131072, + import = 262144 +} +export type SelectorsString = keyof typeof Selectors; +export declare enum MetaSelectors { + default = -1, + variableLike = 7, + memberLike = 8184, + typeLike = 253952, + method = 448, + property = 3584, + accessor = 4112 +} +export type MetaSelectorsString = keyof typeof MetaSelectors; +export type IndividualAndMetaSelectorsString = MetaSelectorsString | SelectorsString; +export declare enum Modifiers { + const = 1, + readonly = 2, + static = 4, + public = 8, + protected = 16, + private = 32, + '#private' = 64, + abstract = 128, + destructured = 256, + global = 512, + exported = 1024, + unused = 2048, + requiresQuotes = 4096, + override = 8192, + async = 16384, + default = 32768, + namespace = 65536 +} +export type ModifiersString = keyof typeof Modifiers; +export declare enum TypeModifiers { + boolean = 131072, + string = 262144, + number = 524288, + function = 1048576, + array = 2097152 +} +export type TypeModifiersString = keyof typeof TypeModifiers; +//# sourceMappingURL=enums.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.d.ts.map new file mode 100644 index 0000000..35851c0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/rules/naming-convention-utils/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,SAAS,IAAI;IACb,eAAe,IAAA;IACf,UAAU,IAAA;IACV,gBAAgB,IAAA;IAChB,UAAU,IAAA;IACV,UAAU,IAAA;CACX;AACD,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,iBAAiB,CAAC;AAErE,oBAAY,iBAAiB;IAC3B,MAAM,IAAI;IACV,KAAK,IAAA;IACL,OAAO,IAAA;IAGP,aAAa,IAAA;IACb,WAAW,IAAA;IACX,mBAAmB,IAAA;CACpB;AACD,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,iBAAiB,CAAC;AAErE,oBAAY,SAAS;IAEnB,QAAQ,IAAS;IACjB,QAAQ,IAAS;IACjB,SAAS,IAAS;IAGlB,iBAAiB,IAAS;IAC1B,eAAe,KAAS;IACxB,UAAU,KAAS;IACnB,WAAW,KAAS;IACpB,mBAAmB,MAAS;IAC5B,UAAU,MAAS;IACnB,aAAa,MAAS;IACtB,qBAAqB,OAAU;IAC/B,YAAY,OAAU;IACtB,YAAY,OAAU;IAGtB,KAAK,OAAU;IACf,SAAS,QAAU;IACnB,SAAS,QAAU;IACnB,IAAI,QAAU;IACd,aAAa,SAAU;IAGvB,MAAM,SAAU;CACjB;AACD,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,SAAS,CAAC;AAErD,oBAAY,aAAa;IAEvB,OAAO,KAAK;IACZ,YAAY,IAGS;IACrB,UAAU,OAUc;IACxB,QAAQ,SAKiB;IACzB,MAAM,MAGgB;IACtB,QAAQ,OAGgB;IACxB,QAAQ,OAAyD;CAElE;AACD,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,aAAa,CAAC;AAC7D,MAAM,MAAM,gCAAgC,GACxC,mBAAmB,GACnB,eAAe,CAAC;AAEpB,oBAAY,SAAS;IAEnB,KAAK,IAAS;IAEd,QAAQ,IAAS;IAEjB,MAAM,IAAS;IAEf,MAAM,IAAS;IACf,SAAS,KAAS;IAClB,OAAO,KAAS;IAChB,UAAU,KAAS;IACnB,QAAQ,MAAS;IAEjB,YAAY,MAAS;IAErB,MAAM,MAAS;IAEf,QAAQ,OAAU;IAElB,MAAM,OAAU;IAEhB,cAAc,OAAU;IAExB,QAAQ,OAAU;IAElB,KAAK,QAAU;IAEf,OAAO,QAAU;IAEjB,SAAS,QAAU;CAGpB;AACD,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,SAAS,CAAC;AAErD,oBAAY,aAAa;IACvB,OAAO,SAAU;IACjB,MAAM,SAAU;IAChB,MAAM,SAAU;IAChB,QAAQ,UAAU;IAClB,KAAK,UAAU;CAChB;AACD,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,aAAa,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js new file mode 100644 index 0000000..fe550b3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js @@ -0,0 +1,102 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeModifiers = exports.Modifiers = exports.MetaSelectors = exports.Selectors = exports.UnderscoreOptions = exports.PredefinedFormats = void 0; +var PredefinedFormats; +(function (PredefinedFormats) { + PredefinedFormats[PredefinedFormats["camelCase"] = 1] = "camelCase"; + PredefinedFormats[PredefinedFormats["strictCamelCase"] = 2] = "strictCamelCase"; + PredefinedFormats[PredefinedFormats["PascalCase"] = 3] = "PascalCase"; + PredefinedFormats[PredefinedFormats["StrictPascalCase"] = 4] = "StrictPascalCase"; + PredefinedFormats[PredefinedFormats["snake_case"] = 5] = "snake_case"; + PredefinedFormats[PredefinedFormats["UPPER_CASE"] = 6] = "UPPER_CASE"; +})(PredefinedFormats || (exports.PredefinedFormats = PredefinedFormats = {})); +var UnderscoreOptions; +(function (UnderscoreOptions) { + UnderscoreOptions[UnderscoreOptions["forbid"] = 1] = "forbid"; + UnderscoreOptions[UnderscoreOptions["allow"] = 2] = "allow"; + UnderscoreOptions[UnderscoreOptions["require"] = 3] = "require"; + // special cases as it's common practice to use double underscore + UnderscoreOptions[UnderscoreOptions["requireDouble"] = 4] = "requireDouble"; + UnderscoreOptions[UnderscoreOptions["allowDouble"] = 5] = "allowDouble"; + UnderscoreOptions[UnderscoreOptions["allowSingleOrDouble"] = 6] = "allowSingleOrDouble"; +})(UnderscoreOptions || (exports.UnderscoreOptions = UnderscoreOptions = {})); +var Selectors; +(function (Selectors) { + // variableLike + Selectors[Selectors["variable"] = 1] = "variable"; + Selectors[Selectors["function"] = 2] = "function"; + Selectors[Selectors["parameter"] = 4] = "parameter"; + // memberLike + Selectors[Selectors["parameterProperty"] = 8] = "parameterProperty"; + Selectors[Selectors["classicAccessor"] = 16] = "classicAccessor"; + Selectors[Selectors["enumMember"] = 32] = "enumMember"; + Selectors[Selectors["classMethod"] = 64] = "classMethod"; + Selectors[Selectors["objectLiteralMethod"] = 128] = "objectLiteralMethod"; + Selectors[Selectors["typeMethod"] = 256] = "typeMethod"; + Selectors[Selectors["classProperty"] = 512] = "classProperty"; + Selectors[Selectors["objectLiteralProperty"] = 1024] = "objectLiteralProperty"; + Selectors[Selectors["typeProperty"] = 2048] = "typeProperty"; + Selectors[Selectors["autoAccessor"] = 4096] = "autoAccessor"; + // typeLike + Selectors[Selectors["class"] = 8192] = "class"; + Selectors[Selectors["interface"] = 16384] = "interface"; + Selectors[Selectors["typeAlias"] = 32768] = "typeAlias"; + Selectors[Selectors["enum"] = 65536] = "enum"; + Selectors[Selectors["typeParameter"] = 131072] = "typeParameter"; + // other + Selectors[Selectors["import"] = 262144] = "import"; +})(Selectors || (exports.Selectors = Selectors = {})); +var MetaSelectors; +(function (MetaSelectors) { + /* eslint-disable @typescript-eslint/prefer-literal-enum-member */ + MetaSelectors[MetaSelectors["default"] = -1] = "default"; + MetaSelectors[MetaSelectors["variableLike"] = 7] = "variableLike"; + MetaSelectors[MetaSelectors["memberLike"] = 8184] = "memberLike"; + MetaSelectors[MetaSelectors["typeLike"] = 253952] = "typeLike"; + MetaSelectors[MetaSelectors["method"] = 448] = "method"; + MetaSelectors[MetaSelectors["property"] = 3584] = "property"; + MetaSelectors[MetaSelectors["accessor"] = 4112] = "accessor"; + /* eslint-enable @typescript-eslint/prefer-literal-enum-member */ +})(MetaSelectors || (exports.MetaSelectors = MetaSelectors = {})); +var Modifiers; +(function (Modifiers) { + // const variable + Modifiers[Modifiers["const"] = 1] = "const"; + // readonly members + Modifiers[Modifiers["readonly"] = 2] = "readonly"; + // static members + Modifiers[Modifiers["static"] = 4] = "static"; + // member accessibility + Modifiers[Modifiers["public"] = 8] = "public"; + Modifiers[Modifiers["protected"] = 16] = "protected"; + Modifiers[Modifiers["private"] = 32] = "private"; + Modifiers[Modifiers["#private"] = 64] = "#private"; + Modifiers[Modifiers["abstract"] = 128] = "abstract"; + // destructured variable + Modifiers[Modifiers["destructured"] = 256] = "destructured"; + // variables declared in the top-level scope + Modifiers[Modifiers["global"] = 512] = "global"; + // things that are exported + Modifiers[Modifiers["exported"] = 1024] = "exported"; + // things that are unused + Modifiers[Modifiers["unused"] = 2048] = "unused"; + // properties that require quoting + Modifiers[Modifiers["requiresQuotes"] = 4096] = "requiresQuotes"; + // class members that are overridden + Modifiers[Modifiers["override"] = 8192] = "override"; + // class methods, object function properties, or functions that are async via the `async` keyword + Modifiers[Modifiers["async"] = 16384] = "async"; + // default imports + Modifiers[Modifiers["default"] = 32768] = "default"; + // namespace imports + Modifiers[Modifiers["namespace"] = 65536] = "namespace"; + // make sure TypeModifiers starts at Modifiers + 1 or else sorting won't work +})(Modifiers || (exports.Modifiers = Modifiers = {})); +var TypeModifiers; +(function (TypeModifiers) { + TypeModifiers[TypeModifiers["boolean"] = 131072] = "boolean"; + TypeModifiers[TypeModifiers["string"] = 262144] = "string"; + TypeModifiers[TypeModifiers["number"] = 524288] = "number"; + TypeModifiers[TypeModifiers["function"] = 1048576] = "function"; + TypeModifiers[TypeModifiers["array"] = 2097152] = "array"; +})(TypeModifiers || (exports.TypeModifiers = TypeModifiers = {})); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/format.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/format.d.ts new file mode 100644 index 0000000..4d68b92 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/format.d.ts @@ -0,0 +1,3 @@ +import { PredefinedFormats } from './enums'; +export declare const PredefinedFormatToCheckFunction: Readonly boolean>>; +//# sourceMappingURL=format.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/format.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/format.d.ts.map new file mode 100644 index 0000000..34630d6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/format.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/rules/naming-convention-utils/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAkG5C,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CACpD,MAAM,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAQrD,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/format.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/format.js new file mode 100644 index 0000000..00f8a66 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/format.js @@ -0,0 +1,89 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PredefinedFormatToCheckFunction = void 0; +const enums_1 = require("./enums"); +/* +These format functions are taken from `tslint-consistent-codestyle/naming-convention`: +https://github.com/ajafff/tslint-consistent-codestyle/blob/ab156cc8881bcc401236d999f4ce034b59039e81/rules/namingConventionRule.ts#L603-L645 + +The license for the code can be viewed here: +https://github.com/ajafff/tslint-consistent-codestyle/blob/ab156cc8881bcc401236d999f4ce034b59039e81/LICENSE +*/ +/* +Why not regex here? Because it's actually really, really difficult to create a regex to handle +all of the unicode cases, and we have many non-english users that use non-english characters. +https://gist.github.com/mathiasbynens/6334847 +*/ +function isPascalCase(name) { + return (name.length === 0 || + (name[0] === name[0].toUpperCase() && !name.includes('_'))); +} +function isStrictPascalCase(name) { + return (name.length === 0 || + (name[0] === name[0].toUpperCase() && hasStrictCamelHumps(name, true))); +} +function isCamelCase(name) { + return (name.length === 0 || + (name[0] === name[0].toLowerCase() && !name.includes('_'))); +} +function isStrictCamelCase(name) { + return (name.length === 0 || + (name[0] === name[0].toLowerCase() && hasStrictCamelHumps(name, false))); +} +function hasStrictCamelHumps(name, isUpper) { + function isUppercaseChar(char) { + return char === char.toUpperCase() && char !== char.toLowerCase(); + } + if (name.startsWith('_')) { + return false; + } + for (let i = 1; i < name.length; ++i) { + if (name[i] === '_') { + return false; + } + if (isUpper === isUppercaseChar(name[i])) { + if (isUpper) { + return false; + } + } + else { + isUpper = !isUpper; + } + } + return true; +} +function isSnakeCase(name) { + return (name.length === 0 || + (name === name.toLowerCase() && validateUnderscores(name))); +} +function isUpperCase(name) { + return (name.length === 0 || + (name === name.toUpperCase() && validateUnderscores(name))); +} +/** Check for leading trailing and adjacent underscores */ +function validateUnderscores(name) { + if (name.startsWith('_')) { + return false; + } + let wasUnderscore = false; + for (let i = 1; i < name.length; ++i) { + if (name[i] === '_') { + if (wasUnderscore) { + return false; + } + wasUnderscore = true; + } + else { + wasUnderscore = false; + } + } + return !wasUnderscore; +} +exports.PredefinedFormatToCheckFunction = { + [enums_1.PredefinedFormats.camelCase]: isCamelCase, + [enums_1.PredefinedFormats.PascalCase]: isPascalCase, + [enums_1.PredefinedFormats.snake_case]: isSnakeCase, + [enums_1.PredefinedFormats.strictCamelCase]: isStrictCamelCase, + [enums_1.PredefinedFormats.StrictPascalCase]: isStrictPascalCase, + [enums_1.PredefinedFormats.UPPER_CASE]: isUpperCase, +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/index.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/index.d.ts new file mode 100644 index 0000000..effb70e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/index.d.ts @@ -0,0 +1,7 @@ +export { Modifiers } from './enums'; +export type { PredefinedFormatsString } from './enums'; +export { parseOptions } from './parse-options'; +export { SCHEMA } from './schema'; +export { selectorTypeToMessageString } from './shared'; +export type { Context, Selector, ValidatorFunction } from './types'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/index.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/index.d.ts.map new file mode 100644 index 0000000..e9d1649 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rules/naming-convention-utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,YAAY,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AACvD,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/index.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/index.js new file mode 100644 index 0000000..2c9770a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/index.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.selectorTypeToMessageString = exports.SCHEMA = exports.parseOptions = exports.Modifiers = void 0; +var enums_1 = require("./enums"); +Object.defineProperty(exports, "Modifiers", { enumerable: true, get: function () { return enums_1.Modifiers; } }); +var parse_options_1 = require("./parse-options"); +Object.defineProperty(exports, "parseOptions", { enumerable: true, get: function () { return parse_options_1.parseOptions; } }); +var schema_1 = require("./schema"); +Object.defineProperty(exports, "SCHEMA", { enumerable: true, get: function () { return schema_1.SCHEMA; } }); +var shared_1 = require("./shared"); +Object.defineProperty(exports, "selectorTypeToMessageString", { enumerable: true, get: function () { return shared_1.selectorTypeToMessageString; } }); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/parse-options.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/parse-options.d.ts new file mode 100644 index 0000000..497084d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/parse-options.d.ts @@ -0,0 +1,3 @@ +import type { Context, ParsedOptions } from './types'; +export declare function parseOptions(context: Context): ParsedOptions; +//# sourceMappingURL=parse-options.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/parse-options.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/parse-options.d.ts.map new file mode 100644 index 0000000..a20b5ae --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/parse-options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-options.d.ts","sourceRoot":"","sources":["../../../src/rules/naming-convention-utils/parse-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAEP,aAAa,EAEd,MAAM,SAAS,CAAC;AA6EjB,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,CAS5D"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/parse-options.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/parse-options.js new file mode 100644 index 0000000..128082b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/parse-options.js @@ -0,0 +1,69 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseOptions = parseOptions; +const util_1 = require("../../util"); +const enums_1 = require("./enums"); +const shared_1 = require("./shared"); +const validator_1 = require("./validator"); +function normalizeOption(option) { + let weight = 0; + option.modifiers?.forEach(mod => { + weight |= enums_1.Modifiers[mod]; + }); + option.types?.forEach(mod => { + weight |= enums_1.TypeModifiers[mod]; + }); + // give selectors with a filter the _highest_ priority + if (option.filter) { + weight |= 1 << 30; + } + const normalizedOption = { + // format options + custom: option.custom + ? { + match: option.custom.match, + regex: new RegExp(option.custom.regex, 'u'), + } + : null, + filter: option.filter != null + ? typeof option.filter === 'string' + ? { + match: true, + regex: new RegExp(option.filter, 'u'), + } + : { + match: option.filter.match, + regex: new RegExp(option.filter.regex, 'u'), + } + : null, + format: option.format ? option.format.map(f => enums_1.PredefinedFormats[f]) : null, + leadingUnderscore: option.leadingUnderscore != null + ? enums_1.UnderscoreOptions[option.leadingUnderscore] + : null, + modifiers: option.modifiers?.map(m => enums_1.Modifiers[m]) ?? null, + prefix: option.prefix && option.prefix.length > 0 ? option.prefix : null, + suffix: option.suffix && option.suffix.length > 0 ? option.suffix : null, + trailingUnderscore: option.trailingUnderscore != null + ? enums_1.UnderscoreOptions[option.trailingUnderscore] + : null, + types: option.types?.map(m => enums_1.TypeModifiers[m]) ?? null, + // calculated ordering weight based on modifiers + modifierWeight: weight, + }; + const selectors = Array.isArray(option.selector) + ? option.selector + : [option.selector]; + return selectors.map(selector => ({ + selector: (0, shared_1.isMetaSelector)(selector) + ? enums_1.MetaSelectors[selector] + : enums_1.Selectors[selector], + ...normalizedOption, + })); +} +function parseOptions(context) { + const normalizedOptions = context.options.flatMap(normalizeOption); + return Object.fromEntries((0, util_1.getEnumNames)(enums_1.Selectors).map(k => [ + k, + (0, validator_1.createValidator)(k, context, normalizedOptions), + ])); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.d.ts new file mode 100644 index 0000000..2b16057 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.d.ts @@ -0,0 +1,3 @@ +import type { JSONSchema } from '@typescript-eslint/utils'; +export declare const SCHEMA: JSONSchema.JSONSchema4; +//# sourceMappingURL=schema.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.d.ts.map new file mode 100644 index 0000000..dde2637 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/rules/naming-convention-utils/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AA2L3D,eAAO,MAAM,MAAM,EAAE,UAAU,CAAC,WA+I/B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js new file mode 100644 index 0000000..fd8c6bb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js @@ -0,0 +1,305 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SCHEMA = void 0; +const util_1 = require("../../util"); +const enums_1 = require("./enums"); +const $DEFS = { + // enums + predefinedFormats: { + enum: (0, util_1.getEnumNames)(enums_1.PredefinedFormats), + type: 'string', + }, + typeModifiers: { + enum: (0, util_1.getEnumNames)(enums_1.TypeModifiers), + type: 'string', + }, + underscoreOptions: { + enum: (0, util_1.getEnumNames)(enums_1.UnderscoreOptions), + type: 'string', + }, + // repeated types + formatOptionsConfig: { + oneOf: [ + { + additionalItems: false, + items: { + $ref: '#/$defs/predefinedFormats', + }, + type: 'array', + }, + { + type: 'null', + }, + ], + }, + matchRegexConfig: { + additionalProperties: false, + properties: { + match: { type: 'boolean' }, + regex: { type: 'string' }, + }, + required: ['match', 'regex'], + type: 'object', + }, + prefixSuffixConfig: { + additionalItems: false, + items: { + minLength: 1, + type: 'string', + }, + type: 'array', + }, +}; +const UNDERSCORE_SCHEMA = { + $ref: '#/$defs/underscoreOptions', +}; +const PREFIX_SUFFIX_SCHEMA = { + $ref: '#/$defs/prefixSuffixConfig', +}; +const MATCH_REGEX_SCHEMA = { + $ref: '#/$defs/matchRegexConfig', +}; +const FORMAT_OPTIONS_PROPERTIES = { + custom: MATCH_REGEX_SCHEMA, + failureMessage: { + type: 'string', + }, + format: { + $ref: '#/$defs/formatOptionsConfig', + }, + leadingUnderscore: UNDERSCORE_SCHEMA, + prefix: PREFIX_SUFFIX_SCHEMA, + suffix: PREFIX_SUFFIX_SCHEMA, + trailingUnderscore: UNDERSCORE_SCHEMA, +}; +function selectorSchema(selectorString, allowType, modifiers) { + const selector = { + filter: { + oneOf: [ + { + minLength: 1, + type: 'string', + }, + MATCH_REGEX_SCHEMA, + ], + }, + selector: { + enum: [selectorString], + type: 'string', + }, + }; + if (modifiers && modifiers.length > 0) { + selector.modifiers = { + additionalItems: false, + items: { + enum: modifiers, + type: 'string', + }, + type: 'array', + }; + } + if (allowType) { + selector.types = { + additionalItems: false, + items: { + $ref: '#/$defs/typeModifiers', + }, + type: 'array', + }; + } + return [ + { + additionalProperties: false, + description: `Selector '${selectorString}'`, + properties: { + ...FORMAT_OPTIONS_PROPERTIES, + ...selector, + }, + required: ['selector', 'format'], + type: 'object', + }, + ]; +} +function selectorsSchema() { + return { + additionalProperties: false, + description: 'Multiple selectors in one config', + properties: { + ...FORMAT_OPTIONS_PROPERTIES, + filter: { + oneOf: [ + { + minLength: 1, + type: 'string', + }, + MATCH_REGEX_SCHEMA, + ], + }, + modifiers: { + additionalItems: false, + items: { + enum: (0, util_1.getEnumNames)(enums_1.Modifiers), + type: 'string', + }, + type: 'array', + }, + selector: { + additionalItems: false, + items: { + enum: [...(0, util_1.getEnumNames)(enums_1.MetaSelectors), ...(0, util_1.getEnumNames)(enums_1.Selectors)], + type: 'string', + }, + type: 'array', + }, + types: { + additionalItems: false, + items: { + $ref: '#/$defs/typeModifiers', + }, + type: 'array', + }, + }, + required: ['selector', 'format'], + type: 'object', + }; +} +exports.SCHEMA = { + $defs: $DEFS, + additionalItems: false, + items: { + oneOf: [ + selectorsSchema(), + ...selectorSchema('default', false, (0, util_1.getEnumNames)(enums_1.Modifiers)), + ...selectorSchema('variableLike', false, ['unused', 'async']), + ...selectorSchema('variable', true, [ + 'const', + 'destructured', + 'exported', + 'global', + 'unused', + 'async', + ]), + ...selectorSchema('function', false, [ + 'exported', + 'global', + 'unused', + 'async', + ]), + ...selectorSchema('parameter', true, ['destructured', 'unused']), + ...selectorSchema('memberLike', false, [ + 'abstract', + 'private', + '#private', + 'protected', + 'public', + 'readonly', + 'requiresQuotes', + 'static', + 'override', + 'async', + ]), + ...selectorSchema('classProperty', true, [ + 'abstract', + 'private', + '#private', + 'protected', + 'public', + 'readonly', + 'requiresQuotes', + 'static', + 'override', + ]), + ...selectorSchema('objectLiteralProperty', true, [ + 'public', + 'requiresQuotes', + ]), + ...selectorSchema('typeProperty', true, [ + 'public', + 'readonly', + 'requiresQuotes', + ]), + ...selectorSchema('parameterProperty', true, [ + 'private', + 'protected', + 'public', + 'readonly', + ]), + ...selectorSchema('property', true, [ + 'abstract', + 'private', + '#private', + 'protected', + 'public', + 'readonly', + 'requiresQuotes', + 'static', + 'override', + 'async', + ]), + ...selectorSchema('classMethod', false, [ + 'abstract', + 'private', + '#private', + 'protected', + 'public', + 'requiresQuotes', + 'static', + 'override', + 'async', + ]), + ...selectorSchema('objectLiteralMethod', false, [ + 'public', + 'requiresQuotes', + 'async', + ]), + ...selectorSchema('typeMethod', false, ['public', 'requiresQuotes']), + ...selectorSchema('method', false, [ + 'abstract', + 'private', + '#private', + 'protected', + 'public', + 'requiresQuotes', + 'static', + 'override', + 'async', + ]), + ...selectorSchema('classicAccessor', true, [ + 'abstract', + 'private', + 'protected', + 'public', + 'requiresQuotes', + 'static', + 'override', + ]), + ...selectorSchema('autoAccessor', true, [ + 'abstract', + 'private', + 'protected', + 'public', + 'requiresQuotes', + 'static', + 'override', + ]), + ...selectorSchema('accessor', true, [ + 'abstract', + 'private', + 'protected', + 'public', + 'requiresQuotes', + 'static', + 'override', + ]), + ...selectorSchema('enumMember', false, ['requiresQuotes']), + ...selectorSchema('typeLike', false, ['abstract', 'exported', 'unused']), + ...selectorSchema('class', false, ['abstract', 'exported', 'unused']), + ...selectorSchema('interface', false, ['exported', 'unused']), + ...selectorSchema('typeAlias', false, ['exported', 'unused']), + ...selectorSchema('enum', false, ['exported', 'unused']), + ...selectorSchema('typeParameter', false, ['unused']), + ...selectorSchema('import', false, ['default', 'namespace']), + ], + }, + type: 'array', +}; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/shared.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/shared.d.ts new file mode 100644 index 0000000..98ed45a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/shared.d.ts @@ -0,0 +1,6 @@ +import type { IndividualAndMetaSelectorsString, MetaSelectorsString, Selectors, SelectorsString } from './enums'; +import { MetaSelectors } from './enums'; +export declare function selectorTypeToMessageString(selectorType: SelectorsString): string; +export declare function isMetaSelector(selector: IndividualAndMetaSelectorsString | MetaSelectors | Selectors): selector is MetaSelectorsString; +export declare function isMethodOrPropertySelector(selector: IndividualAndMetaSelectorsString | MetaSelectors | Selectors): boolean; +//# sourceMappingURL=shared.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/shared.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/shared.d.ts.map new file mode 100644 index 0000000..e8170ae --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/shared.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/rules/naming-convention-utils/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gCAAgC,EAChC,mBAAmB,EACnB,SAAS,EACT,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,eAAe,GAC5B,MAAM,CAGR;AAED,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,gCAAgC,GAAG,aAAa,GAAG,SAAS,GACrE,QAAQ,IAAI,mBAAmB,CAEjC;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,gCAAgC,GAAG,aAAa,GAAG,SAAS,GACrE,OAAO,CAIT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/shared.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/shared.js new file mode 100644 index 0000000..9e6a67f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/shared.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.selectorTypeToMessageString = selectorTypeToMessageString; +exports.isMetaSelector = isMetaSelector; +exports.isMethodOrPropertySelector = isMethodOrPropertySelector; +const enums_1 = require("./enums"); +function selectorTypeToMessageString(selectorType) { + const notCamelCase = selectorType.replaceAll(/([A-Z])/g, ' $1'); + return notCamelCase.charAt(0).toUpperCase() + notCamelCase.slice(1); +} +function isMetaSelector(selector) { + return selector in enums_1.MetaSelectors; +} +function isMethodOrPropertySelector(selector) { + return (selector === enums_1.MetaSelectors.method || selector === enums_1.MetaSelectors.property); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/types.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/types.d.ts new file mode 100644 index 0000000..4b00604 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/types.d.ts @@ -0,0 +1,40 @@ +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; +import type { MessageIds, Options } from '../naming-convention'; +import type { IndividualAndMetaSelectorsString, MetaSelectors, Modifiers, ModifiersString, PredefinedFormats, PredefinedFormatsString, Selectors, SelectorsString, TypeModifiers, TypeModifiersString, UnderscoreOptions, UnderscoreOptionsString } from './enums'; +export interface MatchRegex { + match: boolean; + regex: string; +} +export interface Selector { + custom?: MatchRegex; + filter?: string | MatchRegex; + format: PredefinedFormatsString[] | null; + leadingUnderscore?: UnderscoreOptionsString; + modifiers?: ModifiersString[]; + prefix?: string[]; + selector: IndividualAndMetaSelectorsString | IndividualAndMetaSelectorsString[]; + suffix?: string[]; + trailingUnderscore?: UnderscoreOptionsString; + types?: TypeModifiersString[]; +} +export interface NormalizedMatchRegex { + match: boolean; + regex: RegExp; +} +export interface NormalizedSelector { + custom: NormalizedMatchRegex | null; + filter: NormalizedMatchRegex | null; + format: PredefinedFormats[] | null; + leadingUnderscore: UnderscoreOptions | null; + modifiers: Modifiers[] | null; + modifierWeight: number; + prefix: string[] | null; + selector: MetaSelectors | Selectors; + suffix: string[] | null; + trailingUnderscore: UnderscoreOptions | null; + types: TypeModifiers[] | null; +} +export type ValidatorFunction = (node: TSESTree.Identifier | TSESTree.Literal | TSESTree.PrivateIdentifier, modifiers?: Set) => void; +export type ParsedOptions = Record; +export type Context = Readonly>; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/types.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/types.d.ts.map new file mode 100644 index 0000000..8731a69 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/rules/naming-convention-utils/types.ts"],"names":[],"mappings":"AAAA,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,IAAI,CAAC;IAE9B,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAExB,QAAQ,EAAE,aAAa,GAAG,SAAS,CAAC;IACpC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACxB,kBAAkB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC7C,KAAK,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,MAAM,iBAAiB,GAAG,CAC9B,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,iBAAiB,EACzE,SAAS,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,KACvB,IAAI,CAAC;AACV,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;AACvE,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/types.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/types.js new file mode 100644 index 0000000..fabb051 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/types.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.d.ts new file mode 100644 index 0000000..e74bb8b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.d.ts @@ -0,0 +1,5 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { SelectorsString } from './enums'; +import type { Context, NormalizedSelector } from './types'; +export declare function createValidator(type: SelectorsString, context: Context, allConfigs: NormalizedSelector[]): (node: TSESTree.Identifier | TSESTree.Literal | TSESTree.PrivateIdentifier) => void; +//# sourceMappingURL=validator.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.d.ts.map new file mode 100644 index 0000000..ff32678 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../src/rules/naming-convention-utils/validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAKzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAkB3D,wBAAgB,eAAe,CAC7B,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,kBAAkB,EAAE,GAC/B,CACD,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,iBAAiB,KACtE,IAAI,CAgYR"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.js new file mode 100644 index 0000000..2063218 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.js @@ -0,0 +1,349 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createValidator = createValidator; +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../../util"); +const enums_1 = require("./enums"); +const format_1 = require("./format"); +const shared_1 = require("./shared"); +function createValidator(type, context, allConfigs) { + // make sure the "highest priority" configs are checked first + const selectorType = enums_1.Selectors[type]; + const configs = allConfigs + // gather all of the applicable selectors + .filter(c => (c.selector & selectorType) !== 0 || + c.selector === enums_1.MetaSelectors.default) + .sort((a, b) => { + if (a.selector === b.selector) { + // in the event of the same selector, order by modifier weight + // sort descending - the type modifiers are "more important" + return b.modifierWeight - a.modifierWeight; + } + const aIsMeta = (0, shared_1.isMetaSelector)(a.selector); + const bIsMeta = (0, shared_1.isMetaSelector)(b.selector); + // non-meta selectors should go ahead of meta selectors + if (aIsMeta && !bIsMeta) { + return 1; + } + if (!aIsMeta && bIsMeta) { + return -1; + } + const aIsMethodOrProperty = (0, shared_1.isMethodOrPropertySelector)(a.selector); + const bIsMethodOrProperty = (0, shared_1.isMethodOrPropertySelector)(b.selector); + // for backward compatibility, method and property have higher precedence than other meta selectors + if (aIsMethodOrProperty && !bIsMethodOrProperty) { + return -1; + } + if (!aIsMethodOrProperty && bIsMethodOrProperty) { + return 1; + } + // both aren't meta selectors + // sort descending - the meta selectors are "least important" + return b.selector - a.selector; + }); + return (node, modifiers = new Set()) => { + const originalName = node.type === utils_1.AST_NODE_TYPES.Identifier || + node.type === utils_1.AST_NODE_TYPES.PrivateIdentifier + ? node.name + : `${node.value}`; + // return will break the loop and stop checking configs + // it is only used when the name is known to have failed or succeeded a config. + for (const config of configs) { + if (config.filter?.regex.test(originalName) !== config.filter?.match) { + // name does not match the filter + continue; + } + if (config.modifiers?.some(modifier => !modifiers.has(modifier))) { + // does not have the required modifiers + continue; + } + if (!isCorrectType(node, config, context, selectorType)) { + // is not the correct type + continue; + } + let name = originalName; + name = validateUnderscore('leading', config, name, node, originalName); + if (name == null) { + // fail + return; + } + name = validateUnderscore('trailing', config, name, node, originalName); + if (name == null) { + // fail + return; + } + name = validateAffix('prefix', config, name, node, originalName); + if (name == null) { + // fail + return; + } + name = validateAffix('suffix', config, name, node, originalName); + if (name == null) { + // fail + return; + } + if (!validateCustom(config, name, node, originalName)) { + // fail + return; + } + if (!validatePredefinedFormat(config, name, node, originalName, modifiers)) { + // fail + return; + } + // it's valid for this config, so we don't need to check any more configs + return; + } + }; + // centralizes the logic for formatting the report data + function formatReportData({ affixes, count, custom, formats, originalName, position, processedName, }) { + return { + affixes: affixes?.join(', '), + count, + formats: formats?.map(f => enums_1.PredefinedFormats[f]).join(', '), + name: originalName, + position, + processedName, + regex: custom?.regex.toString(), + regexMatch: custom?.match === true + ? 'match' + : custom?.match === false + ? 'not match' + : null, + type: (0, shared_1.selectorTypeToMessageString)(type), + }; + } + /** + * @returns the name with the underscore removed, if it is valid according to the specified underscore option, null otherwise + */ + function validateUnderscore(position, config, name, node, originalName) { + const option = position === 'leading' + ? config.leadingUnderscore + : config.trailingUnderscore; + if (!option) { + return name; + } + const hasSingleUnderscore = position === 'leading' + ? () => name.startsWith('_') + : () => name.endsWith('_'); + const trimSingleUnderscore = position === 'leading' + ? () => name.slice(1) + : () => name.slice(0, -1); + const hasDoubleUnderscore = position === 'leading' + ? () => name.startsWith('__') + : () => name.endsWith('__'); + const trimDoubleUnderscore = position === 'leading' + ? () => name.slice(2) + : () => name.slice(0, -2); + switch (option) { + // ALLOW - no conditions as the user doesn't care if it's there or not + case enums_1.UnderscoreOptions.allow: { + if (hasSingleUnderscore()) { + return trimSingleUnderscore(); + } + return name; + } + case enums_1.UnderscoreOptions.allowDouble: { + if (hasDoubleUnderscore()) { + return trimDoubleUnderscore(); + } + return name; + } + case enums_1.UnderscoreOptions.allowSingleOrDouble: { + if (hasDoubleUnderscore()) { + return trimDoubleUnderscore(); + } + if (hasSingleUnderscore()) { + return trimSingleUnderscore(); + } + return name; + } + // FORBID + case enums_1.UnderscoreOptions.forbid: { + if (hasSingleUnderscore()) { + context.report({ + data: formatReportData({ + count: 'one', + originalName, + position, + }), + messageId: 'unexpectedUnderscore', + node, + }); + return null; + } + return name; + } + // REQUIRE + case enums_1.UnderscoreOptions.require: { + if (!hasSingleUnderscore()) { + context.report({ + data: formatReportData({ + count: 'one', + originalName, + position, + }), + messageId: 'missingUnderscore', + node, + }); + return null; + } + return trimSingleUnderscore(); + } + case enums_1.UnderscoreOptions.requireDouble: { + if (!hasDoubleUnderscore()) { + context.report({ + data: formatReportData({ + count: 'two', + originalName, + position, + }), + messageId: 'missingUnderscore', + node, + }); + return null; + } + return trimDoubleUnderscore(); + } + } + } + /** + * @returns the name with the affix removed, if it is valid according to the specified affix option, null otherwise + */ + function validateAffix(position, config, name, node, originalName) { + const affixes = config[position]; + if (!affixes || affixes.length === 0) { + return name; + } + for (const affix of affixes) { + const hasAffix = position === 'prefix' ? name.startsWith(affix) : name.endsWith(affix); + const trimAffix = position === 'prefix' + ? () => name.slice(affix.length) + : () => name.slice(0, -affix.length); + if (hasAffix) { + // matches, so trim it and return + return trimAffix(); + } + } + context.report({ + data: formatReportData({ + affixes, + originalName, + position, + }), + messageId: 'missingAffix', + node, + }); + return null; + } + /** + * @returns true if the name is valid according to the `regex` option, false otherwise + */ + function validateCustom(config, name, node, originalName) { + const custom = config.custom; + if (!custom) { + return true; + } + const result = custom.regex.test(name); + if (custom.match && result) { + return true; + } + if (!custom.match && !result) { + return true; + } + context.report({ + data: formatReportData({ + custom, + originalName, + }), + messageId: 'satisfyCustom', + node, + }); + return false; + } + /** + * @returns true if the name is valid according to the `format` option, false otherwise + */ + function validatePredefinedFormat(config, name, node, originalName, modifiers) { + const formats = config.format; + if (!formats?.length) { + return true; + } + if (!modifiers.has(enums_1.Modifiers.requiresQuotes)) { + for (const format of formats) { + const checker = format_1.PredefinedFormatToCheckFunction[format]; + if (checker(name)) { + return true; + } + } + } + context.report({ + data: formatReportData({ + formats, + originalName, + processedName: name, + }), + messageId: originalName === name + ? 'doesNotMatchFormat' + : 'doesNotMatchFormatTrimmed', + node, + }); + return false; + } +} +const SelectorsAllowedToHaveTypes = enums_1.Selectors.variable | + enums_1.Selectors.parameter | + enums_1.Selectors.classProperty | + enums_1.Selectors.objectLiteralProperty | + enums_1.Selectors.typeProperty | + enums_1.Selectors.parameterProperty | + enums_1.Selectors.classicAccessor; +function isCorrectType(node, config, context, selector) { + if (config.types == null) { + return true; + } + if ((SelectorsAllowedToHaveTypes & selector) === 0) { + return true; + } + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const type = services + .getTypeAtLocation(node) + // remove null and undefined from the type, as we don't care about it here + .getNonNullableType(); + for (const allowedType of config.types) { + switch (allowedType) { + case enums_1.TypeModifiers.array: + if (isAllTypesMatch(type, t => checker.isArrayType(t) || checker.isTupleType(t))) { + return true; + } + break; + case enums_1.TypeModifiers.function: + if (isAllTypesMatch(type, t => t.getCallSignatures().length > 0)) { + return true; + } + break; + case enums_1.TypeModifiers.boolean: + case enums_1.TypeModifiers.number: + case enums_1.TypeModifiers.string: { + const typeString = checker.typeToString( + // this will resolve things like true => boolean, 'a' => string and 1 => number + checker.getWidenedType(checker.getBaseTypeOfLiteralType(type))); + const allowedTypeString = enums_1.TypeModifiers[allowedType]; + if (typeString === allowedTypeString) { + return true; + } + break; + } + } + } + return false; +} +/** + * @returns `true` if the type (or all union types) in the given type return true for the callback + */ +function isAllTypesMatch(type, cb) { + if (type.isUnion()) { + return type.types.every(t => cb(t)); + } + return cb(type); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.d.ts new file mode 100644 index 0000000..8d55bf9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.d.ts @@ -0,0 +1,7 @@ +import { TSESLint } from '@typescript-eslint/utils'; +import type { Selector } from './naming-convention-utils'; +export type MessageIds = 'doesNotMatchFormat' | 'doesNotMatchFormatTrimmed' | 'missingAffix' | 'missingUnderscore' | 'satisfyCustom' | 'unexpectedUnderscore'; +export type Options = Selector[]; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=naming-convention.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.d.ts.map new file mode 100644 index 0000000..2f39121 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"naming-convention.d.ts","sourceRoot":"","sources":["../../src/rules/naming-convention.ts"],"names":[],"mappings":"AAOA,OAAO,EAAkB,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpE,OAAO,KAAK,EAEV,QAAQ,EAET,MAAM,2BAA2B,CAAC;AAUnC,MAAM,MAAM,UAAU,GAClB,oBAAoB,GACpB,2BAA2B,GAC3B,cAAc,GACd,mBAAmB,GACnB,eAAe,GACf,sBAAsB,CAAC;AAK3B,MAAM,MAAM,OAAO,GAAG,QAAQ,EAAE,CAAC;;AA8BjC,wBAopBG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js new file mode 100644 index 0000000..faf4b14 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js @@ -0,0 +1,505 @@ +"use strict"; +// This rule was feature-frozen before we enabled no-property-in-node. +/* eslint-disable eslint-plugin/no-property-in-node */ +Object.defineProperty(exports, "__esModule", { value: true }); +const scope_manager_1 = require("@typescript-eslint/scope-manager"); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const naming_convention_utils_1 = require("./naming-convention-utils"); +// This essentially mirrors ESLint's `camelcase` rule +// note that that rule ignores leading and trailing underscores and only checks those in the middle of a variable name +const defaultCamelCaseAllTheThingsConfig = [ + { + format: ['camelCase'], + leadingUnderscore: 'allow', + selector: 'default', + trailingUnderscore: 'allow', + }, + { + format: ['camelCase', 'PascalCase'], + selector: 'import', + }, + { + format: ['camelCase', 'UPPER_CASE'], + leadingUnderscore: 'allow', + selector: 'variable', + trailingUnderscore: 'allow', + }, + { + format: ['PascalCase'], + selector: 'typeLike', + }, +]; +exports.default = (0, util_1.createRule)({ + name: 'naming-convention', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce naming conventions for everything across a codebase', + // technically only requires type checking if the user uses "type" modifiers + frozen: true, + requiresTypeChecking: true, + }, + messages: { + doesNotMatchFormat: '{{type}} name `{{name}}` must match one of the following formats: {{formats}}', + doesNotMatchFormatTrimmed: '{{type}} name `{{name}}` trimmed as `{{processedName}}` must match one of the following formats: {{formats}}', + missingAffix: '{{type}} name `{{name}}` must have one of the following {{position}}es: {{affixes}}', + missingUnderscore: '{{type}} name `{{name}}` must have {{count}} {{position}} underscore(s).', + satisfyCustom: '{{type}} name `{{name}}` must {{regexMatch}} the RegExp: {{regex}}', + unexpectedUnderscore: '{{type}} name `{{name}}` must not have a {{position}} underscore.', + }, + schema: naming_convention_utils_1.SCHEMA, + }, + defaultOptions: defaultCamelCaseAllTheThingsConfig, + create(contextWithoutDefaults) { + const context = contextWithoutDefaults.options.length > 0 + ? contextWithoutDefaults + : // only apply the defaults when the user provides no config + Object.setPrototypeOf({ + options: defaultCamelCaseAllTheThingsConfig, + }, contextWithoutDefaults); + const validators = (0, naming_convention_utils_1.parseOptions)(context); + const compilerOptions = (0, util_1.getParserServices)(context, true).program?.getCompilerOptions() ?? {}; + function handleMember(validator, node, modifiers) { + const key = node.key; + if (requiresQuoting(key, compilerOptions.target)) { + modifiers.add(naming_convention_utils_1.Modifiers.requiresQuotes); + } + validator(key, modifiers); + } + function getMemberModifiers(node) { + const modifiers = new Set(); + if ('key' in node && node.key.type === utils_1.AST_NODE_TYPES.PrivateIdentifier) { + modifiers.add(naming_convention_utils_1.Modifiers['#private']); + } + else if (node.accessibility) { + modifiers.add(naming_convention_utils_1.Modifiers[node.accessibility]); + } + else { + modifiers.add(naming_convention_utils_1.Modifiers.public); + } + if (node.static) { + modifiers.add(naming_convention_utils_1.Modifiers.static); + } + if ('readonly' in node && node.readonly) { + modifiers.add(naming_convention_utils_1.Modifiers.readonly); + } + if ('override' in node && node.override) { + modifiers.add(naming_convention_utils_1.Modifiers.override); + } + if (node.type === utils_1.AST_NODE_TYPES.TSAbstractPropertyDefinition || + node.type === utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition || + node.type === utils_1.AST_NODE_TYPES.TSAbstractAccessorProperty) { + modifiers.add(naming_convention_utils_1.Modifiers.abstract); + } + return modifiers; + } + const { unusedVariables } = (0, util_1.collectVariables)(context); + function isUnused(name, initialScope) { + let variable = null; + let scope = initialScope; + while (scope) { + variable = scope.set.get(name) ?? null; + if (variable) { + break; + } + scope = scope.upper; + } + if (!variable) { + return false; + } + return unusedVariables.has(variable); + } + function isDestructured(id) { + return ( + // `const { x }` + // does not match `const { x: y }` + (id.parent.type === utils_1.AST_NODE_TYPES.Property && id.parent.shorthand) || + // `const { x = 2 }` + // does not match const `{ x: y = 2 }` + (id.parent.type === utils_1.AST_NODE_TYPES.AssignmentPattern && + id.parent.parent.type === utils_1.AST_NODE_TYPES.Property && + id.parent.parent.shorthand)); + } + function isAsyncMemberOrProperty(propertyOrMemberNode) { + return Boolean('value' in propertyOrMemberNode && + propertyOrMemberNode.value && + 'async' in propertyOrMemberNode.value && + propertyOrMemberNode.value.async); + } + function isAsyncVariableIdentifier(id) { + return Boolean(('async' in id.parent && id.parent.async) || + ('init' in id.parent && + id.parent.init && + 'async' in id.parent.init && + id.parent.init.async)); + } + const selectors = { + // #region import + 'FunctionDeclaration, TSDeclareFunction, FunctionExpression': { + handler: (node, validator) => { + if (node.id == null) { + return; + } + const modifiers = new Set(); + // functions create their own nested scope + const scope = context.sourceCode.getScope(node).upper; + if (isGlobal(scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.global); + } + if (isExported(node, node.id.name, scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.exported); + } + if (isUnused(node.id.name, scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.unused); + } + if (node.async) { + modifiers.add(naming_convention_utils_1.Modifiers.async); + } + validator(node.id, modifiers); + }, + validator: validators.function, + }, + // #endregion + // #region variable + 'ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier': { + handler: (node, validator) => { + const modifiers = new Set(); + switch (node.type) { + case utils_1.AST_NODE_TYPES.ImportDefaultSpecifier: + modifiers.add(naming_convention_utils_1.Modifiers.default); + break; + case utils_1.AST_NODE_TYPES.ImportNamespaceSpecifier: + modifiers.add(naming_convention_utils_1.Modifiers.namespace); + break; + case utils_1.AST_NODE_TYPES.ImportSpecifier: + // Handle `import { default as Foo }` + if (node.imported.type === utils_1.AST_NODE_TYPES.Identifier && + node.imported.name !== 'default') { + return; + } + modifiers.add(naming_convention_utils_1.Modifiers.default); + break; + } + validator(node.local, modifiers); + }, + validator: validators.import, + }, + // #endregion + // #region function + VariableDeclarator: { + handler: (node, validator) => { + const identifiers = getIdentifiersFromPattern(node.id); + const baseModifiers = new Set(); + const parent = node.parent; + if (parent.kind === 'const') { + baseModifiers.add(naming_convention_utils_1.Modifiers.const); + } + if (isGlobal(context.sourceCode.getScope(node))) { + baseModifiers.add(naming_convention_utils_1.Modifiers.global); + } + identifiers.forEach(id => { + const modifiers = new Set(baseModifiers); + if (isDestructured(id)) { + modifiers.add(naming_convention_utils_1.Modifiers.destructured); + } + const scope = context.sourceCode.getScope(id); + if (isExported(parent, id.name, scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.exported); + } + if (isUnused(id.name, scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.unused); + } + if (isAsyncVariableIdentifier(id)) { + modifiers.add(naming_convention_utils_1.Modifiers.async); + } + validator(id, modifiers); + }); + }, + validator: validators.variable, + }, + // #endregion function + // #region parameter + ':matches(PropertyDefinition, TSAbstractPropertyDefinition)[computed = false][value.type != "ArrowFunctionExpression"][value.type != "FunctionExpression"][value.type != "TSEmptyBodyFunctionExpression"]': { + handler: (node, validator) => { + const modifiers = getMemberModifiers(node); + handleMember(validator, node, modifiers); + }, + validator: validators.classProperty, + }, + // #endregion parameter + // #region parameterProperty + ':not(ObjectPattern) > Property[computed = false][kind = "init"][value.type != "ArrowFunctionExpression"][value.type != "FunctionExpression"][value.type != "TSEmptyBodyFunctionExpression"]': { + handler: (node, validator) => { + const modifiers = new Set([naming_convention_utils_1.Modifiers.public]); + handleMember(validator, node, modifiers); + }, + validator: validators.objectLiteralProperty, + }, + // #endregion parameterProperty + // #region property + [[ + ':matches(PropertyDefinition, TSAbstractPropertyDefinition)[computed = false][value.type = "ArrowFunctionExpression"]', + ':matches(PropertyDefinition, TSAbstractPropertyDefinition)[computed = false][value.type = "FunctionExpression"]', + ':matches(PropertyDefinition, TSAbstractPropertyDefinition)[computed = false][value.type = "TSEmptyBodyFunctionExpression"]', + ':matches(MethodDefinition, TSAbstractMethodDefinition)[computed = false][kind = "method"]', + ].join(', ')]: { + handler: (node, validator) => { + const modifiers = getMemberModifiers(node); + if (isAsyncMemberOrProperty(node)) { + modifiers.add(naming_convention_utils_1.Modifiers.async); + } + handleMember(validator, node, modifiers); + }, + validator: validators.classMethod, + }, + [[ + 'MethodDefinition[computed = false]:matches([kind = "get"], [kind = "set"])', + 'TSAbstractMethodDefinition[computed = false]:matches([kind="get"], [kind="set"])', + ].join(', ')]: { + handler: (node, validator) => { + const modifiers = getMemberModifiers(node); + handleMember(validator, node, modifiers); + }, + validator: validators.classicAccessor, + }, + [[ + 'Property[computed = false][kind = "init"][value.type = "ArrowFunctionExpression"]', + 'Property[computed = false][kind = "init"][value.type = "FunctionExpression"]', + 'Property[computed = false][kind = "init"][value.type = "TSEmptyBodyFunctionExpression"]', + ].join(', ')]: { + handler: (node, validator) => { + const modifiers = new Set([naming_convention_utils_1.Modifiers.public]); + if (isAsyncMemberOrProperty(node)) { + modifiers.add(naming_convention_utils_1.Modifiers.async); + } + handleMember(validator, node, modifiers); + }, + validator: validators.objectLiteralMethod, + }, + // #endregion property + // #region method + [[ + 'TSMethodSignature[computed = false]', + 'TSPropertySignature[computed = false][typeAnnotation.typeAnnotation.type = "TSFunctionType"]', + ].join(', ')]: { + handler: (node, validator) => { + const modifiers = new Set([naming_convention_utils_1.Modifiers.public]); + handleMember(validator, node, modifiers); + }, + validator: validators.typeMethod, + }, + [[ + utils_1.AST_NODE_TYPES.AccessorProperty, + utils_1.AST_NODE_TYPES.TSAbstractAccessorProperty, + ].join(', ')]: { + handler: (node, validator) => { + const modifiers = getMemberModifiers(node); + handleMember(validator, node, modifiers); + }, + validator: validators.autoAccessor, + }, + 'FunctionDeclaration, TSDeclareFunction, TSEmptyBodyFunctionExpression, FunctionExpression, ArrowFunctionExpression': { + handler: (node, validator) => { + node.params.forEach(param => { + if (param.type === utils_1.AST_NODE_TYPES.TSParameterProperty) { + return; + } + const identifiers = getIdentifiersFromPattern(param); + identifiers.forEach(i => { + const modifiers = new Set(); + if (isDestructured(i)) { + modifiers.add(naming_convention_utils_1.Modifiers.destructured); + } + if (isUnused(i.name, context.sourceCode.getScope(i))) { + modifiers.add(naming_convention_utils_1.Modifiers.unused); + } + validator(i, modifiers); + }); + }); + }, + validator: validators.parameter, + }, + // #endregion method + // #region accessor + 'Property[computed = false]:matches([kind = "get"], [kind = "set"])': { + handler: (node, validator) => { + const modifiers = new Set([naming_convention_utils_1.Modifiers.public]); + handleMember(validator, node, modifiers); + }, + validator: validators.classicAccessor, + }, + TSParameterProperty: { + handler: (node, validator) => { + const modifiers = getMemberModifiers(node); + const identifiers = getIdentifiersFromPattern(node.parameter); + identifiers.forEach(i => { + validator(i, modifiers); + }); + }, + validator: validators.parameterProperty, + }, + // #endregion accessor + // #region autoAccessor + 'TSPropertySignature[computed = false][typeAnnotation.typeAnnotation.type != "TSFunctionType"]': { + handler: (node, validator) => { + const modifiers = new Set([naming_convention_utils_1.Modifiers.public]); + if (node.readonly) { + modifiers.add(naming_convention_utils_1.Modifiers.readonly); + } + handleMember(validator, node, modifiers); + }, + validator: validators.typeProperty, + }, + // #endregion autoAccessor + // #region enumMember + // computed is optional, so can't do [computed = false] + 'ClassDeclaration, ClassExpression': { + handler: (node, validator) => { + const id = node.id; + if (id == null) { + return; + } + const modifiers = new Set(); + // classes create their own nested scope + const scope = context.sourceCode.getScope(node).upper; + if (node.abstract) { + modifiers.add(naming_convention_utils_1.Modifiers.abstract); + } + if (isExported(node, id.name, scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.exported); + } + if (isUnused(id.name, scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.unused); + } + validator(id, modifiers); + }, + validator: validators.class, + }, + // #endregion enumMember + // #region class + TSEnumDeclaration: { + handler: (node, validator) => { + const modifiers = new Set(); + // enums create their own nested scope + const scope = context.sourceCode.getScope(node).upper; + if (isExported(node, node.id.name, scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.exported); + } + if (isUnused(node.id.name, scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.unused); + } + validator(node.id, modifiers); + }, + validator: validators.enum, + }, + // #endregion class + // #region interface + TSEnumMember: { + handler: (node, validator) => { + const id = node.id; + const modifiers = new Set(); + if (requiresQuoting(id, compilerOptions.target)) { + modifiers.add(naming_convention_utils_1.Modifiers.requiresQuotes); + } + validator(id, modifiers); + }, + validator: validators.enumMember, + }, + // #endregion interface + // #region typeAlias + TSInterfaceDeclaration: { + handler: (node, validator) => { + const modifiers = new Set(); + const scope = context.sourceCode.getScope(node); + if (isExported(node, node.id.name, scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.exported); + } + if (isUnused(node.id.name, scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.unused); + } + validator(node.id, modifiers); + }, + validator: validators.interface, + }, + // #endregion typeAlias + // #region enum + TSTypeAliasDeclaration: { + handler: (node, validator) => { + const modifiers = new Set(); + const scope = context.sourceCode.getScope(node); + if (isExported(node, node.id.name, scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.exported); + } + if (isUnused(node.id.name, scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.unused); + } + validator(node.id, modifiers); + }, + validator: validators.typeAlias, + }, + // #endregion enum + // #region typeParameter + 'TSTypeParameterDeclaration > TSTypeParameter': { + handler: (node, validator) => { + const modifiers = new Set(); + const scope = context.sourceCode.getScope(node); + if (isUnused(node.name.name, scope)) { + modifiers.add(naming_convention_utils_1.Modifiers.unused); + } + validator(node.name, modifiers); + }, + validator: validators.typeParameter, + }, + // #endregion typeParameter + }; + return Object.fromEntries(Object.entries(selectors).map(([selector, { handler, validator }]) => { + return [ + selector, + (node) => { + handler(node, validator); + }, + ]; + })); + }, +}); +function getIdentifiersFromPattern(pattern) { + const identifiers = []; + const visitor = new scope_manager_1.PatternVisitor({}, pattern, id => identifiers.push(id)); + visitor.visit(pattern); + return identifiers; +} +function isExported(node, name, scope) { + if (node?.parent?.type === utils_1.AST_NODE_TYPES.ExportDefaultDeclaration || + node?.parent?.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration) { + return true; + } + if (scope == null) { + return false; + } + const variable = scope.set.get(name); + if (variable) { + for (const ref of variable.references) { + const refParent = ref.identifier.parent; + if (refParent.type === utils_1.AST_NODE_TYPES.ExportDefaultDeclaration || + refParent.type === utils_1.AST_NODE_TYPES.ExportSpecifier) { + return true; + } + } + } + return false; +} +function isGlobal(scope) { + if (scope == null) { + return false; + } + return (scope.type === utils_1.TSESLint.Scope.ScopeType.global || + scope.type === utils_1.TSESLint.Scope.ScopeType.module); +} +function requiresQuoting(node, target) { + const name = node.type === utils_1.AST_NODE_TYPES.Identifier || + node.type === utils_1.AST_NODE_TYPES.PrivateIdentifier + ? node.name + : `${node.value}`; + return (0, util_1.requiresQuoting)(name, target); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.d.ts new file mode 100644 index 0000000..b198ef5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"useLiteral", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-array-constructor.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.d.ts.map new file mode 100644 index 0000000..d2959fb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-array-constructor.d.ts","sourceRoot":"","sources":["../../src/rules/no-array-constructor.ts"],"names":[],"mappings":";AAUA,wBAsEG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js new file mode 100644 index 0000000..eea4ef1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const ast_utils_1 = require("@typescript-eslint/utils/ast-utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-array-constructor', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow generic `Array` constructors', + extendsBaseRule: true, + recommended: 'recommended', + }, + fixable: 'code', + messages: { + useLiteral: 'The array literal notation [] is preferable.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const sourceCode = context.sourceCode; + function getArgumentsText(node) { + const lastToken = sourceCode.getLastToken(node); + if (lastToken == null || !(0, ast_utils_1.isClosingParenToken)(lastToken)) { + return ''; + } + let firstToken = node.callee; + do { + firstToken = sourceCode.getTokenAfter(firstToken); + if (!firstToken || firstToken === lastToken) { + return ''; + } + } while (!(0, ast_utils_1.isOpeningParenToken)(firstToken)); + return sourceCode.text.slice(firstToken.range[1], lastToken.range[0]); + } + /** + * Disallow construction of dense arrays using the Array constructor + * @param node node to evaluate + */ + function check(node) { + if (node.arguments.length !== 1 && + node.callee.type === utils_1.AST_NODE_TYPES.Identifier && + node.callee.name === 'Array' && + !node.typeArguments) { + context.report({ + node, + messageId: 'useLiteral', + fix(fixer) { + const argsText = getArgumentsText(node); + return fixer.replaceText(node, `[${argsText}]`); + }, + }); + } + } + return { + CallExpression: check, + NewExpression: check, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-delete.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-delete.d.ts new file mode 100644 index 0000000..935e12e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-delete.d.ts @@ -0,0 +1,5 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type MessageId = 'noArrayDelete' | 'useSplice'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-array-delete.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-delete.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-delete.d.ts.map new file mode 100644 index 0000000..3ea0b19 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-delete.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-array-delete.d.ts","sourceRoot":"","sources":["../../src/rules/no-array-delete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAWnE,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,WAAW,CAAC;;AAEtD,wBAiGG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-delete.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-delete.js new file mode 100644 index 0000000..689a2ee --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-delete.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-array-delete', + meta: { + type: 'problem', + docs: { + description: 'Disallow using the `delete` operator on array values', + recommended: 'recommended', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + noArrayDelete: 'Using the `delete` operator with an array expression is unsafe.', + useSplice: 'Use `array.splice()` instead.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + function isUnderlyingTypeArray(type) { + const predicate = (t) => checker.isArrayType(t) || checker.isTupleType(t); + if (type.isUnion()) { + return type.types.every(predicate); + } + if (type.isIntersection()) { + return type.types.some(predicate); + } + return predicate(type); + } + return { + 'UnaryExpression[operator="delete"]'(node) { + const { argument } = node; + if (argument.type !== utils_1.AST_NODE_TYPES.MemberExpression) { + return; + } + const type = (0, util_1.getConstrainedTypeAtLocation)(services, argument.object); + if (!isUnderlyingTypeArray(type)) { + return; + } + context.report({ + node, + messageId: 'noArrayDelete', + suggest: [ + { + messageId: 'useSplice', + fix(fixer) { + const { object, property } = argument; + const shouldHaveParentheses = property.type === utils_1.AST_NODE_TYPES.SequenceExpression; + const nodeMap = services.esTreeNodeToTSNodeMap; + const target = nodeMap.get(object).getText(); + const rawKey = nodeMap.get(property).getText(); + const key = shouldHaveParentheses ? `(${rawKey})` : rawKey; + let suggestion = `${target}.splice(${key}, 1)`; + const comments = context.sourceCode.getCommentsInside(node); + if (comments.length > 0) { + const indentationCount = node.loc.start.column; + const indentation = ' '.repeat(indentationCount); + const commentsText = comments + .map(comment => { + return comment.type === utils_1.AST_TOKEN_TYPES.Line + ? `//${comment.value}` + : `/*${comment.value}*/`; + }) + .join(`\n${indentation}`); + suggestion = `${commentsText}\n${indentation}${suggestion}`; + } + return fixer.replaceText(node, suggestion); + }, + }, + ], + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.d.ts new file mode 100644 index 0000000..55e9f60 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.d.ts @@ -0,0 +1,10 @@ +export type Options = [ + { + ignoredTypeNames?: string[]; + checkUnknown?: boolean; + } +]; +export type MessageIds = 'baseArrayJoin' | 'baseToString'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=no-base-to-string.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.d.ts.map new file mode 100644 index 0000000..84b3565 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-base-to-string.d.ts","sourceRoot":"","sources":["../../src/rules/no-base-to-string.ts"],"names":[],"mappings":"AAoBA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,eAAe,GAAG,cAAc,CAAC;;AAS1D,wBA8UG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js new file mode 100644 index 0000000..80d8abf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js @@ -0,0 +1,288 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +var Usefulness; +(function (Usefulness) { + Usefulness["Always"] = "always"; + Usefulness["Never"] = "will"; + Usefulness["Sometimes"] = "may"; +})(Usefulness || (Usefulness = {})); +const canHaveTypeParameters = (declaration) => { + return (ts.isTypeAliasDeclaration(declaration) || + ts.isInterfaceDeclaration(declaration) || + ts.isClassDeclaration(declaration)); +}; +exports.default = (0, util_1.createRule)({ + name: 'no-base-to-string', + meta: { + type: 'suggestion', + docs: { + description: 'Require `.toString()` and `.toLocaleString()` to only be called on objects which provide useful information when stringified', + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + baseArrayJoin: "Using `join()` for {{name}} {{certainty}} use Object's default stringification format ('[object Object]') when stringified.", + baseToString: "'{{name}}' {{certainty}} use Object's default stringification format ('[object Object]') when stringified.", + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + checkUnknown: { + type: 'boolean', + description: 'Whether to also check values of type `unknown`', + }, + ignoredTypeNames: { + type: 'array', + description: 'Stringified regular expressions of type names to ignore.', + items: { + type: 'string', + }, + }, + }, + }, + ], + }, + defaultOptions: [ + { + checkUnknown: false, + ignoredTypeNames: ['Error', 'RegExp', 'URL', 'URLSearchParams'], + }, + ], + create(context, [option]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const ignoredTypeNames = option.ignoredTypeNames ?? []; + function checkExpression(node, type) { + if (node.type === utils_1.AST_NODE_TYPES.Literal) { + return; + } + const certainty = collectToStringCertainty(type ?? services.getTypeAtLocation(node), new Set()); + if (certainty === Usefulness.Always) { + return; + } + context.report({ + node, + messageId: 'baseToString', + data: { + name: context.sourceCode.getText(node), + certainty, + }, + }); + } + function checkExpressionForArrayJoin(node, type) { + const certainty = collectJoinCertainty(type, new Set()); + if (certainty === Usefulness.Always) { + return; + } + context.report({ + node, + messageId: 'baseArrayJoin', + data: { + name: context.sourceCode.getText(node), + certainty, + }, + }); + } + function collectUnionTypeCertainty(type, collectSubTypeCertainty) { + const certainties = type.types.map(t => collectSubTypeCertainty(t)); + if (certainties.every(certainty => certainty === Usefulness.Never)) { + return Usefulness.Never; + } + if (certainties.every(certainty => certainty === Usefulness.Always)) { + return Usefulness.Always; + } + return Usefulness.Sometimes; + } + function collectIntersectionTypeCertainty(type, collectSubTypeCertainty) { + for (const subType of type.types) { + const subtypeUsefulness = collectSubTypeCertainty(subType); + if (subtypeUsefulness === Usefulness.Always) { + return Usefulness.Always; + } + } + return Usefulness.Never; + } + function collectTupleCertainty(type, visited) { + const typeArgs = checker.getTypeArguments(type); + const certainties = typeArgs.map(t => collectToStringCertainty(t, visited)); + if (certainties.some(certainty => certainty === Usefulness.Never)) { + return Usefulness.Never; + } + if (certainties.some(certainty => certainty === Usefulness.Sometimes)) { + return Usefulness.Sometimes; + } + return Usefulness.Always; + } + function collectArrayCertainty(type, visited) { + const elemType = (0, util_1.nullThrows)(type.getNumberIndexType(), 'array should have number index type'); + return collectToStringCertainty(elemType, visited); + } + function collectJoinCertainty(type, visited) { + if (tsutils.isUnionType(type)) { + return collectUnionTypeCertainty(type, t => collectJoinCertainty(t, visited)); + } + if (tsutils.isIntersectionType(type)) { + return collectIntersectionTypeCertainty(type, t => collectJoinCertainty(t, visited)); + } + if (checker.isTupleType(type)) { + return collectTupleCertainty(type, visited); + } + if (checker.isArrayType(type)) { + return collectArrayCertainty(type, visited); + } + return Usefulness.Always; + } + function collectToStringCertainty(type, visited) { + if (visited.has(type)) { + // don't report if this is a self referencing array or tuple type + return Usefulness.Always; + } + if (tsutils.isTypeParameter(type)) { + const constraint = type.getConstraint(); + if (constraint) { + return collectToStringCertainty(constraint, visited); + } + // unconstrained generic means `unknown` + return option.checkUnknown ? Usefulness.Sometimes : Usefulness.Always; + } + // the Boolean type definition missing toString() + if (type.flags & ts.TypeFlags.Boolean || + type.flags & ts.TypeFlags.BooleanLiteral) { + return Usefulness.Always; + } + const symbol = type.aliasSymbol ?? type.getSymbol(); + const decl = symbol?.getDeclarations()?.[0]; + if (decl && + canHaveTypeParameters(decl) && + decl.typeParameters && + ignoredTypeNames.includes(symbol.name)) { + return Usefulness.Always; + } + if (ignoredTypeNames.includes((0, util_1.getTypeName)(checker, type))) { + return Usefulness.Always; + } + if (type.isIntersection()) { + return collectIntersectionTypeCertainty(type, t => collectToStringCertainty(t, visited)); + } + if (type.isUnion()) { + return collectUnionTypeCertainty(type, t => collectToStringCertainty(t, visited)); + } + if (checker.isTupleType(type)) { + return collectTupleCertainty(type, new Set([...visited, type])); + } + if (checker.isArrayType(type)) { + return collectArrayCertainty(type, new Set([...visited, type])); + } + const toString = checker.getPropertyOfType(type, 'toString') ?? + checker.getPropertyOfType(type, 'toLocaleString'); + if (!toString) { + // unknown + if (option.checkUnknown && type.flags === ts.TypeFlags.Unknown) { + return Usefulness.Sometimes; + } + // e.g. any + return Usefulness.Always; + } + const declarations = toString.getDeclarations(); + if (declarations == null || declarations.length !== 1) { + // If there are multiple declarations, at least one of them must not be + // the default object toString. + // + // This may only matter for older versions of TS + // see https://github.com/typescript-eslint/typescript-eslint/issues/8585 + return Usefulness.Always; + } + const declaration = declarations[0]; + const isBaseToString = ts.isInterfaceDeclaration(declaration.parent) && + declaration.parent.name.text === 'Object'; + return isBaseToString ? Usefulness.Never : Usefulness.Always; + } + function isBuiltInStringCall(node) { + if (node.callee.type === utils_1.AST_NODE_TYPES.Identifier && + // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum + node.callee.name === 'String' && + node.arguments[0]) { + const scope = context.sourceCode.getScope(node); + // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum + const variable = scope.set.get('String'); + return !variable?.defs.length; + } + return false; + } + return { + 'AssignmentExpression[operator = "+="], BinaryExpression[operator = "+"]'(node) { + const leftType = services.getTypeAtLocation(node.left); + const rightType = services.getTypeAtLocation(node.right); + if ((0, util_1.getTypeName)(checker, leftType) === 'string') { + checkExpression(node.right, rightType); + } + else if ((0, util_1.getTypeName)(checker, rightType) === 'string' && + node.left.type !== utils_1.AST_NODE_TYPES.PrivateIdentifier) { + checkExpression(node.left, leftType); + } + }, + CallExpression(node) { + if (isBuiltInStringCall(node) && + node.arguments[0].type !== utils_1.AST_NODE_TYPES.SpreadElement) { + checkExpression(node.arguments[0]); + } + }, + 'CallExpression > MemberExpression.callee > Identifier[name = "join"].property'(node) { + const memberExpr = node.parent; + const type = (0, util_1.getConstrainedTypeAtLocation)(services, memberExpr.object); + checkExpressionForArrayJoin(memberExpr.object, type); + }, + 'CallExpression > MemberExpression.callee > Identifier[name = /^(toLocaleString|toString)$/].property'(node) { + const memberExpr = node.parent; + checkExpression(memberExpr.object); + }, + TemplateLiteral(node) { + if (node.parent.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression) { + return; + } + for (const expression of node.expressions) { + checkExpression(expression); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.d.ts new file mode 100644 index 0000000..f911f2e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.d.ts @@ -0,0 +1,5 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type MessageId = 'confusingAssign' | 'confusingEqual' | 'confusingOperator' | 'notNeedInAssign' | 'notNeedInEqualTest' | 'notNeedInOperator' | 'wrapUpLeft'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-confusing-non-null-assertion.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.d.ts.map new file mode 100644 index 0000000..b2fdb4e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-confusing-non-null-assertion.d.ts","sourceRoot":"","sources":["../../src/rules/no-confusing-non-null-assertion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAUnE,MAAM,MAAM,SAAS,GACjB,iBAAiB,GACjB,gBAAgB,GAChB,mBAAmB,GACnB,iBAAiB,GACjB,oBAAoB,GACpB,mBAAmB,GACnB,YAAY,CAAC;;AAgBjB,wBA8IG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.js new file mode 100644 index 0000000..23dbc82 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.js @@ -0,0 +1,142 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const confusingOperators = new Set([ + '=', + '==', + '===', + 'in', + 'instanceof', +]); +function isConfusingOperator(operator) { + return confusingOperators.has(operator); +} +exports.default = (0, util_1.createRule)({ + name: 'no-confusing-non-null-assertion', + meta: { + type: 'problem', + docs: { + description: 'Disallow non-null assertion in locations that may be confusing', + recommended: 'stylistic', + }, + hasSuggestions: true, + messages: { + confusingAssign: 'Confusing combination of non-null assertion and assignment like `a! = b`, which looks very similar to `a != b`.', + confusingEqual: 'Confusing combination of non-null assertion and equality test like `a! == b`, which looks very similar to `a !== b`.', + confusingOperator: 'Confusing combination of non-null assertion and `{{operator}}` operator like `a! {{operator}} b`, which might be misinterpreted as `!(a {{operator}} b)`.', + notNeedInAssign: 'Remove unnecessary non-null assertion (!) in assignment left-hand side.', + notNeedInEqualTest: 'Remove unnecessary non-null assertion (!) in equality test.', + notNeedInOperator: 'Remove possibly unnecessary non-null assertion (!) in the left operand of the `{{operator}}` operator.', + wrapUpLeft: 'Wrap the left-hand side in parentheses to avoid confusion with "{{operator}}" operator.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + function confusingOperatorToMessageData(operator) { + switch (operator) { + case '=': + return { + messageId: 'confusingAssign', + }; + case '==': + case '===': + return { + messageId: 'confusingEqual', + }; + case 'in': + case 'instanceof': + return { + messageId: 'confusingOperator', + data: { operator }, + }; + // istanbul ignore next + default: + operator; + throw new Error(`Unexpected operator ${operator}`); + } + } + return { + 'BinaryExpression, AssignmentExpression'(node) { + const operator = node.operator; + if (isConfusingOperator(operator)) { + // Look for a non-null assertion as the last token on the left hand side. + // That way, we catch things like `1 + two! === 3`, even though the left + // hand side isn't a non-null assertion AST node. + const leftHandFinalToken = context.sourceCode.getLastToken(node.left); + const tokenAfterLeft = context.sourceCode.getTokenAfter(node.left); + if (leftHandFinalToken?.type === utils_1.AST_TOKEN_TYPES.Punctuator && + leftHandFinalToken.value === '!' && + tokenAfterLeft?.value !== ')') { + if (node.left.type === utils_1.AST_NODE_TYPES.TSNonNullExpression) { + let suggestions; + switch (operator) { + case '=': + suggestions = [ + { + messageId: 'notNeedInAssign', + fix: (fixer) => fixer.remove(leftHandFinalToken), + }, + ]; + break; + case '==': + case '===': + suggestions = [ + { + messageId: 'notNeedInEqualTest', + fix: (fixer) => fixer.remove(leftHandFinalToken), + }, + ]; + break; + case 'in': + case 'instanceof': + suggestions = [ + { + messageId: 'notNeedInOperator', + data: { operator }, + fix: (fixer) => fixer.remove(leftHandFinalToken), + }, + { + messageId: 'wrapUpLeft', + data: { operator }, + fix: wrapUpLeftFixer(node), + }, + ]; + break; + // istanbul ignore next + default: + operator; + return; + } + context.report({ + node, + ...confusingOperatorToMessageData(operator), + suggest: suggestions, + }); + } + else { + context.report({ + node, + ...confusingOperatorToMessageData(operator), + suggest: [ + { + messageId: 'wrapUpLeft', + data: { operator }, + fix: wrapUpLeftFixer(node), + }, + ], + }); + } + } + } + }, + }; + }, +}); +function wrapUpLeftFixer(node) { + return (fixer) => [ + fixer.insertTextBefore(node.left, '('), + fixer.insertTextAfter(node.left, ')'), + ]; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.d.ts new file mode 100644 index 0000000..4d4422d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.d.ts @@ -0,0 +1,12 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type Options = [ + { + ignoreArrowShorthand?: boolean; + ignoreVoidOperator?: boolean; + ignoreVoidReturningFunctions?: boolean; + } +]; +export type MessageId = 'invalidVoidExpr' | 'invalidVoidExprArrow' | 'invalidVoidExprArrowWrapVoid' | 'invalidVoidExprReturn' | 'invalidVoidExprReturnLast' | 'invalidVoidExprReturnWrapVoid' | 'invalidVoidExprWrapVoid' | 'voidExprWrapVoid'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-confusing-void-expression.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.d.ts.map new file mode 100644 index 0000000..69421fd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-confusing-void-expression.d.ts","sourceRoot":"","sources":["../../src/rules/no-confusing-void-expression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,QAAQ,EAET,MAAM,0BAA0B,CAAC;AAoBlC,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,4BAA4B,CAAC,EAAE,OAAO,CAAC;KACxC;CACF,CAAC;AAEF,MAAM,MAAM,SAAS,GACjB,iBAAiB,GACjB,sBAAsB,GACtB,8BAA8B,GAC9B,uBAAuB,GACvB,2BAA2B,GAC3B,+BAA+B,GAC/B,yBAAyB,GACzB,kBAAkB,CAAC;;AAEvB,wBAibG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js new file mode 100644 index 0000000..3aabf3a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js @@ -0,0 +1,359 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const getParentFunctionNode_1 = require("../util/getParentFunctionNode"); +exports.default = (0, util_1.createRule)({ + name: 'no-confusing-void-expression', + meta: { + type: 'problem', + docs: { + description: 'Require expressions of type void to appear in statement position', + recommended: 'strict', + requiresTypeChecking: true, + }, + fixable: 'code', + hasSuggestions: true, + messages: { + invalidVoidExpr: 'Placing a void expression inside another expression is forbidden. ' + + 'Move it to its own statement instead.', + invalidVoidExprArrow: 'Returning a void expression from an arrow function shorthand is forbidden. ' + + 'Please add braces to the arrow function.', + invalidVoidExprArrowWrapVoid: 'Void expressions returned from an arrow function shorthand ' + + 'must be marked explicitly with the `void` operator.', + invalidVoidExprReturn: 'Returning a void expression from a function is forbidden. ' + + 'Please move it before the `return` statement.', + invalidVoidExprReturnLast: 'Returning a void expression from a function is forbidden. ' + + 'Please remove the `return` statement.', + invalidVoidExprReturnWrapVoid: 'Void expressions returned from a function ' + + 'must be marked explicitly with the `void` operator.', + invalidVoidExprWrapVoid: 'Void expressions used inside another expression ' + + 'must be moved to its own statement ' + + 'or marked explicitly with the `void` operator.', + voidExprWrapVoid: 'Mark with an explicit `void` operator.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + ignoreArrowShorthand: { + type: 'boolean', + description: 'Whether to ignore "shorthand" `() =>` arrow functions: those without `{ ... }` braces.', + }, + ignoreVoidOperator: { + type: 'boolean', + description: 'Whether to ignore returns that start with the `void` operator.', + }, + ignoreVoidReturningFunctions: { + type: 'boolean', + description: 'Whether to ignore returns from functions with explicit `void` return types and functions with contextual `void` return types.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + ignoreArrowShorthand: false, + ignoreVoidOperator: false, + ignoreVoidReturningFunctions: false, + }, + ], + create(context, [options]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + return { + 'AwaitExpression, CallExpression, TaggedTemplateExpression'(node) { + const type = (0, util_1.getConstrainedTypeAtLocation)(services, node); + if (!tsutils.isTypeFlagSet(type, ts.TypeFlags.VoidLike)) { + // not a void expression + return; + } + const invalidAncestor = findInvalidAncestor(node); + if (invalidAncestor == null) { + // void expression is in valid position + return; + } + const wrapVoidFix = (fixer) => { + const nodeText = context.sourceCode.getText(node); + const newNodeText = `void ${nodeText}`; + return fixer.replaceText(node, newNodeText); + }; + if (invalidAncestor.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression) { + // handle arrow function shorthand + if (options.ignoreVoidReturningFunctions) { + const returnsVoid = isVoidReturningFunctionNode(invalidAncestor); + if (returnsVoid) { + return; + } + } + if (options.ignoreVoidOperator) { + // handle wrapping with `void` + return context.report({ + node, + messageId: 'invalidVoidExprArrowWrapVoid', + fix: wrapVoidFix, + }); + } + // handle wrapping with braces + const arrowFunction = invalidAncestor; + return context.report({ + node, + messageId: 'invalidVoidExprArrow', + fix(fixer) { + if (!canFix(arrowFunction)) { + return null; + } + const arrowBody = arrowFunction.body; + const arrowBodyText = context.sourceCode.getText(arrowBody); + const newArrowBodyText = `{ ${arrowBodyText}; }`; + if ((0, util_1.isParenthesized)(arrowBody, context.sourceCode)) { + const bodyOpeningParen = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(arrowBody, util_1.isOpeningParenToken), util_1.NullThrowsReasons.MissingToken('opening parenthesis', 'arrow body')); + const bodyClosingParen = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(arrowBody, util_1.isClosingParenToken), util_1.NullThrowsReasons.MissingToken('closing parenthesis', 'arrow body')); + return fixer.replaceTextRange([bodyOpeningParen.range[0], bodyClosingParen.range[1]], newArrowBodyText); + } + return fixer.replaceText(arrowBody, newArrowBodyText); + }, + }); + } + if (invalidAncestor.type === utils_1.AST_NODE_TYPES.ReturnStatement) { + // handle return statement + if (options.ignoreVoidReturningFunctions) { + const functionNode = (0, getParentFunctionNode_1.getParentFunctionNode)(invalidAncestor); + if (functionNode) { + const returnsVoid = isVoidReturningFunctionNode(functionNode); + if (returnsVoid) { + return; + } + } + } + if (options.ignoreVoidOperator) { + // handle wrapping with `void` + return context.report({ + node, + messageId: 'invalidVoidExprReturnWrapVoid', + fix: wrapVoidFix, + }); + } + if (isFinalReturn(invalidAncestor)) { + // remove the `return` keyword + return context.report({ + node, + messageId: 'invalidVoidExprReturnLast', + fix(fixer) { + if (!canFix(invalidAncestor)) { + return null; + } + const returnValue = invalidAncestor.argument; + const returnValueText = context.sourceCode.getText(returnValue); + let newReturnStmtText = `${returnValueText};`; + if (isPreventingASI(returnValue)) { + // put a semicolon at the beginning of the line + newReturnStmtText = `;${newReturnStmtText}`; + } + return fixer.replaceText(invalidAncestor, newReturnStmtText); + }, + }); + } + // move before the `return` keyword + return context.report({ + node, + messageId: 'invalidVoidExprReturn', + fix(fixer) { + const returnValue = invalidAncestor.argument; + const returnValueText = context.sourceCode.getText(returnValue); + let newReturnStmtText = `${returnValueText}; return;`; + if (isPreventingASI(returnValue)) { + // put a semicolon at the beginning of the line + newReturnStmtText = `;${newReturnStmtText}`; + } + if (invalidAncestor.parent.type !== utils_1.AST_NODE_TYPES.BlockStatement) { + // e.g. `if (cond) return console.error();` + // add braces if not inside a block + newReturnStmtText = `{ ${newReturnStmtText} }`; + } + return fixer.replaceText(invalidAncestor, newReturnStmtText); + }, + }); + } + // handle generic case + if (options.ignoreVoidOperator) { + // this would be reported by this rule btw. such irony + return context.report({ + node, + messageId: 'invalidVoidExprWrapVoid', + suggest: [{ messageId: 'voidExprWrapVoid', fix: wrapVoidFix }], + }); + } + context.report({ + node, + messageId: 'invalidVoidExpr', + }); + }, + }; + /** + * Inspects the void expression's ancestors and finds closest invalid one. + * By default anything other than an ExpressionStatement is invalid. + * Parent expressions which can be used for their short-circuiting behavior + * are ignored and their parents are checked instead. + * @param node The void expression node to check. + * @returns Invalid ancestor node if it was found. `null` otherwise. + */ + function findInvalidAncestor(node) { + const parent = node.parent; + if (parent.type === utils_1.AST_NODE_TYPES.SequenceExpression && + node !== parent.expressions[parent.expressions.length - 1]) { + return null; + } + if (parent.type === utils_1.AST_NODE_TYPES.ExpressionStatement) { + // e.g. `{ console.log("foo"); }` + // this is always valid + return null; + } + if (parent.type === utils_1.AST_NODE_TYPES.LogicalExpression && + parent.right === node) { + // e.g. `x && console.log(x)` + // this is valid only if the next ancestor is valid + return findInvalidAncestor(parent); + } + if (parent.type === utils_1.AST_NODE_TYPES.ConditionalExpression && + (parent.consequent === node || parent.alternate === node)) { + // e.g. `cond ? console.log(true) : console.log(false)` + // this is valid only if the next ancestor is valid + return findInvalidAncestor(parent); + } + if (parent.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression && + // e.g. `() => console.log("foo")` + // this is valid with an appropriate option + options.ignoreArrowShorthand) { + return null; + } + if (parent.type === utils_1.AST_NODE_TYPES.UnaryExpression && + parent.operator === 'void' && + // e.g. `void console.log("foo")` + // this is valid with an appropriate option + options.ignoreVoidOperator) { + return null; + } + if (parent.type === utils_1.AST_NODE_TYPES.ChainExpression) { + // e.g. `console?.log('foo')` + return findInvalidAncestor(parent); + } + // Any other parent is invalid. + // We can assume a return statement will have an argument. + return parent; + } + /** Checks whether the return statement is the last statement in a function body. */ + function isFinalReturn(node) { + // the parent must be a block + const block = node.parent; + if (block.type !== utils_1.AST_NODE_TYPES.BlockStatement) { + // e.g. `if (cond) return;` (not in a block) + return false; + } + // the block's parent must be a function + const blockParent = block.parent; + if (![ + utils_1.AST_NODE_TYPES.ArrowFunctionExpression, + utils_1.AST_NODE_TYPES.FunctionDeclaration, + utils_1.AST_NODE_TYPES.FunctionExpression, + ].includes(blockParent.type)) { + // e.g. `if (cond) { return; }` + // not in a top-level function block + return false; + } + // must be the last child of the block + if (block.body.indexOf(node) < block.body.length - 1) { + // not the last statement in the block + return false; + } + return true; + } + /** + * Checks whether the given node, if placed on its own line, + * would prevent automatic semicolon insertion on the line before. + * + * This happens if the line begins with `(`, `[` or `` ` `` + */ + function isPreventingASI(node) { + const startToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node), util_1.NullThrowsReasons.MissingToken('first token', node.type)); + return ['(', '[', '`'].includes(startToken.value); + } + function canFix(node) { + const targetNode = node.type === utils_1.AST_NODE_TYPES.ReturnStatement + ? node.argument + : node.body; + const type = (0, util_1.getConstrainedTypeAtLocation)(services, targetNode); + return tsutils.isTypeFlagSet(type, ts.TypeFlags.VoidLike); + } + function isFunctionReturnTypeIncludesVoid(functionType) { + const callSignatures = tsutils.getCallSignaturesOfType(functionType); + return callSignatures.some(signature => { + const returnType = signature.getReturnType(); + return tsutils + .unionConstituents(returnType) + .some(tsutils.isIntrinsicVoidType); + }); + } + function isVoidReturningFunctionNode(functionNode) { + // Game plan: + // - If the function node has a type annotation, check if it includes `void`. + // - If it does then the function is safe to return `void` expressions in. + // - Otherwise, check if the function is a function-expression or an arrow-function. + // - If it is, get its contextual type and bail if we cannot. + // - Return based on whether the contextual type includes `void` or not + const functionTSNode = services.esTreeNodeToTSNodeMap.get(functionNode); + if (functionTSNode.type) { + const returnType = checker.getTypeFromTypeNode(functionTSNode.type); + return tsutils + .unionConstituents(returnType) + .some(tsutils.isIntrinsicVoidType); + } + if (ts.isExpression(functionTSNode)) { + const functionType = checker.getContextualType(functionTSNode); + if (functionType) { + return tsutils + .unionConstituents(functionType) + .some(isFunctionReturnTypeIncludesVoid); + } + } + return false; + } + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.d.ts new file mode 100644 index 0000000..20bc8f9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.d.ts @@ -0,0 +1,10 @@ +import type { TypeOrValueSpecifier } from '../util'; +type MessageIds = 'deprecated' | 'deprecatedWithReason'; +type Options = [ + { + allow?: TypeOrValueSpecifier[]; + } +]; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=no-deprecated.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.d.ts.map new file mode 100644 index 0000000..0489a14 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-deprecated.d.ts","sourceRoot":"","sources":["../../src/rules/no-deprecated.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAiBpD,KAAK,UAAU,GAAG,YAAY,GAAG,sBAAsB,CAAC;AAExD,KAAK,OAAO,GAAG;IACb;QACE,KAAK,CAAC,EAAE,oBAAoB,EAAE,CAAC;KAChC;CACF,CAAC;;AAEF,wBAicG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.js new file mode 100644 index 0000000..fee5968 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.js @@ -0,0 +1,394 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-deprecated', + meta: { + type: 'problem', + docs: { + description: 'Disallow using code marked as `@deprecated`', + recommended: 'strict', + requiresTypeChecking: true, + }, + messages: { + deprecated: `\`{{name}}\` is deprecated.`, + deprecatedWithReason: `\`{{name}}\` is deprecated. {{reason}}`, + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allow: { + ...util_1.typeOrValueSpecifiersSchema, + description: 'Type specifiers that can be allowed.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allow: [], + }, + ], + create(context, [options]) { + const { jsDocParsingMode } = context.parserOptions; + const allow = options.allow; + if (jsDocParsingMode === 'none' || jsDocParsingMode === 'type-info') { + throw new Error(`Cannot be used with jsDocParsingMode: '${jsDocParsingMode}'.`); + } + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + // Deprecated jsdoc tags can be added on some symbol alias, e.g. + // + // export { /** @deprecated */ foo } + // + // When we import foo, its symbol is an alias of the exported foo (the one + // with the deprecated tag), which is itself an alias of the original foo. + // Therefore, we carefully go through the chain of aliases and check each + // immediate alias for deprecated tags + function searchForDeprecationInAliasesChain(symbol, checkDeprecationsOfAliasedSymbol) { + if (!symbol || !tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias)) { + return checkDeprecationsOfAliasedSymbol + ? getJsDocDeprecation(symbol) + : undefined; + } + const targetSymbol = checker.getAliasedSymbol(symbol); + while (tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias)) { + const reason = getJsDocDeprecation(symbol); + if (reason != null) { + return reason; + } + const immediateAliasedSymbol = symbol.getDeclarations() && checker.getImmediateAliasedSymbol(symbol); + if (!immediateAliasedSymbol) { + break; + } + symbol = immediateAliasedSymbol; + if (checkDeprecationsOfAliasedSymbol && symbol === targetSymbol) { + return getJsDocDeprecation(symbol); + } + } + return undefined; + } + function isDeclaration(node) { + const { parent } = node; + switch (parent.type) { + case utils_1.AST_NODE_TYPES.ArrayPattern: + return parent.elements.includes(node); + case utils_1.AST_NODE_TYPES.ClassExpression: + case utils_1.AST_NODE_TYPES.ClassDeclaration: + case utils_1.AST_NODE_TYPES.VariableDeclarator: + case utils_1.AST_NODE_TYPES.TSEnumMember: + return parent.id === node; + case utils_1.AST_NODE_TYPES.MethodDefinition: + case utils_1.AST_NODE_TYPES.PropertyDefinition: + case utils_1.AST_NODE_TYPES.AccessorProperty: + return parent.key === node; + case utils_1.AST_NODE_TYPES.Property: + // foo in "const { foo } = bar" will be processed twice, as parent.key + // and parent.value. The second is treated as a declaration. + if (parent.shorthand && parent.value === node) { + return parent.parent.type === utils_1.AST_NODE_TYPES.ObjectPattern; + } + if (parent.value === node) { + return false; + } + return parent.parent.type === utils_1.AST_NODE_TYPES.ObjectExpression; + case utils_1.AST_NODE_TYPES.AssignmentPattern: + // foo in "const { foo = "" } = bar" will be processed twice, as parent.parent.key + // and parent.left. The second is treated as a declaration. + return parent.left === node; + case utils_1.AST_NODE_TYPES.ArrowFunctionExpression: + case utils_1.AST_NODE_TYPES.FunctionDeclaration: + case utils_1.AST_NODE_TYPES.FunctionExpression: + case utils_1.AST_NODE_TYPES.TSDeclareFunction: + case utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression: + case utils_1.AST_NODE_TYPES.TSEnumDeclaration: + case utils_1.AST_NODE_TYPES.TSInterfaceDeclaration: + case utils_1.AST_NODE_TYPES.TSMethodSignature: + case utils_1.AST_NODE_TYPES.TSModuleDeclaration: + case utils_1.AST_NODE_TYPES.TSParameterProperty: + case utils_1.AST_NODE_TYPES.TSPropertySignature: + case utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration: + case utils_1.AST_NODE_TYPES.TSTypeParameter: + return true; + default: + return false; + } + } + function isInsideImport(node) { + let current = node; + while (true) { + switch (current.type) { + case utils_1.AST_NODE_TYPES.ImportDeclaration: + return true; + case utils_1.AST_NODE_TYPES.ArrowFunctionExpression: + case utils_1.AST_NODE_TYPES.ExportAllDeclaration: + case utils_1.AST_NODE_TYPES.ExportNamedDeclaration: + case utils_1.AST_NODE_TYPES.BlockStatement: + case utils_1.AST_NODE_TYPES.ClassDeclaration: + case utils_1.AST_NODE_TYPES.TSInterfaceDeclaration: + case utils_1.AST_NODE_TYPES.FunctionDeclaration: + case utils_1.AST_NODE_TYPES.FunctionExpression: + case utils_1.AST_NODE_TYPES.Program: + case utils_1.AST_NODE_TYPES.TSUnionType: + case utils_1.AST_NODE_TYPES.VariableDeclarator: + return false; + default: + current = current.parent; + } + } + } + function getJsDocDeprecation(symbol) { + let jsDocTags; + try { + jsDocTags = symbol?.getJsDocTags(checker); + } + catch { + // workaround for https://github.com/microsoft/TypeScript/issues/60024 + return; + } + const tag = jsDocTags?.find(tag => tag.name === 'deprecated'); + if (!tag) { + return undefined; + } + const displayParts = tag.text; + return displayParts ? ts.displayPartsToString(displayParts) : ''; + } + function isNodeCalleeOfParent(node) { + switch (node.parent?.type) { + case utils_1.AST_NODE_TYPES.NewExpression: + case utils_1.AST_NODE_TYPES.CallExpression: + return node.parent.callee === node; + case utils_1.AST_NODE_TYPES.TaggedTemplateExpression: + return node.parent.tag === node; + case utils_1.AST_NODE_TYPES.JSXOpeningElement: + return node.parent.name === node; + default: + return false; + } + } + function getCallLikeNode(node) { + let callee = node; + while (callee.parent?.type === utils_1.AST_NODE_TYPES.MemberExpression && + callee.parent.property === callee) { + callee = callee.parent; + } + return isNodeCalleeOfParent(callee) ? callee : undefined; + } + function getCallLikeDeprecation(node) { + const tsNode = services.esTreeNodeToTSNodeMap.get(node.parent); + // If the node is a direct function call, we look for its signature. + const signature = (0, util_1.nullThrows)(checker.getResolvedSignature(tsNode), 'Expected call like node to have signature'); + const symbol = services.getSymbolAtLocation(node); + const aliasedSymbol = symbol != null && tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias) + ? checker.getAliasedSymbol(symbol) + : symbol; + const symbolDeclarationKind = aliasedSymbol?.declarations?.[0].kind; + // Properties with function-like types have "deprecated" jsdoc + // on their symbols, not on their signatures: + // + // interface Props { + // /** @deprecated */ + // property: () => 'foo' + // ^symbol^ ^signature^ + // } + if (symbolDeclarationKind !== ts.SyntaxKind.MethodDeclaration && + symbolDeclarationKind !== ts.SyntaxKind.FunctionDeclaration && + symbolDeclarationKind !== ts.SyntaxKind.MethodSignature) { + return (searchForDeprecationInAliasesChain(symbol, true) ?? + getJsDocDeprecation(signature) ?? + getJsDocDeprecation(aliasedSymbol)); + } + return (searchForDeprecationInAliasesChain(symbol, + // Here we're working with a function declaration or method. + // Both can have 1 or more overloads, each overload creates one + // ts.Declaration which is placed in symbol.declarations. + // + // Imagine the following code: + // + // function foo(): void + // /** @deprecated Some Reason */ + // function foo(arg: string): void + // function foo(arg?: string): void {} + // + // foo() // <- foo is our symbol + // + // If we call getJsDocDeprecation(checker.getAliasedSymbol(symbol)), + // we get 'Some Reason', but after all, we are calling foo with + // a signature that is not deprecated! + // It works this way because symbol.getJsDocTags returns tags from + // all symbol declarations combined into one array. And AFAIK there is + // no publicly exported TS function that can tell us if a particular + // declaration is deprecated or not. + // + // So, in case of function and method declarations, we don't check original + // aliased symbol, but rely on the getJsDocDeprecation(signature) call below. + false) ?? getJsDocDeprecation(signature)); + } + function getJSXAttributeDeprecation(openingElement, propertyName) { + const tsNode = services.esTreeNodeToTSNodeMap.get(openingElement.name); + const contextualType = (0, util_1.nullThrows)(checker.getContextualType(tsNode), 'Expected JSX opening element name to have contextualType'); + const symbol = contextualType.getProperty(propertyName); + return getJsDocDeprecation(symbol); + } + function getDeprecationReason(node) { + const callLikeNode = getCallLikeNode(node); + if (callLikeNode) { + return getCallLikeDeprecation(callLikeNode); + } + if (node.parent.type === utils_1.AST_NODE_TYPES.JSXAttribute && + node.type !== utils_1.AST_NODE_TYPES.Super) { + return getJSXAttributeDeprecation(node.parent.parent, node.name); + } + if (node.parent.type === utils_1.AST_NODE_TYPES.Property && + node.type !== utils_1.AST_NODE_TYPES.Super) { + const property = services + .getTypeAtLocation(node.parent.parent) + .getProperty(node.name); + const propertySymbol = services.getSymbolAtLocation(node); + const valueSymbol = checker.getShorthandAssignmentValueSymbol(propertySymbol?.valueDeclaration); + return (searchForDeprecationInAliasesChain(propertySymbol, true) ?? + getJsDocDeprecation(property) ?? + getJsDocDeprecation(propertySymbol) ?? + getJsDocDeprecation(valueSymbol)); + } + return searchForDeprecationInAliasesChain(services.getSymbolAtLocation(node), true); + } + function checkIdentifier(node) { + if (isDeclaration(node) || isInsideImport(node)) { + return; + } + const reason = getDeprecationReason(node); + if (reason == null) { + return; + } + const type = services.getTypeAtLocation(node); + if ((0, util_1.typeMatchesSomeSpecifier)(type, allow, services.program) || + (0, util_1.valueMatchesSomeSpecifier)(node, allow, services.program, type)) { + return; + } + const name = getReportedNodeName(node); + context.report({ + ...(reason + ? { + messageId: 'deprecatedWithReason', + data: { name, reason }, + } + : { + messageId: 'deprecated', + data: { name }, + }), + node, + }); + } + function checkMemberExpression(node) { + if (!node.computed) { + return; + } + const propertyType = services.getTypeAtLocation(node.property); + if (propertyType.isLiteral()) { + const objectType = services.getTypeAtLocation(node.object); + const propertyName = propertyType.isStringLiteral() + ? propertyType.value + : String(propertyType.value); + const property = objectType.getProperty(propertyName); + const reason = getJsDocDeprecation(property); + if (reason == null) { + return; + } + if ((0, util_1.typeMatchesSomeSpecifier)(objectType, allow, services.program)) { + return; + } + context.report({ + ...(reason + ? { + messageId: 'deprecatedWithReason', + data: { name: propertyName, reason }, + } + : { + messageId: 'deprecated', + data: { name: propertyName }, + }), + node: node.property, + }); + } + } + return { + Identifier(node) { + const { parent } = node; + if (parent.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration || + parent.type === utils_1.AST_NODE_TYPES.ExportAllDeclaration) { + return; + } + if (parent.type === utils_1.AST_NODE_TYPES.ExportSpecifier) { + // only deal with the alias (exported) side, not the local binding + if (parent.exported !== node) { + return; + } + const symbol = services.getSymbolAtLocation(node); + const aliasDeprecation = getJsDocDeprecation(symbol); + if (aliasDeprecation != null) { + return; + } + } + // whether it's a plain identifier or the exported alias + checkIdentifier(node); + }, + JSXIdentifier(node) { + if (node.parent.type !== utils_1.AST_NODE_TYPES.JSXClosingElement) { + checkIdentifier(node); + } + }, + MemberExpression: checkMemberExpression, + PrivateIdentifier: checkIdentifier, + Super: checkIdentifier, + }; + }, +}); +function getReportedNodeName(node) { + if (node.type === utils_1.AST_NODE_TYPES.Super) { + return 'super'; + } + if (node.type === utils_1.AST_NODE_TYPES.PrivateIdentifier) { + return `#${node.name}`; + } + return node.name; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.d.ts new file mode 100644 index 0000000..57d1572 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.d.ts @@ -0,0 +1,13 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpected", [], unknown, { + 'ClassBody:exit'(): void; + 'MethodDefinition, PropertyDefinition'(node: TSESTree.MethodDefinition | TSESTree.PropertyDefinition): void; + ClassBody(): void; + Program(): void; +}>; +export type Options = InferOptionsTypeFromRule; +export type MessageIds = InferMessageIdsTypeFromRule; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpected", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-dupe-class-members.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.d.ts.map new file mode 100644 index 0000000..4531567 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-dupe-class-members.d.ts","sourceRoot":"","sources":["../../src/rules/no-dupe-class-members.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAKjB,QAAA,MAAM,QAAQ;;;;;EAA6C,CAAC;AAE5D,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC,OAAO,QAAQ,CAAC,CAAC;;AAEtE,wBA2CG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.js new file mode 100644 index 0000000..d4afd29 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-dupe-class-members'); +exports.default = (0, util_1.createRule)({ + name: 'no-dupe-class-members', + meta: { + type: 'problem', + // defaultOptions, -- base rule does not use defaultOptions + docs: { + description: 'Disallow duplicate class members', + extendsBaseRule: true, + }, + hasSuggestions: baseRule.meta.hasSuggestions, + messages: baseRule.meta.messages, + schema: baseRule.meta.schema, + }, + defaultOptions: [], + create(context) { + const rules = baseRule.create(context); + function wrapMemberDefinitionListener(coreListener) { + return (node) => { + if (node.computed) { + return; + } + if (node.value && + node.value.type === utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression) { + return; + } + return coreListener(node); + }; + } + return { + ...rules, + 'MethodDefinition, PropertyDefinition': wrapMemberDefinitionListener(rules['MethodDefinition, PropertyDefinition']), + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.d.ts new file mode 100644 index 0000000..db5c022 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"duplicateValue", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-duplicate-enum-values.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.d.ts.map new file mode 100644 index 0000000..3979c1f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-duplicate-enum-values.d.ts","sourceRoot":"","sources":["../../src/rules/no-duplicate-enum-values.ts"],"names":[],"mappings":";AAMA,wBAgFG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js new file mode 100644 index 0000000..c7acc4b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js @@ -0,0 +1,69 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-duplicate-enum-values', + meta: { + type: 'problem', + docs: { + description: 'Disallow duplicate enum member values', + recommended: 'recommended', + }, + hasSuggestions: false, + messages: { + duplicateValue: 'Duplicate enum member value {{value}}.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + function isStringLiteral(node) { + return (node.type === utils_1.AST_NODE_TYPES.Literal && typeof node.value === 'string'); + } + function isNumberLiteral(node) { + return (node.type === utils_1.AST_NODE_TYPES.Literal && typeof node.value === 'number'); + } + function isStaticTemplateLiteral(node) { + return (node.type === utils_1.AST_NODE_TYPES.TemplateLiteral && + node.expressions.length === 0 && + node.quasis.length === 1); + } + return { + TSEnumDeclaration(node) { + const enumMembers = node.body.members; + const seenValues = new Set(); + enumMembers.forEach(member => { + if (member.initializer == null) { + return; + } + let value; + if (isStringLiteral(member.initializer)) { + value = member.initializer.value; + } + else if (isNumberLiteral(member.initializer)) { + value = member.initializer.value; + } + else if (isStaticTemplateLiteral(member.initializer)) { + value = member.initializer.quasis[0].value.cooked; + } + if (value == null) { + return; + } + if (seenValues.has(value)) { + context.report({ + node: member, + messageId: 'duplicateValue', + data: { + value, + }, + }); + } + else { + seenValues.add(value); + } + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.d.ts new file mode 100644 index 0000000..4f08cad --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.d.ts @@ -0,0 +1,10 @@ +export type Options = [ + { + ignoreIntersections?: boolean; + ignoreUnions?: boolean; + } +]; +export type MessageIds = 'duplicate' | 'unnecessary'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=no-duplicate-type-constituents.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.d.ts.map new file mode 100644 index 0000000..779d326 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-duplicate-type-constituents.d.ts","sourceRoot":"","sources":["../../src/rules/no-duplicate-type-constituents.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB;CACF,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,aAAa,CAAC;;AAwDrD,wBA4NG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.js new file mode 100644 index 0000000..e2a311f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.js @@ -0,0 +1,219 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const astIgnoreKeys = new Set(['loc', 'parent', 'range']); +const isSameAstNode = (actualNode, expectedNode) => { + if (actualNode === expectedNode) { + return true; + } + if (actualNode && + expectedNode && + typeof actualNode === 'object' && + typeof expectedNode === 'object') { + if (Array.isArray(actualNode) && Array.isArray(expectedNode)) { + if (actualNode.length !== expectedNode.length) { + return false; + } + return !actualNode.some((nodeEle, index) => !isSameAstNode(nodeEle, expectedNode[index])); + } + const actualNodeKeys = Object.keys(actualNode).filter(key => !astIgnoreKeys.has(key)); + const expectedNodeKeys = Object.keys(expectedNode).filter(key => !astIgnoreKeys.has(key)); + if (actualNodeKeys.length !== expectedNodeKeys.length) { + return false; + } + if (actualNodeKeys.some(actualNodeKey => !Object.hasOwn(expectedNode, actualNodeKey))) { + return false; + } + if (actualNodeKeys.some(actualNodeKey => !isSameAstNode(actualNode[actualNodeKey], expectedNode[actualNodeKey]))) { + return false; + } + return true; + } + return false; +}; +exports.default = (0, util_1.createRule)({ + name: 'no-duplicate-type-constituents', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow duplicate constituents of union or intersection types', + recommended: 'recommended', + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + duplicate: '{{type}} type constituent is duplicated with {{previous}}.', + unnecessary: 'Explicit undefined is unnecessary on an optional parameter.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + ignoreIntersections: { + type: 'boolean', + description: 'Whether to ignore `&` intersections.', + }, + ignoreUnions: { + type: 'boolean', + description: 'Whether to ignore `|` unions.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + ignoreIntersections: false, + ignoreUnions: false, + }, + ], + create(context, [{ ignoreIntersections, ignoreUnions }]) { + const parserServices = (0, util_1.getParserServices)(context); + const { sourceCode } = context; + function report(messageId, constituentNode, data) { + const getUnionOrIntersectionToken = (where, at) => sourceCode[`getTokens${where}`](constituentNode, { + filter: token => ['&', '|'].includes(token.value) && + constituentNode.parent.range[0] <= token.range[0] && + token.range[1] <= constituentNode.parent.range[1], + }).at(at); + const beforeUnionOrIntersectionToken = getUnionOrIntersectionToken('Before', -1); + let afterUnionOrIntersectionToken; + let bracketBeforeTokens; + let bracketAfterTokens; + if (beforeUnionOrIntersectionToken) { + bracketBeforeTokens = sourceCode.getTokensBetween(beforeUnionOrIntersectionToken, constituentNode); + bracketAfterTokens = sourceCode.getTokensAfter(constituentNode, { + count: bracketBeforeTokens.length, + }); + } + else { + afterUnionOrIntersectionToken = (0, util_1.nullThrows)(getUnionOrIntersectionToken('After', 0), util_1.NullThrowsReasons.MissingToken('union or intersection token', 'duplicate type constituent')); + bracketAfterTokens = sourceCode.getTokensBetween(constituentNode, afterUnionOrIntersectionToken); + bracketBeforeTokens = sourceCode.getTokensBefore(constituentNode, { + count: bracketAfterTokens.length, + }); + } + context.report({ + loc: { + start: constituentNode.loc.start, + end: (bracketAfterTokens.at(-1) ?? constituentNode).loc.end, + }, + node: constituentNode, + messageId, + data, + fix: fixer => [ + beforeUnionOrIntersectionToken, + ...bracketBeforeTokens, + constituentNode, + ...bracketAfterTokens, + afterUnionOrIntersectionToken, + ].flatMap(token => (token ? fixer.remove(token) : [])), + }); + } + function checkDuplicateRecursively(unionOrIntersection, constituentNode, uniqueConstituents, cachedTypeMap, forEachNodeType) { + const type = parserServices.getTypeAtLocation(constituentNode); + if (tsutils.isIntrinsicErrorType(type)) { + return; + } + const duplicatedPrevious = uniqueConstituents.find(ele => isSameAstNode(ele, constituentNode)) ?? + cachedTypeMap.get(type); + if (duplicatedPrevious) { + report('duplicate', constituentNode, { + type: unionOrIntersection, + previous: sourceCode.getText(duplicatedPrevious), + }); + return; + } + forEachNodeType?.(type, constituentNode); + cachedTypeMap.set(type, constituentNode); + uniqueConstituents.push(constituentNode); + if ((unionOrIntersection === 'Union' && + constituentNode.type === utils_1.AST_NODE_TYPES.TSUnionType) || + (unionOrIntersection === 'Intersection' && + constituentNode.type === utils_1.AST_NODE_TYPES.TSIntersectionType)) { + for (const constituent of constituentNode.types) { + checkDuplicateRecursively(unionOrIntersection, constituent, uniqueConstituents, cachedTypeMap, forEachNodeType); + } + } + } + function checkDuplicate(node, forEachNodeType) { + const cachedTypeMap = new Map(); + const uniqueConstituents = []; + const unionOrIntersection = node.type === utils_1.AST_NODE_TYPES.TSIntersectionType + ? 'Intersection' + : 'Union'; + for (const type of node.types) { + checkDuplicateRecursively(unionOrIntersection, type, uniqueConstituents, cachedTypeMap, forEachNodeType); + } + } + return { + ...(!ignoreIntersections && { + TSIntersectionType(node) { + if (node.parent.type === utils_1.AST_NODE_TYPES.TSIntersectionType) { + return; + } + checkDuplicate(node); + }, + }), + ...(!ignoreUnions && { + TSUnionType: (node) => { + if (node.parent.type === utils_1.AST_NODE_TYPES.TSUnionType) { + return; + } + checkDuplicate(node, (constituentNodeType, constituentNode) => { + const maybeTypeAnnotation = node.parent; + if (maybeTypeAnnotation.type === utils_1.AST_NODE_TYPES.TSTypeAnnotation) { + const maybeIdentifier = maybeTypeAnnotation.parent; + if (maybeIdentifier.type === utils_1.AST_NODE_TYPES.Identifier && + maybeIdentifier.optional) { + const maybeFunction = maybeIdentifier.parent; + if ((0, util_1.isFunctionOrFunctionType)(maybeFunction) && + maybeFunction.params.includes(maybeIdentifier) && + tsutils.isTypeFlagSet(constituentNodeType, ts.TypeFlags.Undefined)) { + report('unnecessary', constituentNode); + } + } + } + }); + }, + }), + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.d.ts new file mode 100644 index 0000000..71743b5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.d.ts @@ -0,0 +1,4 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule<"dynamicDelete", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=no-dynamic-delete.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.d.ts.map new file mode 100644 index 0000000..eb07d0b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-dynamic-delete.d.ts","sourceRoot":"","sources":["../../src/rules/no-dynamic-delete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;;AAMnE,wBAwEG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js new file mode 100644 index 0000000..9573cdd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js @@ -0,0 +1,60 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-dynamic-delete', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow using the `delete` operator on computed key expressions', + recommended: 'strict', + }, + fixable: 'code', + messages: { + dynamicDelete: 'Do not delete dynamically computed property keys.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + function createFixer(member) { + if (member.property.type === utils_1.AST_NODE_TYPES.Literal && + typeof member.property.value === 'string') { + return createPropertyReplacement(member.property, `.${member.property.value}`); + } + return undefined; + } + return { + 'UnaryExpression[operator=delete]'(node) { + if (node.argument.type !== utils_1.AST_NODE_TYPES.MemberExpression || + !node.argument.computed || + isAcceptableIndexExpression(node.argument.property)) { + return; + } + context.report({ + node: node.argument.property, + messageId: 'dynamicDelete', + fix: createFixer(node.argument), + }); + }, + }; + function createPropertyReplacement(property, replacement) { + return (fixer) => fixer.replaceTextRange(getTokenRange(property), replacement); + } + function getTokenRange(property) { + return [ + (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(property), util_1.NullThrowsReasons.MissingToken('token before', 'property')).range[0], + (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(property), util_1.NullThrowsReasons.MissingToken('token after', 'property')).range[1], + ]; + } + }, +}); +function isAcceptableIndexExpression(property) { + return ((property.type === utils_1.AST_NODE_TYPES.Literal && + ['number', 'string'].includes(typeof property.value)) || + (property.type === utils_1.AST_NODE_TYPES.UnaryExpression && + property.operator === '-' && + property.argument.type === utils_1.AST_NODE_TYPES.Literal && + typeof property.argument.value === 'number')); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.d.ts new file mode 100644 index 0000000..90f695a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.d.ts @@ -0,0 +1,15 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpected" | "suggestComment", [{ + allow?: string[]; +}], unknown, { + FunctionDeclaration(node: TSESTree.FunctionDeclaration): void; + FunctionExpression(node: TSESTree.FunctionExpression): void; +}>; +export type Options = InferOptionsTypeFromRule; +export type MessageIds = InferMessageIdsTypeFromRule; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpected" | "suggestComment", [{ + allow?: string[]; +}], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-empty-function.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.d.ts.map new file mode 100644 index 0000000..f0c1f96 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-empty-function.d.ts","sourceRoot":"","sources":["../../src/rules/no-empty-function.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAKzD,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAKjB,QAAA,MAAM,QAAQ;;;;;EAAyC,CAAC;AAExD,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC,OAAO,QAAQ,CAAC,CAAC;;;;AA0CtE,wBA6HG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js new file mode 100644 index 0000000..b89d2de --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js @@ -0,0 +1,134 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-empty-function'); +const defaultOptions = [ + { + allow: [], + }, +]; +const schema = (0, util_1.deepMerge)( +// eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- https://github.com/microsoft/TypeScript/issues/17002 +Array.isArray(baseRule.meta.schema) + ? baseRule.meta.schema[0] + : baseRule.meta.schema, { + properties: { + allow: { + description: 'Locations and kinds of functions that are allowed to be empty.', + items: { + type: 'string', + enum: [ + 'functions', + 'arrowFunctions', + 'generatorFunctions', + 'methods', + 'generatorMethods', + 'getters', + 'setters', + 'constructors', + 'private-constructors', + 'protected-constructors', + 'asyncFunctions', + 'asyncMethods', + 'decoratedFunctions', + 'overrideMethods', + ], + }, + }, + }, +}); +exports.default = (0, util_1.createRule)({ + name: 'no-empty-function', + meta: { + type: 'suggestion', + defaultOptions, + docs: { + description: 'Disallow empty functions', + extendsBaseRule: true, + recommended: 'stylistic', + }, + hasSuggestions: baseRule.meta.hasSuggestions, + messages: baseRule.meta.messages, + schema: [schema], + }, + defaultOptions, + create(context, [{ allow = [] }]) { + const rules = baseRule.create(context); + const isAllowedProtectedConstructors = allow.includes('protected-constructors'); + const isAllowedPrivateConstructors = allow.includes('private-constructors'); + const isAllowedDecoratedFunctions = allow.includes('decoratedFunctions'); + const isAllowedOverrideMethods = allow.includes('overrideMethods'); + /** + * Check if the method body is empty + * @param node the node to be validated + * @returns true if the body is empty + * @private + */ + function isBodyEmpty(node) { + return node.body.body.length === 0; + } + /** + * Check if method has parameter properties + * @param node the node to be validated + * @returns true if the body has parameter properties + * @private + */ + function hasParameterProperties(node) { + return node.params.some(param => param.type === utils_1.AST_NODE_TYPES.TSParameterProperty); + } + /** + * @param node the node to be validated + * @returns true if the constructor is allowed to be empty + * @private + */ + function isAllowedEmptyConstructor(node) { + const parent = node.parent; + if (isBodyEmpty(node) && + parent.type === utils_1.AST_NODE_TYPES.MethodDefinition && + parent.kind === 'constructor') { + const { accessibility } = parent; + return ( + // allow protected constructors + (accessibility === 'protected' && isAllowedProtectedConstructors) || + // allow private constructors + (accessibility === 'private' && isAllowedPrivateConstructors) || + // allow constructors which have parameter properties + hasParameterProperties(node)); + } + return false; + } + /** + * @param node the node to be validated + * @returns true if a function has decorators + * @private + */ + function isAllowedEmptyDecoratedFunctions(node) { + if (isAllowedDecoratedFunctions && isBodyEmpty(node)) { + const decorators = node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition + ? node.parent.decorators + : undefined; + return !!decorators && !!decorators.length; + } + return false; + } + function isAllowedEmptyOverrideMethod(node) { + return (isAllowedOverrideMethods && + isBodyEmpty(node) && + node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition && + node.parent.override); + } + return { + ...rules, + FunctionExpression(node) { + if (isAllowedEmptyConstructor(node) || + isAllowedEmptyDecoratedFunctions(node) || + isAllowedEmptyOverrideMethod(node)) { + return; + } + rules.FunctionExpression(node); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.d.ts new file mode 100644 index 0000000..4ed9c4f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.d.ts @@ -0,0 +1,10 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type Options = [ + { + allowSingleExtends?: boolean; + } +]; +export type MessageIds = 'noEmpty' | 'noEmptyWithSuper'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-empty-interface.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.d.ts.map new file mode 100644 index 0000000..5a9231f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-empty-interface.d.ts","sourceRoot":"","sources":["../../src/rules/no-empty-interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAOzD,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,kBAAkB,CAAC;;AAExD,wBAkHG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js new file mode 100644 index 0000000..4f5b405 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js @@ -0,0 +1,102 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const scope_manager_1 = require("@typescript-eslint/scope-manager"); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-empty-interface', + meta: { + type: 'suggestion', + deprecated: { + deprecatedSince: '8.0.0', + replacedBy: [ + { + rule: { + name: '@typescript-eslint/no-empty-object-type', + url: 'https://typescript-eslint.io/rules/no-empty-object-type', + }, + }, + ], + url: 'https://github.com/typescript-eslint/typescript-eslint/pull/8977', + }, + docs: { + description: 'Disallow the declaration of empty interfaces', + }, + fixable: 'code', + hasSuggestions: true, + messages: { + noEmpty: 'An empty interface is equivalent to `{}`.', + noEmptyWithSuper: 'An interface declaring no members is equivalent to its supertype.', + }, + replacedBy: ['@typescript-eslint/no-empty-object-type'], + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowSingleExtends: { + type: 'boolean', + description: 'Whether to allow empty interfaces that extend a single other interface.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowSingleExtends: false, + }, + ], + create(context, [{ allowSingleExtends }]) { + return { + TSInterfaceDeclaration(node) { + if (node.body.body.length !== 0) { + // interface contains members --> Nothing to report + return; + } + const extend = node.extends; + if (extend.length === 0) { + context.report({ + node: node.id, + messageId: 'noEmpty', + }); + } + else if (extend.length === 1 && + // interface extends exactly 1 interface --> Report depending on rule setting + !allowSingleExtends) { + const fix = (fixer) => { + let typeParam = ''; + if (node.typeParameters) { + typeParam = context.sourceCode.getText(node.typeParameters); + } + return fixer.replaceText(node, `type ${context.sourceCode.getText(node.id)}${typeParam} = ${context.sourceCode.getText(extend[0])}`); + }; + const scope = context.sourceCode.getScope(node); + const mergedWithClassDeclaration = scope.set + .get(node.id.name) + ?.defs.some(def => def.node.type === utils_1.AST_NODE_TYPES.ClassDeclaration); + const isInAmbientDeclaration = (0, util_1.isDefinitionFile)(context.filename) && + scope.type === scope_manager_1.ScopeType.tsModule && + scope.block.declare; + const useAutoFix = !(isInAmbientDeclaration || mergedWithClassDeclaration); + context.report({ + node: node.id, + messageId: 'noEmptyWithSuper', + ...(useAutoFix + ? { fix } + : !mergedWithClassDeclaration + ? { + suggest: [ + { + messageId: 'noEmptyWithSuper', + fix, + }, + ], + } + : null), + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-object-type.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-object-type.d.ts new file mode 100644 index 0000000..1296510 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-object-type.d.ts @@ -0,0 +1,14 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type AllowInterfaces = 'always' | 'never' | 'with-single-extends'; +export type AllowObjectTypes = 'always' | 'never'; +export type Options = [ + { + allowInterfaces?: AllowInterfaces; + allowObjectTypes?: AllowObjectTypes; + allowWithName?: string; + } +]; +export type MessageIds = 'noEmptyInterface' | 'noEmptyInterfaceWithSuper' | 'noEmptyObject' | 'replaceEmptyInterface' | 'replaceEmptyInterfaceWithSuper' | 'replaceEmptyObjectType'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-empty-object-type.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-object-type.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-object-type.d.ts.map new file mode 100644 index 0000000..00c1d35 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-object-type.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-empty-object-type.d.ts","sourceRoot":"","sources":["../../src/rules/no-empty-object-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAMzD,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,GAAG,qBAAqB,CAAC;AAEzE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElD,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;QACpC,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB;CACF,CAAC;AAEF,MAAM,MAAM,UAAU,GAClB,kBAAkB,GAClB,2BAA2B,GAC3B,eAAe,GACf,uBAAuB,GACvB,gCAAgC,GAChC,wBAAwB,CAAC;;AAU7B,wBA6JG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-object-type.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-object-type.js new file mode 100644 index 0000000..44fce6e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-object-type.js @@ -0,0 +1,143 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const noEmptyMessage = (emptyType) => [ + `${emptyType} 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 '{{ option }}' 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.', +].join('\n'); +exports.default = (0, util_1.createRule)({ + name: 'no-empty-object-type', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow accidentally using the "empty object" type', + recommended: 'recommended', + }, + hasSuggestions: true, + messages: { + noEmptyInterface: noEmptyMessage('An empty interface declaration'), + noEmptyInterfaceWithSuper: 'An interface declaring no members is equivalent to its supertype.', + noEmptyObject: noEmptyMessage('The `{}` ("empty object") type'), + replaceEmptyInterface: 'Replace empty interface with `{{replacement}}`.', + replaceEmptyInterfaceWithSuper: 'Replace empty interface with a type alias.', + replaceEmptyObjectType: 'Replace `{}` with `{{replacement}}`.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowInterfaces: { + type: 'string', + description: 'Whether to allow empty interfaces.', + enum: ['always', 'never', 'with-single-extends'], + }, + allowObjectTypes: { + type: 'string', + description: 'Whether to allow empty object type literals.', + enum: ['always', 'never'], + }, + allowWithName: { + type: 'string', + description: 'A stringified regular expression to allow interfaces and object type aliases with the configured name.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowInterfaces: 'never', + allowObjectTypes: 'never', + }, + ], + create(context, [{ allowInterfaces, allowObjectTypes, allowWithName }]) { + const allowWithNameTester = allowWithName + ? new RegExp(allowWithName, 'u') + : undefined; + return { + ...(allowInterfaces !== 'always' && { + TSInterfaceDeclaration(node) { + if (allowWithNameTester?.test(node.id.name)) { + return; + } + const extend = node.extends; + if (node.body.body.length !== 0 || + (extend.length === 1 && + allowInterfaces === 'with-single-extends') || + extend.length > 1) { + return; + } + const scope = context.sourceCode.getScope(node); + const mergedWithClassDeclaration = scope.set + .get(node.id.name) + ?.defs.some(def => def.node.type === utils_1.AST_NODE_TYPES.ClassDeclaration); + if (extend.length === 0) { + context.report({ + node: node.id, + messageId: 'noEmptyInterface', + data: { option: 'allowInterfaces' }, + ...(!mergedWithClassDeclaration && { + suggest: ['object', 'unknown'].map(replacement => ({ + messageId: 'replaceEmptyInterface', + data: { replacement }, + fix(fixer) { + const id = context.sourceCode.getText(node.id); + const typeParam = node.typeParameters + ? context.sourceCode.getText(node.typeParameters) + : ''; + return fixer.replaceText(node, `type ${id}${typeParam} = ${replacement}`); + }, + })), + }), + }); + return; + } + context.report({ + node: node.id, + messageId: 'noEmptyInterfaceWithSuper', + ...(!mergedWithClassDeclaration && { + suggest: [ + { + messageId: 'replaceEmptyInterfaceWithSuper', + fix(fixer) { + const extended = context.sourceCode.getText(extend[0]); + const id = context.sourceCode.getText(node.id); + const typeParam = node.typeParameters + ? context.sourceCode.getText(node.typeParameters) + : ''; + return fixer.replaceText(node, `type ${id}${typeParam} = ${extended}`); + }, + }, + ], + }), + }); + }, + }), + ...(allowObjectTypes !== 'always' && { + TSTypeLiteral(node) { + if (node.members.length || + node.parent.type === utils_1.AST_NODE_TYPES.TSIntersectionType || + (allowWithNameTester && + node.parent.type === utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration && + allowWithNameTester.test(node.parent.id.name))) { + return; + } + context.report({ + node, + messageId: 'noEmptyObject', + data: { option: 'allowObjectTypes' }, + suggest: ['object', 'unknown'].map(replacement => ({ + messageId: 'replaceEmptyObjectType', + data: { replacement }, + fix: (fixer) => fixer.replaceText(node, replacement), + })), + }); + }, + }), + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.d.ts new file mode 100644 index 0000000..211da9a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.d.ts @@ -0,0 +1,11 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type Options = [ + { + fixToUnknown?: boolean; + ignoreRestArgs?: boolean; + } +]; +export type MessageIds = 'suggestNever' | 'suggestPropertyKey' | 'suggestUnknown' | 'unexpectedAny'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-explicit-any.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.d.ts.map new file mode 100644 index 0000000..0732e89 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-explicit-any.d.ts","sourceRoot":"","sources":["../../src/rules/no-explicit-any.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAMnE,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAClB,cAAc,GACd,oBAAoB,GACpB,gBAAgB,GAChB,eAAe,CAAC;;AAEpB,wBAuOG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js new file mode 100644 index 0000000..5ec4aff --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js @@ -0,0 +1,197 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-explicit-any', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow the `any` type', + recommended: 'recommended', + }, + fixable: 'code', + hasSuggestions: true, + messages: { + suggestNever: "Use `never` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.", + suggestPropertyKey: 'Use `PropertyKey` instead, this is more explicit than `keyof any`.', + suggestUnknown: 'Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct.', + unexpectedAny: 'Unexpected any. Specify a different type.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + fixToUnknown: { + type: 'boolean', + description: 'Whether to enable auto-fixing in which the `any` type is converted to the `unknown` type.', + }, + ignoreRestArgs: { + type: 'boolean', + description: 'Whether to ignore rest parameter arrays.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + fixToUnknown: false, + ignoreRestArgs: false, + }, + ], + create(context, [{ fixToUnknown, ignoreRestArgs }]) { + /** + * Checks if the node is an arrow function, function/constructor declaration or function expression + * @param node the node to be validated. + * @returns true if the node is any kind of function declaration or expression + * @private + */ + function isNodeValidFunction(node) { + return [ + utils_1.AST_NODE_TYPES.ArrowFunctionExpression, // const x = (...args: any[]) => {}; + utils_1.AST_NODE_TYPES.FunctionDeclaration, // function f(...args: any[]) {} + utils_1.AST_NODE_TYPES.FunctionExpression, // const x = function(...args: any[]) {}; + utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration, // type T = {(...args: any[]): unknown}; + utils_1.AST_NODE_TYPES.TSConstructorType, // type T = new (...args: any[]) => unknown + utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration, // type T = {new (...args: any[]): unknown}; + utils_1.AST_NODE_TYPES.TSDeclareFunction, // declare function _8(...args: any[]): unknown; + utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression, // declare class A { f(...args: any[]): unknown; } + utils_1.AST_NODE_TYPES.TSFunctionType, // type T = (...args: any[]) => unknown; + utils_1.AST_NODE_TYPES.TSMethodSignature, // type T = {f(...args: any[]): unknown}; + ].includes(node.type); + } + /** + * Checks if the node is a rest element child node of a function + * @param node the node to be validated. + * @returns true if the node is a rest element child node of a function + * @private + */ + function isNodeRestElementInFunction(node) { + return (node.type === utils_1.AST_NODE_TYPES.RestElement && + isNodeValidFunction(node.parent)); + } + /** + * Checks if the node is a TSTypeOperator node with a readonly operator + * @param node the node to be validated. + * @returns true if the node is a TSTypeOperator node with a readonly operator + * @private + */ + function isNodeReadonlyTSTypeOperator(node) { + return (node.type === utils_1.AST_NODE_TYPES.TSTypeOperator && + node.operator === 'readonly'); + } + /** + * Checks if the node is a TSTypeReference node with an Array identifier + * @param node the node to be validated. + * @returns true if the node is a TSTypeReference node with an Array identifier + * @private + */ + function isNodeValidArrayTSTypeReference(node) { + return (node.type === utils_1.AST_NODE_TYPES.TSTypeReference && + node.typeName.type === utils_1.AST_NODE_TYPES.Identifier && + ['Array', 'ReadonlyArray'].includes(node.typeName.name)); + } + /** + * Checks if the node is a valid TSTypeOperator or TSTypeReference node + * @param node the node to be validated. + * @returns true if the node is a valid TSTypeOperator or TSTypeReference node + * @private + */ + function isNodeValidTSType(node) { + return (isNodeReadonlyTSTypeOperator(node) || + isNodeValidArrayTSTypeReference(node)); + } + /** + * Checks if the great grand-parent node is a RestElement node in a function + * @param node the node to be validated. + * @returns true if the great grand-parent node is a RestElement node in a function + * @private + */ + function isGreatGrandparentRestElement(node) { + return (node.parent?.parent?.parent != null && + isNodeRestElementInFunction(node.parent.parent.parent)); + } + /** + * Checks if the great great grand-parent node is a valid RestElement node in a function + * @param node the node to be validated. + * @returns true if the great great grand-parent node is a valid RestElement node in a function + * @private + */ + function isGreatGreatGrandparentRestElement(node) { + return (node.parent?.parent?.parent?.parent != null && + isNodeValidTSType(node.parent.parent) && + isNodeRestElementInFunction(node.parent.parent.parent.parent)); + } + /** + * Checks if the great grand-parent or the great great grand-parent node is a RestElement node + * @param node the node to be validated. + * @returns true if the great grand-parent or the great great grand-parent node is a RestElement node + * @private + */ + function isNodeDescendantOfRestElementInFunction(node) { + return (isGreatGrandparentRestElement(node) || + isGreatGreatGrandparentRestElement(node)); + } + /** + * Checks if the node is within a keyof any expression + * @param node the node to be validated. + * @returns true if the node is within a keyof any expression, false otherwise + * @private + */ + function isNodeWithinKeyofAny(node) { + return (node.parent.type === utils_1.AST_NODE_TYPES.TSTypeOperator && + node.parent.operator === 'keyof'); + } + /** + * Creates a fixer that replaces a keyof any with PropertyKey + * @param node the node to be fixed. + * @returns a function that will fix the node. + * @private + */ + function createPropertyKeyFixer(node) { + return (fixer) => { + return fixer.replaceText(node.parent, 'PropertyKey'); + }; + } + return { + TSAnyKeyword(node) { + const isKeyofAny = isNodeWithinKeyofAny(node); + if (ignoreRestArgs && isNodeDescendantOfRestElementInFunction(node)) { + return; + } + const fixOrSuggest = { + fix: null, + suggest: isKeyofAny + ? [ + { + messageId: 'suggestPropertyKey', + fix: createPropertyKeyFixer(node), + }, + ] + : [ + { + messageId: 'suggestUnknown', + fix: fixer => fixer.replaceText(node, 'unknown'), + }, + { + messageId: 'suggestNever', + fix: fixer => fixer.replaceText(node, 'never'), + }, + ], + }; + if (fixToUnknown) { + fixOrSuggest.fix = isKeyofAny + ? createPropertyKeyFixer(node) + : fixer => fixer.replaceText(node, 'unknown'); + } + context.report({ + node, + messageId: 'unexpectedAny', + ...fixOrSuggest, + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.d.ts new file mode 100644 index 0000000..292bde8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noExtraNonNullAssertion", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-extra-non-null-assertion.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.d.ts.map new file mode 100644 index 0000000..c9e639c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-extra-non-null-assertion.d.ts","sourceRoot":"","sources":["../../src/rules/no-extra-non-null-assertion.ts"],"names":[],"mappings":";AAIA,wBAoCG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js new file mode 100644 index 0000000..e63f84c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-extra-non-null-assertion', + meta: { + type: 'problem', + docs: { + description: 'Disallow extra non-null assertions', + recommended: 'recommended', + }, + fixable: 'code', + messages: { + noExtraNonNullAssertion: 'Forbidden extra non-null assertion.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + function checkExtraNonNullAssertion(node) { + context.report({ + node, + messageId: 'noExtraNonNullAssertion', + fix(fixer) { + return fixer.removeRange([node.range[1] - 1, node.range[1]]); + }, + }); + } + return { + 'CallExpression[optional = true] > TSNonNullExpression.callee': checkExtraNonNullAssertion, + 'MemberExpression[optional = true] > TSNonNullExpression.object': checkExtraNonNullAssertion, + 'TSNonNullExpression > TSNonNullExpression': checkExtraNonNullAssertion, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.d.ts new file mode 100644 index 0000000..5b7c4c0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.d.ts @@ -0,0 +1,12 @@ +export type Options = [ + { + allowConstructorOnly?: boolean; + allowEmpty?: boolean; + allowStaticOnly?: boolean; + allowWithDecorator?: boolean; + } +]; +export type MessageIds = 'empty' | 'onlyConstructor' | 'onlyStatic'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=no-extraneous-class.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.d.ts.map new file mode 100644 index 0000000..faf47cf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-extraneous-class.d.ts","sourceRoot":"","sources":["../../src/rules/no-extraneous-class.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,iBAAiB,GAAG,YAAY,CAAC;;AAEpE,wBA8IG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js new file mode 100644 index 0000000..2c629fe --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js @@ -0,0 +1,120 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-extraneous-class', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow classes used as namespaces', + recommended: 'strict', + }, + messages: { + empty: 'Unexpected empty class.', + onlyConstructor: 'Unexpected class with only a constructor.', + onlyStatic: 'Unexpected class with only static properties.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowConstructorOnly: { + type: 'boolean', + description: 'Whether to allow extraneous classes that contain only a constructor.', + }, + allowEmpty: { + type: 'boolean', + description: 'Whether to allow extraneous classes that have no body (i.e. are empty).', + }, + allowStaticOnly: { + type: 'boolean', + description: 'Whether to allow extraneous classes that only contain static members.', + }, + allowWithDecorator: { + type: 'boolean', + description: 'Whether to allow extraneous classes that include a decorator.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowConstructorOnly: false, + allowEmpty: false, + allowStaticOnly: false, + allowWithDecorator: false, + }, + ], + create(context, [{ allowConstructorOnly, allowEmpty, allowStaticOnly, allowWithDecorator }]) { + const isAllowWithDecorator = (node) => { + return !!(allowWithDecorator && + node?.decorators && + node.decorators.length !== 0); + }; + return { + ClassBody(node) { + const parent = node.parent; + if (parent.superClass || isAllowWithDecorator(parent)) { + return; + } + const reportNode = parent.type === utils_1.AST_NODE_TYPES.ClassDeclaration && parent.id + ? parent.id + : parent; + if (node.body.length === 0) { + if (allowEmpty) { + return; + } + context.report({ + node: reportNode, + messageId: 'empty', + }); + return; + } + let onlyStatic = true; + let onlyConstructor = true; + for (const prop of node.body) { + if (prop.type === utils_1.AST_NODE_TYPES.MethodDefinition && + prop.kind === 'constructor') { + if (prop.value.params.some(param => param.type === utils_1.AST_NODE_TYPES.TSParameterProperty)) { + onlyConstructor = false; + onlyStatic = false; + } + } + else { + onlyConstructor = false; + if (((prop.type === utils_1.AST_NODE_TYPES.PropertyDefinition || + prop.type === utils_1.AST_NODE_TYPES.MethodDefinition || + prop.type === utils_1.AST_NODE_TYPES.AccessorProperty) && + !prop.static) || + prop.type === utils_1.AST_NODE_TYPES.TSAbstractPropertyDefinition || + prop.type === utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition || // `static abstract` methods and properties are currently not supported. See: https://github.com/microsoft/TypeScript/issues/34516 + prop.type === utils_1.AST_NODE_TYPES.TSAbstractAccessorProperty) { + onlyStatic = false; + } + } + if (!(onlyStatic || onlyConstructor)) { + break; + } + } + if (onlyConstructor) { + if (!allowConstructorOnly) { + context.report({ + node: reportNode, + messageId: 'onlyConstructor', + }); + } + return; + } + if (onlyStatic && !allowStaticOnly) { + context.report({ + node: reportNode, + messageId: 'onlyStatic', + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.d.ts new file mode 100644 index 0000000..6048835 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.d.ts @@ -0,0 +1,15 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +import type { TypeOrValueSpecifier } from '../util'; +export type Options = [ + { + allowForKnownSafeCalls?: TypeOrValueSpecifier[]; + allowForKnownSafePromises?: TypeOrValueSpecifier[]; + checkThenables?: boolean; + ignoreIIFE?: boolean; + ignoreVoid?: boolean; + } +]; +export type MessageId = 'floating' | 'floatingFixAwait' | 'floatingFixVoid' | 'floatingPromiseArray' | 'floatingPromiseArrayVoid' | 'floatingUselessRejectionHandler' | 'floatingUselessRejectionHandlerVoid' | 'floatingVoid'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-floating-promises.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.d.ts.map new file mode 100644 index 0000000..66ec3ce --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-floating-promises.d.ts","sourceRoot":"","sources":["../../src/rules/no-floating-promises.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAMnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAoBpD,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,sBAAsB,CAAC,EAAE,oBAAoB,EAAE,CAAC;QAChD,yBAAyB,CAAC,EAAE,oBAAoB,EAAE,CAAC;QACnD,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB;CACF,CAAC;AAEF,MAAM,MAAM,SAAS,GACjB,UAAU,GACV,kBAAkB,GAClB,iBAAiB,GACjB,sBAAsB,GACtB,0BAA0B,GAC1B,iCAAiC,GACjC,qCAAqC,GACrC,cAAc,CAAC;;AAmBnB,wBAgaG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js new file mode 100644 index 0000000..1f9a46b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js @@ -0,0 +1,372 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const promiseUtils_1 = require("../util/promiseUtils"); +const messageBase = 'Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler.'; +const messageBaseVoid = 'Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler' + + ' or be explicitly marked as ignored with the `void` operator.'; +const messageRejectionHandler = 'A rejection handler that is not a function will be ignored.'; +const messagePromiseArray = "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar."; +const messagePromiseArrayVoid = "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar," + + ' or explicitly marking the expression as ignored with the `void` operator.'; +exports.default = (0, util_1.createRule)({ + name: 'no-floating-promises', + meta: { + type: 'problem', + docs: { + description: 'Require Promise-like statements to be handled appropriately', + recommended: 'recommended', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + floating: messageBase, + floatingFixAwait: 'Add await operator.', + floatingFixVoid: 'Add void operator to ignore.', + floatingPromiseArray: messagePromiseArray, + floatingPromiseArrayVoid: messagePromiseArrayVoid, + floatingUselessRejectionHandler: `${messageBase} ${messageRejectionHandler}`, + floatingUselessRejectionHandlerVoid: `${messageBaseVoid} ${messageRejectionHandler}`, + floatingVoid: messageBaseVoid, + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowForKnownSafeCalls: { + ...util_1.readonlynessOptionsSchema.properties.allow, + description: 'Type specifiers of functions whose calls are safe to float.', + }, + allowForKnownSafePromises: { + ...util_1.readonlynessOptionsSchema.properties.allow, + description: 'Type specifiers that are known to be safe to float.', + }, + checkThenables: { + type: 'boolean', + description: 'Whether to check all "Thenable"s, not just the built-in Promise type.', + }, + ignoreIIFE: { + type: 'boolean', + description: 'Whether to ignore async IIFEs (Immediately Invoked Function Expressions).', + }, + ignoreVoid: { + type: 'boolean', + description: 'Whether to ignore `void` expressions.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowForKnownSafeCalls: util_1.readonlynessOptionsDefaults.allow, + allowForKnownSafePromises: util_1.readonlynessOptionsDefaults.allow, + checkThenables: false, + ignoreIIFE: false, + ignoreVoid: true, + }, + ], + create(context, [options]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const { checkThenables } = options; + // TODO: #5439 + /* eslint-disable @typescript-eslint/no-non-null-assertion */ + const allowForKnownSafePromises = options.allowForKnownSafePromises; + const allowForKnownSafeCalls = options.allowForKnownSafeCalls; + /* eslint-enable @typescript-eslint/no-non-null-assertion */ + return { + ExpressionStatement(node) { + if (options.ignoreIIFE && isAsyncIife(node)) { + return; + } + const expression = (0, util_1.skipChainExpression)(node.expression); + if (isKnownSafePromiseCall(expression)) { + return; + } + const { isUnhandled, nonFunctionHandler, promiseArray } = isUnhandledPromise(checker, expression); + if (isUnhandled) { + if (promiseArray) { + context.report({ + node, + messageId: options.ignoreVoid + ? 'floatingPromiseArrayVoid' + : 'floatingPromiseArray', + }); + } + else if (options.ignoreVoid) { + context.report({ + node, + messageId: nonFunctionHandler + ? 'floatingUselessRejectionHandlerVoid' + : 'floatingVoid', + suggest: [ + { + messageId: 'floatingFixVoid', + fix(fixer) { + const tsNode = services.esTreeNodeToTSNodeMap.get(node.expression); + if (isHigherPrecedenceThanUnary(tsNode)) { + return fixer.insertTextBefore(node, 'void '); + } + return [ + fixer.insertTextBefore(node, 'void ('), + fixer.insertTextAfterRange([expression.range[1], expression.range[1]], ')'), + ]; + }, + }, + { + messageId: 'floatingFixAwait', + fix: (fixer) => addAwait(fixer, expression, node), + }, + ], + }); + } + else { + context.report({ + node, + messageId: nonFunctionHandler + ? 'floatingUselessRejectionHandler' + : 'floating', + suggest: [ + { + messageId: 'floatingFixAwait', + fix: (fixer) => addAwait(fixer, expression, node), + }, + ], + }); + } + } + }, + }; + function addAwait(fixer, expression, node) { + if (expression.type === utils_1.AST_NODE_TYPES.UnaryExpression && + expression.operator === 'void') { + return fixer.replaceTextRange([expression.range[0], expression.range[0] + 4], 'await'); + } + const tsNode = services.esTreeNodeToTSNodeMap.get(node.expression); + if (isHigherPrecedenceThanUnary(tsNode)) { + return fixer.insertTextBefore(node, 'await '); + } + return [ + fixer.insertTextBefore(node, 'await ('), + fixer.insertTextAfterRange([expression.range[1], expression.range[1]], ')'), + ]; + } + function isKnownSafePromiseCall(node) { + if (node.type !== utils_1.AST_NODE_TYPES.CallExpression) { + return false; + } + const type = services.getTypeAtLocation(node.callee); + if ((0, util_1.valueMatchesSomeSpecifier)(node.callee, allowForKnownSafeCalls, services.program, type)) { + return true; + } + return (0, util_1.typeMatchesSomeSpecifier)(type, allowForKnownSafeCalls, services.program); + } + function isHigherPrecedenceThanUnary(node) { + const operator = ts.isBinaryExpression(node) + ? node.operatorToken.kind + : ts.SyntaxKind.Unknown; + const nodePrecedence = (0, util_1.getOperatorPrecedence)(node.kind, operator); + return nodePrecedence > util_1.OperatorPrecedence.Unary; + } + function isAsyncIife(node) { + if (node.expression.type !== utils_1.AST_NODE_TYPES.CallExpression) { + return false; + } + return (node.expression.callee.type === + utils_1.AST_NODE_TYPES.ArrowFunctionExpression || + node.expression.callee.type === utils_1.AST_NODE_TYPES.FunctionExpression); + } + function isValidRejectionHandler(rejectionHandler) { + return (services.program + .getTypeChecker() + .getTypeAtLocation(services.esTreeNodeToTSNodeMap.get(rejectionHandler)) + .getCallSignatures().length > 0); + } + function isUnhandledPromise(checker, node) { + if (node.type === utils_1.AST_NODE_TYPES.AssignmentExpression) { + return { isUnhandled: false }; + } + // First, check expressions whose resulting types may not be promise-like + if (node.type === utils_1.AST_NODE_TYPES.SequenceExpression) { + // Any child in a comma expression could return a potentially unhandled + // promise, so we check them all regardless of whether the final returned + // value is promise-like. + return (node.expressions + .map(item => isUnhandledPromise(checker, item)) + .find(result => result.isUnhandled) ?? { isUnhandled: false }); + } + if (!options.ignoreVoid && + node.type === utils_1.AST_NODE_TYPES.UnaryExpression && + node.operator === 'void') { + // Similarly, a `void` expression always returns undefined, so we need to + // see what's inside it without checking the type of the overall expression. + return isUnhandledPromise(checker, node.argument); + } + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + // Check the type. At this point it can't be unhandled if it isn't a promise + // or array thereof. + if (isPromiseArray(tsNode)) { + return { isUnhandled: true, promiseArray: true }; + } + // await expression addresses promises, but not promise arrays. + if (node.type === utils_1.AST_NODE_TYPES.AwaitExpression) { + // you would think this wouldn't be strictly necessary, since we're + // anyway checking the type of the expression, but, unfortunately TS + // reports the result of `await (promise as Promise & number)` + // as `Promise & number` instead of `number`. + return { isUnhandled: false }; + } + if (!isPromiseLike(tsNode)) { + return { isUnhandled: false }; + } + if (node.type === utils_1.AST_NODE_TYPES.CallExpression) { + // If the outer expression is a call, a `.catch()` or `.then()` with + // rejection handler handles the promise. + const promiseHandlingMethodCall = (0, promiseUtils_1.parseCatchCall)(node, context) ?? (0, promiseUtils_1.parseThenCall)(node, context); + if (promiseHandlingMethodCall != null) { + const onRejected = promiseHandlingMethodCall.onRejected; + if (onRejected != null) { + if (isValidRejectionHandler(onRejected)) { + return { isUnhandled: false }; + } + return { isUnhandled: true, nonFunctionHandler: true }; + } + return { isUnhandled: true }; + } + const promiseFinallyCall = (0, promiseUtils_1.parseFinallyCall)(node, context); + if (promiseFinallyCall != null) { + return isUnhandledPromise(checker, promiseFinallyCall.object); + } + // All other cases are unhandled. + return { isUnhandled: true }; + } + if (node.type === utils_1.AST_NODE_TYPES.ConditionalExpression) { + // We must be getting the promise-like value from one of the branches of the + // ternary. Check them directly. + const alternateResult = isUnhandledPromise(checker, node.alternate); + if (alternateResult.isUnhandled) { + return alternateResult; + } + return isUnhandledPromise(checker, node.consequent); + } + if (node.type === utils_1.AST_NODE_TYPES.LogicalExpression) { + const leftResult = isUnhandledPromise(checker, node.left); + if (leftResult.isUnhandled) { + return leftResult; + } + return isUnhandledPromise(checker, node.right); + } + // Anything else is unhandled. + return { isUnhandled: true }; + } + function isPromiseArray(node) { + const type = checker.getTypeAtLocation(node); + for (const ty of tsutils + .unionConstituents(type) + .map(t => checker.getApparentType(t))) { + if (checker.isArrayType(ty)) { + const arrayType = checker.getTypeArguments(ty)[0]; + if (isPromiseLike(node, arrayType)) { + return true; + } + } + if (checker.isTupleType(ty)) { + for (const tupleElementType of checker.getTypeArguments(ty)) { + if (isPromiseLike(node, tupleElementType)) { + return true; + } + } + } + } + return false; + } + function isPromiseLike(node, type) { + type ??= checker.getTypeAtLocation(node); + // The highest priority is to allow anything allowlisted + if ((0, util_1.typeMatchesSomeSpecifier)(type, allowForKnownSafePromises, services.program)) { + return false; + } + // Otherwise, we always consider the built-in Promise to be Promise-like... + const typeParts = tsutils.unionConstituents(checker.getApparentType(type)); + if (typeParts.some(typePart => (0, util_1.isBuiltinSymbolLike)(services.program, typePart, 'Promise'))) { + return true; + } + // ...and only check all Thenables if explicitly told to + if (!checkThenables) { + return false; + } + // Modified from tsutils.isThenable() to only consider thenables which can be + // rejected/caught via a second parameter. Original source (MIT licensed): + // + // https://github.com/ajafff/tsutils/blob/49d0d31050b44b81e918eae4fbaf1dfe7b7286af/util/type.ts#L95-L125 + for (const ty of typeParts) { + const then = ty.getProperty('then'); + if (then == null) { + continue; + } + const thenType = checker.getTypeOfSymbolAtLocation(then, node); + if (hasMatchingSignature(thenType, signature => signature.parameters.length >= 2 && + isFunctionParam(checker, signature.parameters[0], node) && + isFunctionParam(checker, signature.parameters[1], node))) { + return true; + } + } + return false; + } + }, +}); +function hasMatchingSignature(type, matcher) { + for (const t of tsutils.unionConstituents(type)) { + if (t.getCallSignatures().some(matcher)) { + return true; + } + } + return false; +} +function isFunctionParam(checker, param, node) { + const type = checker.getApparentType(checker.getTypeOfSymbolAtLocation(param, node)); + for (const t of tsutils.unionConstituents(type)) { + if (t.getCallSignatures().length !== 0) { + return true; + } + } + return false; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.d.ts new file mode 100644 index 0000000..67ea655 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"forInViolation", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-for-in-array.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.d.ts.map new file mode 100644 index 0000000..7cc8066 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-for-in-array.d.ts","sourceRoot":"","sources":["../../src/rules/no-for-in-array.ts"],"names":[],"mappings":";AAUA,wBAiCG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js new file mode 100644 index 0000000..31fa59b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js @@ -0,0 +1,86 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const getForStatementHeadLoc_1 = require("../util/getForStatementHeadLoc"); +exports.default = (0, util_1.createRule)({ + name: 'no-for-in-array', + meta: { + type: 'problem', + docs: { + description: 'Disallow iterating over an array with a for-in loop', + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + forInViolation: 'For-in loops over arrays skips holes, returns indices as strings, and may visit the prototype chain or other enumerable properties. Use a more robust iteration method such as for-of or array.forEach instead.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + return { + ForInStatement(node) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const type = (0, util_1.getConstrainedTypeAtLocation)(services, node.right); + if (isArrayLike(checker, type)) { + context.report({ + loc: (0, getForStatementHeadLoc_1.getForStatementHeadLoc)(context.sourceCode, node), + messageId: 'forInViolation', + }); + } + }, + }; + }, +}); +function isArrayLike(checker, type) { + return isTypeRecurser(type, t => t.getNumberIndexType() != null && hasArrayishLength(checker, t)); +} +function hasArrayishLength(checker, type) { + const lengthProperty = type.getProperty('length'); + if (lengthProperty == null) { + return false; + } + return tsutils.isTypeFlagSet(checker.getTypeOfSymbol(lengthProperty), ts.TypeFlags.NumberLike); +} +function isTypeRecurser(type, predicate) { + if (type.isUnionOrIntersection()) { + return type.types.some(t => isTypeRecurser(t, predicate)); + } + return predicate(type); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.d.ts new file mode 100644 index 0000000..3be070d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noFunctionConstructor" | "noImpliedEvalError", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-implied-eval.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.d.ts.map new file mode 100644 index 0000000..0b04a2b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-implied-eval.d.ts","sourceRoot":"","sources":["../../src/rules/no-implied-eval.ts"],"names":[],"mappings":";AAsBA,wBA6IG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js new file mode 100644 index 0000000..1620dcc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js @@ -0,0 +1,152 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const FUNCTION_CONSTRUCTOR = 'Function'; +const GLOBAL_CANDIDATES = new Set(['global', 'globalThis', 'window']); +const EVAL_LIKE_FUNCTIONS = new Set([ + 'execScript', + 'setImmediate', + 'setInterval', + 'setTimeout', +]); +exports.default = (0, util_1.createRule)({ + name: 'no-implied-eval', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow the use of `eval()`-like functions', + extendsBaseRule: true, + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + noFunctionConstructor: 'Implied eval. Do not use the Function constructor to create functions.', + noImpliedEvalError: 'Implied eval. Consider passing a function.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + function getCalleeName(node) { + if (node.type === utils_1.AST_NODE_TYPES.Identifier) { + return node.name; + } + if (node.type === utils_1.AST_NODE_TYPES.MemberExpression && + node.object.type === utils_1.AST_NODE_TYPES.Identifier && + GLOBAL_CANDIDATES.has(node.object.name)) { + if (node.property.type === utils_1.AST_NODE_TYPES.Identifier) { + return node.property.name; + } + if (node.property.type === utils_1.AST_NODE_TYPES.Literal && + typeof node.property.value === 'string') { + return node.property.value; + } + } + return null; + } + function isFunctionType(node) { + const type = services.getTypeAtLocation(node); + const symbol = type.getSymbol(); + if (symbol && + tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Function | ts.SymbolFlags.Method)) { + return true; + } + if ((0, util_1.isBuiltinSymbolLike)(services.program, type, FUNCTION_CONSTRUCTOR)) { + return true; + } + const signatures = checker.getSignaturesOfType(type, ts.SignatureKind.Call); + return signatures.length > 0; + } + function isBind(node) { + return node.type === utils_1.AST_NODE_TYPES.MemberExpression + ? isBind(node.property) + : node.type === utils_1.AST_NODE_TYPES.Identifier && node.name === 'bind'; + } + function isFunction(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.ArrowFunctionExpression: + case utils_1.AST_NODE_TYPES.FunctionDeclaration: + case utils_1.AST_NODE_TYPES.FunctionExpression: + return true; + case utils_1.AST_NODE_TYPES.Literal: + case utils_1.AST_NODE_TYPES.TemplateLiteral: + return false; + case utils_1.AST_NODE_TYPES.CallExpression: + return isBind(node.callee) || isFunctionType(node); + default: + return isFunctionType(node); + } + } + function checkImpliedEval(node) { + const calleeName = getCalleeName(node.callee); + if (calleeName == null) { + return; + } + if (calleeName === FUNCTION_CONSTRUCTOR) { + const type = services.getTypeAtLocation(node.callee); + const symbol = type.getSymbol(); + if (symbol) { + if ((0, util_1.isBuiltinSymbolLike)(services.program, type, 'FunctionConstructor')) { + context.report({ node, messageId: 'noFunctionConstructor' }); + return; + } + } + else { + context.report({ node, messageId: 'noFunctionConstructor' }); + return; + } + } + if (node.arguments.length === 0) { + return; + } + const [handler] = node.arguments; + if (EVAL_LIKE_FUNCTIONS.has(calleeName) && + !isFunction(handler) && + (0, util_1.isReferenceToGlobalFunction)(calleeName, node, context.sourceCode)) { + context.report({ node: handler, messageId: 'noImpliedEvalError' }); + } + } + return { + CallExpression: checkImpliedEval, + NewExpression: checkImpliedEval, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.d.ts new file mode 100644 index 0000000..cf6dead --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.d.ts @@ -0,0 +1,6 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type Options = []; +export type MessageIds = 'useTopLevelQualifier'; +declare const _default: TSESLint.RuleModule<"useTopLevelQualifier", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=no-import-type-side-effects.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.d.ts.map new file mode 100644 index 0000000..30a5ce9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-import-type-side-effects.d.ts","sourceRoot":"","sources":["../../src/rules/no-import-type-side-effects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAYnE,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC;;AAEhD,wBAqEG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.js new file mode 100644 index 0000000..8e3ca32 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.js @@ -0,0 +1,53 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-import-type-side-effects', + meta: { + type: 'problem', + docs: { + description: 'Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers', + }, + fixable: 'code', + messages: { + useTopLevelQualifier: 'TypeScript will only remove the inline type specifiers which will leave behind a side effect import at runtime. Convert this to a top-level type qualifier to properly remove the entire import.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + return { + 'ImportDeclaration[importKind!="type"]'(node) { + if (node.specifiers.length === 0) { + return; + } + const specifiers = []; + for (const specifier of node.specifiers) { + if (specifier.type !== utils_1.AST_NODE_TYPES.ImportSpecifier || + specifier.importKind !== 'type') { + return; + } + specifiers.push(specifier); + } + context.report({ + node, + messageId: 'useTopLevelQualifier', + fix(fixer) { + const fixes = []; + for (const specifier of specifiers) { + const qualifier = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(specifier, util_1.isTypeKeyword), util_1.NullThrowsReasons.MissingToken('type keyword', 'import specifier')); + fixes.push(fixer.removeRange([ + qualifier.range[0], + specifier.imported.range[0], + ])); + } + const importKeyword = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isImportKeyword), util_1.NullThrowsReasons.MissingToken('import keyword', 'import')); + fixes.push(fixer.insertTextAfter(importKeyword, ' type')); + return fixes; + }, + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.d.ts new file mode 100644 index 0000000..bbe3540 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.d.ts @@ -0,0 +1,10 @@ +export type Options = [ + { + ignoreParameters?: boolean; + ignoreProperties?: boolean; + } +]; +export type MessageIds = 'noInferrableType'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noInferrableType", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-inferrable-types.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.d.ts.map new file mode 100644 index 0000000..af18eb3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-inferrable-types.d.ts","sourceRoot":"","sources":["../../src/rules/no-inferrable-types.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;KAC5B;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC;;AAE5C,wBAgRG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js new file mode 100644 index 0000000..fd3ab7a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js @@ -0,0 +1,182 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-inferrable-types', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean', + recommended: 'stylistic', + }, + fixable: 'code', + messages: { + noInferrableType: 'Type {{type}} trivially inferred from a {{type}} literal, remove type annotation.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + ignoreParameters: { + type: 'boolean', + description: 'Whether to ignore function parameters.', + }, + ignoreProperties: { + type: 'boolean', + description: 'Whether to ignore class properties.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + ignoreParameters: false, + ignoreProperties: false, + }, + ], + create(context, [{ ignoreParameters, ignoreProperties }]) { + function isFunctionCall(init, callName) { + const node = (0, util_1.skipChainExpression)(init); + return (node.type === utils_1.AST_NODE_TYPES.CallExpression && + node.callee.type === utils_1.AST_NODE_TYPES.Identifier && + node.callee.name === callName); + } + function isLiteral(init, typeName) { + return (init.type === utils_1.AST_NODE_TYPES.Literal && typeof init.value === typeName); + } + function isIdentifier(init, ...names) { + return (init.type === utils_1.AST_NODE_TYPES.Identifier && names.includes(init.name)); + } + function hasUnaryPrefix(init, ...operators) { + return (init.type === utils_1.AST_NODE_TYPES.UnaryExpression && + operators.includes(init.operator)); + } + const keywordMap = { + [utils_1.AST_NODE_TYPES.TSBigIntKeyword]: 'bigint', + [utils_1.AST_NODE_TYPES.TSBooleanKeyword]: 'boolean', + [utils_1.AST_NODE_TYPES.TSNullKeyword]: 'null', + [utils_1.AST_NODE_TYPES.TSNumberKeyword]: 'number', + [utils_1.AST_NODE_TYPES.TSStringKeyword]: 'string', + [utils_1.AST_NODE_TYPES.TSSymbolKeyword]: 'symbol', + [utils_1.AST_NODE_TYPES.TSUndefinedKeyword]: 'undefined', + }; + /** + * Returns whether a node has an inferrable value or not + */ + function isInferrable(annotation, init) { + switch (annotation.type) { + case utils_1.AST_NODE_TYPES.TSBigIntKeyword: { + // note that bigint cannot have + prefixed to it + const unwrappedInit = hasUnaryPrefix(init, '-') + ? init.argument + : init; + return (isFunctionCall(unwrappedInit, 'BigInt') || + unwrappedInit.type === utils_1.AST_NODE_TYPES.Literal); + } + case utils_1.AST_NODE_TYPES.TSBooleanKeyword: + return (hasUnaryPrefix(init, '!') || + isFunctionCall(init, 'Boolean') || + isLiteral(init, 'boolean')); + case utils_1.AST_NODE_TYPES.TSNumberKeyword: { + const unwrappedInit = hasUnaryPrefix(init, '+', '-') + ? init.argument + : init; + return (isIdentifier(unwrappedInit, 'Infinity', 'NaN') || + isFunctionCall(unwrappedInit, 'Number') || + isLiteral(unwrappedInit, 'number')); + } + case utils_1.AST_NODE_TYPES.TSNullKeyword: + return init.type === utils_1.AST_NODE_TYPES.Literal && init.value == null; + case utils_1.AST_NODE_TYPES.TSStringKeyword: + return (isFunctionCall(init, 'String') || + isLiteral(init, 'string') || + init.type === utils_1.AST_NODE_TYPES.TemplateLiteral); + case utils_1.AST_NODE_TYPES.TSSymbolKeyword: + return isFunctionCall(init, 'Symbol'); + case utils_1.AST_NODE_TYPES.TSTypeReference: { + if (annotation.typeName.type === utils_1.AST_NODE_TYPES.Identifier && + annotation.typeName.name === 'RegExp') { + const isRegExpLiteral = init.type === utils_1.AST_NODE_TYPES.Literal && + init.value instanceof RegExp; + const isRegExpNewCall = init.type === utils_1.AST_NODE_TYPES.NewExpression && + init.callee.type === utils_1.AST_NODE_TYPES.Identifier && + init.callee.name === 'RegExp'; + const isRegExpCall = isFunctionCall(init, 'RegExp'); + return isRegExpLiteral || isRegExpCall || isRegExpNewCall; + } + return false; + } + case utils_1.AST_NODE_TYPES.TSUndefinedKeyword: + return (hasUnaryPrefix(init, 'void') || isIdentifier(init, 'undefined')); + } + return false; + } + /** + * Reports an inferrable type declaration, if any + */ + function reportInferrableType(node, typeNode, initNode) { + if (!typeNode || !initNode) { + return; + } + if (!isInferrable(typeNode.typeAnnotation, initNode)) { + return; + } + const type = typeNode.typeAnnotation.type === utils_1.AST_NODE_TYPES.TSTypeReference + ? // TODO - if we add more references + 'RegExp' + : keywordMap[typeNode.typeAnnotation.type]; + context.report({ + node, + messageId: 'noInferrableType', + data: { + type, + }, + *fix(fixer) { + if ((node.type === utils_1.AST_NODE_TYPES.AssignmentPattern && + node.left.optional) || + (node.type === utils_1.AST_NODE_TYPES.PropertyDefinition && node.definite)) { + yield fixer.remove((0, util_1.nullThrows)(context.sourceCode.getTokenBefore(typeNode), util_1.NullThrowsReasons.MissingToken('token before', 'type node'))); + } + yield fixer.remove(typeNode); + }, + }); + } + function inferrableVariableVisitor(node) { + reportInferrableType(node, node.id.typeAnnotation, node.init); + } + function inferrableParameterVisitor(node) { + if (ignoreParameters) { + return; + } + node.params.forEach(param => { + if (param.type === utils_1.AST_NODE_TYPES.TSParameterProperty) { + param = param.parameter; + } + if (param.type === utils_1.AST_NODE_TYPES.AssignmentPattern) { + reportInferrableType(param, param.left.typeAnnotation, param.right); + } + }); + } + function inferrablePropertyVisitor(node) { + // We ignore `readonly` because of Microsoft/TypeScript#14416 + // Essentially a readonly property without a type + // will result in its value being the type, leading to + // compile errors if the type is stripped. + if (ignoreProperties || node.readonly || node.optional) { + return; + } + reportInferrableType(node, node.typeAnnotation, node.value); + } + return { + AccessorProperty: inferrablePropertyVisitor, + ArrowFunctionExpression: inferrableParameterVisitor, + FunctionDeclaration: inferrableParameterVisitor, + FunctionExpression: inferrableParameterVisitor, + PropertyDefinition: inferrablePropertyVisitor, + VariableDeclarator: inferrableVariableVisitor, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.d.ts new file mode 100644 index 0000000..8423f1a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.d.ts @@ -0,0 +1,14 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpectedThis", [({ + capIsConstructor?: boolean; +} | undefined)?], unknown, { + ThisExpression(node: TSESTree.ThisExpression): void; +}>; +export type Options = InferOptionsTypeFromRule; +export type MessageIds = InferMessageIdsTypeFromRule; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpectedThis", [({ + capIsConstructor?: boolean; +} | undefined)?], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-invalid-this.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.d.ts.map new file mode 100644 index 0000000..043b44e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-invalid-this.d.ts","sourceRoot":"","sources":["../../src/rules/no-invalid-this.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAKjB,QAAA,MAAM,QAAQ;;;;EAAuC,CAAC;AAEtD,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC,OAAO,QAAQ,CAAC,CAAC;;;;AAItE,wBAkFG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.js new file mode 100644 index 0000000..ba61a39 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.js @@ -0,0 +1,75 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-invalid-this'); +const defaultOptions = [{ capIsConstructor: true }]; +exports.default = (0, util_1.createRule)({ + name: 'no-invalid-this', + meta: { + type: 'suggestion', + defaultOptions, + docs: { + description: 'Disallow `this` keywords outside of classes or class-like objects', + extendsBaseRule: true, + }, + hasSuggestions: baseRule.meta.hasSuggestions, + messages: baseRule.meta.messages, + schema: baseRule.meta.schema, + }, + defaultOptions, + create(context) { + const rules = baseRule.create(context); + /** + * Since function definitions can be nested we use a stack storing if "this" is valid in the current context. + * + * Example: + * + * function a(this: number) { // valid "this" + * function b() { + * console.log(this); // invalid "this" + * } + * } + * + * When parsing the function declaration of "a" the stack will be: [true] + * When parsing the function declaration of "b" the stack will be: [true, false] + */ + const thisIsValidStack = []; + return { + ...rules, + AccessorProperty() { + thisIsValidStack.push(true); + }, + 'AccessorProperty:exit'() { + thisIsValidStack.pop(); + }, + FunctionDeclaration(node) { + thisIsValidStack.push(node.params.some(param => param.type === utils_1.AST_NODE_TYPES.Identifier && param.name === 'this')); + }, + 'FunctionDeclaration:exit'() { + thisIsValidStack.pop(); + }, + FunctionExpression(node) { + thisIsValidStack.push(node.params.some(param => param.type === utils_1.AST_NODE_TYPES.Identifier && param.name === 'this')); + }, + 'FunctionExpression:exit'() { + thisIsValidStack.pop(); + }, + PropertyDefinition() { + thisIsValidStack.push(true); + }, + 'PropertyDefinition:exit'() { + thisIsValidStack.pop(); + }, + ThisExpression(node) { + const thisIsValidHere = thisIsValidStack[thisIsValidStack.length - 1]; + if (thisIsValidHere) { + return; + } + // baseRule's work + rules.ThisExpression(node); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.d.ts new file mode 100644 index 0000000..2bcc92f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.d.ts @@ -0,0 +1,8 @@ +export interface Options { + allowAsThisParameter?: boolean; + allowInGenericTypeArguments?: boolean | [string, ...string[]]; +} +export type MessageIds = 'invalidVoidForGeneric' | 'invalidVoidNotReturn' | 'invalidVoidNotReturnOrGeneric' | 'invalidVoidNotReturnOrThisParam' | 'invalidVoidNotReturnOrThisParamOrGeneric' | 'invalidVoidUnionConstituent'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=no-invalid-void-type.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.d.ts.map new file mode 100644 index 0000000..68fd9e6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-invalid-void-type.d.ts","sourceRoot":"","sources":["../../src/rules/no-invalid-void-type.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,OAAO;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,2BAA2B,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;CAC/D;AAED,MAAM,MAAM,UAAU,GAClB,uBAAuB,GACvB,sBAAsB,GACtB,+BAA+B,GAC/B,iCAAiC,GACjC,0CAA0C,GAC1C,6BAA6B,CAAC;;AAElC,wBA2OG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js new file mode 100644 index 0000000..2c3d93a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js @@ -0,0 +1,210 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-invalid-void-type', + meta: { + type: 'problem', + docs: { + description: 'Disallow `void` type outside of generic or return types', + recommended: 'strict', + }, + messages: { + invalidVoidForGeneric: '{{ generic }} may not have void as a type argument.', + invalidVoidNotReturn: 'void is only valid as a return type.', + invalidVoidNotReturnOrGeneric: 'void is only valid as a return type or generic type argument.', + invalidVoidNotReturnOrThisParam: 'void is only valid as return type or type of `this` parameter.', + invalidVoidNotReturnOrThisParamOrGeneric: 'void is only valid as a return type or generic type argument or the type of a `this` parameter.', + invalidVoidUnionConstituent: 'void is not valid as a constituent in a union type', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowAsThisParameter: { + type: 'boolean', + description: 'Whether a `this` parameter of a function may be `void`.', + }, + allowInGenericTypeArguments: { + description: 'Whether `void` can be used as a valid value for generic type parameters.', + oneOf: [ + { + type: 'boolean', + description: 'Whether `void` can be used as a valid value for all generic type parameters.', + }, + { + type: 'array', + description: 'Allowlist of types that may accept `void` as a generic type parameter.', + items: { type: 'string' }, + minItems: 1, + }, + ], + }, + }, + }, + ], + }, + defaultOptions: [ + { allowAsThisParameter: false, allowInGenericTypeArguments: true }, + ], + create(context, [{ allowAsThisParameter, allowInGenericTypeArguments }]) { + const validParents = [ + utils_1.AST_NODE_TYPES.TSTypeAnnotation, // + ]; + const invalidGrandParents = [ + utils_1.AST_NODE_TYPES.TSPropertySignature, + utils_1.AST_NODE_TYPES.CallExpression, + utils_1.AST_NODE_TYPES.PropertyDefinition, + utils_1.AST_NODE_TYPES.AccessorProperty, + utils_1.AST_NODE_TYPES.Identifier, + ]; + const validUnionMembers = [ + utils_1.AST_NODE_TYPES.TSVoidKeyword, + utils_1.AST_NODE_TYPES.TSNeverKeyword, + ]; + if (allowInGenericTypeArguments === true) { + validParents.push(utils_1.AST_NODE_TYPES.TSTypeParameterInstantiation); + } + /** + * @brief check if the given void keyword is used as a valid generic type + * + * reports if the type parametrized by void is not in the allowlist, or + * allowInGenericTypeArguments is false. + * no-op if the given void keyword is not used as generic type + */ + function checkGenericTypeArgument(node) { + // only matches T<..., void, ...> + // extra check for precaution + /* istanbul ignore next */ + if (node.parent.type !== utils_1.AST_NODE_TYPES.TSTypeParameterInstantiation || + node.parent.parent.type !== utils_1.AST_NODE_TYPES.TSTypeReference) { + return; + } + // check allowlist + if (Array.isArray(allowInGenericTypeArguments)) { + const fullyQualifiedName = context.sourceCode + .getText(node.parent.parent.typeName) + .replaceAll(' ', ''); + if (!allowInGenericTypeArguments + .map(s => s.replaceAll(' ', '')) + .includes(fullyQualifiedName)) { + context.report({ + node, + messageId: 'invalidVoidForGeneric', + data: { generic: fullyQualifiedName }, + }); + } + return; + } + if (!allowInGenericTypeArguments) { + context.report({ + node, + messageId: allowAsThisParameter + ? 'invalidVoidNotReturnOrThisParam' + : 'invalidVoidNotReturn', + }); + } + } + /** + * @brief checks if the generic type parameter defaults to void + */ + function checkDefaultVoid(node, parentNode) { + if (parentNode.default !== node) { + context.report({ + node, + messageId: getNotReturnOrGenericMessageId(node), + }); + } + } + /** + * @brief checks that a union containing void is valid + * @return true if every member of the union is specified as a valid type in + * validUnionMembers, or is a valid generic type parametrized by void + */ + function isValidUnionType(node) { + return node.types.every(member => validUnionMembers.includes(member.type) || + // allows any T<..., void, ...> here, checked by checkGenericTypeArgument + (member.type === utils_1.AST_NODE_TYPES.TSTypeReference && + member.typeArguments?.type === + utils_1.AST_NODE_TYPES.TSTypeParameterInstantiation && + member.typeArguments.params + .map(param => param.type) + .includes(utils_1.AST_NODE_TYPES.TSVoidKeyword))); + } + return { + TSVoidKeyword(node) { + // checks T<..., void, ...> against specification of allowInGenericArguments option + if (node.parent.type === utils_1.AST_NODE_TYPES.TSTypeParameterInstantiation && + node.parent.parent.type === utils_1.AST_NODE_TYPES.TSTypeReference) { + checkGenericTypeArgument(node); + return; + } + // allow if allowInGenericTypeArguments is specified, and report if the generic type parameter extends void + if (allowInGenericTypeArguments && + node.parent.type === utils_1.AST_NODE_TYPES.TSTypeParameter && + node.parent.default?.type === utils_1.AST_NODE_TYPES.TSVoidKeyword) { + checkDefaultVoid(node, node.parent); + return; + } + // union w/ void must contain types from validUnionMembers, or a valid generic void type + if (node.parent.type === utils_1.AST_NODE_TYPES.TSUnionType && + isValidUnionType(node.parent)) { + return; + } + // using `void` as part of the return type of function overloading implementation + if (node.parent.type === utils_1.AST_NODE_TYPES.TSUnionType) { + const declaringFunction = getParentFunctionDeclarationNode(node.parent); + if (declaringFunction && + (0, util_1.hasOverloadSignatures)(declaringFunction, context)) { + return; + } + } + // this parameter is ok to be void. + if (allowAsThisParameter && + node.parent.type === utils_1.AST_NODE_TYPES.TSTypeAnnotation && + node.parent.parent.type === utils_1.AST_NODE_TYPES.Identifier && + node.parent.parent.name === 'this') { + return; + } + // default cases + if (validParents.includes(node.parent.type) && + // https://github.com/typescript-eslint/typescript-eslint/issues/6225 + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + !invalidGrandParents.includes(node.parent.parent.type)) { + return; + } + context.report({ + node, + messageId: allowInGenericTypeArguments && allowAsThisParameter + ? 'invalidVoidNotReturnOrThisParamOrGeneric' + : allowInGenericTypeArguments + ? getNotReturnOrGenericMessageId(node) + : allowAsThisParameter + ? 'invalidVoidNotReturnOrThisParam' + : 'invalidVoidNotReturn', + }); + }, + }; + }, +}); +function getNotReturnOrGenericMessageId(node) { + return node.parent.type === utils_1.AST_NODE_TYPES.TSUnionType + ? 'invalidVoidUnionConstituent' + : 'invalidVoidNotReturnOrGeneric'; +} +function getParentFunctionDeclarationNode(node) { + let current = node.parent; + while (current) { + if (current.type === utils_1.AST_NODE_TYPES.FunctionDeclaration) { + return current; + } + if (current.type === utils_1.AST_NODE_TYPES.MethodDefinition && + current.value.body != null) { + return current; + } + current = current.parent; + } + return null; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.d.ts new file mode 100644 index 0000000..9ac1f8d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.d.ts @@ -0,0 +1,12 @@ +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +declare const baseRule: TSESLint.RuleModule<"unsafeRefs", [], unknown, { + ArrowFunctionExpression(node: TSESTree.ArrowFunctionExpression): void; + FunctionDeclaration(node: TSESTree.FunctionDeclaration): void; + FunctionExpression(node: TSESTree.FunctionExpression): void; +}>; +export type Options = InferOptionsTypeFromRule; +export type MessageIds = InferMessageIdsTypeFromRule; +declare const _default: TSESLint.RuleModule<"unsafeRefs", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=no-loop-func.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.d.ts.map new file mode 100644 index 0000000..1028ecc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-loop-func.d.ts","sourceRoot":"","sources":["../../src/rules/no-loop-func.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAInE,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAKjB,QAAA,MAAM,QAAQ;;;;EAAoC,CAAC;AAEnD,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC,OAAO,QAAQ,CAAC,CAAC;;AAEtE,wBA0OG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js new file mode 100644 index 0000000..82faa2c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js @@ -0,0 +1,187 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-loop-func'); +exports.default = (0, util_1.createRule)({ + name: 'no-loop-func', + meta: { + type: 'suggestion', + // defaultOptions, -- base rule does not use defaultOptions + docs: { + description: 'Disallow function declarations that contain unsafe references inside loop statements', + extendsBaseRule: true, + }, + hasSuggestions: baseRule.meta.hasSuggestions, + messages: baseRule.meta.messages, + schema: [], + }, + defaultOptions: [], + create(context) { + const SKIPPED_IIFE_NODES = new Set(); + /** + * Gets the containing loop node of a specified node. + * + * We don't need to check nested functions, so this ignores those. + * `Scope.through` contains references of nested functions. + * + * @param node An AST node to get. + * @returns The containing loop node of the specified node, or `null`. + */ + function getContainingLoopNode(node) { + for (let currentNode = node; currentNode.parent; currentNode = currentNode.parent) { + const parent = currentNode.parent; + switch (parent.type) { + case utils_1.AST_NODE_TYPES.WhileStatement: + case utils_1.AST_NODE_TYPES.DoWhileStatement: + return parent; + case utils_1.AST_NODE_TYPES.ForStatement: + // `init` is outside of the loop. + if (parent.init !== currentNode) { + return parent; + } + break; + case utils_1.AST_NODE_TYPES.ForInStatement: + case utils_1.AST_NODE_TYPES.ForOfStatement: + // `right` is outside of the loop. + if (parent.right !== currentNode) { + return parent; + } + break; + case utils_1.AST_NODE_TYPES.ArrowFunctionExpression: + case utils_1.AST_NODE_TYPES.FunctionExpression: + case utils_1.AST_NODE_TYPES.FunctionDeclaration: + // We don't need to check nested functions. + // We need to check nested functions only in case of IIFE. + if (SKIPPED_IIFE_NODES.has(parent)) { + break; + } + return null; + default: + break; + } + } + return null; + } + /** + * Gets the containing loop node of a given node. + * If the loop was nested, this returns the most outer loop. + * @param node A node to get. This is a loop node. + * @param excludedNode A node that the result node should not include. + * @returns The most outer loop node. + */ + function getTopLoopNode(node, excludedNode) { + const border = excludedNode ? excludedNode.range[1] : 0; + let retv = node; + let containingLoopNode = node; + while (containingLoopNode && containingLoopNode.range[0] >= border) { + retv = containingLoopNode; + containingLoopNode = getContainingLoopNode(containingLoopNode); + } + return retv; + } + /** + * Checks whether a given reference which refers to an upper scope's variable is + * safe or not. + * @param loopNode A containing loop node. + * @param reference A reference to check. + * @returns `true` if the reference is safe or not. + */ + function isSafe(loopNode, reference) { + const variable = reference.resolved; + const definition = variable?.defs[0]; + const declaration = definition?.parent; + const kind = declaration?.type === utils_1.AST_NODE_TYPES.VariableDeclaration + ? declaration.kind + : ''; + // type references are all safe + // this only really matters for global types that haven't been configured + if (reference.isTypeReference) { + return true; + } + // Variables which are declared by `const` is safe. + if (kind === 'const') { + return true; + } + /* + * Variables which are declared by `let` in the loop is safe. + * It's a different instance from the next loop step's. + */ + if (kind === 'let' && + declaration && + declaration.range[0] > loopNode.range[0] && + declaration.range[1] < loopNode.range[1]) { + return true; + } + /* + * WriteReferences which exist after this border are unsafe because those + * can modify the variable. + */ + const border = getTopLoopNode(loopNode, kind === 'let' ? declaration : null).range[0]; + /** + * Checks whether a given reference is safe or not. + * The reference is every reference of the upper scope's variable we are + * looking now. + * + * It's safe if the reference matches one of the following condition. + * - is readonly. + * - doesn't exist inside a local function and after the border. + * + * @param upperRef A reference to check. + * @returns `true` if the reference is safe. + */ + function isSafeReference(upperRef) { + const id = upperRef.identifier; + return (!upperRef.isWrite() || + (variable?.scope.variableScope === upperRef.from.variableScope && + id.range[0] < border)); + } + return variable?.references.every(isSafeReference) ?? false; + } + /** + * Reports functions which match the following condition: + * - has a loop node in ancestors. + * - has any references which refers to an unsafe variable. + * + * @param node The AST node to check. + */ + function checkForLoops(node) { + const loopNode = getContainingLoopNode(node); + if (!loopNode) { + return; + } + const references = context.sourceCode.getScope(node).through; + if (!(node.async || node.generator) && isIIFE(node)) { + const isFunctionExpression = node.type === utils_1.AST_NODE_TYPES.FunctionExpression; + // Check if the function is referenced elsewhere in the code + const isFunctionReferenced = isFunctionExpression && node.id + ? references.some(r => r.identifier.name === node.id?.name) + : false; + if (!isFunctionReferenced) { + SKIPPED_IIFE_NODES.add(node); + return; + } + } + const unsafeRefs = references + .filter(r => r.resolved && !isSafe(loopNode, r)) + .map(r => r.identifier.name); + if (unsafeRefs.length > 0) { + context.report({ + node, + messageId: 'unsafeRefs', + data: { varNames: `'${unsafeRefs.join("', '")}'` }, + }); + } + } + return { + ArrowFunctionExpression: checkForLoops, + FunctionDeclaration: checkForLoops, + FunctionExpression: checkForLoops, + }; + }, +}); +function isIIFE(node) { + return (node.parent.type === utils_1.AST_NODE_TYPES.CallExpression && + node.parent.callee === node); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.d.ts new file mode 100644 index 0000000..686ce6b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.d.ts @@ -0,0 +1,8 @@ +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; +declare const baseRule: ReturnType; +export type Options = InferOptionsTypeFromRule>; +export type MessageIds = InferMessageIdsTypeFromRule>; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noLossOfPrecision", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-loss-of-precision.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.d.ts.map new file mode 100644 index 0000000..92254ea --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-loss-of-precision.d.ts","sourceRoot":"","sources":["../../src/rules/no-loss-of-precision.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,QAAA,MAAM,QAAQ,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAElD,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;AAC7E,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAClD,WAAW,CAAC,OAAO,QAAQ,CAAC,CAC7B,CAAC;;AAEF,wBA6BG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js new file mode 100644 index 0000000..be0362b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-loss-of-precision'); +exports.default = (0, util_1.createRule)({ + name: 'no-loss-of-precision', + meta: { + type: 'problem', + // defaultOptions, -- base rule does not use defaultOptions + deprecated: { + deprecatedSince: '8.0.0', + replacedBy: [ + { + rule: { + name: 'no-loss-of-precision', + url: 'https://eslint.org/docs/latest/rules/no-loss-of-precision', + }, + }, + ], + url: 'https://github.com/typescript-eslint/typescript-eslint/pull/8832', + }, + docs: { + description: 'Disallow literal numbers that lose precision', + extendsBaseRule: true, + }, + hasSuggestions: baseRule.meta.hasSuggestions, + messages: baseRule.meta.messages, + schema: [], + }, + defaultOptions: [], + create(context) { + return baseRule.create(context); + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.d.ts new file mode 100644 index 0000000..86de075 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.d.ts @@ -0,0 +1,28 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noMagic", [{ + detectObjects?: boolean; + enforceConst?: boolean; + ignore?: (number | string)[]; + ignoreArrayIndexes?: boolean; + ignoreEnums?: boolean; + ignoreNumericLiteralTypes?: boolean; + ignoreReadonlyClassProperties?: boolean; + ignoreTypeIndexes?: boolean; +}], unknown, { + Literal(node: TSESTree.Literal): void; +}>; +export type Options = InferOptionsTypeFromRule; +export type MessageIds = InferMessageIdsTypeFromRule; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noMagic", [{ + detectObjects?: boolean; + enforceConst?: boolean; + ignore?: (number | string)[]; + ignoreArrayIndexes?: boolean; + ignoreEnums?: boolean; + ignoreNumericLiteralTypes?: boolean; + ignoreReadonlyClassProperties?: boolean; + ignoreTypeIndexes?: boolean; +}], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-magic-numbers.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.d.ts.map new file mode 100644 index 0000000..84cf260 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-magic-numbers.d.ts","sourceRoot":"","sources":["../../src/rules/no-magic-numbers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAKzD,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAKjB,QAAA,MAAM,QAAQ;;;;;;;;;;;EAAwC,CAAC;AAEvD,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC,OAAO,QAAQ,CAAC,CAAC;;;;;;;;;;;AA+BtE,wBAgGG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js new file mode 100644 index 0000000..4b46792 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js @@ -0,0 +1,248 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-magic-numbers'); +// Extend base schema with additional property to ignore TS numeric literal types +const schema = (0, util_1.deepMerge)( +// eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- https://github.com/microsoft/TypeScript/issues/17002 +Array.isArray(baseRule.meta.schema) + ? baseRule.meta.schema[0] + : baseRule.meta.schema, { + properties: { + ignoreEnums: { + type: 'boolean', + description: 'Whether enums used in TypeScript are considered okay.', + }, + ignoreNumericLiteralTypes: { + type: 'boolean', + description: 'Whether numbers used in TypeScript numeric literal types are considered okay.', + }, + ignoreReadonlyClassProperties: { + type: 'boolean', + description: 'Whether `readonly` class properties are considered okay.', + }, + ignoreTypeIndexes: { + type: 'boolean', + description: 'Whether numbers used to index types are okay.', + }, + }, +}); +exports.default = (0, util_1.createRule)({ + name: 'no-magic-numbers', + meta: { + type: 'suggestion', + // defaultOptions, -- base rule does not use defaultOptions + docs: { + description: 'Disallow magic numbers', + extendsBaseRule: true, + frozen: true, + }, + messages: baseRule.meta.messages, + schema: [schema], + }, + defaultOptions: [ + { + detectObjects: false, + enforceConst: false, + ignore: [], + ignoreArrayIndexes: false, + ignoreEnums: false, + ignoreNumericLiteralTypes: false, + ignoreReadonlyClassProperties: false, + ignoreTypeIndexes: false, + }, + ], + create(context, [options]) { + const rules = baseRule.create(context); + const ignored = new Set((options.ignore ?? []).map(normalizeIgnoreValue)); + return { + Literal(node) { + // If it’s not a numeric literal we’re not interested + if (typeof node.value !== 'number' && typeof node.value !== 'bigint') { + return; + } + // This will be `true` if we’re configured to ignore this case (eg. it’s + // an enum and `ignoreEnums` is `true`). It will be `false` if we’re not + // configured to ignore this case. It will remain `undefined` if this is + // not one of our exception cases, and we’ll fall back to the base rule. + let isAllowed; + // Check if the node is ignored + if (ignored.has(normalizeLiteralValue(node, node.value))) { + isAllowed = true; + } + // Check if the node is a TypeScript enum declaration + else if (isParentTSEnumDeclaration(node)) { + isAllowed = options.ignoreEnums === true; + } + // Check TypeScript specific nodes for Numeric Literal + else if (isTSNumericLiteralType(node)) { + isAllowed = options.ignoreNumericLiteralTypes === true; + } + // Check if the node is a type index + else if (isAncestorTSIndexedAccessType(node)) { + isAllowed = options.ignoreTypeIndexes === true; + } + // Check if the node is a readonly class property + else if (isParentTSReadonlyPropertyDefinition(node)) { + isAllowed = options.ignoreReadonlyClassProperties === true; + } + // If we’ve hit a case where the ignore option is true we can return now + if (isAllowed === true) { + return; + } + // If the ignore option is *not* set we can report it now + if (isAllowed === false) { + let fullNumberNode = node; + let raw = node.raw; + if (node.parent.type === utils_1.AST_NODE_TYPES.UnaryExpression && + // the base rule only shows the operator for negative numbers + // https://github.com/eslint/eslint/blob/9dfc8501fb1956c90dc11e6377b4cb38a6bea65d/lib/rules/no-magic-numbers.js#L126 + node.parent.operator === '-') { + fullNumberNode = node.parent; + raw = `${node.parent.operator}${node.raw}`; + } + context.report({ + node: fullNumberNode, + messageId: 'noMagic', + data: { raw }, + }); + return; + } + // Let the base rule deal with the rest + rules.Literal(node); + }, + }; + }, +}); +/** + * Convert the value to bigint if it's a string. Otherwise, return the value as-is. + * @param value The value to normalize. + * @returns The normalized value. + */ +function normalizeIgnoreValue(value) { + if (typeof value === 'string') { + return BigInt(value.slice(0, -1)); + } + return value; +} +/** + * Converts the node to its numeric value, handling prefixed numbers (-1 / +1) + * @param node the node to normalize. + * @param value the node's value. + */ +function normalizeLiteralValue(node, value) { + if (node.parent.type === utils_1.AST_NODE_TYPES.UnaryExpression && + ['-', '+'].includes(node.parent.operator) && + node.parent.operator === '-') { + return -value; + } + return value; +} +/** + * Gets the true parent of the literal, handling prefixed numbers (-1 / +1) + */ +function getLiteralParent(node) { + if (node.parent.type === utils_1.AST_NODE_TYPES.UnaryExpression && + ['-', '+'].includes(node.parent.operator)) { + return node.parent.parent; + } + return node.parent; +} +/** + * Checks if the node grandparent is a Typescript type alias declaration + * @param node the node to be validated. + * @returns true if the node grandparent is a Typescript type alias declaration + * @private + */ +function isGrandparentTSTypeAliasDeclaration(node) { + return node.parent?.parent?.type === utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration; +} +/** + * Checks if the node grandparent is a Typescript union type and its parent is a type alias declaration + * @param node the node to be validated. + * @returns true if the node grandparent is a Typescript union type and its parent is a type alias declaration + * @private + */ +function isGrandparentTSUnionType(node) { + if (node.parent?.parent?.type === utils_1.AST_NODE_TYPES.TSUnionType) { + return isGrandparentTSTypeAliasDeclaration(node.parent); + } + return false; +} +/** + * Checks if the node parent is a Typescript enum member + * @param node the node to be validated. + * @returns true if the node parent is a Typescript enum member + * @private + */ +function isParentTSEnumDeclaration(node) { + const parent = getLiteralParent(node); + return parent?.type === utils_1.AST_NODE_TYPES.TSEnumMember; +} +/** + * Checks if the node parent is a Typescript literal type + * @param node the node to be validated. + * @returns true if the node parent is a Typescript literal type + * @private + */ +function isParentTSLiteralType(node) { + return node.parent?.type === utils_1.AST_NODE_TYPES.TSLiteralType; +} +/** + * Checks if the node is a valid TypeScript numeric literal type. + * @param node the node to be validated. + * @returns true if the node is a TypeScript numeric literal type. + * @private + */ +function isTSNumericLiteralType(node) { + // For negative numbers, use the parent node + if (node.parent?.type === utils_1.AST_NODE_TYPES.UnaryExpression && + node.parent.operator === '-') { + node = node.parent; + } + // If the parent node is not a TSLiteralType, early return + if (!isParentTSLiteralType(node)) { + return false; + } + // If the grandparent is a TSTypeAliasDeclaration, ignore + if (isGrandparentTSTypeAliasDeclaration(node)) { + return true; + } + // If the grandparent is a TSUnionType and it's parent is a TSTypeAliasDeclaration, ignore + if (isGrandparentTSUnionType(node)) { + return true; + } + return false; +} +/** + * Checks if the node parent is a readonly class property + * @param node the node to be validated. + * @returns true if the node parent is a readonly class property + * @private + */ +function isParentTSReadonlyPropertyDefinition(node) { + const parent = getLiteralParent(node); + if (parent?.type === utils_1.AST_NODE_TYPES.PropertyDefinition && parent.readonly) { + return true; + } + return false; +} +/** + * Checks if the node is part of a type indexed access (eg. Foo[4]) + * @param node the node to be validated. + * @returns true if the node is part of an indexed access + * @private + */ +function isAncestorTSIndexedAccessType(node) { + // Handle unary expressions (eg. -4) + let ancestor = getLiteralParent(node); + // Go up another level while we’re part of a type union (eg. 1 | 2) or + // intersection (eg. 1 & 2) + while (ancestor?.parent?.type === utils_1.AST_NODE_TYPES.TSUnionType || + ancestor?.parent?.type === utils_1.AST_NODE_TYPES.TSIntersectionType) { + ancestor = ancestor.parent; + } + return ancestor?.parent?.type === utils_1.AST_NODE_TYPES.TSIndexedAccessType; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.d.ts new file mode 100644 index 0000000..bf79e41 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.d.ts @@ -0,0 +1,9 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type Options = [ + { + checkNever: boolean; + } +]; +declare const _default: TSESLint.RuleModule<"meaninglessVoidOperator" | "removeVoid", Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=no-meaningless-void-operator.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.d.ts.map new file mode 100644 index 0000000..8a049e6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-meaningless-void-operator.d.ts","sourceRoot":"","sources":["../../src/rules/no-meaningless-void-operator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAQnE,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,UAAU,EAAE,OAAO,CAAC;KACrB;CACF,CAAC;;AAEF,wBA6EG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js new file mode 100644 index 0000000..f714d9a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js @@ -0,0 +1,103 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-meaningless-void-operator', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow the `void` operator except when used to discard a value', + recommended: 'strict', + requiresTypeChecking: true, + }, + fixable: 'code', + hasSuggestions: true, + messages: { + meaninglessVoidOperator: "void operator shouldn't be used on {{type}}; it should convey that a return value is being ignored", + removeVoid: "Remove 'void'", + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + checkNever: { + type: 'boolean', + description: 'Whether to suggest removing `void` when the argument has type `never`.', + }, + }, + }, + ], + }, + defaultOptions: [{ checkNever: false }], + create(context, [{ checkNever }]) { + const services = utils_1.ESLintUtils.getParserServices(context); + const checker = services.program.getTypeChecker(); + return { + 'UnaryExpression[operator="void"]'(node) { + const fix = (fixer) => { + return fixer.removeRange([ + context.sourceCode.getTokens(node)[0].range[0], + context.sourceCode.getTokens(node)[1].range[0], + ]); + }; + const argType = services.getTypeAtLocation(node.argument); + const unionParts = tsutils.unionConstituents(argType); + if (unionParts.every(part => part.flags & (ts.TypeFlags.Void | ts.TypeFlags.Undefined))) { + context.report({ + node, + messageId: 'meaninglessVoidOperator', + data: { type: checker.typeToString(argType) }, + fix, + }); + } + else if (checkNever && + unionParts.every(part => part.flags & + (ts.TypeFlags.Void | ts.TypeFlags.Undefined | ts.TypeFlags.Never))) { + context.report({ + node, + messageId: 'meaninglessVoidOperator', + data: { type: checker.typeToString(argType) }, + suggest: [{ messageId: 'removeVoid', fix }], + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.d.ts new file mode 100644 index 0000000..49f4a99 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"errorMessageClass" | "errorMessageInterface", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-misused-new.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.d.ts.map new file mode 100644 index 0000000..2a95248 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-misused-new.d.ts","sourceRoot":"","sources":["../../src/rules/no-misused-new.ts"],"names":[],"mappings":";AAMA,wBA2GG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js new file mode 100644 index 0000000..f13083d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js @@ -0,0 +1,81 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-misused-new', + meta: { + type: 'problem', + docs: { + description: 'Enforce valid definition of `new` and `constructor`', + recommended: 'recommended', + }, + messages: { + errorMessageClass: 'Class cannot have method named `new`.', + errorMessageInterface: 'Interfaces cannot be constructed, only classes.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + /** + * @param node type to be inspected. + * @returns name of simple type or null + */ + function getTypeReferenceName(node) { + if (node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.TSTypeAnnotation: + return getTypeReferenceName(node.typeAnnotation); + case utils_1.AST_NODE_TYPES.TSTypeReference: + return getTypeReferenceName(node.typeName); + case utils_1.AST_NODE_TYPES.Identifier: + return node.name; + default: + break; + } + } + return null; + } + /** + * @param parent parent node. + * @param returnType type to be compared + */ + function isMatchingParentType(parent, returnType) { + if (parent && + (parent.type === utils_1.AST_NODE_TYPES.ClassDeclaration || + parent.type === utils_1.AST_NODE_TYPES.ClassExpression || + parent.type === utils_1.AST_NODE_TYPES.TSInterfaceDeclaration) && + parent.id) { + return getTypeReferenceName(returnType) === parent.id.name; + } + return false; + } + return { + "ClassBody > MethodDefinition[key.name='new']"(node) { + if (node.value.type === utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression && + isMatchingParentType(node.parent.parent, node.value.returnType)) { + context.report({ + node, + messageId: 'errorMessageClass', + }); + } + }, + 'TSInterfaceBody > TSConstructSignatureDeclaration'(node) { + if (isMatchingParentType(node.parent.parent, node.returnType)) { + // constructor + context.report({ + node, + messageId: 'errorMessageInterface', + }); + } + }, + "TSMethodSignature[key.name='constructor']"(node) { + context.report({ + node, + messageId: 'errorMessageInterface', + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.d.ts new file mode 100644 index 0000000..1ded549 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.d.ts @@ -0,0 +1,20 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type Options = [ + { + checksConditionals?: boolean; + checksSpreads?: boolean; + checksVoidReturn?: boolean | ChecksVoidReturnOptions; + } +]; +export interface ChecksVoidReturnOptions { + arguments?: boolean; + attributes?: boolean; + inheritedMethods?: boolean; + properties?: boolean; + returns?: boolean; + variables?: boolean; +} +export type MessageId = 'conditional' | 'predicate' | 'spread' | 'voidReturnArgument' | 'voidReturnAttribute' | 'voidReturnInheritedMethod' | 'voidReturnProperty' | 'voidReturnReturnValue' | 'voidReturnVariable'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-misused-promises.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.d.ts.map new file mode 100644 index 0000000..3dd776f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-misused-promises.d.ts","sourceRoot":"","sources":["../../src/rules/no-misused-promises.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAiBnE,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,gBAAgB,CAAC,EAAE,OAAO,GAAG,uBAAuB,CAAC;KACtD;CACF,CAAC;AAEF,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,SAAS,GACjB,aAAa,GACb,WAAW,GACX,QAAQ,GACR,oBAAoB,GACpB,qBAAqB,GACrB,2BAA2B,GAC3B,oBAAoB,GACpB,uBAAuB,GACvB,oBAAoB,CAAC;;AAgCzB,wBAgmBG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js new file mode 100644 index 0000000..9e78e6f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js @@ -0,0 +1,753 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +function parseChecksVoidReturn(checksVoidReturn) { + switch (checksVoidReturn) { + case false: + return false; + case true: + case undefined: + return { + arguments: true, + attributes: true, + inheritedMethods: true, + properties: true, + returns: true, + variables: true, + }; + default: + return { + arguments: checksVoidReturn.arguments ?? true, + attributes: checksVoidReturn.attributes ?? true, + inheritedMethods: checksVoidReturn.inheritedMethods ?? true, + properties: checksVoidReturn.properties ?? true, + returns: checksVoidReturn.returns ?? true, + variables: checksVoidReturn.variables ?? true, + }; + } +} +exports.default = (0, util_1.createRule)({ + name: 'no-misused-promises', + meta: { + type: 'problem', + docs: { + description: 'Disallow Promises in places not designed to handle them', + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + conditional: 'Expected non-Promise value in a boolean conditional.', + predicate: 'Expected a non-Promise value to be returned.', + spread: 'Expected a non-Promise value to be spreaded in an object.', + voidReturnArgument: 'Promise returned in function argument where a void return was expected.', + voidReturnAttribute: 'Promise-returning function provided to attribute where a void return was expected.', + voidReturnInheritedMethod: "Promise-returning method provided where a void return was expected by extended/implemented type '{{ heritageTypeName }}'.", + voidReturnProperty: 'Promise-returning function provided to property where a void return was expected.', + voidReturnReturnValue: 'Promise-returning function provided to return value where a void return was expected.', + voidReturnVariable: 'Promise-returning function provided to variable where a void return was expected.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + checksConditionals: { + type: 'boolean', + description: 'Whether to warn when a Promise is provided to conditional statements.', + }, + checksSpreads: { + type: 'boolean', + description: 'Whether to warn when `...` spreading a `Promise`.', + }, + checksVoidReturn: { + description: 'Whether to warn when a Promise is returned from a function typed as returning `void`.', + oneOf: [ + { + type: 'boolean', + description: 'Whether to disable checking all asynchronous functions.', + }, + { + type: 'object', + additionalProperties: false, + description: 'Which forms of functions may have checking disabled.', + properties: { + arguments: { + type: 'boolean', + description: 'Disables checking an asynchronous function passed as argument where the parameter type expects a function that returns `void`.', + }, + attributes: { + type: 'boolean', + description: 'Disables checking an asynchronous function passed as a JSX attribute expected to be a function that returns `void`.', + }, + inheritedMethods: { + type: 'boolean', + description: 'Disables checking an asynchronous method in a type that extends or implements another type expecting that method to return `void`.', + }, + properties: { + type: 'boolean', + description: 'Disables checking an asynchronous function passed as an object property expected to be a function that returns `void`.', + }, + returns: { + type: 'boolean', + description: 'Disables checking an asynchronous function returned in a function whose return type is a function that returns `void`.', + }, + variables: { + type: 'boolean', + description: 'Disables checking an asynchronous function used as a variable whose return type is a function that returns `void`.', + }, + }, + }, + ], + }, + }, + }, + ], + }, + defaultOptions: [ + { + checksConditionals: true, + checksSpreads: true, + checksVoidReturn: true, + }, + ], + create(context, [{ checksConditionals, checksSpreads, checksVoidReturn }]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const checkedNodes = new Set(); + const conditionalChecks = { + 'CallExpression > MemberExpression': checkArrayPredicates, + ConditionalExpression: checkTestConditional, + DoWhileStatement: checkTestConditional, + ForStatement: checkTestConditional, + IfStatement: checkTestConditional, + LogicalExpression: checkConditional, + 'UnaryExpression[operator="!"]'(node) { + checkConditional(node.argument, true); + }, + WhileStatement: checkTestConditional, + }; + checksVoidReturn = parseChecksVoidReturn(checksVoidReturn); + const voidReturnChecks = checksVoidReturn + ? { + ...(checksVoidReturn.arguments && { + CallExpression: checkArguments, + NewExpression: checkArguments, + }), + ...(checksVoidReturn.attributes && { + JSXAttribute: checkJSXAttribute, + }), + ...(checksVoidReturn.inheritedMethods && { + ClassDeclaration: checkClassLikeOrInterfaceNode, + ClassExpression: checkClassLikeOrInterfaceNode, + TSInterfaceDeclaration: checkClassLikeOrInterfaceNode, + }), + ...(checksVoidReturn.properties && { + Property: checkProperty, + }), + ...(checksVoidReturn.returns && { + ReturnStatement: checkReturnStatement, + }), + ...(checksVoidReturn.variables && { + AssignmentExpression: checkAssignment, + VariableDeclarator: checkVariableDeclaration, + }), + } + : {}; + const spreadChecks = { + SpreadElement: checkSpread, + }; + /** + * A syntactic check to see if an annotated type is maybe a function type. + * This is a perf optimization to help avoid requesting types where possible + */ + function isPossiblyFunctionType(node) { + switch (node.typeAnnotation.type) { + case utils_1.AST_NODE_TYPES.TSConditionalType: + case utils_1.AST_NODE_TYPES.TSConstructorType: + case utils_1.AST_NODE_TYPES.TSFunctionType: + case utils_1.AST_NODE_TYPES.TSImportType: + case utils_1.AST_NODE_TYPES.TSIndexedAccessType: + case utils_1.AST_NODE_TYPES.TSInferType: + case utils_1.AST_NODE_TYPES.TSIntersectionType: + case utils_1.AST_NODE_TYPES.TSQualifiedName: + case utils_1.AST_NODE_TYPES.TSThisType: + case utils_1.AST_NODE_TYPES.TSTypeOperator: + case utils_1.AST_NODE_TYPES.TSTypeQuery: + case utils_1.AST_NODE_TYPES.TSTypeReference: + case utils_1.AST_NODE_TYPES.TSUnionType: + return true; + case utils_1.AST_NODE_TYPES.TSTypeLiteral: + return node.typeAnnotation.members.some(member => member.type === utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration || + member.type === utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration); + case utils_1.AST_NODE_TYPES.TSAbstractKeyword: + case utils_1.AST_NODE_TYPES.TSAnyKeyword: + case utils_1.AST_NODE_TYPES.TSArrayType: + case utils_1.AST_NODE_TYPES.TSAsyncKeyword: + case utils_1.AST_NODE_TYPES.TSBigIntKeyword: + case utils_1.AST_NODE_TYPES.TSBooleanKeyword: + case utils_1.AST_NODE_TYPES.TSDeclareKeyword: + case utils_1.AST_NODE_TYPES.TSExportKeyword: + case utils_1.AST_NODE_TYPES.TSIntrinsicKeyword: + case utils_1.AST_NODE_TYPES.TSLiteralType: + case utils_1.AST_NODE_TYPES.TSMappedType: + case utils_1.AST_NODE_TYPES.TSNamedTupleMember: + case utils_1.AST_NODE_TYPES.TSNeverKeyword: + case utils_1.AST_NODE_TYPES.TSNullKeyword: + case utils_1.AST_NODE_TYPES.TSNumberKeyword: + case utils_1.AST_NODE_TYPES.TSObjectKeyword: + case utils_1.AST_NODE_TYPES.TSOptionalType: + case utils_1.AST_NODE_TYPES.TSPrivateKeyword: + case utils_1.AST_NODE_TYPES.TSProtectedKeyword: + case utils_1.AST_NODE_TYPES.TSPublicKeyword: + case utils_1.AST_NODE_TYPES.TSReadonlyKeyword: + case utils_1.AST_NODE_TYPES.TSRestType: + case utils_1.AST_NODE_TYPES.TSStaticKeyword: + case utils_1.AST_NODE_TYPES.TSStringKeyword: + case utils_1.AST_NODE_TYPES.TSSymbolKeyword: + case utils_1.AST_NODE_TYPES.TSTemplateLiteralType: + case utils_1.AST_NODE_TYPES.TSTupleType: + case utils_1.AST_NODE_TYPES.TSTypePredicate: + case utils_1.AST_NODE_TYPES.TSUndefinedKeyword: + case utils_1.AST_NODE_TYPES.TSUnknownKeyword: + case utils_1.AST_NODE_TYPES.TSVoidKeyword: + return false; + } + } + function checkTestConditional(node) { + if (node.test) { + checkConditional(node.test, true); + } + } + /** + * This function analyzes the type of a node and checks if it is a Promise in a boolean conditional. + * It uses recursion when checking nested logical operators. + * @param node The AST node to check. + * @param isTestExpr Whether the node is a descendant of a test expression. + */ + function checkConditional(node, isTestExpr = false) { + // prevent checking the same node multiple times + if (checkedNodes.has(node)) { + return; + } + checkedNodes.add(node); + if (node.type === utils_1.AST_NODE_TYPES.LogicalExpression) { + // ignore the left operand for nullish coalescing expressions not in a context of a test expression + if (node.operator !== '??' || isTestExpr) { + checkConditional(node.left, isTestExpr); + } + // we ignore the right operand when not in a context of a test expression + if (isTestExpr) { + checkConditional(node.right, isTestExpr); + } + return; + } + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + if (isAlwaysThenable(checker, tsNode)) { + context.report({ + node, + messageId: 'conditional', + }); + } + } + function checkArrayPredicates(node) { + const parent = node.parent; + if (parent.type === utils_1.AST_NODE_TYPES.CallExpression) { + const callback = parent.arguments.at(0); + if (callback && + (0, util_1.isArrayMethodCallWithPredicate)(context, services, parent)) { + const type = services.esTreeNodeToTSNodeMap.get(callback); + if (returnsThenable(checker, type)) { + context.report({ + node: callback, + messageId: 'predicate', + }); + } + } + } + } + function checkArguments(node) { + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + const voidArgs = voidFunctionArguments(checker, tsNode); + if (voidArgs.size === 0) { + return; + } + for (const [index, argument] of node.arguments.entries()) { + if (!voidArgs.has(index)) { + continue; + } + const tsNode = services.esTreeNodeToTSNodeMap.get(argument); + if (returnsThenable(checker, tsNode)) { + context.report({ + node: argument, + messageId: 'voidReturnArgument', + }); + } + } + } + function checkAssignment(node) { + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + const varType = services.getTypeAtLocation(node.left); + if (!isVoidReturningFunctionType(checker, tsNode.left, varType)) { + return; + } + if (returnsThenable(checker, tsNode.right)) { + context.report({ + node: node.right, + messageId: 'voidReturnVariable', + }); + } + } + function checkVariableDeclaration(node) { + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + if (tsNode.initializer == null || + node.init == null || + node.id.typeAnnotation == null) { + return; + } + // syntactically ignore some known-good cases to avoid touching type info + if (!isPossiblyFunctionType(node.id.typeAnnotation)) { + return; + } + const varType = services.getTypeAtLocation(node.id); + if (!isVoidReturningFunctionType(checker, tsNode.initializer, varType)) { + return; + } + if (returnsThenable(checker, tsNode.initializer)) { + context.report({ + node: node.init, + messageId: 'voidReturnVariable', + }); + } + } + function checkProperty(node) { + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + if (ts.isPropertyAssignment(tsNode)) { + const contextualType = checker.getContextualType(tsNode.initializer); + if (contextualType != null && + isVoidReturningFunctionType(checker, tsNode.initializer, contextualType) && + returnsThenable(checker, tsNode.initializer)) { + if ((0, util_1.isFunction)(node.value)) { + const functionNode = node.value; + if (functionNode.returnType) { + context.report({ + node: functionNode.returnType.typeAnnotation, + messageId: 'voidReturnProperty', + }); + } + else { + context.report({ + loc: (0, util_1.getFunctionHeadLoc)(functionNode, context.sourceCode), + messageId: 'voidReturnProperty', + }); + } + } + else { + context.report({ + node: node.value, + messageId: 'voidReturnProperty', + }); + } + } + } + else if (ts.isShorthandPropertyAssignment(tsNode)) { + const contextualType = checker.getContextualType(tsNode.name); + if (contextualType != null && + isVoidReturningFunctionType(checker, tsNode.name, contextualType) && + returnsThenable(checker, tsNode.name)) { + context.report({ + node: node.value, + messageId: 'voidReturnProperty', + }); + } + } + else if (ts.isMethodDeclaration(tsNode)) { + if (ts.isComputedPropertyName(tsNode.name)) { + return; + } + const obj = tsNode.parent; + // Below condition isn't satisfied unless something goes wrong, + // but is needed for type checking. + // 'node' does not include class method declaration so 'obj' is + // always an object literal expression, but after converting 'node' + // to TypeScript AST, its type includes MethodDeclaration which + // does include the case of class method declaration. + if (!ts.isObjectLiteralExpression(obj)) { + return; + } + if (!returnsThenable(checker, tsNode)) { + return; + } + const objType = checker.getContextualType(obj); + if (objType == null) { + return; + } + const propertySymbol = checker.getPropertyOfType(objType, tsNode.name.text); + if (propertySymbol == null) { + return; + } + const contextualType = checker.getTypeOfSymbolAtLocation(propertySymbol, tsNode.name); + if (isVoidReturningFunctionType(checker, tsNode.name, contextualType)) { + const functionNode = node.value; + if (functionNode.returnType) { + context.report({ + node: functionNode.returnType.typeAnnotation, + messageId: 'voidReturnProperty', + }); + } + else { + context.report({ + loc: (0, util_1.getFunctionHeadLoc)(functionNode, context.sourceCode), + messageId: 'voidReturnProperty', + }); + } + } + return; + } + } + function checkReturnStatement(node) { + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + if (tsNode.expression == null || node.argument == null) { + return; + } + // syntactically ignore some known-good cases to avoid touching type info + const functionNode = (() => { + let current = node.parent; + while (current && !(0, util_1.isFunction)(current)) { + current = current.parent; + } + return (0, util_1.nullThrows)(current, util_1.NullThrowsReasons.MissingParent); + })(); + if (functionNode.returnType && + !isPossiblyFunctionType(functionNode.returnType)) { + return; + } + const contextualType = checker.getContextualType(tsNode.expression); + if (contextualType != null && + isVoidReturningFunctionType(checker, tsNode.expression, contextualType) && + returnsThenable(checker, tsNode.expression)) { + context.report({ + node: node.argument, + messageId: 'voidReturnReturnValue', + }); + } + } + function checkClassLikeOrInterfaceNode(node) { + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + const heritageTypes = getHeritageTypes(checker, tsNode); + if (!heritageTypes?.length) { + return; + } + for (const nodeMember of tsNode.members) { + const memberName = nodeMember.name?.getText(); + if (memberName == null) { + // Call/construct/index signatures don't have names. TS allows call signatures to mismatch, + // and construct signatures can't be async. + // TODO - Once we're able to use `checker.isTypeAssignableTo` (v8), we can check an index + // signature here against its compatible index signatures in `heritageTypes` + continue; + } + if (!returnsThenable(checker, nodeMember)) { + continue; + } + const node = services.tsNodeToESTreeNodeMap.get(nodeMember); + if (isStaticMember(node)) { + continue; + } + for (const heritageType of heritageTypes) { + checkHeritageTypeForMemberReturningVoid(nodeMember, heritageType, memberName); + } + } + } + /** + * Checks `heritageType` for a member named `memberName` that returns void; reports the + * 'voidReturnInheritedMethod' message if found. + * @param nodeMember Node member that returns a Promise + * @param heritageType Heritage type to check against + * @param memberName Name of the member to check for + */ + function checkHeritageTypeForMemberReturningVoid(nodeMember, heritageType, memberName) { + const heritageMember = getMemberIfExists(heritageType, memberName); + if (heritageMember == null) { + return; + } + const memberType = checker.getTypeOfSymbolAtLocation(heritageMember, nodeMember); + if (!isVoidReturningFunctionType(checker, nodeMember, memberType)) { + return; + } + context.report({ + node: services.tsNodeToESTreeNodeMap.get(nodeMember), + messageId: 'voidReturnInheritedMethod', + data: { heritageTypeName: checker.typeToString(heritageType) }, + }); + } + function checkJSXAttribute(node) { + if (node.value == null || + node.value.type !== utils_1.AST_NODE_TYPES.JSXExpressionContainer) { + return; + } + const expressionContainer = services.esTreeNodeToTSNodeMap.get(node.value); + const expression = services.esTreeNodeToTSNodeMap.get(node.value.expression); + const contextualType = checker.getContextualType(expressionContainer); + if (contextualType != null && + isVoidReturningFunctionType(checker, expressionContainer, contextualType) && + returnsThenable(checker, expression)) { + context.report({ + node: node.value, + messageId: 'voidReturnAttribute', + }); + } + } + function checkSpread(node) { + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + if (isSometimesThenable(checker, tsNode.expression)) { + context.report({ + node: node.argument, + messageId: 'spread', + }); + } + } + return { + ...(checksConditionals ? conditionalChecks : {}), + ...(checksVoidReturn ? voidReturnChecks : {}), + ...(checksSpreads ? spreadChecks : {}), + }; + }, +}); +function isSometimesThenable(checker, node) { + const type = checker.getTypeAtLocation(node); + for (const subType of tsutils.unionConstituents(checker.getApparentType(type))) { + if (tsutils.isThenableType(checker, node, subType)) { + return true; + } + } + return false; +} +// Variation on the thenable check which requires all forms of the type (read: +// alternates in a union) to be thenable. Otherwise, you might be trying to +// check if something is defined or undefined and get caught because one of the +// branches is thenable. +function isAlwaysThenable(checker, node) { + const type = checker.getTypeAtLocation(node); + for (const subType of tsutils.unionConstituents(checker.getApparentType(type))) { + const thenProp = subType.getProperty('then'); + // If one of the alternates has no then property, it is not thenable in all + // cases. + if (thenProp == null) { + return false; + } + // We walk through each variation of the then property. Since we know it + // exists at this point, we just need at least one of the alternates to + // be of the right form to consider it thenable. + const thenType = checker.getTypeOfSymbolAtLocation(thenProp, node); + let hasThenableSignature = false; + for (const subType of tsutils.unionConstituents(thenType)) { + for (const signature of subType.getCallSignatures()) { + if (signature.parameters.length !== 0 && + isFunctionParam(checker, signature.parameters[0], node)) { + hasThenableSignature = true; + break; + } + } + // We only need to find one variant of the then property that has a + // function signature for it to be thenable. + if (hasThenableSignature) { + break; + } + } + // If no flavors of the then property are thenable, we don't consider the + // overall type to be thenable + if (!hasThenableSignature) { + return false; + } + } + // If all variants are considered thenable (i.e. haven't returned false), we + // consider the overall type thenable + return true; +} +function isFunctionParam(checker, param, node) { + const type = checker.getApparentType(checker.getTypeOfSymbolAtLocation(param, node)); + for (const subType of tsutils.unionConstituents(type)) { + if (subType.getCallSignatures().length !== 0) { + return true; + } + } + return false; +} +function checkThenableOrVoidArgument(checker, node, type, index, thenableReturnIndices, voidReturnIndices) { + if (isThenableReturningFunctionType(checker, node.expression, type)) { + thenableReturnIndices.add(index); + } + else if (isVoidReturningFunctionType(checker, node.expression, type) && + // If a certain argument accepts both thenable and void returns, + // a promise-returning function is valid + !thenableReturnIndices.has(index)) { + voidReturnIndices.add(index); + } + const contextualType = checker.getContextualTypeForArgumentAtIndex(node, index); + if (contextualType !== type) { + checkThenableOrVoidArgument(checker, node, contextualType, index, thenableReturnIndices, voidReturnIndices); + } +} +// Get the positions of arguments which are void functions (and not also +// thenable functions). These are the candidates for the void-return check at +// the current call site. +// If the function parameters end with a 'rest' parameter, then we consider +// the array type parameter (e.g. '...args:Array') when determining +// if trailing arguments are candidates. +function voidFunctionArguments(checker, node) { + // 'new' can be used without any arguments, as in 'let b = new Object;' + // In this case, there are no argument positions to check, so return early. + if (!node.arguments) { + return new Set(); + } + const thenableReturnIndices = new Set(); + const voidReturnIndices = new Set(); + const type = checker.getTypeAtLocation(node.expression); + // We can't use checker.getResolvedSignature because it prefers an early '() => void' over a later '() => Promise' + // See https://github.com/microsoft/TypeScript/issues/48077 + for (const subType of tsutils.unionConstituents(type)) { + // Standard function calls and `new` have two different types of signatures + const signatures = ts.isCallExpression(node) + ? subType.getCallSignatures() + : subType.getConstructSignatures(); + for (const signature of signatures) { + for (const [index, parameter] of signature.parameters.entries()) { + const decl = parameter.valueDeclaration; + let type = checker.getTypeOfSymbolAtLocation(parameter, node.expression); + // If this is a array 'rest' parameter, check all of the argument indices + // from the current argument to the end. + if (decl && (0, util_1.isRestParameterDeclaration)(decl)) { + if (checker.isArrayType(type)) { + // Unwrap 'Array' to 'MaybeVoidFunction', + // so that we'll handle it in the same way as a non-rest + // 'param: MaybeVoidFunction' + type = checker.getTypeArguments(type)[0]; + for (let i = index; i < node.arguments.length; i++) { + checkThenableOrVoidArgument(checker, node, type, i, thenableReturnIndices, voidReturnIndices); + } + } + else if (checker.isTupleType(type)) { + // Check each type in the tuple - for example, [boolean, () => void] would + // add the index of the second tuple parameter to 'voidReturnIndices' + const typeArgs = checker.getTypeArguments(type); + for (let i = index; i < node.arguments.length && i - index < typeArgs.length; i++) { + checkThenableOrVoidArgument(checker, node, typeArgs[i - index], i, thenableReturnIndices, voidReturnIndices); + } + } + } + else { + checkThenableOrVoidArgument(checker, node, type, index, thenableReturnIndices, voidReturnIndices); + } + } + } + } + for (const index of thenableReturnIndices) { + voidReturnIndices.delete(index); + } + return voidReturnIndices; +} +/** + * @returns Whether any call signature of the type has a thenable return type. + */ +function anySignatureIsThenableType(checker, node, type) { + for (const signature of type.getCallSignatures()) { + const returnType = signature.getReturnType(); + if (tsutils.isThenableType(checker, node, returnType)) { + return true; + } + } + return false; +} +/** + * @returns Whether type is a thenable-returning function. + */ +function isThenableReturningFunctionType(checker, node, type) { + for (const subType of tsutils.unionConstituents(type)) { + if (anySignatureIsThenableType(checker, node, subType)) { + return true; + } + } + return false; +} +/** + * @returns Whether type is a void-returning function. + */ +function isVoidReturningFunctionType(checker, node, type) { + let hadVoidReturn = false; + for (const subType of tsutils.unionConstituents(type)) { + for (const signature of subType.getCallSignatures()) { + const returnType = signature.getReturnType(); + // If a certain positional argument accepts both thenable and void returns, + // a promise-returning function is valid + if (tsutils.isThenableType(checker, node, returnType)) { + return false; + } + hadVoidReturn ||= tsutils.isTypeFlagSet(returnType, ts.TypeFlags.Void); + } + } + return hadVoidReturn; +} +/** + * @returns Whether expression is a function that returns a thenable. + */ +function returnsThenable(checker, node) { + const type = checker.getApparentType(checker.getTypeAtLocation(node)); + return tsutils + .unionConstituents(type) + .some(t => anySignatureIsThenableType(checker, node, t)); +} +function getHeritageTypes(checker, tsNode) { + return tsNode.heritageClauses + ?.flatMap(clause => clause.types) + .map(typeExpression => checker.getTypeAtLocation(typeExpression)); +} +/** + * @returns The member with the given name in `type`, if it exists. + */ +function getMemberIfExists(type, memberName) { + const escapedMemberName = ts.escapeLeadingUnderscores(memberName); + const symbolMemberMatch = type.getSymbol()?.members?.get(escapedMemberName); + return (symbolMemberMatch ?? tsutils.getPropertyOfType(type, escapedMemberName)); +} +function isStaticMember(node) { + return ((node.type === utils_1.AST_NODE_TYPES.MethodDefinition || + node.type === utils_1.AST_NODE_TYPES.PropertyDefinition || + node.type === utils_1.AST_NODE_TYPES.AccessorProperty) && + node.static); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.d.ts new file mode 100644 index 0000000..b3ad9f9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.d.ts @@ -0,0 +1,11 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +import type { TypeOrValueSpecifier } from '../util'; +type Options = [ + { + allow?: TypeOrValueSpecifier[]; + } +]; +type MessageIds = 'addAwait' | 'noArraySpreadInObject' | 'noClassDeclarationSpreadInObject' | 'noClassInstanceSpreadInObject' | 'noFunctionSpreadInObject' | 'noIterableSpreadInObject' | 'noMapSpreadInObject' | 'noPromiseSpreadInObject' | 'noStringSpread' | 'replaceMapSpreadInObject'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-misused-spread.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.d.ts.map new file mode 100644 index 0000000..e12471a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-misused-spread.d.ts","sourceRoot":"","sources":["../../src/rules/no-misused-spread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAMnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAepD,KAAK,OAAO,GAAG;IACb;QACE,KAAK,CAAC,EAAE,oBAAoB,EAAE,CAAC;KAChC;CACF,CAAC;AAEF,KAAK,UAAU,GACX,UAAU,GACV,uBAAuB,GACvB,kCAAkC,GAClC,+BAA+B,GAC/B,0BAA0B,GAC1B,0BAA0B,GAC1B,qBAAqB,GACrB,yBAAyB,GACzB,gBAAgB,GAChB,0BAA0B,CAAC;;AAE/B,wBA2NG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.js new file mode 100644 index 0000000..ba2d65c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.js @@ -0,0 +1,260 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-misused-spread', + meta: { + type: 'problem', + docs: { + description: 'Disallow using the spread operator when it might cause unexpected behavior', + recommended: 'strict', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + addAwait: 'Add await operator.', + noArraySpreadInObject: 'Using the spread operator on an array in an object will result in a list of indices.', + noClassDeclarationSpreadInObject: 'Using the spread operator on class declarations will spread only their static properties, and will lose their class prototype.', + noClassInstanceSpreadInObject: 'Using the spread operator on class instances will lose their class prototype.', + noFunctionSpreadInObject: 'Using the spread operator on a function without additional properties can cause unexpected behavior. Did you forget to call the function?', + noIterableSpreadInObject: 'Using the spread operator on an Iterable in an object can cause unexpected behavior.', + noMapSpreadInObject: 'Using the spread operator on a Map in an object will result in an empty object. Did you mean to use `Object.fromEntries(map)` instead?', + noPromiseSpreadInObject: 'Using the spread operator on Promise in an object can cause unexpected behavior. Did you forget to await the promise?', + noStringSpread: [ + 'Using the spread operator on a string can mishandle special characters, as can `.split("")`.', + '- `...` produces Unicode code points, which will decompose complex emojis into individual emojis', + '- .split("") produces UTF-16 code units, which breaks rich characters in many languages', + 'Consider using `Intl.Segmenter` for locale-aware string decomposition.', + "Otherwise, if you don't need to preserve emojis or other non-Ascii characters, disable this lint rule on this line or configure the 'allow' rule option.", + ].join('\n'), + replaceMapSpreadInObject: 'Replace map spread in object with `Object.fromEntries()`', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allow: { + ...util_1.readonlynessOptionsSchema.properties.allow, + description: 'An array of type specifiers that are known to be safe to spread.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allow: [], + }, + ], + create(context, [options]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + function checkArrayOrCallSpread(node) { + const type = (0, util_1.getConstrainedTypeAtLocation)(services, node.argument); + if (!(0, util_1.typeMatchesSomeSpecifier)(type, options.allow, services.program) && + isString(type)) { + context.report({ + node, + messageId: 'noStringSpread', + }); + } + } + function getMapSpreadSuggestions(node, type) { + const types = tsutils.unionConstituents(type); + if (types.some(t => !isMap(services.program, t))) { + return null; + } + if (node.parent.type === utils_1.AST_NODE_TYPES.ObjectExpression && + node.parent.properties.length === 1) { + return [ + { + messageId: 'replaceMapSpreadInObject', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node.argument, + sourceCode: context.sourceCode, + wrap: code => `Object.fromEntries(${code})`, + }), + }, + ]; + } + return [ + { + messageId: 'replaceMapSpreadInObject', + fix: (0, util_1.getWrappingFixer)({ + node: node.argument, + sourceCode: context.sourceCode, + wrap: code => `Object.fromEntries(${code})`, + }), + }, + ]; + } + function getPromiseSpreadSuggestions(node) { + const isHighPrecendence = (0, util_1.isHigherPrecedenceThanAwait)(services.esTreeNodeToTSNodeMap.get(node)); + return [ + { + messageId: 'addAwait', + fix: fixer => isHighPrecendence + ? fixer.insertTextBefore(node, 'await ') + : [ + fixer.insertTextBefore(node, 'await ('), + fixer.insertTextAfter(node, ')'), + ], + }, + ]; + } + function checkObjectSpread(node) { + const type = (0, util_1.getConstrainedTypeAtLocation)(services, node.argument); + if ((0, util_1.typeMatchesSomeSpecifier)(type, options.allow, services.program)) { + return; + } + if (isPromise(services.program, type)) { + context.report({ + node, + messageId: 'noPromiseSpreadInObject', + suggest: getPromiseSpreadSuggestions(node.argument), + }); + return; + } + if (isFunctionWithoutProps(type)) { + context.report({ + node, + messageId: 'noFunctionSpreadInObject', + }); + return; + } + if (isMap(services.program, type)) { + context.report({ + node, + messageId: 'noMapSpreadInObject', + suggest: getMapSpreadSuggestions(node, type), + }); + return; + } + if (isArray(checker, type)) { + context.report({ + node, + messageId: 'noArraySpreadInObject', + }); + return; + } + if (isIterable(type, checker) && + // Don't report when the type is string, since TS will flag it already + !isString(type)) { + context.report({ + node, + messageId: 'noIterableSpreadInObject', + }); + return; + } + if (isClassInstance(checker, type)) { + context.report({ + node, + messageId: 'noClassInstanceSpreadInObject', + }); + return; + } + if (isClassDeclaration(type)) { + context.report({ + node, + messageId: 'noClassDeclarationSpreadInObject', + }); + } + } + return { + 'ArrayExpression > SpreadElement': checkArrayOrCallSpread, + 'CallExpression > SpreadElement': checkArrayOrCallSpread, + JSXSpreadAttribute: checkObjectSpread, + 'ObjectExpression > SpreadElement': checkObjectSpread, + }; + }, +}); +function isIterable(type, checker) { + return tsutils + .typeConstituents(type) + .some(t => !!tsutils.getWellKnownSymbolPropertyOfType(t, 'iterator', checker)); +} +function isArray(checker, type) { + return isTypeRecurser(type, t => checker.isArrayType(t) || checker.isTupleType(t)); +} +function isString(type) { + return isTypeRecurser(type, t => (0, util_1.isTypeFlagSet)(t, ts.TypeFlags.StringLike)); +} +function isFunctionWithoutProps(type) { + return isTypeRecurser(type, t => t.getCallSignatures().length > 0 && t.getProperties().length === 0); +} +function isPromise(program, type) { + return isTypeRecurser(type, t => (0, util_1.isPromiseLike)(program, t)); +} +function isClassInstance(checker, type) { + return isTypeRecurser(type, t => { + // If the type itself has a construct signature, it's a class(-like) + if (t.getConstructSignatures().length) { + return false; + } + const symbol = t.getSymbol(); + // If the type's symbol has a construct signature, the type is an instance + return !!symbol + ?.getDeclarations() + ?.some(declaration => checker + .getTypeOfSymbolAtLocation(symbol, declaration) + .getConstructSignatures().length); + }); +} +function isClassDeclaration(type) { + return isTypeRecurser(type, t => { + if (tsutils.isObjectType(t) && + tsutils.isObjectFlagSet(t, ts.ObjectFlags.InstantiationExpressionType)) { + return true; + } + const kind = t.getSymbol()?.valueDeclaration?.kind; + return (kind === ts.SyntaxKind.ClassDeclaration || + kind === ts.SyntaxKind.ClassExpression); + }); +} +function isMap(program, type) { + return isTypeRecurser(type, t => (0, util_1.isBuiltinSymbolLike)(program, t, ['Map', 'ReadonlyMap', 'WeakMap'])); +} +function isTypeRecurser(type, predicate) { + if (type.isUnionOrIntersection()) { + return type.types.some(t => isTypeRecurser(t, predicate)); + } + return predicate(type); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.d.ts new file mode 100644 index 0000000..6180b08 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"mixed", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-mixed-enums.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.d.ts.map new file mode 100644 index 0000000..eae5dee --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-mixed-enums.d.ts","sourceRoot":"","sources":["../../src/rules/no-mixed-enums.ts"],"names":[],"mappings":";AAgBA,wBA4MG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js new file mode 100644 index 0000000..0b133c2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js @@ -0,0 +1,200 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const scope_manager_1 = require("@typescript-eslint/scope-manager"); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +var AllowedType; +(function (AllowedType) { + AllowedType[AllowedType["Number"] = 0] = "Number"; + AllowedType[AllowedType["String"] = 1] = "String"; + AllowedType[AllowedType["Unknown"] = 2] = "Unknown"; +})(AllowedType || (AllowedType = {})); +exports.default = (0, util_1.createRule)({ + name: 'no-mixed-enums', + meta: { + type: 'problem', + docs: { + description: 'Disallow enums from having both number and string members', + recommended: 'strict', + requiresTypeChecking: true, + }, + messages: { + mixed: `Mixing number and string enums can be confusing.`, + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const parserServices = (0, util_1.getParserServices)(context); + const typeChecker = parserServices.program.getTypeChecker(); + function collectNodeDefinitions(node) { + const { name } = node.id; + const found = { + imports: [], + previousSibling: undefined, + }; + let scope = context.sourceCode.getScope(node); + for (const definition of scope.upper?.set.get(name)?.defs ?? []) { + if (definition.node.type === utils_1.AST_NODE_TYPES.TSEnumDeclaration && + definition.node.range[0] < node.range[0] && + definition.node.body.members.length > 0) { + found.previousSibling = definition.node; + break; + } + } + while (scope) { + scope.set.get(name)?.defs.forEach(definition => { + if (definition.type === scope_manager_1.DefinitionType.ImportBinding) { + found.imports.push(definition.node); + } + }); + scope = scope.upper; + } + return found; + } + function getAllowedTypeForNode(node) { + return tsutils.isTypeFlagSet(typeChecker.getTypeAtLocation(node), ts.TypeFlags.StringLike) + ? AllowedType.String + : AllowedType.Number; + } + function getTypeFromImported(imported) { + const type = typeChecker.getTypeAtLocation(parserServices.esTreeNodeToTSNodeMap.get(imported)); + const valueDeclaration = type.getSymbol()?.valueDeclaration; + if (!valueDeclaration || + !ts.isEnumDeclaration(valueDeclaration) || + valueDeclaration.members.length === 0) { + return undefined; + } + return getAllowedTypeForNode(valueDeclaration.members[0]); + } + function getMemberType(member) { + if (!member.initializer) { + return AllowedType.Number; + } + switch (member.initializer.type) { + case utils_1.AST_NODE_TYPES.Literal: + switch (typeof member.initializer.value) { + case 'number': + return AllowedType.Number; + case 'string': + return AllowedType.String; + default: + return AllowedType.Unknown; + } + case utils_1.AST_NODE_TYPES.TemplateLiteral: + return AllowedType.String; + default: + return getAllowedTypeForNode(parserServices.esTreeNodeToTSNodeMap.get(member.initializer)); + } + } + function getDesiredTypeForDefinition(node) { + const { imports, previousSibling } = collectNodeDefinitions(node); + // Case: Merged ambiently via module augmentation + // import { MyEnum } from 'other-module'; + // declare module 'other-module' { + // enum MyEnum { A } + // } + for (const imported of imports) { + const typeFromImported = getTypeFromImported(imported); + if (typeFromImported != null) { + return typeFromImported; + } + } + // Case: Multiple enum declarations in the same file + // enum MyEnum { A } + // enum MyEnum { B } + if (previousSibling) { + return getMemberType(previousSibling.body.members[0]); + } + // Case: Namespace declaration merging + // namespace MyNamespace { + // export enum MyEnum { A } + // } + // namespace MyNamespace { + // export enum MyEnum { B } + // } + if (node.parent.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration && + node.parent.parent.type === utils_1.AST_NODE_TYPES.TSModuleBlock) { + // https://github.com/typescript-eslint/typescript-eslint/issues/8352 + // TODO: We don't need to dip into the TypeScript type checker here! + // Merged namespaces must all exist in the same file. + // We could instead compare this file's nodes to find the merges. + const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node.id); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const declarations = typeChecker + .getSymbolAtLocation(tsNode) + .getDeclarations(); + const [{ initializer }] = declarations[0] + .members; + return initializer && + tsutils.isTypeFlagSet(typeChecker.getTypeAtLocation(initializer), ts.TypeFlags.StringLike) + ? AllowedType.String + : AllowedType.Number; + } + // Finally, we default to the type of the first enum member + return getMemberType(node.body.members[0]); + } + return { + TSEnumDeclaration(node) { + if (!node.body.members.length) { + return; + } + let desiredType = getDesiredTypeForDefinition(node); + if (desiredType === ts.TypeFlags.Unknown) { + return; + } + for (const member of node.body.members) { + const currentType = getMemberType(member); + if (currentType === AllowedType.Unknown) { + return; + } + if (currentType === AllowedType.Number) { + desiredType ??= currentType; + } + if (currentType !== desiredType) { + context.report({ + node: member.initializer ?? member, + messageId: 'mixed', + }); + return; + } + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.d.ts new file mode 100644 index 0000000..9ef0a7a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.d.ts @@ -0,0 +1,10 @@ +export type Options = [ + { + allowDeclarations?: boolean; + allowDefinitionFiles?: boolean; + } +]; +export type MessageIds = 'moduleSyntaxIsPreferred'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"moduleSyntaxIsPreferred", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-namespace.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.d.ts.map new file mode 100644 index 0000000..b74f288 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-namespace.d.ts","sourceRoot":"","sources":["../../src/rules/no-namespace.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,yBAAyB,CAAC;;AAEnD,wBAiEG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js new file mode 100644 index 0000000..00b3546 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js @@ -0,0 +1,60 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-namespace', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow TypeScript namespaces', + recommended: 'recommended', + }, + messages: { + moduleSyntaxIsPreferred: 'ES2015 module syntax is preferred over namespaces.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowDeclarations: { + type: 'boolean', + description: 'Whether to allow `declare` with custom TypeScript namespaces.', + }, + allowDefinitionFiles: { + type: 'boolean', + description: 'Whether to allow `declare` with custom TypeScript namespaces inside definition files.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowDeclarations: false, + allowDefinitionFiles: true, + }, + ], + create(context, [{ allowDeclarations, allowDefinitionFiles }]) { + function isDeclaration(node) { + if (node.type === utils_1.AST_NODE_TYPES.TSModuleDeclaration && node.declare) { + return true; + } + return node.parent != null && isDeclaration(node.parent); + } + return { + "TSModuleDeclaration[global!=true][id.type!='Literal']"(node) { + if (node.parent.type === utils_1.AST_NODE_TYPES.TSModuleDeclaration || + (allowDefinitionFiles && (0, util_1.isDefinitionFile)(context.filename)) || + (allowDeclarations && isDeclaration(node))) { + return; + } + context.report({ + node, + messageId: 'moduleSyntaxIsPreferred', + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.d.ts new file mode 100644 index 0000000..38edf0d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.d.ts @@ -0,0 +1,4 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule<"noNonNullAssertedNullishCoalescing" | "suggestRemovingNonNull", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=no-non-null-asserted-nullish-coalescing.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.d.ts.map new file mode 100644 index 0000000..374b676 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-non-null-asserted-nullish-coalescing.d.ts","sourceRoot":"","sources":["../../src/rules/no-non-null-asserted-nullish-coalescing.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;;AA+BzD,wBAmEG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js new file mode 100644 index 0000000..e5d6a5c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js @@ -0,0 +1,73 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const scope_manager_1 = require("@typescript-eslint/scope-manager"); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +function hasAssignmentBeforeNode(variable, node) { + return (variable.references.some(ref => ref.isWrite() && ref.identifier.range[1] < node.range[1]) || + variable.defs.some(def => isDefinitionWithAssignment(def) && def.node.range[1] < node.range[1])); +} +function isDefinitionWithAssignment(definition) { + if (definition.type !== scope_manager_1.DefinitionType.Variable) { + return false; + } + const variableDeclarator = definition.node; + return variableDeclarator.definite || variableDeclarator.init != null; +} +exports.default = (0, util_1.createRule)({ + name: 'no-non-null-asserted-nullish-coalescing', + meta: { + type: 'problem', + docs: { + description: 'Disallow non-null assertions in the left operand of a nullish coalescing operator', + recommended: 'strict', + }, + hasSuggestions: true, + messages: { + noNonNullAssertedNullishCoalescing: 'The nullish coalescing operator is designed to handle undefined and null - using a non-null assertion is not needed.', + suggestRemovingNonNull: 'Remove the non-null assertion.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + return { + 'LogicalExpression[operator = "??"] > TSNonNullExpression.left'(node) { + if (node.expression.type === utils_1.TSESTree.AST_NODE_TYPES.Identifier) { + const scope = context.sourceCode.getScope(node); + const identifier = node.expression; + const variable = utils_1.ASTUtils.findVariable(scope, identifier.name); + if (variable && !hasAssignmentBeforeNode(variable, node)) { + return; + } + } + context.report({ + node, + messageId: 'noNonNullAssertedNullishCoalescing', + /* + Use a suggestion instead of a fixer, because this can break type checks. + The resulting type of the nullish coalesce is only influenced by the right operand if the left operand can be `null` or `undefined`. + After removing the non-null assertion the type of the left operand might contain `null` or `undefined` and then the type of the right operand + might change the resulting type of the nullish coalesce. + See the following example: + + function test(x?: string): string { + const bar = x! ?? false; // type analysis reports `bar` has type `string` + // x ?? false; // type analysis reports `bar` has type `string | false` + return bar; + } + */ + suggest: [ + { + messageId: 'suggestRemovingNonNull', + fix(fixer) { + const exclamationMark = (0, util_1.nullThrows)(context.sourceCode.getLastToken(node, utils_1.ASTUtils.isNonNullAssertionPunctuator), util_1.NullThrowsReasons.MissingToken('!', 'Non-null Assertion')); + return fixer.remove(exclamationMark); + }, + }, + ], + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.d.ts new file mode 100644 index 0000000..f381bd0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.d.ts @@ -0,0 +1,4 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule<"suggestRemovingNonNull" | "noNonNullOptionalChain", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=no-non-null-asserted-optional-chain.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.d.ts.map new file mode 100644 index 0000000..80850d2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-non-null-asserted-optional-chain.d.ts","sourceRoot":"","sources":["../../src/rules/no-non-null-asserted-optional-chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;;AAInE,wBAoEG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js new file mode 100644 index 0000000..b475dfd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js @@ -0,0 +1,65 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-non-null-asserted-optional-chain', + meta: { + type: 'problem', + docs: { + description: 'Disallow non-null assertions after an optional chain expression', + recommended: 'recommended', + }, + hasSuggestions: true, + messages: { + noNonNullOptionalChain: 'Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong.', + suggestRemovingNonNull: 'You should remove the non-null assertion.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + return { + // non-nulling a wrapped chain will scrub all nulls introduced by the chain + // (x?.y)! + // (x?.())! + 'TSNonNullExpression > ChainExpression'(node) { + // selector guarantees this assertion + const parent = node.parent; + context.report({ + node, + messageId: 'noNonNullOptionalChain', + // use a suggestion instead of a fixer, because this can obviously break type checks + suggest: [ + { + messageId: 'suggestRemovingNonNull', + fix(fixer) { + return fixer.removeRange([ + parent.range[1] - 1, + parent.range[1], + ]); + }, + }, + ], + }); + }, + // non-nulling at the end of a chain will scrub all nulls introduced by the chain + // x?.y! + // x?.()! + 'ChainExpression > TSNonNullExpression'(node) { + context.report({ + node, + messageId: 'noNonNullOptionalChain', + // use a suggestion instead of a fixer, because this can obviously break type checks + suggest: [ + { + messageId: 'suggestRemovingNonNull', + fix(fixer) { + return fixer.removeRange([node.range[1] - 1, node.range[1]]); + }, + }, + ], + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.d.ts new file mode 100644 index 0000000..3bc0e2a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.d.ts @@ -0,0 +1,5 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type MessageIds = 'noNonNull' | 'suggestOptionalChain'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-non-null-assertion.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.d.ts.map new file mode 100644 index 0000000..685fce8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-non-null-assertion.d.ts","sourceRoot":"","sources":["../../src/rules/no-non-null-assertion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAYzD,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,sBAAsB,CAAC;;AAE9D,wBAwGG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js new file mode 100644 index 0000000..2e17729 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js @@ -0,0 +1,93 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-non-null-assertion', + meta: { + type: 'problem', + docs: { + description: 'Disallow non-null assertions using the `!` postfix operator', + recommended: 'strict', + }, + hasSuggestions: true, + messages: { + noNonNull: 'Forbidden non-null assertion.', + suggestOptionalChain: 'Consider using the optional chain operator `?.` instead. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + return { + TSNonNullExpression(node) { + const suggest = []; + // it always exists in non-null assertion + const nonNullOperator = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.expression, util_1.isNonNullAssertionPunctuator), util_1.NullThrowsReasons.MissingToken('!', 'expression')); + function replaceTokenWithOptional() { + return fixer => fixer.replaceText(nonNullOperator, '?.'); + } + function removeToken() { + return fixer => fixer.remove(nonNullOperator); + } + if (node.parent.type === utils_1.AST_NODE_TYPES.MemberExpression && + node.parent.object === node && + !(0, util_1.isAssignee)(node.parent)) { + if (!node.parent.optional) { + if (node.parent.computed) { + // it is x![y]?.z + suggest.push({ + messageId: 'suggestOptionalChain', + fix: replaceTokenWithOptional(), + }); + } + else { + // it is x!.y?.z + suggest.push({ + messageId: 'suggestOptionalChain', + fix(fixer) { + // x!.y?.z + // ^ punctuator + const punctuator = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(nonNullOperator), util_1.NullThrowsReasons.MissingToken('.', '!')); + return [ + fixer.remove(nonNullOperator), + fixer.insertTextBefore(punctuator, '?'), + ]; + }, + }); + } + } + else { + // it is x!?.[y].z or x!?.y.z + suggest.push({ + messageId: 'suggestOptionalChain', + fix: removeToken(), + }); + } + } + else if (node.parent.type === utils_1.AST_NODE_TYPES.CallExpression && + node.parent.callee === node) { + if (!node.parent.optional) { + // it is x.y?.z!() + suggest.push({ + messageId: 'suggestOptionalChain', + fix: replaceTokenWithOptional(), + }); + } + else { + // it is x.y.z!?.() + suggest.push({ + messageId: 'suggestOptionalChain', + fix: removeToken(), + }); + } + } + context.report({ + node, + messageId: 'noNonNull', + suggest, + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.d.ts new file mode 100644 index 0000000..bfde0f2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.d.ts @@ -0,0 +1,11 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type MessageIds = 'redeclared' | 'redeclaredAsBuiltin' | 'redeclaredBySyntax'; +export type Options = [ + { + builtinGlobals?: boolean; + ignoreDeclarationMerge?: boolean; + } +]; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-redeclare.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.d.ts.map new file mode 100644 index 0000000..be5cca5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-redeclare.d.ts","sourceRoot":"","sources":["../../src/rules/no-redeclare.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAOnE,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,qBAAqB,GACrB,oBAAoB,CAAC;AACzB,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,sBAAsB,CAAC,EAAE,OAAO,CAAC;KAClC;CACF,CAAC;;AAEF,wBAyQG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.js new file mode 100644 index 0000000..d54a1ca --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.js @@ -0,0 +1,200 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const scope_manager_1 = require("@typescript-eslint/scope-manager"); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-redeclare', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow variable redeclaration', + extendsBaseRule: true, + }, + messages: { + redeclared: "'{{id}}' is already defined.", + redeclaredAsBuiltin: "'{{id}}' is already defined as a built-in global variable.", + redeclaredBySyntax: "'{{id}}' is already defined by a variable declaration.", + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + builtinGlobals: { + type: 'boolean', + description: 'Whether to report shadowing of built-in global variables.', + }, + ignoreDeclarationMerge: { + type: 'boolean', + description: 'Whether to ignore declaration merges between certain TypeScript declaration types.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + builtinGlobals: true, + ignoreDeclarationMerge: true, + }, + ], + create(context, [options]) { + const CLASS_DECLARATION_MERGE_NODES = new Set([ + utils_1.AST_NODE_TYPES.ClassDeclaration, + utils_1.AST_NODE_TYPES.TSInterfaceDeclaration, + utils_1.AST_NODE_TYPES.TSModuleDeclaration, + ]); + const FUNCTION_DECLARATION_MERGE_NODES = new Set([ + utils_1.AST_NODE_TYPES.FunctionDeclaration, + utils_1.AST_NODE_TYPES.TSModuleDeclaration, + ]); + const ENUM_DECLARATION_MERGE_NODES = new Set([ + utils_1.AST_NODE_TYPES.TSEnumDeclaration, + utils_1.AST_NODE_TYPES.TSModuleDeclaration, + ]); + function* iterateDeclarations(variable) { + if (options.builtinGlobals && + 'eslintImplicitGlobalSetting' in variable && + (variable.eslintImplicitGlobalSetting === 'readonly' || + variable.eslintImplicitGlobalSetting === 'writable')) { + yield { type: 'builtin' }; + } + if ('eslintExplicitGlobalComments' in variable && + variable.eslintExplicitGlobalComments) { + for (const comment of variable.eslintExplicitGlobalComments) { + yield { + loc: (0, util_1.getNameLocationInGlobalDirectiveComment)(context.sourceCode, comment, variable.name), + node: comment, + type: 'comment', + }; + } + } + const identifiers = variable.identifiers + .map(id => ({ + identifier: id, + parent: id.parent, + })) + // ignore function declarations because TS will treat them as an overload + .filter(({ parent }) => parent.type !== utils_1.AST_NODE_TYPES.TSDeclareFunction); + if (options.ignoreDeclarationMerge && identifiers.length > 1) { + if ( + // interfaces merging + identifiers.every(({ parent }) => parent.type === utils_1.AST_NODE_TYPES.TSInterfaceDeclaration)) { + return; + } + if ( + // namespace/module merging + identifiers.every(({ parent }) => parent.type === utils_1.AST_NODE_TYPES.TSModuleDeclaration)) { + return; + } + if ( + // class + interface/namespace merging + identifiers.every(({ parent }) => CLASS_DECLARATION_MERGE_NODES.has(parent.type))) { + const classDecls = identifiers.filter(({ parent }) => parent.type === utils_1.AST_NODE_TYPES.ClassDeclaration); + if (classDecls.length === 1) { + // safe declaration merging + return; + } + // there's more than one class declaration, which needs to be reported + for (const { identifier } of classDecls) { + yield { loc: identifier.loc, node: identifier, type: 'syntax' }; + } + return; + } + if ( + // class + interface/namespace merging + identifiers.every(({ parent }) => FUNCTION_DECLARATION_MERGE_NODES.has(parent.type))) { + const functionDecls = identifiers.filter(({ parent }) => parent.type === utils_1.AST_NODE_TYPES.FunctionDeclaration); + if (functionDecls.length === 1) { + // safe declaration merging + return; + } + // there's more than one function declaration, which needs to be reported + for (const { identifier } of functionDecls) { + yield { loc: identifier.loc, node: identifier, type: 'syntax' }; + } + return; + } + if ( + // enum + namespace merging + identifiers.every(({ parent }) => ENUM_DECLARATION_MERGE_NODES.has(parent.type))) { + const enumDecls = identifiers.filter(({ parent }) => parent.type === utils_1.AST_NODE_TYPES.TSEnumDeclaration); + if (enumDecls.length === 1) { + // safe declaration merging + return; + } + // there's more than one enum declaration, which needs to be reported + for (const { identifier } of enumDecls) { + yield { loc: identifier.loc, node: identifier, type: 'syntax' }; + } + return; + } + } + for (const { identifier } of identifiers) { + yield { loc: identifier.loc, node: identifier, type: 'syntax' }; + } + } + function findVariablesInScope(scope) { + for (const variable of scope.variables) { + const [declaration, ...extraDeclarations] = iterateDeclarations(variable); + if (extraDeclarations.length === 0) { + continue; + } + /* + * If the type of a declaration is different from the type of + * the first declaration, it shows the location of the first + * declaration. + */ + const detailMessageId = declaration.type === 'builtin' + ? 'redeclaredAsBuiltin' + : 'redeclaredBySyntax'; + const data = { id: variable.name }; + // Report extra declarations. + for (const { loc, node, type } of extraDeclarations) { + const messageId = type === declaration.type ? 'redeclared' : detailMessageId; + if (node) { + context.report({ loc, node, messageId, data }); + } + else if (loc) { + context.report({ loc, messageId, data }); + } + } + } + } + /** + * Find variables in the current scope. + */ + function checkForBlock(node) { + const scope = context.sourceCode.getScope(node); + /* + * In ES5, some node type such as `BlockStatement` doesn't have that scope. + * `scope.block` is a different node in such a case. + */ + if (scope.block === node) { + findVariablesInScope(scope); + } + } + return { + ArrowFunctionExpression: checkForBlock, + BlockStatement: checkForBlock, + ForInStatement: checkForBlock, + ForOfStatement: checkForBlock, + ForStatement: checkForBlock, + FunctionDeclaration: checkForBlock, + FunctionExpression: checkForBlock, + Program(node) { + const scope = context.sourceCode.getScope(node); + findVariablesInScope(scope); + // Node.js or ES modules has a special scope. + if (scope.type === scope_manager_1.ScopeType.global && + scope.childScopes[0] && + // The special scope's block is the Program node. + scope.block === scope.childScopes[0].block) { + findVariablesInScope(scope.childScopes[0]); + } + }, + SwitchStatement: checkForBlock, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.d.ts new file mode 100644 index 0000000..3e8f452 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"overrides" | "errorTypeOverrides" | "literalOverridden" | "overridden" | "primitiveOverridden", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-redundant-type-constituents.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.d.ts.map new file mode 100644 index 0000000..aa2c322 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-redundant-type-constituents.d.ts","sourceRoot":"","sources":["../../src/rules/no-redundant-type-constituents.ts"],"names":[],"mappings":";AAgMA,wBAqVG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.js new file mode 100644 index 0000000..0d632f1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.js @@ -0,0 +1,431 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const literalToPrimitiveTypeFlags = { + [ts.TypeFlags.BigIntLiteral]: ts.TypeFlags.BigInt, + [ts.TypeFlags.BooleanLiteral]: ts.TypeFlags.Boolean, + [ts.TypeFlags.NumberLiteral]: ts.TypeFlags.Number, + [ts.TypeFlags.StringLiteral]: ts.TypeFlags.String, + [ts.TypeFlags.TemplateLiteral]: ts.TypeFlags.String, +}; +const literalTypeFlags = [ + ts.TypeFlags.BigIntLiteral, + ts.TypeFlags.BooleanLiteral, + ts.TypeFlags.NumberLiteral, + ts.TypeFlags.StringLiteral, + ts.TypeFlags.TemplateLiteral, +]; +const primitiveTypeFlags = [ + ts.TypeFlags.BigInt, + ts.TypeFlags.Boolean, + ts.TypeFlags.Number, + ts.TypeFlags.String, +]; +const primitiveTypeFlagNames = { + [ts.TypeFlags.BigInt]: 'bigint', + [ts.TypeFlags.Boolean]: 'boolean', + [ts.TypeFlags.Number]: 'number', + [ts.TypeFlags.String]: 'string', +}; +const primitiveTypeFlagTypes = { + bigint: ts.TypeFlags.BigIntLiteral, + boolean: ts.TypeFlags.BooleanLiteral, + number: ts.TypeFlags.NumberLiteral, + string: ts.TypeFlags.StringLiteral, +}; +const keywordNodeTypesToTsTypes = new Map([ + [utils_1.TSESTree.AST_NODE_TYPES.TSAnyKeyword, ts.TypeFlags.Any], + [utils_1.TSESTree.AST_NODE_TYPES.TSBigIntKeyword, ts.TypeFlags.BigInt], + [utils_1.TSESTree.AST_NODE_TYPES.TSBooleanKeyword, ts.TypeFlags.Boolean], + [utils_1.TSESTree.AST_NODE_TYPES.TSNeverKeyword, ts.TypeFlags.Never], + [utils_1.TSESTree.AST_NODE_TYPES.TSNumberKeyword, ts.TypeFlags.Number], + [utils_1.TSESTree.AST_NODE_TYPES.TSStringKeyword, ts.TypeFlags.String], + [utils_1.TSESTree.AST_NODE_TYPES.TSUnknownKeyword, ts.TypeFlags.Unknown], +]); +function addToMapGroup(map, key, value) { + const existing = map.get(key); + if (existing) { + existing.push(value); + } + else { + map.set(key, [value]); + } +} +function describeLiteralType(type) { + if (type.isStringLiteral()) { + return JSON.stringify(type.value); + } + if ((0, util_1.isTypeBigIntLiteralType)(type)) { + return `${type.value.negative ? '-' : ''}${type.value.base10Value}n`; + } + if (type.isLiteral()) { + // eslint-disable-next-line @typescript-eslint/no-base-to-string + return type.value.toString(); + } + if (tsutils.isIntrinsicErrorType(type) && type.aliasSymbol) { + return type.aliasSymbol.escapedName.toString(); + } + if ((0, util_1.isTypeAnyType)(type)) { + return 'any'; + } + if ((0, util_1.isTypeNeverType)(type)) { + return 'never'; + } + if ((0, util_1.isTypeUnknownType)(type)) { + return 'unknown'; + } + if ((0, util_1.isTypeTemplateLiteralType)(type)) { + return 'template literal type'; + } + if ((0, util_1.isTypeBigIntLiteralType)(type)) { + return `${type.value.negative ? '-' : ''}${type.value.base10Value}n`; + } + if (tsutils.isTrueLiteralType(type)) { + return 'true'; + } + if (tsutils.isFalseLiteralType(type)) { + return 'false'; + } + return 'literal type'; +} +function describeLiteralTypeNode(typeNode) { + switch (typeNode.type) { + case utils_1.AST_NODE_TYPES.TSAnyKeyword: + return 'any'; + case utils_1.AST_NODE_TYPES.TSBooleanKeyword: + return 'boolean'; + case utils_1.AST_NODE_TYPES.TSNeverKeyword: + return 'never'; + case utils_1.AST_NODE_TYPES.TSNumberKeyword: + return 'number'; + case utils_1.AST_NODE_TYPES.TSStringKeyword: + return 'string'; + case utils_1.AST_NODE_TYPES.TSUnknownKeyword: + return 'unknown'; + case utils_1.AST_NODE_TYPES.TSLiteralType: + switch (typeNode.literal.type) { + case utils_1.TSESTree.AST_NODE_TYPES.Literal: + switch (typeof typeNode.literal.value) { + case 'bigint': + return `${typeNode.literal.value < 0 ? '-' : ''}${typeNode.literal.value}n`; + case 'string': + return JSON.stringify(typeNode.literal.value); + default: + return `${typeNode.literal.value}`; + } + case utils_1.TSESTree.AST_NODE_TYPES.TemplateLiteral: + return 'template literal type'; + } + } + return 'literal type'; +} +function isNodeInsideReturnType(node) { + return (node.parent.type === utils_1.AST_NODE_TYPES.TSTypeAnnotation && + (0, util_1.isFunctionOrFunctionType)(node.parent.parent)); +} +/** + * @remarks TypeScript stores boolean types as the union false | true, always. + */ +function unionTypePartsUnlessBoolean(type) { + return type.isUnion() && + type.types.length === 2 && + tsutils.isFalseLiteralType(type.types[0]) && + tsutils.isTrueLiteralType(type.types[1]) + ? [type] + : tsutils.unionConstituents(type); +} +exports.default = (0, util_1.createRule)({ + name: 'no-redundant-type-constituents', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow members of unions and intersections that do nothing or override type information', + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + errorTypeOverrides: `'{{typeName}}' is an 'error' type that acts as 'any' and overrides all other types in this {{container}} type.`, + literalOverridden: `{{literal}} is overridden by {{primitive}} in this union type.`, + overridden: `'{{typeName}}' is overridden by other types in this {{container}} type.`, + overrides: `'{{typeName}}' overrides all other types in this {{container}} type.`, + primitiveOverridden: `{{primitive}} is overridden by the {{literal}} in this intersection type.`, + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const typesCache = new Map(); + function getTypeNodeTypePartFlags(typeNode) { + const keywordTypeFlags = keywordNodeTypesToTsTypes.get(typeNode.type); + if (keywordTypeFlags) { + return [ + { + typeFlags: keywordTypeFlags, + typeName: describeLiteralTypeNode(typeNode), + }, + ]; + } + if (typeNode.type === utils_1.AST_NODE_TYPES.TSLiteralType && + typeNode.literal.type === utils_1.AST_NODE_TYPES.Literal) { + return [ + { + typeFlags: primitiveTypeFlagTypes[typeof typeNode.literal + .value], + typeName: describeLiteralTypeNode(typeNode), + }, + ]; + } + if (typeNode.type === utils_1.AST_NODE_TYPES.TSUnionType) { + return typeNode.types.flatMap(getTypeNodeTypePartFlags); + } + const nodeType = services.getTypeAtLocation(typeNode); + const typeParts = unionTypePartsUnlessBoolean(nodeType); + return typeParts.map(typePart => ({ + typeFlags: typePart.flags, + typeName: describeLiteralType(typePart), + })); + } + function getTypeNodeTypePartFlagsCached(typeNode) { + const existing = typesCache.get(typeNode); + if (existing) { + return existing; + } + const created = getTypeNodeTypePartFlags(typeNode); + typesCache.set(typeNode, created); + return created; + } + return { + 'TSIntersectionType:exit'(node) { + const seenLiteralTypes = new Map(); + const seenPrimitiveTypes = new Map(); + const seenUnionTypes = new Map(); + function checkIntersectionBottomAndTopTypes({ typeFlags, typeName }, typeNode) { + for (const [messageId, checkFlag] of [ + ['overrides', ts.TypeFlags.Any], + ['overrides', ts.TypeFlags.Never], + ['overridden', ts.TypeFlags.Unknown], + ]) { + if (typeFlags === checkFlag) { + context.report({ + node: typeNode, + messageId: typeFlags === ts.TypeFlags.Any && typeName !== 'any' + ? 'errorTypeOverrides' + : messageId, + data: { + container: 'intersection', + typeName, + }, + }); + return true; + } + } + return false; + } + for (const typeNode of node.types) { + const typePartFlags = getTypeNodeTypePartFlagsCached(typeNode); + for (const typePart of typePartFlags) { + if (checkIntersectionBottomAndTopTypes(typePart, typeNode)) { + continue; + } + for (const literalTypeFlag of literalTypeFlags) { + if (typePart.typeFlags === literalTypeFlag) { + addToMapGroup(seenLiteralTypes, literalToPrimitiveTypeFlags[literalTypeFlag], typePart.typeName); + break; + } + } + for (const primitiveTypeFlag of primitiveTypeFlags) { + if (typePart.typeFlags === primitiveTypeFlag) { + addToMapGroup(seenPrimitiveTypes, primitiveTypeFlag, typeNode); + } + } + } + // if any typeNode is TSTypeReference and typePartFlags have more than 1 element, than the referenced type is definitely a union. + if (typePartFlags.length >= 2) { + seenUnionTypes.set(typeNode, typePartFlags); + } + } + /** + * @example + * ```ts + * type F = "a"|2|"b"; + * type I = F & string; + * ``` + * This function checks if all the union members of `F` are assignable to the other member of `I`. If every member is assignable, then its reported else not. + */ + const checkIfUnionsAreAssignable = () => { + for (const [typeRef, typeValues] of seenUnionTypes) { + let primitive = undefined; + for (const { typeFlags } of typeValues) { + if (seenPrimitiveTypes.has(literalToPrimitiveTypeFlags[typeFlags])) { + primitive = + literalToPrimitiveTypeFlags[typeFlags]; + } + else { + primitive = undefined; + break; + } + } + if (Number.isInteger(primitive)) { + context.report({ + node: typeRef, + messageId: 'primitiveOverridden', + data: { + literal: typeValues.map(name => name.typeName).join(' | '), + primitive: primitiveTypeFlagNames[primitive], + }, + }); + } + } + }; + if (seenUnionTypes.size > 0) { + checkIfUnionsAreAssignable(); + return; + } + // For each primitive type of all the seen primitive types, + // if there was a literal type seen that overrides it, + // report each of the primitive type's type nodes + for (const [primitiveTypeFlag, typeNodes] of seenPrimitiveTypes) { + const matchedLiteralTypes = seenLiteralTypes.get(primitiveTypeFlag); + if (matchedLiteralTypes) { + for (const typeNode of typeNodes) { + context.report({ + node: typeNode, + messageId: 'primitiveOverridden', + data: { + literal: matchedLiteralTypes.join(' | '), + primitive: primitiveTypeFlagNames[primitiveTypeFlag], + }, + }); + } + } + } + }, + 'TSUnionType:exit'(node) { + const seenLiteralTypes = new Map(); + const seenPrimitiveTypes = new Set(); + function checkUnionBottomAndTopTypes({ typeFlags, typeName }, typeNode) { + for (const checkFlag of [ + ts.TypeFlags.Any, + ts.TypeFlags.Unknown, + ]) { + if (typeFlags === checkFlag) { + context.report({ + node: typeNode, + messageId: typeFlags === ts.TypeFlags.Any && typeName !== 'any' + ? 'errorTypeOverrides' + : 'overrides', + data: { + container: 'union', + typeName, + }, + }); + return true; + } + } + if (typeFlags === ts.TypeFlags.Never && + !isNodeInsideReturnType(node)) { + context.report({ + node: typeNode, + messageId: 'overridden', + data: { + container: 'union', + typeName: 'never', + }, + }); + return true; + } + return false; + } + for (const typeNode of node.types) { + const typePartFlags = getTypeNodeTypePartFlagsCached(typeNode); + for (const typePart of typePartFlags) { + if (checkUnionBottomAndTopTypes(typePart, typeNode)) { + continue; + } + for (const literalTypeFlag of literalTypeFlags) { + if (typePart.typeFlags === literalTypeFlag) { + addToMapGroup(seenLiteralTypes, literalToPrimitiveTypeFlags[literalTypeFlag], { + literalValue: typePart.typeName, + typeNode, + }); + break; + } + } + for (const primitiveTypeFlag of primitiveTypeFlags) { + if ((typePart.typeFlags & primitiveTypeFlag) !== 0) { + seenPrimitiveTypes.add(primitiveTypeFlag); + } + } + } + } + const overriddenTypeNodes = new Map(); + // For each primitive type of all the seen literal types, + // if there was a primitive type seen that overrides it, + // upsert the literal text and primitive type under the backing type node + for (const [primitiveTypeFlag, typeNodesWithText] of seenLiteralTypes) { + if (seenPrimitiveTypes.has(primitiveTypeFlag)) { + for (const { literalValue, typeNode } of typeNodesWithText) { + addToMapGroup(overriddenTypeNodes, typeNode, { + literalValue, + primitiveTypeFlag, + }); + } + } + } + // For each type node that had at least one overridden literal, + // group those literals by their primitive type, + // then report each primitive type with all its literals + for (const [typeNode, typeFlagsWithText] of overriddenTypeNodes) { + const grouped = (0, util_1.arrayGroupByToMap)(typeFlagsWithText, pair => pair.primitiveTypeFlag); + for (const [primitiveTypeFlag, pairs] of grouped) { + context.report({ + node: typeNode, + messageId: 'literalOverridden', + data: { + literal: pairs.map(pair => pair.literalValue).join(' | '), + primitive: primitiveTypeFlagNames[primitiveTypeFlag], + }, + }); + } + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.d.ts new file mode 100644 index 0000000..e761523 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.d.ts @@ -0,0 +1,10 @@ +export type Options = [ + { + allow?: string[]; + allowAsImport?: boolean; + } +]; +export type MessageIds = 'noRequireImports'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noRequireImports", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-require-imports.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.d.ts.map new file mode 100644 index 0000000..d4cbae4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-require-imports.d.ts","sourceRoot":"","sources":["../../src/rules/no-require-imports.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC;;AAE5C,wBAyFG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js new file mode 100644 index 0000000..3b8c7aa --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js @@ -0,0 +1,115 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util = __importStar(require("../util")); +exports.default = util.createRule({ + name: 'no-require-imports', + meta: { + type: 'problem', + docs: { + description: 'Disallow invocation of `require()`', + recommended: 'recommended', + }, + messages: { + noRequireImports: 'A `require()` style import is forbidden.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allow: { + type: 'array', + description: 'Patterns of import paths to allow requiring from.', + items: { type: 'string' }, + }, + allowAsImport: { + type: 'boolean', + description: 'Allows `require` statements in import declarations.', + }, + }, + }, + ], + }, + defaultOptions: [{ allow: [], allowAsImport: false }], + create(context, options) { + const allowAsImport = options[0].allowAsImport; + const allowPatterns = options[0].allow?.map(pattern => new RegExp(pattern, 'u')); + function isImportPathAllowed(importPath) { + return allowPatterns?.some(pattern => importPath.match(pattern)); + } + function isStringOrTemplateLiteral(node) { + return ((node.type === utils_1.AST_NODE_TYPES.Literal && + typeof node.value === 'string') || + node.type === utils_1.AST_NODE_TYPES.TemplateLiteral); + } + return { + 'CallExpression[callee.name="require"]'(node) { + if (node.arguments[0] && isStringOrTemplateLiteral(node.arguments[0])) { + const argValue = util.getStaticStringValue(node.arguments[0]); + if (typeof argValue === 'string' && isImportPathAllowed(argValue)) { + return; + } + } + const variable = utils_1.ASTUtils.findVariable(context.sourceCode.getScope(node), 'require'); + // ignore non-global require usage as it's something user-land custom instead + // of the commonjs standard + if (!variable?.identifiers.length) { + context.report({ + node, + messageId: 'noRequireImports', + }); + } + }, + TSExternalModuleReference(node) { + if (isStringOrTemplateLiteral(node.expression)) { + const argValue = util.getStaticStringValue(node.expression); + if (typeof argValue === 'string' && isImportPathAllowed(argValue)) { + return; + } + } + if (allowAsImport && + node.parent.type === utils_1.AST_NODE_TYPES.TSImportEqualsDeclaration) { + return; + } + context.report({ + node, + messageId: 'noRequireImports', + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.d.ts new file mode 100644 index 0000000..55cc9f4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.d.ts @@ -0,0 +1,8 @@ +import type { ArrayOfStringOrObject, RuleListener } from 'eslint/lib/rules/no-restricted-imports'; +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"everything" | "everythingWithCustomMessage" | "importName" | "importNameWithCustomMessage" | "path" | "pathWithCustomMessage" | "patterns" | "patternWithCustomMessage", [import("eslint/lib/rules/no-restricted-imports").ObjectOfPathsAndPatterns] | ArrayOfStringOrObject, unknown, RuleListener>; +export type Options = InferOptionsTypeFromRule; +export type MessageIds = InferMessageIdsTypeFromRule; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"everything" | "everythingWithCustomMessage" | "importName" | "importNameWithCustomMessage" | "path" | "pathWithCustomMessage" | "patterns" | "patternWithCustomMessage", [import("eslint/lib/rules/no-restricted-imports").ObjectOfPathsAndPatterns] | ArrayOfStringOrObject, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-restricted-imports.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.d.ts.map new file mode 100644 index 0000000..8c130a9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-restricted-imports.d.ts","sourceRoot":"","sources":["../../src/rules/no-restricted-imports.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,qBAAqB,EAErB,YAAY,EACb,MAAM,wCAAwC,CAAC;AAMhD,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAKjB,QAAA,MAAM,QAAQ,+VAA6C,CAAC;AAE5D,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC,OAAO,QAAQ,CAAC,CAAC;;AA4MtE,wBAkJG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.js new file mode 100644 index 0000000..be88407 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.js @@ -0,0 +1,243 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const ignore_1 = __importDefault(require("ignore")); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-restricted-imports'); +// In some versions of eslint, the base rule has a completely incompatible schema +// This helper function is to safely try to get parts of the schema. If it's not +// possible, we'll fallback to less strict checks. +const tryAccess = (getter, fallback) => { + try { + return getter(); + } + catch { + return fallback; + } +}; +const baseSchema = baseRule.meta.schema; +const allowTypeImportsOptionSchema = { + allowTypeImports: { + type: 'boolean', + description: 'Whether to allow type-only imports for a path.', + }, +}; +const arrayOfStringsOrObjects = { + type: 'array', + items: { + anyOf: [ + { type: 'string' }, + { + type: 'object', + additionalProperties: false, + properties: { + ...tryAccess(() => baseSchema.anyOf[1].items[0].properties.paths.items.anyOf[1] + .properties, undefined), + ...allowTypeImportsOptionSchema, + }, + required: tryAccess(() => baseSchema.anyOf[1].items[0].properties.paths.items.anyOf[1] + .required, undefined), + }, + ], + }, + uniqueItems: true, +}; +const arrayOfStringsOrObjectPatterns = { + anyOf: [ + { + type: 'array', + items: { + type: 'string', + }, + uniqueItems: true, + }, + { + type: 'array', + items: { + type: 'object', + additionalProperties: false, + properties: { + ...tryAccess(() => baseSchema.anyOf[1].items[0].properties.patterns.anyOf[1].items + .properties, undefined), + ...allowTypeImportsOptionSchema, + }, + required: tryAccess(() => baseSchema.anyOf[1].items[0].properties.patterns.anyOf[1].items + .required, []), + }, + uniqueItems: true, + }, + ], +}; +const schema = { + anyOf: [ + arrayOfStringsOrObjects, + { + type: 'array', + additionalItems: false, + items: [ + { + type: 'object', + additionalProperties: false, + properties: { + paths: arrayOfStringsOrObjects, + patterns: arrayOfStringsOrObjectPatterns, + }, + }, + ], + }, + ], +}; +function isObjectOfPaths(obj) { + return !!obj && Object.hasOwn(obj, 'paths'); +} +function isObjectOfPatterns(obj) { + return !!obj && Object.hasOwn(obj, 'patterns'); +} +function isOptionsArrayOfStringOrObject(options) { + if (isObjectOfPaths(options[0])) { + return false; + } + if (isObjectOfPatterns(options[0])) { + return false; + } + return true; +} +function getRestrictedPaths(options) { + if (isOptionsArrayOfStringOrObject(options)) { + return options; + } + if (isObjectOfPaths(options[0])) { + return options[0].paths; + } + return []; +} +function getRestrictedPatterns(options) { + if (isObjectOfPatterns(options[0])) { + return options[0].patterns; + } + return []; +} +function shouldCreateRule(baseRules, options) { + if (Object.keys(baseRules).length === 0 || options.length === 0) { + return false; + } + if (!isOptionsArrayOfStringOrObject(options)) { + return !!(options[0].paths?.length || options[0].patterns?.length); + } + return true; +} +exports.default = (0, util_1.createRule)({ + name: 'no-restricted-imports', + meta: { + type: 'suggestion', + // defaultOptions, -- base rule does not use defaultOptions + docs: { + description: 'Disallow specified modules when loaded by `import`', + extendsBaseRule: true, + }, + fixable: baseRule.meta.fixable, + messages: baseRule.meta.messages, + schema, + }, + defaultOptions: [], + create(context) { + const rules = baseRule.create(context); + const { options } = context; + if (!shouldCreateRule(rules, options)) { + return {}; + } + const restrictedPaths = getRestrictedPaths(options); + const allowedTypeImportPathNameSet = new Set(); + for (const restrictedPath of restrictedPaths) { + if (typeof restrictedPath === 'object' && + restrictedPath.allowTypeImports) { + allowedTypeImportPathNameSet.add(restrictedPath.name); + } + } + function isAllowedTypeImportPath(importSource) { + return allowedTypeImportPathNameSet.has(importSource); + } + const restrictedPatterns = getRestrictedPatterns(options); + const allowedImportTypeMatchers = []; + const allowedImportTypeRegexMatchers = []; + for (const restrictedPattern of restrictedPatterns) { + if (typeof restrictedPattern === 'object' && + restrictedPattern.allowTypeImports) { + // Following how ignore is configured in the base rule + if (restrictedPattern.group) { + allowedImportTypeMatchers.push((0, ignore_1.default)({ + allowRelativePaths: true, + ignoreCase: !restrictedPattern.caseSensitive, + }).add(restrictedPattern.group)); + } + if (restrictedPattern.regex) { + allowedImportTypeRegexMatchers.push(new RegExp(restrictedPattern.regex, restrictedPattern.caseSensitive ? 'u' : 'iu')); + } + } + } + function isAllowedTypeImportPattern(importSource) { + return ( + // As long as there's one matching pattern that allows type import + allowedImportTypeMatchers.some(matcher => matcher.ignores(importSource)) || + allowedImportTypeRegexMatchers.some(regex => regex.test(importSource))); + } + function checkImportNode(node) { + if (node.importKind === 'type' || + (node.specifiers.length > 0 && + node.specifiers.every(specifier => specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier && + specifier.importKind === 'type'))) { + const importSource = node.source.value.trim(); + if (!isAllowedTypeImportPath(importSource) && + !isAllowedTypeImportPattern(importSource)) { + return rules.ImportDeclaration(node); + } + } + else { + return rules.ImportDeclaration(node); + } + } + return { + ExportAllDeclaration: rules.ExportAllDeclaration, + 'ExportNamedDeclaration[source]'(node) { + if (node.exportKind === 'type' || + (node.specifiers.length > 0 && + node.specifiers.every(specifier => specifier.exportKind === 'type'))) { + const importSource = node.source.value.trim(); + if (!isAllowedTypeImportPath(importSource) && + !isAllowedTypeImportPattern(importSource)) { + return rules.ExportNamedDeclaration(node); + } + } + else { + return rules.ExportNamedDeclaration(node); + } + }, + ImportDeclaration: checkImportNode, + TSImportEqualsDeclaration(node) { + if (node.moduleReference.type === utils_1.AST_NODE_TYPES.TSExternalModuleReference) { + const synthesizedImport = { + ...node, + type: utils_1.AST_NODE_TYPES.ImportDeclaration, + assertions: [], + attributes: [], + source: node.moduleReference.expression, + specifiers: [ + { + ...node.id, + type: utils_1.AST_NODE_TYPES.ImportDefaultSpecifier, + local: node.id, + // @ts-expect-error -- parent types are incompatible but it's fine for the purposes of this extension + parent: node.id.parent, + }, + ], + }; + return checkImportNode(synthesizedImport); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-types.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-types.d.ts new file mode 100644 index 0000000..5bc8340 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-types.d.ts @@ -0,0 +1,15 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +type Types = Record; +export type Options = [ + { + types?: Types; + } +]; +export type MessageIds = 'bannedTypeMessage' | 'bannedTypeReplacement'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-restricted-types.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-types.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-types.d.ts.map new file mode 100644 index 0000000..e0662e1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-restricted-types.d.ts","sourceRoot":"","sources":["../../src/rules/no-restricted-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAMnE,KAAK,KAAK,GAAG,MAAM,CACjB,MAAM,EACJ,OAAO,GACP,MAAM,GACN;IACE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B,GACD,IAAI,CACP,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,KAAK,CAAC,EAAE,KAAK,CAAC;KACf;CACF,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,uBAAuB,CAAC;;AA6CvE,wBAyJG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-types.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-types.js new file mode 100644 index 0000000..2ac9ab0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-types.js @@ -0,0 +1,165 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +function removeSpaces(str) { + return str.replaceAll(/\s/g, ''); +} +function stringifyNode(node, sourceCode) { + return removeSpaces(sourceCode.getText(node)); +} +function getCustomMessage(bannedType) { + if (!bannedType || bannedType === true) { + return ''; + } + if (typeof bannedType === 'string') { + return ` ${bannedType}`; + } + if (bannedType.message) { + return ` ${bannedType.message}`; + } + return ''; +} +const TYPE_KEYWORDS = { + bigint: utils_1.AST_NODE_TYPES.TSBigIntKeyword, + boolean: utils_1.AST_NODE_TYPES.TSBooleanKeyword, + never: utils_1.AST_NODE_TYPES.TSNeverKeyword, + null: utils_1.AST_NODE_TYPES.TSNullKeyword, + number: utils_1.AST_NODE_TYPES.TSNumberKeyword, + object: utils_1.AST_NODE_TYPES.TSObjectKeyword, + string: utils_1.AST_NODE_TYPES.TSStringKeyword, + symbol: utils_1.AST_NODE_TYPES.TSSymbolKeyword, + undefined: utils_1.AST_NODE_TYPES.TSUndefinedKeyword, + unknown: utils_1.AST_NODE_TYPES.TSUnknownKeyword, + void: utils_1.AST_NODE_TYPES.TSVoidKeyword, +}; +exports.default = (0, util_1.createRule)({ + name: 'no-restricted-types', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow certain types', + }, + fixable: 'code', + hasSuggestions: true, + messages: { + bannedTypeMessage: "Don't use `{{name}}` as a type.{{customMessage}}", + bannedTypeReplacement: 'Replace `{{name}}` with `{{replacement}}`.', + }, + schema: [ + { + type: 'object', + $defs: { + banConfig: { + oneOf: [ + { + type: 'boolean', + description: 'Bans the type with the default message.', + enum: [true], + }, + { + type: 'string', + description: 'Bans the type with a custom message.', + }, + { + type: 'object', + additionalProperties: false, + description: 'Bans a type.', + properties: { + fixWith: { + type: 'string', + description: 'Type to autofix replace with. Note that autofixers can be applied automatically - so you need to be careful with this option.', + }, + message: { + type: 'string', + description: 'Custom error message.', + }, + suggest: { + type: 'array', + description: 'Types to suggest replacing with.', + items: { type: 'string' }, + }, + }, + }, + ], + }, + }, + additionalProperties: false, + properties: { + types: { + type: 'object', + additionalProperties: { + $ref: '#/items/0/$defs/banConfig', + }, + description: 'An object whose keys are the types you want to ban, and the values are error messages.', + }, + }, + }, + ], + }, + defaultOptions: [{}], + create(context, [{ types = {} }]) { + const bannedTypes = new Map(Object.entries(types).map(([type, data]) => [removeSpaces(type), data])); + function checkBannedTypes(typeNode, name = stringifyNode(typeNode, context.sourceCode)) { + const bannedType = bannedTypes.get(name); + if (bannedType == null || bannedType === false) { + return; + } + const customMessage = getCustomMessage(bannedType); + const fixWith = bannedType && typeof bannedType === 'object' && bannedType.fixWith; + const suggest = bannedType && typeof bannedType === 'object' + ? bannedType.suggest + : undefined; + context.report({ + node: typeNode, + messageId: 'bannedTypeMessage', + data: { + name, + customMessage, + }, + fix: fixWith + ? (fixer) => fixer.replaceText(typeNode, fixWith) + : null, + suggest: suggest?.map(replacement => ({ + messageId: 'bannedTypeReplacement', + data: { + name, + replacement, + }, + fix: (fixer) => fixer.replaceText(typeNode, replacement), + })), + }); + } + const keywordSelectors = (0, util_1.objectReduceKey)(TYPE_KEYWORDS, (acc, keyword) => { + if (bannedTypes.has(keyword)) { + acc[TYPE_KEYWORDS[keyword]] = (node) => checkBannedTypes(node, keyword); + } + return acc; + }, {}); + return { + ...keywordSelectors, + TSClassImplements(node) { + checkBannedTypes(node); + }, + TSInterfaceHeritage(node) { + checkBannedTypes(node); + }, + TSTupleType(node) { + if (!node.elementTypes.length) { + checkBannedTypes(node); + } + }, + TSTypeLiteral(node) { + if (!node.members.length) { + checkBannedTypes(node); + } + }, + TSTypeReference(node) { + checkBannedTypes(node.typeName); + if (node.typeArguments) { + checkBannedTypes(node); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.d.ts new file mode 100644 index 0000000..8169dc3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.d.ts @@ -0,0 +1,15 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type MessageIds = 'noShadow' | 'noShadowGlobal'; +export type Options = [ + { + allow?: string[]; + builtinGlobals?: boolean; + hoist?: 'all' | 'functions' | 'functions-and-types' | 'never' | 'types'; + ignoreFunctionTypeParameterNameValueShadow?: boolean; + ignoreOnInitialization?: boolean; + ignoreTypeValueShadow?: boolean; + } +]; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-shadow.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.d.ts.map new file mode 100644 index 0000000..1a665bb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-shadow.d.ts","sourceRoot":"","sources":["../../src/rules/no-shadow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAQnE,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,gBAAgB,CAAC;AACvD,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,KAAK,CAAC,EAAE,KAAK,GAAG,WAAW,GAAG,qBAAqB,GAAG,OAAO,GAAG,OAAO,CAAC;QACxE,0CAA0C,CAAC,EAAE,OAAO,CAAC;QACrD,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,qBAAqB,CAAC,EAAE,OAAO,CAAC;KACjC;CACF,CAAC;;AAmBF,wBAgqBG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js new file mode 100644 index 0000000..6f4bd27 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js @@ -0,0 +1,521 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const scope_manager_1 = require("@typescript-eslint/scope-manager"); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const isTypeImport_1 = require("../util/isTypeImport"); +const allowedFunctionVariableDefTypes = new Set([ + utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration, + utils_1.AST_NODE_TYPES.TSFunctionType, + utils_1.AST_NODE_TYPES.TSMethodSignature, + utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression, + utils_1.AST_NODE_TYPES.TSDeclareFunction, + utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration, + utils_1.AST_NODE_TYPES.TSConstructorType, +]); +const functionsHoistedNodes = new Set([utils_1.AST_NODE_TYPES.FunctionDeclaration]); +const typesHoistedNodes = new Set([ + utils_1.AST_NODE_TYPES.TSInterfaceDeclaration, + utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration, +]); +exports.default = (0, util_1.createRule)({ + name: 'no-shadow', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow variable declarations from shadowing variables declared in the outer scope', + extendsBaseRule: true, + }, + messages: { + noShadow: "'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.", + noShadowGlobal: "'{{name}}' is already a global variable.", + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allow: { + type: 'array', + description: 'Identifier names for which shadowing is allowed.', + items: { + type: 'string', + }, + }, + builtinGlobals: { + type: 'boolean', + description: 'Whether to report shadowing of built-in global variables.', + }, + hoist: { + type: 'string', + description: 'Whether to report shadowing before outer functions or variables are defined.', + enum: ['all', 'functions', 'functions-and-types', 'never', 'types'], + }, + ignoreFunctionTypeParameterNameValueShadow: { + type: 'boolean', + description: 'Whether to ignore function parameters named the same as a variable.', + }, + ignoreOnInitialization: { + type: 'boolean', + description: 'Whether to ignore the variable initializers when the shadowed variable is presumably still unitialized.', + }, + ignoreTypeValueShadow: { + type: 'boolean', + description: 'Whether to ignore types named the same as a variable.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allow: [], + builtinGlobals: false, + hoist: 'functions-and-types', + ignoreFunctionTypeParameterNameValueShadow: true, + ignoreOnInitialization: false, + ignoreTypeValueShadow: true, + }, + ], + create(context, [options]) { + /** + * Check if a scope is a TypeScript module augmenting the global namespace. + */ + function isGlobalAugmentation(scope) { + return ((scope.type === scope_manager_1.ScopeType.tsModule && scope.block.kind === 'global') || + (!!scope.upper && isGlobalAugmentation(scope.upper))); + } + /** + * Check if variable is a `this` parameter. + */ + function isThisParam(variable) { + return (variable.defs[0].type === scope_manager_1.DefinitionType.Parameter && + variable.name === 'this'); + } + function isTypeValueShadow(variable, shadowed) { + if (options.ignoreTypeValueShadow !== true) { + return false; + } + if (!('isValueVariable' in variable)) { + // this shouldn't happen... + return false; + } + const firstDefinition = shadowed.defs.at(0); + const isShadowedValue = !('isValueVariable' in shadowed) || + !firstDefinition || + (!(0, isTypeImport_1.isTypeImport)(firstDefinition) && shadowed.isValueVariable); + return variable.isValueVariable !== isShadowedValue; + } + function isFunctionTypeParameterNameValueShadow(variable, shadowed) { + if (options.ignoreFunctionTypeParameterNameValueShadow !== true) { + return false; + } + if (!('isValueVariable' in variable)) { + // this shouldn't happen... + return false; + } + const isShadowedValue = 'isValueVariable' in shadowed ? shadowed.isValueVariable : true; + if (!isShadowedValue) { + return false; + } + return variable.defs.every(def => allowedFunctionVariableDefTypes.has(def.node.type)); + } + function isGenericOfStaticMethod(variable) { + if (!('isTypeVariable' in variable)) { + // this shouldn't happen... + return false; + } + if (!variable.isTypeVariable) { + return false; + } + if (variable.identifiers.length === 0) { + return false; + } + const typeParameter = variable.identifiers[0].parent; + if (typeParameter.type !== utils_1.AST_NODE_TYPES.TSTypeParameter) { + return false; + } + const typeParameterDecl = typeParameter.parent; + if (typeParameterDecl.type !== utils_1.AST_NODE_TYPES.TSTypeParameterDeclaration) { + return false; + } + const functionExpr = typeParameterDecl.parent; + if (functionExpr.type !== utils_1.AST_NODE_TYPES.FunctionExpression && + functionExpr.type !== utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression) { + return false; + } + const methodDefinition = functionExpr.parent; + if (methodDefinition.type !== utils_1.AST_NODE_TYPES.MethodDefinition) { + return false; + } + return methodDefinition.static; + } + function isGenericOfClass(variable) { + if (!('isTypeVariable' in variable)) { + // this shouldn't happen... + return false; + } + if (!variable.isTypeVariable) { + return false; + } + if (variable.identifiers.length === 0) { + return false; + } + const typeParameter = variable.identifiers[0].parent; + if (typeParameter.type !== utils_1.AST_NODE_TYPES.TSTypeParameter) { + return false; + } + const typeParameterDecl = typeParameter.parent; + if (typeParameterDecl.type !== utils_1.AST_NODE_TYPES.TSTypeParameterDeclaration) { + return false; + } + const classDecl = typeParameterDecl.parent; + return (classDecl.type === utils_1.AST_NODE_TYPES.ClassDeclaration || + classDecl.type === utils_1.AST_NODE_TYPES.ClassExpression); + } + function isGenericOfAStaticMethodShadow(variable, shadowed) { + return isGenericOfStaticMethod(variable) && isGenericOfClass(shadowed); + } + function isImportDeclaration(definition) { + return definition.type === utils_1.AST_NODE_TYPES.ImportDeclaration; + } + function isExternalModuleDeclarationWithName(scope, name) { + return (scope.type === scope_manager_1.ScopeType.tsModule && + scope.block.id.type === utils_1.AST_NODE_TYPES.Literal && + scope.block.id.value === name); + } + function isExternalDeclarationMerging(scope, variable, shadowed) { + const [firstDefinition] = shadowed.defs; + const [secondDefinition] = variable.defs; + return ((0, isTypeImport_1.isTypeImport)(firstDefinition) && + isImportDeclaration(firstDefinition.parent) && + isExternalModuleDeclarationWithName(scope, firstDefinition.parent.source.value) && + (secondDefinition.node.type === utils_1.AST_NODE_TYPES.TSInterfaceDeclaration || + secondDefinition.node.type === utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration)); + } + /** + * Check if variable name is allowed. + * @param variable The variable to check. + * @returns Whether or not the variable name is allowed. + */ + function isAllowed(variable) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return options.allow.includes(variable.name); + } + /** + * Checks if a variable of the class name in the class scope of ClassDeclaration. + * + * ClassDeclaration creates two variables of its name into its outer scope and its class scope. + * So we should ignore the variable in the class scope. + * @param variable The variable to check. + * @returns Whether or not the variable of the class name in the class scope of ClassDeclaration. + */ + function isDuplicatedClassNameVariable(variable) { + const block = variable.scope.block; + return (block.type === utils_1.AST_NODE_TYPES.ClassDeclaration && + block.id === variable.identifiers[0]); + } + /** + * Checks if a variable of the class name in the class scope of TSEnumDeclaration. + * + * TSEnumDeclaration creates two variables of its name into its outer scope and its class scope. + * So we should ignore the variable in the class scope. + * @param variable The variable to check. + * @returns Whether or not the variable of the class name in the class scope of TSEnumDeclaration. + */ + function isDuplicatedEnumNameVariable(variable) { + const block = variable.scope.block; + return (block.type === utils_1.AST_NODE_TYPES.TSEnumDeclaration && + block.id === variable.identifiers[0]); + } + /** + * Checks whether or not a given location is inside of the range of a given node. + * @param node An node to check. + * @param location A location to check. + * @returns `true` if the location is inside of the range of the node. + */ + function isInRange(node, location) { + return node && node.range[0] <= location && location <= node.range[1]; + } + /** + * Searches from the current node through its ancestry to find a matching node. + * @param node a node to get. + * @param match a callback that checks whether or not the node verifies its condition or not. + * @returns the matching node. + */ + function findSelfOrAncestor(node, match) { + let currentNode = node; + while (currentNode && !match(currentNode)) { + currentNode = currentNode.parent; + } + return currentNode; + } + /** + * Finds function's outer scope. + * @param scope Function's own scope. + * @returns Function's outer scope. + */ + function getOuterScope(scope) { + const upper = scope.upper; + if (upper?.type === scope_manager_1.ScopeType.functionExpressionName) { + return upper.upper; + } + return upper; + } + /** + * Checks if a variable and a shadowedVariable have the same init pattern ancestor. + * @param variable a variable to check. + * @param shadowedVariable a shadowedVariable to check. + * @returns Whether or not the variable and the shadowedVariable have the same init pattern ancestor. + */ + function isInitPatternNode(variable, shadowedVariable) { + const outerDef = shadowedVariable.defs.at(0); + if (!outerDef) { + return false; + } + const { variableScope } = variable.scope; + if (!((variableScope.block.type === + utils_1.AST_NODE_TYPES.ArrowFunctionExpression || + variableScope.block.type === utils_1.AST_NODE_TYPES.FunctionExpression) && + getOuterScope(variableScope) === shadowedVariable.scope)) { + return false; + } + const fun = variableScope.block; + const { parent } = fun; + const callExpression = findSelfOrAncestor(parent, node => node.type === utils_1.AST_NODE_TYPES.CallExpression); + if (!callExpression) { + return false; + } + let node = outerDef.name; + const location = callExpression.range[1]; + while (node) { + if (node.type === utils_1.AST_NODE_TYPES.VariableDeclarator) { + if (isInRange(node.init, location)) { + return true; + } + if ((node.parent.parent.type === utils_1.AST_NODE_TYPES.ForInStatement || + node.parent.parent.type === utils_1.AST_NODE_TYPES.ForOfStatement) && + isInRange(node.parent.parent.right, location)) { + return true; + } + break; + } + else if (node.type === utils_1.AST_NODE_TYPES.AssignmentPattern) { + if (isInRange(node.right, location)) { + return true; + } + } + else if ([ + utils_1.AST_NODE_TYPES.ArrowFunctionExpression, + utils_1.AST_NODE_TYPES.CatchClause, + utils_1.AST_NODE_TYPES.ClassDeclaration, + utils_1.AST_NODE_TYPES.ClassExpression, + utils_1.AST_NODE_TYPES.ExportNamedDeclaration, + utils_1.AST_NODE_TYPES.FunctionDeclaration, + utils_1.AST_NODE_TYPES.FunctionExpression, + utils_1.AST_NODE_TYPES.ImportDeclaration, + ].includes(node.type)) { + break; + } + node = node.parent; + } + return false; + } + /** + * Checks if a variable is inside the initializer of scopeVar. + * + * To avoid reporting at declarations such as `var a = function a() {};`. + * But it should report `var a = function(a) {};` or `var a = function() { function a() {} };`. + * @param variable The variable to check. + * @param scopeVar The scope variable to look for. + * @returns Whether or not the variable is inside initializer of scopeVar. + */ + function isOnInitializer(variable, scopeVar) { + const outerScope = scopeVar.scope; + const outerDef = scopeVar.defs.at(0); + const outer = outerDef?.parent?.range; + const innerScope = variable.scope; + const innerDef = variable.defs.at(0); + const inner = innerDef?.name.range; + return !!(outer && + inner && + outer[0] < inner[0] && + inner[1] < outer[1] && + ((innerDef.type === scope_manager_1.DefinitionType.FunctionName && + innerDef.node.type === utils_1.AST_NODE_TYPES.FunctionExpression) || + innerDef.node.type === utils_1.AST_NODE_TYPES.ClassExpression) && + outerScope === innerScope.upper); + } + /** + * Get a range of a variable's identifier node. + * @param variable The variable to get. + * @returns The range of the variable's identifier node. + */ + function getNameRange(variable) { + const def = variable.defs.at(0); + return def?.name.range; + } + /** + * Checks if a variable is in TDZ of scopeVar. + * @param variable The variable to check. + * @param scopeVar The variable of TDZ. + * @returns Whether or not the variable is in TDZ of scopeVar. + */ + function isInTdz(variable, scopeVar) { + const outerDef = scopeVar.defs.at(0); + const inner = getNameRange(variable); + const outer = getNameRange(scopeVar); + if (!inner || !outer || inner[1] >= outer[0]) { + return false; + } + if (!outerDef) { + return true; + } + if (options.hoist === 'functions') { + return !functionsHoistedNodes.has(outerDef.node.type); + } + if (options.hoist === 'types') { + return !typesHoistedNodes.has(outerDef.node.type); + } + if (options.hoist === 'functions-and-types') { + return (!functionsHoistedNodes.has(outerDef.node.type) && + !typesHoistedNodes.has(outerDef.node.type)); + } + return true; + } + /** + * Get declared line and column of a variable. + * @param variable The variable to get. + * @returns The declared line and column of the variable. + */ + function getDeclaredLocation(variable) { + const identifier = variable.identifiers.at(0); + if (identifier) { + return { + column: identifier.loc.start.column + 1, + global: false, + line: identifier.loc.start.line, + }; + } + return { + global: true, + }; + } + /** + * Checks if the initialization of a variable has the declare modifier in a + * definition file. + */ + function isDeclareInDTSFile(variable) { + const fileName = context.filename; + if (!(0, util_1.isDefinitionFile)(fileName)) { + return false; + } + return variable.defs.some(def => { + return ((def.type === scope_manager_1.DefinitionType.Variable && def.parent.declare) || + (def.type === scope_manager_1.DefinitionType.ClassName && def.node.declare) || + (def.type === scope_manager_1.DefinitionType.TSEnumName && def.node.declare) || + (def.type === scope_manager_1.DefinitionType.TSModuleName && def.node.declare)); + }); + } + /** + * Checks the current context for shadowed variables. + * @param scope Fixme + */ + function checkForShadows(scope) { + // ignore global augmentation + if (isGlobalAugmentation(scope)) { + return; + } + const variables = scope.variables; + for (const variable of variables) { + // ignore "arguments" + if (variable.identifiers.length === 0) { + continue; + } + // this params are pseudo-params that cannot be shadowed + if (isThisParam(variable)) { + continue; + } + // ignore variables of a class name in the class scope of ClassDeclaration + if (isDuplicatedClassNameVariable(variable)) { + continue; + } + // ignore variables of a class name in the class scope of ClassDeclaration + if (isDuplicatedEnumNameVariable(variable)) { + continue; + } + // ignore configured allowed names + if (isAllowed(variable)) { + continue; + } + // ignore variables with the declare keyword in .d.ts files + if (isDeclareInDTSFile(variable)) { + continue; + } + // Gets shadowed variable. + const shadowed = scope.upper + ? utils_1.ASTUtils.findVariable(scope.upper, variable.name) + : null; + if (!shadowed) { + continue; + } + // ignore type value variable shadowing if configured + if (isTypeValueShadow(variable, shadowed)) { + continue; + } + // ignore function type parameter name shadowing if configured + if (isFunctionTypeParameterNameValueShadow(variable, shadowed)) { + continue; + } + // ignore static class method generic shadowing class generic + // this is impossible for the scope analyser to understand + // so we have to handle this manually in this rule + if (isGenericOfAStaticMethodShadow(variable, shadowed)) { + continue; + } + if (isExternalDeclarationMerging(scope, variable, shadowed)) { + continue; + } + const isESLintGlobal = 'writeable' in shadowed; + if ((shadowed.identifiers.length > 0 || + (options.builtinGlobals && isESLintGlobal)) && + !isOnInitializer(variable, shadowed) && + !(options.ignoreOnInitialization && + isInitPatternNode(variable, shadowed)) && + !(options.hoist !== 'all' && isInTdz(variable, shadowed))) { + const location = getDeclaredLocation(shadowed); + context.report({ + node: variable.identifiers[0], + ...(location.global + ? { + messageId: 'noShadowGlobal', + data: { + name: variable.name, + }, + } + : { + messageId: 'noShadow', + data: { + name: variable.name, + shadowedColumn: location.column, + shadowedLine: location.line, + }, + }), + }); + } + } + } + return { + 'Program:exit'(node) { + const globalScope = context.sourceCode.getScope(node); + const stack = [...globalScope.childScopes]; + while (stack.length) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const scope = stack.pop(); + stack.push(...scope.childScopes); + checkForShadows(scope); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.d.ts new file mode 100644 index 0000000..36b7b77 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.d.ts @@ -0,0 +1,10 @@ +export type Options = [ + { + allowDestructuring?: boolean; + allowedNames?: string[]; + } +]; +export type MessageIds = 'thisAssignment' | 'thisDestructure'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=no-this-alias.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.d.ts.map new file mode 100644 index 0000000..6b90fb2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-this-alias.d.ts","sourceRoot":"","sources":["../../src/rules/no-this-alias.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;KACzB;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;;AAE9D,wBAsEG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js new file mode 100644 index 0000000..7ec39cc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js @@ -0,0 +1,66 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-this-alias', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow aliasing `this`', + recommended: 'recommended', + }, + messages: { + thisAssignment: "Unexpected aliasing of 'this' to local variable.", + thisDestructure: "Unexpected aliasing of members of 'this' to local variables.", + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowDestructuring: { + type: 'boolean', + description: 'Whether to ignore destructurings, such as `const { props, state } = this`.', + }, + allowedNames: { + type: 'array', + description: 'Names to ignore, such as ["self"] for `const self = this;`.', + items: { + type: 'string', + }, + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowDestructuring: true, + allowedNames: [], + }, + ], + create(context, [{ allowDestructuring, allowedNames }]) { + return { + "VariableDeclarator[init.type='ThisExpression'], AssignmentExpression[right.type='ThisExpression']"(node) { + const id = node.type === utils_1.AST_NODE_TYPES.VariableDeclarator ? node.id : node.left; + if (allowDestructuring && id.type !== utils_1.AST_NODE_TYPES.Identifier) { + return; + } + const hasAllowedName = id.type === utils_1.AST_NODE_TYPES.Identifier + ? // https://github.com/typescript-eslint/typescript-eslint/issues/5439 + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + allowedNames.includes(id.name) + : false; + if (!hasAllowedName) { + context.report({ + node: id, + messageId: id.type === utils_1.AST_NODE_TYPES.Identifier + ? 'thisAssignment' + : 'thisDestructure', + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.d.ts new file mode 100644 index 0000000..a77b613 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.d.ts @@ -0,0 +1,17 @@ +type Values = 'always' | 'in-intersections' | 'in-unions' | 'in-unions-and-intersections' | 'never'; +export type Options = [ + { + allowAliases?: Values; + allowCallbacks?: 'always' | 'never'; + allowConditionalTypes?: 'always' | 'never'; + allowConstructors?: 'always' | 'never'; + allowGenerics?: 'always' | 'never'; + allowLiterals?: Values; + allowMappedTypes?: Values; + allowTupleTypes?: Values; + } +]; +export type MessageIds = 'noCompositionAlias' | 'noTypeAlias'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=no-type-alias.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.d.ts.map new file mode 100644 index 0000000..ae07b6a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-type-alias.d.ts","sourceRoot":"","sources":["../../src/rules/no-type-alias.ts"],"names":[],"mappings":"AAMA,KAAK,MAAM,GACP,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,6BAA6B,GAC7B,OAAO,CAAC;AAEZ,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,cAAc,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;QACpC,qBAAqB,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;QAC3C,iBAAiB,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;QACvC,aAAa,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;QACnC,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,oBAAoB,GAAG,aAAa,CAAC;;AAU9D,wBAmUG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js new file mode 100644 index 0000000..71c1c04 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js @@ -0,0 +1,269 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-type-alias', + meta: { + type: 'suggestion', + deprecated: { + deprecatedSince: '6.0.0', + replacedBy: [ + { + rule: { + name: '@typescript-eslint/consistent-type-definitions', + url: 'https://typescript-eslint.io/rules/consistent-type-definitions', + }, + }, + ], + url: 'https://github.com/typescript-eslint/typescript-eslint/pull/6229', + }, + docs: { + description: 'Disallow type aliases', + // too opinionated to be recommended + }, + messages: { + noCompositionAlias: '{{typeName}} in {{compositionType}} types are not allowed.', + noTypeAlias: 'Type {{alias}} are not allowed.', + }, + schema: [ + { + type: 'object', + $defs: { + expandedOptions: { + type: 'string', + enum: [ + 'always', + 'never', + 'in-unions', + 'in-intersections', + 'in-unions-and-intersections', + ], + }, + simpleOptions: { + type: 'string', + enum: ['always', 'never'], + }, + }, + additionalProperties: false, + properties: { + allowAliases: { + $ref: '#/items/0/$defs/expandedOptions', + description: 'Whether to allow direct one-to-one type aliases.', + }, + allowCallbacks: { + $ref: '#/items/0/$defs/simpleOptions', + description: 'Whether to allow type aliases for callbacks.', + }, + allowConditionalTypes: { + $ref: '#/items/0/$defs/simpleOptions', + description: 'Whether to allow type aliases for conditional types.', + }, + allowConstructors: { + $ref: '#/items/0/$defs/simpleOptions', + description: 'Whether to allow type aliases with constructors.', + }, + allowGenerics: { + $ref: '#/items/0/$defs/simpleOptions', + description: 'Whether to allow type aliases with generic types.', + }, + allowLiterals: { + $ref: '#/items/0/$defs/expandedOptions', + description: 'Whether to allow type aliases with object literal types.', + }, + allowMappedTypes: { + $ref: '#/items/0/$defs/expandedOptions', + description: 'Whether to allow type aliases with mapped types.', + }, + allowTupleTypes: { + $ref: '#/items/0/$defs/expandedOptions', + description: 'Whether to allow type aliases with tuple types.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowAliases: 'never', + allowCallbacks: 'never', + allowConditionalTypes: 'never', + allowConstructors: 'never', + allowGenerics: 'never', + allowLiterals: 'never', + allowMappedTypes: 'never', + allowTupleTypes: 'never', + }, + ], + create(context, [{ allowAliases, allowCallbacks, allowConditionalTypes, allowConstructors, allowGenerics, allowLiterals, allowMappedTypes, allowTupleTypes, },]) { + const unions = ['always', 'in-unions', 'in-unions-and-intersections']; + const intersections = [ + 'always', + 'in-intersections', + 'in-unions-and-intersections', + ]; + const compositions = [ + 'in-unions', + 'in-intersections', + 'in-unions-and-intersections', + ]; + const aliasTypes = new Set([ + utils_1.AST_NODE_TYPES.TSArrayType, + utils_1.AST_NODE_TYPES.TSImportType, + utils_1.AST_NODE_TYPES.TSIndexedAccessType, + utils_1.AST_NODE_TYPES.TSLiteralType, + utils_1.AST_NODE_TYPES.TSTemplateLiteralType, + utils_1.AST_NODE_TYPES.TSTypeQuery, + utils_1.AST_NODE_TYPES.TSTypeReference, + ]); + /** + * Determines if the composition type is supported by the allowed flags. + * @param isTopLevel a flag indicating this is the top level node. + * @param compositionType the composition type (either TSUnionType or TSIntersectionType) + * @param allowed the currently allowed flags. + */ + function isSupportedComposition(isTopLevel, compositionType, allowed) { + return (!compositions.includes(allowed) || + (!isTopLevel && + ((compositionType === utils_1.AST_NODE_TYPES.TSUnionType && + unions.includes(allowed)) || + (compositionType === utils_1.AST_NODE_TYPES.TSIntersectionType && + intersections.includes(allowed))))); + } + /** + * Gets the message to be displayed based on the node type and whether the node is a top level declaration. + * @param node the location + * @param compositionType the type of composition this alias is part of (undefined if not + * part of a composition) + * @param isRoot a flag indicating we are dealing with the top level declaration. + * @param type the kind of type alias being validated. + */ + function reportError(node, compositionType, isRoot, type) { + if (isRoot) { + return context.report({ + node, + messageId: 'noTypeAlias', + data: { + alias: type.toLowerCase(), + }, + }); + } + return context.report({ + node, + messageId: 'noCompositionAlias', + data: { + compositionType: compositionType === utils_1.AST_NODE_TYPES.TSUnionType + ? 'union' + : 'intersection', + typeName: type, + }, + }); + } + const isValidTupleType = (type) => { + if (type.node.type === utils_1.AST_NODE_TYPES.TSTupleType) { + return true; + } + if (type.node.type === utils_1.AST_NODE_TYPES.TSTypeOperator && + ['keyof', 'readonly'].includes(type.node.operator) && + type.node.typeAnnotation && + type.node.typeAnnotation.type === utils_1.AST_NODE_TYPES.TSTupleType) { + return true; + } + return false; + }; + const isValidGeneric = (type) => { + return (type.node.type === utils_1.AST_NODE_TYPES.TSTypeReference && + type.node.typeArguments != null); + }; + const checkAndReport = (optionValue, isTopLevel, type, label) => { + if (optionValue === 'never' || + !isSupportedComposition(isTopLevel, type.compositionType, optionValue)) { + reportError(type.node, type.compositionType, isTopLevel, label); + } + }; + /** + * Validates the node looking for aliases, callbacks and literals. + * @param type the type of composition this alias is part of (null if not + * part of a composition) + * @param isTopLevel a flag indicating this is the top level node. + */ + function validateTypeAliases(type, isTopLevel = false) { + // https://github.com/typescript-eslint/typescript-eslint/issues/5439 + /* eslint-disable @typescript-eslint/no-non-null-assertion */ + if (type.node.type === utils_1.AST_NODE_TYPES.TSFunctionType) { + // callback + if (allowCallbacks === 'never') { + reportError(type.node, type.compositionType, isTopLevel, 'Callbacks'); + } + } + else if (type.node.type === utils_1.AST_NODE_TYPES.TSConditionalType) { + // conditional type + if (allowConditionalTypes === 'never') { + reportError(type.node, type.compositionType, isTopLevel, 'Conditional types'); + } + } + else if (type.node.type === utils_1.AST_NODE_TYPES.TSConstructorType) { + if (allowConstructors === 'never') { + reportError(type.node, type.compositionType, isTopLevel, 'Constructors'); + } + } + else if (type.node.type === utils_1.AST_NODE_TYPES.TSTypeLiteral) { + // literal object type + checkAndReport(allowLiterals, isTopLevel, type, 'Literals'); + } + else if (type.node.type === utils_1.AST_NODE_TYPES.TSMappedType) { + // mapped type + checkAndReport(allowMappedTypes, isTopLevel, type, 'Mapped types'); + } + else if (isValidTupleType(type)) { + // tuple types + checkAndReport(allowTupleTypes, isTopLevel, type, 'Tuple Types'); + } + else if (isValidGeneric(type)) { + if (allowGenerics === 'never') { + reportError(type.node, type.compositionType, isTopLevel, 'Generics'); + } + } + else if (type.node.type.endsWith(utils_1.AST_TOKEN_TYPES.Keyword) || + aliasTypes.has(type.node.type) || + (type.node.type === utils_1.AST_NODE_TYPES.TSTypeOperator && + (type.node.operator === 'keyof' || + (type.node.operator === 'readonly' && + type.node.typeAnnotation && + aliasTypes.has(type.node.typeAnnotation.type))))) { + // alias / keyword + checkAndReport(allowAliases, isTopLevel, type, 'Aliases'); + } + else { + // unhandled type - shouldn't happen + reportError(type.node, type.compositionType, isTopLevel, 'Unhandled'); + } + /* eslint-enable @typescript-eslint/no-non-null-assertion */ + } + /** + * Flatten the given type into an array of its dependencies + */ + function getTypes(node, compositionType = null) { + if (node.type === utils_1.AST_NODE_TYPES.TSUnionType || + node.type === utils_1.AST_NODE_TYPES.TSIntersectionType) { + return node.types.flatMap(type => getTypes(type, node.type)); + } + return [{ node, compositionType }]; + } + return { + TSTypeAliasDeclaration(node) { + const types = getTypes(node.typeAnnotation); + if (types.length === 1) { + // is a top level type annotation + validateTypeAliases(types[0], true); + } + else { + // is a composition type + types.forEach(type => { + validateTypeAliases(type); + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.d.ts new file mode 100644 index 0000000..a446174 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.d.ts @@ -0,0 +1,11 @@ +export type MessageIds = 'comparingNullableToFalse' | 'comparingNullableToTrueDirect' | 'comparingNullableToTrueNegated' | 'direct' | 'negated' | 'noStrictNullCheck'; +export type Options = [ + { + allowComparingNullableBooleansToFalse?: boolean; + allowComparingNullableBooleansToTrue?: boolean; + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean; + } +]; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=no-unnecessary-boolean-literal-compare.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.d.ts.map new file mode 100644 index 0000000..b881fca --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unnecessary-boolean-literal-compare.d.ts","sourceRoot":"","sources":["../../src/rules/no-unnecessary-boolean-literal-compare.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,UAAU,GAClB,0BAA0B,GAC1B,+BAA+B,GAC/B,gCAAgC,GAChC,QAAQ,GACR,SAAS,GACT,mBAAmB,CAAC;AAExB,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,qCAAqC,CAAC,EAAE,OAAO,CAAC;QAChD,oCAAoC,CAAC,EAAE,OAAO,CAAC;QAC/C,sDAAsD,CAAC,EAAE,OAAO,CAAC;KAClE;CACF,CAAC;;AAYF,wBAkRG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js new file mode 100644 index 0000000..994d357 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js @@ -0,0 +1,263 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-unnecessary-boolean-literal-compare', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow unnecessary equality comparisons against boolean literals', + recommended: 'strict', + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + comparingNullableToFalse: 'This expression unnecessarily compares a nullable boolean value to false instead of using the ?? operator to provide a default.', + comparingNullableToTrueDirect: 'This expression unnecessarily compares a nullable boolean value to true instead of using it directly.', + comparingNullableToTrueNegated: 'This expression unnecessarily compares a nullable boolean value to true instead of negating it.', + direct: 'This expression unnecessarily compares a boolean value to a boolean instead of using it directly.', + negated: 'This expression unnecessarily compares a boolean value to a boolean instead of negating it.', + noStrictNullCheck: 'This rule requires the `strictNullChecks` compiler option to be turned on to function correctly.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowComparingNullableBooleansToFalse: { + type: 'boolean', + description: 'Whether to allow comparisons between nullable boolean variables and `false`.', + }, + allowComparingNullableBooleansToTrue: { + type: 'boolean', + description: 'Whether to allow comparisons between nullable boolean variables and `true`.', + }, + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: { + type: 'boolean', + description: 'Unless this is set to `true`, the rule will error on every file whose `tsconfig.json` does _not_ have the `strictNullChecks` compiler option (or `strict`) set to `true`.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowComparingNullableBooleansToFalse: true, + allowComparingNullableBooleansToTrue: true, + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false, + }, + ], + create(context, [options]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const compilerOptions = services.program.getCompilerOptions(); + const isStrictNullChecks = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'strictNullChecks'); + if (!isStrictNullChecks && + options.allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing !== true) { + context.report({ + loc: { + start: { column: 0, line: 0 }, + end: { column: 0, line: 0 }, + }, + messageId: 'noStrictNullCheck', + }); + } + function getBooleanComparison(node) { + const comparison = deconstructComparison(node); + if (!comparison) { + return undefined; + } + const { constraintType, isTypeParameter } = (0, util_1.getConstraintInfo)(checker, services.getTypeAtLocation(comparison.expression)); + if (isTypeParameter && constraintType == null) { + return undefined; + } + if (isBooleanType(constraintType)) { + return { + ...comparison, + expressionIsNullableBoolean: false, + }; + } + if (isNullableBoolean(constraintType)) { + return { + ...comparison, + expressionIsNullableBoolean: true, + }; + } + return undefined; + } + function isBooleanType(expressionType) { + return tsutils.isTypeFlagSet(expressionType, ts.TypeFlags.Boolean | ts.TypeFlags.BooleanLiteral); + } + /** + * checks if the expressionType is a union that + * 1) contains at least one nullish type (null or undefined) + * 2) contains at least once boolean type (true or false or boolean) + * 3) does not contain any types besides nullish and boolean types + */ + function isNullableBoolean(expressionType) { + if (!expressionType.isUnion()) { + return false; + } + const { types } = expressionType; + const nonNullishTypes = types.filter(type => !tsutils.isTypeFlagSet(type, ts.TypeFlags.Undefined | ts.TypeFlags.Null)); + const hasNonNullishType = nonNullishTypes.length > 0; + if (!hasNonNullishType) { + return false; + } + const hasNullableType = nonNullishTypes.length < types.length; + if (!hasNullableType) { + return false; + } + const allNonNullishTypesAreBoolean = nonNullishTypes.every(isBooleanType); + if (!allNonNullishTypesAreBoolean) { + return false; + } + return true; + } + function deconstructComparison(node) { + const comparisonType = getEqualsKind(node.operator); + if (!comparisonType) { + return undefined; + } + for (const [against, expression] of [ + [node.right, node.left], + [node.left, node.right], + ]) { + if (against.type !== utils_1.AST_NODE_TYPES.Literal || + typeof against.value !== 'boolean') { + continue; + } + const { value: literalBooleanInComparison } = against; + const negated = !comparisonType.isPositive; + return { + expression, + literalBooleanInComparison, + negated, + }; + } + return undefined; + } + function nodeIsUnaryNegation(node) { + return (node.type === utils_1.AST_NODE_TYPES.UnaryExpression && + node.prefix && + node.operator === '!'); + } + return { + BinaryExpression(node) { + const comparison = getBooleanComparison(node); + if (comparison == null) { + return; + } + if (comparison.expressionIsNullableBoolean) { + if (comparison.literalBooleanInComparison && + options.allowComparingNullableBooleansToTrue) { + return; + } + if (!comparison.literalBooleanInComparison && + options.allowComparingNullableBooleansToFalse) { + return; + } + } + context.report({ + node, + messageId: comparison.expressionIsNullableBoolean + ? comparison.literalBooleanInComparison + ? comparison.negated + ? 'comparingNullableToTrueNegated' + : 'comparingNullableToTrueDirect' + : 'comparingNullableToFalse' + : comparison.negated + ? 'negated' + : 'direct', + *fix(fixer) { + // 1. isUnaryNegation - parent negation + // 2. literalBooleanInComparison - is compared to literal boolean + // 3. negated - is expression negated + const isUnaryNegation = nodeIsUnaryNegation(node.parent); + const shouldNegate = comparison.negated !== comparison.literalBooleanInComparison; + const mutatedNode = isUnaryNegation ? node.parent : node; + yield fixer.replaceText(mutatedNode, context.sourceCode.getText(comparison.expression)); + // if `isUnaryNegation === literalBooleanInComparison === !negated` is true - negate the expression + if (shouldNegate === isUnaryNegation) { + yield fixer.insertTextBefore(mutatedNode, '!'); + // if the expression `exp` is not a strong precedence node, wrap it in parentheses + if (!(0, util_1.isStrongPrecedenceNode)(comparison.expression)) { + yield fixer.insertTextBefore(mutatedNode, '('); + yield fixer.insertTextAfter(mutatedNode, ')'); + } + } + // if the expression `exp` is nullable, and we're not comparing to `true`, insert `?? true` + if (comparison.expressionIsNullableBoolean && + !comparison.literalBooleanInComparison) { + // provide the default `true` + yield fixer.insertTextBefore(mutatedNode, '('); + yield fixer.insertTextAfter(mutatedNode, ' ?? true)'); + } + }, + }); + }, + }; + }, +}); +function getEqualsKind(operator) { + switch (operator) { + case '!=': + return { + isPositive: false, + isStrict: false, + }; + case '!==': + return { + isPositive: false, + isStrict: true, + }; + case '==': + return { + isPositive: true, + isStrict: false, + }; + case '===': + return { + isPositive: true, + isStrict: true, + }; + default: + return undefined; + } +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.d.ts new file mode 100644 index 0000000..d30970f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.d.ts @@ -0,0 +1,13 @@ +type LegacyAllowConstantLoopConditions = boolean; +type AllowConstantLoopConditions = 'always' | 'never' | 'only-allowed-literals'; +export type Options = [ + { + allowConstantLoopConditions?: AllowConstantLoopConditions | LegacyAllowConstantLoopConditions; + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean; + checkTypePredicates?: boolean; + } +]; +export type MessageId = 'alwaysFalsy' | 'alwaysFalsyFunc' | 'alwaysNullish' | 'alwaysTruthy' | 'alwaysTruthyFunc' | 'comparisonBetweenLiteralTypes' | 'never' | 'neverNullish' | 'neverOptionalChain' | 'noOverlapBooleanExpression' | 'noStrictNullCheck' | 'suggestRemoveOptionalChain' | 'typeGuardAlreadyIsType'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=no-unnecessary-condition.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.d.ts.map new file mode 100644 index 0000000..75b654e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unnecessary-condition.d.ts","sourceRoot":"","sources":["../../src/rules/no-unnecessary-condition.ts"],"names":[],"mappings":"AAyHA,KAAK,iCAAiC,GAAG,OAAO,CAAC;AAEjD,KAAK,2BAA2B,GAAG,QAAQ,GAAG,OAAO,GAAG,uBAAuB,CAAC;AAShF,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,2BAA2B,CAAC,EACxB,2BAA2B,GAC3B,iCAAiC,CAAC;QACtC,sDAAsD,CAAC,EAAE,OAAO,CAAC;QACjE,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B;CACF,CAAC;AAEF,MAAM,MAAM,SAAS,GACjB,aAAa,GACb,iBAAiB,GACjB,eAAe,GACf,cAAc,GACd,kBAAkB,GAClB,+BAA+B,GAC/B,OAAO,GACP,cAAc,GACd,oBAAoB,GACpB,4BAA4B,GAC5B,mBAAmB,GACnB,4BAA4B,GAC5B,wBAAwB,CAAC;;AAE7B,wBA0wBG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js new file mode 100644 index 0000000..7725b26 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js @@ -0,0 +1,676 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const assertionFunctionUtils_1 = require("../util/assertionFunctionUtils"); +// #region +const nullishFlag = ts.TypeFlags.Undefined | ts.TypeFlags.Null; +function isNullishType(type) { + return tsutils.isTypeFlagSet(type, nullishFlag); +} +function isAlwaysNullish(type) { + return tsutils.unionConstituents(type).every(isNullishType); +} +/** + * Note that this differs from {@link isNullableType} in that it doesn't consider + * `any` or `unknown` to be nullable. + */ +function isPossiblyNullish(type) { + return tsutils.unionConstituents(type).some(isNullishType); +} +function toStaticValue(type) { + // type.isLiteral() only covers numbers/bigints and strings, hence the rest of the branches. + if (tsutils.isBooleanLiteralType(type)) { + return { value: tsutils.isTrueLiteralType(type) }; + } + if (type.flags === ts.TypeFlags.Undefined) { + return { value: undefined }; + } + if (type.flags === ts.TypeFlags.Null) { + return { value: null }; + } + if (type.isLiteral()) { + return { value: (0, util_1.getValueOfLiteralType)(type) }; + } + return undefined; +} +const BOOL_OPERATORS = new Set([ + '<', + '>', + '<=', + '>=', + '==', + '===', + '!=', + '!==', +]); +function isBoolOperator(operator) { + return BOOL_OPERATORS.has(operator); +} +function booleanComparison(left, operator, right) { + switch (operator) { + case '!=': + // eslint-disable-next-line eqeqeq -- intentionally comparing with loose equality + return left != right; + case '!==': + return left !== right; + case '<': + // @ts-expect-error: we don't care if the comparison seems unintentional. + return left < right; + case '<=': + // @ts-expect-error: we don't care if the comparison seems unintentional. + return left <= right; + case '==': + // eslint-disable-next-line eqeqeq -- intentionally comparing with loose equality + return left == right; + case '===': + return left === right; + case '>': + // @ts-expect-error: we don't care if the comparison seems unintentional. + return left > right; + case '>=': + // @ts-expect-error: we don't care if the comparison seems unintentional. + return left >= right; + } +} +const constantLoopConditionsAllowedLiterals = new Set([ + true, + false, + 1, + 0, +]); +exports.default = (0, util_1.createRule)({ + name: 'no-unnecessary-condition', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow conditionals where the type is always truthy or always falsy', + recommended: 'strict', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + alwaysFalsy: 'Unnecessary conditional, value is always falsy.', + alwaysFalsyFunc: 'This callback should return a conditional, but return is always falsy.', + alwaysNullish: 'Unnecessary conditional, left-hand side of `??` operator is always `null` or `undefined`.', + alwaysTruthy: 'Unnecessary conditional, value is always truthy.', + alwaysTruthyFunc: 'This callback should return a conditional, but return is always truthy.', + comparisonBetweenLiteralTypes: 'Unnecessary conditional, comparison is always {{trueOrFalse}}, since `{{left}} {{operator}} {{right}}` is {{trueOrFalse}}.', + never: 'Unnecessary conditional, value is `never`.', + neverNullish: 'Unnecessary conditional, expected left-hand side of `??` operator to be possibly null or undefined.', + neverOptionalChain: 'Unnecessary optional chain on a non-nullish value.', + noOverlapBooleanExpression: 'Unnecessary conditional, the types have no overlap.', + noStrictNullCheck: 'This rule requires the `strictNullChecks` compiler option to be turned on to function correctly.', + suggestRemoveOptionalChain: 'Remove unnecessary optional chain', + typeGuardAlreadyIsType: 'Unnecessary conditional, expression already has the type being checked by the {{typeGuardOrAssertionFunction}}.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowConstantLoopConditions: { + description: 'Whether to ignore constant loop conditions, such as `while (true)`.', + oneOf: [ + { + type: 'boolean', + }, + { + type: 'string', + enum: ['always', 'never', 'only-allowed-literals'], + }, + ], + }, + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: { + type: 'boolean', + description: 'Whether to not error when running with a tsconfig that has strictNullChecks turned.', + }, + checkTypePredicates: { + type: 'boolean', + description: 'Whether to check the asserted argument of a type predicate function for unnecessary conditions', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowConstantLoopConditions: 'never', + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false, + checkTypePredicates: false, + }, + ], + create(context, [{ allowConstantLoopConditions, allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing, checkTypePredicates, },]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const compilerOptions = services.program.getCompilerOptions(); + const isStrictNullChecks = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'strictNullChecks'); + const isNoUncheckedIndexedAccess = tsutils.isCompilerOptionEnabled(compilerOptions, 'noUncheckedIndexedAccess'); + const allowConstantLoopConditionsOption = normalizeAllowConstantLoopConditions( + // https://github.com/typescript-eslint/typescript-eslint/issues/5439 + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + allowConstantLoopConditions); + if (!isStrictNullChecks && + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing !== true) { + context.report({ + loc: { + start: { column: 0, line: 0 }, + end: { column: 0, line: 0 }, + }, + messageId: 'noStrictNullCheck', + }); + } + function nodeIsArrayType(node) { + const nodeType = (0, util_1.getConstrainedTypeAtLocation)(services, node); + return tsutils + .unionConstituents(nodeType) + .some(part => checker.isArrayType(part)); + } + function nodeIsTupleType(node) { + const nodeType = (0, util_1.getConstrainedTypeAtLocation)(services, node); + return tsutils + .unionConstituents(nodeType) + .some(part => checker.isTupleType(part)); + } + function isArrayIndexExpression(node) { + return ( + // Is an index signature + node.type === utils_1.AST_NODE_TYPES.MemberExpression && + node.computed && + // ...into an array type + (nodeIsArrayType(node.object) || + // ... or a tuple type + (nodeIsTupleType(node.object) && + // Exception: literal index into a tuple - will have a sound type + node.property.type !== utils_1.AST_NODE_TYPES.Literal))); + } + // Conditional is always necessary if it involves: + // `any` or `unknown` or a naked type variable + function isConditionalAlwaysNecessary(type) { + return tsutils + .unionConstituents(type) + .some(part => (0, util_1.isTypeAnyType)(part) || + (0, util_1.isTypeUnknownType)(part) || + (0, util_1.isTypeFlagSet)(part, ts.TypeFlags.TypeVariable)); + } + function isNullableMemberExpression(node) { + const objectType = services.getTypeAtLocation(node.object); + if (node.computed) { + const propertyType = services.getTypeAtLocation(node.property); + return isNullablePropertyType(objectType, propertyType); + } + const property = node.property; + // Get the actual property name, to account for private properties (this.#prop). + const propertyName = context.sourceCode.getText(property); + const propertyType = objectType + .getProperties() + .find(prop => prop.name === propertyName); + if (propertyType && + tsutils.isSymbolFlagSet(propertyType, ts.SymbolFlags.Optional)) { + return true; + } + return false; + } + /** + * Checks if a conditional node is necessary: + * if the type of the node is always true or always false, it's not necessary. + */ + function checkNode(expression, isUnaryNotArgument = false, node = expression) { + // Check if the node is Unary Negation expression and handle it + if (expression.type === utils_1.AST_NODE_TYPES.UnaryExpression && + expression.operator === '!') { + return checkNode(expression.argument, !isUnaryNotArgument, node); + } + // Since typescript array index signature types don't represent the + // possibility of out-of-bounds access, if we're indexing into an array + // just skip the check, to avoid false positives + if (!isNoUncheckedIndexedAccess && isArrayIndexExpression(expression)) { + return; + } + // When checking logical expressions, only check the right side + // as the left side has been checked by checkLogicalExpressionForUnnecessaryConditionals + // + // Unless the node is nullish coalescing, as it's common to use patterns like `nullBool ?? true` to to strict + // boolean checks if we inspect the right here, it'll usually be a constant condition on purpose. + // In this case it's better to inspect the type of the expression as a whole. + if (expression.type === utils_1.AST_NODE_TYPES.LogicalExpression && + expression.operator !== '??') { + return checkNode(expression.right); + } + const type = (0, util_1.getConstrainedTypeAtLocation)(services, expression); + if (isConditionalAlwaysNecessary(type)) { + return; + } + let messageId = null; + if ((0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Never)) { + messageId = 'never'; + } + else if (!(0, util_1.isPossiblyTruthy)(type)) { + messageId = !isUnaryNotArgument ? 'alwaysFalsy' : 'alwaysTruthy'; + } + else if (!(0, util_1.isPossiblyFalsy)(type)) { + messageId = !isUnaryNotArgument ? 'alwaysTruthy' : 'alwaysFalsy'; + } + if (messageId) { + context.report({ node, messageId }); + } + } + function checkNodeForNullish(node) { + const type = (0, util_1.getConstrainedTypeAtLocation)(services, node); + // Conditional is always necessary if it involves `any`, `unknown` or a naked type parameter + if ((0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Any | + ts.TypeFlags.Unknown | + ts.TypeFlags.TypeParameter | + ts.TypeFlags.TypeVariable)) { + return; + } + let messageId = null; + if ((0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Never)) { + messageId = 'never'; + } + else if (!isPossiblyNullish(type) && + !(node.type === utils_1.AST_NODE_TYPES.MemberExpression && + isNullableMemberExpression(node))) { + // Since typescript array index signature types don't represent the + // possibility of out-of-bounds access, if we're indexing into an array + // just skip the check, to avoid false positives + if (isNoUncheckedIndexedAccess || + (!isArrayIndexExpression(node) && + !(node.type === utils_1.AST_NODE_TYPES.ChainExpression && + node.expression.type !== utils_1.AST_NODE_TYPES.TSNonNullExpression && + optionChainContainsOptionArrayIndex(node.expression)))) { + messageId = 'neverNullish'; + } + } + else if (isAlwaysNullish(type)) { + messageId = 'alwaysNullish'; + } + if (messageId) { + context.report({ node, messageId }); + } + } + /** + * Checks that a binary expression is necessarily conditional, reports otherwise. + * If both sides of the binary expression are literal values, it's not a necessary condition. + * + * NOTE: It's also unnecessary if the types that don't overlap at all + * but that case is handled by the Typescript compiler itself. + * Known exceptions: + * - https://github.com/microsoft/TypeScript/issues/32627 + * - https://github.com/microsoft/TypeScript/issues/37160 (handled) + */ + function checkIfBoolExpressionIsNecessaryConditional(node, left, right, operator) { + const leftType = (0, util_1.getConstrainedTypeAtLocation)(services, left); + const rightType = (0, util_1.getConstrainedTypeAtLocation)(services, right); + const leftStaticValue = toStaticValue(leftType); + const rightStaticValue = toStaticValue(rightType); + if (leftStaticValue != null && rightStaticValue != null) { + const conditionIsTrue = booleanComparison(leftStaticValue.value, operator, rightStaticValue.value); + context.report({ + node, + messageId: 'comparisonBetweenLiteralTypes', + data: { + left: checker.typeToString(leftType), + operator, + right: checker.typeToString(rightType), + trueOrFalse: conditionIsTrue ? 'true' : 'false', + }, + }); + return; + } + // Workaround for https://github.com/microsoft/TypeScript/issues/37160 + if (isStrictNullChecks) { + const UNDEFINED = ts.TypeFlags.Undefined; + const NULL = ts.TypeFlags.Null; + const VOID = ts.TypeFlags.Void; + const isComparable = (type, flag) => { + // Allow comparison to `any`, `unknown` or a naked type parameter. + flag |= + ts.TypeFlags.Any | + ts.TypeFlags.Unknown | + ts.TypeFlags.TypeParameter | + ts.TypeFlags.TypeVariable; + // Allow loose comparison to nullish values. + if (operator === '==' || operator === '!=') { + flag |= NULL | UNDEFINED | VOID; + } + return (0, util_1.isTypeFlagSet)(type, flag); + }; + if ((leftType.flags === UNDEFINED && + !isComparable(rightType, UNDEFINED | VOID)) || + (rightType.flags === UNDEFINED && + !isComparable(leftType, UNDEFINED | VOID)) || + (leftType.flags === NULL && !isComparable(rightType, NULL)) || + (rightType.flags === NULL && !isComparable(leftType, NULL))) { + context.report({ node, messageId: 'noOverlapBooleanExpression' }); + return; + } + } + } + /** + * Checks that a logical expression contains a boolean, reports otherwise. + */ + function checkLogicalExpressionForUnnecessaryConditionals(node) { + if (node.operator === '??') { + checkNodeForNullish(node.left); + return; + } + // Only checks the left side, since the right side might not be "conditional" at all. + // The right side will be checked if the LogicalExpression is used in a conditional context + checkNode(node.left); + } + function checkIfWhileLoopIsNecessaryConditional(node) { + if (allowConstantLoopConditionsOption === 'only-allowed-literals' && + node.test.type === utils_1.AST_NODE_TYPES.Literal && + constantLoopConditionsAllowedLiterals.has(node.test.value)) { + return; + } + checkIfLoopIsNecessaryConditional(node); + } + /** + * Checks that a testable expression of a loop is necessarily conditional, reports otherwise. + */ + function checkIfLoopIsNecessaryConditional(node) { + if (node.test == null) { + // e.g. `for(;;)` + return; + } + if (allowConstantLoopConditionsOption === 'always' && + tsutils.isTrueLiteralType((0, util_1.getConstrainedTypeAtLocation)(services, node.test))) { + return; + } + checkNode(node.test); + } + function checkCallExpression(node) { + if (checkTypePredicates) { + const truthinessAssertedArgument = (0, assertionFunctionUtils_1.findTruthinessAssertedArgument)(services, node); + if (truthinessAssertedArgument != null) { + checkNode(truthinessAssertedArgument); + } + const typeGuardAssertedArgument = (0, assertionFunctionUtils_1.findTypeGuardAssertedArgument)(services, node); + if (typeGuardAssertedArgument != null) { + const typeOfArgument = (0, util_1.getConstrainedTypeAtLocation)(services, typeGuardAssertedArgument.argument); + if (typeOfArgument === typeGuardAssertedArgument.type) { + context.report({ + node: typeGuardAssertedArgument.argument, + messageId: 'typeGuardAlreadyIsType', + data: { + typeGuardOrAssertionFunction: typeGuardAssertedArgument.asserts + ? 'assertion function' + : 'type guard', + }, + }); + } + } + } + // If this is something like arr.filter(x => /*condition*/), check `condition` + if ((0, util_1.isArrayMethodCallWithPredicate)(context, services, node) && + node.arguments.length) { + const callback = node.arguments[0]; + // Inline defined functions + if (callback.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression || + callback.type === utils_1.AST_NODE_TYPES.FunctionExpression) { + // Two special cases, where we can directly check the node that's returned: + // () => something + if (callback.body.type !== utils_1.AST_NODE_TYPES.BlockStatement) { + return checkNode(callback.body); + } + // () => { return something; } + const callbackBody = callback.body.body; + if (callbackBody.length === 1 && + callbackBody[0].type === utils_1.AST_NODE_TYPES.ReturnStatement && + callbackBody[0].argument) { + return checkNode(callbackBody[0].argument); + } + // Potential enhancement: could use code-path analysis to check + // any function with a single return statement + // (Value to complexity ratio is dubious however) + } + // Otherwise just do type analysis on the function as a whole. + const returnTypes = tsutils + .getCallSignaturesOfType((0, util_1.getConstrainedTypeAtLocation)(services, callback)) + .map(sig => sig.getReturnType()); + if (returnTypes.length === 0) { + // Not a callable function, e.g. `any` + return; + } + let hasFalsyReturnTypes = false; + let hasTruthyReturnTypes = false; + for (const type of returnTypes) { + const { constraintType } = (0, util_1.getConstraintInfo)(checker, type); + // Predicate is always necessary if it involves `any` or `unknown` + if (!constraintType || + (0, util_1.isTypeAnyType)(constraintType) || + (0, util_1.isTypeUnknownType)(constraintType)) { + return; + } + if ((0, util_1.isPossiblyFalsy)(constraintType)) { + hasFalsyReturnTypes = true; + } + if ((0, util_1.isPossiblyTruthy)(constraintType)) { + hasTruthyReturnTypes = true; + } + // bail early if both a possibly-truthy and a possibly-falsy have been detected + if (hasFalsyReturnTypes && hasTruthyReturnTypes) { + return; + } + } + if (!hasFalsyReturnTypes) { + return context.report({ + node: callback, + messageId: 'alwaysTruthyFunc', + }); + } + if (!hasTruthyReturnTypes) { + return context.report({ + node: callback, + messageId: 'alwaysFalsyFunc', + }); + } + } + } + // Recursively searches an optional chain for an array index expression + // Has to search the entire chain, because an array index will "infect" the rest of the types + // Example: + // ``` + // [{x: {y: "z"} }][n] // type is {x: {y: "z"}} + // ?.x // type is {y: "z"} + // ?.y // This access is considered "unnecessary" according to the types + // ``` + function optionChainContainsOptionArrayIndex(node) { + const lhsNode = node.type === utils_1.AST_NODE_TYPES.CallExpression ? node.callee : node.object; + if (node.optional && isArrayIndexExpression(lhsNode)) { + return true; + } + if (lhsNode.type === utils_1.AST_NODE_TYPES.MemberExpression || + lhsNode.type === utils_1.AST_NODE_TYPES.CallExpression) { + return optionChainContainsOptionArrayIndex(lhsNode); + } + return false; + } + function isNullablePropertyType(objType, propertyType) { + if (propertyType.isUnion()) { + return propertyType.types.some(type => isNullablePropertyType(objType, type)); + } + if (propertyType.isNumberLiteral() || propertyType.isStringLiteral()) { + const propType = (0, util_1.getTypeOfPropertyOfName)(checker, objType, propertyType.value.toString()); + if (propType) { + return (0, util_1.isNullableType)(propType); + } + } + const typeName = (0, util_1.getTypeName)(checker, propertyType); + return checker + .getIndexInfosOfType(objType) + .some(info => (0, util_1.getTypeName)(checker, info.keyType) === typeName); + } + // Checks whether a member expression is nullable or not regardless of it's previous node. + // Example: + // ``` + // // 'bar' is nullable if 'foo' is null. + // // but this function checks regardless of 'foo' type, so returns 'true'. + // declare const foo: { bar : { baz: string } } | null + // foo?.bar; + // ``` + function isMemberExpressionNullableOriginFromObject(node) { + const prevType = (0, util_1.getConstrainedTypeAtLocation)(services, node.object); + const property = node.property; + if (prevType.isUnion() && (0, util_1.isIdentifier)(property)) { + const isOwnNullable = prevType.types.some(type => { + if (node.computed) { + const propertyType = (0, util_1.getConstrainedTypeAtLocation)(services, node.property); + return isNullablePropertyType(type, propertyType); + } + const propType = (0, util_1.getTypeOfPropertyOfName)(checker, type, property.name); + if (propType) { + return (0, util_1.isNullableType)(propType); + } + const indexInfo = checker.getIndexInfosOfType(type); + return indexInfo.some(info => { + const isStringTypeName = (0, util_1.getTypeName)(checker, info.keyType) === 'string'; + return (isStringTypeName && + (isNoUncheckedIndexedAccess || (0, util_1.isNullableType)(info.type))); + }); + }); + return !isOwnNullable && (0, util_1.isNullableType)(prevType); + } + return false; + } + function isCallExpressionNullableOriginFromCallee(node) { + const prevType = (0, util_1.getConstrainedTypeAtLocation)(services, node.callee); + if (prevType.isUnion()) { + const isOwnNullable = prevType.types.some(type => { + const signatures = type.getCallSignatures(); + return signatures.some(sig => (0, util_1.isNullableType)(sig.getReturnType())); + }); + return !isOwnNullable && (0, util_1.isNullableType)(prevType); + } + return false; + } + function isOptionableExpression(node) { + const type = (0, util_1.getConstrainedTypeAtLocation)(services, node); + const isOwnNullable = node.type === utils_1.AST_NODE_TYPES.MemberExpression + ? !isMemberExpressionNullableOriginFromObject(node) + : node.type === utils_1.AST_NODE_TYPES.CallExpression + ? !isCallExpressionNullableOriginFromCallee(node) + : true; + return (isConditionalAlwaysNecessary(type) || + (isOwnNullable && (0, util_1.isNullableType)(type))); + } + function checkOptionalChain(node, beforeOperator, fix) { + // We only care if this step in the chain is optional. If just descend + // from an optional chain, then that's fine. + if (!node.optional) { + return; + } + // Since typescript array index signature types don't represent the + // possibility of out-of-bounds access, if we're indexing into an array + // just skip the check, to avoid false positives + if (!isNoUncheckedIndexedAccess && + optionChainContainsOptionArrayIndex(node)) { + return; + } + const nodeToCheck = node.type === utils_1.AST_NODE_TYPES.CallExpression ? node.callee : node.object; + if (isOptionableExpression(nodeToCheck)) { + return; + } + const questionDotOperator = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(beforeOperator, token => token.type === utils_1.AST_TOKEN_TYPES.Punctuator && token.value === '?.'), util_1.NullThrowsReasons.MissingToken('operator', node.type)); + context.report({ + loc: questionDotOperator.loc, + node, + messageId: 'neverOptionalChain', + suggest: [ + { + messageId: 'suggestRemoveOptionalChain', + fix(fixer) { + return fixer.replaceText(questionDotOperator, fix); + }, + }, + ], + }); + } + function checkOptionalMemberExpression(node) { + checkOptionalChain(node, node.object, node.computed ? '' : '.'); + } + function checkOptionalCallExpression(node) { + checkOptionalChain(node, node.callee, ''); + } + function checkAssignmentExpression(node) { + // Similar to checkLogicalExpressionForUnnecessaryConditionals, since + // a ||= b is equivalent to a || (a = b) + if (['&&=', '||='].includes(node.operator)) { + checkNode(node.left); + } + else if (node.operator === '??=') { + checkNodeForNullish(node.left); + } + } + return { + AssignmentExpression: checkAssignmentExpression, + BinaryExpression(node) { + const { operator } = node; + if (isBoolOperator(operator)) { + checkIfBoolExpressionIsNecessaryConditional(node, node.left, node.right, operator); + } + }, + CallExpression: checkCallExpression, + 'CallExpression[optional = true]': checkOptionalCallExpression, + ConditionalExpression: (node) => checkNode(node.test), + DoWhileStatement: checkIfLoopIsNecessaryConditional, + ForStatement: checkIfLoopIsNecessaryConditional, + IfStatement: (node) => checkNode(node.test), + LogicalExpression: checkLogicalExpressionForUnnecessaryConditionals, + 'MemberExpression[optional = true]': checkOptionalMemberExpression, + SwitchCase({ parent, test }) { + // only check `case ...:`, not `default:` + if (test) { + checkIfBoolExpressionIsNecessaryConditional(test, parent.discriminant, test, '==='); + } + }, + WhileStatement: checkIfWhileLoopIsNecessaryConditional, + }; + }, +}); +function normalizeAllowConstantLoopConditions(allowConstantLoopConditions) { + if (allowConstantLoopConditions === true) { + return 'always'; + } + if (allowConstantLoopConditions === false) { + return 'never'; + } + return allowConstantLoopConditions; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-parameter-property-assignment.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-parameter-property-assignment.d.ts new file mode 100644 index 0000000..7f8e443 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-parameter-property-assignment.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unnecessaryAssign", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-unnecessary-parameter-property-assignment.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-parameter-property-assignment.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-parameter-property-assignment.d.ts.map new file mode 100644 index 0000000..cab1131 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-parameter-property-assignment.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unnecessary-parameter-property-assignment.d.ts","sourceRoot":"","sources":["../../src/rules/no-unnecessary-parameter-property-assignment.ts"],"names":[],"mappings":";AASA,wBA8NG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-parameter-property-assignment.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-parameter-property-assignment.js new file mode 100644 index 0000000..8666353 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-parameter-property-assignment.js @@ -0,0 +1,149 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const scope_manager_1 = require("@typescript-eslint/scope-manager"); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const UNNECESSARY_OPERATORS = new Set(['??=', '&&=', '=', '||=']); +exports.default = (0, util_1.createRule)({ + name: 'no-unnecessary-parameter-property-assignment', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow unnecessary assignment of constructor property parameter', + }, + messages: { + unnecessaryAssign: 'This assignment is unnecessary since it is already assigned by a parameter property.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const reportInfoStack = []; + function isThisMemberExpression(node) { + return (node.type === utils_1.AST_NODE_TYPES.MemberExpression && + node.object.type === utils_1.AST_NODE_TYPES.ThisExpression); + } + function getPropertyName(node) { + if (!isThisMemberExpression(node)) { + return null; + } + if (node.property.type === utils_1.AST_NODE_TYPES.Identifier) { + return node.property.name; + } + if (node.computed) { + return (0, util_1.getStaticStringValue)(node.property); + } + return null; + } + function findParentFunction(node) { + if (!node || + node.type === utils_1.AST_NODE_TYPES.FunctionDeclaration || + node.type === utils_1.AST_NODE_TYPES.FunctionExpression || + node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression) { + return node; + } + return findParentFunction(node.parent); + } + function findParentPropertyDefinition(node) { + if (!node || node.type === utils_1.AST_NODE_TYPES.PropertyDefinition) { + return node; + } + return findParentPropertyDefinition(node.parent); + } + function isConstructorFunctionExpression(node) { + return (node?.type === utils_1.AST_NODE_TYPES.FunctionExpression && + utils_1.ASTUtils.isConstructor(node.parent)); + } + function isReferenceFromParameter(node) { + const scope = context.sourceCode.getScope(node); + const rightRef = scope.references.find(ref => ref.identifier.name === node.name); + return rightRef?.resolved?.defs.at(0)?.type === scope_manager_1.DefinitionType.Parameter; + } + function isParameterPropertyWithName(node, name) { + return (node.type === utils_1.AST_NODE_TYPES.TSParameterProperty && + ((node.parameter.type === utils_1.AST_NODE_TYPES.Identifier && // constructor (public foo) {} + node.parameter.name === name) || + (node.parameter.type === utils_1.AST_NODE_TYPES.AssignmentPattern && // constructor (public foo = 1) {} + node.parameter.left.type === utils_1.AST_NODE_TYPES.Identifier && + node.parameter.left.name === name))); + } + function getIdentifier(node) { + if (node.type === utils_1.AST_NODE_TYPES.Identifier) { + return node; + } + if (node.type === utils_1.AST_NODE_TYPES.TSAsExpression || + node.type === utils_1.AST_NODE_TYPES.TSNonNullExpression) { + return getIdentifier(node.expression); + } + return null; + } + function isArrowIIFE(node) { + return (node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression && + node.parent.type === utils_1.AST_NODE_TYPES.CallExpression); + } + return { + ClassBody() { + reportInfoStack.push({ + assignedBeforeConstructor: new Set(), + assignedBeforeUnnecessary: new Set(), + unnecessaryAssignments: [], + }); + }, + 'ClassBody:exit'() { + const { assignedBeforeConstructor, unnecessaryAssignments } = (0, util_1.nullThrows)(reportInfoStack.pop(), 'The top stack should exist'); + unnecessaryAssignments.forEach(({ name, node }) => { + if (assignedBeforeConstructor.has(name)) { + return; + } + context.report({ + node, + messageId: 'unnecessaryAssign', + }); + }); + }, + "MethodDefinition[kind='constructor'] > FunctionExpression AssignmentExpression"(node) { + const leftName = getPropertyName(node.left); + if (!leftName) { + return; + } + let functionNode = findParentFunction(node); + if (functionNode && isArrowIIFE(functionNode)) { + functionNode = findParentFunction(functionNode.parent); + } + if (!isConstructorFunctionExpression(functionNode)) { + return; + } + const { assignedBeforeUnnecessary, unnecessaryAssignments } = (0, util_1.nullThrows)(reportInfoStack.at(reportInfoStack.length - 1), 'The top of stack should exist'); + if (!UNNECESSARY_OPERATORS.has(node.operator)) { + assignedBeforeUnnecessary.add(leftName); + return; + } + const rightId = getIdentifier(node.right); + if (leftName !== rightId?.name || !isReferenceFromParameter(rightId)) { + return; + } + const hasParameterProperty = functionNode.params.some(param => isParameterPropertyWithName(param, rightId.name)); + if (hasParameterProperty && !assignedBeforeUnnecessary.has(leftName)) { + unnecessaryAssignments.push({ + name: leftName, + node, + }); + } + }, + 'PropertyDefinition AssignmentExpression'(node) { + const name = getPropertyName(node.left); + if (!name) { + return; + } + const functionNode = findParentFunction(node); + if (functionNode && + !(isArrowIIFE(functionNode) && + findParentPropertyDefinition(node)?.value === functionNode.parent)) { + return; + } + const { assignedBeforeConstructor } = (0, util_1.nullThrows)(reportInfoStack.at(-1), 'The top stack should exist'); + assignedBeforeConstructor.add(name); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.d.ts new file mode 100644 index 0000000..6b26356 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unnecessaryQualifier", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-unnecessary-qualifier.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.d.ts.map new file mode 100644 index 0000000..f99b29c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unnecessary-qualifier.d.ts","sourceRoot":"","sources":["../../src/rules/no-unnecessary-qualifier.ts"],"names":[],"mappings":";AAQA,wBAuLG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js new file mode 100644 index 0000000..a96efcc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js @@ -0,0 +1,156 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-unnecessary-qualifier', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow unnecessary namespace qualifiers', + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + unnecessaryQualifier: "Qualifier is unnecessary since '{{ name }}' is in scope.", + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const namespacesInScope = []; + let currentFailedNamespaceExpression = null; + const services = (0, util_1.getParserServices)(context); + const esTreeNodeToTSNodeMap = services.esTreeNodeToTSNodeMap; + const checker = services.program.getTypeChecker(); + function tryGetAliasedSymbol(symbol, checker) { + return tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias) + ? checker.getAliasedSymbol(symbol) + : null; + } + function symbolIsNamespaceInScope(symbol) { + const symbolDeclarations = symbol.getDeclarations() ?? []; + if (symbolDeclarations.some(decl => namespacesInScope.some(ns => ns === decl))) { + return true; + } + const alias = tryGetAliasedSymbol(symbol, checker); + return alias != null && symbolIsNamespaceInScope(alias); + } + function getSymbolInScope(node, flags, name) { + const scope = checker.getSymbolsInScope(node, flags); + return scope.find(scopeSymbol => scopeSymbol.name === name); + } + function symbolsAreEqual(accessed, inScope) { + return accessed === checker.getExportSymbolOfSymbol(inScope); + } + function qualifierIsUnnecessary(qualifier, name) { + const namespaceSymbol = services.getSymbolAtLocation(qualifier); + if (namespaceSymbol == null || + !symbolIsNamespaceInScope(namespaceSymbol)) { + return false; + } + const accessedSymbol = services.getSymbolAtLocation(name); + if (accessedSymbol == null) { + return false; + } + // If the symbol in scope is different, the qualifier is necessary. + const tsQualifier = esTreeNodeToTSNodeMap.get(qualifier); + const fromScope = getSymbolInScope(tsQualifier, accessedSymbol.flags, context.sourceCode.getText(name)); + return !!fromScope && symbolsAreEqual(accessedSymbol, fromScope); + } + function visitNamespaceAccess(node, qualifier, name) { + // Only look for nested qualifier errors if we didn't already fail on the outer qualifier. + if (!currentFailedNamespaceExpression && + qualifierIsUnnecessary(qualifier, name)) { + currentFailedNamespaceExpression = node; + context.report({ + node: qualifier, + messageId: 'unnecessaryQualifier', + data: { + name: context.sourceCode.getText(name), + }, + fix(fixer) { + return fixer.removeRange([qualifier.range[0], name.range[0]]); + }, + }); + } + } + function enterDeclaration(node) { + namespacesInScope.push(esTreeNodeToTSNodeMap.get(node)); + } + function exitDeclaration() { + namespacesInScope.pop(); + } + function resetCurrentNamespaceExpression(node) { + if (node === currentFailedNamespaceExpression) { + currentFailedNamespaceExpression = null; + } + } + function isPropertyAccessExpression(node) { + return node.type === utils_1.AST_NODE_TYPES.MemberExpression && !node.computed; + } + function isEntityNameExpression(node) { + return (node.type === utils_1.AST_NODE_TYPES.Identifier || + (isPropertyAccessExpression(node) && + isEntityNameExpression(node.object))); + } + return { + 'ExportNamedDeclaration[declaration.type="TSEnumDeclaration"]': enterDeclaration, + 'ExportNamedDeclaration[declaration.type="TSEnumDeclaration"]:exit': exitDeclaration, + 'ExportNamedDeclaration[declaration.type="TSModuleDeclaration"]': enterDeclaration, + 'ExportNamedDeclaration[declaration.type="TSModuleDeclaration"]:exit': exitDeclaration, + 'MemberExpression:exit': resetCurrentNamespaceExpression, + 'MemberExpression[computed=false]'(node) { + const property = node.property; + if (isEntityNameExpression(node.object)) { + visitNamespaceAccess(node, node.object, property); + } + }, + TSEnumDeclaration: enterDeclaration, + 'TSEnumDeclaration:exit': exitDeclaration, + 'TSModuleDeclaration:exit': exitDeclaration, + 'TSModuleDeclaration > TSModuleBlock'(node) { + enterDeclaration(node.parent); + }, + TSQualifiedName(node) { + visitNamespaceAccess(node, node.left, node.right); + }, + 'TSQualifiedName:exit': resetCurrentNamespaceExpression, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-template-expression.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-template-expression.d.ts new file mode 100644 index 0000000..d60d1b9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-template-expression.d.ts @@ -0,0 +1,5 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type MessageId = 'noUnnecessaryTemplateExpression'; +declare const _default: TSESLint.RuleModule<"noUnnecessaryTemplateExpression", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=no-unnecessary-template-expression.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-template-expression.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-template-expression.d.ts.map new file mode 100644 index 0000000..e38812f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-template-expression.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unnecessary-template-expression.d.ts","sourceRoot":"","sources":["../../src/rules/no-unnecessary-template-expression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAmBzD,MAAM,MAAM,SAAS,GAAG,iCAAiC,CAAC;;AAqB1D,wBAgbG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-template-expression.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-template-expression.js new file mode 100644 index 0000000..5de9b65 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-template-expression.js @@ -0,0 +1,361 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const rangeToLoc_1 = require("../util/rangeToLoc"); +const evenNumOfBackslashesRegExp = /(? { + const symbol = t.getSymbol(); + return !!(symbol?.valueDeclaration && ts.isEnumMember(symbol.valueDeclaration)); + }); + } + const isLiteral = (0, util_1.isNodeOfType)(utils_1.TSESTree.AST_NODE_TYPES.Literal); + function isTemplateLiteral(node) { + return node.type === utils_1.AST_NODE_TYPES.TemplateLiteral; + } + function isInfinityIdentifier(node) { + return (node.type === utils_1.AST_NODE_TYPES.Identifier && node.name === 'Infinity'); + } + function isNaNIdentifier(node) { + return node.type === utils_1.AST_NODE_TYPES.Identifier && node.name === 'NaN'; + } + function isFixableIdentifier(node) { + return ((0, util_1.isUndefinedIdentifier)(node) || + isInfinityIdentifier(node) || + isNaNIdentifier(node)); + } + function hasCommentsBetweenQuasi(startQuasi, endQuasi) { + const startToken = (0, util_1.nullThrows)(context.sourceCode.getTokenByRangeStart(startQuasi.range[0]), util_1.NullThrowsReasons.MissingToken('`${', 'opening template literal')); + const endToken = (0, util_1.nullThrows)(context.sourceCode.getTokenByRangeStart(endQuasi.range[0]), util_1.NullThrowsReasons.MissingToken('}', 'closing template literal')); + return context.sourceCode.commentsExistBetween(startToken, endToken); + } + function isTrivialInterpolation(node) { + return (node.quasis.length === 2 && + node.quasis[0].value.raw === '' && + node.quasis[1].value.raw === ''); + } + function getInterpolations(node) { + if (node.type === utils_1.AST_NODE_TYPES.TemplateLiteral) { + return node.expressions; + } + return node.types; + } + function getInterpolationInfos(node) { + return getInterpolations(node).map((interpolation, index) => ({ + interpolation, + nextQuasi: node.quasis[index + 1], + prevQuasi: node.quasis[index], + })); + } + function getLiteral(node) { + const maybeLiteral = node.type === utils_1.AST_NODE_TYPES.TSLiteralType ? node.literal : node; + return isLiteral(maybeLiteral) ? maybeLiteral : null; + } + function getTemplateLiteral(node) { + const maybeTemplateLiteral = node.type === utils_1.AST_NODE_TYPES.TSLiteralType ? node.literal : node; + return isTemplateLiteral(maybeTemplateLiteral) + ? maybeTemplateLiteral + : null; + } + function reportSingleInterpolation(node) { + const interpolations = getInterpolations(node); + context.report({ + loc: (0, rangeToLoc_1.rangeToLoc)(context.sourceCode, [ + interpolations[0].range[0] - 2, + interpolations[0].range[1] + 1, + ]), + messageId: 'noUnnecessaryTemplateExpression', + fix(fixer) { + const wrappingCode = (0, util_1.getMovedNodeCode)({ + destinationNode: node, + nodeToMove: interpolations[0], + sourceCode: context.sourceCode, + }); + return fixer.replaceText(node, wrappingCode); + }, + }); + } + function isUnncessaryValueInterpolation({ interpolation, nextQuasi, prevQuasi, }) { + if (hasCommentsBetweenQuasi(prevQuasi, nextQuasi)) { + return false; + } + if (isFixableIdentifier(interpolation)) { + return true; + } + if (isLiteral(interpolation)) { + // allow trailing whitespace literal + if (startsWithNewLine(nextQuasi.value.raw)) { + return !(typeof interpolation.value === 'string' && + isWhitespace(interpolation.value)); + } + return true; + } + if (isTemplateLiteral(interpolation)) { + // allow trailing whitespace literal + if (startsWithNewLine(nextQuasi.value.raw)) { + return !(interpolation.quasis.length === 1 && + isWhitespace(interpolation.quasis[0].value.raw)); + } + return true; + } + return false; + } + function isUnncessaryTypeInterpolation({ interpolation, nextQuasi, prevQuasi, }) { + if (hasCommentsBetweenQuasi(prevQuasi, nextQuasi)) { + return false; + } + const literal = getLiteral(interpolation); + if (literal) { + // allow trailing whitespace literal + if (startsWithNewLine(nextQuasi.value.raw)) { + return !(typeof literal.value === 'string' && isWhitespace(literal.value)); + } + return true; + } + if (interpolation.type === utils_1.AST_NODE_TYPES.TSNullKeyword || + interpolation.type === utils_1.AST_NODE_TYPES.TSUndefinedKeyword) { + return true; + } + const templateLiteral = getTemplateLiteral(interpolation); + if (templateLiteral) { + // allow trailing whitespace literal + if (startsWithNewLine(nextQuasi.value.raw)) { + return !(templateLiteral.quasis.length === 1 && + isWhitespace(templateLiteral.quasis[0].value.raw)); + } + return true; + } + return false; + } + function getReportDescriptors(infos) { + let nextCharacterIsOpeningCurlyBrace = false; + const reportDescriptors = []; + const reversedInfos = [...infos].reverse(); + for (const { interpolation, nextQuasi, prevQuasi } of reversedInfos) { + const fixers = []; + if (nextQuasi.value.raw !== '') { + nextCharacterIsOpeningCurlyBrace = + nextQuasi.value.raw.startsWith('{'); + } + const literal = getLiteral(interpolation); + const templateLiteral = getTemplateLiteral(interpolation); + if (literal) { + let escapedValue = (typeof literal.value === 'string' + ? // The value is already a string, so we're removing quotes: + // "'va`lue'" -> "va`lue" + literal.raw.slice(1, -1) + : // The value may be one of number | bigint | boolean | RegExp | null. + // In regular expressions, we escape every backslash + String(literal.value).replaceAll('\\', '\\\\')) + // The string or RegExp may contain ` or ${. + // We want both of these to be escaped in the final template expression. + // + // A pair of backslashes means "escaped backslash", so backslashes + // from this pair won't escape ` or ${. Therefore, to escape these + // sequences in the resulting template expression, we need to escape + // all sequences that are preceded by an even number of backslashes. + // + // This RegExp does the following transformations: + // \` -> \` + // \\` -> \\\` + // \${ -> \${ + // \\${ -> \\\${ + .replaceAll(new RegExp(`${evenNumOfBackslashesRegExp.source}(\`|\\\${)`, 'g'), '\\$1'); + // `...${'...$'}{...` + // ^^^^ + if (nextCharacterIsOpeningCurlyBrace && + endsWithUnescapedDollarSign(escapedValue)) { + escapedValue = escapedValue.replaceAll(/\$$/g, '\\$'); + } + if (escapedValue.length !== 0) { + nextCharacterIsOpeningCurlyBrace = escapedValue.startsWith('{'); + } + fixers.push(fixer => [fixer.replaceText(literal, escapedValue)]); + } + else if (templateLiteral) { + // Since we iterate from the last expression to the first, + // a subsequent expression can tell the current expression + // that it starts with {. + // + // `... ${`... $`}${'{...'} ...` + // ^ ^ subsequent expression starts with { + // current expression ends with a dollar sign, + // so '$' + '{' === '${' (bad news for us). + // Let's escape the dollar sign at the end. + if (nextCharacterIsOpeningCurlyBrace && + endsWithUnescapedDollarSign(templateLiteral.quasis[templateLiteral.quasis.length - 1].value + .raw)) { + fixers.push(fixer => [ + fixer.replaceTextRange([templateLiteral.range[1] - 2, templateLiteral.range[1] - 2], '\\'), + ]); + } + if (templateLiteral.quasis.length === 1 && + templateLiteral.quasis[0].value.raw.length !== 0) { + nextCharacterIsOpeningCurlyBrace = + templateLiteral.quasis[0].value.raw.startsWith('{'); + } + // Remove the beginning and trailing backtick characters. + fixers.push(fixer => [ + fixer.removeRange([ + templateLiteral.range[0], + templateLiteral.range[0] + 1, + ]), + fixer.removeRange([ + templateLiteral.range[1] - 1, + templateLiteral.range[1], + ]), + ]); + } + else { + nextCharacterIsOpeningCurlyBrace = false; + } + // `... $${'{...'} ...` + // ^^^^^ + if (nextCharacterIsOpeningCurlyBrace && + endsWithUnescapedDollarSign(prevQuasi.value.raw)) { + fixers.push(fixer => [ + fixer.replaceTextRange([prevQuasi.range[1] - 3, prevQuasi.range[1] - 2], '\\$'), + ]); + } + const warnLocStart = prevQuasi.range[1] - 2; + const warnLocEnd = nextQuasi.range[0] + 1; + reportDescriptors.push({ + loc: (0, rangeToLoc_1.rangeToLoc)(context.sourceCode, [warnLocStart, warnLocEnd]), + messageId: 'noUnnecessaryTemplateExpression', + fix(fixer) { + return [ + // Remove the quasis' parts that are related to the current expression. + fixer.removeRange([warnLocStart, interpolation.range[0]]), + fixer.removeRange([interpolation.range[1], warnLocEnd]), + ...fixers.flatMap(cb => cb(fixer)), + ]; + }, + }); + } + return reportDescriptors; + } + return { + TemplateLiteral(node) { + if (node.parent.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression) { + return; + } + if (isTrivialInterpolation(node) && + !hasCommentsBetweenQuasi(node.quasis[0], node.quasis[1])) { + const { constraintType } = (0, util_1.getConstraintInfo)(checker, services.getTypeAtLocation(node.expressions[0])); + if (constraintType && isUnderlyingTypeString(constraintType)) { + reportSingleInterpolation(node); + return; + } + } + const infos = getInterpolationInfos(node).filter(isUnncessaryValueInterpolation); + for (const reportDescriptor of getReportDescriptors(infos)) { + context.report(reportDescriptor); + } + }, + TSTemplateLiteralType(node) { + if (isTrivialInterpolation(node) && + !hasCommentsBetweenQuasi(node.quasis[0], node.quasis[1])) { + const { constraintType, isTypeParameter } = (0, util_1.getConstraintInfo)(checker, services.getTypeAtLocation(node.types[0])); + if (constraintType && + !isTypeParameter && + isUnderlyingTypeString(constraintType) && + !isEnumMemberType(constraintType)) { + reportSingleInterpolation(node); + return; + } + } + const infos = getInterpolationInfos(node).filter(isUnncessaryTypeInterpolation); + for (const reportDescriptor of getReportDescriptors(infos)) { + context.report(reportDescriptor); + } + }, + }; + }, +}); +function isWhitespace(x) { + // allow empty string too since we went to allow + // ` ${''} + // `; + // + // in addition to + // `${' '} + // `; + // + return /^\s*$/.test(x); +} +function startsWithNewLine(x) { + return x.startsWith('\n') || x.startsWith('\r\n'); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.d.ts new file mode 100644 index 0000000..1d481ff --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.d.ts @@ -0,0 +1,4 @@ +export type MessageIds = 'unnecessaryTypeParameter'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unnecessaryTypeParameter", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-unnecessary-type-arguments.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.d.ts.map new file mode 100644 index 0000000..6a34726 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unnecessary-type-arguments.d.ts","sourceRoot":"","sources":["../../src/rules/no-unnecessary-type-arguments.ts"],"names":[],"mappings":"AAwBA,MAAM,MAAM,UAAU,GAAG,0BAA0B,CAAC;;AAEpD,wBAoGG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js new file mode 100644 index 0000000..b168639 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js @@ -0,0 +1,197 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-unnecessary-type-arguments', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow type arguments that are equal to the default', + recommended: 'strict', + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + unnecessaryTypeParameter: 'This is the default value for this type parameter, so it can be omitted.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + function getTypeForComparison(type) { + if ((0, util_1.isTypeReferenceType)(type)) { + return { + type: type.target, + typeArguments: checker.getTypeArguments(type), + }; + } + return { + type, + typeArguments: [], + }; + } + function checkTSArgsAndParameters(esParameters, typeParameters) { + // Just check the last one. Must specify previous type parameters if the last one is specified. + const i = esParameters.params.length - 1; + const arg = esParameters.params[i]; + const param = typeParameters.at(i); + if (!param?.default) { + return; + } + // TODO: would like checker.areTypesEquivalent. https://github.com/Microsoft/TypeScript/issues/13502 + const defaultType = checker.getTypeAtLocation(param.default); + const argType = services.getTypeAtLocation(arg); + // this check should handle some of the most simple cases of like strings, numbers, etc + if (defaultType !== argType) { + // For more complex types (like aliases to generic object types) - TS won't always create a + // global shared type object for the type - so we need to resort to manually comparing the + // reference type and the passed type arguments. + // Also - in case there are aliases - we need to resolve them before we do checks + const defaultTypeResolved = getTypeForComparison(defaultType); + const argTypeResolved = getTypeForComparison(argType); + if ( + // ensure the resolved type AND all the parameters are the same + defaultTypeResolved.type !== argTypeResolved.type || + defaultTypeResolved.typeArguments.length !== + argTypeResolved.typeArguments.length || + defaultTypeResolved.typeArguments.some((t, i) => t !== argTypeResolved.typeArguments[i])) { + return; + } + } + context.report({ + node: arg, + messageId: 'unnecessaryTypeParameter', + fix: fixer => fixer.removeRange(i === 0 + ? esParameters.range + : [esParameters.params[i - 1].range[1], arg.range[1]]), + }); + } + return { + TSTypeParameterInstantiation(node) { + const expression = services.esTreeNodeToTSNodeMap.get(node); + const typeParameters = getTypeParametersFromNode(node, expression, checker); + if (typeParameters) { + checkTSArgsAndParameters(node, typeParameters); + } + }, + }; + }, +}); +function getTypeParametersFromNode(node, tsNode, checker) { + if (ts.isExpressionWithTypeArguments(tsNode)) { + return getTypeParametersFromType(node, tsNode.expression, checker); + } + if (ts.isTypeReferenceNode(tsNode)) { + return getTypeParametersFromType(node, tsNode.typeName, checker); + } + if (ts.isCallExpression(tsNode) || + ts.isNewExpression(tsNode) || + ts.isTaggedTemplateExpression(tsNode) || + ts.isJsxOpeningElement(tsNode) || + ts.isJsxSelfClosingElement(tsNode)) { + return getTypeParametersFromCall(node, tsNode, checker); + } + return undefined; +} +function getTypeParametersFromType(node, type, checker) { + const symAtLocation = checker.getSymbolAtLocation(type); + if (!symAtLocation) { + return undefined; + } + const sym = getAliasedSymbol(symAtLocation, checker); + const declarations = sym.getDeclarations(); + if (!declarations) { + return undefined; + } + const sortedDeclaraions = sortDeclarationsByTypeValueContext(node, declarations); + return (0, util_1.findFirstResult)(sortedDeclaraions, decl => { + if (ts.isTypeAliasDeclaration(decl) || + ts.isInterfaceDeclaration(decl) || + ts.isClassLike(decl)) { + return decl.typeParameters; + } + if (ts.isVariableDeclaration(decl)) { + return getConstructSignatureDeclaration(symAtLocation, checker) + ?.typeParameters; + } + return undefined; + }); +} +function getTypeParametersFromCall(node, tsNode, checker) { + const sig = checker.getResolvedSignature(tsNode); + const sigDecl = sig?.getDeclaration(); + if (!sigDecl) { + return ts.isNewExpression(tsNode) + ? getTypeParametersFromType(node, tsNode.expression, checker) + : undefined; + } + return sigDecl.typeParameters; +} +function getAliasedSymbol(symbol, checker) { + return tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias) + ? checker.getAliasedSymbol(symbol) + : symbol; +} +function isInTypeContext(node) { + return (node.parent.type === utils_1.AST_NODE_TYPES.TSInterfaceHeritage || + node.parent.type === utils_1.AST_NODE_TYPES.TSTypeReference || + node.parent.type === utils_1.AST_NODE_TYPES.TSClassImplements); +} +function isTypeContextDeclaration(decl) { + return ts.isTypeAliasDeclaration(decl) || ts.isInterfaceDeclaration(decl); +} +function typeFirstCompare(declA, declB) { + const aIsType = isTypeContextDeclaration(declA); + const bIsType = isTypeContextDeclaration(declB); + return Number(bIsType) - Number(aIsType); +} +function sortDeclarationsByTypeValueContext(node, declarations) { + const sorted = [...declarations].sort(typeFirstCompare); + if (isInTypeContext(node)) { + return sorted; + } + return sorted.reverse(); +} +function getConstructSignatureDeclaration(symbol, checker) { + const type = checker.getTypeOfSymbol(symbol); + const sig = type.getConstructSignatures(); + return sig.at(0)?.getDeclaration(); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.d.ts new file mode 100644 index 0000000..25e765e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.d.ts @@ -0,0 +1,10 @@ +export type Options = [ + { + checkLiteralConstAssertions?: boolean; + typesToIgnore?: string[]; + } +]; +export type MessageIds = 'contextuallyUnnecessary' | 'unnecessaryAssertion'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=no-unnecessary-type-assertion.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.d.ts.map new file mode 100644 index 0000000..34fe861 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unnecessary-type-assertion.d.ts","sourceRoot":"","sources":["../../src/rules/no-unnecessary-type-assertion.ts"],"names":[],"mappings":"AAqBA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,2BAA2B,CAAC,EAAE,OAAO,CAAC;QACtC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;KAC1B;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,yBAAyB,GAAG,sBAAsB,CAAC;;AAE5E,wBA4YG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js new file mode 100644 index 0000000..edd8921 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js @@ -0,0 +1,312 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-unnecessary-type-assertion', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow type assertions that do not change the type of an expression', + recommended: 'recommended', + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + contextuallyUnnecessary: 'This assertion is unnecessary since the receiver accepts the original type of the expression.', + unnecessaryAssertion: 'This assertion is unnecessary since it does not change the type of the expression.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + checkLiteralConstAssertions: { + type: 'boolean', + description: 'Whether to check literal const assertions.', + }, + typesToIgnore: { + type: 'array', + description: 'A list of type names to ignore.', + items: { + type: 'string', + }, + }, + }, + }, + ], + }, + defaultOptions: [{}], + create(context, [options]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const compilerOptions = services.program.getCompilerOptions(); + /** + * Returns true if there's a chance the variable has been used before a value has been assigned to it + */ + function isPossiblyUsedBeforeAssigned(node) { + const declaration = (0, util_1.getDeclaration)(services, node); + if (!declaration) { + // don't know what the declaration is for some reason, so just assume the worst + return true; + } + if ( + // non-strict mode doesn't care about used before assigned errors + tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'strictNullChecks') && + // ignore class properties as they are compile time guarded + // also ignore function arguments as they can't be used before defined + ts.isVariableDeclaration(declaration)) { + // For var declarations, we need to check whether the node + // is actually in a descendant of its declaration or not. If not, + // it may be used before defined. + // eg + // if (Math.random() < 0.5) { + // var x: number = 2; + // } else { + // x!.toFixed(); + // } + if (ts.isVariableDeclarationList(declaration.parent) && + // var + declaration.parent.flags === ts.NodeFlags.None && + // If they are not in the same file it will not exist. + // This situation must not occur using before defined. + services.tsNodeToESTreeNodeMap.has(declaration)) { + const declaratorNode = services.tsNodeToESTreeNodeMap.get(declaration); + const scope = context.sourceCode.getScope(node); + const declaratorScope = context.sourceCode.getScope(declaratorNode); + let parentScope = declaratorScope; + while ((parentScope = parentScope.upper)) { + if (parentScope === scope) { + return true; + } + } + } + if ( + // is it `const x!: number` + declaration.initializer == null && + declaration.exclamationToken == null && + declaration.type != null) { + // check if the defined variable type has changed since assignment + const declarationType = checker.getTypeFromTypeNode(declaration.type); + const type = (0, util_1.getConstrainedTypeAtLocation)(services, node); + if (declarationType === type && + // `declare`s are never narrowed, so never skip them + !(ts.isVariableDeclarationList(declaration.parent) && + ts.isVariableStatement(declaration.parent.parent) && + tsutils.includesModifier((0, util_1.getModifiers)(declaration.parent.parent), ts.SyntaxKind.DeclareKeyword))) { + // possibly used before assigned, so just skip it + // better to false negative and skip it, than false positive and fix to compile erroring code + // + // no better way to figure this out right now + // https://github.com/Microsoft/TypeScript/issues/31124 + return true; + } + } + } + return false; + } + function isConstAssertion(node) { + return (node.type === utils_1.AST_NODE_TYPES.TSTypeReference && + node.typeName.type === utils_1.AST_NODE_TYPES.Identifier && + node.typeName.name === 'const'); + } + function isTemplateLiteralWithExpressions(expression) { + return (expression.type === utils_1.AST_NODE_TYPES.TemplateLiteral && + expression.expressions.length !== 0); + } + function isImplicitlyNarrowedLiteralDeclaration({ expression, parent, }) { + /** + * Even on `const` variable declarations, template literals with expressions can sometimes be widened without a type assertion. + * @see https://github.com/typescript-eslint/typescript-eslint/issues/8737 + */ + if (isTemplateLiteralWithExpressions(expression)) { + return false; + } + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const maybeDeclarationNode = parent.parent; + return ((maybeDeclarationNode.type === utils_1.AST_NODE_TYPES.VariableDeclaration && + maybeDeclarationNode.kind === 'const') || + (parent.type === utils_1.AST_NODE_TYPES.PropertyDefinition && parent.readonly)); + } + function isTypeUnchanged(uncast, cast) { + if (uncast === cast) { + return true; + } + if ((0, util_1.isTypeFlagSet)(uncast, ts.TypeFlags.Undefined) && + (0, util_1.isTypeFlagSet)(cast, ts.TypeFlags.Undefined) && + tsutils.isCompilerOptionEnabled(compilerOptions, 'exactOptionalPropertyTypes')) { + const uncastParts = tsutils + .unionConstituents(uncast) + .filter(part => !(0, util_1.isTypeFlagSet)(part, ts.TypeFlags.Undefined)); + const castParts = tsutils + .unionConstituents(cast) + .filter(part => !(0, util_1.isTypeFlagSet)(part, ts.TypeFlags.Undefined)); + if (uncastParts.length !== castParts.length) { + return false; + } + const uncastPartsSet = new Set(uncastParts); + return castParts.every(part => uncastPartsSet.has(part)); + } + return false; + } + function isTypeLiteral(type) { + return type.isLiteral() || tsutils.isBooleanLiteralType(type); + } + return { + 'TSAsExpression, TSTypeAssertion'(node) { + if (options.typesToIgnore?.includes(context.sourceCode.getText(node.typeAnnotation))) { + return; + } + const castType = services.getTypeAtLocation(node); + const castTypeIsLiteral = isTypeLiteral(castType); + const typeAnnotationIsConstAssertion = isConstAssertion(node.typeAnnotation); + if (!options.checkLiteralConstAssertions && + castTypeIsLiteral && + typeAnnotationIsConstAssertion) { + return; + } + const uncastType = services.getTypeAtLocation(node.expression); + const typeIsUnchanged = isTypeUnchanged(uncastType, castType); + const wouldSameTypeBeInferred = castTypeIsLiteral + ? isImplicitlyNarrowedLiteralDeclaration(node) + : !typeAnnotationIsConstAssertion; + if (typeIsUnchanged && wouldSameTypeBeInferred) { + context.report({ + node, + messageId: 'unnecessaryAssertion', + fix(fixer) { + if (node.type === utils_1.AST_NODE_TYPES.TSTypeAssertion) { + const openingAngleBracket = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(node.typeAnnotation, token => token.type === utils_1.AST_TOKEN_TYPES.Punctuator && + token.value === '<'), util_1.NullThrowsReasons.MissingToken('<', 'type annotation')); + const closingAngleBracket = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.typeAnnotation, token => token.type === utils_1.AST_TOKEN_TYPES.Punctuator && + token.value === '>'), util_1.NullThrowsReasons.MissingToken('>', 'type annotation')); + // < ( number ) > ( 3 + 5 ) + // ^---remove---^ + return fixer.removeRange([ + openingAngleBracket.range[0], + closingAngleBracket.range[1], + ]); + } + // `as` is always present in TSAsExpression + const asToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.expression, token => token.type === utils_1.AST_TOKEN_TYPES.Identifier && + token.value === 'as'), util_1.NullThrowsReasons.MissingToken('>', 'type annotation')); + const tokenBeforeAs = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(asToken, { + includeComments: true, + }), util_1.NullThrowsReasons.MissingToken('comment', 'as')); + // ( 3 + 5 ) as number + // ^--remove--^ + return fixer.removeRange([tokenBeforeAs.range[1], node.range[1]]); + }, + }); + } + // TODO - add contextually unnecessary check for this + }, + TSNonNullExpression(node) { + const removeExclamationFix = fixer => { + const exclamationToken = (0, util_1.nullThrows)(context.sourceCode.getLastToken(node, token => token.value === '!'), util_1.NullThrowsReasons.MissingToken('exclamation mark', 'non-null assertion')); + return fixer.removeRange(exclamationToken.range); + }; + if (node.parent.type === utils_1.AST_NODE_TYPES.AssignmentExpression && + node.parent.operator === '=') { + if (node.parent.left === node) { + context.report({ + node, + messageId: 'contextuallyUnnecessary', + fix: removeExclamationFix, + }); + } + // for all other = assignments we ignore non-null checks + // this is because non-null assertions can change the type-flow of the code + // so whilst they might be unnecessary for the assignment - they are necessary + // for following code + return; + } + const originalNode = services.esTreeNodeToTSNodeMap.get(node); + const type = (0, util_1.getConstrainedTypeAtLocation)(services, node.expression); + if (!(0, util_1.isNullableType)(type)) { + if (node.expression.type === utils_1.AST_NODE_TYPES.Identifier && + isPossiblyUsedBeforeAssigned(node.expression)) { + return; + } + context.report({ + node, + messageId: 'unnecessaryAssertion', + fix: removeExclamationFix, + }); + } + else { + // we know it's a nullable type + // so figure out if the variable is used in a place that accepts nullable types + const contextualType = (0, util_1.getContextualType)(checker, originalNode); + if (contextualType) { + if ((0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Unknown) && + !(0, util_1.isTypeFlagSet)(contextualType, ts.TypeFlags.Unknown)) { + return; + } + // in strict mode you can't assign null to undefined, so we have to make sure that + // the two types share a nullable type + const typeIncludesUndefined = (0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Undefined); + const typeIncludesNull = (0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Null); + const typeIncludesVoid = (0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Void); + const contextualTypeIncludesUndefined = (0, util_1.isTypeFlagSet)(contextualType, ts.TypeFlags.Undefined); + const contextualTypeIncludesNull = (0, util_1.isTypeFlagSet)(contextualType, ts.TypeFlags.Null); + const contextualTypeIncludesVoid = (0, util_1.isTypeFlagSet)(contextualType, ts.TypeFlags.Void); + // make sure that the parent accepts the same types + // i.e. assigning `string | null | undefined` to `string | undefined` is invalid + const isValidUndefined = typeIncludesUndefined + ? contextualTypeIncludesUndefined + : true; + const isValidNull = typeIncludesNull + ? contextualTypeIncludesNull + : true; + const isValidVoid = typeIncludesVoid + ? contextualTypeIncludesVoid + : true; + if (isValidUndefined && isValidNull && isValidVoid) { + context.report({ + node, + messageId: 'contextuallyUnnecessary', + fix: removeExclamationFix, + }); + } + } + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.d.ts new file mode 100644 index 0000000..7d1e011 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.d.ts @@ -0,0 +1,4 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule<"removeUnnecessaryConstraint" | "unnecessaryConstraint", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=no-unnecessary-type-constraint.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.d.ts.map new file mode 100644 index 0000000..c2e3254 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unnecessary-type-constraint.d.ts","sourceRoot":"","sources":["../../src/rules/no-unnecessary-type-constraint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;;AAenE,wBAsGG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js new file mode 100644 index 0000000..c49dc37 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js @@ -0,0 +1,119 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const node_path_1 = require("node:path"); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-unnecessary-type-constraint', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow unnecessary constraints on generic types', + recommended: 'recommended', + }, + hasSuggestions: true, + messages: { + removeUnnecessaryConstraint: 'Remove the unnecessary `{{constraint}}` constraint.', + unnecessaryConstraint: 'Constraining the generic type `{{name}}` to `{{constraint}}` does nothing and is unnecessary.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + // In theory, we could use the type checker for more advanced constraint types... + // ...but in practice, these types are rare, and likely not worth requiring type info. + // https://github.com/typescript-eslint/typescript-eslint/pull/2516#discussion_r495731858 + const unnecessaryConstraints = new Map([ + [utils_1.AST_NODE_TYPES.TSAnyKeyword, 'any'], + [utils_1.AST_NODE_TYPES.TSUnknownKeyword, 'unknown'], + ]); + function checkRequiresGenericDeclarationDisambiguation(filename) { + const pathExt = (0, node_path_1.extname)(filename).toLocaleLowerCase(); + switch (pathExt) { + case ts.Extension.Cts: + case ts.Extension.Mts: + case ts.Extension.Tsx: + return true; + default: + return false; + } + } + const requiresGenericDeclarationDisambiguation = checkRequiresGenericDeclarationDisambiguation(context.filename); + const checkNode = (node, inArrowFunction) => { + const constraint = unnecessaryConstraints.get(node.constraint.type); + function shouldAddTrailingComma() { + if (!inArrowFunction || !requiresGenericDeclarationDisambiguation) { + return false; + } + // Only () => {} would need trailing comma + return (node.parent.params.length === + 1 && + context.sourceCode.getTokensAfter(node)[0].value !== ',' && + !node.default); + } + if (constraint) { + context.report({ + node, + messageId: 'unnecessaryConstraint', + data: { + name: node.name.name, + constraint, + }, + suggest: [ + { + messageId: 'removeUnnecessaryConstraint', + data: { + constraint, + }, + fix(fixer) { + return fixer.replaceTextRange([node.name.range[1], node.constraint.range[1]], shouldAddTrailingComma() ? ',' : ''); + }, + }, + ], + }); + } + }; + return { + ':not(ArrowFunctionExpression) > TSTypeParameterDeclaration > TSTypeParameter[constraint]'(node) { + checkNode(node, false); + }, + 'ArrowFunctionExpression > TSTypeParameterDeclaration > TSTypeParameter[constraint]'(node) { + checkNode(node, true); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-conversion.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-conversion.d.ts new file mode 100644 index 0000000..d7752eb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-conversion.d.ts @@ -0,0 +1,4 @@ +type MessageIds = 'suggestRemove' | 'suggestSatisfies' | 'unnecessaryTypeConversion'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=no-unnecessary-type-conversion.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-conversion.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-conversion.d.ts.map new file mode 100644 index 0000000..60ec6bf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-conversion.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unnecessary-type-conversion.d.ts","sourceRoot":"","sources":["../../src/rules/no-unnecessary-type-conversion.ts"],"names":[],"mappings":"AAgBA,KAAK,UAAU,GACX,eAAe,GACf,kBAAkB,GAClB,2BAA2B,CAAC;;AAchC,wBA+XG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-conversion.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-conversion.js new file mode 100644 index 0000000..1426135 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-conversion.js @@ -0,0 +1,356 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +function isEnumType(type) { + return (type.getFlags() & ts.TypeFlags.EnumLike) !== 0; +} +function isEnumMemberType(type) { + const symbol = type.getSymbol(); + if (!symbol) { + return false; + } + return (symbol.flags & ts.SymbolFlags.EnumMember) !== 0; +} +exports.default = (0, util_1.createRule)({ + name: 'no-unnecessary-type-conversion', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow conversion idioms when they do not change the type or value of the expression', + recommended: 'strict', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + suggestRemove: 'Remove the type conversion.', + suggestSatisfies: 'Instead, assert that the value satisfies the {{type}} type.', + unnecessaryTypeConversion: '{{violation}} does not change the type or value of the {{type}}.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + function doesUnderlyingTypeMatchFlag(type, typeFlag) { + return tsutils + .unionConstituents(type) + .every(t => (0, util_1.isTypeFlagSet)(t, typeFlag)); + } + const services = (0, util_1.getParserServices)(context); + function handleUnaryOperator(node, typeFlag, typeString, violation, isDoubleOperator) { + const outerNode = isDoubleOperator ? node.parent : node; + const type = services.getTypeAtLocation(node.argument); + if (doesUnderlyingTypeMatchFlag(type, typeFlag)) { + const wrappingFixerParams = { + node: outerNode, + innerNode: [node.argument], + sourceCode: context.sourceCode, + }; + context.report({ + loc: { + start: outerNode.loc.start, + end: { + column: node.loc.start.column + 1, + line: node.loc.start.line, + }, + }, + messageId: 'unnecessaryTypeConversion', + data: { type: typeString, violation }, + suggest: [ + { + messageId: 'suggestRemove', + fix: (0, util_1.getWrappingFixer)(wrappingFixerParams), + }, + { + messageId: 'suggestSatisfies', + data: { type: typeString }, + fix: (0, util_1.getWrappingFixer)({ + ...wrappingFixerParams, + wrap: expr => `${expr} satisfies ${typeString}`, + }), + }, + ], + }); + } + } + return { + 'AssignmentExpression[operator = "+="]'(node) { + if (node.right.type === utils_1.AST_NODE_TYPES.Literal && + node.right.value === '' && + doesUnderlyingTypeMatchFlag(services.getTypeAtLocation(node.left), ts.TypeFlags.StringLike)) { + const wrappingFixerParams = { + node, + innerNode: [node.left], + sourceCode: context.sourceCode, + }; + context.report({ + node, + messageId: 'unnecessaryTypeConversion', + data: { + type: 'string', + violation: "Concatenating a string with ''", + }, + suggest: [ + { + messageId: 'suggestRemove', + fix: node.parent.type === utils_1.AST_NODE_TYPES.ExpressionStatement + ? (fixer) => [ + fixer.removeRange([ + node.parent.range[0], + node.parent.range[1], + ]), + ] + : (0, util_1.getWrappingFixer)(wrappingFixerParams), + }, + { + messageId: 'suggestSatisfies', + data: { type: 'string' }, + fix: (0, util_1.getWrappingFixer)({ + ...wrappingFixerParams, + wrap: expr => `${expr} satisfies string`, + }), + }, + ], + }); + } + }, + 'BinaryExpression[operator = "+"]'(node) { + if (node.right.type === utils_1.AST_NODE_TYPES.Literal && + node.right.value === '' && + doesUnderlyingTypeMatchFlag(services.getTypeAtLocation(node.left), ts.TypeFlags.StringLike)) { + const wrappingFixerParams = { + node, + innerNode: [node.left], + sourceCode: context.sourceCode, + }; + context.report({ + loc: { + start: node.left.loc.end, + end: node.loc.end, + }, + messageId: 'unnecessaryTypeConversion', + data: { + type: 'string', + violation: "Concatenating a string with ''", + }, + suggest: [ + { + messageId: 'suggestRemove', + fix: (0, util_1.getWrappingFixer)(wrappingFixerParams), + }, + { + messageId: 'suggestSatisfies', + data: { type: 'string' }, + fix: (0, util_1.getWrappingFixer)({ + ...wrappingFixerParams, + wrap: expr => `${expr} satisfies string`, + }), + }, + ], + }); + } + else if (node.left.type === utils_1.AST_NODE_TYPES.Literal && + node.left.value === '' && + doesUnderlyingTypeMatchFlag(services.getTypeAtLocation(node.right), ts.TypeFlags.StringLike)) { + const wrappingFixerParams = { + node, + innerNode: [node.right], + sourceCode: context.sourceCode, + }; + context.report({ + loc: { + start: node.loc.start, + end: node.right.loc.start, + }, + messageId: 'unnecessaryTypeConversion', + data: { + type: 'string', + violation: "Concatenating '' with a string", + }, + suggest: [ + { + messageId: 'suggestRemove', + fix: (0, util_1.getWrappingFixer)(wrappingFixerParams), + }, + { + messageId: 'suggestSatisfies', + data: { type: 'string' }, + fix: (0, util_1.getWrappingFixer)({ + ...wrappingFixerParams, + wrap: expr => `${expr} satisfies string`, + }), + }, + ], + }); + } + }, + CallExpression(node) { + const nodeCallee = node.callee; + const builtInTypeFlags = { + BigInt: ts.TypeFlags.BigIntLike, + Boolean: ts.TypeFlags.BooleanLike, + Number: ts.TypeFlags.NumberLike, + String: ts.TypeFlags.StringLike, + }; + if (nodeCallee.type !== utils_1.AST_NODE_TYPES.Identifier || + !(nodeCallee.name in builtInTypeFlags)) { + return; + } + const typeFlag = builtInTypeFlags[nodeCallee.name]; + const scope = context.sourceCode.getScope(node); + const variable = scope.set.get(nodeCallee.name); + if (!!variable?.defs.length || + !doesUnderlyingTypeMatchFlag((0, util_1.getConstrainedTypeAtLocation)(services, node.arguments[0]), typeFlag)) { + return; + } + const wrappingFixerParams = { + node, + innerNode: [node.arguments[0]], + sourceCode: context.sourceCode, + }; + const typeString = nodeCallee.name.toLowerCase(); + context.report({ + node: nodeCallee, + messageId: 'unnecessaryTypeConversion', + data: { + type: nodeCallee.name.toLowerCase(), + violation: `Passing a ${typeString} to ${nodeCallee.name}()`, + }, + suggest: [ + { + messageId: 'suggestRemove', + fix: (0, util_1.getWrappingFixer)(wrappingFixerParams), + }, + { + messageId: 'suggestSatisfies', + data: { type: typeString }, + fix: (0, util_1.getWrappingFixer)({ + ...wrappingFixerParams, + wrap: expr => `${expr} satisfies ${typeString}`, + }), + }, + ], + }); + }, + 'CallExpression > MemberExpression.callee > Identifier[name = "toString"].property'(node) { + const memberExpr = node.parent; + const type = (0, util_1.getConstrainedTypeAtLocation)(services, memberExpr.object); + if (isEnumType(type) || isEnumMemberType(type)) { + return; + } + if (doesUnderlyingTypeMatchFlag(type, ts.TypeFlags.StringLike)) { + const wrappingFixerParams = { + node: memberExpr.parent, + innerNode: [memberExpr.object], + sourceCode: context.sourceCode, + }; + context.report({ + loc: { + start: memberExpr.property.loc.start, + end: memberExpr.parent.loc.end, + }, + messageId: 'unnecessaryTypeConversion', + data: { + type: 'string', + violation: "Calling a string's .toString() method", + }, + suggest: [ + { + messageId: 'suggestRemove', + fix: (0, util_1.getWrappingFixer)(wrappingFixerParams), + }, + { + messageId: 'suggestSatisfies', + data: { type: 'string' }, + fix: (0, util_1.getWrappingFixer)({ + ...wrappingFixerParams, + wrap: expr => `${expr} satisfies string`, + }), + }, + ], + }); + } + }, + 'UnaryExpression[operator = "!"] > UnaryExpression[operator = "!"]'(node) { + handleUnaryOperator(node, ts.TypeFlags.BooleanLike, 'boolean', 'Using !! on a boolean', true); + }, + 'UnaryExpression[operator = "+"]'(node) { + handleUnaryOperator(node, ts.TypeFlags.NumberLike, 'number', 'Using the unary + operator on a number', false); + }, + 'UnaryExpression[operator = "~"] > UnaryExpression[operator = "~"]'(node) { + const outerNode = node.parent; + const type = services.getTypeAtLocation(node.argument); + if (tsutils.unionConstituents(type).every(t => { + return ((0, util_1.isTypeFlagSet)(t, ts.TypeFlags.NumberLiteral) && + Number.isInteger(t.value)); + })) { + const wrappingFixerParams = { + node: outerNode, + innerNode: [node.argument], + sourceCode: context.sourceCode, + }; + context.report({ + loc: { + start: outerNode.loc.start, + end: { + column: node.loc.start.column + 1, + line: node.loc.start.line, + }, + }, + messageId: 'unnecessaryTypeConversion', + data: { type: 'number', violation: 'Using ~~ on an integer' }, + suggest: [ + { + messageId: 'suggestRemove', + fix: (0, util_1.getWrappingFixer)(wrappingFixerParams), + }, + { + messageId: 'suggestSatisfies', + data: { type: 'number' }, + fix: (0, util_1.getWrappingFixer)({ + ...wrappingFixerParams, + wrap: expr => `${expr} satisfies number`, + }), + }, + ], + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-parameters.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-parameters.d.ts new file mode 100644 index 0000000..16cbe9b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-parameters.d.ts @@ -0,0 +1,4 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule<"replaceUsagesWithConstraint" | "sole", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=no-unnecessary-type-parameters.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-parameters.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-parameters.d.ts.map new file mode 100644 index 0000000..384b1f5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-parameters.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unnecessary-type-parameters.d.ts","sourceRoot":"","sources":["../../src/rules/no-unnecessary-type-parameters.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;;AAqBnE,wBA0MG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-parameters.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-parameters.js new file mode 100644 index 0000000..2560063 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-parameters.js @@ -0,0 +1,422 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-unnecessary-type-parameters', + meta: { + type: 'problem', + docs: { + description: "Disallow type parameters that aren't used multiple times", + recommended: 'strict', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + replaceUsagesWithConstraint: 'Replace all usages of type parameter with its constraint.', + sole: 'Type parameter {{name}} is {{uses}} in the {{descriptor}} signature.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const parserServices = (0, util_1.getParserServices)(context); + function checkNode(node, descriptor) { + const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node); + const checker = parserServices.program.getTypeChecker(); + let counts; + // Get the scope in which the type parameters are declared. + const scope = context.sourceCode.getScope(node); + for (const typeParameter of tsNode.typeParameters) { + const esTypeParameter = parserServices.tsNodeToESTreeNodeMap.get(typeParameter); + const smTypeParameterVariable = (0, util_1.nullThrows)((() => { + const variable = scope.set.get(esTypeParameter.name.name); + return variable?.isTypeVariable ? variable : undefined; + })(), "Type parameter should be present in scope's variables."); + // Quick path: if the type parameter is used multiple times in the AST, + // we don't need to dip into types to know it's repeated. + if (isTypeParameterRepeatedInAST(esTypeParameter, smTypeParameterVariable.references, node.body?.range[0] ?? node.returnType?.range[1])) { + continue; + } + // For any inferred types, we have to dip into type checking. + counts ??= countTypeParameterUsage(checker, tsNode); + const identifierCounts = counts.get(typeParameter.name); + if (!identifierCounts || identifierCounts > 2) { + continue; + } + context.report({ + node: esTypeParameter, + messageId: 'sole', + data: { + name: typeParameter.name.text, + descriptor, + uses: identifierCounts === 1 ? 'never used' : 'used only once', + }, + suggest: [ + { + messageId: 'replaceUsagesWithConstraint', + *fix(fixer) { + // Replace all the usages of the type parameter with the constraint... + const constraint = esTypeParameter.constraint; + // special case - a constraint of 'any' actually acts like 'unknown' + const constraintText = constraint != null && + constraint.type !== utils_1.AST_NODE_TYPES.TSAnyKeyword + ? context.sourceCode.getText(constraint) + : 'unknown'; + for (const reference of smTypeParameterVariable.references) { + if (reference.isTypeReference) { + const referenceNode = reference.identifier; + const isComplexType = constraint?.type === utils_1.AST_NODE_TYPES.TSUnionType || + constraint?.type === utils_1.AST_NODE_TYPES.TSIntersectionType || + constraint?.type === utils_1.AST_NODE_TYPES.TSConditionalType; + const hasMatchingAncestorType = [ + utils_1.AST_NODE_TYPES.TSArrayType, + utils_1.AST_NODE_TYPES.TSIndexedAccessType, + utils_1.AST_NODE_TYPES.TSIntersectionType, + utils_1.AST_NODE_TYPES.TSUnionType, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + ].some(type => referenceNode.parent.parent.type === type); + if (isComplexType && hasMatchingAncestorType) { + const fixResult = (0, util_1.getWrappingFixer)({ + node: referenceNode, + innerNode: constraint, + sourceCode: context.sourceCode, + wrap: constraintNode => constraintNode, + })(fixer); + yield fixResult; + } + else { + yield fixer.replaceText(referenceNode, constraintText); + } + } + } + // ...and remove the type parameter itself from the declaration. + const typeParamsNode = (0, util_1.nullThrows)(node.typeParameters, 'node should have type parameters'); + // We are assuming at this point that the reported type parameter + // is present in the inspected node's type parameters. + if (typeParamsNode.params.length === 1) { + // Remove the whole generic syntax if we're removing the only type parameter in the list. + yield fixer.remove(typeParamsNode); + } + else { + const index = typeParamsNode.params.indexOf(esTypeParameter); + if (index === 0) { + const commaAfter = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(esTypeParameter, token => token.value === ','), util_1.NullThrowsReasons.MissingToken('comma', 'type parameter list')); + const tokenAfterComma = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(commaAfter, { + includeComments: true, + }), util_1.NullThrowsReasons.MissingToken('token', 'type parameter list')); + yield fixer.removeRange([ + esTypeParameter.range[0], + tokenAfterComma.range[0], + ]); + } + else { + const commaBefore = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(esTypeParameter, token => token.value === ','), util_1.NullThrowsReasons.MissingToken('comma', 'type parameter list')); + yield fixer.removeRange([ + commaBefore.range[0], + esTypeParameter.range[1], + ]); + } + } + }, + }, + ], + }); + } + } + return { + [[ + 'ArrowFunctionExpression[typeParameters]', + 'FunctionDeclaration[typeParameters]', + 'FunctionExpression[typeParameters]', + 'TSCallSignatureDeclaration[typeParameters]', + 'TSConstructorType[typeParameters]', + 'TSDeclareFunction[typeParameters]', + 'TSEmptyBodyFunctionExpression[typeParameters]', + 'TSFunctionType[typeParameters]', + 'TSMethodSignature[typeParameters]', + ].join(', ')](node) { + checkNode(node, 'function'); + }, + [[ + 'ClassDeclaration[typeParameters]', + 'ClassExpression[typeParameters]', + ].join(', ')](node) { + checkNode(node, 'class'); + }, + }; + }, +}); +function isTypeParameterRepeatedInAST(node, references, startOfBody = Infinity) { + let total = 0; + for (const reference of references) { + // References inside the type parameter's definition don't count... + if (reference.identifier.range[0] < node.range[1] && + reference.identifier.range[1] > node.range[0]) { + continue; + } + // ...nor references that are outside the declaring signature. + if (reference.identifier.range[0] > startOfBody) { + continue; + } + // Neither do references that aren't to the same type parameter, + // namely value-land (non-type) identifiers of the type parameter's type, + // and references to different type parameters or values. + if (!reference.isTypeReference || + reference.identifier.name !== node.name.name) { + continue; + } + // If the type parameter is being used as a type argument, then we + // know the type parameter is being reused and can't be reported. + if (reference.identifier.parent.type === utils_1.AST_NODE_TYPES.TSTypeReference) { + const grandparent = skipConstituentsUpward(reference.identifier.parent.parent); + if (grandparent.type === utils_1.AST_NODE_TYPES.TSTypeParameterInstantiation && + grandparent.params.includes(reference.identifier.parent) && + // Array and ReadonlyArray must be handled carefully + // let's defer the check to the type-aware phase + !(grandparent.parent.type === utils_1.AST_NODE_TYPES.TSTypeReference && + grandparent.parent.typeName.type === utils_1.AST_NODE_TYPES.Identifier && + ['Array', 'ReadonlyArray'].includes(grandparent.parent.typeName.name))) { + return true; + } + } + total += 1; + if (total >= 2) { + return true; + } + } + return false; +} +function skipConstituentsUpward(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.TSIntersectionType: + case utils_1.AST_NODE_TYPES.TSUnionType: + return skipConstituentsUpward(node.parent); + default: + return node; + } +} +/** + * Count uses of type parameters in inferred return types. + * We need to resolve and analyze the inferred return type of a function + * to see whether it contains additional references to the type parameters. + * For classes, we need to do this for all their methods. + */ +function countTypeParameterUsage(checker, node) { + const counts = new Map(); + if (ts.isClassLike(node)) { + for (const typeParameter of node.typeParameters) { + collectTypeParameterUsageCounts(checker, typeParameter, counts, true); + } + for (const member of node.members) { + collectTypeParameterUsageCounts(checker, member, counts, true); + } + } + else { + collectTypeParameterUsageCounts(checker, node, counts, false); + } + return counts; +} +/** + * Populates {@link foundIdentifierUsages} by the number of times each type parameter + * appears in the given type by checking its uses through its type references. + * This is essentially a limited subset of the scope manager, but for types. + */ +function collectTypeParameterUsageCounts(checker, node, foundIdentifierUsages, fromClass) { + const visitedSymbolLists = new Set(); + const type = checker.getTypeAtLocation(node); + const typeUsages = new Map(); + const visitedConstraints = new Set(); + let functionLikeType = false; + let visitedDefault = false; + if (ts.isCallSignatureDeclaration(node) || + ts.isConstructorDeclaration(node)) { + functionLikeType = true; + visitSignature(checker.getSignatureFromDeclaration(node)); + } + if (!functionLikeType) { + visitType(type, false); + } + function visitType(type, assumeMultipleUses, isReturnType = false) { + // Seeing the same type > (threshold=3 ** 2) times indicates a likely + // recursive type, like `type T = { [P in keyof T]: T }`. + // If it's not recursive, then heck, we've seen it enough times that any + // referenced types have been counted enough to qualify as used. + if (!type || incrementTypeUsages(type) > 9) { + return; + } + if (tsutils.isTypeParameter(type)) { + const declaration = type.getSymbol()?.getDeclarations()?.[0]; + if (declaration) { + incrementIdentifierCount(declaration.name, assumeMultipleUses); + // Visiting the type of a constrained type parameter will recurse into + // the constraint. We avoid infinite loops by visiting each only once. + if (declaration.constraint && + !visitedConstraints.has(declaration.constraint)) { + visitedConstraints.add(declaration.constraint); + visitType(checker.getTypeAtLocation(declaration.constraint), false); + } + if (declaration.default && !visitedDefault) { + visitedDefault = true; + visitType(checker.getTypeAtLocation(declaration.default), false); + } + } + } + // Catch-all: generic type references like `Exclude` + else if (type.aliasTypeArguments) { + // We don't descend into the definition of the type alias, so we don't + // know whether it's used multiple times. It's safest to assume it is. + visitTypesList(type.aliasTypeArguments, true); + } + // Intersections and unions like `0 | 1` + else if (tsutils.isUnionOrIntersectionType(type)) { + visitTypesList(type.types, assumeMultipleUses); + } + // Index access types like `T[K]` + else if (tsutils.isIndexedAccessType(type)) { + visitType(type.objectType, assumeMultipleUses); + visitType(type.indexType, assumeMultipleUses); + } + // Tuple types like `[K, V]` + // Generic type references like `Map` + else if (tsutils.isTypeReference(type)) { + for (const typeArgument of type.typeArguments ?? []) { + // currently, if we are in a "class context", everything is accepted + let thisAssumeMultipleUses = fromClass || assumeMultipleUses; + // special cases - readonly arrays/tuples are considered only to use the + // type parameter once. Mutable arrays/tuples are considered to use the + // type parameter multiple times if and only if they are returned. + // other kind of type references always count as multiple uses + thisAssumeMultipleUses ||= tsutils.isTupleType(type.target) + ? isReturnType && !type.target.readonly + : checker.isArrayType(type.target) + ? isReturnType && + type.symbol?.getName() === 'Array' + : true; + visitType(typeArgument, thisAssumeMultipleUses, isReturnType); + } + } + // Template literals like `a${T}b` + else if (tsutils.isTemplateLiteralType(type)) { + for (const subType of type.types) { + visitType(subType, assumeMultipleUses); + } + } + // Conditional types like `T extends string ? T : never` + else if (tsutils.isConditionalType(type)) { + visitType(type.checkType, assumeMultipleUses); + visitType(type.extendsType, assumeMultipleUses); + } + // Catch-all: inferred object types like `{ K: V }`. + // These catch-alls should be _after_ more specific checks like + // `isTypeReference` to avoid descending into all the properties of a + // generic interface/class, e.g. `Map`. + else if (tsutils.isObjectType(type)) { + const properties = type.getProperties(); + visitSymbolsListOnce(properties, false); + if (isMappedType(type)) { + visitType(type.typeParameter, false); + if (properties.length === 0) { + // TS treats mapped types like `{[k in "a"]: T}` like `{a: T}`. + // They have properties, so we need to avoid double-counting. + visitType(type.templateType ?? type.constraintType, false); + } + } + visitType(type.getNumberIndexType(), true); + visitType(type.getStringIndexType(), true); + type.getCallSignatures().forEach(signature => { + functionLikeType = true; + visitSignature(signature); + }); + type.getConstructSignatures().forEach(signature => { + functionLikeType = true; + visitSignature(signature); + }); + } + // Catch-all: operator types like `keyof T` + else if (isOperatorType(type)) { + visitType(type.type, assumeMultipleUses); + } + } + function incrementIdentifierCount(id, assumeMultipleUses) { + const identifierCount = foundIdentifierUsages.get(id) ?? 0; + const value = assumeMultipleUses ? 2 : 1; + foundIdentifierUsages.set(id, identifierCount + value); + } + function incrementTypeUsages(type) { + const count = (typeUsages.get(type) ?? 0) + 1; + typeUsages.set(type, count); + return count; + } + function visitSignature(signature) { + if (!signature) { + return; + } + if (signature.thisParameter) { + visitType(checker.getTypeOfSymbol(signature.thisParameter), false); + } + for (const parameter of signature.parameters) { + visitType(checker.getTypeOfSymbol(parameter), false); + } + for (const typeParameter of signature.getTypeParameters() ?? []) { + visitType(typeParameter, false); + } + visitType(checker.getTypePredicateOfSignature(signature)?.type ?? + signature.getReturnType(), false, true); + } + function visitSymbolsListOnce(symbols, assumeMultipleUses) { + if (visitedSymbolLists.has(symbols)) { + return; + } + visitedSymbolLists.add(symbols); + for (const symbol of symbols) { + visitType(checker.getTypeOfSymbol(symbol), assumeMultipleUses); + } + } + function visitTypesList(types, assumeMultipleUses) { + for (const type of types) { + visitType(type, assumeMultipleUses); + } + } +} +function isMappedType(type) { + return 'typeParameter' in type; +} +function isOperatorType(type) { + return 'type' in type && !!type.type; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.d.ts new file mode 100644 index 0000000..62011a7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.d.ts @@ -0,0 +1,4 @@ +export type MessageIds = 'unsafeArgument' | 'unsafeArraySpread' | 'unsafeSpread' | 'unsafeTupleSpread'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=no-unsafe-argument.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.d.ts.map new file mode 100644 index 0000000..70d30d5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unsafe-argument.d.ts","sourceRoot":"","sources":["../../src/rules/no-unsafe-argument.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,UAAU,GAClB,gBAAgB,GAChB,mBAAmB,GACnB,cAAc,GACd,mBAAmB,CAAC;;AA2HxB,wBAuLG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js new file mode 100644 index 0000000..69bcf3c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js @@ -0,0 +1,272 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +var RestTypeKind; +(function (RestTypeKind) { + RestTypeKind[RestTypeKind["Array"] = 0] = "Array"; + RestTypeKind[RestTypeKind["Tuple"] = 1] = "Tuple"; + RestTypeKind[RestTypeKind["Other"] = 2] = "Other"; +})(RestTypeKind || (RestTypeKind = {})); +class FunctionSignature { + paramTypes; + restType; + hasConsumedArguments = false; + parameterTypeIndex = 0; + constructor(paramTypes, restType) { + this.paramTypes = paramTypes; + this.restType = restType; + } + static create(checker, tsNode) { + const signature = checker.getResolvedSignature(tsNode); + if (!signature) { + return null; + } + const paramTypes = []; + let restType = null; + const parameters = signature.getParameters(); + for (let i = 0; i < parameters.length; i += 1) { + const param = parameters[i]; + const type = checker.getTypeOfSymbolAtLocation(param, tsNode); + const decl = param.getDeclarations()?.[0]; + if (decl && (0, util_1.isRestParameterDeclaration)(decl)) { + // is a rest param + if (checker.isArrayType(type)) { + restType = { + type: checker.getTypeArguments(type)[0], + index: i, + kind: RestTypeKind.Array, + }; + } + else if (checker.isTupleType(type)) { + restType = { + index: i, + kind: RestTypeKind.Tuple, + typeArguments: checker.getTypeArguments(type), + }; + } + else { + restType = { + type, + index: i, + kind: RestTypeKind.Other, + }; + } + break; + } + paramTypes.push(type); + } + return new this(paramTypes, restType); + } + consumeRemainingArguments() { + this.hasConsumedArguments = true; + } + getNextParameterType() { + const index = this.parameterTypeIndex; + this.parameterTypeIndex += 1; + if (index >= this.paramTypes.length || this.hasConsumedArguments) { + if (this.restType == null) { + return null; + } + switch (this.restType.kind) { + case RestTypeKind.Tuple: { + const typeArguments = this.restType.typeArguments; + if (this.hasConsumedArguments) { + // all types consumed by a rest - just assume it's the last type + // there is one edge case where this is wrong, but we ignore it because + // it's rare and really complicated to handle + // eg: function foo(...a: [number, ...string[], number]) + return typeArguments[typeArguments.length - 1]; + } + const typeIndex = index - this.restType.index; + if (typeIndex >= typeArguments.length) { + return typeArguments[typeArguments.length - 1]; + } + return typeArguments[typeIndex]; + } + case RestTypeKind.Array: + case RestTypeKind.Other: + return this.restType.type; + } + } + return this.paramTypes[index]; + } +} +exports.default = (0, util_1.createRule)({ + name: 'no-unsafe-argument', + meta: { + type: 'problem', + docs: { + description: 'Disallow calling a function with a value with type `any`', + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + unsafeArgument: 'Unsafe argument of type {{sender}} assigned to a parameter of type {{receiver}}.', + unsafeArraySpread: 'Unsafe spread of an {{sender}} array type.', + unsafeSpread: 'Unsafe spread of an {{sender}} type.', + unsafeTupleSpread: 'Unsafe spread of a tuple type. The argument is {{sender}} and is assigned to a parameter of type {{receiver}}.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + function describeType(type) { + if (tsutils.isIntrinsicErrorType(type)) { + return 'error typed'; + } + return `\`${checker.typeToString(type)}\``; + } + function describeTypeForSpread(type) { + if (checker.isArrayType(type) && + tsutils.isIntrinsicErrorType(checker.getTypeArguments(type)[0])) { + return 'error'; + } + return describeType(type); + } + function describeTypeForTuple(type) { + if (tsutils.isIntrinsicErrorType(type)) { + return 'error typed'; + } + return `of type \`${checker.typeToString(type)}\``; + } + function checkUnsafeArguments(args, callee, node) { + if (args.length === 0) { + return; + } + // ignore any-typed calls as these are caught by no-unsafe-call + if ((0, util_1.isTypeAnyType)(services.getTypeAtLocation(callee))) { + return; + } + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + const signature = (0, util_1.nullThrows)(FunctionSignature.create(checker, tsNode), 'Expected to a signature resolved'); + if (node.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression) { + // Consumes the first parameter (TemplateStringsArray) of the function called with TaggedTemplateExpression. + signature.getNextParameterType(); + } + for (const argument of args) { + switch (argument.type) { + // spreads consume + case utils_1.AST_NODE_TYPES.SpreadElement: { + const spreadArgType = services.getTypeAtLocation(argument.argument); + if ((0, util_1.isTypeAnyType)(spreadArgType)) { + // foo(...any) + context.report({ + node: argument, + messageId: 'unsafeSpread', + data: { sender: describeType(spreadArgType) }, + }); + } + else if ((0, util_1.isTypeAnyArrayType)(spreadArgType, checker)) { + // foo(...any[]) + // TODO - we could break down the spread and compare the array type against each argument + context.report({ + node: argument, + messageId: 'unsafeArraySpread', + data: { sender: describeTypeForSpread(spreadArgType) }, + }); + } + else if (checker.isTupleType(spreadArgType)) { + // foo(...[tuple1, tuple2]) + const spreadTypeArguments = checker.getTypeArguments(spreadArgType); + for (const tupleType of spreadTypeArguments) { + const parameterType = signature.getNextParameterType(); + if (parameterType == null) { + continue; + } + const result = (0, util_1.isUnsafeAssignment)(tupleType, parameterType, checker, + // we can't pass the individual tuple members in here as this will most likely be a spread variable + // not a spread array + null); + if (result) { + context.report({ + node: argument, + messageId: 'unsafeTupleSpread', + data: { + receiver: describeType(parameterType), + sender: describeTypeForTuple(tupleType), + }, + }); + } + } + if (spreadArgType.target.combinedFlags & ts.ElementFlags.Variable) { + // the last element was a rest - so all remaining defined arguments can be considered "consumed" + // all remaining arguments should be compared against the rest type (if one exists) + signature.consumeRemainingArguments(); + } + } + else { + // something that's iterable + // handling this will be pretty complex - so we ignore it for now + // TODO - handle generic iterable case + } + break; + } + default: { + const parameterType = signature.getNextParameterType(); + if (parameterType == null) { + continue; + } + const argumentType = services.getTypeAtLocation(argument); + const result = (0, util_1.isUnsafeAssignment)(argumentType, parameterType, checker, argument); + if (result) { + context.report({ + node: argument, + messageId: 'unsafeArgument', + data: { + receiver: describeType(parameterType), + sender: describeType(argumentType), + }, + }); + } + } + } + } + } + return { + 'CallExpression, NewExpression'(node) { + checkUnsafeArguments(node.arguments, node.callee, node); + }, + TaggedTemplateExpression(node) { + checkUnsafeArguments(node.quasi.expressions, node.tag, node); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.d.ts new file mode 100644 index 0000000..951d144 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeArraySpread" | "anyAssignment" | "anyAssignmentThis" | "unsafeArrayPattern" | "unsafeArrayPatternFromTuple" | "unsafeAssignment" | "unsafeObjectPattern", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-unsafe-assignment.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.d.ts.map new file mode 100644 index 0000000..92d3747 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unsafe-assignment.d.ts","sourceRoot":"","sources":["../../src/rules/no-unsafe-assignment.ts"],"names":[],"mappings":";AA6BA,wBA8ZG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js new file mode 100644 index 0000000..48c02bd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js @@ -0,0 +1,321 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const util_1 = require("../util"); +var ComparisonType; +(function (ComparisonType) { + /** Do no assignment comparison */ + ComparisonType[ComparisonType["None"] = 0] = "None"; + /** Use the receiver's type for comparison */ + ComparisonType[ComparisonType["Basic"] = 1] = "Basic"; + /** Use the sender's contextual type for comparison */ + ComparisonType[ComparisonType["Contextual"] = 2] = "Contextual"; +})(ComparisonType || (ComparisonType = {})); +exports.default = (0, util_1.createRule)({ + name: 'no-unsafe-assignment', + meta: { + type: 'problem', + docs: { + description: 'Disallow assigning a value with type `any` to variables and properties', + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + anyAssignment: 'Unsafe assignment of an {{sender}} value.', + anyAssignmentThis: [ + 'Unsafe assignment of an {{sender}} value. `this` is typed as `any`.', + 'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.', + ].join('\n'), + unsafeArrayPattern: 'Unsafe array destructuring of an {{sender}} array value.', + unsafeArrayPatternFromTuple: 'Unsafe array destructuring of a tuple element with an {{sender}} value.', + unsafeArraySpread: 'Unsafe spread of an {{sender}} value in an array.', + unsafeAssignment: 'Unsafe assignment of type {{sender}} to a variable of type {{receiver}}.', + unsafeObjectPattern: 'Unsafe object destructuring of a property with an {{sender}} value.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const compilerOptions = services.program.getCompilerOptions(); + const isNoImplicitThis = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'noImplicitThis'); + // returns true if the assignment reported + function checkArrayDestructureHelper(receiverNode, senderNode) { + if (receiverNode.type !== utils_1.AST_NODE_TYPES.ArrayPattern) { + return false; + } + const senderTsNode = services.esTreeNodeToTSNodeMap.get(senderNode); + const senderType = services.getTypeAtLocation(senderNode); + return checkArrayDestructure(receiverNode, senderType, senderTsNode); + } + // returns true if the assignment reported + function checkArrayDestructure(receiverNode, senderType, senderNode) { + // any array + // const [x] = ([] as any[]); + if ((0, util_1.isTypeAnyArrayType)(senderType, checker)) { + context.report({ + node: receiverNode, + messageId: 'unsafeArrayPattern', + data: createData(senderType), + }); + return false; + } + if (!checker.isTupleType(senderType)) { + return true; + } + const tupleElements = checker.getTypeArguments(senderType); + // tuple with any + // const [x] = [1 as any]; + let didReport = false; + for (let receiverIndex = 0; receiverIndex < receiverNode.elements.length; receiverIndex += 1) { + const receiverElement = receiverNode.elements[receiverIndex]; + if (!receiverElement) { + continue; + } + if (receiverElement.type === utils_1.AST_NODE_TYPES.RestElement) { + // don't handle rests as they're not a 1:1 assignment + continue; + } + const senderType = tupleElements[receiverIndex]; + if (!senderType) { + continue; + } + // check for the any type first so we can handle [[[x]]] = [any] + if ((0, util_1.isTypeAnyType)(senderType)) { + context.report({ + node: receiverElement, + messageId: 'unsafeArrayPatternFromTuple', + data: createData(senderType), + }); + // we want to report on every invalid element in the tuple + didReport = true; + } + else if (receiverElement.type === utils_1.AST_NODE_TYPES.ArrayPattern) { + didReport = checkArrayDestructure(receiverElement, senderType, senderNode); + } + else if (receiverElement.type === utils_1.AST_NODE_TYPES.ObjectPattern) { + didReport = checkObjectDestructure(receiverElement, senderType, senderNode); + } + } + return didReport; + } + // returns true if the assignment reported + function checkObjectDestructureHelper(receiverNode, senderNode) { + if (receiverNode.type !== utils_1.AST_NODE_TYPES.ObjectPattern) { + return false; + } + const senderTsNode = services.esTreeNodeToTSNodeMap.get(senderNode); + const senderType = services.getTypeAtLocation(senderNode); + return checkObjectDestructure(receiverNode, senderType, senderTsNode); + } + // returns true if the assignment reported + function checkObjectDestructure(receiverNode, senderType, senderNode) { + const properties = new Map(senderType + .getProperties() + .map(property => [ + property.getName(), + checker.getTypeOfSymbolAtLocation(property, senderNode), + ])); + let didReport = false; + for (const receiverProperty of receiverNode.properties) { + if (receiverProperty.type === utils_1.AST_NODE_TYPES.RestElement) { + // don't bother checking rest + continue; + } + let key; + if (!receiverProperty.computed) { + key = + receiverProperty.key.type === utils_1.AST_NODE_TYPES.Identifier + ? receiverProperty.key.name + : String(receiverProperty.key.value); + } + else if (receiverProperty.key.type === utils_1.AST_NODE_TYPES.Literal) { + key = String(receiverProperty.key.value); + } + else if (receiverProperty.key.type === utils_1.AST_NODE_TYPES.TemplateLiteral && + receiverProperty.key.quasis.length === 1) { + key = receiverProperty.key.quasis[0].value.cooked; + } + else { + // can't figure out the name, so skip it + continue; + } + const senderType = properties.get(key); + if (!senderType) { + continue; + } + // check for the any type first so we can handle {x: {y: z}} = {x: any} + if ((0, util_1.isTypeAnyType)(senderType)) { + context.report({ + node: receiverProperty.value, + messageId: 'unsafeObjectPattern', + data: createData(senderType), + }); + didReport = true; + } + else if (receiverProperty.value.type === utils_1.AST_NODE_TYPES.ArrayPattern) { + didReport = checkArrayDestructure(receiverProperty.value, senderType, senderNode); + } + else if (receiverProperty.value.type === utils_1.AST_NODE_TYPES.ObjectPattern) { + didReport = checkObjectDestructure(receiverProperty.value, senderType, senderNode); + } + } + return didReport; + } + // returns true if the assignment reported + function checkAssignment(receiverNode, senderNode, reportingNode, comparisonType) { + const receiverTsNode = services.esTreeNodeToTSNodeMap.get(receiverNode); + const receiverType = comparisonType === ComparisonType.Contextual + ? ((0, util_1.getContextualType)(checker, receiverTsNode) ?? + services.getTypeAtLocation(receiverNode)) + : services.getTypeAtLocation(receiverNode); + const senderType = services.getTypeAtLocation(senderNode); + if ((0, util_1.isTypeAnyType)(senderType)) { + // handle cases when we assign any ==> unknown. + if ((0, util_1.isTypeUnknownType)(receiverType)) { + return false; + } + let messageId = 'anyAssignment'; + if (!isNoImplicitThis) { + // `var foo = this` + const thisExpression = (0, util_1.getThisExpression)(senderNode); + if (thisExpression && + (0, util_1.isTypeAnyType)((0, util_1.getConstrainedTypeAtLocation)(services, thisExpression))) { + messageId = 'anyAssignmentThis'; + } + } + context.report({ + node: reportingNode, + messageId, + data: createData(senderType), + }); + return true; + } + if (comparisonType === ComparisonType.None) { + return false; + } + const result = (0, util_1.isUnsafeAssignment)(senderType, receiverType, checker, senderNode); + if (!result) { + return false; + } + const { receiver, sender } = result; + context.report({ + node: reportingNode, + messageId: 'unsafeAssignment', + data: createData(sender, receiver), + }); + return true; + } + function getComparisonType(typeAnnotation) { + return typeAnnotation + ? // if there's a type annotation, we can do a comparison + ComparisonType.Basic + : // no type annotation means the variable's type will just be inferred, thus equal + ComparisonType.None; + } + function createData(senderType, receiverType) { + if (receiverType) { + return { + receiver: `\`${checker.typeToString(receiverType)}\``, + sender: `\`${checker.typeToString(senderType)}\``, + }; + } + return { + sender: tsutils.isIntrinsicErrorType(senderType) + ? 'error typed' + : '`any`', + }; + } + return { + 'AccessorProperty[value != null]'(node) { + checkAssignment(node.key, node.value, node, getComparisonType(node.typeAnnotation)); + }, + 'AssignmentExpression[operator = "="], AssignmentPattern'(node) { + let didReport = checkAssignment(node.left, node.right, node, + // the variable already has some form of a type to compare against + ComparisonType.Basic); + if (!didReport) { + didReport = checkArrayDestructureHelper(node.left, node.right); + } + if (!didReport) { + checkObjectDestructureHelper(node.left, node.right); + } + }, + 'PropertyDefinition[value != null]'(node) { + checkAssignment(node.key, node.value, node, getComparisonType(node.typeAnnotation)); + }, + 'VariableDeclarator[init != null]'(node) { + const init = (0, util_1.nullThrows)(node.init, util_1.NullThrowsReasons.MissingToken(node.type, 'init')); + let didReport = checkAssignment(node.id, init, node, getComparisonType(node.id.typeAnnotation)); + if (!didReport) { + didReport = checkArrayDestructureHelper(node.id, init); + } + if (!didReport) { + checkObjectDestructureHelper(node.id, init); + } + }, + // object pattern props are checked via assignments + ':not(ObjectPattern) > Property'(node) { + if (node.value.type === utils_1.AST_NODE_TYPES.AssignmentPattern || + node.value.type === utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression) { + // handled by other selector + return; + } + checkAssignment(node.key, node.value, node, ComparisonType.Contextual); + }, + 'ArrayExpression > SpreadElement'(node) { + const restType = services.getTypeAtLocation(node.argument); + if ((0, util_1.isTypeAnyType)(restType) || (0, util_1.isTypeAnyArrayType)(restType, checker)) { + context.report({ + node, + messageId: 'unsafeArraySpread', + data: createData(restType), + }); + } + }, + 'JSXAttribute[value != null]'(node) { + const value = (0, util_1.nullThrows)(node.value, util_1.NullThrowsReasons.MissingToken(node.type, 'value')); + if (value.type !== utils_1.AST_NODE_TYPES.JSXExpressionContainer || + value.expression.type === utils_1.AST_NODE_TYPES.JSXEmptyExpression) { + return; + } + checkAssignment(node.name, value.expression, value.expression, ComparisonType.Contextual); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.d.ts new file mode 100644 index 0000000..e7c0962 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.d.ts @@ -0,0 +1,4 @@ +export type MessageIds = 'unsafeCall' | 'unsafeCallThis' | 'unsafeNew' | 'unsafeTemplateTag'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=no-unsafe-call.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.d.ts.map new file mode 100644 index 0000000..058275c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unsafe-call.d.ts","sourceRoot":"","sources":["../../src/rules/no-unsafe-call.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,gBAAgB,GAChB,WAAW,GACX,mBAAmB,CAAC;;AAExB,wBAuHG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js new file mode 100644 index 0000000..84fcbdf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js @@ -0,0 +1,131 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const tsutils = __importStar(require("ts-api-utils")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-unsafe-call', + meta: { + type: 'problem', + docs: { + description: 'Disallow calling a value with type `any`', + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + unsafeCall: 'Unsafe call of a(n) {{type}} typed value.', + unsafeCallThis: [ + 'Unsafe call of a(n) {{type}} typed value. `this` is typed as {{type}}.', + 'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.', + ].join('\n'), + unsafeNew: 'Unsafe construction of a(n) {{type}} typed value.', + unsafeTemplateTag: 'Unsafe use of a(n) {{type}} typed template tag.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const compilerOptions = services.program.getCompilerOptions(); + const isNoImplicitThis = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'noImplicitThis'); + function checkCall(node, reportingNode, messageId) { + const type = (0, util_1.getConstrainedTypeAtLocation)(services, node); + if ((0, util_1.isTypeAnyType)(type)) { + if (!isNoImplicitThis) { + // `this()` or `this.foo()` or `this.foo[bar]()` + const thisExpression = (0, util_1.getThisExpression)(node); + if (thisExpression && + (0, util_1.isTypeAnyType)((0, util_1.getConstrainedTypeAtLocation)(services, thisExpression))) { + messageId = 'unsafeCallThis'; + } + } + const isErrorType = tsutils.isIntrinsicErrorType(type); + context.report({ + node: reportingNode, + messageId, + data: { + type: isErrorType ? '`error` type' : '`any`', + }, + }); + return; + } + if ((0, util_1.isBuiltinSymbolLike)(services.program, type, 'Function')) { + // this also matches subtypes of `Function`, like `interface Foo extends Function {}`. + // + // For weird TS reasons that I don't understand, these are + // + // safe to construct if: + // - they have at least one call signature _that is not void-returning_, + // - OR they have at least one construct signature. + // + // safe to call (including as template) if: + // - they have at least one call signature + // - OR they have at least one construct signature. + const constructSignatures = type.getConstructSignatures(); + if (constructSignatures.length > 0) { + return; + } + const callSignatures = type.getCallSignatures(); + if (messageId === 'unsafeNew') { + if (callSignatures.some(signature => !tsutils.isIntrinsicVoidType(signature.getReturnType()))) { + return; + } + } + else if (callSignatures.length > 0) { + return; + } + context.report({ + node: reportingNode, + messageId, + data: { + type: '`Function`', + }, + }); + return; + } + } + return { + 'CallExpression > *.callee'(node) { + checkCall(node, node, 'unsafeCall'); + }, + NewExpression(node) { + checkCall(node.callee, node, 'unsafeNew'); + }, + 'TaggedTemplateExpression > *.tag'(node) { + checkCall(node, node, 'unsafeTemplateTag'); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.d.ts new file mode 100644 index 0000000..2a5073b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeMerging", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-unsafe-declaration-merging.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.d.ts.map new file mode 100644 index 0000000..dd91d4c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unsafe-declaration-merging.d.ts","sourceRoot":"","sources":["../../src/rules/no-unsafe-declaration-merging.ts"],"names":[],"mappings":";AAOA,wBAkEG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.js new file mode 100644 index 0000000..3dc1ac6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-unsafe-declaration-merging', + meta: { + type: 'problem', + docs: { + description: 'Disallow unsafe declaration merging', + recommended: 'recommended', + requiresTypeChecking: false, + }, + messages: { + unsafeMerging: 'Unsafe declaration merging between classes and interfaces.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + function checkUnsafeDeclaration(scope, node, unsafeKind) { + const variable = scope.set.get(node.name); + if (!variable) { + return; + } + const defs = variable.defs; + if (defs.length <= 1) { + return; + } + if (defs.some(def => def.node.type === unsafeKind)) { + context.report({ + node, + messageId: 'unsafeMerging', + }); + } + } + return { + ClassDeclaration(node) { + if (node.id) { + // by default eslint returns the inner class scope for the ClassDeclaration node + // but we want the outer scope within which merged variables will sit + const currentScope = context.sourceCode.getScope(node).upper; + if (currentScope == null) { + return; + } + checkUnsafeDeclaration(currentScope, node.id, utils_1.AST_NODE_TYPES.TSInterfaceDeclaration); + } + }, + TSInterfaceDeclaration(node) { + checkUnsafeDeclaration(context.sourceCode.getScope(node), node.id, utils_1.AST_NODE_TYPES.ClassDeclaration); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.d.ts new file mode 100644 index 0000000..367d379 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.d.ts @@ -0,0 +1,4 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule<"mismatchedCase" | "mismatchedCondition" | "replaceValueWithEnum", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=no-unsafe-enum-comparison.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.d.ts.map new file mode 100644 index 0000000..a89a270 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unsafe-enum-comparison.d.ts","sourceRoot":"","sources":["../../src/rules/no-unsafe-enum-comparison.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;;AAiEnE,wBAsJG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.js new file mode 100644 index 0000000..471db3f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.js @@ -0,0 +1,192 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const shared_1 = require("./enum-utils/shared"); +/** + * @returns Whether the right type is an unsafe comparison against any left type. + */ +function typeViolates(leftTypeParts, rightType) { + const leftEnumValueTypes = new Set(leftTypeParts.map(getEnumValueType)); + return ((leftEnumValueTypes.has(ts.TypeFlags.Number) && isNumberLike(rightType)) || + (leftEnumValueTypes.has(ts.TypeFlags.String) && isStringLike(rightType))); +} +function isNumberLike(type) { + return tsutils + .unionConstituents(type) + .every(unionPart => tsutils + .intersectionConstituents(unionPart) + .some(intersectionPart => tsutils.isTypeFlagSet(intersectionPart, ts.TypeFlags.Number | ts.TypeFlags.NumberLike))); +} +function isStringLike(type) { + return tsutils + .unionConstituents(type) + .every(unionPart => tsutils + .intersectionConstituents(unionPart) + .some(intersectionPart => tsutils.isTypeFlagSet(intersectionPart, ts.TypeFlags.String | ts.TypeFlags.StringLike))); +} +/** + * @returns What type a type's enum value is (number or string), if either. + */ +function getEnumValueType(type) { + return tsutils.isTypeFlagSet(type, ts.TypeFlags.EnumLike) + ? tsutils.isTypeFlagSet(type, ts.TypeFlags.NumberLiteral) + ? ts.TypeFlags.Number + : ts.TypeFlags.String + : undefined; +} +exports.default = (0, util_1.createRule)({ + name: 'no-unsafe-enum-comparison', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow comparing an enum value with a non-enum value', + recommended: 'recommended', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + mismatchedCase: 'The case statement does not have a shared enum type with the switch predicate.', + mismatchedCondition: 'The two values in this comparison do not have a shared enum type.', + replaceValueWithEnum: 'Replace with an enum value comparison.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const parserServices = (0, util_1.getParserServices)(context); + const typeChecker = parserServices.program.getTypeChecker(); + function isMismatchedComparison(leftType, rightType) { + // Allow comparisons that don't have anything to do with enums: + // + // ```ts + // 1 === 2; + // ``` + const leftEnumTypes = (0, shared_1.getEnumTypes)(typeChecker, leftType); + const rightEnumTypes = new Set((0, shared_1.getEnumTypes)(typeChecker, rightType)); + if (leftEnumTypes.length === 0 && rightEnumTypes.size === 0) { + return false; + } + // Allow comparisons that share an enum type: + // + // ```ts + // Fruit.Apple === Fruit.Banana; + // ``` + for (const leftEnumType of leftEnumTypes) { + if (rightEnumTypes.has(leftEnumType)) { + return false; + } + } + // We need to split the type into the union type parts in order to find + // valid enum comparisons like: + // + // ```ts + // declare const something: Fruit | Vegetable; + // something === Fruit.Apple; + // ``` + const leftTypeParts = tsutils.unionConstituents(leftType); + const rightTypeParts = tsutils.unionConstituents(rightType); + // If a type exists in both sides, we consider this comparison safe: + // + // ```ts + // declare const fruit: Fruit.Apple | 0; + // fruit === 0; + // ``` + for (const leftTypePart of leftTypeParts) { + if (rightTypeParts.includes(leftTypePart)) { + return false; + } + } + return (typeViolates(leftTypeParts, rightType) || + typeViolates(rightTypeParts, leftType)); + } + return { + 'BinaryExpression[operator=/^[<>!=]?={0,2}$/]'(node) { + const leftType = parserServices.getTypeAtLocation(node.left); + const rightType = parserServices.getTypeAtLocation(node.right); + if (isMismatchedComparison(leftType, rightType)) { + context.report({ + node, + messageId: 'mismatchedCondition', + suggest: [ + { + messageId: 'replaceValueWithEnum', + fix(fixer) { + // Replace the right side with an enum key if possible: + // + // ```ts + // Fruit.Apple === 'apple'; // Fruit.Apple === Fruit.Apple + // ``` + const leftEnumKey = (0, shared_1.getEnumKeyForLiteral)((0, shared_1.getEnumLiterals)(leftType), (0, util_1.getStaticValue)(node.right)?.value); + if (leftEnumKey) { + return fixer.replaceText(node.right, leftEnumKey); + } + // Replace the left side with an enum key if possible: + // + // ```ts + // declare const fruit: Fruit; + // 'apple' === Fruit.Apple; // Fruit.Apple === Fruit.Apple + // ``` + const rightEnumKey = (0, shared_1.getEnumKeyForLiteral)((0, shared_1.getEnumLiterals)(rightType), (0, util_1.getStaticValue)(node.left)?.value); + if (rightEnumKey) { + return fixer.replaceText(node.left, rightEnumKey); + } + return null; + }, + }, + ], + }); + } + }, + SwitchCase(node) { + // Ignore `default` cases. + if (node.test == null) { + return; + } + const { parent } = node; + const leftType = parserServices.getTypeAtLocation(parent.discriminant); + const rightType = parserServices.getTypeAtLocation(node.test); + if (isMismatchedComparison(leftType, rightType)) { + context.report({ + node, + messageId: 'mismatchedCase', + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-function-type.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-function-type.d.ts new file mode 100644 index 0000000..81b38d9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-function-type.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"bannedFunctionType", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-unsafe-function-type.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-function-type.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-function-type.d.ts.map new file mode 100644 index 0000000..804b42c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-function-type.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unsafe-function-type.d.ts","sourceRoot":"","sources":["../../src/rules/no-unsafe-function-type.ts"],"names":[],"mappings":";AAMA,wBA2CG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-function-type.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-function-type.js new file mode 100644 index 0000000..eb8209a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-function-type.js @@ -0,0 +1,45 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-unsafe-function-type', + meta: { + type: 'problem', + docs: { + description: 'Disallow using the unsafe built-in Function type', + recommended: 'recommended', + }, + messages: { + bannedFunctionType: [ + 'The `Function` type accepts any function-like value.', + 'Prefer explicitly defining any function parameters and return type.', + ].join('\n'), + }, + schema: [], + }, + defaultOptions: [], + create(context) { + function checkBannedTypes(node) { + if (node.type === utils_1.AST_NODE_TYPES.Identifier && + node.name === 'Function' && + (0, util_1.isReferenceToGlobalFunction)('Function', node, context.sourceCode)) { + context.report({ + node, + messageId: 'bannedFunctionType', + }); + } + } + return { + TSClassImplements(node) { + checkBannedTypes(node.expression); + }, + TSInterfaceHeritage(node) { + checkBannedTypes(node.expression); + }, + TSTypeReference(node) { + checkBannedTypes(node.typeName); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.d.ts new file mode 100644 index 0000000..ddfb066 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeComputedMemberAccess" | "unsafeMemberExpression" | "unsafeThisMemberExpression", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-unsafe-member-access.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.d.ts.map new file mode 100644 index 0000000..4d70e1a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unsafe-member-access.d.ts","sourceRoot":"","sources":["../../src/rules/no-unsafe-member-access.ts"],"names":[],"mappings":";AAwBA,wBAwHG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js new file mode 100644 index 0000000..e534cda --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js @@ -0,0 +1,141 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const util_1 = require("../util"); +var State; +(function (State) { + State[State["Unsafe"] = 1] = "Unsafe"; + State[State["Safe"] = 2] = "Safe"; +})(State || (State = {})); +function createDataType(type) { + const isErrorType = tsutils.isIntrinsicErrorType(type); + return isErrorType ? '`error` typed' : '`any`'; +} +exports.default = (0, util_1.createRule)({ + name: 'no-unsafe-member-access', + meta: { + type: 'problem', + docs: { + description: 'Disallow member access on a value with type `any`', + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + unsafeComputedMemberAccess: 'Computed name {{property}} resolves to an {{type}} value.', + unsafeMemberExpression: 'Unsafe member access {{property}} on an {{type}} value.', + unsafeThisMemberExpression: [ + 'Unsafe member access {{property}} on an `any` value. `this` is typed as `any`.', + 'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.', + ].join('\n'), + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const compilerOptions = services.program.getCompilerOptions(); + const isNoImplicitThis = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'noImplicitThis'); + const stateCache = new Map(); + function checkMemberExpression(node) { + const cachedState = stateCache.get(node); + if (cachedState) { + return cachedState; + } + if (node.object.type === utils_1.AST_NODE_TYPES.MemberExpression) { + const objectState = checkMemberExpression(node.object); + if (objectState === State.Unsafe) { + // if the object is unsafe, we know this will be unsafe as well + // we don't need to report, as we have already reported on the inner member expr + stateCache.set(node, objectState); + return objectState; + } + } + const type = services.getTypeAtLocation(node.object); + const state = (0, util_1.isTypeAnyType)(type) ? State.Unsafe : State.Safe; + stateCache.set(node, state); + if (state === State.Unsafe) { + const propertyName = context.sourceCode.getText(node.property); + let messageId = 'unsafeMemberExpression'; + if (!isNoImplicitThis) { + // `this.foo` or `this.foo[bar]` + const thisExpression = (0, util_1.getThisExpression)(node); + if (thisExpression && + (0, util_1.isTypeAnyType)((0, util_1.getConstrainedTypeAtLocation)(services, thisExpression))) { + messageId = 'unsafeThisMemberExpression'; + } + } + context.report({ + node: node.property, + messageId, + data: { + type: createDataType(type), + property: node.computed ? `[${propertyName}]` : `.${propertyName}`, + }, + }); + } + return state; + } + return { + // ignore MemberExpressions with ancestors of type `TSClassImplements` or `TSInterfaceHeritage` + 'MemberExpression:not(TSClassImplements MemberExpression, TSInterfaceHeritage MemberExpression)': checkMemberExpression, + 'MemberExpression[computed = true] > *.property'(node) { + if ( + // x[1] + node.type === utils_1.AST_NODE_TYPES.Literal || + // x[1++] x[++x] etc + // FUN FACT - **all** update expressions return type number, regardless of the argument's type, + // because JS engines return NaN if there the argument is not a number. + node.type === utils_1.AST_NODE_TYPES.UpdateExpression) { + // perf optimizations - literals can obviously never be `any` + return; + } + const type = services.getTypeAtLocation(node); + if ((0, util_1.isTypeAnyType)(type)) { + const propertyName = context.sourceCode.getText(node); + context.report({ + node, + messageId: 'unsafeComputedMemberAccess', + data: { + type: createDataType(type), + property: `[${propertyName}]`, + }, + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.d.ts new file mode 100644 index 0000000..abcfafb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeReturn" | "unsafeReturnAssignment" | "unsafeReturnThis", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-unsafe-return.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.d.ts.map new file mode 100644 index 0000000..98241f1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unsafe-return.d.ts","sourceRoot":"","sources":["../../src/rules/no-unsafe-return.ts"],"names":[],"mappings":";AAqBA,wBAsMG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js new file mode 100644 index 0000000..7c188a0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js @@ -0,0 +1,183 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const getParentFunctionNode_1 = require("../util/getParentFunctionNode"); +exports.default = (0, util_1.createRule)({ + name: 'no-unsafe-return', + meta: { + type: 'problem', + docs: { + description: 'Disallow returning a value with type `any` from a function', + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + unsafeReturn: 'Unsafe return of a value of type {{type}}.', + unsafeReturnAssignment: 'Unsafe return of type `{{sender}}` from function with return type `{{receiver}}`.', + unsafeReturnThis: [ + 'Unsafe return of a value of type `{{type}}`. `this` is typed as `any`.', + 'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.', + ].join('\n'), + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const compilerOptions = services.program.getCompilerOptions(); + const isNoImplicitThis = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'noImplicitThis'); + function checkReturn(returnNode, reportingNode = returnNode) { + const tsNode = services.esTreeNodeToTSNodeMap.get(returnNode); + const type = checker.getTypeAtLocation(tsNode); + const anyType = (0, util_1.discriminateAnyType)(type, checker, services.program, tsNode); + const functionNode = (0, getParentFunctionNode_1.getParentFunctionNode)(returnNode); + /* istanbul ignore if */ if (!functionNode) { + return; + } + // function has an explicit return type, so ensure it's a safe return + const returnNodeType = (0, util_1.getConstrainedTypeAtLocation)(services, returnNode); + const functionTSNode = services.esTreeNodeToTSNodeMap.get(functionNode); + // function expressions will not have their return type modified based on receiver typing + // so we have to use the contextual typing in these cases, i.e. + // const foo1: () => Set = () => new Set(); + // the return type of the arrow function is Set even though the variable is typed as Set + let functionType = ts.isFunctionExpression(functionTSNode) || + ts.isArrowFunction(functionTSNode) + ? (0, util_1.getContextualType)(checker, functionTSNode) + : services.getTypeAtLocation(functionNode); + functionType ??= services.getTypeAtLocation(functionNode); + const callSignatures = tsutils.getCallSignaturesOfType(functionType); + // If there is an explicit type annotation *and* that type matches the actual + // function return type, we shouldn't complain (it's intentional, even if unsafe) + if (functionTSNode.type) { + for (const signature of callSignatures) { + const signatureReturnType = signature.getReturnType(); + if (returnNodeType === signatureReturnType || + (0, util_1.isTypeFlagSet)(signatureReturnType, ts.TypeFlags.Any | ts.TypeFlags.Unknown)) { + return; + } + if (functionNode.async) { + const awaitedSignatureReturnType = checker.getAwaitedType(signatureReturnType); + const awaitedReturnNodeType = checker.getAwaitedType(returnNodeType); + if (awaitedReturnNodeType === awaitedSignatureReturnType || + (awaitedSignatureReturnType && + (0, util_1.isTypeFlagSet)(awaitedSignatureReturnType, ts.TypeFlags.Any | ts.TypeFlags.Unknown))) { + return; + } + } + } + } + if (anyType !== util_1.AnyType.Safe) { + // Allow cases when the declared return type of the function is either unknown or unknown[] + // and the function is returning any or any[]. + for (const signature of callSignatures) { + const functionReturnType = signature.getReturnType(); + if (anyType === util_1.AnyType.Any && + (0, util_1.isTypeUnknownType)(functionReturnType)) { + return; + } + if (anyType === util_1.AnyType.AnyArray && + (0, util_1.isTypeUnknownArrayType)(functionReturnType, checker)) { + return; + } + const awaitedType = checker.getAwaitedType(functionReturnType); + if (awaitedType && + anyType === util_1.AnyType.PromiseAny && + (0, util_1.isTypeUnknownType)(awaitedType)) { + return; + } + } + if (anyType === util_1.AnyType.PromiseAny && !functionNode.async) { + return; + } + let messageId = 'unsafeReturn'; + const isErrorType = tsutils.isIntrinsicErrorType(returnNodeType); + if (!isNoImplicitThis) { + // `return this` + const thisExpression = (0, util_1.getThisExpression)(returnNode); + if (thisExpression && + (0, util_1.isTypeAnyType)((0, util_1.getConstrainedTypeAtLocation)(services, thisExpression))) { + messageId = 'unsafeReturnThis'; + } + } + // If the function return type was not unknown/unknown[], mark usage as unsafeReturn. + return context.report({ + node: reportingNode, + messageId, + data: { + type: isErrorType + ? 'error' + : anyType === util_1.AnyType.Any + ? '`any`' + : anyType === util_1.AnyType.PromiseAny + ? '`Promise`' + : '`any[]`', + }, + }); + } + const signature = functionType.getCallSignatures().at(0); + if (signature) { + const functionReturnType = signature.getReturnType(); + const result = (0, util_1.isUnsafeAssignment)(returnNodeType, functionReturnType, checker, returnNode); + if (!result) { + return; + } + const { receiver, sender } = result; + return context.report({ + node: reportingNode, + messageId: 'unsafeReturnAssignment', + data: { + receiver: checker.typeToString(receiver), + sender: checker.typeToString(sender), + }, + }); + } + } + return { + 'ArrowFunctionExpression > :not(BlockStatement).body': checkReturn, + ReturnStatement(node) { + const argument = node.argument; + if (!argument) { + return; + } + checkReturn(argument, node); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-type-assertion.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-type-assertion.d.ts new file mode 100644 index 0000000..a1a8b0e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-type-assertion.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeOfAnyTypeAssertion" | "unsafeToAnyTypeAssertion" | "unsafeToUnconstrainedTypeAssertion" | "unsafeTypeAssertion" | "unsafeTypeAssertionAssignableToConstraint", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-unsafe-type-assertion.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-type-assertion.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-type-assertion.d.ts.map new file mode 100644 index 0000000..c0912d5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-type-assertion.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unsafe-type-assertion.d.ts","sourceRoot":"","sources":["../../src/rules/no-unsafe-type-assertion.ts"],"names":[],"mappings":";AAaA,wBAqKG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-type-assertion.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-type-assertion.js new file mode 100644 index 0000000..3c9fba5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-type-assertion.js @@ -0,0 +1,158 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-unsafe-type-assertion', + meta: { + type: 'problem', + docs: { + description: 'Disallow type assertions that narrow a type', + requiresTypeChecking: true, + }, + messages: { + unsafeOfAnyTypeAssertion: 'Unsafe assertion from {{type}} detected: consider using type guards or a safer assertion.', + unsafeToAnyTypeAssertion: 'Unsafe assertion to {{type}} detected: consider using a more specific type to ensure safety.', + unsafeToUnconstrainedTypeAssertion: "Unsafe type assertion: '{{type}}' could be instantiated with an arbitrary type which could be unrelated to the original type.", + unsafeTypeAssertion: "Unsafe type assertion: type '{{type}}' is more narrow than the original type.", + unsafeTypeAssertionAssignableToConstraint: "Unsafe type assertion: the original type is assignable to the constraint of type '{{type}}', but '{{type}}' could be instantiated with a different subtype of its constraint.", + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + function getAnyTypeName(type) { + return tsutils.isIntrinsicErrorType(type) ? 'error typed' : '`any`'; + } + function isObjectLiteralType(type) { + return (tsutils.isObjectType(type) && + tsutils.isObjectFlagSet(type, ts.ObjectFlags.ObjectLiteral)); + } + function checkExpression(node) { + const expressionType = services.getTypeAtLocation(node.expression); + const assertedType = services.getTypeAtLocation(node.typeAnnotation); + if (expressionType === assertedType) { + return; + } + // handle cases when asserting unknown ==> any. + if ((0, util_1.isTypeAnyType)(assertedType) && (0, util_1.isTypeUnknownType)(expressionType)) { + context.report({ + node, + messageId: 'unsafeToAnyTypeAssertion', + data: { + type: '`any`', + }, + }); + return; + } + const unsafeExpressionAny = (0, util_1.isUnsafeAssignment)(expressionType, assertedType, checker, node.expression); + if (unsafeExpressionAny) { + context.report({ + node, + messageId: 'unsafeOfAnyTypeAssertion', + data: { + type: getAnyTypeName(unsafeExpressionAny.sender), + }, + }); + return; + } + const unsafeAssertedAny = (0, util_1.isUnsafeAssignment)(assertedType, expressionType, checker, node.typeAnnotation); + if (unsafeAssertedAny) { + context.report({ + node, + messageId: 'unsafeToAnyTypeAssertion', + data: { + type: getAnyTypeName(unsafeAssertedAny.sender), + }, + }); + return; + } + // Use the widened type in case of an object literal so `isTypeAssignableTo()` + // won't fail on excess property check. + const expressionWidenedType = isObjectLiteralType(expressionType) + ? checker.getWidenedType(expressionType) + : expressionType; + const isAssertionSafe = checker.isTypeAssignableTo(expressionWidenedType, assertedType); + if (isAssertionSafe) { + return; + } + // Produce a more specific error message when targeting a type parameter + if (tsutils.isTypeParameter(assertedType)) { + const assertedTypeConstraint = checker.getBaseConstraintOfType(assertedType); + if (!assertedTypeConstraint) { + // asserting to an unconstrained type parameter is unsafe + context.report({ + node, + messageId: 'unsafeToUnconstrainedTypeAssertion', + data: { + type: checker.typeToString(assertedType), + }, + }); + return; + } + // special case message if the original type is assignable to the + // constraint of the target type parameter + const isAssignableToConstraint = checker.isTypeAssignableTo(expressionWidenedType, assertedTypeConstraint); + if (isAssignableToConstraint) { + context.report({ + node, + messageId: 'unsafeTypeAssertionAssignableToConstraint', + data: { + type: checker.typeToString(assertedType), + }, + }); + return; + } + } + // General error message + context.report({ + node, + messageId: 'unsafeTypeAssertion', + data: { + type: checker.typeToString(assertedType), + }, + }); + } + return { + 'TSAsExpression, TSTypeAssertion'(node) { + checkExpression(node); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-unary-minus.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-unary-minus.d.ts new file mode 100644 index 0000000..375e64c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-unary-minus.d.ts @@ -0,0 +1,5 @@ +export type Options = []; +export type MessageIds = 'unaryMinus'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unaryMinus", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-unsafe-unary-minus.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-unary-minus.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-unary-minus.d.ts.map new file mode 100644 index 0000000..1ef9b5b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-unary-minus.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unsafe-unary-minus.d.ts","sourceRoot":"","sources":["../../src/rules/no-unsafe-unary-minus.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC;;AAEtC,wBAmDG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-unary-minus.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-unary-minus.js new file mode 100644 index 0000000..6bbd582 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-unary-minus.js @@ -0,0 +1,78 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util = __importStar(require("../util")); +exports.default = util.createRule({ + name: 'no-unsafe-unary-minus', + meta: { + type: 'problem', + docs: { + description: 'Require unary negation to take a number', + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + unaryMinus: 'Argument of unary negation should be assignable to number | bigint but is {{type}} instead.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + return { + UnaryExpression(node) { + if (node.operator !== '-') { + return; + } + const services = util.getParserServices(context); + const argType = util.getConstrainedTypeAtLocation(services, node.argument); + const checker = services.program.getTypeChecker(); + if (tsutils + .unionConstituents(argType) + .some(type => !tsutils.isTypeFlagSet(type, ts.TypeFlags.Any | + ts.TypeFlags.Never | + ts.TypeFlags.BigIntLike | + ts.TypeFlags.NumberLike))) { + context.report({ + node, + messageId: 'unaryMinus', + data: { type: checker.typeToString(argType) }, + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.d.ts new file mode 100644 index 0000000..4d09f78 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.d.ts @@ -0,0 +1,18 @@ +import { TSESTree } from '@typescript-eslint/utils'; +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unusedExpression", [{ + allowShortCircuit?: boolean; + allowTaggedTemplates?: boolean; + allowTernary?: boolean; +}], unknown, { + ExpressionStatement(node: TSESTree.ExpressionStatement): void; +}>; +export type MessageIds = InferMessageIdsTypeFromRule; +export type Options = InferOptionsTypeFromRule; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unusedExpression", [{ + allowShortCircuit?: boolean; + allowTaggedTemplates?: boolean; + allowTernary?: boolean; +}], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-unused-expressions.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.d.ts.map new file mode 100644 index 0000000..bc8d2df --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unused-expressions.d.ts","sourceRoot":"","sources":["../../src/rules/no-unused-expressions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpE,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAKjB,QAAA,MAAM,QAAQ;;;;;;EAA6C,CAAC;AAE5D,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC,OAAO,QAAQ,CAAC,CAAC;AACtE,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;;;;;;AAUhE,wBA6DG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js new file mode 100644 index 0000000..d1244f0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js @@ -0,0 +1,64 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-unused-expressions'); +const defaultOptions = [ + { + allowShortCircuit: false, + allowTaggedTemplates: false, + allowTernary: false, + }, +]; +exports.default = (0, util_1.createRule)({ + name: 'no-unused-expressions', + meta: { + type: 'suggestion', + defaultOptions, + docs: { + description: 'Disallow unused expressions', + extendsBaseRule: true, + recommended: 'recommended', + }, + hasSuggestions: baseRule.meta.hasSuggestions, + messages: baseRule.meta.messages, + schema: baseRule.meta.schema, + }, + defaultOptions, + create(context, [{ allowShortCircuit = false, allowTernary = false }]) { + const rules = baseRule.create(context); + function isValidExpression(node) { + if (allowShortCircuit && node.type === utils_1.AST_NODE_TYPES.LogicalExpression) { + return isValidExpression(node.right); + } + if (allowTernary && node.type === utils_1.AST_NODE_TYPES.ConditionalExpression) { + return (isValidExpression(node.alternate) && + isValidExpression(node.consequent)); + } + return ((node.type === utils_1.AST_NODE_TYPES.ChainExpression && + node.expression.type === utils_1.AST_NODE_TYPES.CallExpression) || + node.type === utils_1.AST_NODE_TYPES.ImportExpression); + } + return { + ExpressionStatement(node) { + if (node.directive || isValidExpression(node.expression)) { + return; + } + const expressionType = node.expression.type; + if (expressionType === + utils_1.TSESTree.AST_NODE_TYPES.TSInstantiationExpression || + expressionType === utils_1.TSESTree.AST_NODE_TYPES.TSAsExpression || + expressionType === utils_1.TSESTree.AST_NODE_TYPES.TSNonNullExpression || + expressionType === utils_1.TSESTree.AST_NODE_TYPES.TSTypeAssertion) { + rules.ExpressionStatement({ + ...node, + expression: node.expression.expression, + }); + return; + } + rules.ExpressionStatement(node); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.d.ts new file mode 100644 index 0000000..272ea06 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.d.ts @@ -0,0 +1,19 @@ +import { TSESLint } from '@typescript-eslint/utils'; +export type MessageIds = 'unusedVar' | 'usedIgnoredVar' | 'usedOnlyAsType'; +export type Options = [ + 'all' | 'local' | { + args?: 'after-used' | 'all' | 'none'; + argsIgnorePattern?: string; + caughtErrors?: 'all' | 'none'; + caughtErrorsIgnorePattern?: string; + destructuredArrayIgnorePattern?: string; + ignoreClassWithStaticInitBlock?: boolean; + ignoreRestSiblings?: boolean; + reportUsedIgnorePattern?: boolean; + vars?: 'all' | 'local'; + varsIgnorePattern?: string; + } +]; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=no-unused-vars.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.d.ts.map new file mode 100644 index 0000000..dc3a936 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-unused-vars.d.ts","sourceRoot":"","sources":["../../src/rules/no-unused-vars.ts"],"names":[],"mappings":"AAUA,OAAO,EAAkB,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAepE,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAC3E,MAAM,MAAM,OAAO,GAAG;IAClB,KAAK,GACL,OAAO,GACP;QACE,IAAI,CAAC,EAAE,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC;QACrC,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,YAAY,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;QAC9B,yBAAyB,CAAC,EAAE,MAAM,CAAC;QACnC,8BAA8B,CAAC,EAAE,MAAM,CAAC;QACxC,8BAA8B,CAAC,EAAE,OAAO,CAAC;QACzC,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,uBAAuB,CAAC,EAAE,OAAO,CAAC;QAClC,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;QACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B;CACJ,CAAC;;AA0BF,wBAuuBG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js new file mode 100644 index 0000000..f5ea6e3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js @@ -0,0 +1,668 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const scope_manager_1 = require("@typescript-eslint/scope-manager"); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const referenceContainsTypeQuery_1 = require("../util/referenceContainsTypeQuery"); +exports.default = (0, util_1.createRule)({ + name: 'no-unused-vars', + meta: { + type: 'problem', + docs: { + description: 'Disallow unused variables', + extendsBaseRule: true, + recommended: 'recommended', + }, + messages: { + unusedVar: "'{{varName}}' is {{action}} but never used{{additional}}.", + usedIgnoredVar: "'{{varName}}' is marked as ignored but is used{{additional}}.", + usedOnlyAsType: "'{{varName}}' is {{action}} but only used as a type{{additional}}.", + }, + schema: [ + { + oneOf: [ + { + type: 'string', + enum: ['all', 'local'], + }, + { + type: 'object', + additionalProperties: false, + properties: { + args: { + type: 'string', + description: 'Whether to check all, some, or no arguments.', + enum: ['all', 'after-used', 'none'], + }, + argsIgnorePattern: { + type: 'string', + description: 'Regular expressions of argument names to not check for usage.', + }, + caughtErrors: { + type: 'string', + description: 'Whether to check catch block arguments.', + enum: ['all', 'none'], + }, + caughtErrorsIgnorePattern: { + type: 'string', + description: 'Regular expressions of catch block argument names to not check for usage.', + }, + destructuredArrayIgnorePattern: { + type: 'string', + description: 'Regular expressions of destructured array variable names to not check for usage.', + }, + ignoreClassWithStaticInitBlock: { + type: 'boolean', + description: 'Whether to ignore classes with at least one static initialization block.', + }, + ignoreRestSiblings: { + type: 'boolean', + description: 'Whether to ignore sibling properties in `...` destructurings.', + }, + reportUsedIgnorePattern: { + type: 'boolean', + description: 'Whether to report variables that match any of the valid ignore pattern options if they have been used.', + }, + vars: { + type: 'string', + description: 'Whether to check all variables or only locally-declared variables.', + enum: ['all', 'local'], + }, + varsIgnorePattern: { + type: 'string', + description: 'Regular expressions of variable names to not check for usage.', + }, + }, + }, + ], + }, + ], + }, + defaultOptions: [{}], + create(context, [firstOption]) { + const MODULE_DECL_CACHE = new Map(); + const options = (() => { + const options = { + args: 'after-used', + caughtErrors: 'all', + ignoreClassWithStaticInitBlock: false, + ignoreRestSiblings: false, + reportUsedIgnorePattern: false, + vars: 'all', + }; + if (typeof firstOption === 'string') { + options.vars = firstOption; + } + else { + options.vars = firstOption.vars ?? options.vars; + options.args = firstOption.args ?? options.args; + options.ignoreRestSiblings = + firstOption.ignoreRestSiblings ?? options.ignoreRestSiblings; + options.caughtErrors = firstOption.caughtErrors ?? options.caughtErrors; + options.ignoreClassWithStaticInitBlock = + firstOption.ignoreClassWithStaticInitBlock ?? + options.ignoreClassWithStaticInitBlock; + options.reportUsedIgnorePattern = + firstOption.reportUsedIgnorePattern ?? + options.reportUsedIgnorePattern; + if (firstOption.varsIgnorePattern) { + options.varsIgnorePattern = new RegExp(firstOption.varsIgnorePattern, 'u'); + } + if (firstOption.argsIgnorePattern) { + options.argsIgnorePattern = new RegExp(firstOption.argsIgnorePattern, 'u'); + } + if (firstOption.caughtErrorsIgnorePattern) { + options.caughtErrorsIgnorePattern = new RegExp(firstOption.caughtErrorsIgnorePattern, 'u'); + } + if (firstOption.destructuredArrayIgnorePattern) { + options.destructuredArrayIgnorePattern = new RegExp(firstOption.destructuredArrayIgnorePattern, 'u'); + } + } + return options; + })(); + /** + * Determines what variable type a def is. + * @param def the declaration to check + * @returns a simple name for the types of variables that this rule supports + */ + function defToVariableType(def) { + /* + * This `destructuredArrayIgnorePattern` error report works differently from the catch + * clause and parameter error reports. _Both_ the `varsIgnorePattern` and the + * `destructuredArrayIgnorePattern` will be checked for array destructuring. However, + * for the purposes of the report, the currently defined behavior is to only inform the + * user of the `destructuredArrayIgnorePattern` if it's present (regardless of the fact + * that the `varsIgnorePattern` would also apply). If it's not present, the user will be + * informed of the `varsIgnorePattern`, assuming that's present. + */ + if (options.destructuredArrayIgnorePattern && + def.name.parent.type === utils_1.AST_NODE_TYPES.ArrayPattern) { + return 'array-destructure'; + } + switch (def.type) { + case scope_manager_1.DefinitionType.CatchClause: + return 'catch-clause'; + case scope_manager_1.DefinitionType.Parameter: + return 'parameter'; + default: + return 'variable'; + } + } + /** + * Gets a given variable's description and configured ignore pattern + * based on the provided variableType + * @param variableType a simple name for the types of variables that this rule supports + * @returns the given variable's description and + * ignore pattern + */ + function getVariableDescription(variableType) { + switch (variableType) { + case 'array-destructure': + return { + pattern: options.destructuredArrayIgnorePattern?.toString(), + variableDescription: 'elements of array destructuring', + }; + case 'catch-clause': + return { + pattern: options.caughtErrorsIgnorePattern?.toString(), + variableDescription: 'caught errors', + }; + case 'parameter': + return { + pattern: options.argsIgnorePattern?.toString(), + variableDescription: 'args', + }; + case 'variable': + return { + pattern: options.varsIgnorePattern?.toString(), + variableDescription: 'vars', + }; + } + } + /** + * Generates the message data about the variable being defined and unused, + * including the ignore pattern if configured. + * @param unusedVar eslint-scope variable object. + * @returns The message data to be used with this unused variable. + */ + function getDefinedMessageData(unusedVar) { + const def = unusedVar.defs.at(0); + let additionalMessageData = ''; + if (def) { + const { pattern, variableDescription } = getVariableDescription(defToVariableType(def)); + if (pattern && variableDescription) { + additionalMessageData = `. Allowed unused ${variableDescription} must match ${pattern}`; + } + } + return { + action: 'defined', + additional: additionalMessageData, + varName: unusedVar.name, + }; + } + /** + * Generate the warning message about the variable being + * assigned and unused, including the ignore pattern if configured. + * @param unusedVar eslint-scope variable object. + * @returns The message data to be used with this unused variable. + */ + function getAssignedMessageData(unusedVar) { + const def = unusedVar.defs.at(0); + let additionalMessageData = ''; + if (def) { + const { pattern, variableDescription } = getVariableDescription(defToVariableType(def)); + if (pattern && variableDescription) { + additionalMessageData = `. Allowed unused ${variableDescription} must match ${pattern}`; + } + } + return { + action: 'assigned a value', + additional: additionalMessageData, + varName: unusedVar.name, + }; + } + /** + * Generate the warning message about a variable being used even though + * it is marked as being ignored. + * @param variable eslint-scope variable object + * @param variableType a simple name for the types of variables that this rule supports + * @returns The message data to be used with this used ignored variable. + */ + function getUsedIgnoredMessageData(variable, variableType) { + const { pattern, variableDescription } = getVariableDescription(variableType); + let additionalMessageData = ''; + if (pattern && variableDescription) { + additionalMessageData = `. Used ${variableDescription} must not match ${pattern}`; + } + return { + additional: additionalMessageData, + varName: variable.name, + }; + } + function collectUnusedVariables() { + /** + * Checks whether a node is a sibling of the rest property or not. + * @param node a node to check + * @returns True if the node is a sibling of the rest property, otherwise false. + */ + function hasRestSibling(node) { + return (node.type === utils_1.AST_NODE_TYPES.Property && + node.parent.type === utils_1.AST_NODE_TYPES.ObjectPattern && + node.parent.properties[node.parent.properties.length - 1].type === + utils_1.AST_NODE_TYPES.RestElement); + } + /** + * Determines if a variable has a sibling rest property + * @param variable eslint-scope variable object. + * @returns True if the variable is exported, false if not. + */ + function hasRestSpreadSibling(variable) { + if (options.ignoreRestSiblings) { + const hasRestSiblingDefinition = variable.defs.some(def => hasRestSibling(def.name.parent)); + const hasRestSiblingReference = variable.references.some(ref => hasRestSibling(ref.identifier.parent)); + return hasRestSiblingDefinition || hasRestSiblingReference; + } + return false; + } + /** + * Checks whether the given variable is after the last used parameter. + * @param variable The variable to check. + * @returns `true` if the variable is defined after the last used parameter. + */ + function isAfterLastUsedArg(variable) { + const def = variable.defs[0]; + const params = context.sourceCode.getDeclaredVariables(def.node); + const posteriorParams = params.slice(params.indexOf(variable) + 1); + // If any used parameters occur after this parameter, do not report. + return !posteriorParams.some(v => v.references.length > 0 || v.eslintUsed); + } + const analysisResults = (0, util_1.collectVariables)(context); + const variables = [ + ...Array.from(analysisResults.unusedVariables, variable => ({ + used: false, + variable, + })), + ...Array.from(analysisResults.usedVariables, variable => ({ + used: true, + variable, + })), + ]; + const unusedVariablesReturn = []; + for (const { used, variable } of variables) { + // explicit global variables don't have definitions. + if (variable.defs.length === 0) { + if (!used) { + unusedVariablesReturn.push(variable); + } + continue; + } + const def = variable.defs[0]; + if (variable.scope.type === utils_1.TSESLint.Scope.ScopeType.global && + options.vars === 'local') { + // skip variables in the global scope if configured to + continue; + } + const refUsedInArrayPatterns = variable.references.some(ref => ref.identifier.parent.type === utils_1.AST_NODE_TYPES.ArrayPattern); + // skip elements of array destructuring patterns + if ((def.name.parent.type === utils_1.AST_NODE_TYPES.ArrayPattern || + refUsedInArrayPatterns) && + def.name.type === utils_1.AST_NODE_TYPES.Identifier && + options.destructuredArrayIgnorePattern?.test(def.name.name)) { + if (options.reportUsedIgnorePattern && used) { + context.report({ + node: def.name, + messageId: 'usedIgnoredVar', + data: getUsedIgnoredMessageData(variable, 'array-destructure'), + }); + } + continue; + } + if (def.type === utils_1.TSESLint.Scope.DefinitionType.ClassName) { + const hasStaticBlock = def.node.body.body.some(node => node.type === utils_1.AST_NODE_TYPES.StaticBlock); + if (options.ignoreClassWithStaticInitBlock && hasStaticBlock) { + continue; + } + } + // skip catch variables + if (def.type === utils_1.TSESLint.Scope.DefinitionType.CatchClause) { + if (options.caughtErrors === 'none') { + continue; + } + // skip ignored parameters + if (def.name.type === utils_1.AST_NODE_TYPES.Identifier && + options.caughtErrorsIgnorePattern?.test(def.name.name)) { + if (options.reportUsedIgnorePattern && used) { + context.report({ + node: def.name, + messageId: 'usedIgnoredVar', + data: getUsedIgnoredMessageData(variable, 'catch-clause'), + }); + } + continue; + } + } + else if (def.type === utils_1.TSESLint.Scope.DefinitionType.Parameter) { + // if "args" option is "none", skip any parameter + if (options.args === 'none') { + continue; + } + // skip ignored parameters + if (def.name.type === utils_1.AST_NODE_TYPES.Identifier && + options.argsIgnorePattern?.test(def.name.name)) { + if (options.reportUsedIgnorePattern && used) { + context.report({ + node: def.name, + messageId: 'usedIgnoredVar', + data: getUsedIgnoredMessageData(variable, 'parameter'), + }); + } + continue; + } + // if "args" option is "after-used", skip used variables + if (options.args === 'after-used' && + (0, util_1.isFunction)(def.name.parent) && + !isAfterLastUsedArg(variable)) { + continue; + } + } + // skip ignored variables + else if (def.name.type === utils_1.AST_NODE_TYPES.Identifier && + options.varsIgnorePattern?.test(def.name.name)) { + if (options.reportUsedIgnorePattern && + used && + /* enum members are always marked as 'used' by `collectVariables`, but in reality they may be used or + unused. either way, don't complain about their naming. */ + def.type !== utils_1.TSESLint.Scope.DefinitionType.TSEnumMember) { + context.report({ + node: def.name, + messageId: 'usedIgnoredVar', + data: getUsedIgnoredMessageData(variable, 'variable'), + }); + } + continue; + } + if (hasRestSpreadSibling(variable)) { + continue; + } + // in case another rule has run and used the collectUnusedVariables, + // we want to ensure our selectors that marked variables as used are respected + if (variable.eslintUsed) { + continue; + } + if (!used) { + unusedVariablesReturn.push(variable); + } + } + return unusedVariablesReturn; + } + return { + // top-level declaration file handling + [ambientDeclarationSelector(utils_1.AST_NODE_TYPES.Program)](node) { + if (!(0, util_1.isDefinitionFile)(context.filename)) { + return; + } + const moduleDecl = (0, util_1.nullThrows)(node.parent, util_1.NullThrowsReasons.MissingParent); + if (checkForOverridingExportStatements(moduleDecl)) { + return; + } + markDeclarationChildAsUsed(node); + }, + // children of a namespace that is a child of a declared namespace are auto-exported + [ambientDeclarationSelector('TSModuleDeclaration[declare = true] > TSModuleBlock TSModuleDeclaration > TSModuleBlock')](node) { + const moduleDecl = (0, util_1.nullThrows)(node.parent.parent, util_1.NullThrowsReasons.MissingParent); + if (checkForOverridingExportStatements(moduleDecl)) { + return; + } + markDeclarationChildAsUsed(node); + }, + // declared namespace handling + [ambientDeclarationSelector('TSModuleDeclaration[declare = true] > TSModuleBlock')](node) { + const moduleDecl = (0, util_1.nullThrows)(node.parent.parent, util_1.NullThrowsReasons.MissingParent); + if (checkForOverridingExportStatements(moduleDecl)) { + return; + } + markDeclarationChildAsUsed(node); + }, + // namespace handling in definition files + [ambientDeclarationSelector('TSModuleDeclaration > TSModuleBlock')](node) { + if (!(0, util_1.isDefinitionFile)(context.filename)) { + return; + } + const moduleDecl = (0, util_1.nullThrows)(node.parent.parent, util_1.NullThrowsReasons.MissingParent); + if (checkForOverridingExportStatements(moduleDecl)) { + return; + } + markDeclarationChildAsUsed(node); + }, + // collect + 'Program:exit'(programNode) { + const unusedVars = collectUnusedVariables(); + for (const unusedVar of unusedVars) { + // Report the first declaration. + if (unusedVar.defs.length > 0) { + const usedOnlyAsType = unusedVar.references.some(ref => (0, referenceContainsTypeQuery_1.referenceContainsTypeQuery)(ref.identifier)); + const isImportUsedOnlyAsType = usedOnlyAsType && + unusedVar.defs.some(def => def.type === scope_manager_1.DefinitionType.ImportBinding); + if (isImportUsedOnlyAsType) { + continue; + } + const writeReferences = unusedVar.references.filter(ref => ref.isWrite() && + ref.from.variableScope === unusedVar.scope.variableScope); + const id = writeReferences.length + ? writeReferences[writeReferences.length - 1].identifier + : unusedVar.identifiers[0]; + const messageId = usedOnlyAsType ? 'usedOnlyAsType' : 'unusedVar'; + const { start } = id.loc; + const idLength = id.name.length; + const loc = { + start, + end: { + column: start.column + idLength, + line: start.line, + }, + }; + context.report({ + loc, + messageId, + data: unusedVar.references.some(ref => ref.isWrite()) + ? getAssignedMessageData(unusedVar) + : getDefinedMessageData(unusedVar), + }); + // If there are no regular declaration, report the first `/*globals*/` comment directive. + } + else if ('eslintExplicitGlobalComments' in unusedVar && + unusedVar.eslintExplicitGlobalComments) { + const directiveComment = unusedVar.eslintExplicitGlobalComments[0]; + context.report({ + loc: (0, util_1.getNameLocationInGlobalDirectiveComment)(context.sourceCode, directiveComment, unusedVar.name), + node: programNode, + messageId: 'unusedVar', + data: getDefinedMessageData(unusedVar), + }); + } + } + }, + }; + function checkForOverridingExportStatements(node) { + const cached = MODULE_DECL_CACHE.get(node); + if (cached != null) { + return cached; + } + const body = getStatementsOfNode(node); + if (hasOverridingExportStatement(body)) { + MODULE_DECL_CACHE.set(node, true); + return true; + } + MODULE_DECL_CACHE.set(node, false); + return false; + } + function ambientDeclarationSelector(parent) { + return [ + // Types are ambiently exported + `${parent} > :matches(${[ + utils_1.AST_NODE_TYPES.TSInterfaceDeclaration, + utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration, + ].join(', ')})`, + // Value things are ambiently exported if they are "declare"d + `${parent} > :matches(${[ + utils_1.AST_NODE_TYPES.ClassDeclaration, + utils_1.AST_NODE_TYPES.TSDeclareFunction, + utils_1.AST_NODE_TYPES.TSEnumDeclaration, + utils_1.AST_NODE_TYPES.TSModuleDeclaration, + utils_1.AST_NODE_TYPES.VariableDeclaration, + ].join(', ')})`, + ].join(', '); + } + function markDeclarationChildAsUsed(node) { + const identifiers = []; + switch (node.type) { + case utils_1.AST_NODE_TYPES.TSInterfaceDeclaration: + case utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration: + case utils_1.AST_NODE_TYPES.ClassDeclaration: + case utils_1.AST_NODE_TYPES.FunctionDeclaration: + case utils_1.AST_NODE_TYPES.TSDeclareFunction: + case utils_1.AST_NODE_TYPES.TSEnumDeclaration: + case utils_1.AST_NODE_TYPES.TSModuleDeclaration: + if (node.id?.type === utils_1.AST_NODE_TYPES.Identifier) { + identifiers.push(node.id); + } + break; + case utils_1.AST_NODE_TYPES.VariableDeclaration: + for (const declaration of node.declarations) { + visitPattern(declaration, pattern => { + identifiers.push(pattern); + }); + } + break; + } + let scope = context.sourceCode.getScope(node); + const shouldUseUpperScope = [ + utils_1.AST_NODE_TYPES.TSDeclareFunction, + utils_1.AST_NODE_TYPES.TSModuleDeclaration, + ].includes(node.type); + if (scope.variableScope !== scope) { + scope = scope.variableScope; + } + else if (shouldUseUpperScope && scope.upper) { + scope = scope.upper; + } + for (const id of identifiers) { + const superVar = scope.set.get(id.name); + if (superVar) { + superVar.eslintUsed = true; + } + } + } + function visitPattern(node, cb) { + const visitor = new scope_manager_1.PatternVisitor({}, node, cb); + visitor.visit(node); + } + }, +}); +function hasOverridingExportStatement(body) { + for (const statement of body) { + if ((statement.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration && + statement.declaration == null) || + statement.type === utils_1.AST_NODE_TYPES.ExportAllDeclaration || + statement.type === utils_1.AST_NODE_TYPES.TSExportAssignment) { + return true; + } + if (statement.type === utils_1.AST_NODE_TYPES.ExportDefaultDeclaration && + statement.declaration.type === utils_1.AST_NODE_TYPES.Identifier) { + return true; + } + } + return false; +} +function getStatementsOfNode(block) { + if (block.type === utils_1.AST_NODE_TYPES.Program) { + return block.body; + } + return block.body.body; +} +/* + +###### TODO ###### + +Edge cases that aren't currently handled due to laziness and them being super edgy edge cases + + +--- function params referenced in typeof type refs in the function declaration --- +--- NOTE - TS gets these cases wrong + +function _foo( + arg: number // arg should be unused +): typeof arg { + return 1 as any; +} + +function _bar( + arg: number, // arg should be unused + _arg2: typeof arg, +) {} + + +--- function names referenced in typeof type refs in the function declaration --- +--- NOTE - TS gets these cases right + +function foo( // foo should be unused +): typeof foo { + return 1 as any; +} + +function bar( // bar should be unused + _arg: typeof bar +) {} + + +--- if an interface is merged into a namespace --- +--- NOTE - TS gets these cases wrong + +namespace Test { + interface Foo { // Foo should be unused here + a: string; + } + export namespace Foo { + export type T = 'b'; + } +} +type T = Test.Foo; // Error: Namespace 'Test' has no exported member 'Foo'. + + +namespace Test { + export interface Foo { + a: string; + } + namespace Foo { // Foo should be unused here + export type T = 'b'; + } +} +type T = Test.Foo.T; // Error: Namespace 'Test' has no exported member 'Foo'. + +--- + +These cases are mishandled because the base rule assumes that each variable has one def, but type-value shadowing +creates a variable with two defs + +--- type-only or value-only references to type/value shadowed variables --- +--- NOTE - TS gets these cases wrong + +type T = 1; +const T = 2; // this T should be unused + +type U = T; // this U should be unused +const U = 3; + +const _V = U; + + +--- partially exported type/value shadowed variables --- +--- NOTE - TS gets these cases wrong + +export interface Foo {} +const Foo = 1; // this Foo should be unused + +interface Bar {} // this Bar should be unused +export const Bar = 1; + +*/ diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.d.ts new file mode 100644 index 0000000..3dc8a4e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.d.ts @@ -0,0 +1,15 @@ +import { TSESLint } from '@typescript-eslint/utils'; +export interface Config { + allowNamedExports?: boolean; + classes?: boolean; + enums?: boolean; + functions?: boolean; + ignoreTypeReferences?: boolean; + typedefs?: boolean; + variables?: boolean; +} +export type Options = ['nofunc' | Config]; +export type MessageIds = 'noUseBeforeDefine'; +declare const _default: TSESLint.RuleModule<"noUseBeforeDefine", Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=no-use-before-define.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.d.ts.map new file mode 100644 index 0000000..2050d97 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-use-before-define.d.ts","sourceRoot":"","sources":["../../src/rules/no-use-before-define.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AA0MpE,MAAM,WAAW,MAAM;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AACD,MAAM,MAAM,OAAO,GAAG,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAC;AAC1C,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC;;AAE7C,wBA+KG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js new file mode 100644 index 0000000..31cf97e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js @@ -0,0 +1,302 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const scope_manager_1 = require("@typescript-eslint/scope-manager"); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const referenceContainsTypeQuery_1 = require("../util/referenceContainsTypeQuery"); +const SENTINEL_TYPE = /^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/; +/** + * Parses a given value as options. + */ +function parseOptions(options) { + let functions = true; + let classes = true; + let enums = true; + let variables = true; + let typedefs = true; + let ignoreTypeReferences = true; + let allowNamedExports = false; + if (typeof options === 'string') { + functions = options !== 'nofunc'; + } + else if (typeof options === 'object' && options != null) { + functions = options.functions !== false; + classes = options.classes !== false; + enums = options.enums !== false; + variables = options.variables !== false; + typedefs = options.typedefs !== false; + ignoreTypeReferences = options.ignoreTypeReferences !== false; + allowNamedExports = options.allowNamedExports !== false; + } + return { + allowNamedExports, + classes, + enums, + functions, + ignoreTypeReferences, + typedefs, + variables, + }; +} +/** + * Checks whether or not a given variable is a function declaration. + */ +function isFunction(variable) { + return variable.defs[0].type === scope_manager_1.DefinitionType.FunctionName; +} +/** + * Checks whether or not a given variable is a type declaration. + */ +function isTypedef(variable) { + return variable.defs[0].type === scope_manager_1.DefinitionType.Type; +} +/** + * Checks whether or not a given variable is a enum declaration. + */ +function isOuterEnum(variable, reference) { + return (variable.defs[0].type === scope_manager_1.DefinitionType.TSEnumName && + variable.scope.variableScope !== reference.from.variableScope); +} +/** + * Checks whether or not a given variable is a class declaration in an upper function scope. + */ +function isOuterClass(variable, reference) { + return (variable.defs[0].type === scope_manager_1.DefinitionType.ClassName && + variable.scope.variableScope !== reference.from.variableScope); +} +/** + * Checks whether or not a given variable is a variable declaration in an upper function scope. + */ +function isOuterVariable(variable, reference) { + return (variable.defs[0].type === scope_manager_1.DefinitionType.Variable && + variable.scope.variableScope !== reference.from.variableScope); +} +/** + * Checks whether or not a given reference is a export reference. + */ +function isNamedExports(reference) { + const { identifier } = reference; + return (identifier.parent.type === utils_1.AST_NODE_TYPES.ExportSpecifier && + identifier.parent.local === identifier); +} +/** + * Checks whether or not a given reference is a type reference. + */ +function isTypeReference(reference) { + return (reference.isTypeReference || + (0, referenceContainsTypeQuery_1.referenceContainsTypeQuery)(reference.identifier)); +} +/** + * Checks whether or not a given location is inside of the range of a given node. + */ +function isInRange(node, location) { + return !!node && node.range[0] <= location && location <= node.range[1]; +} +/** + * Decorators are transpiled such that the decorator is placed after the class declaration + * So it is considered safe + */ +function isClassRefInClassDecorator(variable, reference) { + if (variable.defs[0].type !== scope_manager_1.DefinitionType.ClassName || + variable.defs[0].node.decorators.length === 0) { + return false; + } + for (const deco of variable.defs[0].node.decorators) { + if (reference.identifier.range[0] >= deco.range[0] && + reference.identifier.range[1] <= deco.range[1]) { + return true; + } + } + return false; +} +/** + * Checks whether or not a given reference is inside of the initializers of a given variable. + * + * @returns `true` in the following cases: + * - var a = a + * - var [a = a] = list + * - var {a = a} = obj + * - for (var a in a) {} + * - for (var a of a) {} + */ +function isInInitializer(variable, reference) { + if (variable.scope !== reference.from) { + return false; + } + let node = variable.identifiers[0].parent; + const location = reference.identifier.range[1]; + while (node) { + if (node.type === utils_1.AST_NODE_TYPES.VariableDeclarator) { + if (isInRange(node.init, location)) { + return true; + } + if ((node.parent.parent.type === utils_1.AST_NODE_TYPES.ForInStatement || + node.parent.parent.type === utils_1.AST_NODE_TYPES.ForOfStatement) && + isInRange(node.parent.parent.right, location)) { + return true; + } + break; + } + else if (node.type === utils_1.AST_NODE_TYPES.AssignmentPattern) { + if (isInRange(node.right, location)) { + return true; + } + } + else if (SENTINEL_TYPE.test(node.type)) { + break; + } + node = node.parent; + } + return false; +} +exports.default = (0, util_1.createRule)({ + name: 'no-use-before-define', + meta: { + type: 'problem', + docs: { + description: 'Disallow the use of variables before they are defined', + extendsBaseRule: true, + }, + messages: { + noUseBeforeDefine: "'{{name}}' was used before it was defined.", + }, + schema: [ + { + oneOf: [ + { + type: 'string', + enum: ['nofunc'], + }, + { + type: 'object', + additionalProperties: false, + properties: { + allowNamedExports: { + type: 'boolean', + description: 'Whether to ignore named exports.', + }, + classes: { + type: 'boolean', + description: 'Whether to ignore references to class declarations.', + }, + enums: { + type: 'boolean', + description: 'Whether to check references to enums.', + }, + functions: { + type: 'boolean', + description: 'Whether to ignore references to function declarations.', + }, + ignoreTypeReferences: { + type: 'boolean', + description: 'Whether to ignore type references, such as in type annotations and assertions.', + }, + typedefs: { + type: 'boolean', + description: 'Whether to check references to types.', + }, + variables: { + type: 'boolean', + description: 'Whether to ignore references to variables.', + }, + }, + }, + ], + }, + ], + }, + defaultOptions: [ + { + allowNamedExports: false, + classes: true, + enums: true, + functions: true, + ignoreTypeReferences: true, + typedefs: true, + variables: true, + }, + ], + create(context, optionsWithDefault) { + const options = parseOptions(optionsWithDefault[0]); + /** + * Determines whether a given use-before-define case should be reported according to the options. + * @param variable The variable that gets used before being defined + * @param reference The reference to the variable + */ + function isForbidden(variable, reference) { + if (options.ignoreTypeReferences && isTypeReference(reference)) { + return false; + } + if (isFunction(variable)) { + return options.functions; + } + if (isOuterClass(variable, reference)) { + return options.classes; + } + if (isOuterVariable(variable, reference)) { + return options.variables; + } + if (isOuterEnum(variable, reference)) { + return options.enums; + } + if (isTypedef(variable)) { + return options.typedefs; + } + return true; + } + function isDefinedBeforeUse(variable, reference) { + return (variable.identifiers[0].range[1] <= reference.identifier.range[1] && + !(reference.isValueReference && isInInitializer(variable, reference))); + } + /** + * Finds and validates all variables in a given scope. + */ + function findVariablesInScope(scope) { + scope.references.forEach(reference => { + const variable = reference.resolved; + function report() { + context.report({ + node: reference.identifier, + messageId: 'noUseBeforeDefine', + data: { + name: reference.identifier.name, + }, + }); + } + // Skips when the reference is: + // - initializations. + // - referring to an undefined variable. + // - referring to a global environment variable (there're no identifiers). + // - located preceded by the variable (except in initializers). + // - allowed by options. + if (reference.init) { + return; + } + if (!options.allowNamedExports && isNamedExports(reference)) { + if (!variable || !isDefinedBeforeUse(variable, reference)) { + report(); + } + return; + } + if (!variable) { + return; + } + if (variable.identifiers.length === 0 || + isDefinedBeforeUse(variable, reference) || + !isForbidden(variable, reference) || + isClassRefInClassDecorator(variable, reference) || + reference.from.type === utils_1.TSESLint.Scope.ScopeType.functionType) { + return; + } + // Reports. + report(); + }); + scope.childScopes.forEach(findVariablesInScope); + } + return { + Program(node) { + findVariablesInScope(context.sourceCode.getScope(node)); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.d.ts new file mode 100644 index 0000000..3610aed --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noUselessConstructor" | "removeConstructor", [], unknown, { + MethodDefinition(node: TSESTree.MethodDefinition): void; +}>; +export type Options = InferOptionsTypeFromRule; +export type MessageIds = InferMessageIdsTypeFromRule; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noUselessConstructor" | "removeConstructor", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-useless-constructor.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.d.ts.map new file mode 100644 index 0000000..361faab --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-useless-constructor.d.ts","sourceRoot":"","sources":["../../src/rules/no-useless-constructor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAKjB,QAAA,MAAM,QAAQ;;EAA8C,CAAC;AAE7D,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC,OAAO,QAAQ,CAAC,CAAC;;AA8BtE,wBA6BG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js new file mode 100644 index 0000000..7ed40ec --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js @@ -0,0 +1,57 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-useless-constructor'); +/** + * Check if method with accessibility is not useless + */ +function checkAccessibility(node) { + switch (node.accessibility) { + case 'protected': + case 'private': + return false; + case 'public': + if (node.parent.parent.superClass) { + return false; + } + break; + } + return true; +} +/** + * Check if method is not useless due to typescript parameter properties and decorators + */ +function checkParams(node) { + return !node.value.params.some(param => param.type === utils_1.AST_NODE_TYPES.TSParameterProperty || + param.decorators.length); +} +exports.default = (0, util_1.createRule)({ + name: 'no-useless-constructor', + meta: { + type: 'problem', + // defaultOptions, -- base rule does not use defaultOptions + docs: { + description: 'Disallow unnecessary constructors', + extendsBaseRule: true, + recommended: 'strict', + }, + hasSuggestions: baseRule.meta.hasSuggestions, + messages: baseRule.meta.messages, + schema: baseRule.meta.schema, + }, + defaultOptions: [], + create(context) { + const rules = baseRule.create(context); + return { + MethodDefinition(node) { + if (node.value.type === utils_1.AST_NODE_TYPES.FunctionExpression && + checkAccessibility(node) && + checkParams(node)) { + rules.MethodDefinition(node); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.d.ts new file mode 100644 index 0000000..2ab05f7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"uselessExport", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-useless-empty-export.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.d.ts.map new file mode 100644 index 0000000..14d1e8f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-useless-empty-export.d.ts","sourceRoot":"","sources":["../../src/rules/no-useless-empty-export.ts"],"names":[],"mappings":";AA0BA,wBAyDG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js new file mode 100644 index 0000000..5b99208 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js @@ -0,0 +1,70 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +function isEmptyExport(node) { + return (node.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration && + node.specifiers.length === 0 && + !node.declaration); +} +const exportOrImportNodeTypes = new Set([ + utils_1.AST_NODE_TYPES.ExportAllDeclaration, + utils_1.AST_NODE_TYPES.ExportDefaultDeclaration, + utils_1.AST_NODE_TYPES.ExportNamedDeclaration, + utils_1.AST_NODE_TYPES.ExportSpecifier, + utils_1.AST_NODE_TYPES.ImportDeclaration, + utils_1.AST_NODE_TYPES.TSExportAssignment, + utils_1.AST_NODE_TYPES.TSImportEqualsDeclaration, +]); +exports.default = (0, util_1.createRule)({ + name: 'no-useless-empty-export', + meta: { + type: 'suggestion', + docs: { + description: "Disallow empty exports that don't change anything in a module file", + }, + fixable: 'code', + hasSuggestions: false, + messages: { + uselessExport: 'Empty export does nothing and can be removed.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + // In a definition file, export {} is necessary to make the module properly + // encapsulated, even when there are other exports + // https://github.com/typescript-eslint/typescript-eslint/issues/4975 + if ((0, util_1.isDefinitionFile)(context.filename)) { + return {}; + } + function checkNode(node) { + if (!Array.isArray(node.body)) { + return; + } + const emptyExports = []; + let foundOtherExport = false; + for (const statement of node.body) { + if (isEmptyExport(statement)) { + emptyExports.push(statement); + } + else if (exportOrImportNodeTypes.has(statement.type)) { + foundOtherExport = true; + } + } + if (foundOtherExport) { + for (const emptyExport of emptyExports) { + context.report({ + node: emptyExport, + messageId: 'uselessExport', + fix: fixer => fixer.remove(emptyExport), + }); + } + } + } + return { + Program: checkNode, + TSModuleDeclaration: checkNode, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.d.ts new file mode 100644 index 0000000..dddda24 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.d.ts @@ -0,0 +1,9 @@ +export type Options = [ + { + allow: string[]; + } +]; +export type MessageIds = 'noVarReqs'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noVarReqs", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=no-var-requires.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.d.ts.map new file mode 100644 index 0000000..5c5cfca --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-var-requires.d.ts","sourceRoot":"","sources":["../../src/rules/no-var-requires.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC;;AAErC,wBA8FG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js new file mode 100644 index 0000000..4577963 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js @@ -0,0 +1,83 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'no-var-requires', + meta: { + type: 'problem', + deprecated: { + deprecatedSince: '8.0.0', + replacedBy: [ + { + rule: { + name: '@typescript-eslint/no-require-imports', + url: 'https://typescript-eslint.io/rules/no-require-imports', + }, + }, + ], + url: 'https://github.com/typescript-eslint/typescript-eslint/pull/8334', + }, + docs: { + description: 'Disallow `require` statements except in import statements', + }, + messages: { + noVarReqs: 'Require statement not part of import statement.', + }, + replacedBy: ['@typescript-eslint/no-require-imports'], + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allow: { + type: 'array', + description: 'Patterns of import paths to allow requiring from.', + items: { type: 'string' }, + }, + }, + }, + ], + }, + defaultOptions: [{ allow: [] }], + create(context, options) { + const allowPatterns = options[0].allow.map(pattern => new RegExp(pattern, 'u')); + function isImportPathAllowed(importPath) { + return allowPatterns.some(pattern => importPath.match(pattern)); + } + function isStringOrTemplateLiteral(node) { + return ((node.type === utils_1.AST_NODE_TYPES.Literal && + typeof node.value === 'string') || + node.type === utils_1.AST_NODE_TYPES.TemplateLiteral); + } + return { + 'CallExpression[callee.name="require"]'(node) { + if (node.arguments[0] && isStringOrTemplateLiteral(node.arguments[0])) { + const argValue = (0, util_1.getStaticStringValue)(node.arguments[0]); + if (typeof argValue === 'string' && isImportPathAllowed(argValue)) { + return; + } + } + const parent = node.parent.type === utils_1.AST_NODE_TYPES.ChainExpression + ? node.parent.parent + : node.parent; + if ([ + utils_1.AST_NODE_TYPES.CallExpression, + utils_1.AST_NODE_TYPES.MemberExpression, + utils_1.AST_NODE_TYPES.NewExpression, + utils_1.AST_NODE_TYPES.TSAsExpression, + utils_1.AST_NODE_TYPES.TSTypeAssertion, + utils_1.AST_NODE_TYPES.VariableDeclarator, + ].includes(parent.type)) { + const variable = utils_1.ASTUtils.findVariable(context.sourceCode.getScope(node), 'require'); + if (!variable?.identifiers.length) { + context.report({ + node, + messageId: 'noVarReqs', + }); + } + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-wrapper-object-types.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-wrapper-object-types.d.ts new file mode 100644 index 0000000..0ff8f5e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-wrapper-object-types.d.ts @@ -0,0 +1,4 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule<"bannedClassType", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=no-wrapper-object-types.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-wrapper-object-types.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-wrapper-object-types.d.ts.map new file mode 100644 index 0000000..2d92d25 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-wrapper-object-types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"no-wrapper-object-types.d.ts","sourceRoot":"","sources":["../../src/rules/no-wrapper-object-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;;AAiBnE,wBAsDG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-wrapper-object-types.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-wrapper-object-types.js new file mode 100644 index 0000000..3317287 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-wrapper-object-types.js @@ -0,0 +1,60 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const classNames = new Set([ + 'BigInt', + // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum + 'Boolean', + 'Number', + 'Object', + // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum + 'String', + 'Symbol', +]); +exports.default = (0, util_1.createRule)({ + name: 'no-wrapper-object-types', + meta: { + type: 'problem', + docs: { + description: 'Disallow using confusing built-in primitive class wrappers', + recommended: 'recommended', + }, + fixable: 'code', + messages: { + bannedClassType: 'Prefer using the primitive `{{preferred}}` as a type name, rather than the upper-cased `{{typeName}}`.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + function checkBannedTypes(node, includeFix) { + const typeName = node.type === utils_1.AST_NODE_TYPES.Identifier && node.name; + if (!typeName || + !classNames.has(typeName) || + !(0, util_1.isReferenceToGlobalFunction)(typeName, node, context.sourceCode)) { + return; + } + const preferred = typeName.toLowerCase(); + context.report({ + node, + messageId: 'bannedClassType', + data: { preferred, typeName }, + fix: includeFix + ? (fixer) => fixer.replaceText(node, preferred) + : undefined, + }); + } + return { + TSClassImplements(node) { + checkBannedTypes(node.expression, false); + }, + TSInterfaceHeritage(node) { + checkBannedTypes(node.expression, false); + }, + TSTypeReference(node) { + checkBannedTypes(node.typeName, true); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.d.ts new file mode 100644 index 0000000..4c51a38 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferNonNullAssertion", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=non-nullable-type-assertion-style.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.d.ts.map new file mode 100644 index 0000000..1cf0609 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"non-nullable-type-assertion-style.d.ts","sourceRoot":"","sources":["../../src/rules/non-nullable-type-assertion-style.ts"],"names":[],"mappings":";AAaA,wBAwIG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js new file mode 100644 index 0000000..0ee81f9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js @@ -0,0 +1,132 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'non-nullable-type-assertion-style', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce non-null assertions over explicit type assertions', + recommended: 'stylistic', + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + preferNonNullAssertion: 'Use a ! assertion to more succinctly remove null and undefined from the type.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const getTypesIfNotLoose = (node) => { + const type = services.getTypeAtLocation(node); + if (tsutils.isTypeFlagSet(type, ts.TypeFlags.Any | ts.TypeFlags.Unknown)) { + return undefined; + } + return tsutils.unionConstituents(type); + }; + const couldBeNullish = (type) => { + if (type.flags & ts.TypeFlags.TypeParameter) { + const constraint = type.getConstraint(); + return constraint == null || couldBeNullish(constraint); + } + if (tsutils.isUnionType(type)) { + for (const part of type.types) { + if (couldBeNullish(part)) { + return true; + } + } + return false; + } + return (type.flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined)) !== 0; + }; + const sameTypeWithoutNullish = (assertedTypes, originalTypes) => { + const nonNullishOriginalTypes = originalTypes.filter(type => (type.flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined)) === 0); + if (nonNullishOriginalTypes.length === originalTypes.length) { + return false; + } + for (const assertedType of assertedTypes) { + if (couldBeNullish(assertedType) || + !nonNullishOriginalTypes.includes(assertedType)) { + return false; + } + } + for (const originalType of nonNullishOriginalTypes) { + if (!assertedTypes.includes(originalType)) { + return false; + } + } + return true; + }; + const isConstAssertion = (node) => { + return (node.typeAnnotation.type === utils_1.AST_NODE_TYPES.TSTypeReference && + node.typeAnnotation.typeName.type === utils_1.AST_NODE_TYPES.Identifier && + node.typeAnnotation.typeName.name === 'const'); + }; + return { + 'TSAsExpression, TSTypeAssertion'(node) { + if (isConstAssertion(node)) { + return; + } + const originalTypes = getTypesIfNotLoose(node.expression); + if (!originalTypes) { + return; + } + const assertedTypes = getTypesIfNotLoose(node.typeAnnotation); + if (!assertedTypes) { + return; + } + if (sameTypeWithoutNullish(assertedTypes, originalTypes)) { + const expressionSourceCode = context.sourceCode.getText(node.expression); + const higherPrecedenceThanUnary = (0, util_1.getOperatorPrecedence)(services.esTreeNodeToTSNodeMap.get(node.expression).kind, ts.SyntaxKind.Unknown) > util_1.OperatorPrecedence.Unary; + context.report({ + node, + messageId: 'preferNonNullAssertion', + fix(fixer) { + return fixer.replaceText(node, higherPrecedenceThanUnary + ? `${expressionSourceCode}!` + : `(${expressionSourceCode})!`); + }, + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.d.ts new file mode 100644 index 0000000..467db89 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.d.ts @@ -0,0 +1,13 @@ +import type { TypeOrValueSpecifier } from '../util'; +export type MessageIds = 'object' | 'undef'; +export type Options = [ + { + allow?: TypeOrValueSpecifier[]; + allowRethrowing?: boolean; + allowThrowingAny?: boolean; + allowThrowingUnknown?: boolean; + } +]; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=only-throw-error.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.d.ts.map new file mode 100644 index 0000000..a97f3b7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"only-throw-error.d.ts","sourceRoot":"","sources":["../../src/rules/only-throw-error.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAepD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5C,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,KAAK,CAAC,EAAE,oBAAoB,EAAE,CAAC;QAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC;CACF,CAAC;;AAEF,wBAqJG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.js new file mode 100644 index 0000000..347bb73 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.js @@ -0,0 +1,157 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const ts_api_utils_1 = require("ts-api-utils"); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const promiseUtils_1 = require("../util/promiseUtils"); +exports.default = (0, util_1.createRule)({ + name: 'only-throw-error', + meta: { + type: 'problem', + docs: { + description: 'Disallow throwing non-`Error` values as exceptions', + extendsBaseRule: 'no-throw-literal', + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + object: 'Expected an error object to be thrown.', + undef: 'Do not throw undefined.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allow: { + ...util_1.typeOrValueSpecifiersSchema, + description: 'Type specifiers that can be thrown.', + }, + allowRethrowing: { + type: 'boolean', + description: 'Whether to allow rethrowing caught values that are not `Error` objects.', + }, + allowThrowingAny: { + type: 'boolean', + description: 'Whether to always allow throwing values typed as `any`.', + }, + allowThrowingUnknown: { + type: 'boolean', + description: 'Whether to always allow throwing values typed as `unknown`.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allow: [], + allowRethrowing: true, + allowThrowingAny: true, + allowThrowingUnknown: true, + }, + ], + create(context, [options]) { + const services = (0, util_1.getParserServices)(context); + const allow = options.allow; + function isRethrownError(node) { + if (node.type !== utils_1.AST_NODE_TYPES.Identifier) { + return false; + } + const scope = context.sourceCode.getScope(node); + const smVariable = (0, util_1.nullThrows)((0, util_1.findVariable)(scope, node), `Variable ${node.name} should exist in scope manager`); + const variableDefinitions = smVariable.defs.filter(def => def.isVariableDefinition); + if (variableDefinitions.length !== 1) { + return false; + } + const def = smVariable.defs[0]; + // try { /* ... */ } catch (x) { throw x; } + if (def.node.type === utils_1.AST_NODE_TYPES.CatchClause) { + return true; + } + // promise.catch(x => { throw x; }) + // promise.then(onFulfilled, x => { throw x; }) + if (def.node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression && + def.node.params.length >= 1 && + def.node.params[0] === def.name && + def.node.parent.type === utils_1.AST_NODE_TYPES.CallExpression) { + const callExpression = def.node.parent; + const parsedPromiseHandlingCall = (0, promiseUtils_1.parseCatchCall)(callExpression, context) ?? + (0, promiseUtils_1.parseThenCall)(callExpression, context); + if (parsedPromiseHandlingCall != null) { + const { object, onRejected } = parsedPromiseHandlingCall; + if (onRejected === def.node) { + const tsObjectNode = services.esTreeNodeToTSNodeMap.get(object); + // make sure we're actually dealing with a promise + if ((0, ts_api_utils_1.isThenableType)(services.program.getTypeChecker(), tsObjectNode)) { + return true; + } + } + } + } + return false; + } + function checkThrowArgument(node) { + if (options.allowRethrowing && isRethrownError(node)) { + return; + } + const type = services.getTypeAtLocation(node); + if ((0, util_1.typeMatchesSomeSpecifier)(type, allow, services.program)) { + return; + } + if (type.flags & ts.TypeFlags.Undefined) { + context.report({ node, messageId: 'undef' }); + return; + } + if (options.allowThrowingAny && (0, util_1.isTypeAnyType)(type)) { + return; + } + if (options.allowThrowingUnknown && (0, util_1.isTypeUnknownType)(type)) { + return; + } + if ((0, util_1.isErrorLike)(services.program, type)) { + return; + } + context.report({ node, messageId: 'object' }); + } + return { + ThrowStatement(node) { + checkThrowArgument(node.argument); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.d.ts new file mode 100644 index 0000000..498792f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.d.ts @@ -0,0 +1,12 @@ +type Modifier = 'private' | 'private readonly' | 'protected' | 'protected readonly' | 'public' | 'public readonly' | 'readonly'; +type Prefer = 'class-property' | 'parameter-property'; +export type Options = [ + { + allow?: Modifier[]; + prefer?: Prefer; + } +]; +export type MessageIds = 'preferClassProperty' | 'preferParameterProperty'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=parameter-properties.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.d.ts.map new file mode 100644 index 0000000..b8416ce --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parameter-properties.d.ts","sourceRoot":"","sources":["../../src/rules/parameter-properties.ts"],"names":[],"mappings":"AAMA,KAAK,QAAQ,GACT,SAAS,GACT,kBAAkB,GAClB,WAAW,GACX,oBAAoB,GACpB,QAAQ,GACR,iBAAiB,GACjB,UAAU,CAAC;AAEf,KAAK,MAAM,GAAG,gBAAgB,GAAG,oBAAoB,CAAC;AAEtD,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB;CACF,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,qBAAqB,GAAG,yBAAyB,CAAC;;AAE3E,wBAiOG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js new file mode 100644 index 0000000..30fd924 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js @@ -0,0 +1,170 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'parameter-properties', + meta: { + type: 'problem', + docs: { + description: 'Require or disallow parameter properties in class constructors', + }, + messages: { + preferClassProperty: 'Property {{parameter}} should be declared as a class property.', + preferParameterProperty: 'Property {{parameter}} should be declared as a parameter property.', + }, + schema: [ + { + type: 'object', + $defs: { + modifier: { + type: 'string', + enum: [ + 'readonly', + 'private', + 'protected', + 'public', + 'private readonly', + 'protected readonly', + 'public readonly', + ], + }, + }, + additionalProperties: false, + properties: { + allow: { + type: 'array', + description: 'Whether to allow certain kinds of properties to be ignored.', + items: { + $ref: '#/items/0/$defs/modifier', + }, + }, + prefer: { + type: 'string', + description: 'Whether to prefer class properties or parameter properties.', + enum: ['class-property', 'parameter-property'], + }, + }, + }, + ], + }, + defaultOptions: [ + { + allow: [], + prefer: 'class-property', + }, + ], + create(context, [{ allow = [], prefer = 'class-property' }]) { + /** + * Gets the modifiers of `node`. + * @param node the node to be inspected. + */ + function getModifiers(node) { + const modifiers = []; + if (node.accessibility) { + modifiers.push(node.accessibility); + } + if (node.readonly) { + modifiers.push('readonly'); + } + return modifiers.filter(Boolean).join(' '); + } + if (prefer === 'class-property') { + return { + TSParameterProperty(node) { + const modifiers = getModifiers(node); + if (!allow.includes(modifiers)) { + // HAS to be an identifier or assignment or TSC will throw + if (node.parameter.type !== utils_1.AST_NODE_TYPES.Identifier && + node.parameter.type !== utils_1.AST_NODE_TYPES.AssignmentPattern) { + return; + } + const name = node.parameter.type === utils_1.AST_NODE_TYPES.Identifier + ? node.parameter.name + : // has to be an Identifier or TSC will throw an error + node.parameter.left.name; + context.report({ + node, + messageId: 'preferClassProperty', + data: { + parameter: name, + }, + }); + } + }, + }; + } + const propertyNodesByNameStack = []; + function getNodesByName(name) { + const propertyNodesByName = propertyNodesByNameStack[propertyNodesByNameStack.length - 1]; + const existing = propertyNodesByName.get(name); + if (existing) { + return existing; + } + const created = {}; + propertyNodesByName.set(name, created); + return created; + } + function typeAnnotationsMatch(classProperty, constructorParameter) { + if (!classProperty.typeAnnotation || + !constructorParameter.typeAnnotation) { + return (classProperty.typeAnnotation === constructorParameter.typeAnnotation); + } + return (context.sourceCode.getText(classProperty.typeAnnotation) === + context.sourceCode.getText(constructorParameter.typeAnnotation)); + } + return { + ':matches(ClassDeclaration, ClassExpression):exit'() { + const propertyNodesByName = (0, util_1.nullThrows)(propertyNodesByNameStack.pop(), 'Stack should exist on class exit'); + for (const [name, nodes] of propertyNodesByName) { + if (nodes.classProperty && + nodes.constructorAssignment && + nodes.constructorParameter && + typeAnnotationsMatch(nodes.classProperty, nodes.constructorParameter)) { + context.report({ + node: nodes.classProperty, + messageId: 'preferParameterProperty', + data: { + parameter: name, + }, + }); + } + } + }, + ClassBody(node) { + for (const element of node.body) { + if (element.type === utils_1.AST_NODE_TYPES.PropertyDefinition && + element.key.type === utils_1.AST_NODE_TYPES.Identifier && + !element.value && + !allow.includes(getModifiers(element))) { + getNodesByName(element.key.name).classProperty = element; + } + } + }, + 'ClassDeclaration, ClassExpression'() { + propertyNodesByNameStack.push(new Map()); + }, + 'MethodDefinition[kind="constructor"]'(node) { + for (const parameter of node.value.params) { + if (parameter.type === utils_1.AST_NODE_TYPES.Identifier) { + getNodesByName(parameter.name).constructorParameter = parameter; + } + } + for (const statement of node.value.body?.body ?? []) { + if (statement.type !== utils_1.AST_NODE_TYPES.ExpressionStatement || + statement.expression.type !== utils_1.AST_NODE_TYPES.AssignmentExpression || + statement.expression.left.type !== + utils_1.AST_NODE_TYPES.MemberExpression || + statement.expression.left.object.type !== + utils_1.AST_NODE_TYPES.ThisExpression || + statement.expression.left.property.type !== + utils_1.AST_NODE_TYPES.Identifier || + statement.expression.right.type !== utils_1.AST_NODE_TYPES.Identifier) { + break; + } + getNodesByName(statement.expression.right.name).constructorAssignment = statement.expression; + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.d.ts new file mode 100644 index 0000000..b8ac64f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.d.ts @@ -0,0 +1,4 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule<"preferConstAssertion" | "variableConstAssertion" | "variableSuggest", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=prefer-as-const.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.d.ts.map new file mode 100644 index 0000000..70a2e9e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-as-const.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-as-const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;;AAMnE,wBA2EG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js new file mode 100644 index 0000000..d2f884c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js @@ -0,0 +1,72 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'prefer-as-const', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce the use of `as const` over literal type', + recommended: 'recommended', + }, + fixable: 'code', + hasSuggestions: true, + messages: { + preferConstAssertion: 'Expected a `const` instead of a literal type assertion.', + variableConstAssertion: 'Expected a `const` assertion instead of a literal type annotation.', + variableSuggest: 'You should use `as const` instead of type annotation.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + function compareTypes(valueNode, typeNode, canFix) { + if (valueNode.type === utils_1.AST_NODE_TYPES.Literal && + typeNode.type === utils_1.AST_NODE_TYPES.TSLiteralType && + typeNode.literal.type === utils_1.AST_NODE_TYPES.Literal && + valueNode.raw === typeNode.literal.raw) { + if (canFix) { + context.report({ + node: typeNode, + messageId: 'preferConstAssertion', + fix: fixer => fixer.replaceText(typeNode, 'const'), + }); + } + else { + context.report({ + node: typeNode, + messageId: 'variableConstAssertion', + suggest: [ + { + messageId: 'variableSuggest', + fix: (fixer) => [ + fixer.remove(typeNode.parent), + fixer.insertTextAfter(valueNode, ' as const'), + ], + }, + ], + }); + } + } + } + return { + PropertyDefinition(node) { + if (node.value && node.typeAnnotation) { + compareTypes(node.value, node.typeAnnotation.typeAnnotation, false); + } + }, + TSAsExpression(node) { + compareTypes(node.expression, node.typeAnnotation, true); + }, + TSTypeAssertion(node) { + compareTypes(node.expression, node.typeAnnotation, true); + }, + VariableDeclarator(node) { + if (node.init && node.id.typeAnnotation) { + compareTypes(node.init, node.id.typeAnnotation.typeAnnotation, false); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-destructuring.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-destructuring.d.ts new file mode 100644 index 0000000..acc1279 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-destructuring.d.ts @@ -0,0 +1,18 @@ +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; +import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util'; +declare const baseRule: TSESLint.RuleModule<"preferDestructuring", [import("eslint/lib/rules/prefer-destructuring").DestructuringTypeConfig | { + AssignmentExpression?: import("eslint/lib/rules/prefer-destructuring").DestructuringTypeConfig; + VariableDeclarator?: import("eslint/lib/rules/prefer-destructuring").DestructuringTypeConfig; +}, (import("eslint/lib/rules/prefer-destructuring").Option1 | undefined)?], unknown, { + AssignmentExpression(node: TSESTree.AssignmentExpression): void; + VariableDeclarator(node: TSESTree.VariableDeclarator): void; +}>; +type BaseOptions = InferOptionsTypeFromRule; +type EnforcementOptions = { + enforceForDeclarationWithTypeAnnotation?: boolean; +} & BaseOptions[1]; +export type Options = [BaseOptions[0], EnforcementOptions]; +export type MessageIds = InferMessageIdsTypeFromRule; +declare const _default: TSESLint.RuleModule<"preferDestructuring", Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=prefer-destructuring.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-destructuring.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-destructuring.d.ts.map new file mode 100644 index 0000000..6bd0d96 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-destructuring.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-destructuring.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-destructuring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAOnE,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAKjB,QAAA,MAAM,QAAQ;;;;;;EAA4C,CAAC;AAE3D,KAAK,WAAW,GAAG,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC7D,KAAK,kBAAkB,GAAG;IACxB,uCAAuC,CAAC,EAAE,OAAO,CAAC;CACnD,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACnB,MAAM,MAAM,OAAO,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC;AAE3D,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC,OAAO,QAAQ,CAAC,CAAC;;AA+CtE,wBAwHG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-destructuring.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-destructuring.js new file mode 100644 index 0000000..686e525 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-destructuring.js @@ -0,0 +1,216 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const util_1 = require("../util"); +const getESLintCoreRule_1 = require("../util/getESLintCoreRule"); +const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('prefer-destructuring'); +const destructuringTypeConfig = { + type: 'object', + additionalProperties: false, + properties: { + array: { + type: 'boolean', + }, + object: { + type: 'boolean', + }, + }, +}; +const schema = [ + { + oneOf: [ + { + type: 'object', + additionalProperties: false, + properties: { + AssignmentExpression: destructuringTypeConfig, + VariableDeclarator: destructuringTypeConfig, + }, + }, + destructuringTypeConfig, + ], + }, + { + type: 'object', + additionalProperties: false, + properties: { + enforceForDeclarationWithTypeAnnotation: { + type: 'boolean', + description: 'Whether to enforce destructuring on variable declarations with type annotations.', + }, + enforceForRenamedProperties: { + type: 'boolean', + description: 'Whether to enforce destructuring that use a different variable name than the property name.', + }, + }, + }, +]; +exports.default = (0, util_1.createRule)({ + name: 'prefer-destructuring', + meta: { + type: 'suggestion', + // defaultOptions, -- base rule does not use defaultOptions + docs: { + description: 'Require destructuring from arrays and/or objects', + extendsBaseRule: true, + frozen: true, + requiresTypeChecking: true, + }, + fixable: baseRule.meta.fixable, + hasSuggestions: baseRule.meta.hasSuggestions, + messages: baseRule.meta.messages, + schema, + }, + defaultOptions: [ + { + AssignmentExpression: { + array: true, + object: true, + }, + VariableDeclarator: { + array: true, + object: true, + }, + }, + {}, + ], + create(context, [enabledTypes, options]) { + const { enforceForDeclarationWithTypeAnnotation = false, enforceForRenamedProperties = false, } = options; + const { esTreeNodeToTSNodeMap, program } = (0, util_1.getParserServices)(context); + const typeChecker = program.getTypeChecker(); + const baseRules = baseRule.create(context); + let baseRulesWithoutFixCache = null; + return { + AssignmentExpression(node) { + if (node.operator !== '=') { + return; + } + performCheck(node.left, node.right, node); + }, + VariableDeclarator(node) { + performCheck(node.id, node.init, node); + }, + }; + function performCheck(leftNode, rightNode, reportNode) { + const rules = leftNode.type === utils_1.AST_NODE_TYPES.Identifier && + leftNode.typeAnnotation == null + ? baseRules + : baseRulesWithoutFix(); + if ((leftNode.type === utils_1.AST_NODE_TYPES.ArrayPattern || + leftNode.type === utils_1.AST_NODE_TYPES.Identifier || + leftNode.type === utils_1.AST_NODE_TYPES.ObjectPattern) && + leftNode.typeAnnotation != null && + !enforceForDeclarationWithTypeAnnotation) { + return; + } + if (rightNode != null && + isArrayLiteralIntegerIndexAccess(rightNode) && + rightNode.object.type !== utils_1.AST_NODE_TYPES.Super) { + const tsObj = esTreeNodeToTSNodeMap.get(rightNode.object); + const objType = typeChecker.getTypeAtLocation(tsObj); + if (!isTypeAnyOrIterableType(objType, typeChecker)) { + if (!enforceForRenamedProperties || + !getNormalizedEnabledType(reportNode.type, 'object')) { + return; + } + context.report({ + node: reportNode, + messageId: 'preferDestructuring', + data: { type: 'object' }, + }); + return; + } + } + if (reportNode.type === utils_1.AST_NODE_TYPES.AssignmentExpression) { + rules.AssignmentExpression(reportNode); + } + else { + rules.VariableDeclarator(reportNode); + } + } + function getNormalizedEnabledType(nodeType, destructuringType) { + if ('object' in enabledTypes || 'array' in enabledTypes) { + return enabledTypes[destructuringType]; + } + return enabledTypes[nodeType][destructuringType]; + } + function baseRulesWithoutFix() { + baseRulesWithoutFixCache ??= baseRule.create(noFixContext(context)); + return baseRulesWithoutFixCache; + } + }, +}); +function noFixContext(context) { + const customContext = { + report: (descriptor) => { + context.report({ + ...descriptor, + fix: undefined, + }); + }, + }; + // we can't directly proxy `context` because its `report` property is non-configurable + // and non-writable. So we proxy `customContext` and redirect all + // property access to the original context except for `report` + return new Proxy(customContext, { + get(target, path, receiver) { + if (path !== 'report') { + return Reflect.get(context, path, receiver); + } + return Reflect.get(target, path, receiver); + }, + }); +} +function isTypeAnyOrIterableType(type, typeChecker) { + if ((0, util_1.isTypeAnyType)(type)) { + return true; + } + if (!type.isUnion()) { + const iterator = tsutils.getWellKnownSymbolPropertyOfType(type, 'iterator', typeChecker); + return iterator != null; + } + return type.types.every(t => isTypeAnyOrIterableType(t, typeChecker)); +} +function isArrayLiteralIntegerIndexAccess(node) { + if (node.type !== utils_1.AST_NODE_TYPES.MemberExpression) { + return false; + } + if (node.property.type !== utils_1.AST_NODE_TYPES.Literal) { + return false; + } + return Number.isInteger(node.property.value); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.d.ts new file mode 100644 index 0000000..b68bac9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.d.ts @@ -0,0 +1,5 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type MessageIds = 'defineInitializer' | 'defineInitializerSuggestion'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=prefer-enum-initializers.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.d.ts.map new file mode 100644 index 0000000..6df7fc6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-enum-initializers.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-enum-initializers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAInE,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,6BAA6B,CAAC;;AAE7E,wBA+DG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js new file mode 100644 index 0000000..ad188a8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'prefer-enum-initializers', + meta: { + type: 'suggestion', + docs: { + description: 'Require each enum member value to be explicitly initialized', + }, + hasSuggestions: true, + messages: { + defineInitializer: "The value of the member '{{ name }}' should be explicitly defined.", + defineInitializerSuggestion: 'Can be fixed to {{ name }} = {{ suggested }}', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + function TSEnumDeclaration(node) { + const { members } = node.body; + members.forEach((member, index) => { + if (member.initializer == null) { + const name = context.sourceCode.getText(member); + context.report({ + node: member, + messageId: 'defineInitializer', + data: { + name, + }, + suggest: [ + { + messageId: 'defineInitializerSuggestion', + data: { name, suggested: index }, + fix: (fixer) => { + return fixer.replaceText(member, `${name} = ${index}`); + }, + }, + { + messageId: 'defineInitializerSuggestion', + data: { name, suggested: index + 1 }, + fix: (fixer) => { + return fixer.replaceText(member, `${name} = ${index + 1}`); + }, + }, + { + messageId: 'defineInitializerSuggestion', + data: { name, suggested: `'${name}'` }, + fix: (fixer) => { + return fixer.replaceText(member, `${name} = '${name}'`); + }, + }, + ], + }); + } + }); + } + return { + TSEnumDeclaration, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-find.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-find.d.ts new file mode 100644 index 0000000..62af173 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-find.d.ts @@ -0,0 +1,4 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule<"preferFind" | "preferFindSuggestion", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=prefer-find.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-find.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-find.d.ts.map new file mode 100644 index 0000000..b476f22 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-find.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-find.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-find.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;;AAiBnE,wBA2SG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-find.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-find.js new file mode 100644 index 0000000..d292629 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-find.js @@ -0,0 +1,247 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'prefer-find', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result', + recommended: 'stylistic', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + preferFind: 'Prefer .find(...) instead of .filter(...)[0].', + preferFindSuggestion: 'Use .find(...) instead of .filter(...)[0].', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const globalScope = context.sourceCode.getScope(context.sourceCode.ast); + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + function parseArrayFilterExpressions(expression) { + const node = (0, util_1.skipChainExpression)(expression); + if (node.type === utils_1.AST_NODE_TYPES.SequenceExpression) { + // Only the last expression in (a, b, [1, 2, 3].filter(condition))[0] matters + const lastExpression = (0, util_1.nullThrows)(node.expressions.at(-1), 'Expected to have more than zero expressions in a sequence expression'); + return parseArrayFilterExpressions(lastExpression); + } + // This is the only reason we're returning a list rather than a single value. + if (node.type === utils_1.AST_NODE_TYPES.ConditionalExpression) { + // Both branches of the ternary _must_ return results. + const consequentResult = parseArrayFilterExpressions(node.consequent); + if (consequentResult.length === 0) { + return []; + } + const alternateResult = parseArrayFilterExpressions(node.alternate); + if (alternateResult.length === 0) { + return []; + } + // Accumulate the results from both sides and pass up the chain. + return [...consequentResult, ...alternateResult]; + } + // Check if it looks like <>(...), but not <>?.(...) + if (node.type === utils_1.AST_NODE_TYPES.CallExpression && !node.optional) { + const callee = node.callee; + // Check if it looks like <>.filter(...) or <>['filter'](...), + // or the optional chaining variants. + if (callee.type === utils_1.AST_NODE_TYPES.MemberExpression) { + const isBracketSyntaxForFilter = callee.computed; + if ((0, util_1.isStaticMemberAccessOfValue)(callee, context, 'filter')) { + const filterNode = callee.property; + const filteredObjectType = (0, util_1.getConstrainedTypeAtLocation)(services, callee.object); + // As long as the object is a (possibly nullable) array, + // this is an Array.prototype.filter expression. + if (isArrayish(filteredObjectType)) { + return [ + { + filterNode, + isBracketSyntaxForFilter, + }, + ]; + } + } + } + } + // not a filter expression. + return []; + } + /** + * Tells whether the type is a possibly nullable array/tuple or union thereof. + */ + function isArrayish(type) { + let isAtLeastOneArrayishComponent = false; + for (const unionPart of tsutils.unionConstituents(type)) { + if (tsutils.isIntrinsicNullType(unionPart) || + tsutils.isIntrinsicUndefinedType(unionPart)) { + continue; + } + // apparently checker.isArrayType(T[] & S[]) => false. + // so we need to check the intersection parts individually. + const isArrayOrIntersectionThereof = tsutils + .intersectionConstituents(unionPart) + .every(intersectionPart => checker.isArrayType(intersectionPart) || + checker.isTupleType(intersectionPart)); + if (!isArrayOrIntersectionThereof) { + // There is a non-array, non-nullish type component, + // so it's not an array. + return false; + } + isAtLeastOneArrayishComponent = true; + } + return isAtLeastOneArrayishComponent; + } + function getObjectIfArrayAtZeroExpression(node) { + // .at() should take exactly one argument. + if (node.arguments.length !== 1) { + return undefined; + } + const callee = node.callee; + if (callee.type === utils_1.AST_NODE_TYPES.MemberExpression && + !callee.optional && + (0, util_1.isStaticMemberAccessOfValue)(callee, context, 'at')) { + const atArgument = (0, util_1.getStaticValue)(node.arguments[0], globalScope); + if (atArgument != null && isTreatedAsZeroByArrayAt(atArgument.value)) { + return callee.object; + } + } + return undefined; + } + /** + * Implements the algorithm for array indexing by `.at()` method. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at#parameters + */ + function isTreatedAsZeroByArrayAt(value) { + // This would cause the number constructor coercion to throw. Other static + // values are safe. + if (typeof value === 'symbol') { + return false; + } + const asNumber = Number(value); + if (isNaN(asNumber)) { + return true; + } + return Math.trunc(asNumber) === 0; + } + function isMemberAccessOfZero(node) { + const property = (0, util_1.getStaticValue)(node.property, globalScope); + // Check if it looks like <>[0] or <>['0'], but not <>?.[0] + return (!node.optional && + property != null && + isTreatedAsZeroByMemberAccess(property.value)); + } + /** + * Implements the algorithm for array indexing by member operator. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#array_indices + */ + function isTreatedAsZeroByMemberAccess(value) { + return String(value) === '0'; + } + function generateFixToRemoveArrayElementAccess(fixer, arrayNode, wholeExpressionBeingFlagged) { + const tokenToStartDeletingFrom = (0, util_1.nullThrows)( + // The next `.` or `[` is what we're looking for. + // think of (...).at(0) or (...)[0] or even (...)["at"](0). + context.sourceCode.getTokenAfter(arrayNode, token => token.value === '.' || token.value === '['), 'Expected to find a member access token!'); + return fixer.removeRange([ + tokenToStartDeletingFrom.range[0], + wholeExpressionBeingFlagged.range[1], + ]); + } + function generateFixToReplaceFilterWithFind(fixer, filterExpression) { + return fixer.replaceText(filterExpression.filterNode, filterExpression.isBracketSyntaxForFilter ? '"find"' : 'find'); + } + return { + // This query will be used to find things like `filteredResults.at(0)`. + CallExpression(node) { + const object = getObjectIfArrayAtZeroExpression(node); + if (object) { + const filterExpressions = parseArrayFilterExpressions(object); + if (filterExpressions.length !== 0) { + context.report({ + node, + messageId: 'preferFind', + suggest: [ + { + messageId: 'preferFindSuggestion', + fix: (fixer) => { + return [ + ...filterExpressions.map(filterExpression => generateFixToReplaceFilterWithFind(fixer, filterExpression)), + // Get rid of the .at(0) or ['at'](0). + generateFixToRemoveArrayElementAccess(fixer, object, node), + ]; + }, + }, + ], + }); + } + } + }, + // This query will be used to find things like `filteredResults[0]`. + // + // Note: we're always looking for array member access to be "computed", + // i.e. `filteredResults[0]`, since `filteredResults.0` isn't a thing. + 'MemberExpression[computed=true]'(node) { + if (isMemberAccessOfZero(node)) { + const object = node.object; + const filterExpressions = parseArrayFilterExpressions(object); + if (filterExpressions.length !== 0) { + context.report({ + node, + messageId: 'preferFind', + suggest: [ + { + messageId: 'preferFindSuggestion', + fix: (fixer) => { + return [ + ...filterExpressions.map(filterExpression => generateFixToReplaceFilterWithFind(fixer, filterExpression)), + // Get rid of the [0]. + generateFixToRemoveArrayElementAccess(fixer, object, node), + ]; + }, + }, + ], + }); + } + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.d.ts new file mode 100644 index 0000000..017ebc7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.d.ts @@ -0,0 +1,4 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule<"preferForOf", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=prefer-for-of.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.d.ts.map new file mode 100644 index 0000000..1066714 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-for-of.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-for-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;;AAMnE,wBAgKG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js new file mode 100644 index 0000000..ae5249b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js @@ -0,0 +1,115 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'prefer-for-of', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce the use of `for-of` loop over the standard `for` loop where possible', + recommended: 'stylistic', + }, + messages: { + preferForOf: 'Expected a `for-of` loop instead of a `for` loop with this simple iteration.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + function isSingleVariableDeclaration(node) { + return (node?.type === utils_1.AST_NODE_TYPES.VariableDeclaration && + node.kind !== 'const' && + node.declarations.length === 1); + } + function isLiteral(node, value) { + return node.type === utils_1.AST_NODE_TYPES.Literal && node.value === value; + } + function isZeroInitialized(node) { + return node.init != null && isLiteral(node.init, 0); + } + function isMatchingIdentifier(node, name) { + return node.type === utils_1.AST_NODE_TYPES.Identifier && node.name === name; + } + function isLessThanLengthExpression(node, name) { + if (node?.type === utils_1.AST_NODE_TYPES.BinaryExpression && + node.operator === '<' && + isMatchingIdentifier(node.left, name) && + node.right.type === utils_1.AST_NODE_TYPES.MemberExpression && + isMatchingIdentifier(node.right.property, 'length')) { + return node.right.object; + } + return null; + } + function isIncrement(node, name) { + if (!node) { + return false; + } + switch (node.type) { + case utils_1.AST_NODE_TYPES.UpdateExpression: + // x++ or ++x + return (node.operator === '++' && isMatchingIdentifier(node.argument, name)); + case utils_1.AST_NODE_TYPES.AssignmentExpression: + if (isMatchingIdentifier(node.left, name)) { + if (node.operator === '+=') { + // x += 1 + return isLiteral(node.right, 1); + } + if (node.operator === '=') { + // x = x + 1 or x = 1 + x + const expr = node.right; + return (expr.type === utils_1.AST_NODE_TYPES.BinaryExpression && + expr.operator === '+' && + ((isMatchingIdentifier(expr.left, name) && + isLiteral(expr.right, 1)) || + (isLiteral(expr.left, 1) && + isMatchingIdentifier(expr.right, name)))); + } + } + } + return false; + } + function contains(outer, inner) { + return (outer.range[0] <= inner.range[0] && outer.range[1] >= inner.range[1]); + } + function isIndexOnlyUsedWithArray(body, indexVar, arrayExpression) { + const arrayText = context.sourceCode.getText(arrayExpression); + return indexVar.references.every(reference => { + const id = reference.identifier; + const node = id.parent; + return (!contains(body, id) || + (node.type === utils_1.AST_NODE_TYPES.MemberExpression && + node.object.type !== utils_1.AST_NODE_TYPES.ThisExpression && + node.property === id && + context.sourceCode.getText(node.object) === arrayText && + !(0, util_1.isAssignee)(node))); + }); + } + return { + 'ForStatement:exit'(node) { + if (!isSingleVariableDeclaration(node.init)) { + return; + } + const declarator = node.init.declarations[0]; + if (!declarator || + !isZeroInitialized(declarator) || + declarator.id.type !== utils_1.AST_NODE_TYPES.Identifier) { + return; + } + const indexName = declarator.id.name; + const arrayExpression = isLessThanLengthExpression(node.test, indexName); + if (!arrayExpression) { + return; + } + const [indexVar] = context.sourceCode.getDeclaredVariables(node.init); + if (isIncrement(node.update, indexName) && + isIndexOnlyUsedWithArray(node.body, indexVar, arrayExpression)) { + context.report({ + node, + messageId: 'preferForOf', + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.d.ts new file mode 100644 index 0000000..03fed13 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.d.ts @@ -0,0 +1,8 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export declare const phrases: { + readonly TSInterfaceDeclaration: "Interface"; + readonly TSTypeLiteral: "Type literal"; +}; +declare const _default: TSESLint.RuleModule<"functionTypeOverCallableType" | "unexpectedThisOnFunctionOnlyInterface", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=prefer-function-type.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.d.ts.map new file mode 100644 index 0000000..bdea657 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-function-type.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-function-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAMnE,eAAO,MAAM,OAAO;;;CAGV,CAAC;;AAEX,wBAsNG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js new file mode 100644 index 0000000..ec4386a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js @@ -0,0 +1,186 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.phrases = void 0; +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.phrases = { + [utils_1.AST_NODE_TYPES.TSInterfaceDeclaration]: 'Interface', + [utils_1.AST_NODE_TYPES.TSTypeLiteral]: 'Type literal', +}; +exports.default = (0, util_1.createRule)({ + name: 'prefer-function-type', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce using function types instead of interfaces with call signatures', + recommended: 'stylistic', + }, + fixable: 'code', + messages: { + functionTypeOverCallableType: '{{ literalOrInterface }} only has a call signature, you should use a function type instead.', + unexpectedThisOnFunctionOnlyInterface: "`this` refers to the function type '{{ interfaceName }}', did you intend to use a generic `this` parameter like `(this: Self, ...) => Self` instead?", + }, + schema: [], + }, + defaultOptions: [], + create(context) { + /** + * Checks if there the interface has exactly one supertype that isn't named 'Function' + * @param node The node being checked + */ + function hasOneSupertype(node) { + if (node.extends.length === 0) { + return false; + } + if (node.extends.length !== 1) { + return true; + } + const expr = node.extends[0].expression; + return (expr.type !== utils_1.AST_NODE_TYPES.Identifier || expr.name !== 'Function'); + } + /** + * @param parent The parent of the call signature causing the diagnostic + */ + function shouldWrapSuggestion(parent) { + if (!parent) { + return false; + } + switch (parent.type) { + case utils_1.AST_NODE_TYPES.TSUnionType: + case utils_1.AST_NODE_TYPES.TSIntersectionType: + case utils_1.AST_NODE_TYPES.TSArrayType: + return true; + default: + return false; + } + } + /** + * @param member The TypeElement being checked + * @param node The parent of member being checked + */ + function checkMember(member, node, tsThisTypes = null) { + if ((member.type === utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration || + member.type === utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration) && + member.returnType != null) { + if (tsThisTypes?.length && + node.type === utils_1.AST_NODE_TYPES.TSInterfaceDeclaration) { + // the message can be confusing if we don't point directly to the `this` node instead of the whole member + // and in favour of generating at most one error we'll only report the first occurrence of `this` if there are multiple + context.report({ + node: tsThisTypes[0], + messageId: 'unexpectedThisOnFunctionOnlyInterface', + data: { + interfaceName: node.id.name, + }, + }); + return; + } + const fixable = node.parent.type === utils_1.AST_NODE_TYPES.ExportDefaultDeclaration; + const fix = fixable + ? null + : (fixer) => { + const fixes = []; + const start = member.range[0]; + // https://github.com/microsoft/TypeScript/pull/56908 + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const colonPos = member.returnType.range[0] - start; + const text = context.sourceCode + .getText() + .slice(start, member.range[1]); + const comments = [ + ...context.sourceCode.getCommentsBefore(member), + ...context.sourceCode.getCommentsAfter(member), + ]; + let suggestion = `${text.slice(0, colonPos)} =>${text.slice(colonPos + 1)}`; + const lastChar = suggestion.endsWith(';') ? ';' : ''; + if (lastChar) { + suggestion = suggestion.slice(0, -1); + } + if (shouldWrapSuggestion(node.parent)) { + suggestion = `(${suggestion})`; + } + if (node.type === utils_1.AST_NODE_TYPES.TSInterfaceDeclaration) { + if (node.typeParameters != null) { + suggestion = `type ${context.sourceCode + .getText() + .slice(node.id.range[0], node.typeParameters.range[1])} = ${suggestion}${lastChar}`; + } + else { + suggestion = `type ${node.id.name} = ${suggestion}${lastChar}`; + } + } + const isParentExported = node.parent.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration; + if (node.type === utils_1.AST_NODE_TYPES.TSInterfaceDeclaration && + isParentExported) { + const commentsText = comments + .map(({ type, value }) => type === utils_1.AST_TOKEN_TYPES.Line + ? `//${value}\n` + : `/*${value}*/\n`) + .join(''); + // comments should move before export and not between export and interface declaration + fixes.push(fixer.insertTextBefore(node.parent, commentsText)); + } + else { + comments.forEach(comment => { + let commentText = comment.type === utils_1.AST_TOKEN_TYPES.Line + ? `//${comment.value}` + : `/*${comment.value}*/`; + const isCommentOnTheSameLine = comment.loc.start.line === member.loc.start.line; + if (!isCommentOnTheSameLine) { + commentText += '\n'; + } + else { + commentText += ' '; + } + suggestion = commentText + suggestion; + }); + } + const fixStart = node.range[0]; + fixes.push(fixer.replaceTextRange([fixStart, node.range[1]], suggestion)); + return fixes; + }; + context.report({ + node: member, + messageId: 'functionTypeOverCallableType', + data: { + literalOrInterface: exports.phrases[node.type], + }, + fix, + }); + } + } + let tsThisTypes = null; + let literalNesting = 0; + return { + TSInterfaceDeclaration() { + // when entering an interface reset the count of `this`s to empty. + tsThisTypes = []; + }, + 'TSInterfaceDeclaration:exit'(node) { + if (!hasOneSupertype(node) && node.body.body.length === 1) { + checkMember(node.body.body[0], node, tsThisTypes); + } + // on exit check member and reset the array to nothing. + tsThisTypes = null; + }, + 'TSInterfaceDeclaration TSThisType'(node) { + // inside an interface keep track of all ThisType references. + // unless it's inside a nested type literal in which case it's invalid code anyway + // we don't want to incorrectly say "it refers to name" while typescript says it's completely invalid. + if (literalNesting === 0 && tsThisTypes != null) { + tsThisTypes.push(node); + } + }, + // keep track of nested literals to avoid complaining about invalid `this` uses + 'TSInterfaceDeclaration TSTypeLiteral'() { + literalNesting += 1; + }, + 'TSInterfaceDeclaration TSTypeLiteral:exit'() { + literalNesting -= 1; + }, + 'TSTypeLiteral[members.length = 1]'(node) { + checkMember(node.members[0], node); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.d.ts new file mode 100644 index 0000000..6620132 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.d.ts @@ -0,0 +1,4 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule<"preferIncludes" | "preferStringIncludes", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=prefer-includes.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.d.ts.map new file mode 100644 index 0000000..f4557a7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-includes.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-includes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;;AAcnE,wBAkQG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js new file mode 100644 index 0000000..ad6cee3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js @@ -0,0 +1,242 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const regexpp_1 = require("@eslint-community/regexpp"); +const utils_1 = require("@typescript-eslint/utils"); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'prefer-includes', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce `includes` method over `indexOf` method', + recommended: 'stylistic', + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + preferIncludes: "Use 'includes()' method instead.", + preferStringIncludes: 'Use `String#includes()` method with a string instead.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const globalScope = context.sourceCode.getScope(context.sourceCode.ast); + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + function isNumber(node, value) { + const evaluated = (0, util_1.getStaticValue)(node, globalScope); + return evaluated != null && evaluated.value === value; + } + function isPositiveCheck(node) { + switch (node.operator) { + case '!==': + case '!=': + case '>': + return isNumber(node.right, -1); + case '>=': + return isNumber(node.right, 0); + default: + return false; + } + } + function isNegativeCheck(node) { + switch (node.operator) { + case '===': + case '==': + case '<=': + return isNumber(node.right, -1); + case '<': + return isNumber(node.right, 0); + default: + return false; + } + } + function hasSameParameters(nodeA, nodeB) { + if (!ts.isFunctionLike(nodeA) || !ts.isFunctionLike(nodeB)) { + return false; + } + const paramsA = nodeA.parameters; + const paramsB = nodeB.parameters; + if (paramsA.length !== paramsB.length) { + return false; + } + for (let i = 0; i < paramsA.length; ++i) { + const paramA = paramsA[i]; + const paramB = paramsB[i]; + // Check name, type, and question token once. + if (paramA.getText() !== paramB.getText()) { + return false; + } + } + return true; + } + /** + * Parse a given node if it's a `RegExp` instance. + * @param node The node to parse. + */ + function parseRegExp(node) { + const evaluated = (0, util_1.getStaticValue)(node, globalScope); + if (evaluated == null || !(evaluated.value instanceof RegExp)) { + return null; + } + const { flags, pattern } = (0, regexpp_1.parseRegExpLiteral)(evaluated.value); + if (pattern.alternatives.length !== 1 || + flags.ignoreCase || + flags.global) { + return null; + } + // Check if it can determine a unique string. + const chars = pattern.alternatives[0].elements; + if (!chars.every(c => c.type === 'Character')) { + return null; + } + // To string. + return String.fromCodePoint(...chars.map(c => c.value)); + } + function escapeString(str) { + const EscapeMap = { + '\0': '\\0', + '\t': '\\t', + '\n': '\\n', + '\v': '\\v', + '\f': '\\f', + '\r': '\\r', + "'": "\\'", + '\\': '\\\\', + // "\b" cause unexpected replacements + // '\b': '\\b', + }; + const replaceRegex = new RegExp(Object.values(EscapeMap).join('|'), 'g'); + return str.replaceAll(replaceRegex, char => EscapeMap[char]); + } + function checkArrayIndexOf(node, allowFixing) { + if (!(0, util_1.isStaticMemberAccessOfValue)(node, context, 'indexOf')) { + return; + } + // Check if the comparison is equivalent to `includes()`. + const callNode = node.parent; + const compareNode = (callNode.parent.type === utils_1.AST_NODE_TYPES.ChainExpression + ? callNode.parent.parent + : callNode.parent); + const negative = isNegativeCheck(compareNode); + if (!negative && !isPositiveCheck(compareNode)) { + return; + } + // Get the symbol of `indexOf` method. + const indexofMethodDeclarations = services + .getSymbolAtLocation(node.property) + ?.getDeclarations(); + if (indexofMethodDeclarations == null || + indexofMethodDeclarations.length === 0) { + return; + } + // Check if every declaration of `indexOf` method has `includes` method + // and the two methods have the same parameters. + for (const instanceofMethodDecl of indexofMethodDeclarations) { + const typeDecl = instanceofMethodDecl.parent; + const type = checker.getTypeAtLocation(typeDecl); + const includesMethodDecl = type + .getProperty('includes') + ?.getDeclarations(); + if (!includesMethodDecl?.some(includesMethodDecl => hasSameParameters(includesMethodDecl, instanceofMethodDecl))) { + return; + } + } + // Report it. + context.report({ + node: compareNode, + messageId: 'preferIncludes', + ...(allowFixing && { + *fix(fixer) { + if (negative) { + yield fixer.insertTextBefore(callNode, '!'); + } + yield fixer.replaceText(node.property, 'includes'); + yield fixer.removeRange([callNode.range[1], compareNode.range[1]]); + }, + }), + }); + } + return { + // a.indexOf(b) !== 1 + 'BinaryExpression > CallExpression.left > MemberExpression'(node) { + checkArrayIndexOf(node, /* allowFixing */ true); + }, + // a?.indexOf(b) !== 1 + 'BinaryExpression > ChainExpression.left > CallExpression > MemberExpression'(node) { + checkArrayIndexOf(node, /* allowFixing */ false); + }, + // /bar/.test(foo) + 'CallExpression[arguments.length=1] > MemberExpression.callee[property.name="test"][computed=false]'(node) { + const callNode = node.parent; + const text = parseRegExp(node.object); + if (text == null) { + return; + } + //check the argument type of test methods + const argument = callNode.arguments[0]; + const type = (0, util_1.getConstrainedTypeAtLocation)(services, argument); + const includesMethodDecl = type + .getProperty('includes') + ?.getDeclarations(); + if (includesMethodDecl == null) { + return; + } + context.report({ + node: callNode, + messageId: 'preferStringIncludes', + *fix(fixer) { + const argNode = callNode.arguments[0]; + const needsParen = argNode.type !== utils_1.AST_NODE_TYPES.Literal && + argNode.type !== utils_1.AST_NODE_TYPES.TemplateLiteral && + argNode.type !== utils_1.AST_NODE_TYPES.Identifier && + argNode.type !== utils_1.AST_NODE_TYPES.MemberExpression && + argNode.type !== utils_1.AST_NODE_TYPES.CallExpression; + yield fixer.removeRange([callNode.range[0], argNode.range[0]]); + yield fixer.removeRange([argNode.range[1], callNode.range[1]]); + if (needsParen) { + yield fixer.insertTextBefore(argNode, '('); + yield fixer.insertTextAfter(argNode, ')'); + } + yield fixer.insertTextAfter(argNode, `${node.optional ? '?.' : '.'}includes('${escapeString(text)}')`); + }, + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.d.ts new file mode 100644 index 0000000..b524f1f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.d.ts @@ -0,0 +1,5 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"notLiteral" | "notLiteralOrBitwiseExpression", [{ + allowBitwiseExpressions: boolean; +}], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=prefer-literal-enum-member.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.d.ts.map new file mode 100644 index 0000000..3b15046 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-literal-enum-member.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-literal-enum-member.ts"],"names":[],"mappings":";;;AAMA,wBAmJG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js new file mode 100644 index 0000000..bea7026 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js @@ -0,0 +1,116 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'prefer-literal-enum-member', + meta: { + type: 'suggestion', + docs: { + description: 'Require all enum members to be literal values', + recommended: 'strict', + requiresTypeChecking: false, + }, + messages: { + notLiteral: `Explicit enum value must only be a literal value (string or number).`, + notLiteralOrBitwiseExpression: `Explicit enum value must only be a literal value (string or number) or a bitwise expression.`, + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowBitwiseExpressions: { + type: 'boolean', + description: 'Whether to allow using bitwise expressions in enum initializers.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowBitwiseExpressions: false, + }, + ], + create(context, [{ allowBitwiseExpressions }]) { + function isIdentifierWithName(node, name) { + return node.type === utils_1.AST_NODE_TYPES.Identifier && node.name === name; + } + function hasEnumMember(decl, name) { + return decl.body.members.some(member => isIdentifierWithName(member.id, name) || + (member.id.type === utils_1.AST_NODE_TYPES.Literal && + (0, util_1.getStaticStringValue)(member.id) === name)); + } + function isSelfEnumMember(decl, node) { + if (node.type === utils_1.AST_NODE_TYPES.Identifier) { + return hasEnumMember(decl, node.name); + } + if (node.type === utils_1.AST_NODE_TYPES.MemberExpression && + isIdentifierWithName(node.object, decl.id.name)) { + if (node.property.type === utils_1.AST_NODE_TYPES.Identifier) { + return hasEnumMember(decl, node.property.name); + } + if (node.computed) { + const propertyName = (0, util_1.getStaticStringValue)(node.property); + if (propertyName) { + return hasEnumMember(decl, propertyName); + } + } + } + return false; + } + return { + TSEnumMember(node) { + // If there is no initializer, then this node is just the name of the member, so ignore. + if (node.initializer == null) { + return; + } + const declaration = node.parent.parent; + function isAllowedInitializerExpressionRecursive(node, partOfBitwiseComputation) { + // You can only refer to an enum member if it's part of a bitwise computation. + // so C = B isn't allowed (special case), but C = A | B is. + if (partOfBitwiseComputation && isSelfEnumMember(declaration, node)) { + return true; + } + switch (node.type) { + // any old literal + case utils_1.AST_NODE_TYPES.Literal: + return true; + // TemplateLiteral without expressions + case utils_1.AST_NODE_TYPES.TemplateLiteral: + return node.expressions.length === 0; + case utils_1.AST_NODE_TYPES.UnaryExpression: + // +123, -123, etc. + if (['-', '+'].includes(node.operator)) { + return isAllowedInitializerExpressionRecursive(node.argument, partOfBitwiseComputation); + } + if (allowBitwiseExpressions) { + return (node.operator === '~' && + isAllowedInitializerExpressionRecursive(node.argument, true)); + } + return false; + case utils_1.AST_NODE_TYPES.BinaryExpression: + if (allowBitwiseExpressions) { + return (['&', '^', '<<', '>>', '>>>', '|'].includes(node.operator) && + isAllowedInitializerExpressionRecursive(node.left, true) && + isAllowedInitializerExpressionRecursive(node.right, true)); + } + return false; + default: + return false; + } + } + if (isAllowedInitializerExpressionRecursive(node.initializer, false)) { + return; + } + context.report({ + node: node.id, + messageId: allowBitwiseExpressions + ? 'notLiteralOrBitwiseExpression' + : 'notLiteral', + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.d.ts new file mode 100644 index 0000000..4743bbe --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"useNamespace", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=prefer-namespace-keyword.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.d.ts.map new file mode 100644 index 0000000..8b7c842 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-namespace-keyword.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-namespace-keyword.ts"],"names":[],"mappings":";AAIA,wBA2CG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js new file mode 100644 index 0000000..da512e7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'prefer-namespace-keyword', + meta: { + type: 'suggestion', + docs: { + description: 'Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules', + recommended: 'recommended', + }, + fixable: 'code', + messages: { + useNamespace: "Use 'namespace' instead of 'module' to declare custom TypeScript modules.", + }, + schema: [], + }, + defaultOptions: [], + create(context) { + return { + TSModuleDeclaration(node) { + // Do nothing if the name is a string. + if (node.id.type === utils_1.AST_NODE_TYPES.Literal) { + return; + } + // Get tokens of the declaration header. + const moduleType = context.sourceCode.getTokenBefore(node.id); + if (moduleType && + moduleType.type === utils_1.AST_TOKEN_TYPES.Identifier && + moduleType.value === 'module') { + context.report({ + node, + messageId: 'useNamespace', + fix(fixer) { + return fixer.replaceText(moduleType, 'namespace'); + }, + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.d.ts new file mode 100644 index 0000000..20694cd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.d.ts @@ -0,0 +1,21 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type Options = [ + { + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean; + ignoreBooleanCoercion?: boolean; + ignoreConditionalTests?: boolean; + ignoreIfStatements?: boolean; + ignoreMixedLogicalExpressions?: boolean; + ignorePrimitives?: true | { + bigint?: boolean; + boolean?: boolean; + number?: boolean; + string?: boolean; + }; + ignoreTernaryTests?: boolean; + } +]; +export type MessageIds = 'noStrictNullCheck' | 'preferNullishOverAssignment' | 'preferNullishOverOr' | 'preferNullishOverTernary' | 'suggestNullish'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=prefer-nullish-coalescing.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.d.ts.map new file mode 100644 index 0000000..908d4ef --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-nullish-coalescing.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-nullish-coalescing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAyCnE,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,sDAAsD,CAAC,EAAE,OAAO,CAAC;QACjE,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAChC,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,6BAA6B,CAAC,EAAE,OAAO,CAAC;QACxC,gBAAgB,CAAC,EACb,IAAI,GACJ;YACE,MAAM,CAAC,EAAE,OAAO,CAAC;YACjB,OAAO,CAAC,EAAE,OAAO,CAAC;YAClB,MAAM,CAAC,EAAE,OAAO,CAAC;YACjB,MAAM,CAAC,EAAE,OAAO,CAAC;SAClB,CAAC;QACN,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B;CACF,CAAC;AAEF,MAAM,MAAM,UAAU,GAClB,mBAAmB,GACnB,6BAA6B,GAC7B,qBAAqB,GACrB,0BAA0B,GAC1B,gBAAgB,CAAC;;AAErB,wBAglBG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js new file mode 100644 index 0000000..bddcd33 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js @@ -0,0 +1,646 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const getWrappedCode_1 = require("../util/getWrappedCode"); +const isMemberAccessLike = (0, util_1.isNodeOfTypes)([ + utils_1.AST_NODE_TYPES.ChainExpression, + utils_1.AST_NODE_TYPES.Identifier, + utils_1.AST_NODE_TYPES.MemberExpression, +]); +const isNullLiteralOrUndefinedIdentifier = (node) => (0, util_1.isNullLiteral)(node) || (0, util_1.isUndefinedIdentifier)(node); +const isNodeNullishComparison = (node) => isNullLiteralOrUndefinedIdentifier(node.left) && + isNullLiteralOrUndefinedIdentifier(node.right); +exports.default = (0, util_1.createRule)({ + name: 'prefer-nullish-coalescing', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce using the nullish coalescing operator instead of logical assignments or chaining', + recommended: 'stylistic', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + noStrictNullCheck: 'This rule requires the `strictNullChecks` compiler option to be turned on to function correctly.', + preferNullishOverAssignment: 'Prefer using nullish coalescing operator (`??{{ equals }}`) instead of an assignment expression, as it is simpler to read.', + preferNullishOverOr: 'Prefer using nullish coalescing operator (`??{{ equals }}`) instead of a logical {{ description }} (`||{{ equals }}`), as it is a safer operator.', + preferNullishOverTernary: 'Prefer using nullish coalescing operator (`??{{ equals }}`) instead of a ternary expression, as it is simpler to read.', + suggestNullish: 'Fix to nullish coalescing operator (`??{{ equals }}`).', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: { + type: 'boolean', + description: 'Unless this is set to `true`, the rule will error on every file whose `tsconfig.json` does _not_ have the `strictNullChecks` compiler option (or `strict`) set to `true`.', + }, + ignoreBooleanCoercion: { + type: 'boolean', + description: 'Whether to ignore arguments to the `Boolean` constructor', + }, + ignoreConditionalTests: { + type: 'boolean', + description: 'Whether to ignore cases that are located within a conditional test.', + }, + ignoreIfStatements: { + type: 'boolean', + description: 'Whether to ignore any if statements that could be simplified by using the nullish coalescing operator.', + }, + ignoreMixedLogicalExpressions: { + type: 'boolean', + description: 'Whether to ignore any logical or expressions that are part of a mixed logical expression (with `&&`).', + }, + ignorePrimitives: { + description: 'Whether to ignore all (`true`) or some (an object with properties) primitive types.', + oneOf: [ + { + type: 'object', + additionalProperties: false, + description: 'Which primitives types may be ignored.', + properties: { + bigint: { + type: 'boolean', + description: 'Ignore bigint primitive types.', + }, + boolean: { + type: 'boolean', + description: 'Ignore boolean primitive types.', + }, + number: { + type: 'boolean', + description: 'Ignore number primitive types.', + }, + string: { + type: 'boolean', + description: 'Ignore string primitive types.', + }, + }, + }, + { + type: 'boolean', + description: 'Ignore all primitive types.', + enum: [true], + }, + ], + }, + ignoreTernaryTests: { + type: 'boolean', + description: 'Whether to ignore any ternary expressions that could be simplified by using the nullish coalescing operator.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false, + ignoreBooleanCoercion: false, + ignoreConditionalTests: true, + ignoreIfStatements: false, + ignoreMixedLogicalExpressions: false, + ignorePrimitives: { + bigint: false, + boolean: false, + number: false, + string: false, + }, + ignoreTernaryTests: false, + }, + ], + create(context, [{ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing, ignoreBooleanCoercion, ignoreConditionalTests, ignoreIfStatements, ignoreMixedLogicalExpressions, ignorePrimitives, ignoreTernaryTests, },]) { + const parserServices = (0, util_1.getParserServices)(context); + const compilerOptions = parserServices.program.getCompilerOptions(); + const isStrictNullChecks = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'strictNullChecks'); + if (!isStrictNullChecks && + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing !== true) { + context.report({ + loc: { + start: { column: 0, line: 0 }, + end: { column: 0, line: 0 }, + }, + messageId: 'noStrictNullCheck', + }); + } + /** + * Checks whether a type tested for truthiness is eligible for conversion to + * a nullishness check, taking into account the rule's configuration. + */ + function isTypeEligibleForPreferNullish(type) { + if (!(0, util_1.isNullableType)(type)) { + return false; + } + const ignorableFlags = [ + /* eslint-disable @typescript-eslint/no-non-null-assertion */ + (ignorePrimitives === true || ignorePrimitives.bigint) && + ts.TypeFlags.BigIntLike, + (ignorePrimitives === true || ignorePrimitives.boolean) && + ts.TypeFlags.BooleanLike, + (ignorePrimitives === true || ignorePrimitives.number) && + ts.TypeFlags.NumberLike, + (ignorePrimitives === true || ignorePrimitives.string) && + ts.TypeFlags.StringLike, + /* eslint-enable @typescript-eslint/no-non-null-assertion */ + ] + .filter((flag) => typeof flag === 'number') + .reduce((previous, flag) => previous | flag, 0); + if (ignorableFlags === 0) { + // any types are eligible for conversion. + return true; + } + // if the type is `any` or `unknown` we can't make any assumptions + // about the value, so it could be any primitive, even though the flags + // won't be set. + // + // technically, this is true of `void` as well, however, it's a TS error + // to test `void` for truthiness, so we don't need to bother checking for + // it in valid code. + if (tsutils.isTypeFlagSet(type, ts.TypeFlags.Any | ts.TypeFlags.Unknown)) { + return false; + } + if (tsutils + .typeConstituents(type) + .some(t => tsutils + .intersectionConstituents(t) + .some(t => tsutils.isTypeFlagSet(t, ignorableFlags)))) { + return false; + } + return true; + } + /** + * Determines whether a control flow construct that uses the truthiness of + * a test expression is eligible for conversion to the nullish coalescing + * operator, taking into account (both dependent on the rule's configuration): + * 1. Whether the construct is in a permitted syntactic context + * 2. Whether the type of the test expression is deemed eligible for + * conversion + * + * @param node The overall node to be converted (e.g. `a || b` or `a ? a : b`) + * @param testNode The node being tested (i.e. `a`) + */ + function isTruthinessCheckEligibleForPreferNullish({ node, testNode, }) { + const testType = parserServices.getTypeAtLocation(testNode); + if (!isTypeEligibleForPreferNullish(testType)) { + return false; + } + if (ignoreConditionalTests === true && isConditionalTest(node)) { + return false; + } + if (ignoreBooleanCoercion === true && + isBooleanConstructorContext(node, context)) { + return false; + } + return true; + } + function checkAndFixWithPreferNullishOverOr(node, description, equals) { + if (!isTruthinessCheckEligibleForPreferNullish({ + node, + testNode: node.left, + })) { + return; + } + if (ignoreMixedLogicalExpressions === true && + isMixedLogicalExpression(node)) { + return; + } + const barBarOperator = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.left, token => token.type === utils_1.AST_TOKEN_TYPES.Punctuator && + token.value === node.operator), util_1.NullThrowsReasons.MissingToken('operator', node.type)); + function* fix(fixer) { + if ((0, util_1.isLogicalOrOperator)(node.parent)) { + // '&&' and '??' operations cannot be mixed without parentheses (e.g. a && b ?? c) + if (node.left.type === utils_1.AST_NODE_TYPES.LogicalExpression && + !(0, util_1.isLogicalOrOperator)(node.left.left)) { + yield fixer.insertTextBefore(node.left.right, '('); + } + else { + yield fixer.insertTextBefore(node.left, '('); + } + yield fixer.insertTextAfter(node.right, ')'); + } + yield fixer.replaceText(barBarOperator, node.operator.replace('||', '??')); + } + context.report({ + node: barBarOperator, + messageId: 'preferNullishOverOr', + data: { description, equals }, + suggest: [ + { + messageId: 'suggestNullish', + data: { equals }, + fix, + }, + ], + }); + } + function getNullishCoalescingParams(node, nonNullishNode, nodesInsideTestExpression, operator) { + let nullishCoalescingLeftNode; + let hasTruthinessCheck = false; + let hasNullCheckWithoutTruthinessCheck = false; + let hasUndefinedCheckWithoutTruthinessCheck = false; + if (!nodesInsideTestExpression.length) { + hasTruthinessCheck = true; + nullishCoalescingLeftNode = + node.test.type === utils_1.AST_NODE_TYPES.UnaryExpression + ? node.test.argument + : node.test; + if (!areNodesSimilarMemberAccess(nullishCoalescingLeftNode, nonNullishNode)) { + return { isFixable: false }; + } + } + else { + // we check that the test only contains null, undefined and the identifier + for (const testNode of nodesInsideTestExpression) { + if ((0, util_1.isNullLiteral)(testNode)) { + hasNullCheckWithoutTruthinessCheck = true; + } + else if ((0, util_1.isUndefinedIdentifier)(testNode)) { + hasUndefinedCheckWithoutTruthinessCheck = true; + } + else if (areNodesSimilarMemberAccess(testNode, nonNullishNode)) { + // Only consider the first expression in a multi-part nullish check, + // as subsequent expressions might not require all the optional chaining operators. + // For example: a?.b?.c !== undefined && a.b.c !== null ? a.b.c : 'foo'; + // This works because `node.test` is always evaluated first in the loop + // and has the same or more necessary optional chaining operators + // than `node.alternate` or `node.consequent`. + nullishCoalescingLeftNode ??= testNode; + } + else { + return { isFixable: false }; + } + } + } + if (!nullishCoalescingLeftNode) { + return { isFixable: false }; + } + const isFixable = (() => { + if (hasTruthinessCheck) { + return isTruthinessCheckEligibleForPreferNullish({ + node, + testNode: nullishCoalescingLeftNode, + }); + } + // it is fixable if we check for both null and undefined, or not if neither + if (hasUndefinedCheckWithoutTruthinessCheck === + hasNullCheckWithoutTruthinessCheck) { + return hasUndefinedCheckWithoutTruthinessCheck; + } + // it is fixable if we loosely check for either null or undefined + if (['==', '!='].includes(operator)) { + return true; + } + const type = parserServices.getTypeAtLocation(nullishCoalescingLeftNode); + const flags = (0, util_1.getTypeFlags)(type); + if (flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown)) { + return false; + } + const hasNullType = (flags & ts.TypeFlags.Null) !== 0; + // it is fixable if we check for undefined and the type is not nullable + if (hasUndefinedCheckWithoutTruthinessCheck && !hasNullType) { + return true; + } + const hasUndefinedType = (flags & ts.TypeFlags.Undefined) !== 0; + // it is fixable if we check for null and the type can't be undefined + return hasNullCheckWithoutTruthinessCheck && !hasUndefinedType; + })(); + return isFixable + ? { isFixable: true, nullishCoalescingLeftNode } + : { isFixable: false }; + } + return { + 'AssignmentExpression[operator = "||="]'(node) { + checkAndFixWithPreferNullishOverOr(node, 'assignment', '='); + }, + ConditionalExpression(node) { + if (ignoreTernaryTests) { + return; + } + const { nodesInsideTestExpression, operator } = getOperatorAndNodesInsideTestExpression(node); + if (operator == null) { + return; + } + const { nonNullishBranch, nullishBranch } = getBranchNodes(node, operator); + const nullishCoalescingParams = getNullishCoalescingParams(node, nonNullishBranch, nodesInsideTestExpression, operator); + if (nullishCoalescingParams.isFixable) { + context.report({ + node, + messageId: 'preferNullishOverTernary', + // TODO: also account for = in the ternary clause + data: { equals: '' }, + suggest: [ + { + messageId: 'suggestNullish', + data: { equals: '' }, + fix(fixer) { + const nullishBranchText = (0, util_1.getTextWithParentheses)(context.sourceCode, nullishBranch); + const rightOperandReplacement = (0, util_1.isParenthesized)(nullishBranch, context.sourceCode) + ? nullishBranchText + : (0, getWrappedCode_1.getWrappedCode)(nullishBranchText, (0, util_1.getOperatorPrecedenceForNode)(nullishBranch), util_1.OperatorPrecedence.Coalesce); + return fixer.replaceText(node, `${(0, util_1.getTextWithParentheses)(context.sourceCode, nullishCoalescingParams.nullishCoalescingLeftNode)} ?? ${rightOperandReplacement}`); + }, + }, + ], + }); + } + }, + IfStatement(node) { + if (ignoreIfStatements || node.alternate != null) { + return; + } + let assignmentExpression; + if (node.consequent.type === utils_1.AST_NODE_TYPES.BlockStatement && + node.consequent.body.length === 1 && + node.consequent.body[0].type === utils_1.AST_NODE_TYPES.ExpressionStatement) { + assignmentExpression = node.consequent.body[0].expression; + } + else if (node.consequent.type === utils_1.AST_NODE_TYPES.ExpressionStatement) { + assignmentExpression = node.consequent.expression; + } + if (!assignmentExpression || + assignmentExpression.type !== utils_1.AST_NODE_TYPES.AssignmentExpression || + !isMemberAccessLike(assignmentExpression.left)) { + return; + } + const nullishCoalescingLeftNode = assignmentExpression.left; + const nullishCoalescingRightNode = assignmentExpression.right; + const { nodesInsideTestExpression, operator } = getOperatorAndNodesInsideTestExpression(node); + if (operator == null || !['!', '==', '==='].includes(operator)) { + return; + } + const nullishCoalescingParams = getNullishCoalescingParams(node, nullishCoalescingLeftNode, nodesInsideTestExpression, operator); + if (nullishCoalescingParams.isFixable) { + // Handle comments + const isConsequentNodeBlockStatement = node.consequent.type === utils_1.AST_NODE_TYPES.BlockStatement; + const commentsBefore = formatComments(context.sourceCode.getCommentsBefore(assignmentExpression), isConsequentNodeBlockStatement ? '\n' : ' '); + const commentsAfter = isConsequentNodeBlockStatement + ? formatComments(context.sourceCode.getCommentsAfter(assignmentExpression.parent), '\n') + : ''; + context.report({ + node, + messageId: 'preferNullishOverAssignment', + data: { equals: '=' }, + suggest: [ + { + messageId: 'suggestNullish', + data: { equals: '=' }, + fix(fixer) { + const fixes = []; + if (commentsBefore) { + fixes.push(fixer.insertTextBefore(node, commentsBefore)); + } + fixes.push(fixer.replaceText(node, `${(0, util_1.getTextWithParentheses)(context.sourceCode, nullishCoalescingLeftNode)} ??= ${(0, util_1.getTextWithParentheses)(context.sourceCode, nullishCoalescingRightNode)};`)); + if (commentsAfter) { + fixes.push(fixer.insertTextAfter(node, ` ${commentsAfter.slice(0, -1)}`)); + } + return fixes; + }, + }, + ], + }); + } + }, + 'LogicalExpression[operator = "||"]'(node) { + checkAndFixWithPreferNullishOverOr(node, 'or', ''); + }, + }; + }, +}); +function isConditionalTest(node) { + const parent = node.parent; + if (parent == null) { + return false; + } + if (parent.type === utils_1.AST_NODE_TYPES.LogicalExpression) { + return isConditionalTest(parent); + } + if (parent.type === utils_1.AST_NODE_TYPES.ConditionalExpression && + (parent.consequent === node || parent.alternate === node)) { + return isConditionalTest(parent); + } + if (parent.type === utils_1.AST_NODE_TYPES.SequenceExpression && + parent.expressions.at(-1) === node) { + return isConditionalTest(parent); + } + if (parent.type === utils_1.AST_NODE_TYPES.UnaryExpression && + parent.operator === '!') { + return isConditionalTest(parent); + } + if ((parent.type === utils_1.AST_NODE_TYPES.ConditionalExpression || + parent.type === utils_1.AST_NODE_TYPES.DoWhileStatement || + parent.type === utils_1.AST_NODE_TYPES.IfStatement || + parent.type === utils_1.AST_NODE_TYPES.ForStatement || + parent.type === utils_1.AST_NODE_TYPES.WhileStatement) && + parent.test === node) { + return true; + } + return false; +} +function isBooleanConstructorContext(node, context) { + const parent = node.parent; + if (parent == null) { + return false; + } + if (parent.type === utils_1.AST_NODE_TYPES.LogicalExpression) { + return isBooleanConstructorContext(parent, context); + } + if (parent.type === utils_1.AST_NODE_TYPES.ConditionalExpression && + (parent.consequent === node || parent.alternate === node)) { + return isBooleanConstructorContext(parent, context); + } + if (parent.type === utils_1.AST_NODE_TYPES.SequenceExpression && + parent.expressions.at(-1) === node) { + return isBooleanConstructorContext(parent, context); + } + return isBuiltInBooleanCall(parent, context); +} +function isBuiltInBooleanCall(node, context) { + if (node.type === utils_1.AST_NODE_TYPES.CallExpression && + node.callee.type === utils_1.AST_NODE_TYPES.Identifier && + // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum + node.callee.name === 'Boolean' && + node.arguments[0]) { + const scope = context.sourceCode.getScope(node); + const variable = scope.set.get(utils_1.AST_TOKEN_TYPES.Boolean); + return variable == null || variable.defs.length === 0; + } + return false; +} +function isMixedLogicalExpression(node) { + const seen = new Set(); + const queue = [node.parent, node.left, node.right]; + for (const current of queue) { + if (seen.has(current)) { + continue; + } + seen.add(current); + if (current.type === utils_1.AST_NODE_TYPES.LogicalExpression) { + if (current.operator === '&&') { + return true; + } + if (['||', '||='].includes(current.operator)) { + // check the pieces of the node to catch cases like `a || b || c && d` + queue.push(current.parent, current.left, current.right); + } + } + } + return false; +} +/** + * Checks if two TSESTree nodes have the same member access sequence, + * regardless of optional chaining differences. + * + * Note: This does not imply that the nodes are runtime-equivalent. + * + * Example: `a.b.c`, `a?.b.c`, `a.b?.c`, `(a?.b).c`, `(a.b)?.c` are considered similar. + * + * @param a First TSESTree node. + * @param b Second TSESTree node. + * @returns `true` if the nodes access members in the same order; otherwise, `false`. + */ +function areNodesSimilarMemberAccess(a, b) { + if (a.type === utils_1.AST_NODE_TYPES.MemberExpression && + b.type === utils_1.AST_NODE_TYPES.MemberExpression) { + if (!areNodesSimilarMemberAccess(a.object, b.object)) { + return false; + } + if (a.computed === b.computed) { + return (0, util_1.isNodeEqual)(a.property, b.property); + } + if (a.property.type === utils_1.AST_NODE_TYPES.Literal && + b.property.type === utils_1.AST_NODE_TYPES.Identifier) { + return a.property.value === b.property.name; + } + if (a.property.type === utils_1.AST_NODE_TYPES.Identifier && + b.property.type === utils_1.AST_NODE_TYPES.Literal) { + return a.property.name === b.property.value; + } + return false; + } + if (a.type === utils_1.AST_NODE_TYPES.ChainExpression || + b.type === utils_1.AST_NODE_TYPES.ChainExpression) { + return areNodesSimilarMemberAccess((0, util_1.skipChainExpression)(a), (0, util_1.skipChainExpression)(b)); + } + return (0, util_1.isNodeEqual)(a, b); +} +/** + * Returns the branch nodes of a conditional expression: + * - the "nonNullish branch" is the branch when test node is not nullish + * - the "nullish branch" is the branch when test node is nullish + */ +function getBranchNodes(node, operator) { + if (['', '!=', '!=='].includes(operator)) { + return { nonNullishBranch: node.consequent, nullishBranch: node.alternate }; + } + return { nonNullishBranch: node.alternate, nullishBranch: node.consequent }; +} +function getOperatorAndNodesInsideTestExpression(node) { + let operator = null; + let nodesInsideTestExpression = []; + if (isMemberAccessLike(node.test) || + node.test.type === utils_1.AST_NODE_TYPES.UnaryExpression) { + operator = getNonBinaryNodeOperator(node.test); + } + else if (node.test.type === utils_1.AST_NODE_TYPES.BinaryExpression) { + nodesInsideTestExpression = [node.test.left, node.test.right]; + if (node.test.operator === '==' || + node.test.operator === '!=' || + node.test.operator === '===' || + node.test.operator === '!==') { + operator = node.test.operator; + } + } + else if (node.test.type === utils_1.AST_NODE_TYPES.LogicalExpression && + node.test.left.type === utils_1.AST_NODE_TYPES.BinaryExpression && + node.test.right.type === utils_1.AST_NODE_TYPES.BinaryExpression) { + if (isNodeNullishComparison(node.test.left) || + isNodeNullishComparison(node.test.right)) { + return { nodesInsideTestExpression, operator }; + } + nodesInsideTestExpression = [ + node.test.left.left, + node.test.left.right, + node.test.right.left, + node.test.right.right, + ]; + if (['||', '||='].includes(node.test.operator)) { + if (node.test.left.operator === '===' && + node.test.right.operator === '===') { + operator = '==='; + } + else if (((node.test.left.operator === '===' || + node.test.right.operator === '===') && + (node.test.left.operator === '==' || + node.test.right.operator === '==')) || + (node.test.left.operator === '==' && node.test.right.operator === '==')) { + operator = '=='; + } + } + else if (node.test.operator === '&&') { + if (node.test.left.operator === '!==' && + node.test.right.operator === '!==') { + operator = '!=='; + } + else if (((node.test.left.operator === '!==' || + node.test.right.operator === '!==') && + (node.test.left.operator === '!=' || + node.test.right.operator === '!=')) || + (node.test.left.operator === '!=' && node.test.right.operator === '!=')) { + operator = '!='; + } + } + } + return { nodesInsideTestExpression, operator }; +} +function getNonBinaryNodeOperator(node) { + if (node.type !== utils_1.AST_NODE_TYPES.UnaryExpression) { + return ''; + } + if (isMemberAccessLike(node.argument) && node.operator === '!') { + return '!'; + } + return null; +} +function formatComments(comments, separator) { + return comments + .map(({ type, value }) => type === utils_1.AST_TOKEN_TYPES.Line + ? `//${value}${separator}` + : `/*${value}*/${separator}`) + .join(''); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.d.ts new file mode 100644 index 0000000..6b422f4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.d.ts @@ -0,0 +1,12 @@ +export type PreferOptionalChainMessageIds = 'optionalChainSuggest' | 'preferOptionalChain'; +export interface PreferOptionalChainOptions { + allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing?: boolean; + checkAny?: boolean; + checkBigInt?: boolean; + checkBoolean?: boolean; + checkNumber?: boolean; + checkString?: boolean; + checkUnknown?: boolean; + requireNullish?: boolean; +} +//# sourceMappingURL=PreferOptionalChainOptions.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.d.ts.map new file mode 100644 index 0000000..9a9e82b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PreferOptionalChainOptions.d.ts","sourceRoot":"","sources":["../../../src/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,6BAA6B,GACrC,sBAAsB,GACtB,qBAAqB,CAAC;AAE1B,MAAM,WAAW,0BAA0B;IACzC,kEAAkE,CAAC,EAAE,OAAO,CAAC;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.js new file mode 100644 index 0000000..fabb051 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.d.ts new file mode 100644 index 0000000..c267609 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.d.ts @@ -0,0 +1,8 @@ +import type { ParserServicesWithTypeInformation, TSESTree } from '@typescript-eslint/utils'; +import type { RuleContext } from '@typescript-eslint/utils/ts-eslint'; +import type { ValidOperand } from './gatherLogicalOperands'; +import type { PreferOptionalChainMessageIds, PreferOptionalChainOptions } from './PreferOptionalChainOptions'; +export declare function analyzeChain(context: RuleContext, parserServices: ParserServicesWithTypeInformation, options: PreferOptionalChainOptions, node: TSESTree.Node, operator: TSESTree.LogicalExpression['operator'], chain: ValidOperand[]): void; +//# sourceMappingURL=analyzeChain.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.d.ts.map new file mode 100644 index 0000000..f17d621 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"analyzeChain.d.ts","sourceRoot":"","sources":["../../../src/rules/prefer-optional-chain-utils/analyzeChain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAGV,WAAW,EAEZ,MAAM,oCAAoC,CAAC;AAM5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EACV,6BAA6B,EAC7B,0BAA0B,EAC3B,MAAM,8BAA8B,CAAC;AA8etC,wBAAgB,YAAY,CAC1B,OAAO,EAAE,WAAW,CAClB,6BAA6B,EAC7B;IAAC,0BAA0B;CAAC,CAC7B,EACD,cAAc,EAAE,iCAAiC,EACjD,OAAO,EAAE,0BAA0B,EACnC,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,QAAQ,EAAE,QAAQ,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAChD,KAAK,EAAE,YAAY,EAAE,GACpB,IAAI,CA0GN"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.js new file mode 100644 index 0000000..1d18d62 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.js @@ -0,0 +1,467 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.analyzeChain = analyzeChain; +const utils_1 = require("@typescript-eslint/utils"); +const ts_api_utils_1 = require("ts-api-utils"); +const ts = __importStar(require("typescript")); +const util_1 = require("../../util"); +const checkNullishAndReport_1 = require("./checkNullishAndReport"); +const compareNodes_1 = require("./compareNodes"); +const gatherLogicalOperands_1 = require("./gatherLogicalOperands"); +function includesType(parserServices, node, typeFlagIn) { + const typeFlag = typeFlagIn | ts.TypeFlags.Any | ts.TypeFlags.Unknown; + const types = (0, ts_api_utils_1.unionConstituents)(parserServices.getTypeAtLocation(node)); + for (const type of types) { + if ((0, util_1.isTypeFlagSet)(type, typeFlag)) { + return true; + } + } + return false; +} +const analyzeAndChainOperand = (parserServices, operand, index, chain) => { + switch (operand.comparisonType) { + case gatherLogicalOperands_1.NullishComparisonType.Boolean: { + const nextOperand = chain.at(index + 1); + if (nextOperand?.comparisonType === + gatherLogicalOperands_1.NullishComparisonType.NotStrictEqualNull && + operand.comparedName.type === utils_1.AST_NODE_TYPES.Identifier) { + return null; + } + return [operand]; + } + case gatherLogicalOperands_1.NullishComparisonType.NotEqualNullOrUndefined: + return [operand]; + case gatherLogicalOperands_1.NullishComparisonType.NotStrictEqualNull: { + // handle `x !== null && x !== undefined` + const nextOperand = chain.at(index + 1); + if (nextOperand?.comparisonType === + gatherLogicalOperands_1.NullishComparisonType.NotStrictEqualUndefined && + (0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) === + compareNodes_1.NodeComparisonResult.Equal) { + return [operand, nextOperand]; + } + if (includesType(parserServices, operand.comparedName, ts.TypeFlags.Undefined)) { + // we know the next operand is not an `undefined` check and that this + // operand includes `undefined` - which means that making this an + // optional chain would change the runtime behavior of the expression + return null; + } + return [operand]; + } + case gatherLogicalOperands_1.NullishComparisonType.NotStrictEqualUndefined: { + // handle `x !== undefined && x !== null` + const nextOperand = chain.at(index + 1); + if (nextOperand?.comparisonType === + gatherLogicalOperands_1.NullishComparisonType.NotStrictEqualNull && + (0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) === + compareNodes_1.NodeComparisonResult.Equal) { + return [operand, nextOperand]; + } + if (includesType(parserServices, operand.comparedName, ts.TypeFlags.Null)) { + // we know the next operand is not a `null` check and that this + // operand includes `null` - which means that making this an + // optional chain would change the runtime behavior of the expression + return null; + } + return [operand]; + } + default: + return null; + } +}; +const analyzeOrChainOperand = (parserServices, operand, index, chain) => { + switch (operand.comparisonType) { + case gatherLogicalOperands_1.NullishComparisonType.NotBoolean: + case gatherLogicalOperands_1.NullishComparisonType.EqualNullOrUndefined: + return [operand]; + case gatherLogicalOperands_1.NullishComparisonType.StrictEqualNull: { + // handle `x === null || x === undefined` + const nextOperand = chain.at(index + 1); + if (nextOperand?.comparisonType === + gatherLogicalOperands_1.NullishComparisonType.StrictEqualUndefined && + (0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) === + compareNodes_1.NodeComparisonResult.Equal) { + return [operand, nextOperand]; + } + if (includesType(parserServices, operand.comparedName, ts.TypeFlags.Undefined)) { + // we know the next operand is not an `undefined` check and that this + // operand includes `undefined` - which means that making this an + // optional chain would change the runtime behavior of the expression + return null; + } + return [operand]; + } + case gatherLogicalOperands_1.NullishComparisonType.StrictEqualUndefined: { + // handle `x === undefined || x === null` + const nextOperand = chain.at(index + 1); + if (nextOperand?.comparisonType === gatherLogicalOperands_1.NullishComparisonType.StrictEqualNull && + (0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) === + compareNodes_1.NodeComparisonResult.Equal) { + return [operand, nextOperand]; + } + if (includesType(parserServices, operand.comparedName, ts.TypeFlags.Null)) { + // we know the next operand is not a `null` check and that this + // operand includes `null` - which means that making this an + // optional chain would change the runtime behavior of the expression + return null; + } + return [operand]; + } + default: + return null; + } +}; +/** + * Returns the range that needs to be reported from the chain. + * @param chain The chain of logical expressions. + * @param boundary The boundary range that the range to report cannot fall outside. + * @param sourceCode The source code to get tokens. + * @returns The range to report. + */ +function getReportRange(chain, boundary, sourceCode) { + const leftNode = chain[0].node; + const rightNode = chain[chain.length - 1].node; + let leftMost = (0, util_1.nullThrows)(sourceCode.getFirstToken(leftNode), util_1.NullThrowsReasons.MissingToken('any token', leftNode.type)); + let rightMost = (0, util_1.nullThrows)(sourceCode.getLastToken(rightNode), util_1.NullThrowsReasons.MissingToken('any token', rightNode.type)); + while (leftMost.range[0] > boundary[0]) { + const token = sourceCode.getTokenBefore(leftMost); + if (!token || !(0, util_1.isOpeningParenToken)(token) || token.range[0] < boundary[0]) { + break; + } + leftMost = token; + } + while (rightMost.range[1] < boundary[1]) { + const token = sourceCode.getTokenAfter(rightMost); + if (!token || !(0, util_1.isClosingParenToken)(token) || token.range[1] > boundary[1]) { + break; + } + rightMost = token; + } + return [leftMost.range[0], rightMost.range[1]]; +} +function getReportDescriptor(sourceCode, parserServices, node, operator, options, chain) { + const lastOperand = chain[chain.length - 1]; + let useSuggestionFixer; + if (options.allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing === + true) { + // user has opted-in to the unsafe behavior + useSuggestionFixer = false; + } + // optional chain specifically will union `undefined` into the final type + // so we need to make sure that there is at least one operand that includes + // `undefined`, or else we're going to change the final type - which is + // unsafe and might cause downstream type errors. + else if (lastOperand.comparisonType === gatherLogicalOperands_1.NullishComparisonType.EqualNullOrUndefined || + lastOperand.comparisonType === + gatherLogicalOperands_1.NullishComparisonType.NotEqualNullOrUndefined || + lastOperand.comparisonType === gatherLogicalOperands_1.NullishComparisonType.StrictEqualUndefined || + lastOperand.comparisonType === + gatherLogicalOperands_1.NullishComparisonType.NotStrictEqualUndefined || + (operator === '||' && + lastOperand.comparisonType === gatherLogicalOperands_1.NullishComparisonType.NotBoolean)) { + // we know the last operand is an equality check - so the change in types + // DOES NOT matter and will not change the runtime result or cause a type + // check error + useSuggestionFixer = false; + } + else { + useSuggestionFixer = true; + for (const operand of chain) { + if (includesType(parserServices, operand.node, ts.TypeFlags.Undefined)) { + useSuggestionFixer = false; + break; + } + } + // TODO - we could further reduce the false-positive rate of this check by + // checking for cases where the change in types don't matter like + // the test location of an if/while/etc statement. + // but it's quite complex to do this without false-negatives, so + // for now we'll just be over-eager with our matching. + // + // it's MUCH better to false-positive here and only provide a + // suggestion fixer, rather than false-negative and autofix to + // broken code. + } + // In its most naive form we could just slap `?.` for every single part of the + // chain. However this would be undesirable because it'd create unnecessary + // conditions in the user's code where there were none before - and it would + // cause errors with rules like our `no-unnecessary-condition`. + // + // Instead we want to include the minimum number of `?.` required to correctly + // unify the code into a single chain. Naively you might think that we can + // just take the final operand add `?.` after the locations from the previous + // operands - however this won't be correct either because earlier operands + // can include a necessary `?.` that's not needed or included in a later + // operand. + // + // So instead what we need to do is to start at the first operand and + // iteratively diff it against the next operand, and add the difference to the + // first operand. + // + // eg + // `foo && foo.bar && foo.bar.baz?.bam && foo.bar.baz.bam()` + // 1) `foo` + // 2) diff(`foo`, `foo.bar`) = `.bar` + // 3) result = `foo?.bar` + // 4) diff(`foo.bar`, `foo.bar.baz?.bam`) = `.baz?.bam` + // 5) result = `foo?.bar?.baz?.bam` + // 6) diff(`foo.bar.baz?.bam`, `foo.bar.baz.bam()`) = `()` + // 7) result = `foo?.bar?.baz?.bam?.()` + const parts = []; + for (const current of chain) { + const nextOperand = flattenChainExpression(sourceCode, current.comparedName); + const diff = nextOperand.slice(parts.length); + if (diff.length > 0) { + if (parts.length > 0) { + // we need to make the first operand of the diff optional so it matches the + // logic before merging + // foo.bar && foo.bar.baz + // diff = .baz + // result = foo.bar?.baz + diff[0].optional = true; + } + parts.push(...diff); + } + } + let newCode = parts + .map(part => { + let str = ''; + if (part.optional) { + str += '?.'; + } + else { + if (part.nonNull) { + str += '!'; + } + if (part.requiresDot) { + str += '.'; + } + } + if (part.precedence !== util_1.OperatorPrecedence.Invalid && + part.precedence < util_1.OperatorPrecedence.Member) { + str += `(${part.text})`; + } + else { + str += part.text; + } + return str; + }) + .join(''); + if (lastOperand.node.type === utils_1.AST_NODE_TYPES.BinaryExpression) { + // retain the ending comparison for cases like + // x && x.a != null + // x && typeof x.a !== 'undefined' + const operator = lastOperand.node.operator; + const { left, right } = (() => { + if (lastOperand.isYoda) { + const unaryOperator = lastOperand.node.right.type === utils_1.AST_NODE_TYPES.UnaryExpression + ? `${lastOperand.node.right.operator} ` + : ''; + return { + left: sourceCode.getText(lastOperand.node.left), + right: unaryOperator + newCode, + }; + } + const unaryOperator = lastOperand.node.left.type === utils_1.AST_NODE_TYPES.UnaryExpression + ? `${lastOperand.node.left.operator} ` + : ''; + return { + left: unaryOperator + newCode, + right: sourceCode.getText(lastOperand.node.right), + }; + })(); + newCode = `${left} ${operator} ${right}`; + } + else if (lastOperand.comparisonType === gatherLogicalOperands_1.NullishComparisonType.NotBoolean) { + newCode = `!${newCode}`; + } + const reportRange = getReportRange(chain, node.range, sourceCode); + const fix = fixer => fixer.replaceTextRange(reportRange, newCode); + return { + loc: { + end: sourceCode.getLocFromIndex(reportRange[1]), + start: sourceCode.getLocFromIndex(reportRange[0]), + }, + messageId: 'preferOptionalChain', + ...(0, util_1.getFixOrSuggest)({ + fixOrSuggest: useSuggestionFixer ? 'suggest' : 'fix', + suggestion: { + fix, + messageId: 'optionalChainSuggest', + }, + }), + }; + function flattenChainExpression(sourceCode, node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.ChainExpression: + return flattenChainExpression(sourceCode, node.expression); + case utils_1.AST_NODE_TYPES.CallExpression: { + const argumentsText = (() => { + const closingParenToken = (0, util_1.nullThrows)(sourceCode.getLastToken(node), util_1.NullThrowsReasons.MissingToken('closing parenthesis', node.type)); + const openingParenToken = (0, util_1.nullThrows)(sourceCode.getFirstTokenBetween(node.typeArguments ?? node.callee, closingParenToken, util_1.isOpeningParenToken), util_1.NullThrowsReasons.MissingToken('opening parenthesis', node.type)); + return sourceCode.text.substring(openingParenToken.range[0], closingParenToken.range[1]); + })(); + const typeArgumentsText = (() => { + if (node.typeArguments == null) { + return ''; + } + return sourceCode.getText(node.typeArguments); + })(); + return [ + ...flattenChainExpression(sourceCode, node.callee), + { + nonNull: false, + optional: node.optional, + // no precedence for this + precedence: util_1.OperatorPrecedence.Invalid, + requiresDot: false, + text: typeArgumentsText + argumentsText, + }, + ]; + } + case utils_1.AST_NODE_TYPES.MemberExpression: { + const propertyText = sourceCode.getText(node.property); + return [ + ...flattenChainExpression(sourceCode, node.object), + { + nonNull: node.object.type === utils_1.AST_NODE_TYPES.TSNonNullExpression, + optional: node.optional, + precedence: node.computed + ? // computed is already wrapped in [] so no need to wrap in () as well + util_1.OperatorPrecedence.Invalid + : (0, util_1.getOperatorPrecedenceForNode)(node.property), + requiresDot: !node.computed, + text: node.computed ? `[${propertyText}]` : propertyText, + }, + ]; + } + case utils_1.AST_NODE_TYPES.TSNonNullExpression: + return flattenChainExpression(sourceCode, node.expression); + default: + return [ + { + nonNull: false, + optional: false, + precedence: (0, util_1.getOperatorPrecedenceForNode)(node), + requiresDot: false, + text: sourceCode.getText(node), + }, + ]; + } + } +} +function analyzeChain(context, parserServices, options, node, operator, chain) { + // need at least 2 operands in a chain for it to be a chain + if (chain.length <= 1 || + /* istanbul ignore next -- previous checks make this unreachable, but keep it for exhaustiveness check */ + operator === '??') { + return; + } + const analyzeOperand = (() => { + switch (operator) { + case '&&': + return analyzeAndChainOperand; + case '||': + return analyzeOrChainOperand; + } + })(); + // Things like x !== null && x !== undefined have two nodes, but they are + // one logical unit here, so we'll allow them to be grouped. + let subChain = []; + const maybeReportThenReset = (newChainSeed) => { + if (subChain.length > 1) { + const subChainFlat = subChain.flat(); + (0, checkNullishAndReport_1.checkNullishAndReport)(context, parserServices, options, subChainFlat.slice(0, -1).map(({ node }) => node), getReportDescriptor(context.sourceCode, parserServices, node, operator, options, subChainFlat)); + } + // we've reached the end of a chain of logical expressions + // i.e. the current operand doesn't belong to the previous chain. + // + // we don't want to throw away the current operand otherwise we will skip it + // and that can cause us to miss chains. So instead we seed the new chain + // with the current operand + // + // eg this means we can catch cases like: + // unrelated != null && foo != null && foo.bar != null; + // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ first "chain" + // ^^^^^^^^^^^ newChainSeed + // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ second chain + subChain = newChainSeed ? [newChainSeed] : []; + }; + for (let i = 0; i < chain.length; i += 1) { + const lastOperand = subChain.flat().at(-1); + const operand = chain[i]; + const validatedOperands = analyzeOperand(parserServices, operand, i, chain); + if (!validatedOperands) { + // TODO - #7170 + // check if the name is a superset/equal - if it is, then it likely + // intended to be part of the chain and something we should include in the + // report, eg + // foo == null || foo.bar; + // ^^^^^^^^^^^ valid OR chain + // ^^^^^^^ invalid OR chain logical, but still part of + // the chain for combination purposes + maybeReportThenReset(); + continue; + } + // in case multiple operands were consumed - make sure to correctly increment the index + i += validatedOperands.length - 1; + const currentOperand = validatedOperands[0]; + if (lastOperand) { + const comparisonResult = (0, compareNodes_1.compareNodes)(lastOperand.comparedName, + // purposely inspect and push the last operand because the prior operands don't matter + // this also means we won't false-positive in cases like + // foo !== null && foo !== undefined + validatedOperands[validatedOperands.length - 1].comparedName); + if (comparisonResult === compareNodes_1.NodeComparisonResult.Subset) { + // the operands are comparable, so we can continue searching + subChain.push(currentOperand); + } + else if (comparisonResult === compareNodes_1.NodeComparisonResult.Invalid) { + maybeReportThenReset(validatedOperands); + } + else { + // purposely don't push this case because the node is a no-op and if + // we consider it then we might report on things like + // foo && foo + } + } + else { + subChain.push(currentOperand); + } + } + // check the leftovers + maybeReportThenReset(); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.d.ts new file mode 100644 index 0000000..20834f1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.d.ts @@ -0,0 +1,7 @@ +import type { ParserServicesWithTypeInformation, TSESTree } from '@typescript-eslint/utils'; +import type { ReportDescriptor, RuleContext } from '@typescript-eslint/utils/ts-eslint'; +import type { PreferOptionalChainMessageIds, PreferOptionalChainOptions } from './PreferOptionalChainOptions'; +export declare function checkNullishAndReport(context: RuleContext, parserServices: ParserServicesWithTypeInformation, { requireNullish }: PreferOptionalChainOptions, maybeNullishNodes: TSESTree.Expression[], descriptor: ReportDescriptor): void; +//# sourceMappingURL=checkNullishAndReport.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.d.ts.map new file mode 100644 index 0000000..498ce32 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"checkNullishAndReport.d.ts","sourceRoot":"","sources":["../../../src/rules/prefer-optional-chain-utils/checkNullishAndReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,oCAAoC,CAAC;AAM5C,OAAO,KAAK,EACV,6BAA6B,EAC7B,0BAA0B,EAC3B,MAAM,8BAA8B,CAAC;AAEtC,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,CAClB,6BAA6B,EAC7B;IAAC,0BAA0B;CAAC,CAC7B,EACD,cAAc,EAAE,iCAAiC,EACjD,EAAE,cAAc,EAAE,EAAE,0BAA0B,EAC9C,iBAAiB,EAAE,QAAQ,CAAC,UAAU,EAAE,EACxC,UAAU,EAAE,gBAAgB,CAAC,6BAA6B,CAAC,GAC1D,IAAI,CAWN"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js new file mode 100644 index 0000000..46aff3a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js @@ -0,0 +1,45 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkNullishAndReport = checkNullishAndReport; +const type_utils_1 = require("@typescript-eslint/type-utils"); +const ts_api_utils_1 = require("ts-api-utils"); +const ts = __importStar(require("typescript")); +function checkNullishAndReport(context, parserServices, { requireNullish }, maybeNullishNodes, descriptor) { + if (!requireNullish || + maybeNullishNodes.some(node => (0, ts_api_utils_1.unionConstituents)(parserServices.getTypeAtLocation(node)).some(t => (0, type_utils_1.isTypeFlagSet)(t, ts.TypeFlags.Null | ts.TypeFlags.Undefined)))) { + context.report(descriptor); + } +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/compareNodes.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/compareNodes.d.ts new file mode 100644 index 0000000..0266e6d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/compareNodes.d.ts @@ -0,0 +1,16 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +export declare const enum NodeComparisonResult { + /** the two nodes are comparably the same */ + Equal = "Equal", + /** the left node is a subset of the right node */ + Subset = "Subset", + /** the left node is not the same or is a superset of the right node */ + Invalid = "Invalid" +} +type CompareNodesArgument = TSESTree.Node | null | undefined; +/** + * Compares two nodes' ASTs to determine if the A is equal to or a subset of B + */ +export declare function compareNodes(nodeA: CompareNodesArgument, nodeB: CompareNodesArgument): NodeComparisonResult; +export {}; +//# sourceMappingURL=compareNodes.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/compareNodes.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/compareNodes.d.ts.map new file mode 100644 index 0000000..db8f8e6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/compareNodes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"compareNodes.d.ts","sourceRoot":"","sources":["../../../src/rules/prefer-optional-chain-utils/compareNodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAKzD,0BAAkB,oBAAoB;IACpC,4CAA4C;IAC5C,KAAK,UAAU;IACf,kDAAkD;IAClD,MAAM,WAAW;IACjB,uEAAuE;IACvE,OAAO,YAAY;CACpB;AA8GD,KAAK,oBAAoB,GAAG,QAAQ,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;AAuQ7D;;GAEG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,oBAAoB,EAC3B,KAAK,EAAE,oBAAoB,GAC1B,oBAAoB,CAqBtB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/compareNodes.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/compareNodes.js new file mode 100644 index 0000000..88e9505 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/compareNodes.js @@ -0,0 +1,326 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NodeComparisonResult = void 0; +exports.compareNodes = compareNodes; +const utils_1 = require("@typescript-eslint/utils"); +const visitor_keys_1 = require("@typescript-eslint/visitor-keys"); +var NodeComparisonResult; +(function (NodeComparisonResult) { + /** the two nodes are comparably the same */ + NodeComparisonResult["Equal"] = "Equal"; + /** the left node is a subset of the right node */ + NodeComparisonResult["Subset"] = "Subset"; + /** the left node is not the same or is a superset of the right node */ + NodeComparisonResult["Invalid"] = "Invalid"; +})(NodeComparisonResult || (exports.NodeComparisonResult = NodeComparisonResult = {})); +function compareArrays(arrayA, arrayB) { + if (arrayA.length !== arrayB.length) { + return NodeComparisonResult.Invalid; + } + const result = arrayA.every((elA, idx) => { + const elB = arrayB[idx]; + if (elA == null || elB == null) { + return elA === elB; + } + return compareUnknownValues(elA, elB) === NodeComparisonResult.Equal; + }); + if (result) { + return NodeComparisonResult.Equal; + } + return NodeComparisonResult.Invalid; +} +function isValidNode(x) { + return (typeof x === 'object' && + x != null && + 'type' in x && + typeof x.type === 'string'); +} +function isValidChainExpressionToLookThrough(node) { + return (!(node.parent?.type === utils_1.AST_NODE_TYPES.MemberExpression && + node.parent.object === node) && + !(node.parent?.type === utils_1.AST_NODE_TYPES.CallExpression && + node.parent.callee === node) && + node.type === utils_1.AST_NODE_TYPES.ChainExpression); +} +function compareUnknownValues(valueA, valueB) { + /* istanbul ignore if -- not possible for us to test this - it's just a sanity safeguard */ + if (valueA == null || valueB == null) { + if (valueA !== valueB) { + return NodeComparisonResult.Invalid; + } + return NodeComparisonResult.Equal; + } + /* istanbul ignore if -- not possible for us to test this - it's just a sanity safeguard */ + if (!isValidNode(valueA) || !isValidNode(valueB)) { + return NodeComparisonResult.Invalid; + } + return compareNodes(valueA, valueB); +} +function compareByVisiting(nodeA, nodeB) { + const currentVisitorKeys = visitor_keys_1.visitorKeys[nodeA.type]; + /* istanbul ignore if -- not possible for us to test this - it's just a sanity safeguard */ + if (currentVisitorKeys == null) { + // we don't know how to visit this node, so assume it's invalid to avoid false-positives / broken fixers + return NodeComparisonResult.Invalid; + } + if (currentVisitorKeys.length === 0) { + // assume nodes with no keys are constant things like keywords + return NodeComparisonResult.Equal; + } + for (const key of currentVisitorKeys) { + // @ts-expect-error - dynamic access but it's safe + const nodeAChildOrChildren = nodeA[key]; + // @ts-expect-error - dynamic access but it's safe + const nodeBChildOrChildren = nodeB[key]; + if (Array.isArray(nodeAChildOrChildren)) { + const arrayA = nodeAChildOrChildren; + const arrayB = nodeBChildOrChildren; + const result = compareArrays(arrayA, arrayB); + if (result !== NodeComparisonResult.Equal) { + return NodeComparisonResult.Invalid; + } + // fallthrough to the next key as the key was "equal" + } + else { + const result = compareUnknownValues(nodeAChildOrChildren, nodeBChildOrChildren); + if (result !== NodeComparisonResult.Equal) { + return NodeComparisonResult.Invalid; + } + // fallthrough to the next key as the key was "equal" + } + } + return NodeComparisonResult.Equal; +} +function compareNodesUncached(nodeA, nodeB) { + if (nodeA.type !== nodeB.type) { + // special cases where nodes are allowed to be non-equal + // look through a chain expression node at the top-level because it only + // exists to delimit the end of an optional chain + // + // a?.b && a.b.c + // ^^^^ ChainExpression, MemberExpression + // ^^^^^ MemberExpression + // + // except for in this class of cases + // (a?.b).c && a.b.c + // because the parentheses have runtime meaning (sad face) + if (isValidChainExpressionToLookThrough(nodeA)) { + return compareNodes(nodeA.expression, nodeB); + } + if (isValidChainExpressionToLookThrough(nodeB)) { + return compareNodes(nodeA, nodeB.expression); + } + // look through the type-only non-null assertion because its existence could + // possibly be replaced by an optional chain instead + // + // a.b! && a.b.c + // ^^^^ TSNonNullExpression + if (nodeA.type === utils_1.AST_NODE_TYPES.TSNonNullExpression) { + return compareNodes(nodeA.expression, nodeB); + } + if (nodeB.type === utils_1.AST_NODE_TYPES.TSNonNullExpression) { + return compareNodes(nodeA, nodeB.expression); + } + // special case for subset optional chains where the node types don't match, + // but we want to try comparing by discarding the "extra" code + // + // a && a.b + // ^ compare this + // a && a() + // ^ compare this + // a.b && a.b() + // ^^^ compare this + // a() && a().b + // ^^^ compare this + // import.meta && import.meta.b + // ^^^^^^^^^^^ compare this + if (nodeA.type === utils_1.AST_NODE_TYPES.CallExpression || + nodeA.type === utils_1.AST_NODE_TYPES.Identifier || + nodeA.type === utils_1.AST_NODE_TYPES.MemberExpression || + nodeA.type === utils_1.AST_NODE_TYPES.MetaProperty) { + switch (nodeB.type) { + case utils_1.AST_NODE_TYPES.MemberExpression: + if (nodeB.property.type === utils_1.AST_NODE_TYPES.PrivateIdentifier) { + // Private identifiers in optional chaining is not currently allowed + // TODO - handle this once TS supports it (https://github.com/microsoft/TypeScript/issues/42734) + return NodeComparisonResult.Invalid; + } + if (compareNodes(nodeA, nodeB.object) !== NodeComparisonResult.Invalid) { + return NodeComparisonResult.Subset; + } + return NodeComparisonResult.Invalid; + case utils_1.AST_NODE_TYPES.CallExpression: + if (compareNodes(nodeA, nodeB.callee) !== NodeComparisonResult.Invalid) { + return NodeComparisonResult.Subset; + } + return NodeComparisonResult.Invalid; + default: + return NodeComparisonResult.Invalid; + } + } + return NodeComparisonResult.Invalid; + } + switch (nodeA.type) { + // these expressions create a new instance each time - so it makes no sense to compare the chain + case utils_1.AST_NODE_TYPES.ArrayExpression: + case utils_1.AST_NODE_TYPES.ArrowFunctionExpression: + case utils_1.AST_NODE_TYPES.ClassExpression: + case utils_1.AST_NODE_TYPES.FunctionExpression: + case utils_1.AST_NODE_TYPES.JSXElement: + case utils_1.AST_NODE_TYPES.JSXFragment: + case utils_1.AST_NODE_TYPES.NewExpression: + case utils_1.AST_NODE_TYPES.ObjectExpression: + return NodeComparisonResult.Invalid; + // chaining from assignments could change the value irrevocably - so it makes no sense to compare the chain + case utils_1.AST_NODE_TYPES.AssignmentExpression: + return NodeComparisonResult.Invalid; + case utils_1.AST_NODE_TYPES.CallExpression: { + const nodeBCall = nodeB; + // check for cases like + // foo() && foo()(bar) + // ^^^^^ nodeA + // ^^^^^^^^^^ nodeB + // we don't want to check the arguments in this case + const aSubsetOfB = compareNodes(nodeA, nodeBCall.callee); + if (aSubsetOfB !== NodeComparisonResult.Invalid) { + return NodeComparisonResult.Subset; + } + const calleeCompare = compareNodes(nodeA.callee, nodeBCall.callee); + if (calleeCompare !== NodeComparisonResult.Equal) { + return NodeComparisonResult.Invalid; + } + // NOTE - we purposely ignore optional flag because for our purposes + // foo?.bar() && foo.bar?.()?.baz + // or + // foo.bar() && foo?.bar?.()?.baz + // are going to be exactly the same + const argumentCompare = compareArrays(nodeA.arguments, nodeBCall.arguments); + if (argumentCompare !== NodeComparisonResult.Equal) { + return NodeComparisonResult.Invalid; + } + const typeParamCompare = compareNodes(nodeA.typeArguments, nodeBCall.typeArguments); + if (typeParamCompare === NodeComparisonResult.Equal) { + return NodeComparisonResult.Equal; + } + return NodeComparisonResult.Invalid; + } + case utils_1.AST_NODE_TYPES.ChainExpression: + // special case handling for ChainExpression because it's allowed to be a subset + return compareNodes(nodeA, nodeB.expression); + case utils_1.AST_NODE_TYPES.Identifier: + case utils_1.AST_NODE_TYPES.PrivateIdentifier: + if (nodeA.name === nodeB.name) { + return NodeComparisonResult.Equal; + } + return NodeComparisonResult.Invalid; + case utils_1.AST_NODE_TYPES.Literal: { + const nodeBLiteral = nodeB; + if (nodeA.raw === nodeBLiteral.raw && + nodeA.value === nodeBLiteral.value) { + return NodeComparisonResult.Equal; + } + return NodeComparisonResult.Invalid; + } + case utils_1.AST_NODE_TYPES.MemberExpression: { + const nodeBMember = nodeB; + if (nodeBMember.property.type === utils_1.AST_NODE_TYPES.PrivateIdentifier) { + // Private identifiers in optional chaining is not currently allowed + // TODO - handle this once TS supports it (https://github.com/microsoft/TypeScript/issues/42734) + return NodeComparisonResult.Invalid; + } + // check for cases like + // foo.bar && foo.bar.baz + // ^^^^^^^ nodeA + // ^^^^^^^^^^^ nodeB + // result === Equal + // + // foo.bar && foo.bar.baz.bam + // ^^^^^^^ nodeA + // ^^^^^^^^^^^^^^^ nodeB + // result === Subset + // + // we don't want to check the property in this case + const aSubsetOfB = compareNodes(nodeA, nodeBMember.object); + if (aSubsetOfB !== NodeComparisonResult.Invalid) { + return NodeComparisonResult.Subset; + } + if (nodeA.computed !== nodeBMember.computed) { + return NodeComparisonResult.Invalid; + } + // NOTE - we purposely ignore optional flag because for our purposes + // foo?.bar && foo.bar?.baz + // or + // foo.bar && foo?.bar?.baz + // are going to be exactly the same + const objectCompare = compareNodes(nodeA.object, nodeBMember.object); + if (objectCompare !== NodeComparisonResult.Equal) { + return NodeComparisonResult.Invalid; + } + return compareNodes(nodeA.property, nodeBMember.property); + } + case utils_1.AST_NODE_TYPES.TSTemplateLiteralType: + case utils_1.AST_NODE_TYPES.TemplateLiteral: { + const nodeBTemplate = nodeB; + const areQuasisEqual = nodeA.quasis.length === nodeBTemplate.quasis.length && + nodeA.quasis.every((elA, idx) => { + const elB = nodeBTemplate.quasis[idx]; + return elA.value.cooked === elB.value.cooked; + }); + if (!areQuasisEqual) { + return NodeComparisonResult.Invalid; + } + return NodeComparisonResult.Equal; + } + case utils_1.AST_NODE_TYPES.TemplateElement: { + const nodeBElement = nodeB; + if (nodeA.value.cooked === nodeBElement.value.cooked) { + return NodeComparisonResult.Equal; + } + return NodeComparisonResult.Invalid; + } + // these aren't actually valid expressions. + // https://github.com/typescript-eslint/typescript-eslint/blob/20d7caee35ab84ae6381fdf04338c9e2b9e2bc48/packages/ast-spec/src/unions/Expression.ts#L37-L43 + case utils_1.AST_NODE_TYPES.ArrayPattern: + case utils_1.AST_NODE_TYPES.ObjectPattern: + /* istanbul ignore next */ + return NodeComparisonResult.Invalid; + // update expression returns a number and also changes the value each time - so it makes no sense to compare the chain + case utils_1.AST_NODE_TYPES.UpdateExpression: + return NodeComparisonResult.Invalid; + // yield returns the value passed to the `next` function, so it may not be the same each time - so it makes no sense to compare the chain + case utils_1.AST_NODE_TYPES.YieldExpression: + return NodeComparisonResult.Invalid; + // general-case automatic handling of nodes to save us implementing every + // single case by hand. This just iterates the visitor keys to recursively + // check the children. + // + // Any specific logic cases or short-circuits should be listed as separate + // cases so that they don't fall into this generic handling + default: + return compareByVisiting(nodeA, nodeB); + } +} +const COMPARE_NODES_CACHE = new WeakMap(); +/** + * Compares two nodes' ASTs to determine if the A is equal to or a subset of B + */ +function compareNodes(nodeA, nodeB) { + if (nodeA == null || nodeB == null) { + if (nodeA !== nodeB) { + return NodeComparisonResult.Invalid; + } + return NodeComparisonResult.Equal; + } + const cached = COMPARE_NODES_CACHE.get(nodeA)?.get(nodeB); + if (cached) { + return cached; + } + const result = compareNodesUncached(nodeA, nodeB); + let mapA = COMPARE_NODES_CACHE.get(nodeA); + if (mapA == null) { + mapA = new WeakMap(); + COMPARE_NODES_CACHE.set(nodeA, mapA); + } + mapA.set(nodeB, result); + return result; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.d.ts new file mode 100644 index 0000000..0a63fbe --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.d.ts @@ -0,0 +1,42 @@ +import type { ParserServicesWithTypeInformation, TSESTree } from '@typescript-eslint/utils'; +import type { SourceCode } from '@typescript-eslint/utils/ts-eslint'; +import type { PreferOptionalChainOptions } from './PreferOptionalChainOptions'; +export declare const enum OperandValidity { + Valid = "Valid", + Invalid = "Invalid" +} +export declare const enum NullishComparisonType { + /** `x != null`, `x != undefined` */ + NotEqualNullOrUndefined = "NotEqualNullOrUndefined", + /** `x == null`, `x == undefined` */ + EqualNullOrUndefined = "EqualNullOrUndefined", + /** `x !== null` */ + NotStrictEqualNull = "NotStrictEqualNull", + /** `x === null` */ + StrictEqualNull = "StrictEqualNull", + /** `x !== undefined`, `typeof x !== 'undefined'` */ + NotStrictEqualUndefined = "NotStrictEqualUndefined", + /** `x === undefined`, `typeof x === 'undefined'` */ + StrictEqualUndefined = "StrictEqualUndefined", + /** `!x` */ + NotBoolean = "NotBoolean", + /** `x` */ + Boolean = "Boolean" +} +export interface ValidOperand { + comparedName: TSESTree.Node; + comparisonType: NullishComparisonType; + isYoda: boolean; + node: TSESTree.Expression; + type: OperandValidity.Valid; +} +export interface InvalidOperand { + type: OperandValidity.Invalid; +} +type Operand = InvalidOperand | ValidOperand; +export declare function gatherLogicalOperands(node: TSESTree.LogicalExpression, parserServices: ParserServicesWithTypeInformation, sourceCode: Readonly, options: PreferOptionalChainOptions): { + newlySeenLogicals: Set; + operands: Operand[]; +}; +export {}; +//# sourceMappingURL=gatherLogicalOperands.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.d.ts.map new file mode 100644 index 0000000..bc5d2d7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"gatherLogicalOperands.d.ts","sourceRoot":"","sources":["../../../src/rules/prefer-optional-chain-utils/gatherLogicalOperands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAYrE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAS/E,0BAAkB,eAAe;IAC/B,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AACD,0BAAkB,qBAAqB;IACrC,oCAAoC;IACpC,uBAAuB,4BAA4B;IACnD,oCAAoC;IACpC,oBAAoB,yBAAyB;IAE7C,mBAAmB;IACnB,kBAAkB,uBAAuB;IACzC,mBAAmB;IACnB,eAAe,oBAAoB;IAEnC,oDAAoD;IACpD,uBAAuB,4BAA4B;IACnD,oDAAoD;IACpD,oBAAoB,yBAAyB;IAE7C,WAAW;IACX,UAAU,eAAe;IACzB,UAAU;IACV,OAAO,YAAY;CACpB;AACD,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC;IAC5B,cAAc,EAAE,qBAAqB,CAAC;IACtC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC;IAC1B,IAAI,EAAE,eAAe,CAAC,KAAK,CAAC;CAC7B;AACD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC;CAC/B;AACD,KAAK,OAAO,GAAG,cAAc,GAAG,YAAY,CAAC;AAwD7C,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,QAAQ,CAAC,iBAAiB,EAChC,cAAc,EAAE,iCAAiC,EACjD,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,EAChC,OAAO,EAAE,0BAA0B,GAClC;IACD,iBAAiB,EAAE,GAAG,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACnD,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CA4PA"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js new file mode 100644 index 0000000..117f442 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js @@ -0,0 +1,321 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NullishComparisonType = exports.OperandValidity = void 0; +exports.gatherLogicalOperands = gatherLogicalOperands; +const utils_1 = require("@typescript-eslint/utils"); +const ts_api_utils_1 = require("ts-api-utils"); +const ts = __importStar(require("typescript")); +const util_1 = require("../../util"); +var ComparisonValueType; +(function (ComparisonValueType) { + ComparisonValueType["Null"] = "Null"; + ComparisonValueType["Undefined"] = "Undefined"; + ComparisonValueType["UndefinedStringLiteral"] = "UndefinedStringLiteral"; +})(ComparisonValueType || (ComparisonValueType = {})); +var OperandValidity; +(function (OperandValidity) { + OperandValidity["Valid"] = "Valid"; + OperandValidity["Invalid"] = "Invalid"; +})(OperandValidity || (exports.OperandValidity = OperandValidity = {})); +var NullishComparisonType; +(function (NullishComparisonType) { + /** `x != null`, `x != undefined` */ + NullishComparisonType["NotEqualNullOrUndefined"] = "NotEqualNullOrUndefined"; + /** `x == null`, `x == undefined` */ + NullishComparisonType["EqualNullOrUndefined"] = "EqualNullOrUndefined"; + /** `x !== null` */ + NullishComparisonType["NotStrictEqualNull"] = "NotStrictEqualNull"; + /** `x === null` */ + NullishComparisonType["StrictEqualNull"] = "StrictEqualNull"; + /** `x !== undefined`, `typeof x !== 'undefined'` */ + NullishComparisonType["NotStrictEqualUndefined"] = "NotStrictEqualUndefined"; + /** `x === undefined`, `typeof x === 'undefined'` */ + NullishComparisonType["StrictEqualUndefined"] = "StrictEqualUndefined"; + /** `!x` */ + NullishComparisonType["NotBoolean"] = "NotBoolean"; + /** `x` */ + NullishComparisonType["Boolean"] = "Boolean"; +})(NullishComparisonType || (exports.NullishComparisonType = NullishComparisonType = {})); +const NULLISH_FLAGS = ts.TypeFlags.Null | ts.TypeFlags.Undefined; +function isValidFalseBooleanCheckType(node, disallowFalseyLiteral, parserServices, options) { + const type = parserServices.getTypeAtLocation(node); + const types = (0, ts_api_utils_1.unionConstituents)(type); + if (disallowFalseyLiteral && + /* + ``` + declare const x: false | {a: string}; + x && x.a; + !x || x.a; + ``` + + We don't want to consider these two cases because the boolean expression + narrows out the non-nullish falsy cases - so converting the chain to `x?.a` + would introduce a build error + */ (types.some(t => (0, ts_api_utils_1.isBooleanLiteralType)(t) && t.intrinsicName === 'false') || + types.some(t => (0, ts_api_utils_1.isStringLiteralType)(t) && t.value === '') || + types.some(t => (0, ts_api_utils_1.isNumberLiteralType)(t) && t.value === 0) || + types.some(t => (0, ts_api_utils_1.isBigIntLiteralType)(t) && t.value.base10Value === '0'))) { + return false; + } + let allowedFlags = NULLISH_FLAGS | ts.TypeFlags.Object; + if (options.checkAny === true) { + allowedFlags |= ts.TypeFlags.Any; + } + if (options.checkUnknown === true) { + allowedFlags |= ts.TypeFlags.Unknown; + } + if (options.checkString === true) { + allowedFlags |= ts.TypeFlags.StringLike; + } + if (options.checkNumber === true) { + allowedFlags |= ts.TypeFlags.NumberLike; + } + if (options.checkBoolean === true) { + allowedFlags |= ts.TypeFlags.BooleanLike; + } + if (options.checkBigInt === true) { + allowedFlags |= ts.TypeFlags.BigIntLike; + } + return types.every(t => (0, util_1.isTypeFlagSet)(t, allowedFlags)); +} +function gatherLogicalOperands(node, parserServices, sourceCode, options) { + const result = []; + const { newlySeenLogicals, operands } = flattenLogicalOperands(node); + for (const operand of operands) { + const areMoreOperands = operand !== operands.at(-1); + switch (operand.type) { + case utils_1.AST_NODE_TYPES.BinaryExpression: { + // check for "yoda" style logical: null != x + const { comparedExpression, comparedValue, isYoda } = (() => { + // non-yoda checks are by far the most common, so check for them first + const comparedValueRight = getComparisonValueType(operand.right); + if (comparedValueRight) { + return { + comparedExpression: operand.left, + comparedValue: comparedValueRight, + isYoda: false, + }; + } + return { + comparedExpression: operand.right, + comparedValue: getComparisonValueType(operand.left), + isYoda: true, + }; + })(); + if (comparedValue === ComparisonValueType.UndefinedStringLiteral) { + if (comparedExpression.type === utils_1.AST_NODE_TYPES.UnaryExpression && + comparedExpression.operator === 'typeof') { + const argument = comparedExpression.argument; + if (argument.type === utils_1.AST_NODE_TYPES.Identifier && + // typeof window === 'undefined' + (0, util_1.isReferenceToGlobalFunction)(argument.name, argument, sourceCode)) { + result.push({ type: OperandValidity.Invalid }); + continue; + } + // typeof x.y === 'undefined' + result.push({ + comparedName: comparedExpression.argument, + comparisonType: operand.operator.startsWith('!') + ? NullishComparisonType.NotStrictEqualUndefined + : NullishComparisonType.StrictEqualUndefined, + isYoda, + node: operand, + type: OperandValidity.Valid, + }); + continue; + } + // y === 'undefined' + result.push({ type: OperandValidity.Invalid }); + continue; + } + switch (operand.operator) { + case '!=': + case '==': + if (comparedValue === ComparisonValueType.Null || + comparedValue === ComparisonValueType.Undefined) { + // x == null, x == undefined + result.push({ + comparedName: comparedExpression, + comparisonType: operand.operator.startsWith('!') + ? NullishComparisonType.NotEqualNullOrUndefined + : NullishComparisonType.EqualNullOrUndefined, + isYoda, + node: operand, + type: OperandValidity.Valid, + }); + continue; + } + // x == something :( + result.push({ type: OperandValidity.Invalid }); + continue; + case '!==': + case '===': { + const comparedName = comparedExpression; + switch (comparedValue) { + case ComparisonValueType.Null: + result.push({ + comparedName, + comparisonType: operand.operator.startsWith('!') + ? NullishComparisonType.NotStrictEqualNull + : NullishComparisonType.StrictEqualNull, + isYoda, + node: operand, + type: OperandValidity.Valid, + }); + continue; + case ComparisonValueType.Undefined: + result.push({ + comparedName, + comparisonType: operand.operator.startsWith('!') + ? NullishComparisonType.NotStrictEqualUndefined + : NullishComparisonType.StrictEqualUndefined, + isYoda, + node: operand, + type: OperandValidity.Valid, + }); + continue; + default: + // x === something :( + result.push({ type: OperandValidity.Invalid }); + continue; + } + } + } + result.push({ type: OperandValidity.Invalid }); + continue; + } + case utils_1.AST_NODE_TYPES.UnaryExpression: + if (operand.operator === '!' && + (!areMoreOperands || + isValidFalseBooleanCheckType(operand.argument, node.operator === '||', parserServices, options))) { + result.push({ + comparedName: operand.argument, + comparisonType: NullishComparisonType.NotBoolean, + isYoda: false, + node: operand, + type: OperandValidity.Valid, + }); + continue; + } + result.push({ type: OperandValidity.Invalid }); + continue; + case utils_1.AST_NODE_TYPES.LogicalExpression: + // explicitly ignore the mixed logical expression cases + result.push({ type: OperandValidity.Invalid }); + continue; + default: + if (!areMoreOperands || + isValidFalseBooleanCheckType(operand, node.operator === '&&', parserServices, options)) { + result.push({ + comparedName: operand, + comparisonType: NullishComparisonType.Boolean, + isYoda: false, + node: operand, + type: OperandValidity.Valid, + }); + } + else { + result.push({ type: OperandValidity.Invalid }); + } + continue; + } + } + return { + newlySeenLogicals, + operands: result, + }; + /* + The AST is always constructed such the first element is always the deepest element. + I.e. for this code: `foo && foo.bar && foo.bar.baz && foo.bar.baz.buzz` + The AST will look like this: + { + left: { + left: { + left: foo + right: foo.bar + } + right: foo.bar.baz + } + right: foo.bar.baz.buzz + } + + So given any logical expression, we can perform a depth-first traversal to get + the operands in order. + + Note that this function purposely does not inspect mixed logical expressions + like `foo || foo.bar && foo.bar.baz` - separate selector + */ + function flattenLogicalOperands(node) { + const operands = []; + const newlySeenLogicals = new Set([node]); + const stack = [node.right, node.left]; + let current; + while ((current = stack.pop())) { + if (current.type === utils_1.AST_NODE_TYPES.LogicalExpression && + current.operator === node.operator) { + newlySeenLogicals.add(current); + stack.push(current.right); + stack.push(current.left); + } + else { + operands.push(current); + } + } + return { + newlySeenLogicals, + operands, + }; + } + function getComparisonValueType(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.Literal: + // eslint-disable-next-line eqeqeq, @typescript-eslint/internal/eqeq-nullish -- intentional exact comparison against null + if (node.value === null && node.raw === 'null') { + return ComparisonValueType.Null; + } + if (node.value === 'undefined') { + return ComparisonValueType.UndefinedStringLiteral; + } + return null; + case utils_1.AST_NODE_TYPES.Identifier: + if (node.name === 'undefined') { + return ComparisonValueType.Undefined; + } + return null; + } + return null; + } +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.d.ts new file mode 100644 index 0000000..7728dd5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.d.ts @@ -0,0 +1,4 @@ +import type { PreferOptionalChainMessageIds, PreferOptionalChainOptions } from './prefer-optional-chain-utils/PreferOptionalChainOptions'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=prefer-optional-chain.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.d.ts.map new file mode 100644 index 0000000..3606097 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-optional-chain.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-optional-chain.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,6BAA6B,EAC7B,0BAA0B,EAC3B,MAAM,0DAA0D,CAAC;;AAelE,wBAkMG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js new file mode 100644 index 0000000..d64fb89 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js @@ -0,0 +1,146 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const analyzeChain_1 = require("./prefer-optional-chain-utils/analyzeChain"); +const checkNullishAndReport_1 = require("./prefer-optional-chain-utils/checkNullishAndReport"); +const gatherLogicalOperands_1 = require("./prefer-optional-chain-utils/gatherLogicalOperands"); +exports.default = (0, util_1.createRule)({ + name: 'prefer-optional-chain', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects', + recommended: 'stylistic', + requiresTypeChecking: true, + }, + fixable: 'code', + hasSuggestions: true, + messages: { + optionalChainSuggest: 'Change to an optional chain.', + preferOptionalChain: "Prefer using an optional chain expression instead, as it's more concise and easier to read.", + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: { + type: 'boolean', + description: 'Allow autofixers that will change the return type of the expression. This option is considered unsafe as it may break the build.', + }, + checkAny: { + type: 'boolean', + description: 'Check operands that are typed as `any` when inspecting "loose boolean" operands.', + }, + checkBigInt: { + type: 'boolean', + description: 'Check operands that are typed as `bigint` when inspecting "loose boolean" operands.', + }, + checkBoolean: { + type: 'boolean', + description: 'Check operands that are typed as `boolean` when inspecting "loose boolean" operands.', + }, + checkNumber: { + type: 'boolean', + description: 'Check operands that are typed as `number` when inspecting "loose boolean" operands.', + }, + checkString: { + type: 'boolean', + description: 'Check operands that are typed as `string` when inspecting "loose boolean" operands.', + }, + checkUnknown: { + type: 'boolean', + description: 'Check operands that are typed as `unknown` when inspecting "loose boolean" operands.', + }, + requireNullish: { + type: 'boolean', + description: 'Skip operands that are not typed with `null` and/or `undefined` when inspecting "loose boolean" operands.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false, + checkAny: true, + checkBigInt: true, + checkBoolean: true, + checkNumber: true, + checkString: true, + checkUnknown: true, + requireNullish: false, + }, + ], + create(context, [options]) { + const parserServices = (0, util_1.getParserServices)(context); + const seenLogicals = new Set(); + return { + 'LogicalExpression[operator!="??"]'(node) { + if (seenLogicals.has(node)) { + return; + } + const { newlySeenLogicals, operands } = (0, gatherLogicalOperands_1.gatherLogicalOperands)(node, parserServices, context.sourceCode, options); + for (const logical of newlySeenLogicals) { + seenLogicals.add(logical); + } + let currentChain = []; + for (const operand of operands) { + if (operand.type === gatherLogicalOperands_1.OperandValidity.Invalid) { + (0, analyzeChain_1.analyzeChain)(context, parserServices, options, node, node.operator, currentChain); + currentChain = []; + } + else { + currentChain.push(operand); + } + } + // make sure to check whatever's left + if (currentChain.length > 0) { + (0, analyzeChain_1.analyzeChain)(context, parserServices, options, node, node.operator, currentChain); + } + }, + // specific handling for `(foo ?? {}).bar` / `(foo || {}).bar` + 'LogicalExpression[operator="||"], LogicalExpression[operator="??"]'(node) { + const leftNode = node.left; + const rightNode = node.right; + const parentNode = node.parent; + const isRightNodeAnEmptyObjectLiteral = rightNode.type === utils_1.AST_NODE_TYPES.ObjectExpression && + rightNode.properties.length === 0; + if (!isRightNodeAnEmptyObjectLiteral || + parentNode.type !== utils_1.AST_NODE_TYPES.MemberExpression || + parentNode.optional) { + return; + } + seenLogicals.add(node); + function isLeftSideLowerPrecedence() { + const logicalTsNode = parserServices.esTreeNodeToTSNodeMap.get(node); + const leftTsNode = parserServices.esTreeNodeToTSNodeMap.get(leftNode); + const leftPrecedence = (0, util_1.getOperatorPrecedence)(leftTsNode.kind, logicalTsNode.operatorToken.kind); + return leftPrecedence < util_1.OperatorPrecedence.LeftHandSide; + } + (0, checkNullishAndReport_1.checkNullishAndReport)(context, parserServices, options, [leftNode], { + node: parentNode, + messageId: 'preferOptionalChain', + suggest: [ + { + messageId: 'optionalChainSuggest', + fix: (fixer) => { + const leftNodeText = context.sourceCode.getText(leftNode); + // Any node that is made of an operator with higher or equal precedence, + const maybeWrappedLeftNode = isLeftSideLowerPrecedence() + ? `(${leftNodeText})` + : leftNodeText; + const propertyToBeOptionalText = context.sourceCode.getText(parentNode.property); + const maybeWrappedProperty = parentNode.computed + ? `[${propertyToBeOptionalText}]` + : propertyToBeOptionalText; + return fixer.replaceTextRange(parentNode.range, `${maybeWrappedLeftNode}?.${maybeWrappedProperty}`); + }, + }, + ], + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-promise-reject-errors.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-promise-reject-errors.d.ts new file mode 100644 index 0000000..49d2efd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-promise-reject-errors.d.ts @@ -0,0 +1,11 @@ +export type MessageIds = 'rejectAnError'; +export type Options = [ + { + allowEmptyReject?: boolean; + allowThrowingAny?: boolean; + allowThrowingUnknown?: boolean; + } +]; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"rejectAnError", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=prefer-promise-reject-errors.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-promise-reject-errors.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-promise-reject-errors.d.ts.map new file mode 100644 index 0000000..9935bce --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-promise-reject-errors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-promise-reject-errors.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-promise-reject-errors.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,UAAU,GAAG,eAAe,CAAC;AAEzC,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC;CACF,CAAC;;AAEF,wBA4IG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-promise-reject-errors.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-promise-reject-errors.js new file mode 100644 index 0000000..09e1733 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-promise-reject-errors.js @@ -0,0 +1,116 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'prefer-promise-reject-errors', + meta: { + type: 'suggestion', + docs: { + description: 'Require using Error objects as Promise rejection reasons', + extendsBaseRule: true, + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + rejectAnError: 'Expected the Promise rejection reason to be an Error.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowEmptyReject: { + type: 'boolean', + description: 'Whether to allow calls to `Promise.reject()` with no arguments.', + }, + allowThrowingAny: { + type: 'boolean', + description: 'Whether to always allow throwing values typed as `any`.', + }, + allowThrowingUnknown: { + type: 'boolean', + description: 'Whether to always allow throwing values typed as `unknown`.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowEmptyReject: false, + allowThrowingAny: false, + allowThrowingUnknown: false, + }, + ], + create(context, [options]) { + const services = (0, util_1.getParserServices)(context); + function checkRejectCall(callExpression) { + const argument = callExpression.arguments.at(0); + if (argument) { + const type = services.getTypeAtLocation(argument); + if (options.allowThrowingAny && (0, util_1.isTypeAnyType)(type)) { + return; + } + if (options.allowThrowingUnknown && (0, util_1.isTypeUnknownType)(type)) { + return; + } + if ((0, util_1.isErrorLike)(services.program, type) || + (0, util_1.isReadonlyErrorLike)(services.program, type)) { + return; + } + } + else if (options.allowEmptyReject) { + return; + } + context.report({ + node: callExpression, + messageId: 'rejectAnError', + }); + } + function typeAtLocationIsLikePromise(node) { + const type = services.getTypeAtLocation(node); + return ((0, util_1.isPromiseConstructorLike)(services.program, type) || + (0, util_1.isPromiseLike)(services.program, type)); + } + return { + CallExpression(node) { + const callee = (0, util_1.skipChainExpression)(node.callee); + if (callee.type !== utils_1.AST_NODE_TYPES.MemberExpression) { + return; + } + if (!(0, util_1.isStaticMemberAccessOfValue)(callee, context, 'reject') || + !typeAtLocationIsLikePromise(callee.object)) { + return; + } + checkRejectCall(node); + }, + NewExpression(node) { + const callee = (0, util_1.skipChainExpression)(node.callee); + if (!(0, util_1.isPromiseConstructorLike)(services.program, services.getTypeAtLocation(callee))) { + return; + } + const executor = node.arguments.at(0); + if (!executor || !(0, util_1.isFunction)(executor)) { + return; + } + const rejectParamNode = executor.params.at(1); + if (!rejectParamNode || !(0, util_1.isIdentifier)(rejectParamNode)) { + return; + } + // reject param is always present in variables declared by executor + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const rejectVariable = context.sourceCode + .getDeclaredVariables(executor) + .find(variable => variable.identifiers.includes(rejectParamNode)); + rejectVariable.references.forEach(ref => { + if (ref.identifier.parent.type !== utils_1.AST_NODE_TYPES.CallExpression || + ref.identifier !== ref.identifier.parent.callee) { + return; + } + checkRejectCall(ref.identifier.parent); + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.d.ts new file mode 100644 index 0000000..76ade6c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.d.ts @@ -0,0 +1,13 @@ +import type { TypeOrValueSpecifier } from '../util'; +export type Options = [ + { + allow?: TypeOrValueSpecifier[]; + checkParameterProperties?: boolean; + ignoreInferredTypes?: boolean; + treatMethodsAsReadonly?: boolean; + } +]; +export type MessageIds = 'shouldBeReadonly'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldBeReadonly", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=prefer-readonly-parameter-types.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.d.ts.map new file mode 100644 index 0000000..bcfaf4a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-readonly-parameter-types.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-readonly-parameter-types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAUpD,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,KAAK,CAAC,EAAE,oBAAoB,EAAE,CAAC;QAC/B,wBAAwB,CAAC,EAAE,OAAO,CAAC;QACnC,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,sBAAsB,CAAC,EAAE,OAAO,CAAC;KAClC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC;;AAE5C,wBAqHG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js new file mode 100644 index 0000000..64720b9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js @@ -0,0 +1,89 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'prefer-readonly-parameter-types', + meta: { + type: 'suggestion', + docs: { + description: 'Require function parameters to be typed as `readonly` to prevent accidental mutation of inputs', + requiresTypeChecking: true, + }, + messages: { + shouldBeReadonly: 'Parameter should be a read only type.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allow: { + ...util_1.readonlynessOptionsSchema.properties.allow, + description: 'An array of type specifiers to ignore.', + }, + checkParameterProperties: { + type: 'boolean', + description: 'Whether to check class parameter properties.', + }, + ignoreInferredTypes: { + type: 'boolean', + description: "Whether to ignore parameters which don't explicitly specify a type.", + }, + treatMethodsAsReadonly: { + ...util_1.readonlynessOptionsSchema.properties.treatMethodsAsReadonly, + description: 'Whether to treat all mutable methods as though they are readonly.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allow: util_1.readonlynessOptionsDefaults.allow, + checkParameterProperties: true, + ignoreInferredTypes: false, + treatMethodsAsReadonly: util_1.readonlynessOptionsDefaults.treatMethodsAsReadonly, + }, + ], + create(context, [{ allow, checkParameterProperties, ignoreInferredTypes, treatMethodsAsReadonly, },]) { + const services = (0, util_1.getParserServices)(context); + return { + [[ + utils_1.AST_NODE_TYPES.ArrowFunctionExpression, + utils_1.AST_NODE_TYPES.FunctionDeclaration, + utils_1.AST_NODE_TYPES.FunctionExpression, + utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration, + utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration, + utils_1.AST_NODE_TYPES.TSDeclareFunction, + utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression, + utils_1.AST_NODE_TYPES.TSFunctionType, + utils_1.AST_NODE_TYPES.TSMethodSignature, + ].join(', ')](node) { + for (const param of node.params) { + if (!checkParameterProperties && + param.type === utils_1.AST_NODE_TYPES.TSParameterProperty) { + continue; + } + const actualParam = param.type === utils_1.AST_NODE_TYPES.TSParameterProperty + ? param.parameter + : param; + if (ignoreInferredTypes && actualParam.typeAnnotation == null) { + continue; + } + const type = services.getTypeAtLocation(actualParam); + const isReadOnly = (0, util_1.isTypeReadonly)(services.program, type, { + allow, + treatMethodsAsReadonly: !!treatMethodsAsReadonly, + }); + if (!isReadOnly) { + context.report({ + node: actualParam, + messageId: 'shouldBeReadonly', + }); + } + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.d.ts new file mode 100644 index 0000000..498b320 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.d.ts @@ -0,0 +1,9 @@ +export type MessageIds = 'preferReadonly'; +export type Options = [ + { + onlyInlineLambdas?: boolean; + } +]; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferReadonly", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=prefer-readonly.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.d.ts.map new file mode 100644 index 0000000..6b46d84 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-readonly.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-readonly.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAC1C,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B;CACF,CAAC;;AASF,wBAgUG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js new file mode 100644 index 0000000..36e2d39 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js @@ -0,0 +1,392 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const getMemberHeadLoc_1 = require("../util/getMemberHeadLoc"); +const functionScopeBoundaries = [ + utils_1.AST_NODE_TYPES.ArrowFunctionExpression, + utils_1.AST_NODE_TYPES.FunctionDeclaration, + utils_1.AST_NODE_TYPES.FunctionExpression, + utils_1.AST_NODE_TYPES.MethodDefinition, +].join(', '); +exports.default = (0, util_1.createRule)({ + name: 'prefer-readonly', + meta: { + type: 'suggestion', + docs: { + description: "Require private members to be marked as `readonly` if they're never modified outside of the constructor", + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + preferReadonly: "Member '{{name}}' is never reassigned; mark it as `readonly`.", + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + onlyInlineLambdas: { + type: 'boolean', + description: 'Whether to restrict checking only to members immediately assigned a lambda value.', + }, + }, + }, + ], + }, + defaultOptions: [{ onlyInlineLambdas: false }], + create(context, [{ onlyInlineLambdas }]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const classScopeStack = []; + function handlePropertyAccessExpression(node, parent, classScope) { + if (ts.isBinaryExpression(parent)) { + handleParentBinaryExpression(node, parent, classScope); + return; + } + if (ts.isDeleteExpression(parent) || isDestructuringAssignment(node)) { + classScope.addVariableModification(node); + return; + } + if (ts.isPostfixUnaryExpression(parent) || + ts.isPrefixUnaryExpression(parent)) { + handleParentPostfixOrPrefixUnaryExpression(parent, classScope); + } + } + function handleParentBinaryExpression(node, parent, classScope) { + if (parent.left === node && + tsutils.isAssignmentKind(parent.operatorToken.kind)) { + classScope.addVariableModification(node); + } + } + function handleParentPostfixOrPrefixUnaryExpression(node, classScope) { + if (node.operator === ts.SyntaxKind.PlusPlusToken || + node.operator === ts.SyntaxKind.MinusMinusToken) { + classScope.addVariableModification(node.operand); + } + } + function isDestructuringAssignment(node) { + let current = node.parent; + while (current) { + const parent = current.parent; + if (ts.isObjectLiteralExpression(parent) || + ts.isArrayLiteralExpression(parent) || + ts.isSpreadAssignment(parent) || + (ts.isSpreadElement(parent) && + ts.isArrayLiteralExpression(parent.parent))) { + current = parent; + } + else if (ts.isBinaryExpression(parent) && + !ts.isPropertyAccessExpression(current)) { + return (parent.left === current && + parent.operatorToken.kind === ts.SyntaxKind.EqualsToken); + } + else { + break; + } + } + return false; + } + function isFunctionScopeBoundaryInStack(node) { + if (classScopeStack.length === 0) { + return false; + } + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + if (ts.isConstructorDeclaration(tsNode)) { + return false; + } + return tsutils.isFunctionScopeBoundary(tsNode); + } + function getEsNodesFromViolatingNode(violatingNode) { + return { + esNode: services.tsNodeToESTreeNodeMap.get(violatingNode), + nameNode: services.tsNodeToESTreeNodeMap.get(violatingNode.name), + }; + } + function getTypeAnnotationForViolatingNode(node, type, initializerType) { + const annotation = checker.typeToString(type); + // verify the about-to-be-added type annotation is in-scope + if (tsutils.isTypeFlagSet(initializerType, ts.TypeFlags.EnumLiteral)) { + const scope = context.sourceCode.getScope(node); + const variable = utils_1.ASTUtils.findVariable(scope, annotation); + if (variable == null) { + return null; + } + const definition = variable.defs.find(def => def.isTypeDefinition); + if (definition == null) { + return null; + } + const definitionType = services.getTypeAtLocation(definition.node); + if (definitionType !== type) { + return null; + } + } + return annotation; + } + return { + [`${functionScopeBoundaries}:exit`](node) { + if (utils_1.ASTUtils.isConstructor(node)) { + classScopeStack[classScopeStack.length - 1].exitConstructor(); + } + else if (isFunctionScopeBoundaryInStack(node)) { + classScopeStack[classScopeStack.length - 1].exitNonConstructor(); + } + }, + 'ClassDeclaration, ClassExpression'(node) { + classScopeStack.push(new ClassScope(checker, services.esTreeNodeToTSNodeMap.get(node), onlyInlineLambdas)); + }, + 'ClassDeclaration, ClassExpression:exit'() { + const finalizedClassScope = (0, util_1.nullThrows)(classScopeStack.pop(), 'Stack should exist on class exit'); + for (const violatingNode of finalizedClassScope.finalizeUnmodifiedPrivateNonReadonlys()) { + const { esNode, nameNode } = getEsNodesFromViolatingNode(violatingNode); + const reportNodeOrLoc = (() => { + switch (esNode.type) { + case utils_1.AST_NODE_TYPES.MethodDefinition: + case utils_1.AST_NODE_TYPES.PropertyDefinition: + case utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition: + return { loc: (0, getMemberHeadLoc_1.getMemberHeadLoc)(context.sourceCode, esNode) }; + case utils_1.AST_NODE_TYPES.TSParameterProperty: + return { + loc: (0, getMemberHeadLoc_1.getParameterPropertyHeadLoc)(context.sourceCode, esNode, nameNode.name), + }; + default: + return { node: esNode }; + } + })(); + const typeAnnotation = (() => { + if (esNode.type !== utils_1.AST_NODE_TYPES.PropertyDefinition) { + return null; + } + if (esNode.typeAnnotation || !esNode.value) { + return null; + } + if (nameNode.type !== utils_1.AST_NODE_TYPES.Identifier) { + return null; + } + const hasConstructorModifications = finalizedClassScope.memberHasConstructorModifications(nameNode.name); + if (!hasConstructorModifications) { + return null; + } + const violatingType = services.getTypeAtLocation(esNode); + const initializerType = services.getTypeAtLocation(esNode.value); + // if the RHS is a literal, its type would be narrowed, while the + // type of the initializer (which isn't `readonly`) would be the + // widened type + if (initializerType === violatingType) { + return null; + } + if (!tsutils.isLiteralType(initializerType)) { + return null; + } + return getTypeAnnotationForViolatingNode(esNode, violatingType, initializerType); + })(); + context.report({ + ...reportNodeOrLoc, + messageId: 'preferReadonly', + data: { + name: context.sourceCode.getText(nameNode), + }, + *fix(fixer) { + yield fixer.insertTextBefore(nameNode, 'readonly '); + if (typeAnnotation) { + yield fixer.insertTextAfter(nameNode, `: ${typeAnnotation}`); + } + }, + }); + } + }, + [functionScopeBoundaries](node) { + if (utils_1.ASTUtils.isConstructor(node)) { + classScopeStack[classScopeStack.length - 1].enterConstructor(services.esTreeNodeToTSNodeMap.get(node)); + } + else if (isFunctionScopeBoundaryInStack(node)) { + classScopeStack[classScopeStack.length - 1].enterNonConstructor(); + } + }, + MemberExpression(node) { + if (classScopeStack.length !== 0 && !node.computed) { + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + handlePropertyAccessExpression(tsNode, tsNode.parent, classScopeStack[classScopeStack.length - 1]); + } + }, + }; + }, +}); +const OUTSIDE_CONSTRUCTOR = -1; +const DIRECTLY_INSIDE_CONSTRUCTOR = 0; +var TypeToClassRelation; +(function (TypeToClassRelation) { + TypeToClassRelation[TypeToClassRelation["ClassAndInstance"] = 0] = "ClassAndInstance"; + TypeToClassRelation[TypeToClassRelation["Class"] = 1] = "Class"; + TypeToClassRelation[TypeToClassRelation["Instance"] = 2] = "Instance"; + TypeToClassRelation[TypeToClassRelation["None"] = 3] = "None"; +})(TypeToClassRelation || (TypeToClassRelation = {})); +class ClassScope { + checker; + onlyInlineLambdas; + classType; + constructorScopeDepth = OUTSIDE_CONSTRUCTOR; + memberVariableModifications = new Set(); + memberVariableWithConstructorModifications = new Set(); + privateModifiableMembers = new Map(); + privateModifiableStatics = new Map(); + staticVariableModifications = new Set(); + constructor(checker, classNode, onlyInlineLambdas) { + this.checker = checker; + this.onlyInlineLambdas = onlyInlineLambdas; + const classType = checker.getTypeAtLocation(classNode); + if (tsutils.isIntersectionType(classType)) { + this.classType = classType.types[0]; + } + else { + this.classType = classType; + } + for (const member of classNode.members) { + if (ts.isPropertyDeclaration(member)) { + this.addDeclaredVariable(member); + } + } + } + addDeclaredVariable(node) { + if (!(tsutils.isModifierFlagSet(node, ts.ModifierFlags.Private) || + node.name.kind === ts.SyntaxKind.PrivateIdentifier) || + tsutils.isModifierFlagSet(node, ts.ModifierFlags.Accessor | ts.ModifierFlags.Readonly) || + ts.isComputedPropertyName(node.name)) { + return; + } + if (this.onlyInlineLambdas && + node.initializer != null && + !ts.isArrowFunction(node.initializer)) { + return; + } + (tsutils.isModifierFlagSet(node, ts.ModifierFlags.Static) + ? this.privateModifiableStatics + : this.privateModifiableMembers).set(node.name.getText(), node); + } + addVariableModification(node) { + const modifierType = this.checker.getTypeAtLocation(node.expression); + const relationOfModifierTypeToClass = this.getTypeToClassRelation(modifierType); + if (relationOfModifierTypeToClass === TypeToClassRelation.Instance && + this.constructorScopeDepth === DIRECTLY_INSIDE_CONSTRUCTOR) { + this.memberVariableWithConstructorModifications.add(node.name.text); + return; + } + if (relationOfModifierTypeToClass === TypeToClassRelation.Instance || + relationOfModifierTypeToClass === TypeToClassRelation.ClassAndInstance) { + this.memberVariableModifications.add(node.name.text); + } + if (relationOfModifierTypeToClass === TypeToClassRelation.Class || + relationOfModifierTypeToClass === TypeToClassRelation.ClassAndInstance) { + this.staticVariableModifications.add(node.name.text); + } + } + enterConstructor(node) { + this.constructorScopeDepth = DIRECTLY_INSIDE_CONSTRUCTOR; + for (const parameter of node.parameters) { + if (tsutils.isModifierFlagSet(parameter, ts.ModifierFlags.Private)) { + this.addDeclaredVariable(parameter); + } + } + } + enterNonConstructor() { + if (this.constructorScopeDepth !== OUTSIDE_CONSTRUCTOR) { + this.constructorScopeDepth += 1; + } + } + exitConstructor() { + this.constructorScopeDepth = OUTSIDE_CONSTRUCTOR; + } + exitNonConstructor() { + if (this.constructorScopeDepth !== OUTSIDE_CONSTRUCTOR) { + this.constructorScopeDepth -= 1; + } + } + finalizeUnmodifiedPrivateNonReadonlys() { + this.memberVariableModifications.forEach(variableName => { + this.privateModifiableMembers.delete(variableName); + }); + this.staticVariableModifications.forEach(variableName => { + this.privateModifiableStatics.delete(variableName); + }); + return [ + ...this.privateModifiableMembers.values(), + ...this.privateModifiableStatics.values(), + ]; + } + getTypeToClassRelation(type) { + if (type.isIntersection()) { + let result = TypeToClassRelation.None; + for (const subType of type.types) { + const subTypeResult = this.getTypeToClassRelation(subType); + switch (subTypeResult) { + case TypeToClassRelation.Class: + if (result === TypeToClassRelation.Instance) { + return TypeToClassRelation.ClassAndInstance; + } + result = TypeToClassRelation.Class; + break; + case TypeToClassRelation.Instance: + if (result === TypeToClassRelation.Class) { + return TypeToClassRelation.ClassAndInstance; + } + result = TypeToClassRelation.Instance; + break; + } + } + return result; + } + if (type.isUnion()) { + // any union of class/instance and something else will prevent access to + // private members, so we assume that union consists only of classes + // or class instances, because otherwise tsc will report an error + return this.getTypeToClassRelation(type.types[0]); + } + if (!type.getSymbol() || !(0, util_1.typeIsOrHasBaseType)(type, this.classType)) { + return TypeToClassRelation.None; + } + const typeIsClass = tsutils.isObjectType(type) && + tsutils.isObjectFlagSet(type, ts.ObjectFlags.Anonymous); + if (typeIsClass) { + return TypeToClassRelation.Class; + } + return TypeToClassRelation.Instance; + } + memberHasConstructorModifications(name) { + return this.memberVariableWithConstructorModifications.has(name); + } +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.d.ts new file mode 100644 index 0000000..a5d211c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferTypeParameter", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=prefer-reduce-type-parameter.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.d.ts.map new file mode 100644 index 0000000..37b5641 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-reduce-type-parameter.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-reduce-type-parameter.ts"],"names":[],"mappings":";AAiBA,wBA6GG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js new file mode 100644 index 0000000..6d35ec9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js @@ -0,0 +1,114 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const tsutils = __importStar(require("ts-api-utils")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'prefer-reduce-type-parameter', + meta: { + type: 'problem', + docs: { + description: 'Enforce using type parameter when calling `Array#reduce` instead of using a type assertion', + recommended: 'strict', + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + preferTypeParameter: 'Unnecessary assertion: Array#reduce accepts a type parameter for the default value.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + function isArrayType(type) { + return tsutils + .unionConstituents(type) + .every(unionPart => tsutils + .intersectionConstituents(unionPart) + .every(t => checker.isArrayType(t) || checker.isTupleType(t))); + } + return { + 'CallExpression > MemberExpression.callee'(callee) { + if (!(0, util_1.isStaticMemberAccessOfValue)(callee, context, 'reduce')) { + return; + } + const [, secondArg] = callee.parent.arguments; + if (callee.parent.arguments.length < 2) { + return; + } + if ((0, util_1.isTypeAssertion)(secondArg)) { + const initializerType = services.getTypeAtLocation(secondArg.expression); + const assertedType = services.getTypeAtLocation(secondArg.typeAnnotation); + const isAssertionNecessary = !checker.isTypeAssignableTo(initializerType, assertedType); + // don't report this if the resulting fix will be a type error + if (isAssertionNecessary) { + return; + } + } + else { + return; + } + // Get the symbol of the `reduce` method. + const calleeObjType = (0, util_1.getConstrainedTypeAtLocation)(services, callee.object); + // Check the owner type of the `reduce` method. + if (isArrayType(calleeObjType)) { + context.report({ + node: secondArg, + messageId: 'preferTypeParameter', + fix: fixer => { + const fixes = [ + fixer.removeRange([ + secondArg.range[0], + secondArg.expression.range[0], + ]), + fixer.removeRange([ + secondArg.expression.range[1], + secondArg.range[1], + ]), + ]; + if (!callee.parent.typeArguments) { + fixes.push(fixer.insertTextAfter(callee, `<${context.sourceCode.getText(secondArg.typeAnnotation)}>`)); + } + return fixes; + }, + }); + return; + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.d.ts new file mode 100644 index 0000000..bb8e8d6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"regExpExecOverStringMatch", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=prefer-regexp-exec.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.d.ts.map new file mode 100644 index 0000000..ca27142 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-regexp-exec.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-regexp-exec.ts"],"names":[],"mappings":";AAsBA,wBAkKG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js new file mode 100644 index 0000000..bb507a6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js @@ -0,0 +1,178 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const util_1 = require("../util"); +var ArgumentType; +(function (ArgumentType) { + ArgumentType[ArgumentType["Other"] = 0] = "Other"; + ArgumentType[ArgumentType["String"] = 1] = "String"; + ArgumentType[ArgumentType["RegExp"] = 2] = "RegExp"; + ArgumentType[ArgumentType["Both"] = 3] = "Both"; +})(ArgumentType || (ArgumentType = {})); +exports.default = (0, util_1.createRule)({ + name: 'prefer-regexp-exec', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce `RegExp#exec` over `String#match` if no global flag is provided', + recommended: 'stylistic', + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + regExpExecOverStringMatch: 'Use the `RegExp#exec()` method instead.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const globalScope = context.sourceCode.getScope(context.sourceCode.ast); + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + /** + * Check if a given node type is a string. + * @param type The node type to check. + */ + function isStringType(type) { + return (0, util_1.getTypeName)(checker, type) === 'string'; + } + /** + * Check if a given node type is a RegExp. + * @param type The node type to check. + */ + function isRegExpType(type) { + return (0, util_1.getTypeName)(checker, type) === 'RegExp'; + } + function collectArgumentTypes(types) { + let result = ArgumentType.Other; + for (const type of types) { + if (isRegExpType(type)) { + result |= ArgumentType.RegExp; + } + else if (isStringType(type)) { + result |= ArgumentType.String; + } + } + return result; + } + /** + * Returns true if and only if we have syntactic proof that the /g flag is + * absent. Returns false in all other cases (i.e. it still might or might + * not contain the global flag). + */ + function definitelyDoesNotContainGlobalFlag(node) { + if ((node.type === utils_1.AST_NODE_TYPES.CallExpression || + node.type === utils_1.AST_NODE_TYPES.NewExpression) && + node.callee.type === utils_1.AST_NODE_TYPES.Identifier && + node.callee.name === 'RegExp') { + const flags = node.arguments.at(1); + return !(flags?.type === utils_1.AST_NODE_TYPES.Literal && + typeof flags.value === 'string' && + flags.value.includes('g')); + } + return false; + } + return { + 'CallExpression[arguments.length=1] > MemberExpression'(memberNode) { + if (!(0, util_1.isStaticMemberAccessOfValue)(memberNode, context, 'match')) { + return; + } + const objectNode = memberNode.object; + const callNode = memberNode.parent; + const [argumentNode] = callNode.arguments; + const argumentValue = (0, util_1.getStaticValue)(argumentNode, globalScope); + if (!isStringType(services.getTypeAtLocation(objectNode))) { + return; + } + // Don't report regular expressions with global flag. + if ((!argumentValue && + !definitelyDoesNotContainGlobalFlag(argumentNode)) || + (argumentValue && + argumentValue.value instanceof RegExp && + argumentValue.value.flags.includes('g'))) { + return; + } + if (argumentNode.type === utils_1.AST_NODE_TYPES.Literal && + typeof argumentNode.value === 'string') { + let regExp; + try { + regExp = RegExp(argumentNode.value); + } + catch { + return; + } + return context.report({ + node: memberNode.property, + messageId: 'regExpExecOverStringMatch', + fix: (0, util_1.getWrappingFixer)({ + node: callNode, + innerNode: [objectNode], + sourceCode: context.sourceCode, + wrap: objectCode => `${regExp.toString()}.exec(${objectCode})`, + }), + }); + } + const argumentType = services.getTypeAtLocation(argumentNode); + const argumentTypes = collectArgumentTypes(tsutils.unionConstituents(argumentType)); + switch (argumentTypes) { + case ArgumentType.RegExp: + return context.report({ + node: memberNode.property, + messageId: 'regExpExecOverStringMatch', + fix: (0, util_1.getWrappingFixer)({ + node: callNode, + innerNode: [objectNode, argumentNode], + sourceCode: context.sourceCode, + wrap: (objectCode, argumentCode) => `${argumentCode}.exec(${objectCode})`, + }), + }); + case ArgumentType.String: + return context.report({ + node: memberNode.property, + messageId: 'regExpExecOverStringMatch', + fix: (0, util_1.getWrappingFixer)({ + node: callNode, + innerNode: [objectNode, argumentNode], + sourceCode: context.sourceCode, + wrap: (objectCode, argumentCode) => `RegExp(${argumentCode}).exec(${objectCode})`, + }), + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-return-this-type.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-return-this-type.d.ts new file mode 100644 index 0000000..f2f8ee4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-return-this-type.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"useThisType", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=prefer-return-this-type.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-return-this-type.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-return-this-type.d.ts.map new file mode 100644 index 0000000..931af92 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-return-this-type.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-return-this-type.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-return-this-type.ts"],"names":[],"mappings":";AAgBA,wBAsKG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-return-this-type.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-return-this-type.js new file mode 100644 index 0000000..a72e384 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-return-this-type.js @@ -0,0 +1,154 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const ts_api_utils_1 = require("ts-api-utils"); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'prefer-return-this-type', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce that `this` is used when only `this` type is returned', + recommended: 'strict', + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + useThisType: 'Use `this` type instead.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + function tryGetNameInType(name, typeNode) { + if (typeNode.type === utils_1.AST_NODE_TYPES.TSTypeReference && + typeNode.typeName.type === utils_1.AST_NODE_TYPES.Identifier && + typeNode.typeName.name === name) { + return typeNode; + } + if (typeNode.type === utils_1.AST_NODE_TYPES.TSUnionType) { + for (const type of typeNode.types) { + const found = tryGetNameInType(name, type); + if (found) { + return found; + } + } + } + return undefined; + } + function isThisSpecifiedInParameters(originalFunc) { + const firstArg = originalFunc.params.at(0); + return (firstArg?.type === utils_1.AST_NODE_TYPES.Identifier && firstArg.name === 'this'); + } + function isFunctionReturningThis(originalFunc, originalClass) { + if (isThisSpecifiedInParameters(originalFunc)) { + return false; + } + const func = services.esTreeNodeToTSNodeMap.get(originalFunc); + if (!func.body) { + return false; + } + const classType = services.getTypeAtLocation(originalClass); + if (func.body.kind !== ts.SyntaxKind.Block) { + const type = checker.getTypeAtLocation(func.body); + return classType.thisType === type; + } + let hasReturnThis = false; + let hasReturnClassType = false; + (0, util_1.forEachReturnStatement)(func.body, stmt => { + const expr = stmt.expression; + if (!expr) { + return; + } + // fast check + if (expr.kind === ts.SyntaxKind.ThisKeyword) { + hasReturnThis = true; + return; + } + const type = checker.getTypeAtLocation(expr); + if (classType === type) { + hasReturnClassType = true; + return true; + } + if (classType.thisType === type) { + hasReturnThis = true; + return; + } + if ((0, ts_api_utils_1.isUnionType)(type) && + type.types.some(typePart => typePart === classType)) { + hasReturnClassType = true; + return true; + } + return; + }); + return !hasReturnClassType && hasReturnThis; + } + function checkFunction(originalFunc, originalClass) { + const className = originalClass.id?.name; + if (!className || !originalFunc.returnType) { + return; + } + const node = tryGetNameInType(className, originalFunc.returnType.typeAnnotation); + if (!node) { + return; + } + if (isFunctionReturningThis(originalFunc, originalClass)) { + context.report({ + node, + messageId: 'useThisType', + fix: fixer => fixer.replaceText(node, 'this'), + }); + } + } + function checkProperty(node) { + if (!(node.value?.type === utils_1.AST_NODE_TYPES.FunctionExpression || + node.value?.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression)) { + return; + } + checkFunction(node.value, node.parent.parent); + } + return { + 'ClassBody > AccessorProperty': checkProperty, + 'ClassBody > MethodDefinition'(node) { + checkFunction(node.value, node.parent.parent); + }, + 'ClassBody > PropertyDefinition': checkProperty, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.d.ts new file mode 100644 index 0000000..b39aa3f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.d.ts @@ -0,0 +1,11 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +type AllowedSingleElementEquality = 'always' | 'never'; +export type Options = [ + { + allowSingleElementEquality?: AllowedSingleElementEquality; + } +]; +export type MessageIds = 'preferEndsWith' | 'preferStartsWith'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=prefer-string-starts-ends-with.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.d.ts.map new file mode 100644 index 0000000..5f26652 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-string-starts-ends-with.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-string-starts-ends-with.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,QAAQ,EAET,MAAM,0BAA0B,CAAC;AAqBlC,KAAK,4BAA4B,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvD,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,0BAA0B,CAAC,EAAE,4BAA4B,CAAC;KAC3D;CACF,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;;AAE/D,wBA+qBG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js new file mode 100644 index 0000000..6d238cc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js @@ -0,0 +1,512 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const regexpp_1 = require("@eslint-community/regexpp"); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +const EQ_OPERATORS = /^[=!]=/; +const regexpp = new regexpp_1.RegExpParser(); +exports.default = (0, util_1.createRule)({ + name: 'prefer-string-starts-ends-with', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings', + recommended: 'stylistic', + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + preferEndsWith: "Use the 'String#endsWith' method instead.", + preferStartsWith: "Use 'String#startsWith' method instead.", + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowSingleElementEquality: { + type: 'string', + description: 'Whether to allow equality checks against the first or last element of a string.', + enum: ['always', 'never'], + }, + }, + }, + ], + }, + defaultOptions: [{ allowSingleElementEquality: 'never' }], + create(context, [{ allowSingleElementEquality }]) { + const globalScope = context.sourceCode.getScope(context.sourceCode.ast); + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + /** + * Check if a given node is a string. + * @param node The node to check. + */ + function isStringType(node) { + const objectType = services.getTypeAtLocation(node); + return (0, util_1.getTypeName)(checker, objectType) === 'string'; + } + /** + * Check if a given node is a `Literal` node that is null. + * @param node The node to check. + */ + function isNull(node) { + const evaluated = (0, util_1.getStaticValue)(node, globalScope); + return evaluated != null && evaluated.value == null; + } + /** + * Check if a given node is a `Literal` node that is a given value. + * @param node The node to check. + * @param value The expected value of the `Literal` node. + */ + function isNumber(node, value) { + const evaluated = (0, util_1.getStaticValue)(node, globalScope); + return evaluated != null && evaluated.value === value; + } + /** + * Check if a given node is a `Literal` node that is a character. + * @param node The node to check. + */ + function isCharacter(node) { + const evaluated = (0, util_1.getStaticValue)(node, globalScope); + return (evaluated != null && + typeof evaluated.value === 'string' && + // checks if the string is a character long + evaluated.value[0] === evaluated.value); + } + /** + * Check if a given node is `==`, `===`, `!=`, or `!==`. + * @param node The node to check. + */ + function isEqualityComparison(node) { + return (node.type === utils_1.AST_NODE_TYPES.BinaryExpression && + EQ_OPERATORS.test(node.operator)); + } + /** + * Check if two given nodes are the same meaning. + * @param node1 A node to compare. + * @param node2 Another node to compare. + */ + function isSameTokens(node1, node2) { + const tokens1 = context.sourceCode.getTokens(node1); + const tokens2 = context.sourceCode.getTokens(node2); + if (tokens1.length !== tokens2.length) { + return false; + } + for (let i = 0; i < tokens1.length; ++i) { + const token1 = tokens1[i]; + const token2 = tokens2[i]; + if (token1.type !== token2.type || token1.value !== token2.value) { + return false; + } + } + return true; + } + /** + * Check if a given node is the expression of the length of a string. + * + * - If `length` property access of `expectedObjectNode`, it's `true`. + * E.g., `foo` → `foo.length` / `"foo"` → `"foo".length` + * - If `expectedObjectNode` is a string literal, `node` can be a number. + * E.g., `"foo"` → `3` + * + * @param node The node to check. + * @param expectedObjectNode The node which is expected as the receiver of `length` property. + */ + function isLengthExpression(node, expectedObjectNode) { + if (node.type === utils_1.AST_NODE_TYPES.MemberExpression) { + return ((0, util_1.getPropertyName)(node, globalScope) === 'length' && + isSameTokens(node.object, expectedObjectNode)); + } + const evaluatedLength = (0, util_1.getStaticValue)(node, globalScope); + const evaluatedString = (0, util_1.getStaticValue)(expectedObjectNode, globalScope); + return (evaluatedLength != null && + evaluatedString != null && + typeof evaluatedLength.value === 'number' && + typeof evaluatedString.value === 'string' && + evaluatedLength.value === evaluatedString.value.length); + } + /** + * Returns true if `node` is `-substring.length` or + * `parentString.length - substring.length` + */ + function isLengthAheadOfEnd(node, substring, parentString) { + return ((node.type === utils_1.AST_NODE_TYPES.UnaryExpression && + node.operator === '-' && + isLengthExpression(node.argument, substring)) || + (node.type === utils_1.AST_NODE_TYPES.BinaryExpression && + node.operator === '-' && + isLengthExpression(node.left, parentString) && + isLengthExpression(node.right, substring))); + } + /** + * Check if a given node is the expression of the last index. + * + * E.g. `foo.length - 1` + * + * @param node The node to check. + * @param expectedObjectNode The node which is expected as the receiver of `length` property. + */ + function isLastIndexExpression(node, expectedObjectNode) { + return (node.type === utils_1.AST_NODE_TYPES.BinaryExpression && + node.operator === '-' && + isLengthExpression(node.left, expectedObjectNode) && + isNumber(node.right, 1)); + } + /** + * Get the range of the property of a given `MemberExpression` node. + * + * - `obj[foo]` → the range of `[foo]` + * - `obf.foo` → the range of `.foo` + * - `(obj).foo` → the range of `.foo` + * + * @param node The member expression node to get. + */ + function getPropertyRange(node) { + const dotOrOpenBracket = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.object, util_1.isNotClosingParenToken), util_1.NullThrowsReasons.MissingToken('closing parenthesis', 'member')); + return [dotOrOpenBracket.range[0], node.range[1]]; + } + /** + * Parse a given `RegExp` pattern to that string if it's a static string. + * @param pattern The RegExp pattern text to parse. + * @param unicode Whether the RegExp is unicode. + */ + function parseRegExpText(pattern, unicode) { + // Parse it. + const ast = regexpp.parsePattern(pattern, undefined, undefined, { + unicode, + }); + if (ast.alternatives.length !== 1) { + return null; + } + // Drop `^`/`$` assertion. + const chars = ast.alternatives[0].elements; + const first = chars[0]; + if (first.type === 'Assertion' && first.kind === 'start') { + chars.shift(); + } + else { + chars.pop(); + } + // Check if it can determine a unique string. + if (!chars.every(c => c.type === 'Character')) { + return null; + } + // To string. + return String.fromCodePoint(...chars.map(c => c.value)); + } + /** + * Parse a given node if it's a `RegExp` instance. + * @param node The node to parse. + */ + function parseRegExp(node) { + const evaluated = (0, util_1.getStaticValue)(node, globalScope); + if (evaluated == null || !(evaluated.value instanceof RegExp)) { + return null; + } + const { flags, source } = evaluated.value; + const isStartsWith = source.startsWith('^'); + const isEndsWith = source.endsWith('$'); + if (isStartsWith === isEndsWith || + flags.includes('i') || + flags.includes('m')) { + return null; + } + const text = parseRegExpText(source, flags.includes('u')); + if (text == null) { + return null; + } + return { isEndsWith, isStartsWith, text }; + } + function getLeftNode(init) { + const node = (0, util_1.skipChainExpression)(init); + const leftNode = node.type === utils_1.AST_NODE_TYPES.CallExpression ? node.callee : node; + if (leftNode.type !== utils_1.AST_NODE_TYPES.MemberExpression) { + throw new Error(`Expected a MemberExpression, got ${leftNode.type}`); + } + return leftNode; + } + /** + * Fix code with using the right operand as the search string. + * For example: `foo.slice(0, 3) === 'bar'` → `foo.startsWith('bar')` + * @param fixer The rule fixer. + * @param node The node which was reported. + * @param kind The kind of the report. + * @param isNegative The flag to fix to negative condition. + */ + function* fixWithRightOperand(fixer, node, kind, isNegative, isOptional) { + // left is CallExpression or MemberExpression. + const leftNode = getLeftNode(node.left); + const propertyRange = getPropertyRange(leftNode); + if (isNegative) { + yield fixer.insertTextBefore(node, '!'); + } + yield fixer.replaceTextRange([propertyRange[0], node.right.range[0]], `${isOptional ? '?.' : '.'}${kind}sWith(`); + yield fixer.replaceTextRange([node.right.range[1], node.range[1]], ')'); + } + /** + * Fix code with using the first argument as the search string. + * For example: `foo.indexOf('bar') === 0` → `foo.startsWith('bar')` + * @param fixer The rule fixer. + * @param node The node which was reported. + * @param kind The kind of the report. + * @param negative The flag to fix to negative condition. + */ + function* fixWithArgument(fixer, node, callNode, calleeNode, kind, negative, isOptional) { + if (negative) { + yield fixer.insertTextBefore(node, '!'); + } + yield fixer.replaceTextRange(getPropertyRange(calleeNode), `${isOptional ? '?.' : '.'}${kind}sWith`); + yield fixer.removeRange([callNode.range[1], node.range[1]]); + } + function getParent(node) { + return node.parent.type === utils_1.AST_NODE_TYPES.ChainExpression + ? node.parent.parent + : node.parent; + } + return { + // foo[0] === "a" + // foo.charAt(0) === "a" + // foo[foo.length - 1] === "a" + // foo.charAt(foo.length - 1) === "a" + [[ + 'BinaryExpression > MemberExpression.left[computed=true]', + 'BinaryExpression > CallExpression.left > MemberExpression.callee[property.name="charAt"][computed=false]', + 'BinaryExpression > ChainExpression.left > MemberExpression[computed=true]', + 'BinaryExpression > ChainExpression.left > CallExpression > MemberExpression.callee[property.name="charAt"][computed=false]', + ].join(', ')](node) { + let parentNode = getParent(node); + let indexNode = null; + if (parentNode.type === utils_1.AST_NODE_TYPES.CallExpression) { + if (parentNode.arguments.length === 1) { + indexNode = parentNode.arguments[0]; + } + parentNode = getParent(parentNode); + } + else { + indexNode = node.property; + } + if (indexNode == null || + !isEqualityComparison(parentNode) || + !isStringType(node.object)) { + return; + } + const isEndsWith = isLastIndexExpression(indexNode, node.object); + if (allowSingleElementEquality === 'always' && isEndsWith) { + return; + } + const isStartsWith = !isEndsWith && isNumber(indexNode, 0); + if ((allowSingleElementEquality === 'always' && isStartsWith) || + (!isStartsWith && !isEndsWith)) { + return; + } + const eqNode = parentNode; + context.report({ + node: parentNode, + messageId: isStartsWith ? 'preferStartsWith' : 'preferEndsWith', + fix(fixer) { + // Don't fix if it can change the behavior. + if (!isCharacter(eqNode.right)) { + return null; + } + return fixWithRightOperand(fixer, eqNode, isStartsWith ? 'start' : 'end', eqNode.operator.startsWith('!'), node.optional); + }, + }); + }, + // foo.indexOf('bar') === 0 + [[ + 'BinaryExpression > CallExpression.left > MemberExpression.callee[property.name="indexOf"][computed=false]', + 'BinaryExpression > ChainExpression.left > CallExpression > MemberExpression.callee[property.name="indexOf"][computed=false]', + ].join(', ')](node) { + const callNode = getParent(node); + const parentNode = getParent(callNode); + if (callNode.arguments.length !== 1 || + !isEqualityComparison(parentNode) || + !isNumber(parentNode.right, 0) || + !isStringType(node.object)) { + return; + } + context.report({ + node: parentNode, + messageId: 'preferStartsWith', + fix(fixer) { + return fixWithArgument(fixer, parentNode, callNode, node, 'start', parentNode.operator.startsWith('!'), node.optional); + }, + }); + }, + // foo.lastIndexOf('bar') === foo.length - 3 + // foo.lastIndexOf(bar) === foo.length - bar.length + [[ + 'BinaryExpression > CallExpression.left > MemberExpression.callee[property.name="lastIndexOf"][computed=false]', + 'BinaryExpression > ChainExpression.left > CallExpression > MemberExpression.callee[property.name="lastIndexOf"][computed=false]', + ].join(', ')](node) { + const callNode = getParent(node); + const parentNode = getParent(callNode); + if (callNode.arguments.length !== 1 || + !isEqualityComparison(parentNode) || + parentNode.right.type !== utils_1.AST_NODE_TYPES.BinaryExpression || + parentNode.right.operator !== '-' || + !isLengthExpression(parentNode.right.left, node.object) || + !isLengthExpression(parentNode.right.right, callNode.arguments[0]) || + !isStringType(node.object)) { + return; + } + context.report({ + node: parentNode, + messageId: 'preferEndsWith', + fix(fixer) { + return fixWithArgument(fixer, parentNode, callNode, node, 'end', parentNode.operator.startsWith('!'), node.optional); + }, + }); + }, + // foo.match(/^bar/) === null + // foo.match(/bar$/) === null + [[ + 'BinaryExpression > CallExpression.left > MemberExpression.callee[property.name="match"][computed=false]', + 'BinaryExpression > ChainExpression.left > CallExpression > MemberExpression.callee[property.name="match"][computed=false]', + ].join(', ')](node) { + const callNode = getParent(node); + const parentNode = getParent(callNode); + if (!isNull(parentNode.right) || !isStringType(node.object)) { + return; + } + const parsed = callNode.arguments.length === 1 + ? parseRegExp(callNode.arguments[0]) + : null; + if (parsed == null) { + return; + } + const { isStartsWith, text } = parsed; + context.report({ + node: callNode, + messageId: isStartsWith ? 'preferStartsWith' : 'preferEndsWith', + *fix(fixer) { + if (!parentNode.operator.startsWith('!')) { + yield fixer.insertTextBefore(parentNode, '!'); + } + yield fixer.replaceTextRange(getPropertyRange(node), `${node.optional ? '?.' : '.'}${isStartsWith ? 'start' : 'end'}sWith`); + yield fixer.replaceText(callNode.arguments[0], JSON.stringify(text)); + yield fixer.removeRange([callNode.range[1], parentNode.range[1]]); + }, + }); + }, + // foo.slice(0, 3) === 'bar' + // foo.slice(-3) === 'bar' + // foo.slice(-3, foo.length) === 'bar' + // foo.substring(0, 3) === 'bar' + // foo.substring(foo.length - 3) === 'bar' + // foo.substring(foo.length - 3, foo.length) === 'bar' + [[ + 'BinaryExpression > CallExpression.left > MemberExpression', + 'BinaryExpression > ChainExpression.left > CallExpression > MemberExpression', + ].join(', ')](node) { + if (!(0, util_1.isStaticMemberAccessOfValue)(node, context, 'slice', 'substring')) { + return; + } + const callNode = getParent(node); + const parentNode = getParent(callNode); + if (!isEqualityComparison(parentNode) || !isStringType(node.object)) { + return; + } + let isEndsWith = false; + let isStartsWith = false; + if (callNode.arguments.length === 1) { + if ( + // foo.slice(-bar.length) === bar + // foo.slice(foo.length - bar.length) === bar + isLengthAheadOfEnd(callNode.arguments[0], parentNode.right, node.object)) { + isEndsWith = true; + } + } + else if (callNode.arguments.length === 2) { + if ( + // foo.slice(0, bar.length) === bar + isNumber(callNode.arguments[0], 0) && + isLengthExpression(callNode.arguments[1], parentNode.right)) { + isStartsWith = true; + } + else if ( + // foo.slice(foo.length - bar.length, foo.length) === bar + // foo.slice(foo.length - bar.length, 0) === bar + // foo.slice(-bar.length, foo.length) === bar + // foo.slice(-bar.length, 0) === bar + (isLengthExpression(callNode.arguments[1], node.object) || + isNumber(callNode.arguments[1], 0)) && + isLengthAheadOfEnd(callNode.arguments[0], parentNode.right, node.object)) { + isEndsWith = true; + } + } + if (!isStartsWith && !isEndsWith) { + return; + } + const eqNode = parentNode; + const negativeIndexSupported = node.property.name === 'slice'; + context.report({ + node: parentNode, + messageId: isStartsWith ? 'preferStartsWith' : 'preferEndsWith', + fix(fixer) { + // Don't fix if it can change the behavior. + if (eqNode.operator.length === 2 && + (eqNode.right.type !== utils_1.AST_NODE_TYPES.Literal || + typeof eqNode.right.value !== 'string')) { + return null; + } + // code being checked is likely mistake: + // unequal length of strings being checked for equality + // or reliant on behavior of substring (negative indices interpreted as 0) + if (isStartsWith) { + if (!isLengthExpression(callNode.arguments[1], eqNode.right)) { + return null; + } + } + else { + const posNode = callNode.arguments[0]; + const posNodeIsAbsolutelyValid = (posNode.type === utils_1.AST_NODE_TYPES.BinaryExpression && + posNode.operator === '-' && + isLengthExpression(posNode.left, node.object) && + isLengthExpression(posNode.right, eqNode.right)) || + (negativeIndexSupported && + posNode.type === utils_1.AST_NODE_TYPES.UnaryExpression && + posNode.operator === '-' && + isLengthExpression(posNode.argument, eqNode.right)); + if (!posNodeIsAbsolutelyValid) { + return null; + } + } + return fixWithRightOperand(fixer, parentNode, isStartsWith ? 'start' : 'end', parentNode.operator.startsWith('!'), node.optional); + }, + }); + }, + // /^bar/.test(foo) + // /bar$/.test(foo) + 'CallExpression > MemberExpression.callee[property.name="test"][computed=false]'(node) { + const callNode = getParent(node); + const parsed = callNode.arguments.length === 1 ? parseRegExp(node.object) : null; + if (parsed == null) { + return; + } + const { isStartsWith, text } = parsed; + const messageId = isStartsWith ? 'preferStartsWith' : 'preferEndsWith'; + const methodName = isStartsWith ? 'startsWith' : 'endsWith'; + context.report({ + node: callNode, + messageId, + *fix(fixer) { + const argNode = callNode.arguments[0]; + const needsParen = argNode.type !== utils_1.AST_NODE_TYPES.Literal && + argNode.type !== utils_1.AST_NODE_TYPES.TemplateLiteral && + argNode.type !== utils_1.AST_NODE_TYPES.Identifier && + argNode.type !== utils_1.AST_NODE_TYPES.MemberExpression && + argNode.type !== utils_1.AST_NODE_TYPES.CallExpression; + yield fixer.removeRange([callNode.range[0], argNode.range[0]]); + if (needsParen) { + yield fixer.insertTextBefore(argNode, '('); + yield fixer.insertTextAfter(argNode, ')'); + } + yield fixer.insertTextAfter(argNode, `${node.optional ? '?.' : '.'}${methodName}(${JSON.stringify(text)}`); + }, + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.d.ts new file mode 100644 index 0000000..14aa05c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.d.ts @@ -0,0 +1,4 @@ +export type MessageIds = 'preferExpectErrorComment'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferExpectErrorComment", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=prefer-ts-expect-error.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.d.ts.map new file mode 100644 index 0000000..4482f5c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prefer-ts-expect-error.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-ts-expect-error.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,UAAU,GAAG,0BAA0B,CAAC;;AAEpD,wBAqFG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js new file mode 100644 index 0000000..9383ccf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js @@ -0,0 +1,71 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'prefer-ts-expect-error', + meta: { + type: 'problem', + deprecated: { + deprecatedSince: '7.11.0', + replacedBy: [ + { + rule: { + name: '@typescript-eslint/ban-ts-comment', + url: 'https://typescript-eslint.io/rules/ban-ts-comment', + }, + }, + ], + url: 'https://github.com/typescript-eslint/typescript-eslint/pull/9081', + }, + docs: { + description: 'Enforce using `@ts-expect-error` over `@ts-ignore`', + }, + fixable: 'code', + messages: { + preferExpectErrorComment: 'Use "@ts-expect-error" to ensure an error is actually being suppressed.', + }, + replacedBy: ['@typescript-eslint/ban-ts-comment'], + schema: [], + }, + defaultOptions: [], + create(context) { + const tsIgnoreRegExpSingleLine = /^\s*\/?\s*@ts-ignore/; + const tsIgnoreRegExpMultiLine = /^\s*(?:\/|\*)*\s*@ts-ignore/; + function isLineComment(comment) { + return comment.type === utils_1.AST_TOKEN_TYPES.Line; + } + function getLastCommentLine(comment) { + if (isLineComment(comment)) { + return comment.value; + } + // For multiline comments - we look at only the last line. + const commentlines = comment.value.split('\n'); + return commentlines[commentlines.length - 1]; + } + function isValidTsIgnorePresent(comment) { + const line = getLastCommentLine(comment); + return isLineComment(comment) + ? tsIgnoreRegExpSingleLine.test(line) + : tsIgnoreRegExpMultiLine.test(line); + } + return { + Program() { + const comments = context.sourceCode.getAllComments(); + comments.forEach(comment => { + if (isValidTsIgnorePresent(comment)) { + const lineCommentRuleFixer = (fixer) => fixer.replaceText(comment, `//${comment.value.replace('@ts-ignore', '@ts-expect-error')}`); + const blockCommentRuleFixer = (fixer) => fixer.replaceText(comment, `/*${comment.value.replace('@ts-ignore', '@ts-expect-error')}*/`); + context.report({ + node: comment, + messageId: 'preferExpectErrorComment', + fix: isLineComment(comment) + ? lineCommentRuleFixer + : blockCommentRuleFixer, + }); + } + }); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.d.ts new file mode 100644 index 0000000..2901e5f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.d.ts @@ -0,0 +1,14 @@ +export type Options = [ + { + allowAny?: boolean; + allowedPromiseNames?: string[]; + checkArrowFunctions?: boolean; + checkFunctionDeclarations?: boolean; + checkFunctionExpressions?: boolean; + checkMethodDeclarations?: boolean; + } +]; +export type MessageIds = 'missingAsync' | 'missingAsyncHybridReturn'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=promise-function-async.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.d.ts.map new file mode 100644 index 0000000..59006ac --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"promise-function-async.d.ts","sourceRoot":"","sources":["../../src/rules/promise-function-async.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,yBAAyB,CAAC,EAAE,OAAO,CAAC;QACpC,wBAAwB,CAAC,EAAE,OAAO,CAAC;QACnC,uBAAuB,CAAC,EAAE,OAAO,CAAC;KACnC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,0BAA0B,CAAC;;AAErE,wBAyPG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js new file mode 100644 index 0000000..5a8f4f6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js @@ -0,0 +1,202 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'promise-function-async', + meta: { + type: 'suggestion', + docs: { + description: 'Require any function or method that returns a Promise to be marked async', + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + missingAsync: 'Functions that return promises must be async.', + missingAsyncHybridReturn: 'Functions that return promises must be async. Consider adding an explicit return type annotation if the function is intended to return a union of promise and non-promise types.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowAny: { + type: 'boolean', + description: 'Whether to consider `any` and `unknown` to be Promises.', + }, + allowedPromiseNames: { + type: 'array', + description: 'Any extra names of classes or interfaces to be considered Promises.', + items: { + type: 'string', + }, + }, + checkArrowFunctions: { + type: 'boolean', + description: 'Whether to check arrow functions.', + }, + checkFunctionDeclarations: { + type: 'boolean', + description: 'Whether to check standalone function declarations.', + }, + checkFunctionExpressions: { + type: 'boolean', + description: 'Whether to check inline function expressions', + }, + checkMethodDeclarations: { + type: 'boolean', + description: 'Whether to check methods on classes and object literals.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowAny: true, + allowedPromiseNames: [], + checkArrowFunctions: true, + checkFunctionDeclarations: true, + checkFunctionExpressions: true, + checkMethodDeclarations: true, + }, + ], + create(context, [{ allowAny, allowedPromiseNames, checkArrowFunctions, checkFunctionDeclarations, checkFunctionExpressions, checkMethodDeclarations, },]) { + const allAllowedPromiseNames = new Set([ + 'Promise', + // https://github.com/typescript-eslint/typescript-eslint/issues/5439 + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + ...allowedPromiseNames, + ]); + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + function validateNode(node) { + if (node.parent.type === utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition) { + // Abstract method can't be async + return; + } + if ((node.parent.type === utils_1.AST_NODE_TYPES.Property || + node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition) && + (node.parent.kind === 'get' || node.parent.kind === 'set')) { + // Getters and setters can't be async + return; + } + const signatures = services.getTypeAtLocation(node).getCallSignatures(); + if (!signatures.length) { + return; + } + const returnTypes = signatures.map(signature => checker.getReturnTypeOfSignature(signature)); + if (!allowAny && + returnTypes.some(type => (0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Any | ts.TypeFlags.Unknown))) { + // Report without auto fixer because the return type is unknown + return context.report({ + loc: (0, util_1.getFunctionHeadLoc)(node, context.sourceCode), + node, + messageId: 'missingAsync', + }); + } + if ( + // require all potential return types to be promise/any/unknown + returnTypes.every(type => (0, util_1.containsAllTypesByName)(type, true, allAllowedPromiseNames, + // If no return type is explicitly set, we check if any parts of the return type match a Promise (instead of requiring all to match). + node.returnType == null))) { + const isHybridReturnType = returnTypes.some(type => type.isUnion() && + !type.types.every(part => (0, util_1.containsAllTypesByName)(part, true, allAllowedPromiseNames))); + context.report({ + loc: (0, util_1.getFunctionHeadLoc)(node, context.sourceCode), + node, + messageId: isHybridReturnType + ? 'missingAsyncHybridReturn' + : 'missingAsync', + fix: fixer => { + if (node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition || + (node.parent.type === utils_1.AST_NODE_TYPES.Property && + node.parent.method)) { + // this function is a class method or object function property shorthand + const method = node.parent; + // the token to put `async` before + let keyToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(method), util_1.NullThrowsReasons.MissingToken('key token', 'method')); + // if there are decorators then skip past them + if (method.type === utils_1.AST_NODE_TYPES.MethodDefinition && + method.decorators.length) { + const lastDecorator = method.decorators[method.decorators.length - 1]; + keyToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(lastDecorator), util_1.NullThrowsReasons.MissingToken('key token', 'last decorator')); + } + // if current token is a keyword like `static` or `public` then skip it + while (keyToken.type === utils_1.AST_TOKEN_TYPES.Keyword && + keyToken.range[0] < method.key.range[0]) { + keyToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(keyToken), util_1.NullThrowsReasons.MissingToken('token', 'keyword')); + } + // check if there is a space between key and previous token + const insertSpace = !context.sourceCode.isSpaceBetween((0, util_1.nullThrows)(context.sourceCode.getTokenBefore(keyToken), util_1.NullThrowsReasons.MissingToken('token', 'keyword')), keyToken); + let code = 'async '; + if (insertSpace) { + code = ` ${code}`; + } + return fixer.insertTextBefore(keyToken, code); + } + return fixer.insertTextBefore(node, 'async '); + }, + }); + } + } + return { + ...(checkArrowFunctions && { + 'ArrowFunctionExpression[async = false]'(node) { + validateNode(node); + }, + }), + ...(checkFunctionDeclarations && { + 'FunctionDeclaration[async = false]'(node) { + validateNode(node); + }, + }), + 'FunctionExpression[async = false]'(node) { + if (node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition && + node.parent.kind === 'method') { + if (checkMethodDeclarations) { + validateNode(node); + } + return; + } + if (checkFunctionExpressions) { + validateNode(node); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/related-getter-setter-pairs.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/related-getter-setter-pairs.d.ts new file mode 100644 index 0000000..ddf6aac --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/related-getter-setter-pairs.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"mismatch", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=related-getter-setter-pairs.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/related-getter-setter-pairs.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/related-getter-setter-pairs.d.ts.map new file mode 100644 index 0000000..f529346 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/related-getter-setter-pairs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"related-getter-setter-pairs.d.ts","sourceRoot":"","sources":["../../src/rules/related-getter-setter-pairs.ts"],"names":[],"mappings":";AAwBA,wBAoFG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/related-getter-setter-pairs.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/related-getter-setter-pairs.js new file mode 100644 index 0000000..6f1a2c6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/related-getter-setter-pairs.js @@ -0,0 +1,71 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'related-getter-setter-pairs', + meta: { + type: 'problem', + docs: { + description: 'Enforce that `get()` types should be assignable to their equivalent `set()` type', + recommended: 'strict', + requiresTypeChecking: true, + }, + messages: { + mismatch: '`get()` type should be assignable to its equivalent `set()` type.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const methodPairsStack = []; + function addPropertyNode(member, inner, kind) { + const methodPairs = methodPairsStack[methodPairsStack.length - 1]; + const { name } = (0, util_1.getNameFromMember)(member, context.sourceCode); + methodPairs.set(name, { + ...methodPairs.get(name), + [kind]: inner, + }); + } + return { + ':matches(ClassBody, TSInterfaceBody, TSTypeLiteral):exit'() { + const methodPairs = methodPairsStack[methodPairsStack.length - 1]; + for (const pair of methodPairs.values()) { + if (!pair.get || !pair.set) { + continue; + } + const getter = pair.get; + const getType = services.getTypeAtLocation(getter); + const setType = services.getTypeAtLocation(pair.set.params[0]); + if (!checker.isTypeAssignableTo(getType, setType)) { + context.report({ + node: getter.returnType.typeAnnotation, + messageId: 'mismatch', + }); + } + } + methodPairsStack.pop(); + }, + ':matches(MethodDefinition, TSMethodSignature)[kind=get]'(node) { + const getter = getMethodFromNode(node); + if (getter.returnType) { + addPropertyNode(node, getter, 'get'); + } + }, + ':matches(MethodDefinition, TSMethodSignature)[kind=set]'(node) { + const setter = getMethodFromNode(node); + if (setter.params.length === 1) { + addPropertyNode(node, setter, 'set'); + } + }, + 'ClassBody, TSInterfaceBody, TSTypeLiteral'() { + methodPairsStack.push(new Map()); + }, + }; + }, +}); +function getMethodFromNode(node) { + return node.type === utils_1.AST_NODE_TYPES.TSMethodSignature ? node : node.value; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.d.ts new file mode 100644 index 0000000..d845cbc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.d.ts @@ -0,0 +1,9 @@ +export type Options = [ + { + ignoreStringArrays?: boolean; + } +]; +export type MessageIds = 'requireCompare'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"requireCompare", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=require-array-sort-compare.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.d.ts.map new file mode 100644 index 0000000..d58e7c4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"require-array-sort-compare.d.ts","sourceRoot":"","sources":["../../src/rules/require-array-sort-compare.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;;AAE1C,wBAyEG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js new file mode 100644 index 0000000..e358fb5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js @@ -0,0 +1,63 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'require-array-sort-compare', + meta: { + type: 'problem', + docs: { + description: 'Require `Array#sort` and `Array#toSorted` calls to always provide a `compareFunction`', + requiresTypeChecking: true, + }, + messages: { + requireCompare: "Require 'compare' argument.", + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + ignoreStringArrays: { + type: 'boolean', + description: 'Whether to ignore arrays in which all elements are strings.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + ignoreStringArrays: true, + }, + ], + create(context, [options]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + /** + * Check if a given node is an array which all elements are string. + */ + function isStringArrayNode(node) { + const type = services.getTypeAtLocation(node); + if (checker.isArrayType(type) || checker.isTupleType(type)) { + const typeArgs = checker.getTypeArguments(type); + return typeArgs.every(arg => (0, util_1.getTypeName)(checker, arg) === 'string'); + } + return false; + } + function checkSortArgument(callee) { + if (!(0, util_1.isStaticMemberAccessOfValue)(callee, context, 'sort', 'toSorted')) { + return; + } + const calleeObjType = (0, util_1.getConstrainedTypeAtLocation)(services, callee.object); + if (options.ignoreStringArrays && isStringArrayNode(callee.object)) { + return; + } + if ((0, util_1.isTypeArrayTypeOrUnionOfArrayTypes)(calleeObjType, checker)) { + context.report({ node: callee.parent, messageId: 'requireCompare' }); + } + } + return { + 'CallExpression[arguments.length=0] > MemberExpression': checkSortArgument, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.d.ts new file mode 100644 index 0000000..5ae54fc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingAwait" | "removeAsync", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=require-await.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.d.ts.map new file mode 100644 index 0000000..426c5c2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"require-await.d.ts","sourceRoot":"","sources":["../../src/rules/require-await.ts"],"names":[],"mappings":";AA8BA,wBAuRG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js new file mode 100644 index 0000000..74a189a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js @@ -0,0 +1,263 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'require-await', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow async functions which do not return promises and have no `await` expression', + extendsBaseRule: true, + recommended: 'recommended', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + missingAwait: "{{name}} has no 'await' expression.", + removeAsync: "Remove 'async'.", + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + let scopeInfo = null; + /** + * Push the scope info object to the stack. + */ + function enterFunction(node) { + scopeInfo = { + hasAsync: node.async, + hasAwait: false, + isAsyncYield: false, + isGen: node.generator || false, + upper: scopeInfo, + }; + } + /** + * Pop the top scope info object from the stack. + * Also, it reports the function if needed. + */ + function exitFunction(node) { + /* istanbul ignore if */ if (!scopeInfo) { + // this shouldn't ever happen, as we have to exit a function after we enter it + return; + } + if (node.async && + !scopeInfo.hasAwait && + !isEmptyFunction(node) && + !(scopeInfo.isGen && scopeInfo.isAsyncYield)) { + // If the function belongs to a method definition or + // property, then the function's range may not include the + // `async` keyword and we should look at the parent instead. + const nodeWithAsyncKeyword = (node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition && + node.parent.value === node) || + (node.parent.type === utils_1.AST_NODE_TYPES.Property && + node.parent.method && + node.parent.value === node) + ? node.parent + : node; + const asyncToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(nodeWithAsyncKeyword, token => token.value === 'async'), 'The node is an async function, so it must have an "async" token.'); + const asyncRange = [ + asyncToken.range[0], + (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(asyncToken, { + includeComments: true, + }), 'There will always be a token after the "async" keyword.').range[0], + ]; + // Removing the `async` keyword can cause parsing errors if the + // current statement is relying on automatic semicolon insertion. + // If ASI is currently being used, then we should replace the + // `async` keyword with a semicolon. + const nextToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(asyncToken), 'There will always be a token after the "async" keyword.'); + const addSemiColon = nextToken.type === utils_1.AST_TOKEN_TYPES.Punctuator && + (nextToken.value === '[' || nextToken.value === '(') && + (nodeWithAsyncKeyword.type === utils_1.AST_NODE_TYPES.MethodDefinition || + (0, util_1.isStartOfExpressionStatement)(nodeWithAsyncKeyword)) && + (0, util_1.needsPrecedingSemicolon)(context.sourceCode, nodeWithAsyncKeyword); + const changes = [ + { range: asyncRange, replacement: addSemiColon ? ';' : undefined }, + ]; + // If there's a return type annotation and it's a + // `Promise`, we can also change the return type + // annotation to just `T` as part of the suggestion. + // Alternatively, if the function is a generator and + // the return type annotation is `AsyncGenerator`, + // then we can change it to `Generator`. + if (node.returnType?.typeAnnotation.type === + utils_1.AST_NODE_TYPES.TSTypeReference) { + if (scopeInfo.isGen) { + if (hasTypeName(node.returnType.typeAnnotation, 'AsyncGenerator')) { + changes.push({ + range: node.returnType.typeAnnotation.typeName.range, + replacement: 'Generator', + }); + } + } + else if (hasTypeName(node.returnType.typeAnnotation, 'Promise') && + node.returnType.typeAnnotation.typeArguments != null) { + const openAngle = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node.returnType.typeAnnotation, token => token.type === utils_1.AST_TOKEN_TYPES.Punctuator && + token.value === '<'), 'There are type arguments, so the angle bracket will exist.'); + const closeAngle = (0, util_1.nullThrows)(context.sourceCode.getLastToken(node.returnType.typeAnnotation, token => token.type === utils_1.AST_TOKEN_TYPES.Punctuator && + token.value === '>'), 'There are type arguments, so the angle bracket will exist.'); + changes.push( + // Remove the closing angled bracket. + { range: closeAngle.range, replacement: undefined }, + // Remove the "Promise" identifier + // and the opening angled bracket. + { + range: [ + node.returnType.typeAnnotation.typeName.range[0], + openAngle.range[1], + ], + replacement: undefined, + }); + } + } + context.report({ + loc: (0, util_1.getFunctionHeadLoc)(node, context.sourceCode), + node, + messageId: 'missingAwait', + data: { + name: (0, util_1.upperCaseFirst)((0, util_1.getFunctionNameWithKind)(node)), + }, + suggest: [ + { + messageId: 'removeAsync', + fix: (fixer) => changes.map(change => change.replacement != null + ? fixer.replaceTextRange(change.range, change.replacement) + : fixer.removeRange(change.range)), + }, + ], + }); + } + scopeInfo = scopeInfo.upper; + } + /** + * Checks if the node returns a thenable type + */ + function isThenableType(node) { + const type = checker.getTypeAtLocation(node); + return tsutils.isThenableType(checker, node, type); + } + /** + * Marks the current scope as having an await + */ + function markAsHasAwait() { + if (!scopeInfo) { + return; + } + scopeInfo.hasAwait = true; + } + /** + * Mark `scopeInfo.isAsyncYield` to `true` if it + * 1) delegates async generator function + * or + * 2) yields thenable type + */ + function visitYieldExpression(node) { + if (!scopeInfo?.isGen || !node.argument) { + return; + } + if (node.argument.type === utils_1.AST_NODE_TYPES.Literal) { + // ignoring this as for literals we don't need to check the definition + // eg : async function* run() { yield* 1 } + return; + } + if (!node.delegate) { + if (isThenableType(services.esTreeNodeToTSNodeMap.get(node.argument))) { + scopeInfo.isAsyncYield = true; + } + return; + } + const type = services.getTypeAtLocation(node.argument); + const typesToCheck = expandUnionOrIntersectionType(type); + for (const type of typesToCheck) { + const asyncIterator = tsutils.getWellKnownSymbolPropertyOfType(type, 'asyncIterator', checker); + if (asyncIterator != null) { + scopeInfo.isAsyncYield = true; + break; + } + } + } + return { + ArrowFunctionExpression: enterFunction, + 'ArrowFunctionExpression:exit': exitFunction, + AwaitExpression: markAsHasAwait, + 'ForOfStatement[await = true]': markAsHasAwait, + FunctionDeclaration: enterFunction, + 'FunctionDeclaration:exit': exitFunction, + FunctionExpression: enterFunction, + 'FunctionExpression:exit': exitFunction, + 'VariableDeclaration[kind = "await using"]': markAsHasAwait, + YieldExpression: visitYieldExpression, + // check body-less async arrow function. + // ignore `async () => await foo` because it's obviously correct + 'ArrowFunctionExpression[async = true] > :not(BlockStatement, AwaitExpression)'(node) { + const expression = services.esTreeNodeToTSNodeMap.get(node); + if (isThenableType(expression)) { + markAsHasAwait(); + } + }, + ReturnStatement(node) { + // short circuit early to avoid unnecessary type checks + if (!scopeInfo || scopeInfo.hasAwait || !scopeInfo.hasAsync) { + return; + } + const { expression } = services.esTreeNodeToTSNodeMap.get(node); + if (expression && isThenableType(expression)) { + markAsHasAwait(); + } + }, + }; + }, +}); +function isEmptyFunction(node) { + return (node.body.type === utils_1.AST_NODE_TYPES.BlockStatement && + node.body.body.length === 0); +} +function expandUnionOrIntersectionType(type) { + if (type.isUnionOrIntersection()) { + return type.types.flatMap(expandUnionOrIntersectionType); + } + return [type]; +} +function hasTypeName(typeReference, typeName) { + return (typeReference.typeName.type === utils_1.AST_NODE_TYPES.Identifier && + typeReference.typeName.name === typeName); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.d.ts new file mode 100644 index 0000000..37bf32a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.d.ts @@ -0,0 +1,14 @@ +export type Options = [ + { + allowAny?: boolean; + allowBoolean?: boolean; + allowNullish?: boolean; + allowNumberAndString?: boolean; + allowRegExp?: boolean; + skipCompoundAssignments?: boolean; + } +]; +export type MessageIds = 'bigintAndNumber' | 'invalid' | 'mismatched'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=restrict-plus-operands.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.d.ts.map new file mode 100644 index 0000000..7c3f40f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"restrict-plus-operands.d.ts","sourceRoot":"","sources":["../../src/rules/restrict-plus-operands.ts"],"names":[],"mappings":"AAcA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,uBAAuB,CAAC,EAAE,OAAO,CAAC;KACnC;CACF,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG,SAAS,GAAG,YAAY,CAAC;;AAEtE,wBA0OG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js new file mode 100644 index 0000000..8e45379 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js @@ -0,0 +1,231 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'restrict-plus-operands', + meta: { + type: 'problem', + docs: { + description: 'Require both operands of addition to be the same type and be `bigint`, `number`, or `string`', + recommended: { + recommended: true, + strict: [ + { + allowAny: false, + allowBoolean: false, + allowNullish: false, + allowNumberAndString: false, + allowRegExp: false, + }, + ], + }, + requiresTypeChecking: true, + }, + messages: { + bigintAndNumber: "Numeric '+' operations must either be both bigints or both numbers. Got `{{left}}` + `{{right}}`.", + invalid: "Invalid operand for a '+' operation. Operands must each be a number or {{stringLike}}. Got `{{type}}`.", + mismatched: "Operands of '+' operations must be a number or {{stringLike}}. Got `{{left}}` + `{{right}}`.", + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowAny: { + type: 'boolean', + description: 'Whether to allow `any` typed values.', + }, + allowBoolean: { + type: 'boolean', + description: 'Whether to allow `boolean` typed values.', + }, + allowNullish: { + type: 'boolean', + description: 'Whether to allow potentially `null` or `undefined` typed values.', + }, + allowNumberAndString: { + type: 'boolean', + description: 'Whether to allow `bigint`/`number` typed values and `string` typed values to be added together.', + }, + allowRegExp: { + type: 'boolean', + description: 'Whether to allow `regexp` typed values.', + }, + skipCompoundAssignments: { + type: 'boolean', + description: 'Whether to skip compound assignments such as `+=`.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowAny: true, + allowBoolean: true, + allowNullish: true, + allowNumberAndString: true, + allowRegExp: true, + skipCompoundAssignments: false, + }, + ], + create(context, [{ allowAny, allowBoolean, allowNullish, allowNumberAndString, allowRegExp, skipCompoundAssignments, },]) { + const services = (0, util_1.getParserServices)(context); + const typeChecker = services.program.getTypeChecker(); + const stringLikes = [ + allowAny && '`any`', + allowBoolean && '`boolean`', + allowNullish && '`null`', + allowRegExp && '`RegExp`', + allowNullish && '`undefined`', + ].filter((value) => typeof value === 'string'); + const stringLike = stringLikes.length + ? stringLikes.length === 1 + ? `string, allowing a string + ${stringLikes[0]}` + : `string, allowing a string + any of: ${stringLikes.join(', ')}` + : 'string'; + function getTypeConstrained(node) { + return typeChecker.getBaseTypeOfLiteralType((0, util_1.getConstrainedTypeAtLocation)(services, node)); + } + function checkPlusOperands(node) { + const leftType = getTypeConstrained(node.left); + const rightType = getTypeConstrained(node.right); + if (leftType === rightType && + tsutils.isTypeFlagSet(leftType, ts.TypeFlags.BigIntLike | + ts.TypeFlags.NumberLike | + ts.TypeFlags.StringLike)) { + return; + } + let hadIndividualComplaint = false; + for (const [baseNode, baseType, otherType] of [ + [node.left, leftType, rightType], + [node.right, rightType, leftType], + ]) { + if (isTypeFlagSetInUnion(baseType, ts.TypeFlags.ESSymbolLike | + ts.TypeFlags.Never | + ts.TypeFlags.Unknown) || + (!allowAny && isTypeFlagSetInUnion(baseType, ts.TypeFlags.Any)) || + (!allowBoolean && + isTypeFlagSetInUnion(baseType, ts.TypeFlags.BooleanLike)) || + (!allowNullish && + (0, util_1.isTypeFlagSet)(baseType, ts.TypeFlags.Null | ts.TypeFlags.Undefined))) { + context.report({ + node: baseNode, + messageId: 'invalid', + data: { + type: typeChecker.typeToString(baseType), + stringLike, + }, + }); + hadIndividualComplaint = true; + continue; + } + // RegExps also contain ts.TypeFlags.Any & ts.TypeFlags.Object + for (const subBaseType of tsutils.unionConstituents(baseType)) { + const typeName = (0, util_1.getTypeName)(typeChecker, subBaseType); + if (typeName === 'RegExp' + ? !allowRegExp || + tsutils.isTypeFlagSet(otherType, ts.TypeFlags.NumberLike) + : (!allowAny && (0, util_1.isTypeAnyType)(subBaseType)) || + isDeeplyObjectType(subBaseType)) { + context.report({ + node: baseNode, + messageId: 'invalid', + data: { + type: typeChecker.typeToString(subBaseType), + stringLike, + }, + }); + hadIndividualComplaint = true; + continue; + } + } + } + if (hadIndividualComplaint) { + return; + } + for (const [baseType, otherType] of [ + [leftType, rightType], + [rightType, leftType], + ]) { + if (!allowNumberAndString && + isTypeFlagSetInUnion(baseType, ts.TypeFlags.StringLike) && + isTypeFlagSetInUnion(otherType, ts.TypeFlags.NumberLike | ts.TypeFlags.BigIntLike)) { + return context.report({ + node, + messageId: 'mismatched', + data: { + left: typeChecker.typeToString(leftType), + right: typeChecker.typeToString(rightType), + stringLike, + }, + }); + } + if (isTypeFlagSetInUnion(baseType, ts.TypeFlags.NumberLike) && + isTypeFlagSetInUnion(otherType, ts.TypeFlags.BigIntLike)) { + return context.report({ + node, + messageId: 'bigintAndNumber', + data: { + left: typeChecker.typeToString(leftType), + right: typeChecker.typeToString(rightType), + }, + }); + } + } + } + return { + "BinaryExpression[operator='+']": checkPlusOperands, + ...(!skipCompoundAssignments && { + "AssignmentExpression[operator='+=']"(node) { + checkPlusOperands(node); + }, + }), + }; + }, +}); +function isDeeplyObjectType(type) { + return type.isIntersection() + ? tsutils.intersectionConstituents(type).every(tsutils.isObjectType) + : tsutils.unionConstituents(type).every(tsutils.isObjectType); +} +function isTypeFlagSetInUnion(type, flag) { + return tsutils + .unionConstituents(type) + .some(subType => tsutils.isTypeFlagSet(subType, flag)); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.d.ts new file mode 100644 index 0000000..efeb695 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.d.ts @@ -0,0 +1,18 @@ +import type { Type, TypeChecker } from 'typescript'; +import type { TypeOrValueSpecifier } from '../util'; +import { isTypeAnyType, isTypeNeverType } from '../util'; +type OptionTester = (type: Type, checker: TypeChecker, recursivelyCheckType: (type: Type) => boolean) => boolean; +declare const optionTesters: { + type: "Array" | "RegExp" | "Boolean" | "Number" | "Any" | "Nullish" | "Never"; + option: "allowAny" | "allowBoolean" | "allowNullish" | "allowRegExp" | "allowNever" | "allowNumber" | "allowArray"; + tester: typeof isTypeAnyType | typeof isTypeNeverType | OptionTester | ((type: Type, checker: TypeChecker, recursivelyCheckType: (type: Type) => boolean) => boolean) | ((type: Type, checker: TypeChecker) => boolean); +}[]; +export type Options = [ + { + allow?: TypeOrValueSpecifier[]; + } & Partial> +]; +export type MessageId = 'invalidType'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"invalidType", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=restrict-template-expressions.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.d.ts.map new file mode 100644 index 0000000..d42aa7d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"restrict-template-expressions.d.ts","sourceRoot":"","sources":["../../src/rules/restrict-template-expressions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AASpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,EAKL,aAAa,EAEb,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,KAAK,YAAY,GAAG,CAClB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,WAAW,EACpB,oBAAoB,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,KAC1C,OAAO,CAAC;AAOb,QAAA,MAAM,aAAa;;;4IARY,IAAI,KAAK,OAAO,KAaF,OAAO,2CAW7B,OAAO;GAQ3B,CAAC;AAEJ,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,KAAK,CAAC,EAAE,oBAAoB,EAAE,CAAC;KAChC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;CACvE,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,aAAa,CAAC;;AAEtC,wBA2GG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js new file mode 100644 index 0000000..b311745 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js @@ -0,0 +1,119 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const type_utils_1 = require("@typescript-eslint/type-utils"); +const utils_1 = require("@typescript-eslint/utils"); +const typescript_1 = require("typescript"); +const util_1 = require("../util"); +const testTypeFlag = (flagsToCheck) => type => (0, util_1.isTypeFlagSet)(type, flagsToCheck); +const optionTesters = [ + ['Any', util_1.isTypeAnyType], + [ + 'Array', + (type, checker, recursivelyCheckType) => (checker.isArrayType(type) || checker.isTupleType(type)) && + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + recursivelyCheckType(type.getNumberIndexType()), + ], + // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum + ['Boolean', testTypeFlag(typescript_1.TypeFlags.BooleanLike)], + ['Nullish', testTypeFlag(typescript_1.TypeFlags.Null | typescript_1.TypeFlags.Undefined)], + ['Number', testTypeFlag(typescript_1.TypeFlags.NumberLike | typescript_1.TypeFlags.BigIntLike)], + [ + 'RegExp', + (type, checker) => (0, util_1.getTypeName)(checker, type) === 'RegExp', + ], + ['Never', util_1.isTypeNeverType], +].map(([type, tester]) => ({ + type, + option: `allow${type}`, + tester, +})); +exports.default = (0, util_1.createRule)({ + name: 'restrict-template-expressions', + meta: { + type: 'problem', + docs: { + description: 'Enforce template literal expressions to be of `string` type', + recommended: { + recommended: true, + strict: [ + { + allowAny: false, + allowBoolean: false, + allowNever: false, + allowNullish: false, + allowNumber: false, + allowRegExp: false, + }, + ], + }, + requiresTypeChecking: true, + }, + messages: { + invalidType: 'Invalid type "{{type}}" of template literal expression.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + ...Object.fromEntries(optionTesters.map(({ type, option }) => [ + option, + { + type: 'boolean', + description: `Whether to allow \`${type.toLowerCase()}\` typed values in template expressions.`, + }, + ])), + allow: { + description: `Types to allow in template expressions.`, + ...type_utils_1.typeOrValueSpecifiersSchema, + }, + }, + }, + ], + }, + defaultOptions: [ + { + allow: [{ name: ['Error', 'URL', 'URLSearchParams'], from: 'lib' }], + allowAny: true, + allowBoolean: true, + allowNullish: true, + allowNumber: true, + allowRegExp: true, + }, + ], + create(context, [{ allow, ...options }]) { + const services = (0, util_1.getParserServices)(context); + const { program } = services; + const checker = program.getTypeChecker(); + const enabledOptionTesters = optionTesters.filter(({ option }) => options[option]); + return { + TemplateLiteral(node) { + // don't check tagged template literals + if (node.parent.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression) { + return; + } + for (const expression of node.expressions) { + const expressionType = (0, util_1.getConstrainedTypeAtLocation)(services, expression); + if (!recursivelyCheckType(expressionType)) { + context.report({ + node: expression, + messageId: 'invalidType', + data: { type: checker.typeToString(expressionType) }, + }); + } + } + }, + }; + function recursivelyCheckType(innerType) { + if (innerType.isUnion()) { + return innerType.types.every(recursivelyCheckType); + } + if (innerType.isIntersection()) { + return innerType.types.some(recursivelyCheckType); + } + return ((0, util_1.isTypeFlagSet)(innerType, typescript_1.TypeFlags.StringLike) || + (0, type_utils_1.typeMatchesSomeSpecifier)(innerType, allow, program) || + enabledOptionTesters.some(({ tester }) => tester(innerType, checker, recursivelyCheckType))); + } + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.d.ts new file mode 100644 index 0000000..53a7152 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.d.ts @@ -0,0 +1,4 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule<"disallowedPromiseAwait" | "disallowedPromiseAwaitSuggestion" | "nonPromiseAwait" | "requiredPromiseAwait" | "requiredPromiseAwaitSuggestion", [string], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>; +export default _default; +//# sourceMappingURL=return-await.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.d.ts.map new file mode 100644 index 0000000..d22aced --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"return-await.d.ts","sourceRoot":"","sources":["../../src/rules/return-await.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;;AAiCnE,wBAuXG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js new file mode 100644 index 0000000..ea30097 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js @@ -0,0 +1,363 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'return-await', + meta: { + type: 'problem', + docs: { + description: 'Enforce consistent awaiting of returned promises', + recommended: { + strict: ['error-handling-correctness-only'], + }, + requiresTypeChecking: true, + }, + fixable: 'code', + // eslint-disable-next-line eslint-plugin/require-meta-has-suggestions -- suggestions are exposed through a helper. + hasSuggestions: true, + messages: { + disallowedPromiseAwait: 'Returning an awaited promise is not allowed in this context.', + disallowedPromiseAwaitSuggestion: 'Remove `await` before the expression. Use caution as this may impact control flow.', + nonPromiseAwait: 'Returning an awaited value that is not a promise is not allowed.', + requiredPromiseAwait: 'Returning an awaited promise is required in this context.', + requiredPromiseAwaitSuggestion: 'Add `await` before the expression. Use caution as this may impact control flow.', + }, + schema: [ + { + type: 'string', + oneOf: [ + { + type: 'string', + description: 'Requires that all returned promises be awaited.', + enum: ['always'], + }, + { + type: 'string', + description: 'In error-handling contexts, the rule enforces that returned promises must be awaited. In ordinary contexts, the rule does not enforce any particular behavior around whether returned promises are awaited.', + enum: ['error-handling-correctness-only'], + }, + { + type: 'string', + description: 'In error-handling contexts, the rule enforces that returned promises must be awaited. In ordinary contexts, the rule enforces that returned promises _must not_ be awaited.', + enum: ['in-try-catch'], + }, + { + type: 'string', + description: 'Disallows awaiting any returned promises.', + enum: ['never'], + }, + ], + }, + ], + }, + defaultOptions: ['in-try-catch'], + create(context, [option]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const scopeInfoStack = []; + function enterFunction(node) { + scopeInfoStack.push({ + hasAsync: node.async, + owningFunc: node, + }); + } + function exitFunction() { + scopeInfoStack.pop(); + } + function affectsExplicitResourceManagement(node) { + // just need to determine if there is a `using` declaration in scope. + let scope = context.sourceCode.getScope(node); + const functionScope = scope.variableScope; + while (true) { + for (const variable of scope.variables) { + if (variable.defs.length !== 1) { + // This can't be the case for `using` or `await using` since it's + // an error to redeclare those more than once in the same scope, + // unlike, say, `var` declarations. + continue; + } + const declaration = variable.defs[0]; + const declaratorNode = declaration.node; + const declarationNode = declaratorNode.parent; + // if it's a using/await using declaration, and it comes _before_ the + // node we're checking, it affects control flow for that node. + if (['await using', 'using'].includes(declarationNode.kind) && + declaratorNode.range[1] < node.range[0]) { + return true; + } + } + if (scope === functionScope) { + // We've checked all the relevant scopes + break; + } + // This should always exist, since the rule should only be checking + // contexts in which `return` statements are legal, which should always + // be inside a function. + scope = (0, util_1.nullThrows)(scope.upper, 'Expected parent scope to exist. return-await should only operate on return statements within functions'); + } + return false; + } + /** + * Tests whether a node is inside of an explicit error handling context + * (try/catch/finally) in a way that throwing an exception will have an + * impact on the program's control flow. + */ + function affectsExplicitErrorHandling(node) { + // If an error-handling block is followed by another error-handling block, + // control flow is affected by whether promises in it are awaited or not. + // Otherwise, we need to check recursively for nested try statements until + // we get to the top level of a function or the program. If by then, + // there's no offending error-handling blocks, it doesn't affect control + // flow. + const tryAncestorResult = findContainingTryStatement(node); + if (tryAncestorResult == null) { + return false; + } + const { block, tryStatement } = tryAncestorResult; + switch (block) { + case 'catch': + // Exceptions thrown in catch blocks followed by a finally block affect + // control flow. + if (tryStatement.finallyBlock != null) { + return true; + } + // Otherwise recurse. + return affectsExplicitErrorHandling(tryStatement); + case 'finally': + return affectsExplicitErrorHandling(tryStatement); + case 'try': + // Try blocks are always followed by either a catch or finally, + // so exceptions thrown here always affect control flow. + return true; + default: { + const __never = block; + throw new Error(`Unexpected block type: ${String(__never)}`); + } + } + } + /** + * A try _statement_ is the whole thing that encompasses try block, + * catch clause, and finally block. This function finds the nearest + * enclosing try statement (if present) for a given node, and reports which + * part of the try statement the node is in. + */ + function findContainingTryStatement(node) { + let child = node; + let ancestor = node.parent; + while (ancestor && !ts.isFunctionLike(ancestor)) { + if (ts.isTryStatement(ancestor)) { + let block; + if (child === ancestor.tryBlock) { + block = 'try'; + } + else if (child === ancestor.catchClause) { + block = 'catch'; + } + else if (child === ancestor.finallyBlock) { + block = 'finally'; + } + return { + block: (0, util_1.nullThrows)(block, 'Child of a try statement must be a try block, catch clause, or finally block'), + tryStatement: ancestor, + }; + } + child = ancestor; + ancestor = ancestor.parent; + } + return undefined; + } + function removeAwait(fixer, node) { + // Should always be an await node; but let's be safe. + /* istanbul ignore if */ if (!(0, util_1.isAwaitExpression)(node)) { + return null; + } + const awaitToken = context.sourceCode.getFirstToken(node, util_1.isAwaitKeyword); + // Should always be the case; but let's be safe. + /* istanbul ignore if */ if (!awaitToken) { + return null; + } + const startAt = awaitToken.range[0]; + let endAt = awaitToken.range[1]; + // Also remove any extraneous whitespace after `await`, if there is any. + const nextToken = context.sourceCode.getTokenAfter(awaitToken, { + includeComments: true, + }); + if (nextToken) { + endAt = nextToken.range[0]; + } + return fixer.removeRange([startAt, endAt]); + } + function insertAwait(fixer, node, isHighPrecendence) { + if (isHighPrecendence) { + return fixer.insertTextBefore(node, 'await '); + } + return [ + fixer.insertTextBefore(node, 'await ('), + fixer.insertTextAfter(node, ')'), + ]; + } + function test(node, expression) { + let child; + const isAwait = ts.isAwaitExpression(expression); + if (isAwait) { + child = expression.getChildAt(1); + } + else { + child = expression; + } + const type = checker.getTypeAtLocation(child); + const certainty = (0, util_1.needsToBeAwaited)(checker, expression, type); + // handle awaited _non_thenables + if (certainty !== util_1.Awaitable.Always) { + if (isAwait) { + if (certainty === util_1.Awaitable.May) { + return; + } + context.report({ + node, + messageId: 'nonPromiseAwait', + fix: fixer => removeAwait(fixer, node), + }); + } + return; + } + // At this point it's definitely a thenable. + const affectsErrorHandling = affectsExplicitErrorHandling(expression) || + affectsExplicitResourceManagement(node); + const useAutoFix = !affectsErrorHandling; + const ruleConfiguration = getConfiguration(option); + const shouldAwaitInCurrentContext = affectsErrorHandling + ? ruleConfiguration.errorHandlingContext + : ruleConfiguration.ordinaryContext; + switch (shouldAwaitInCurrentContext) { + case 'await': + if (!isAwait) { + context.report({ + node, + messageId: 'requiredPromiseAwait', + ...(0, util_1.getFixOrSuggest)({ + fixOrSuggest: useAutoFix ? 'fix' : 'suggest', + suggestion: { + messageId: 'requiredPromiseAwaitSuggestion', + fix: fixer => insertAwait(fixer, node, (0, util_1.isHigherPrecedenceThanAwait)(expression)), + }, + }), + }); + } + break; + case "don't-care": + break; + case 'no-await': + if (isAwait) { + context.report({ + node, + messageId: 'disallowedPromiseAwait', + ...(0, util_1.getFixOrSuggest)({ + fixOrSuggest: useAutoFix ? 'fix' : 'suggest', + suggestion: { + messageId: 'disallowedPromiseAwaitSuggestion', + fix: fixer => removeAwait(fixer, node), + }, + }), + }); + } + break; + } + } + function findPossiblyReturnedNodes(node) { + if (node.type === utils_1.AST_NODE_TYPES.ConditionalExpression) { + return [ + ...findPossiblyReturnedNodes(node.alternate), + ...findPossiblyReturnedNodes(node.consequent), + ]; + } + return [node]; + } + return { + ArrowFunctionExpression: enterFunction, + 'ArrowFunctionExpression:exit': exitFunction, + FunctionDeclaration: enterFunction, + 'FunctionDeclaration:exit': exitFunction, + FunctionExpression: enterFunction, + 'FunctionExpression:exit': exitFunction, + // executes after less specific handler, so exitFunction is called + 'ArrowFunctionExpression[async = true]:exit'(node) { + if (node.body.type !== utils_1.AST_NODE_TYPES.BlockStatement) { + findPossiblyReturnedNodes(node.body).forEach(node => { + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + test(node, tsNode); + }); + } + }, + ReturnStatement(node) { + const scopeInfo = scopeInfoStack.at(-1); + if (!scopeInfo?.hasAsync || !node.argument) { + return; + } + findPossiblyReturnedNodes(node.argument).forEach(node => { + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + test(node, tsNode); + }); + }, + }; + }, +}); +function getConfiguration(option) { + switch (option) { + case 'always': + return { + errorHandlingContext: 'await', + ordinaryContext: 'await', + }; + case 'error-handling-correctness-only': + return { + errorHandlingContext: 'await', + ordinaryContext: "don't-care", + }; + case 'in-try-catch': + return { + errorHandlingContext: 'await', + ordinaryContext: 'no-await', + }; + case 'never': + return { + errorHandlingContext: 'no-await', + ordinaryContext: 'no-await', + }; + } +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.d.ts new file mode 100644 index 0000000..fcbe808 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.d.ts @@ -0,0 +1,13 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type Options = [ + { + caseSensitive?: boolean; + checkIntersections?: boolean; + checkUnions?: boolean; + groupOrder?: string[]; + } +]; +export type MessageIds = 'notSorted' | 'notSortedNamed' | 'suggestFix'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=sort-type-constituents.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.d.ts.map new file mode 100644 index 0000000..8075cd8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sort-type-constituents.d.ts","sourceRoot":"","sources":["../../src/rules/sort-type-constituents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AA6GnE,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;KACvB;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,gBAAgB,GAAG,YAAY,CAAC;;AAEvE,wBA0MG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js new file mode 100644 index 0000000..79042ae --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js @@ -0,0 +1,272 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +var Group; +(function (Group) { + Group["conditional"] = "conditional"; + Group["function"] = "function"; + Group["import"] = "import"; + Group["intersection"] = "intersection"; + Group["keyword"] = "keyword"; + Group["nullish"] = "nullish"; + Group["literal"] = "literal"; + Group["named"] = "named"; + Group["object"] = "object"; + Group["operator"] = "operator"; + Group["tuple"] = "tuple"; + Group["union"] = "union"; +})(Group || (Group = {})); +function getGroup(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.TSConditionalType: + return Group.conditional; + case utils_1.AST_NODE_TYPES.TSConstructorType: + case utils_1.AST_NODE_TYPES.TSFunctionType: + return Group.function; + case utils_1.AST_NODE_TYPES.TSImportType: + return Group.import; + case utils_1.AST_NODE_TYPES.TSIntersectionType: + return Group.intersection; + case utils_1.AST_NODE_TYPES.TSAnyKeyword: + case utils_1.AST_NODE_TYPES.TSBigIntKeyword: + case utils_1.AST_NODE_TYPES.TSBooleanKeyword: + case utils_1.AST_NODE_TYPES.TSNeverKeyword: + case utils_1.AST_NODE_TYPES.TSNumberKeyword: + case utils_1.AST_NODE_TYPES.TSObjectKeyword: + case utils_1.AST_NODE_TYPES.TSStringKeyword: + case utils_1.AST_NODE_TYPES.TSSymbolKeyword: + case utils_1.AST_NODE_TYPES.TSThisType: + case utils_1.AST_NODE_TYPES.TSUnknownKeyword: + case utils_1.AST_NODE_TYPES.TSIntrinsicKeyword: + return Group.keyword; + case utils_1.AST_NODE_TYPES.TSNullKeyword: + case utils_1.AST_NODE_TYPES.TSUndefinedKeyword: + case utils_1.AST_NODE_TYPES.TSVoidKeyword: + return Group.nullish; + case utils_1.AST_NODE_TYPES.TSLiteralType: + case utils_1.AST_NODE_TYPES.TSTemplateLiteralType: + return Group.literal; + case utils_1.AST_NODE_TYPES.TSArrayType: + case utils_1.AST_NODE_TYPES.TSIndexedAccessType: + case utils_1.AST_NODE_TYPES.TSInferType: + case utils_1.AST_NODE_TYPES.TSTypeReference: + case utils_1.AST_NODE_TYPES.TSQualifiedName: + return Group.named; + case utils_1.AST_NODE_TYPES.TSMappedType: + case utils_1.AST_NODE_TYPES.TSTypeLiteral: + return Group.object; + case utils_1.AST_NODE_TYPES.TSTypeOperator: + case utils_1.AST_NODE_TYPES.TSTypeQuery: + return Group.operator; + case utils_1.AST_NODE_TYPES.TSTupleType: + return Group.tuple; + case utils_1.AST_NODE_TYPES.TSUnionType: + return Group.union; + // These types should never occur as part of a union/intersection + case utils_1.AST_NODE_TYPES.TSAbstractKeyword: + case utils_1.AST_NODE_TYPES.TSAsyncKeyword: + case utils_1.AST_NODE_TYPES.TSDeclareKeyword: + case utils_1.AST_NODE_TYPES.TSExportKeyword: + case utils_1.AST_NODE_TYPES.TSNamedTupleMember: + case utils_1.AST_NODE_TYPES.TSOptionalType: + case utils_1.AST_NODE_TYPES.TSPrivateKeyword: + case utils_1.AST_NODE_TYPES.TSProtectedKeyword: + case utils_1.AST_NODE_TYPES.TSPublicKeyword: + case utils_1.AST_NODE_TYPES.TSReadonlyKeyword: + case utils_1.AST_NODE_TYPES.TSRestType: + case utils_1.AST_NODE_TYPES.TSStaticKeyword: + case utils_1.AST_NODE_TYPES.TSTypePredicate: + /* istanbul ignore next */ + throw new Error(`Unexpected Type ${node.type}`); + } +} +function caseSensitiveSort(a, b) { + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + return 0; +} +exports.default = (0, util_1.createRule)({ + name: 'sort-type-constituents', + meta: { + type: 'suggestion', + deprecated: { + deprecatedSince: '7.13.0', + replacedBy: [ + { + plugin: { + name: 'eslint-plugin-perfectionist', + url: 'https://perfectionist.dev', + }, + rule: { + name: 'perfectionist/sort-intersection-types', + url: 'https://perfectionist.dev/rules/sort-intersection-types', + }, + }, + { + plugin: { + name: 'eslint-plugin-perfectionist', + url: 'https://perfectionist.dev', + }, + rule: { + name: 'perfectionist/sort-union-types', + url: 'https://perfectionist.dev/rules/sort-union-types', + }, + }, + ], + url: 'https://github.com/typescript-eslint/typescript-eslint/pull/9253', + }, + docs: { + description: 'Enforce constituents of a type union/intersection to be sorted alphabetically', + }, + fixable: 'code', + hasSuggestions: true, + messages: { + notSorted: '{{type}} type constituents must be sorted.', + notSortedNamed: '{{type}} type {{name}} constituents must be sorted.', + suggestFix: 'Sort constituents of type (removes all comments).', + }, + replacedBy: [ + 'perfectionist/sort-intersection-types', + 'perfectionist/sort-union-types', + ], + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + caseSensitive: { + type: 'boolean', + description: 'Whether to sort using case sensitive string comparisons.', + }, + checkIntersections: { + type: 'boolean', + description: 'Whether to check intersection types (`&`).', + }, + checkUnions: { + type: 'boolean', + description: 'Whether to check union types (`|`).', + }, + groupOrder: { + type: 'array', + description: 'Ordering of the groups.', + items: { + type: 'string', + enum: (0, util_1.getEnumNames)(Group), + }, + }, + }, + }, + ], + }, + defaultOptions: [ + { + caseSensitive: false, + checkIntersections: true, + checkUnions: true, + groupOrder: [ + Group.named, + Group.keyword, + Group.operator, + Group.literal, + Group.function, + Group.import, + Group.conditional, + Group.object, + Group.tuple, + Group.intersection, + Group.union, + Group.nullish, + ], + }, + ], + create(context, [{ caseSensitive, checkIntersections, checkUnions, groupOrder }]) { + const collator = new Intl.Collator('en', { + numeric: true, + sensitivity: 'base', + }); + function checkSorting(node) { + const sourceOrder = node.types.map(type => { + const group = groupOrder?.indexOf(getGroup(type)) ?? -1; + return { + node: type, + group: group === -1 ? Number.MAX_SAFE_INTEGER : group, + text: context.sourceCode.getText(type), + }; + }); + const expectedOrder = [...sourceOrder].sort((a, b) => { + if (a.group !== b.group) { + return a.group - b.group; + } + if (caseSensitive) { + return caseSensitiveSort(a.text, b.text); + } + return (collator.compare(a.text, b.text) || + (a.text < b.text ? -1 : a.text > b.text ? 1 : 0)); + }); + const hasComments = node.types.some(type => { + const count = context.sourceCode.getCommentsBefore(type).length + + context.sourceCode.getCommentsAfter(type).length; + return count > 0; + }); + for (let i = 0; i < expectedOrder.length; i += 1) { + if (expectedOrder[i].node !== sourceOrder[i].node) { + let messageId = 'notSorted'; + const data = { + name: '', + type: node.type === utils_1.AST_NODE_TYPES.TSIntersectionType + ? 'Intersection' + : 'Union', + }; + if (node.parent.type === utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration) { + messageId = 'notSortedNamed'; + data.name = node.parent.id.name; + } + const fix = fixer => { + const sorted = expectedOrder + .map(t => (0, util_1.typeNodeRequiresParentheses)(t.node, t.text) || + (node.type === utils_1.AST_NODE_TYPES.TSIntersectionType && + t.node.type === utils_1.AST_NODE_TYPES.TSUnionType) + ? `(${t.text})` + : t.text) + .join(node.type === utils_1.AST_NODE_TYPES.TSIntersectionType ? ' & ' : ' | '); + return fixer.replaceText(node, sorted); + }; + return context.report({ + node, + messageId, + data, + // don't autofix if any of the types have leading/trailing comments + // the logic for preserving them correctly is a pain - we may implement this later + ...(hasComments + ? { + suggest: [ + { + messageId: 'suggestFix', + fix, + }, + ], + } + : { fix }), + }); + } + } + } + return { + ...(checkIntersections && { + TSIntersectionType(node) { + checkSorting(node); + }, + }), + ...(checkUnions && { + TSUnionType(node) { + checkSorting(node); + }, + }), + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.d.ts new file mode 100644 index 0000000..517df0c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.d.ts @@ -0,0 +1,18 @@ +export type Options = [ + { + allowAny?: boolean; + allowNullableBoolean?: boolean; + allowNullableEnum?: boolean; + allowNullableNumber?: boolean; + allowNullableObject?: boolean; + allowNullableString?: boolean; + allowNumber?: boolean; + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean; + allowString?: boolean; + } +]; +type ConditionErrorMessageId = 'conditionErrorAny' | 'conditionErrorNullableBoolean' | 'conditionErrorNullableEnum' | 'conditionErrorNullableNumber' | 'conditionErrorNullableObject' | 'conditionErrorNullableString' | 'conditionErrorNullish' | 'conditionErrorNumber' | 'conditionErrorObject' | 'conditionErrorOther' | 'conditionErrorString'; +export type MessageId = 'conditionFixCastBoolean' | 'conditionFixCompareArrayLengthNonzero' | 'conditionFixCompareArrayLengthZero' | 'conditionFixCompareEmptyString' | 'conditionFixCompareFalse' | 'conditionFixCompareNaN' | 'conditionFixCompareNullish' | 'conditionFixCompareStringLength' | 'conditionFixCompareTrue' | 'conditionFixCompareZero' | 'conditionFixDefaultEmptyString' | 'conditionFixDefaultFalse' | 'conditionFixDefaultZero' | 'explicitBooleanReturnType' | 'noStrictNullCheck' | 'predicateCannotBeAsync' | ConditionErrorMessageId; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=strict-boolean-expressions.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.d.ts.map new file mode 100644 index 0000000..6835372 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strict-boolean-expressions.d.ts","sourceRoot":"","sources":["../../src/rules/strict-boolean-expressions.ts"],"names":[],"mappings":"AAsBA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,sDAAsD,CAAC,EAAE,OAAO,CAAC;QACjE,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB;CACF,CAAC;AAEF,KAAK,uBAAuB,GACxB,mBAAmB,GACnB,+BAA+B,GAC/B,4BAA4B,GAC5B,8BAA8B,GAC9B,8BAA8B,GAC9B,8BAA8B,GAC9B,uBAAuB,GACvB,sBAAsB,GACtB,sBAAsB,GACtB,qBAAqB,GACrB,sBAAsB,CAAC;AAE3B,MAAM,MAAM,SAAS,GACjB,yBAAyB,GACzB,uCAAuC,GACvC,oCAAoC,GACpC,gCAAgC,GAChC,0BAA0B,GAC1B,wBAAwB,GACxB,4BAA4B,GAC5B,iCAAiC,GACjC,yBAAyB,GACzB,yBAAyB,GACzB,gCAAgC,GAChC,0BAA0B,GAC1B,yBAAyB,GACzB,2BAA2B,GAC3B,mBAAmB,GACnB,wBAAwB,GACxB,uBAAuB,CAAC;;AAE5B,wBAq/BG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js new file mode 100644 index 0000000..78c90bf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js @@ -0,0 +1,882 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const assertionFunctionUtils_1 = require("../util/assertionFunctionUtils"); +exports.default = (0, util_1.createRule)({ + name: 'strict-boolean-expressions', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow certain types in boolean expressions', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + conditionErrorAny: 'Unexpected any value in {{context}}. ' + + 'An explicit comparison or type conversion is required.', + conditionErrorNullableBoolean: 'Unexpected nullable boolean value in {{context}}. ' + + 'Please handle the nullish case explicitly.', + conditionErrorNullableEnum: 'Unexpected nullable enum value in {{context}}. ' + + 'Please handle the nullish/zero/NaN cases explicitly.', + conditionErrorNullableNumber: 'Unexpected nullable number value in {{context}}. ' + + 'Please handle the nullish/zero/NaN cases explicitly.', + conditionErrorNullableObject: 'Unexpected nullable object value in {{context}}. ' + + 'An explicit null check is required.', + conditionErrorNullableString: 'Unexpected nullable string value in {{context}}. ' + + 'Please handle the nullish/empty cases explicitly.', + conditionErrorNullish: 'Unexpected nullish value in conditional. ' + + 'The condition is always false.', + conditionErrorNumber: 'Unexpected number value in {{context}}. ' + + 'An explicit zero/NaN check is required.', + conditionErrorObject: 'Unexpected object value in {{context}}. ' + + 'The condition is always true.', + conditionErrorOther: 'Unexpected value in conditional. ' + + 'A boolean expression is required.', + conditionErrorString: 'Unexpected string value in {{context}}. ' + + 'An explicit empty string check is required.', + conditionFixCastBoolean: 'Explicitly convert value to a boolean (`Boolean(value)`)', + conditionFixCompareArrayLengthNonzero: "Change condition to check array's length (`value.length > 0`)", + conditionFixCompareArrayLengthZero: "Change condition to check array's length (`value.length === 0`)", + conditionFixCompareEmptyString: 'Change condition to check for empty string (`value !== ""`)', + conditionFixCompareFalse: 'Change condition to check if false (`value === false`)', + conditionFixCompareNaN: 'Change condition to check for NaN (`!Number.isNaN(value)`)', + conditionFixCompareNullish: 'Change condition to check for null/undefined (`value != null`)', + conditionFixCompareStringLength: "Change condition to check string's length (`value.length !== 0`)", + conditionFixCompareTrue: 'Change condition to check if true (`value === true`)', + conditionFixCompareZero: 'Change condition to check for 0 (`value !== 0`)', + conditionFixDefaultEmptyString: 'Explicitly treat nullish value the same as an empty string (`value ?? ""`)', + conditionFixDefaultFalse: 'Explicitly treat nullish value the same as false (`value ?? false`)', + conditionFixDefaultZero: 'Explicitly treat nullish value the same as 0 (`value ?? 0`)', + explicitBooleanReturnType: 'Add an explicit `boolean` return type annotation.', + noStrictNullCheck: 'This rule requires the `strictNullChecks` compiler option to be turned on to function correctly.', + predicateCannotBeAsync: "Predicate function should not be 'async'; expected a boolean return type.", + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowAny: { + type: 'boolean', + description: 'Whether to allow `any`s in a boolean context.', + }, + allowNullableBoolean: { + type: 'boolean', + description: 'Whether to allow nullable `boolean`s in a boolean context.', + }, + allowNullableEnum: { + type: 'boolean', + description: 'Whether to allow nullable `enum`s in a boolean context.', + }, + allowNullableNumber: { + type: 'boolean', + description: 'Whether to allow nullable `number`s in a boolean context.', + }, + allowNullableObject: { + type: 'boolean', + description: 'Whether to allow nullable `object`s, `symbol`s, and functions in a boolean context.', + }, + allowNullableString: { + type: 'boolean', + description: 'Whether to allow nullable `string`s in a boolean context.', + }, + allowNumber: { + type: 'boolean', + description: 'Whether to allow `number`s in a boolean context.', + }, + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: { + type: 'boolean', + description: 'Unless this is set to `true`, the rule will error on every file whose `tsconfig.json` does _not_ have the `strictNullChecks` compiler option (or `strict`) set to `true`.', + }, + allowString: { + type: 'boolean', + description: 'Whether to allow `string`s in a boolean context.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowAny: false, + allowNullableBoolean: false, + allowNullableEnum: false, + allowNullableNumber: false, + allowNullableObject: true, + allowNullableString: false, + allowNumber: true, + allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false, + allowString: true, + }, + ], + create(context, [options]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const compilerOptions = services.program.getCompilerOptions(); + const isStrictNullChecks = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'strictNullChecks'); + if (!isStrictNullChecks && + options.allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing !== true) { + context.report({ + loc: { + start: { column: 0, line: 0 }, + end: { column: 0, line: 0 }, + }, + messageId: 'noStrictNullCheck', + }); + } + const traversedNodes = new Set(); + return { + CallExpression: traverseCallExpression, + ConditionalExpression: traverseTestExpression, + DoWhileStatement: traverseTestExpression, + ForStatement: traverseTestExpression, + IfStatement: traverseTestExpression, + 'LogicalExpression[operator!="??"]': traverseLogicalExpression, + 'UnaryExpression[operator="!"]': traverseUnaryLogicalExpression, + WhileStatement: traverseTestExpression, + }; + /** + * Inspects condition of a test expression. (`if`, `while`, `for`, etc.) + */ + function traverseTestExpression(node) { + if (node.test == null) { + return; + } + traverseNode(node.test, true); + } + /** + * Inspects the argument of a unary logical expression (`!`). + */ + function traverseUnaryLogicalExpression(node) { + traverseNode(node.argument, true); + } + /** + * Inspects the arguments of a logical expression (`&&`, `||`). + * + * If the logical expression is a descendant of a test expression, + * the `isCondition` flag should be set to true. + * Otherwise, if the logical expression is there on it's own, + * it's used for control flow and is not a condition itself. + */ + function traverseLogicalExpression(node, isCondition = false) { + // left argument is always treated as a condition + traverseNode(node.left, true); + // if the logical expression is used for control flow, + // then its right argument is used for its side effects only + traverseNode(node.right, isCondition); + } + function traverseCallExpression(node) { + const assertedArgument = (0, assertionFunctionUtils_1.findTruthinessAssertedArgument)(services, node); + if (assertedArgument != null) { + traverseNode(assertedArgument, true); + } + if ((0, util_1.isArrayMethodCallWithPredicate)(context, services, node)) { + const predicate = node.arguments.at(0); + if (predicate) { + checkArrayMethodCallPredicate(predicate); + } + } + } + /** + * Dedicated function to check array method predicate calls. Reports predicate + * arguments that don't return a boolean value. + */ + function checkArrayMethodCallPredicate(predicateNode) { + const isFunctionExpression = utils_1.ASTUtils.isFunction(predicateNode); + // custom message for accidental `async` function expressions + if (isFunctionExpression && predicateNode.async) { + return context.report({ + node: predicateNode, + messageId: 'predicateCannotBeAsync', + }); + } + const returnTypes = services + .getTypeAtLocation(predicateNode) + .getCallSignatures() + .map(signature => { + const type = signature.getReturnType(); + if (tsutils.isTypeParameter(type)) { + return checker.getBaseConstraintOfType(type) ?? type; + } + return type; + }); + const flattenTypes = [ + ...new Set(returnTypes.flatMap(type => tsutils.unionConstituents(type))), + ]; + const types = inspectVariantTypes(flattenTypes); + const reportType = determineReportType(types); + if (reportType == null) { + return; + } + const suggestions = []; + if (isFunctionExpression && + predicateNode.body.type !== utils_1.AST_NODE_TYPES.BlockStatement) { + suggestions.push(...getSuggestionsForConditionError(predicateNode.body, reportType)); + } + if (isFunctionExpression && !predicateNode.returnType) { + suggestions.push({ + messageId: 'explicitBooleanReturnType', + fix: fixer => { + if (predicateNode.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression && + (0, util_1.isParenlessArrowFunction)(predicateNode, context.sourceCode)) { + return [ + fixer.insertTextBefore(predicateNode.params[0], '('), + fixer.insertTextAfter(predicateNode.params[0], '): boolean'), + ]; + } + if (predicateNode.params.length === 0) { + const closingBracket = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(predicateNode, token => token.value === ')'), 'function expression has to have a closing parenthesis.'); + return fixer.insertTextAfter(closingBracket, ': boolean'); + } + const lastClosingParenthesis = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(predicateNode.params[predicateNode.params.length - 1], token => token.value === ')'), 'function expression has to have a closing parenthesis.'); + return fixer.insertTextAfter(lastClosingParenthesis, ': boolean'); + }, + }); + } + return context.report({ + node: predicateNode, + messageId: reportType, + data: { + context: 'array predicate return type', + }, + suggest: suggestions, + }); + } + /** + * Inspects any node. + * + * If it's a logical expression then it recursively traverses its arguments. + * If it's any other kind of node then it's type is finally checked against the rule, + * unless `isCondition` flag is set to false, in which case + * it's assumed to be used for side effects only and is skipped. + */ + function traverseNode(node, isCondition) { + // prevent checking the same node multiple times + if (traversedNodes.has(node)) { + return; + } + traversedNodes.add(node); + // for logical operator, we check its operands + if (node.type === utils_1.AST_NODE_TYPES.LogicalExpression && + node.operator !== '??') { + traverseLogicalExpression(node, isCondition); + return; + } + // skip if node is not a condition + if (!isCondition) { + return; + } + checkNode(node); + } + function determineReportType(types) { + const is = (...wantedTypes) => types.size === wantedTypes.length && + wantedTypes.every(type => types.has(type)); + // boolean + if (is('boolean') || is('truthy boolean')) { + // boolean is always ok + return undefined; + } + // never + if (is('never')) { + // never is always okay + return undefined; + } + // nullish + if (is('nullish')) { + // condition is always false + return 'conditionErrorNullish'; + } + // Known edge case: boolean `true` and nullish values are always valid boolean expressions + if (is('nullish', 'truthy boolean')) { + return; + } + // nullable boolean + if (is('nullish', 'boolean')) { + return !options.allowNullableBoolean + ? 'conditionErrorNullableBoolean' + : undefined; + } + // Known edge case: truthy primitives and nullish values are always valid boolean expressions + if ((options.allowNumber && is('nullish', 'truthy number')) || + (options.allowString && is('nullish', 'truthy string'))) { + return; + } + // string + if (is('string') || is('truthy string')) { + return !options.allowString ? 'conditionErrorString' : undefined; + } + // nullable string + if (is('nullish', 'string')) { + return !options.allowNullableString + ? 'conditionErrorNullableString' + : undefined; + } + // number + if (is('number') || is('truthy number')) { + return !options.allowNumber ? 'conditionErrorNumber' : undefined; + } + // nullable number + if (is('nullish', 'number')) { + return !options.allowNullableNumber + ? 'conditionErrorNullableNumber' + : undefined; + } + // object + if (is('object')) { + return 'conditionErrorObject'; + } + // nullable object + if (is('nullish', 'object')) { + return !options.allowNullableObject + ? 'conditionErrorNullableObject' + : undefined; + } + // nullable enum + if (is('nullish', 'number', 'enum') || + is('nullish', 'string', 'enum') || + is('nullish', 'truthy number', 'enum') || + is('nullish', 'truthy string', 'enum') || + // mixed enums + is('nullish', 'truthy number', 'truthy string', 'enum') || + is('nullish', 'truthy number', 'string', 'enum') || + is('nullish', 'truthy string', 'number', 'enum') || + is('nullish', 'number', 'string', 'enum')) { + return !options.allowNullableEnum + ? 'conditionErrorNullableEnum' + : undefined; + } + // any + if (is('any')) { + return !options.allowAny ? 'conditionErrorAny' : undefined; + } + return 'conditionErrorOther'; + } + function getSuggestionsForConditionError(node, conditionError) { + switch (conditionError) { + case 'conditionErrorAny': + return [ + { + messageId: 'conditionFixCastBoolean', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `Boolean(${code})`, + }), + }, + ]; + case 'conditionErrorNullableBoolean': + if (isLogicalNegationExpression(node.parent)) { + // if (!nullableBoolean) + return [ + { + messageId: 'conditionFixDefaultFalse', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} ?? false`, + }), + }, + { + messageId: 'conditionFixCompareFalse', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + wrap: code => `${code} === false`, + }), + }, + ]; + } + // if (nullableBoolean) + return [ + { + messageId: 'conditionFixDefaultFalse', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} ?? false`, + }), + }, + { + messageId: 'conditionFixCompareTrue', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} === true`, + }), + }, + ]; + case 'conditionErrorNullableEnum': + if (isLogicalNegationExpression(node.parent)) { + return [ + { + messageId: 'conditionFixCompareNullish', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + wrap: code => `${code} == null`, + }), + }, + ]; + } + return [ + { + messageId: 'conditionFixCompareNullish', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} != null`, + }), + }, + ]; + case 'conditionErrorNullableNumber': + if (isLogicalNegationExpression(node.parent)) { + // if (!nullableNumber) + return [ + { + messageId: 'conditionFixCompareNullish', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + wrap: code => `${code} == null`, + }), + }, + { + messageId: 'conditionFixDefaultZero', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} ?? 0`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + wrap: code => `!Boolean(${code})`, + }), + }, + ]; + } + // if (nullableNumber) + return [ + { + messageId: 'conditionFixCompareNullish', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} != null`, + }), + }, + { + messageId: 'conditionFixDefaultZero', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} ?? 0`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `Boolean(${code})`, + }), + }, + ]; + case 'conditionErrorNullableObject': + if (isLogicalNegationExpression(node.parent)) { + // if (!nullableObject) + return [ + { + messageId: 'conditionFixCompareNullish', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + wrap: code => `${code} == null`, + }), + }, + ]; + } + // if (nullableObject) + return [ + { + messageId: 'conditionFixCompareNullish', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} != null`, + }), + }, + ]; + case 'conditionErrorNullableString': + if (isLogicalNegationExpression(node.parent)) { + // if (!nullableString) + return [ + { + messageId: 'conditionFixCompareNullish', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + wrap: code => `${code} == null`, + }), + }, + { + messageId: 'conditionFixDefaultEmptyString', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} ?? ""`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + wrap: code => `!Boolean(${code})`, + }), + }, + ]; + } + // if (nullableString) + return [ + { + messageId: 'conditionFixCompareNullish', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} != null`, + }), + }, + { + messageId: 'conditionFixDefaultEmptyString', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} ?? ""`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `Boolean(${code})`, + }), + }, + ]; + case 'conditionErrorNumber': + if (isArrayLengthExpression(node, checker, services)) { + if (isLogicalNegationExpression(node.parent)) { + // if (!array.length) + return [ + { + messageId: 'conditionFixCompareArrayLengthZero', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + wrap: code => `${code} === 0`, + }), + }, + ]; + } + // if (array.length) + return [ + { + messageId: 'conditionFixCompareArrayLengthNonzero', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} > 0`, + }), + }, + ]; + } + if (isLogicalNegationExpression(node.parent)) { + // if (!number) + return [ + { + messageId: 'conditionFixCompareZero', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + // TODO: we have to compare to 0n if the type is bigint + wrap: code => `${code} === 0`, + }), + }, + { + // TODO: don't suggest this for bigint because it can't be NaN + messageId: 'conditionFixCompareNaN', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + wrap: code => `Number.isNaN(${code})`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + wrap: code => `!Boolean(${code})`, + }), + }, + ]; + } + // if (number) + return [ + { + messageId: 'conditionFixCompareZero', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} !== 0`, + }), + }, + { + messageId: 'conditionFixCompareNaN', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `!Number.isNaN(${code})`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `Boolean(${code})`, + }), + }, + ]; + case 'conditionErrorString': + if (isLogicalNegationExpression(node.parent)) { + // if (!string) + return [ + { + messageId: 'conditionFixCompareStringLength', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + wrap: code => `${code}.length === 0`, + }), + }, + { + messageId: 'conditionFixCompareEmptyString', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + wrap: code => `${code} === ""`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: (0, util_1.getWrappingFixer)({ + node: node.parent, + innerNode: node, + sourceCode: context.sourceCode, + wrap: code => `!Boolean(${code})`, + }), + }, + ]; + } + // if (string) + return [ + { + messageId: 'conditionFixCompareStringLength', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code}.length > 0`, + }), + }, + { + messageId: 'conditionFixCompareEmptyString', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `${code} !== ""`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: (0, util_1.getWrappingFixer)({ + node, + sourceCode: context.sourceCode, + wrap: code => `Boolean(${code})`, + }), + }, + ]; + case 'conditionErrorObject': + case 'conditionErrorNullish': + case 'conditionErrorOther': + return []; + default: + conditionError; + throw new Error('Unreachable'); + } + } + /** + * This function does the actual type check on a node. + * It analyzes the type of a node and checks if it is allowed in a boolean context. + */ + function checkNode(node) { + const type = (0, util_1.getConstrainedTypeAtLocation)(services, node); + const types = inspectVariantTypes(tsutils.unionConstituents(type)); + const reportType = determineReportType(types); + if (reportType != null) { + context.report({ + node, + messageId: reportType, + data: { + context: 'conditional', + }, + suggest: getSuggestionsForConditionError(node, reportType), + }); + } + } + /** + * Check union variants for the types we care about + */ + function inspectVariantTypes(types) { + const variantTypes = new Set(); + if (types.some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.Null | ts.TypeFlags.Undefined | ts.TypeFlags.VoidLike))) { + variantTypes.add('nullish'); + } + const booleans = types.filter(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.BooleanLike)); + // If incoming type is either "true" or "false", there will be one type + // object with intrinsicName set accordingly + // If incoming type is boolean, there will be two type objects with + // intrinsicName set "true" and "false" each because of ts-api-utils.unionConstituents() + if (booleans.length === 1) { + variantTypes.add(tsutils.isTrueLiteralType(booleans[0]) ? 'truthy boolean' : 'boolean'); + } + else if (booleans.length === 2) { + variantTypes.add('boolean'); + } + const strings = types.filter(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.StringLike)); + if (strings.length) { + if (strings.every(type => type.isStringLiteral() && type.value !== '')) { + variantTypes.add('truthy string'); + } + else { + variantTypes.add('string'); + } + } + const numbers = types.filter(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.NumberLike | ts.TypeFlags.BigIntLike)); + if (numbers.length) { + if (numbers.every(type => type.isNumberLiteral() && type.value !== 0)) { + variantTypes.add('truthy number'); + } + else { + variantTypes.add('number'); + } + } + if (types.some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.EnumLike))) { + variantTypes.add('enum'); + } + if (types.some(type => !tsutils.isTypeFlagSet(type, ts.TypeFlags.Null | + ts.TypeFlags.Undefined | + ts.TypeFlags.VoidLike | + ts.TypeFlags.BooleanLike | + ts.TypeFlags.StringLike | + ts.TypeFlags.NumberLike | + ts.TypeFlags.BigIntLike | + ts.TypeFlags.TypeParameter | + ts.TypeFlags.Any | + ts.TypeFlags.Unknown | + ts.TypeFlags.Never))) { + variantTypes.add(types.some(isBrandedBoolean) ? 'boolean' : 'object'); + } + if (types.some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.TypeParameter | + ts.TypeFlags.Any | + ts.TypeFlags.Unknown))) { + variantTypes.add('any'); + } + if (types.some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.Never))) { + variantTypes.add('never'); + } + return variantTypes; + } + }, +}); +function isLogicalNegationExpression(node) { + return node.type === utils_1.AST_NODE_TYPES.UnaryExpression && node.operator === '!'; +} +function isArrayLengthExpression(node, typeChecker, services) { + if (node.type !== utils_1.AST_NODE_TYPES.MemberExpression) { + return false; + } + if (node.computed) { + return false; + } + if (node.property.name !== 'length') { + return false; + } + const objectType = (0, util_1.getConstrainedTypeAtLocation)(services, node.object); + return (0, util_1.isTypeArrayTypeOrUnionOfArrayTypes)(objectType, typeChecker); +} +/** + * Verify is the type is a branded boolean (e.g. `type Foo = boolean & { __brand: 'Foo' }`) + * + * @param type The type checked + */ +function isBrandedBoolean(type) { + return (type.isIntersection() && + type.types.some(childType => isBooleanType(childType))); +} +function isBooleanType(expressionType) { + return tsutils.isTypeFlagSet(expressionType, ts.TypeFlags.Boolean | ts.TypeFlags.BooleanLiteral); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.d.ts new file mode 100644 index 0000000..2a0ce24 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.d.ts @@ -0,0 +1,32 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type Options = [ + { + /** + * If `true`, allow `default` cases on switch statements with exhaustive + * cases. + * + * @default true + */ + allowDefaultCaseForExhaustiveSwitch?: boolean; + /** + * If `true`, require a `default` clause for switches on non-union types. + * + * @default false + */ + requireDefaultForNonUnion?: boolean; + /** + * Regular expression for a comment that can indicate an intentionally omitted default case. + */ + defaultCaseCommentPattern?: string; + /** + * If `true`, the `default` clause is used to determine whether the switch statement is exhaustive for union types. + * + * @default false + */ + considerDefaultExhaustiveForUnions?: boolean; + } +]; +export type MessageIds = 'addMissingCases' | 'dangerousDefaultCase' | 'switchIsNotExhaustive'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=switch-exhaustiveness-check.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.d.ts.map new file mode 100644 index 0000000..512e4be --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"switch-exhaustiveness-check.d.ts","sourceRoot":"","sources":["../../src/rules/switch-exhaustiveness-check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAyBnE,MAAM,MAAM,OAAO,GAAG;IACpB;QACE;;;;;WAKG;QACH,mCAAmC,CAAC,EAAE,OAAO,CAAC;QAE9C;;;;WAIG;QACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;QAEpC;;WAEG;QACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;QAEnC;;;;WAIG;QACH,kCAAkC,CAAC,EAAE,OAAO,CAAC;KAC9C;CACF,CAAC;AAEF,MAAM,MAAM,UAAU,GAClB,iBAAiB,GACjB,sBAAsB,GACtB,uBAAuB,CAAC;;AAE5B,wBA+VG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js new file mode 100644 index 0000000..5acb743 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js @@ -0,0 +1,291 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +const DEFAULT_COMMENT_PATTERN = /^no default$/iu; +exports.default = (0, util_1.createRule)({ + name: 'switch-exhaustiveness-check', + meta: { + type: 'suggestion', + docs: { + description: 'Require switch-case statements to be exhaustive', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + addMissingCases: 'Add branches for missing cases.', + dangerousDefaultCase: 'The switch statement is exhaustive, so the default case is unnecessary.', + switchIsNotExhaustive: 'Switch is not exhaustive. Cases not matched: {{missingBranches}}', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowDefaultCaseForExhaustiveSwitch: { + type: 'boolean', + description: `If 'true', allow 'default' cases on switch statements with exhaustive cases.`, + }, + considerDefaultExhaustiveForUnions: { + type: 'boolean', + description: `If 'true', the 'default' clause is used to determine whether the switch statement is exhaustive for union type`, + }, + defaultCaseCommentPattern: { + type: 'string', + description: `Regular expression for a comment that can indicate an intentionally omitted default case.`, + }, + requireDefaultForNonUnion: { + type: 'boolean', + description: `If 'true', require a 'default' clause for switches on non-union types.`, + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowDefaultCaseForExhaustiveSwitch: true, + considerDefaultExhaustiveForUnions: false, + requireDefaultForNonUnion: false, + }, + ], + create(context, [{ allowDefaultCaseForExhaustiveSwitch, considerDefaultExhaustiveForUnions, defaultCaseCommentPattern, requireDefaultForNonUnion, },]) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + const compilerOptions = services.program.getCompilerOptions(); + const commentRegExp = defaultCaseCommentPattern != null + ? new RegExp(defaultCaseCommentPattern, 'u') + : DEFAULT_COMMENT_PATTERN; + function getCommentDefaultCase(node) { + const lastCase = node.cases.at(-1); + const commentsAfterLastCase = lastCase + ? context.sourceCode.getCommentsAfter(lastCase) + : []; + const defaultCaseComment = commentsAfterLastCase.at(-1); + if (commentRegExp.test(defaultCaseComment?.value.trim() || '')) { + return defaultCaseComment; + } + return; + } + function typeToString(type) { + return checker.typeToString(type, undefined, ts.TypeFormatFlags.AllowUniqueESSymbolType | + ts.TypeFormatFlags.UseAliasDefinedOutsideCurrentScope | + ts.TypeFormatFlags.UseFullyQualifiedType); + } + function getSwitchMetadata(node) { + const defaultCase = node.cases.find(switchCase => switchCase.test == null); + const discriminantType = (0, util_1.getConstrainedTypeAtLocation)(services, node.discriminant); + const symbolName = discriminantType.getSymbol()?.escapedName; + const containsNonLiteralType = doesTypeContainNonLiteralType(discriminantType); + const caseTypes = new Set(); + for (const switchCase of node.cases) { + // If the `test` property of the switch case is `null`, then we are on a + // `default` case. + if (switchCase.test == null) { + continue; + } + const caseType = (0, util_1.getConstrainedTypeAtLocation)(services, switchCase.test); + caseTypes.add(caseType); + } + const missingLiteralBranchTypes = []; + for (const unionPart of tsutils.unionConstituents(discriminantType)) { + for (const intersectionPart of tsutils.intersectionConstituents(unionPart)) { + if (caseTypes.has(intersectionPart) || + !isTypeLiteralLikeType(intersectionPart)) { + continue; + } + // "missing", "optional" and "undefined" types are different runtime objects, + // but all of them have TypeFlags.Undefined type flag + if ([...caseTypes].some(tsutils.isIntrinsicUndefinedType) && + tsutils.isIntrinsicUndefinedType(intersectionPart)) { + continue; + } + missingLiteralBranchTypes.push(intersectionPart); + } + } + return { + containsNonLiteralType, + defaultCase: defaultCase ?? getCommentDefaultCase(node), + missingLiteralBranchTypes, + symbolName, + }; + } + function checkSwitchExhaustive(node, switchMetadata) { + const { defaultCase, missingLiteralBranchTypes, symbolName } = switchMetadata; + // If considerDefaultExhaustiveForUnions is enabled, the presence of a default case + // always makes the switch exhaustive. + if (considerDefaultExhaustiveForUnions && defaultCase != null) { + return; + } + if (missingLiteralBranchTypes.length > 0) { + context.report({ + node: node.discriminant, + messageId: 'switchIsNotExhaustive', + data: { + missingBranches: missingLiteralBranchTypes + .map(missingType => tsutils.isTypeFlagSet(missingType, ts.TypeFlags.ESSymbolLike) + ? `typeof ${missingType.getSymbol()?.escapedName}` + : typeToString(missingType)) + .join(' | '), + }, + suggest: [ + { + messageId: 'addMissingCases', + fix(fixer) { + return fixSwitch(fixer, node, missingLiteralBranchTypes, defaultCase, symbolName?.toString()); + }, + }, + ], + }); + } + } + function fixSwitch(fixer, node, missingBranchTypes, // null means default branch + defaultCase, symbolName) { + const lastCase = node.cases.length > 0 ? node.cases[node.cases.length - 1] : null; + const caseIndent = lastCase + ? ' '.repeat(lastCase.loc.start.column) + : // If there are no cases, use indentation of the switch statement and + // leave it to the user to format it correctly. + ' '.repeat(node.loc.start.column); + const missingCases = []; + for (const missingBranchType of missingBranchTypes) { + if (missingBranchType == null) { + missingCases.push(`default: { throw new Error('default case') }`); + continue; + } + const missingBranchName = missingBranchType.getSymbol()?.escapedName; + let caseTest = tsutils.isTypeFlagSet(missingBranchType, ts.TypeFlags.ESSymbolLike) + ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + missingBranchName + : typeToString(missingBranchType); + if (symbolName && + (missingBranchName || missingBranchName === '') && + (0, util_1.requiresQuoting)(missingBranchName.toString(), compilerOptions.target)) { + const escapedBranchName = missingBranchName + .replaceAll("'", "\\'") + .replaceAll('\n', '\\n') + .replaceAll('\r', '\\r'); + caseTest = `${symbolName}['${escapedBranchName}']`; + } + missingCases.push(`case ${caseTest}: { throw new Error('Not implemented yet: ${caseTest + .replaceAll('\\', '\\\\') + .replaceAll("'", "\\'")} case') }`); + } + const fixString = missingCases + .map(code => `${caseIndent}${code}`) + .join('\n'); + if (lastCase) { + if (defaultCase) { + const beforeFixString = missingCases + .map(code => `${code}\n${caseIndent}`) + .join(''); + return fixer.insertTextBefore(defaultCase, beforeFixString); + } + return fixer.insertTextAfter(lastCase, `\n${fixString}`); + } + // There were no existing cases. + const openingBrace = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.discriminant, util_1.isOpeningBraceToken), util_1.NullThrowsReasons.MissingToken('{', 'discriminant')); + const closingBrace = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.discriminant, util_1.isClosingBraceToken), util_1.NullThrowsReasons.MissingToken('}', 'discriminant')); + return fixer.replaceTextRange([openingBrace.range[0], closingBrace.range[1]], ['{', fixString, `${caseIndent}}`].join('\n')); + } + function checkSwitchUnnecessaryDefaultCase(switchMetadata) { + if (allowDefaultCaseForExhaustiveSwitch) { + return; + } + const { containsNonLiteralType, defaultCase, missingLiteralBranchTypes } = switchMetadata; + if (missingLiteralBranchTypes.length === 0 && + defaultCase != null && + !containsNonLiteralType) { + context.report({ + node: defaultCase, + messageId: 'dangerousDefaultCase', + }); + } + } + function checkSwitchNoUnionDefaultCase(node, switchMetadata) { + if (!requireDefaultForNonUnion) { + return; + } + const { containsNonLiteralType, defaultCase } = switchMetadata; + if (containsNonLiteralType && defaultCase == null) { + context.report({ + node: node.discriminant, + messageId: 'switchIsNotExhaustive', + data: { missingBranches: 'default' }, + suggest: [ + { + messageId: 'addMissingCases', + fix(fixer) { + return fixSwitch(fixer, node, [null], defaultCase); + }, + }, + ], + }); + } + } + return { + SwitchStatement(node) { + const switchMetadata = getSwitchMetadata(node); + checkSwitchExhaustive(node, switchMetadata); + checkSwitchUnnecessaryDefaultCase(switchMetadata); + checkSwitchNoUnionDefaultCase(node, switchMetadata); + }, + }; + }, +}); +function isTypeLiteralLikeType(type) { + return tsutils.isTypeFlagSet(type, ts.TypeFlags.Literal | + ts.TypeFlags.Undefined | + ts.TypeFlags.Null | + ts.TypeFlags.UniqueESSymbol); +} +/** + * For example: + * + * - `"foo" | "bar"` is a type with all literal types. + * - `"foo" | number` is a type that contains non-literal types. + * - `"foo" & { bar: 1 }` is a type that contains non-literal types. + * + * Default cases are never superfluous in switches with non-literal types. + */ +function doesTypeContainNonLiteralType(type) { + return tsutils + .unionConstituents(type) + .some(type => tsutils + .intersectionConstituents(type) + .every(subType => !isTypeLiteralLikeType(subType))); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.d.ts new file mode 100644 index 0000000..916e6a7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.d.ts @@ -0,0 +1,11 @@ +export type Options = [ + { + lib?: 'always' | 'never'; + path?: 'always' | 'never'; + types?: 'always' | 'never' | 'prefer-import'; + } +]; +export type MessageIds = 'tripleSlashReference'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"tripleSlashReference", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; +export default _default; +//# sourceMappingURL=triple-slash-reference.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.d.ts.map new file mode 100644 index 0000000..fe861bf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"triple-slash-reference.d.ts","sourceRoot":"","sources":["../../src/rules/triple-slash-reference.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,GAAG,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;QACzB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;QAC1B,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,eAAe,CAAC;KAC9C;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC;;AAEhD,wBA0HG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js new file mode 100644 index 0000000..6b8bb6f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js @@ -0,0 +1,110 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'triple-slash-reference', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow certain triple slash directives in favor of ES6-style import declarations', + recommended: 'recommended', + }, + messages: { + tripleSlashReference: 'Do not use a triple slash reference for {{module}}, use `import` style instead.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + lib: { + type: 'string', + description: 'What to enforce for `/// ` references.', + enum: ['always', 'never'], + }, + path: { + type: 'string', + description: 'What to enforce for `/// ` references.', + enum: ['always', 'never'], + }, + types: { + type: 'string', + description: 'What to enforce for `/// ` references.', + enum: ['always', 'never', 'prefer-import'], + }, + }, + }, + ], + }, + defaultOptions: [ + { + lib: 'always', + path: 'never', + types: 'prefer-import', + }, + ], + create(context, [{ lib, path, types }]) { + let programNode; + const references = []; + function hasMatchingReference(source) { + references.forEach(reference => { + if (reference.importName === source.value) { + context.report({ + node: reference.comment, + messageId: 'tripleSlashReference', + data: { + module: reference.importName, + }, + }); + } + }); + } + return { + ImportDeclaration(node) { + if (programNode) { + hasMatchingReference(node.source); + } + }, + Program(node) { + if (lib === 'always' && path === 'always' && types === 'always') { + return; + } + programNode = node; + const referenceRegExp = /^\/\s* { + if (comment.type !== utils_1.AST_TOKEN_TYPES.Line) { + return; + } + const referenceResult = referenceRegExp.exec(comment.value); + if (referenceResult) { + if ((referenceResult[1] === 'types' && types === 'never') || + (referenceResult[1] === 'path' && path === 'never') || + (referenceResult[1] === 'lib' && lib === 'never')) { + context.report({ + node: comment, + messageId: 'tripleSlashReference', + data: { + module: referenceResult[2], + }, + }); + return; + } + if (referenceResult[1] === 'types' && types === 'prefer-import') { + references.push({ comment, importName: referenceResult[2] }); + } + } + }); + }, + TSImportEqualsDeclaration(node) { + if (programNode) { + const reference = node.moduleReference; + if (reference.type === utils_1.AST_NODE_TYPES.TSExternalModuleReference) { + hasMatchingReference(reference.expression); + } + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.d.ts new file mode 100644 index 0000000..d239e9c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.d.ts @@ -0,0 +1,15 @@ +export declare const enum OptionKeys { + ArrayDestructuring = "arrayDestructuring", + ArrowParameter = "arrowParameter", + MemberVariableDeclaration = "memberVariableDeclaration", + ObjectDestructuring = "objectDestructuring", + Parameter = "parameter", + PropertyDeclaration = "propertyDeclaration", + VariableDeclaration = "variableDeclaration", + VariableDeclarationIgnoreFunction = "variableDeclarationIgnoreFunction" +} +export type Options = [Partial>]; +export type MessageIds = 'expectedTypedef' | 'expectedTypedefNamed'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=typedef.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.d.ts.map new file mode 100644 index 0000000..6711b83 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typedef.d.ts","sourceRoot":"","sources":["../../src/rules/typedef.ts"],"names":[],"mappings":"AAMA,0BAAkB,UAAU;IAC1B,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,yBAAyB,8BAA8B;IACvD,mBAAmB,wBAAwB;IAC3C,SAAS,cAAc;IACvB,mBAAmB,wBAAwB;IAC3C,mBAAmB,wBAAwB;IAC3C,iCAAiC,sCAAsC;CACxE;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;AAE7D,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG,sBAAsB,CAAC;;AAEpE,wBAqSG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js new file mode 100644 index 0000000..ff50c34 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js @@ -0,0 +1,239 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OptionKeys = void 0; +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +var OptionKeys; +(function (OptionKeys) { + OptionKeys["ArrayDestructuring"] = "arrayDestructuring"; + OptionKeys["ArrowParameter"] = "arrowParameter"; + OptionKeys["MemberVariableDeclaration"] = "memberVariableDeclaration"; + OptionKeys["ObjectDestructuring"] = "objectDestructuring"; + OptionKeys["Parameter"] = "parameter"; + OptionKeys["PropertyDeclaration"] = "propertyDeclaration"; + OptionKeys["VariableDeclaration"] = "variableDeclaration"; + OptionKeys["VariableDeclarationIgnoreFunction"] = "variableDeclarationIgnoreFunction"; +})(OptionKeys || (exports.OptionKeys = OptionKeys = {})); +exports.default = (0, util_1.createRule)({ + name: 'typedef', + meta: { + type: 'suggestion', + deprecated: { + deprecatedSince: '8.33.0', + message: 'This is an old rule that is no longer recommended for use.', + }, + docs: { + description: 'Require type annotations in certain places', + }, + messages: { + expectedTypedef: 'Expected a type annotation.', + expectedTypedefNamed: 'Expected {{name}} to have a type annotation.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + [OptionKeys.ArrayDestructuring]: { + type: 'boolean', + description: 'Whether to enforce type annotations on variables declared using array destructuring.', + }, + [OptionKeys.ArrowParameter]: { + type: 'boolean', + description: 'Whether to enforce type annotations for parameters of arrow functions.', + }, + [OptionKeys.MemberVariableDeclaration]: { + type: 'boolean', + description: 'Whether to enforce type annotations on member variables of classes.', + }, + [OptionKeys.ObjectDestructuring]: { + type: 'boolean', + description: 'Whether to enforce type annotations on variables declared using object destructuring.', + }, + [OptionKeys.Parameter]: { + type: 'boolean', + description: 'Whether to enforce type annotations for parameters of functions and methods.', + }, + [OptionKeys.PropertyDeclaration]: { + type: 'boolean', + description: 'Whether to enforce type annotations for properties of interfaces and types.', + }, + [OptionKeys.VariableDeclaration]: { + type: 'boolean', + description: 'Whether to enforce type annotations for variable declarations, excluding array and object destructuring.', + }, + [OptionKeys.VariableDeclarationIgnoreFunction]: { + type: 'boolean', + description: 'Whether to ignore variable declarations for non-arrow and arrow functions.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + [OptionKeys.ArrayDestructuring]: false, + [OptionKeys.ArrowParameter]: false, + [OptionKeys.MemberVariableDeclaration]: false, + [OptionKeys.ObjectDestructuring]: false, + [OptionKeys.Parameter]: false, + [OptionKeys.PropertyDeclaration]: false, + [OptionKeys.VariableDeclaration]: false, + [OptionKeys.VariableDeclarationIgnoreFunction]: false, + }, + ], + create(context, [{ arrayDestructuring, arrowParameter, memberVariableDeclaration, objectDestructuring, parameter, propertyDeclaration, variableDeclaration, variableDeclarationIgnoreFunction, },]) { + function report(location, name) { + context.report({ + node: location, + messageId: name ? 'expectedTypedefNamed' : 'expectedTypedef', + data: { name }, + }); + } + function getNodeName(node) { + return node.type === utils_1.AST_NODE_TYPES.Identifier ? node.name : undefined; + } + function isForOfStatementContext(node) { + let current = node.parent; + while (current) { + switch (current.type) { + case utils_1.AST_NODE_TYPES.VariableDeclarator: + case utils_1.AST_NODE_TYPES.VariableDeclaration: + case utils_1.AST_NODE_TYPES.ObjectPattern: + case utils_1.AST_NODE_TYPES.ArrayPattern: + case utils_1.AST_NODE_TYPES.Property: + current = current.parent; + break; + case utils_1.AST_NODE_TYPES.ForOfStatement: + return true; + default: + current = undefined; + } + } + return false; + } + function checkParameters(params) { + for (const param of params) { + let annotationNode; + switch (param.type) { + case utils_1.AST_NODE_TYPES.AssignmentPattern: + annotationNode = param.left; + break; + case utils_1.AST_NODE_TYPES.TSParameterProperty: + annotationNode = param.parameter; + // Check TS parameter property with default value like `constructor(private param: string = 'something') {}` + if (annotationNode.type === utils_1.AST_NODE_TYPES.AssignmentPattern) { + annotationNode = annotationNode.left; + } + break; + default: + annotationNode = param; + break; + } + if (!annotationNode.typeAnnotation) { + report(param, getNodeName(param)); + } + } + } + function isVariableDeclarationIgnoreFunction(node) { + return (variableDeclarationIgnoreFunction === true && + (node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression || + node.type === utils_1.AST_NODE_TYPES.FunctionExpression)); + } + function isAncestorHasTypeAnnotation(node) { + let ancestor = node.parent; + while (ancestor) { + if ((ancestor.type === utils_1.AST_NODE_TYPES.ObjectPattern || + ancestor.type === utils_1.AST_NODE_TYPES.ArrayPattern) && + ancestor.typeAnnotation) { + return true; + } + ancestor = ancestor.parent; + } + return false; + } + return { + ...(arrayDestructuring && { + ArrayPattern(node) { + if (node.parent.type === utils_1.AST_NODE_TYPES.RestElement && + node.parent.typeAnnotation) { + return; + } + if (!node.typeAnnotation && + !isForOfStatementContext(node) && + !isAncestorHasTypeAnnotation(node) && + node.parent.type !== utils_1.AST_NODE_TYPES.AssignmentExpression) { + report(node); + } + }, + }), + ...(arrowParameter && { + ArrowFunctionExpression(node) { + checkParameters(node.params); + }, + }), + ...(memberVariableDeclaration && { + PropertyDefinition(node) { + if (!(node.value && isVariableDeclarationIgnoreFunction(node.value)) && + !node.typeAnnotation) { + report(node, node.key.type === utils_1.AST_NODE_TYPES.Identifier + ? node.key.name + : undefined); + } + }, + }), + ...(parameter && { + 'FunctionDeclaration, FunctionExpression'(node) { + checkParameters(node.params); + }, + }), + ...(objectDestructuring && { + ObjectPattern(node) { + if (!node.typeAnnotation && + !isForOfStatementContext(node) && + !isAncestorHasTypeAnnotation(node)) { + report(node); + } + }, + }), + ...(propertyDeclaration && { + 'TSIndexSignature, TSPropertySignature'(node) { + if (!node.typeAnnotation) { + report(node, node.type === utils_1.AST_NODE_TYPES.TSPropertySignature + ? getNodeName(node.key) + : undefined); + } + }, + }), + VariableDeclarator(node) { + if (!variableDeclaration || + node.id.typeAnnotation || + (node.id.type === utils_1.AST_NODE_TYPES.ArrayPattern && + !arrayDestructuring) || + (node.id.type === utils_1.AST_NODE_TYPES.ObjectPattern && + !objectDestructuring) || + (node.init && isVariableDeclarationIgnoreFunction(node.init))) { + return; + } + let current = node.parent; + while (current) { + switch (current.type) { + case utils_1.AST_NODE_TYPES.VariableDeclaration: + // Keep looking upwards + current = current.parent; + break; + case utils_1.AST_NODE_TYPES.ForOfStatement: + case utils_1.AST_NODE_TYPES.ForInStatement: + // Stop traversing and don't report an error + return; + default: + // Stop traversing + current = undefined; + break; + } + } + report(node, getNodeName(node.id)); + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.d.ts new file mode 100644 index 0000000..af157d6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.d.ts @@ -0,0 +1,8 @@ +interface Config { + ignoreStatic: boolean; +} +export type Options = [Config]; +export type MessageIds = 'unbound' | 'unboundWithoutThisAnnotation'; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=unbound-method.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.d.ts.map new file mode 100644 index 0000000..dd8fac0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"unbound-method.d.ts","sourceRoot":"","sources":["../../src/rules/unbound-method.ts"],"names":[],"mappings":"AAkBA,UAAU,MAAM;IACd,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC;AAE/B,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,8BAA8B,CAAC;;AAiFpE,wBA4KG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js new file mode 100644 index 0000000..f090d58 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js @@ -0,0 +1,331 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +/** + * Static methods on these globals are either not `this`-aware or supported being + * called without `this`. + * + * - `Promise` is not in the list because it supports subclassing by using `this` + * - `Array` is in the list because although it supports subclassing, the `this` + * value defaults to `Array` when unbound + * + * This is now a language-design invariant: static methods are never `this`-aware + * because TC39 wants to make `array.map(Class.method)` work! + */ +const SUPPORTED_GLOBALS = [ + 'Number', + 'Object', + 'String', // eslint-disable-line @typescript-eslint/internal/prefer-ast-types-enum + 'RegExp', + 'Symbol', + 'Array', + 'Proxy', + 'Date', + 'Atomics', + 'Reflect', + 'console', + 'Math', + 'JSON', + 'Intl', +]; +const nativelyBoundMembers = new Set(SUPPORTED_GLOBALS.flatMap(namespace => { + if (!(namespace in global)) { + // node.js might not have namespaces like Intl depending on compilation options + // https://nodejs.org/api/intl.html#intl_options_for_building_node_js + return []; + } + const object = global[namespace]; + return Object.getOwnPropertyNames(object) + .filter(name => !name.startsWith('_') && + typeof object[name] === 'function') + .map(name => `${namespace}.${name}`); +})); +const SUPPORTED_GLOBAL_TYPES = [ + 'NumberConstructor', + 'ObjectConstructor', + 'StringConstructor', + 'SymbolConstructor', + 'ArrayConstructor', + 'Array', + 'ProxyConstructor', + 'Console', + 'DateConstructor', + 'Atomics', + 'Math', + 'JSON', +]; +const isNotImported = (symbol, currentSourceFile) => { + const { valueDeclaration } = symbol; + if (!valueDeclaration) { + // working around https://github.com/microsoft/TypeScript/issues/31294 + return false; + } + return (!!currentSourceFile && + currentSourceFile !== valueDeclaration.getSourceFile()); +}; +const BASE_MESSAGE = 'Avoid referencing unbound methods which may cause unintentional scoping of `this`.'; +exports.default = (0, util_1.createRule)({ + name: 'unbound-method', + meta: { + type: 'problem', + docs: { + description: 'Enforce unbound methods are called with their expected scope', + recommended: 'recommended', + requiresTypeChecking: true, + }, + messages: { + unbound: BASE_MESSAGE, + unboundWithoutThisAnnotation: `${BASE_MESSAGE}\nIf your function does not access \`this\`, you can annotate it with \`this: void\`, or consider using an arrow function instead.`, + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + ignoreStatic: { + type: 'boolean', + description: 'Whether to skip checking whether `static` methods are correctly bound.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + ignoreStatic: false, + }, + ], + create(context, [{ ignoreStatic }]) { + const services = (0, util_1.getParserServices)(context); + const currentSourceFile = services.program.getSourceFile(context.filename); + function checkIfMethodAndReport(node, symbol) { + if (!symbol) { + return false; + } + const { dangerous, firstParamIsThis } = checkIfMethod(symbol, ignoreStatic); + if (dangerous) { + context.report({ + node, + messageId: firstParamIsThis === false + ? 'unboundWithoutThisAnnotation' + : 'unbound', + }); + return true; + } + return false; + } + function isNativelyBound(object, property) { + // We can't rely entirely on the type-level checks made at the end of this + // function, because sometimes type declarations don't come from the + // default library, but come from, for example, "@types/node". And we can't + // tell if a method is unbound just by looking at its signature declared in + // the interface. + // + // See related discussion https://github.com/typescript-eslint/typescript-eslint/pull/8952#discussion_r1576543310 + if (object.type === utils_1.AST_NODE_TYPES.Identifier && + property.type === utils_1.AST_NODE_TYPES.Identifier) { + const objectSymbol = services.getSymbolAtLocation(object); + const notImported = objectSymbol != null && + isNotImported(objectSymbol, currentSourceFile); + if (notImported && + nativelyBoundMembers.has(`${object.name}.${property.name}`)) { + return true; + } + } + // if `${object.name}.${property.name}` doesn't match any of + // the nativelyBoundMembers, then we fallback to type-level checks + return ((0, util_1.isBuiltinSymbolLike)(services.program, services.getTypeAtLocation(object), SUPPORTED_GLOBAL_TYPES) && + (0, util_1.isSymbolFromDefaultLibrary)(services.program, services.getTypeAtLocation(property).getSymbol())); + } + return { + MemberExpression(node) { + if (isSafeUse(node) || isNativelyBound(node.object, node.property)) { + return; + } + checkIfMethodAndReport(node, services.getSymbolAtLocation(node)); + }, + ObjectPattern(node) { + if (isNodeInsideTypeDeclaration(node)) { + return; + } + let initNode = null; + if (node.parent.type === utils_1.AST_NODE_TYPES.VariableDeclarator) { + initNode = node.parent.init; + } + else if (node.parent.type === utils_1.AST_NODE_TYPES.AssignmentPattern || + node.parent.type === utils_1.AST_NODE_TYPES.AssignmentExpression) { + initNode = node.parent.right; + } + for (const property of node.properties) { + if (property.type !== utils_1.AST_NODE_TYPES.Property || + property.key.type !== utils_1.AST_NODE_TYPES.Identifier) { + continue; + } + if (initNode) { + if (!isNativelyBound(initNode, property.key)) { + const reported = checkIfMethodAndReport(property.key, services + .getTypeAtLocation(initNode) + .getProperty(property.key.name)); + if (reported) { + continue; + } + // In assignment patterns, we should also check the type of + // Foo's nativelyBound method because initNode might be used as + // default value: + // function ({ nativelyBound }: Foo = NativeObject) {} + } + else if (node.parent.type !== utils_1.AST_NODE_TYPES.AssignmentPattern) { + continue; + } + } + for (const intersectionPart of tsutils + .unionConstituents(services.getTypeAtLocation(node)) + .flatMap(unionPart => tsutils.intersectionConstituents(unionPart))) { + const reported = checkIfMethodAndReport(property.key, intersectionPart.getProperty(property.key.name)); + if (reported) { + break; + } + } + } + }, + }; + }, +}); +function isNodeInsideTypeDeclaration(node) { + let parent = node; + while ((parent = parent.parent)) { + if ((parent.type === utils_1.AST_NODE_TYPES.ClassDeclaration && parent.declare) || + parent.type === utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition || + parent.type === utils_1.AST_NODE_TYPES.TSDeclareFunction || + parent.type === utils_1.AST_NODE_TYPES.TSFunctionType || + parent.type === utils_1.AST_NODE_TYPES.TSInterfaceDeclaration || + parent.type === utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration || + (parent.type === utils_1.AST_NODE_TYPES.VariableDeclaration && parent.declare)) { + return true; + } + } + return false; +} +function checkIfMethod(symbol, ignoreStatic) { + const { valueDeclaration } = symbol; + if (!valueDeclaration) { + // working around https://github.com/microsoft/TypeScript/issues/31294 + return { dangerous: false }; + } + switch (valueDeclaration.kind) { + case ts.SyntaxKind.PropertyDeclaration: + return { + dangerous: valueDeclaration.initializer?.kind === + ts.SyntaxKind.FunctionExpression, + }; + case ts.SyntaxKind.PropertyAssignment: { + const assignee = valueDeclaration.initializer; + if (assignee.kind !== ts.SyntaxKind.FunctionExpression) { + return { + dangerous: false, + }; + } + return checkMethod(assignee, ignoreStatic); + } + case ts.SyntaxKind.MethodDeclaration: + case ts.SyntaxKind.MethodSignature: { + return checkMethod(valueDeclaration, ignoreStatic); + } + } + return { dangerous: false }; +} +function checkMethod(valueDeclaration, ignoreStatic) { + const firstParam = valueDeclaration.parameters.at(0); + const firstParamIsThis = firstParam?.name.kind === ts.SyntaxKind.Identifier && + // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison + firstParam.name.escapedText === 'this'; + const thisArgIsVoid = firstParamIsThis && firstParam.type?.kind === ts.SyntaxKind.VoidKeyword; + return { + dangerous: !thisArgIsVoid && + !(ignoreStatic && + tsutils.includesModifier((0, util_1.getModifiers)(valueDeclaration), ts.SyntaxKind.StaticKeyword)), + firstParamIsThis, + }; +} +function isSafeUse(node) { + const parent = node.parent; + switch (parent?.type) { + case utils_1.AST_NODE_TYPES.IfStatement: + case utils_1.AST_NODE_TYPES.ForStatement: + case utils_1.AST_NODE_TYPES.MemberExpression: + case utils_1.AST_NODE_TYPES.SwitchStatement: + case utils_1.AST_NODE_TYPES.UpdateExpression: + case utils_1.AST_NODE_TYPES.WhileStatement: + return true; + case utils_1.AST_NODE_TYPES.CallExpression: + return parent.callee === node; + case utils_1.AST_NODE_TYPES.ConditionalExpression: + return parent.test === node; + case utils_1.AST_NODE_TYPES.TaggedTemplateExpression: + return parent.tag === node; + case utils_1.AST_NODE_TYPES.UnaryExpression: + // the first case is safe for obvious + // reasons. The second one is also fine + // since we're returning something falsy + return ['!', 'delete', 'typeof', 'void'].includes(parent.operator); + case utils_1.AST_NODE_TYPES.BinaryExpression: + return ['!=', '!==', '==', '===', 'instanceof'].includes(parent.operator); + case utils_1.AST_NODE_TYPES.AssignmentExpression: + return (parent.operator === '=' && + (node === parent.left || + (node.type === utils_1.AST_NODE_TYPES.MemberExpression && + node.object.type === utils_1.AST_NODE_TYPES.Super && + parent.left.type === utils_1.AST_NODE_TYPES.MemberExpression && + parent.left.object.type === utils_1.AST_NODE_TYPES.ThisExpression))); + case utils_1.AST_NODE_TYPES.ChainExpression: + case utils_1.AST_NODE_TYPES.TSNonNullExpression: + case utils_1.AST_NODE_TYPES.TSAsExpression: + case utils_1.AST_NODE_TYPES.TSTypeAssertion: + return isSafeUse(parent); + case utils_1.AST_NODE_TYPES.LogicalExpression: + if (parent.operator === '&&' && parent.left === node) { + // this is safe, as && will return the left if and only if it's falsy + return true; + } + // in all other cases, it's likely the logical expression will return the method ref + // so make sure the parent is a safe usage + return isSafeUse(parent); + } + return false; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.d.ts new file mode 100644 index 0000000..216f517 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.d.ts @@ -0,0 +1,10 @@ +export type MessageIds = 'omittingRestParameter' | 'omittingSingleParameter' | 'singleParameterDifference'; +export type Options = [ + { + ignoreDifferentlyNamedParameters?: boolean; + ignoreOverloadsWithDifferentJSDoc?: boolean; + } +]; +declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule; +export default _default; +//# sourceMappingURL=unified-signatures.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.d.ts.map new file mode 100644 index 0000000..095bf22 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"unified-signatures.d.ts","sourceRoot":"","sources":["../../src/rules/unified-signatures.ts"],"names":[],"mappings":"AAuDA,MAAM,MAAM,UAAU,GAClB,uBAAuB,GACvB,yBAAyB,GACzB,2BAA2B,CAAC;AAEhC,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,gCAAgC,CAAC,EAAE,OAAO,CAAC;QAC3C,iCAAiC,CAAC,EAAE,OAAO,CAAC;KAC7C;CACF,CAAC;;AAEF,wBA6kBG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js new file mode 100644 index 0000000..447e13b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js @@ -0,0 +1,468 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'unified-signatures', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow two overloads that could be unified into one with a union or an optional/rest parameter', + // too opinionated to be recommended + recommended: 'strict', + }, + messages: { + omittingRestParameter: '{{failureStringStart}} with a rest parameter.', + omittingSingleParameter: '{{failureStringStart}} with an optional parameter.', + singleParameterDifference: '{{failureStringStart}} taking `{{type1}} | {{type2}}`.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + ignoreDifferentlyNamedParameters: { + type: 'boolean', + description: 'Whether two parameters with different names at the same index should be considered different even if their types are the same.', + }, + ignoreOverloadsWithDifferentJSDoc: { + type: 'boolean', + description: 'Whether two overloads with different JSDoc comments should be considered different even if their parameter and return types are the same.', + }, + }, + }, + ], + }, + defaultOptions: [ + { + ignoreDifferentlyNamedParameters: false, + ignoreOverloadsWithDifferentJSDoc: false, + }, + ], + create(context, [{ ignoreDifferentlyNamedParameters, ignoreOverloadsWithDifferentJSDoc }]) { + //---------------------------------------------------------------------- + // Helpers + //---------------------------------------------------------------------- + function failureStringStart(otherLine) { + // For only 2 overloads we don't need to specify which is the other one. + const overloads = otherLine == null + ? 'These overloads' + : `This overload and the one on line ${otherLine}`; + return `${overloads} can be combined into one signature`; + } + function addFailures(failures) { + for (const failure of failures) { + const { only2, unify } = failure; + switch (unify.kind) { + case 'single-parameter-difference': { + const { p0, p1 } = unify; + const lineOfOtherOverload = only2 ? undefined : p0.loc.start.line; + const typeAnnotation0 = isTSParameterProperty(p0) + ? p0.parameter.typeAnnotation + : p0.typeAnnotation; + const typeAnnotation1 = isTSParameterProperty(p1) + ? p1.parameter.typeAnnotation + : p1.typeAnnotation; + context.report({ + loc: p1.loc, + node: p1, + messageId: 'singleParameterDifference', + data: { + failureStringStart: failureStringStart(lineOfOtherOverload), + type1: context.sourceCode.getText(typeAnnotation0?.typeAnnotation), + type2: context.sourceCode.getText(typeAnnotation1?.typeAnnotation), + }, + }); + break; + } + case 'extra-parameter': { + const { extraParameter, otherSignature } = unify; + const lineOfOtherOverload = only2 + ? undefined + : otherSignature.loc.start.line; + context.report({ + loc: extraParameter.loc, + node: extraParameter, + messageId: extraParameter.type === utils_1.AST_NODE_TYPES.RestElement + ? 'omittingRestParameter' + : 'omittingSingleParameter', + data: { + failureStringStart: failureStringStart(lineOfOtherOverload), + }, + }); + } + } + } + } + function checkOverloads(signatures, typeParameters) { + const result = []; + const isTypeParameter = getIsTypeParameter(typeParameters); + for (const overloads of signatures) { + forEachPair(overloads, (a, b) => { + const signature0 = a.value ?? a; + const signature1 = b.value ?? b; + const unify = compareSignatures(signature0, signature1, isTypeParameter); + if (unify != null) { + result.push({ only2: overloads.length === 2, unify }); + } + }); + } + return result; + } + function compareSignatures(a, b, isTypeParameter) { + if (!signaturesCanBeUnified(a, b, isTypeParameter)) { + return undefined; + } + return a.params.length === b.params.length + ? signaturesDifferBySingleParameter(a.params, b.params) + : signaturesDifferByOptionalOrRestParameter(a, b); + } + function signaturesCanBeUnified(a, b, isTypeParameter) { + // Must return the same type. + const aTypeParams = a.typeParameters != null ? a.typeParameters.params : undefined; + const bTypeParams = b.typeParameters != null ? b.typeParameters.params : undefined; + if (ignoreDifferentlyNamedParameters) { + const commonParamsLength = Math.min(a.params.length, b.params.length); + for (let i = 0; i < commonParamsLength; i += 1) { + if (a.params[i].type === b.params[i].type && + getStaticParameterName(a.params[i]) !== + getStaticParameterName(b.params[i])) { + return false; + } + } + } + if (ignoreOverloadsWithDifferentJSDoc) { + const aComment = getBlockCommentForNode(getCommentTargetNode(a)); + const bComment = getBlockCommentForNode(getCommentTargetNode(b)); + if (aComment?.value !== bComment?.value) { + return false; + } + } + return (typesAreEqual(a.returnType, b.returnType) && + // Must take the same type parameters. + // If one uses a type parameter (from outside) and the other doesn't, they shouldn't be joined. + (0, util_1.arraysAreEqual)(aTypeParams, bTypeParams, typeParametersAreEqual) && + signatureUsesTypeParameter(a, isTypeParameter) === + signatureUsesTypeParameter(b, isTypeParameter)); + } + /** Detect `a(x: number, y: number, z: number)` and `a(x: number, y: string, z: number)`. */ + function signaturesDifferBySingleParameter(types1, types2) { + const firstParam1 = types1[0]; + const firstParam2 = types2[0]; + // exempt signatures with `this: void` from the rule + if (isThisVoidParam(firstParam1) || isThisVoidParam(firstParam2)) { + return undefined; + } + const index = getIndexOfFirstDifference(types1, types2, parametersAreEqual); + if (index == null) { + return undefined; + } + // If remaining arrays are equal, the signatures differ by just one parameter type + if (!(0, util_1.arraysAreEqual)(types1.slice(index + 1), types2.slice(index + 1), parametersAreEqual)) { + return undefined; + } + const a = types1[index]; + const b = types2[index]; + // Can unify `a?: string` and `b?: number`. Can't unify `...args: string[]` and `...args: number[]`. + // See https://github.com/Microsoft/TypeScript/issues/5077 + return parametersHaveEqualSigils(a, b) && + a.type !== utils_1.AST_NODE_TYPES.RestElement + ? { kind: 'single-parameter-difference', p0: a, p1: b } + : undefined; + } + function isThisParam(param) { + return (param != null && + param.type === utils_1.AST_NODE_TYPES.Identifier && + param.name === 'this'); + } + function isThisVoidParam(param) { + return (isThisParam(param) && + param.typeAnnotation?.typeAnnotation.type === + utils_1.AST_NODE_TYPES.TSVoidKeyword); + } + /** + * Detect `a(): void` and `a(x: number): void`. + * Returns the parameter declaration (`x: number` in this example) that should be optional/rest, and overload it's a part of. + */ + function signaturesDifferByOptionalOrRestParameter(a, b) { + const sig1 = a.params; + const sig2 = b.params; + const minLength = Math.min(sig1.length, sig2.length); + const longer = sig1.length < sig2.length ? sig2 : sig1; + const shorter = sig1.length < sig2.length ? sig1 : sig2; + const shorterSig = sig1.length < sig2.length ? a : b; + const firstParam1 = sig1.at(0); + const firstParam2 = sig2.at(0); + // If one signature has explicit this type and another doesn't, they can't + // be unified. + if (isThisParam(firstParam1) !== isThisParam(firstParam2)) { + return undefined; + } + // exempt signatures with `this: void` from the rule + if (isThisVoidParam(firstParam1) || isThisVoidParam(firstParam2)) { + return undefined; + } + // If one is has 2+ parameters more than the other, they must all be optional/rest. + // Differ by optional parameters: f() and f(x), f() and f(x, ?y, ...z) + // Not allowed: f() and f(x, y) + for (let i = minLength + 1; i < longer.length; i++) { + if (!parameterMayBeMissing(longer[i])) { + return undefined; + } + } + for (let i = 0; i < minLength; i++) { + const sig1i = sig1[i]; + const sig2i = sig2[i]; + const typeAnnotation1 = isTSParameterProperty(sig1i) + ? sig1i.parameter.typeAnnotation + : sig1i.typeAnnotation; + const typeAnnotation2 = isTSParameterProperty(sig2i) + ? sig2i.parameter.typeAnnotation + : sig2i.typeAnnotation; + if (!typesAreEqual(typeAnnotation1, typeAnnotation2)) { + return undefined; + } + } + if (minLength > 0 && + shorter[minLength - 1].type === utils_1.AST_NODE_TYPES.RestElement) { + return undefined; + } + return { + extraParameter: longer[longer.length - 1], + kind: 'extra-parameter', + otherSignature: shorterSig, + }; + } + /** Given type parameters, returns a function to test whether a type is one of those parameters. */ + function getIsTypeParameter(typeParameters) { + if (typeParameters == null) { + return (() => false); + } + const set = new Set(); + for (const t of typeParameters.params) { + set.add(t.name.name); + } + return (typeName => set.has(typeName)); + } + /** True if any of the outer type parameters are used in a signature. */ + function signatureUsesTypeParameter(sig, isTypeParameter) { + return sig.params.some((p) => typeContainsTypeParameter(isTSParameterProperty(p) + ? p.parameter.typeAnnotation + : p.typeAnnotation)); + function typeContainsTypeParameter(type) { + if (!type) { + return false; + } + if (type.type === utils_1.AST_NODE_TYPES.TSTypeReference) { + const typeName = type.typeName; + if (isIdentifier(typeName) && isTypeParameter(typeName.name)) { + return true; + } + } + return typeContainsTypeParameter(type.typeAnnotation ?? + type.elementType); + } + } + function isTSParameterProperty(node) { + return node.type === utils_1.AST_NODE_TYPES.TSParameterProperty; + } + function parametersAreEqual(a, b) { + const typeAnnotationA = isTSParameterProperty(a) + ? a.parameter.typeAnnotation + : a.typeAnnotation; + const typeAnnotationB = isTSParameterProperty(b) + ? b.parameter.typeAnnotation + : b.typeAnnotation; + return (parametersHaveEqualSigils(a, b) && + typesAreEqual(typeAnnotationA, typeAnnotationB)); + } + /** True for optional/rest parameters. */ + function parameterMayBeMissing(p) { + const optional = isTSParameterProperty(p) + ? p.parameter.optional + : p.optional; + return p.type === utils_1.AST_NODE_TYPES.RestElement || optional; + } + /** False if one is optional and the other isn't, or one is a rest parameter and the other isn't. */ + function parametersHaveEqualSigils(a, b) { + const optionalA = isTSParameterProperty(a) + ? a.parameter.optional + : a.optional; + const optionalB = isTSParameterProperty(b) + ? b.parameter.optional + : b.optional; + return ((a.type === utils_1.AST_NODE_TYPES.RestElement) === + (b.type === utils_1.AST_NODE_TYPES.RestElement) && optionalA === optionalB); + } + function typeParametersAreEqual(a, b) { + return (a.name.name === b.name.name && + constraintsAreEqual(a.constraint, b.constraint)); + } + function typesAreEqual(a, b) { + return (a === b || + (a != null && + b != null && + context.sourceCode.getText(a.typeAnnotation) === + context.sourceCode.getText(b.typeAnnotation))); + } + function constraintsAreEqual(a, b) { + return a === b || (a != null && b != null && a.type === b.type); + } + /* Returns the first index where `a` and `b` differ. */ + function getIndexOfFirstDifference(a, b, equal) { + for (let i = 0; i < a.length && i < b.length; i++) { + if (!equal(a[i], b[i])) { + return i; + } + } + return undefined; + } + /** Calls `action` for every pair of values in `values`. */ + function forEachPair(values, action) { + for (let i = 0; i < values.length; i++) { + for (let j = i + 1; j < values.length; j++) { + action(values[i], values[j]); + } + } + } + const scopes = []; + let currentScope = { + overloads: new Map(), + }; + function createScope(parent, typeParameters) { + if (currentScope) { + scopes.push(currentScope); + } + currentScope = { + overloads: new Map(), + parent, + typeParameters, + }; + } + function checkScope() { + const scope = (0, util_1.nullThrows)(currentScope, 'checkScope() called without a current scope'); + const failures = checkOverloads([...scope.overloads.values()], scope.typeParameters); + addFailures(failures); + currentScope = scopes.pop(); + } + /** + * @returns the first valid JSDoc comment annotating `node` + */ + function getBlockCommentForNode(node) { + return context.sourceCode + .getCommentsBefore(node) + .reverse() + .find(comment => comment.type === utils_1.AST_TOKEN_TYPES.Block); + } + function addOverload(signature, key, containingNode) { + key ??= getOverloadKey(signature); + if (currentScope && + (containingNode ?? signature).parent === currentScope.parent) { + const overloads = currentScope.overloads.get(key); + if (overloads != null) { + overloads.push(signature); + } + else { + currentScope.overloads.set(key, [signature]); + } + } + } + //---------------------------------------------------------------------- + // Public + //---------------------------------------------------------------------- + return { + ClassDeclaration(node) { + createScope(node.body, node.typeParameters); + }, + Program: createScope, + TSInterfaceDeclaration(node) { + createScope(node.body, node.typeParameters); + }, + TSModuleBlock: createScope, + TSTypeLiteral: createScope, + // collect overloads + MethodDefinition(node) { + if (!node.value.body && !isGetterOrSetter(node)) { + addOverload(node); + } + }, + TSAbstractMethodDefinition(node) { + if (!node.value.body && !isGetterOrSetter(node)) { + addOverload(node); + } + }, + TSCallSignatureDeclaration: addOverload, + TSConstructSignatureDeclaration: addOverload, + TSDeclareFunction(node) { + const exportingNode = getExportingNode(node); + addOverload(node, node.id?.name ?? exportingNode?.type, exportingNode); + }, + TSMethodSignature(node) { + if (!isGetterOrSetter(node)) { + addOverload(node); + } + }, + // validate scopes + 'ClassDeclaration:exit': checkScope, + 'Program:exit': checkScope, + 'TSInterfaceDeclaration:exit': checkScope, + 'TSModuleBlock:exit': checkScope, + 'TSTypeLiteral:exit': checkScope, + }; + }, +}); +function getCommentTargetNode(node) { + if (node.type === utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression) { + return node.parent; + } + return getExportingNode(node) ?? node; +} +function getExportingNode(node) { + return node.parent.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration || + node.parent.type === utils_1.AST_NODE_TYPES.ExportDefaultDeclaration + ? node.parent + : undefined; +} +function getOverloadKey(node) { + const info = getOverloadInfo(node); + return ((node.computed ? '0' : '1') + + (node.static ? '0' : '1') + + info); +} +function getOverloadInfo(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration: + return 'constructor'; + case utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration: + return '()'; + default: { + const { key } = node; + if (isPrivateIdentifier(key)) { + return `private_identifier_${key.name}`; + } + if (isIdentifier(key)) { + return `identifier_${key.name}`; + } + return key.raw; + } + } +} +function getStaticParameterName(param) { + switch (param.type) { + case utils_1.AST_NODE_TYPES.Identifier: + return param.name; + case utils_1.AST_NODE_TYPES.RestElement: + return getStaticParameterName(param.argument); + default: + return undefined; + } +} +function isIdentifier(node) { + return node.type === utils_1.AST_NODE_TYPES.Identifier; +} +function isPrivateIdentifier(node) { + return node.type === utils_1.AST_NODE_TYPES.PrivateIdentifier; +} +function isGetterOrSetter(node) { + return node.kind === 'get' || node.kind === 'set'; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.d.ts new file mode 100644 index 0000000..d8b1ecb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.d.ts @@ -0,0 +1,5 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export type MessageIds = 'addUnknownRestTypeAnnotationSuggestion' | 'addUnknownTypeAnnotationSuggestion' | 'useUnknown' | 'useUnknownArrayDestructuringPattern' | 'useUnknownObjectDestructuringPattern' | 'wrongRestTypeAnnotationSuggestion' | 'wrongTypeAnnotationSuggestion'; +declare const _default: TSESLint.RuleModule; +export default _default; +//# sourceMappingURL=use-unknown-in-catch-callback-variable.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.d.ts.map new file mode 100644 index 0000000..a61a190 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"use-unknown-in-catch-callback-variable.d.ts","sourceRoot":"","sources":["../../src/rules/use-unknown-in-catch-callback-variable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAgBnE,MAAM,MAAM,UAAU,GAClB,wCAAwC,GACxC,oCAAoC,GACpC,YAAY,GACZ,qCAAqC,GACrC,sCAAsC,GACtC,mCAAmC,GACnC,+BAA+B,CAAC;;AAKpC,wBAkSG"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.js new file mode 100644 index 0000000..0eee80b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.js @@ -0,0 +1,261 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const util_1 = require("../util"); +const useUnknownMessageBase = 'Prefer the safe `: unknown` for a `{{method}}`{{append}} callback variable.'; +exports.default = (0, util_1.createRule)({ + name: 'use-unknown-in-catch-callback-variable', + meta: { + type: 'suggestion', + docs: { + description: 'Enforce typing arguments in Promise rejection callbacks as `unknown`', + recommended: 'strict', + requiresTypeChecking: true, + }, + hasSuggestions: true, + messages: { + addUnknownRestTypeAnnotationSuggestion: 'Add an explicit `: [unknown]` type annotation to the rejection callback rest variable.', + addUnknownTypeAnnotationSuggestion: 'Add an explicit `: unknown` type annotation to the rejection callback variable.', + useUnknown: useUnknownMessageBase, + useUnknownArrayDestructuringPattern: `${useUnknownMessageBase} The thrown error may not be iterable.`, + useUnknownObjectDestructuringPattern: `${useUnknownMessageBase} The thrown error may be nullable, or may not have the expected shape.`, + wrongRestTypeAnnotationSuggestion: 'Change existing type annotation to `: [unknown]`.', + wrongTypeAnnotationSuggestion: 'Change existing type annotation to `: unknown`.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const { esTreeNodeToTSNodeMap, program } = (0, util_1.getParserServices)(context); + const checker = program.getTypeChecker(); + function isFlaggableHandlerType(type) { + for (const unionPart of tsutils.unionConstituents(type)) { + const callSignatures = tsutils.getCallSignaturesOfType(unionPart); + if (callSignatures.length === 0) { + // Ignore any non-function components to the type. Those are not this rule's problem. + continue; + } + for (const callSignature of callSignatures) { + const firstParam = callSignature.parameters.at(0); + if (!firstParam) { + // it's not an issue if there's no catch variable at all. + continue; + } + let firstParamType = checker.getTypeOfSymbol(firstParam); + const decl = firstParam.valueDeclaration; + if (decl != null && (0, util_1.isRestParameterDeclaration)(decl)) { + if (checker.isArrayType(firstParamType)) { + firstParamType = checker.getTypeArguments(firstParamType)[0]; + } + else if (checker.isTupleType(firstParamType)) { + firstParamType = checker.getTypeArguments(firstParamType)[0]; + } + else { + // a rest arg that's not an array or tuple should definitely be flagged. + return true; + } + } + if (!tsutils.isIntrinsicUnknownType(firstParamType)) { + return true; + } + } + } + return false; + } + function collectFlaggedNodes(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.LogicalExpression: + return [ + ...collectFlaggedNodes(node.left), + ...collectFlaggedNodes(node.right), + ]; + case utils_1.AST_NODE_TYPES.SequenceExpression: + return collectFlaggedNodes((0, util_1.nullThrows)(node.expressions.at(-1), 'sequence expression must have multiple expressions')); + case utils_1.AST_NODE_TYPES.ConditionalExpression: + return [ + ...collectFlaggedNodes(node.consequent), + ...collectFlaggedNodes(node.alternate), + ]; + case utils_1.AST_NODE_TYPES.ArrowFunctionExpression: + case utils_1.AST_NODE_TYPES.FunctionExpression: + { + const argument = esTreeNodeToTSNodeMap.get(node); + const typeOfArgument = checker.getTypeAtLocation(argument); + if (isFlaggableHandlerType(typeOfArgument)) { + return [node]; + } + } + break; + default: + break; + } + return []; + } + /** + * Analyzes the syntax of the catch argument and makes a best effort to pinpoint + * why it's reporting, and to come up with a suggested fix if possible. + * + * This function is explicitly operating under the assumption that the + * rule _is reporting_, so it is not guaranteed to be sound to call otherwise. + */ + function refineReportIfPossible(argument) { + const catchVariableOuterWithIncorrectTypes = (0, util_1.nullThrows)(argument.params.at(0), 'There should have been at least one parameter for the rule to have flagged.'); + // Function expressions can't have parameter properties; those only exist in constructors. + const catchVariableOuter = catchVariableOuterWithIncorrectTypes; + const catchVariableInner = catchVariableOuter.type === utils_1.AST_NODE_TYPES.AssignmentPattern + ? catchVariableOuter.left + : catchVariableOuter; + switch (catchVariableInner.type) { + case utils_1.AST_NODE_TYPES.Identifier: { + const catchVariableTypeAnnotation = catchVariableInner.typeAnnotation; + if (catchVariableTypeAnnotation == null) { + return { + node: catchVariableOuter, + suggest: [ + { + messageId: 'addUnknownTypeAnnotationSuggestion', + fix: (fixer) => { + if (argument.type === + utils_1.AST_NODE_TYPES.ArrowFunctionExpression && + (0, util_1.isParenlessArrowFunction)(argument, context.sourceCode)) { + return [ + fixer.insertTextBefore(catchVariableInner, '('), + fixer.insertTextAfter(catchVariableInner, ': unknown)'), + ]; + } + return [ + fixer.insertTextAfter(catchVariableInner, ': unknown'), + ]; + }, + }, + ], + }; + } + return { + node: catchVariableOuter, + suggest: [ + { + messageId: 'wrongTypeAnnotationSuggestion', + fix: (fixer) => fixer.replaceText(catchVariableTypeAnnotation, ': unknown'), + }, + ], + }; + } + case utils_1.AST_NODE_TYPES.ArrayPattern: { + return { + node: catchVariableOuter, + messageId: 'useUnknownArrayDestructuringPattern', + }; + } + case utils_1.AST_NODE_TYPES.ObjectPattern: { + return { + node: catchVariableOuter, + messageId: 'useUnknownObjectDestructuringPattern', + }; + } + case utils_1.AST_NODE_TYPES.RestElement: { + const catchVariableTypeAnnotation = catchVariableInner.typeAnnotation; + if (catchVariableTypeAnnotation == null) { + return { + node: catchVariableOuter, + suggest: [ + { + messageId: 'addUnknownRestTypeAnnotationSuggestion', + fix: (fixer) => fixer.insertTextAfter(catchVariableInner, ': [unknown]'), + }, + ], + }; + } + return { + node: catchVariableOuter, + suggest: [ + { + messageId: 'wrongRestTypeAnnotationSuggestion', + fix: (fixer) => fixer.replaceText(catchVariableTypeAnnotation, ': [unknown]'), + }, + ], + }; + } + } + } + return { + CallExpression({ arguments: args, callee }) { + if (callee.type !== utils_1.AST_NODE_TYPES.MemberExpression) { + return; + } + const staticMemberAccessKey = (0, util_1.getStaticMemberAccessValue)(callee, context); + if (!staticMemberAccessKey) { + return; + } + const promiseMethodInfo = [ + { append: '', argIndexToCheck: 0, method: 'catch' }, + { append: ' rejection', argIndexToCheck: 1, method: 'then' }, + ].find(({ method }) => staticMemberAccessKey === method); + if (!promiseMethodInfo) { + return; + } + // Need to be enough args to check + const { argIndexToCheck, ...data } = promiseMethodInfo; + if (args.length < argIndexToCheck + 1) { + return; + } + // Argument to check, and all arguments before it, must be "ordinary" arguments (i.e. no spread arguments) + // promise.catch(f), promise.catch(() => {}), promise.catch(, <>) + const argsToCheck = args.slice(0, argIndexToCheck + 1); + if (argsToCheck.some(({ type }) => type === utils_1.AST_NODE_TYPES.SpreadElement)) { + return; + } + if (!tsutils.isThenableType(checker, esTreeNodeToTSNodeMap.get(callee), checker.getTypeAtLocation(esTreeNodeToTSNodeMap.get(callee.object)))) { + return; + } + // the `some` check above has already excluded `SpreadElement`, so we are safe to assert the same + const argToCheck = argsToCheck[argIndexToCheck]; + for (const node of collectFlaggedNodes(argToCheck)) { + // We are now guaranteed to report, but we have a bit of work to do + // to determine exactly where, and whether we can fix it. + const overrides = refineReportIfPossible(node); + context.report({ + node, + messageId: 'useUnknown', + data, + ...overrides, + }); + } + }, + }; + }, +}); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/assertionFunctionUtils.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/assertionFunctionUtils.d.ts new file mode 100644 index 0000000..c39c4ad --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/assertionFunctionUtils.d.ts @@ -0,0 +1,17 @@ +import type { ParserServicesWithTypeInformation, TSESTree } from '@typescript-eslint/utils'; +import * as ts from 'typescript'; +/** + * Inspect a call expression to see if it's a call to an assertion function. + * If it is, return the node of the argument that is asserted. + */ +export declare function findTruthinessAssertedArgument(services: ParserServicesWithTypeInformation, node: TSESTree.CallExpression): TSESTree.Expression | undefined; +/** + * Inspect a call expression to see if it's a call to an assertion function. + * If it is, return the node of the argument that is asserted and other useful info. + */ +export declare function findTypeGuardAssertedArgument(services: ParserServicesWithTypeInformation, node: TSESTree.CallExpression): { + argument: TSESTree.Expression; + asserts: boolean; + type: ts.Type; +} | undefined; +//# sourceMappingURL=assertionFunctionUtils.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/assertionFunctionUtils.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/assertionFunctionUtils.d.ts.map new file mode 100644 index 0000000..fd2b3ce --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/assertionFunctionUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"assertionFunctionUtils.d.ts","sourceRoot":"","sources":["../../src/util/assertionFunctionUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,iCAAiC,EAC3C,IAAI,EAAE,QAAQ,CAAC,cAAc,GAC5B,QAAQ,CAAC,UAAU,GAAG,SAAS,CAsCjC;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,iCAAiC,EAC3C,IAAI,EAAE,QAAQ,CAAC,cAAc,GAE3B;IACE,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC;CACf,GACD,SAAS,CAmDZ"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/assertionFunctionUtils.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/assertionFunctionUtils.js new file mode 100644 index 0000000..ecb97aa --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/assertionFunctionUtils.js @@ -0,0 +1,118 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.findTruthinessAssertedArgument = findTruthinessAssertedArgument; +exports.findTypeGuardAssertedArgument = findTypeGuardAssertedArgument; +const utils_1 = require("@typescript-eslint/utils"); +const ts = __importStar(require("typescript")); +/** + * Inspect a call expression to see if it's a call to an assertion function. + * If it is, return the node of the argument that is asserted. + */ +function findTruthinessAssertedArgument(services, node) { + // If the call looks like `assert(expr1, expr2, ...c, d, e, f)`, then we can + // only care if `expr1` or `expr2` is asserted, since anything that happens + // within or after a spread argument is out of scope to reason about. + const checkableArguments = []; + for (const argument of node.arguments) { + if (argument.type === utils_1.AST_NODE_TYPES.SpreadElement) { + break; + } + checkableArguments.push(argument); + } + // nothing to do + if (checkableArguments.length === 0) { + return undefined; + } + const checker = services.program.getTypeChecker(); + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + const signature = checker.getResolvedSignature(tsNode); + if (signature == null) { + return undefined; + } + const firstTypePredicateResult = checker.getTypePredicateOfSignature(signature); + if (firstTypePredicateResult == null) { + return undefined; + } + const { kind, parameterIndex, type } = firstTypePredicateResult; + if (!(kind === ts.TypePredicateKind.AssertsIdentifier && type == null)) { + return undefined; + } + return checkableArguments.at(parameterIndex); +} +/** + * Inspect a call expression to see if it's a call to an assertion function. + * If it is, return the node of the argument that is asserted and other useful info. + */ +function findTypeGuardAssertedArgument(services, node) { + // If the call looks like `assert(expr1, expr2, ...c, d, e, f)`, then we can + // only care if `expr1` or `expr2` is asserted, since anything that happens + // within or after a spread argument is out of scope to reason about. + const checkableArguments = []; + for (const argument of node.arguments) { + if (argument.type === utils_1.AST_NODE_TYPES.SpreadElement) { + break; + } + checkableArguments.push(argument); + } + // nothing to do + if (checkableArguments.length === 0) { + return undefined; + } + const checker = services.program.getTypeChecker(); + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + const callSignature = checker.getResolvedSignature(tsNode); + if (callSignature == null) { + return undefined; + } + const typePredicateInfo = checker.getTypePredicateOfSignature(callSignature); + if (typePredicateInfo == null) { + return undefined; + } + const { kind, parameterIndex, type } = typePredicateInfo; + if (!((kind === ts.TypePredicateKind.AssertsIdentifier || + kind === ts.TypePredicateKind.Identifier) && + type != null)) { + return undefined; + } + if (parameterIndex >= checkableArguments.length) { + return undefined; + } + return { + argument: checkableArguments[parameterIndex], + asserts: kind === ts.TypePredicateKind.AssertsIdentifier, + type, + }; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.d.ts new file mode 100644 index 0000000..85b7cae --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.d.ts @@ -0,0 +1,13 @@ +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; +import * as ts from 'typescript'; +export * from '@typescript-eslint/utils/ast-utils'; +/** + * Get the `loc` object of a given name in a `/*globals` comment directive. + * @param sourceCode The source code to convert index to loc. + * @param comment The `/*globals` comment directive which include the name. + * @param name The name to find. + * @returns The `loc` object. + */ +export declare function getNameLocationInGlobalDirectiveComment(sourceCode: TSESLint.SourceCode, comment: TSESTree.Comment, name: string): TSESTree.SourceLocation; +export declare function forEachReturnStatement(body: ts.Block, visitor: (stmt: ts.ReturnStatement) => T): T | undefined; +//# sourceMappingURL=astUtils.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.d.ts.map new file mode 100644 index 0000000..3fed45d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"astUtils.d.ts","sourceRoot":"","sources":["../../src/util/astUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAKjC,cAAc,oCAAoC,CAAC;AAKnD;;;;;;GAMG;AACH,wBAAgB,uCAAuC,CACrD,UAAU,EAAE,QAAQ,CAAC,UAAU,EAC/B,OAAO,EAAE,QAAQ,CAAC,OAAO,EACzB,IAAI,EAAE,MAAM,GACX,QAAQ,CAAC,cAAc,CAsBzB;AAKD,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,IAAI,EAAE,EAAE,CAAC,KAAK,EACd,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,KAAK,CAAC,GACvC,CAAC,GAAG,SAAS,CA2Bf"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js new file mode 100644 index 0000000..31065f0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js @@ -0,0 +1,97 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getNameLocationInGlobalDirectiveComment = getNameLocationInGlobalDirectiveComment; +exports.forEachReturnStatement = forEachReturnStatement; +const ts = __importStar(require("typescript")); +const escapeRegExp_1 = require("./escapeRegExp"); +// deeply re-export, for convenience +__exportStar(require("@typescript-eslint/utils/ast-utils"), exports); +// The following is copied from `eslint`'s source code since it doesn't exist in eslint@5. +// https://github.com/eslint/eslint/blob/145aec1ab9052fbca96a44d04927c595951b1536/lib/rules/utils/ast-utils.js#L1751-L1779 +// Could be export { getNameLocationInGlobalDirectiveComment } from 'eslint/lib/rules/utils/ast-utils' +/** + * Get the `loc` object of a given name in a `/*globals` comment directive. + * @param sourceCode The source code to convert index to loc. + * @param comment The `/*globals` comment directive which include the name. + * @param name The name to find. + * @returns The `loc` object. + */ +function getNameLocationInGlobalDirectiveComment(sourceCode, comment, name) { + const namePattern = new RegExp(`[\\s,]${(0, escapeRegExp_1.escapeRegExp)(name)}(?:$|[\\s,:])`, 'gu'); + // To ignore the first text "global". + namePattern.lastIndex = comment.value.indexOf('global') + 6; + // Search a given variable name. + const match = namePattern.exec(comment.value); + // Convert the index to loc. + const start = sourceCode.getLocFromIndex(comment.range[0] + '/*'.length + (match ? match.index + 1 : 0)); + const end = { + column: start.column + (match ? name.length : 1), + line: start.line, + }; + return { end, start }; +} +// Copied from typescript https://github.com/microsoft/TypeScript/blob/42b0e3c4630c129ca39ce0df9fff5f0d1b4dd348/src/compiler/utilities.ts#L1335 +// Warning: This has the same semantics as the forEach family of functions, +// in that traversal terminates in the event that 'visitor' supplies a truthy value. +function forEachReturnStatement(body, visitor) { + return traverse(body); + function traverse(node) { + switch (node.kind) { + case ts.SyntaxKind.ReturnStatement: + return visitor(node); + case ts.SyntaxKind.CaseBlock: + case ts.SyntaxKind.Block: + case ts.SyntaxKind.IfStatement: + case ts.SyntaxKind.DoStatement: + case ts.SyntaxKind.WhileStatement: + case ts.SyntaxKind.ForStatement: + case ts.SyntaxKind.ForInStatement: + case ts.SyntaxKind.ForOfStatement: + case ts.SyntaxKind.WithStatement: + case ts.SyntaxKind.SwitchStatement: + case ts.SyntaxKind.CaseClause: + case ts.SyntaxKind.DefaultClause: + case ts.SyntaxKind.LabeledStatement: + case ts.SyntaxKind.TryStatement: + case ts.SyntaxKind.CatchClause: + return ts.forEachChild(node, traverse); + } + return undefined; + } +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.d.ts new file mode 100644 index 0000000..3f6c1b4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.d.ts @@ -0,0 +1,16 @@ +import type { ScopeVariable } from '@typescript-eslint/scope-manager'; +import { TSESLint } from '@typescript-eslint/utils'; +interface VariableAnalysis { + readonly unusedVariables: ReadonlySet; + readonly usedVariables: ReadonlySet; +} +/** + * Collects the set of unused variables for a given context. + * + * Due to complexity, this does not take into consideration: + * - variables within declaration files + * - variables within ambient module declarations + */ +export declare function collectVariables(context: Readonly>): VariableAnalysis; +export {}; +//# sourceMappingURL=collectUnusedVariables.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.d.ts.map new file mode 100644 index 0000000..97c0aa3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"collectUnusedVariables.d.ts","sourceRoot":"","sources":["../../src/util/collectUnusedVariables.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,aAAa,EACd,MAAM,kCAAkC,CAAC;AAQ1C,OAAO,EAIL,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAKlC,UAAU,gBAAgB;IACxB,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;IACrD,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;CACpD;AAixBD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,SAAS,MAAM,EACzB,OAAO,SAAS,SAAS,OAAO,EAAE,EAElC,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,GAC3D,gBAAgB,CAQlB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.js new file mode 100644 index 0000000..6eb9bfe --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.js @@ -0,0 +1,602 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.collectVariables = collectVariables; +const scope_manager_1 = require("@typescript-eslint/scope-manager"); +const utils_1 = require("@typescript-eslint/utils"); +const isTypeImport_1 = require("./isTypeImport"); +const referenceContainsTypeQuery_1 = require("./referenceContainsTypeQuery"); +/** + * This class leverages an AST visitor to mark variables as used via the + * `eslintUsed` property. + */ +class UnusedVarsVisitor extends scope_manager_1.Visitor { + /** + * We keep a weak cache so that multiple rules can share the calculation + */ + static RESULTS_CACHE = new WeakMap(); + ClassDeclaration = this.visitClass; + ClassExpression = this.visitClass; + ForInStatement = this.visitForInForOf; + ForOfStatement = this.visitForInForOf; + //#region HELPERS + FunctionDeclaration = this.visitFunction; + FunctionExpression = this.visitFunction; + MethodDefinition = this.visitSetter; + Property = this.visitSetter; + TSCallSignatureDeclaration = this.visitFunctionTypeSignature; + TSConstructorType = this.visitFunctionTypeSignature; + TSConstructSignatureDeclaration = this.visitFunctionTypeSignature; + TSDeclareFunction = this.visitFunctionTypeSignature; + TSEmptyBodyFunctionExpression = this.visitFunctionTypeSignature; + //#endregion HELPERS + //#region VISITORS + // NOTE - This is a simple visitor - meaning it does not support selectors + TSFunctionType = this.visitFunctionTypeSignature; + TSMethodSignature = this.visitFunctionTypeSignature; + #scopeManager; + constructor(scopeManager) { + super({ + visitChildrenEvenIfSelectorExists: true, + }); + this.#scopeManager = scopeManager; + } + static collectUnusedVariables(program, scopeManager) { + const cached = this.RESULTS_CACHE.get(program); + if (cached) { + return cached; + } + const visitor = new this(scopeManager); + visitor.visit(program); + const unusedVars = visitor.collectUnusedVariables(visitor.getScope(program)); + this.RESULTS_CACHE.set(program, unusedVars); + return unusedVars; + } + Identifier(node) { + const scope = this.getScope(node); + if (scope.type === utils_1.TSESLint.Scope.ScopeType.function && + node.name === 'this' && + // this parameters should always be considered used as they're pseudo-parameters + 'params' in scope.block && + scope.block.params.includes(node)) { + this.markVariableAsUsed(node); + } + } + TSEnumDeclaration(node) { + // enum members create variables because they can be referenced within the enum, + // but they obviously aren't unused variables for the purposes of this rule. + const scope = this.getScope(node); + for (const variable of scope.variables) { + this.markVariableAsUsed(variable); + } + } + TSMappedType(node) { + // mapped types create a variable for their type name, but it's not necessary to reference it, + // so we shouldn't consider it as unused for the purpose of this rule. + this.markVariableAsUsed(node.key); + } + TSModuleDeclaration(node) { + // -- global augmentation can be in any file, and they do not need exports + if (node.kind === 'global') { + this.markVariableAsUsed('global', node.parent); + } + } + TSParameterProperty(node) { + let identifier = null; + switch (node.parameter.type) { + case utils_1.AST_NODE_TYPES.AssignmentPattern: + if (node.parameter.left.type === utils_1.AST_NODE_TYPES.Identifier) { + identifier = node.parameter.left; + } + break; + case utils_1.AST_NODE_TYPES.Identifier: + identifier = node.parameter; + break; + } + if (identifier) { + this.markVariableAsUsed(identifier); + } + } + collectUnusedVariables(scope, variables = { + unusedVariables: new Set(), + usedVariables: new Set(), + }) { + if ( + // skip function expression names + // this scope is created just to house the variable that allows a function + // expression to self-reference if it has a name defined + !scope.functionExpressionScope) { + for (const variable of scope.variables) { + // cases that we don't want to treat as used or unused + if ( + // implicit lib variables (from @typescript-eslint/scope-manager) + // these aren't variables that should be checked ever + variable instanceof scope_manager_1.ImplicitLibVariable) { + continue; + } + if ( + // variables marked with markVariableAsUsed() + variable.eslintUsed || + // basic exported variables + isExported(variable) || + // variables implicitly exported via a merged declaration + isMergableExported(variable) || + // used variables + isUsedVariable(variable)) { + variables.usedVariables.add(variable); + } + else { + variables.unusedVariables.add(variable); + } + } + } + for (const childScope of scope.childScopes) { + this.collectUnusedVariables(childScope, variables); + } + return variables; + } + getScope(currentNode) { + // On Program node, get the outermost scope to avoid return Node.js special function scope or ES modules scope. + const inner = currentNode.type !== utils_1.AST_NODE_TYPES.Program; + let node = currentNode; + while (node) { + const scope = this.#scopeManager.acquire(node, inner); + if (scope) { + if (scope.type === scope_manager_1.ScopeType.functionExpressionName) { + return scope.childScopes[0]; + } + return scope; + } + node = node.parent; + } + return this.#scopeManager.scopes[0]; + } + markVariableAsUsed(variableOrIdentifierOrName, parent) { + if (typeof variableOrIdentifierOrName !== 'string' && + !('type' in variableOrIdentifierOrName)) { + variableOrIdentifierOrName.eslintUsed = true; + return; + } + let name; + let node; + if (typeof variableOrIdentifierOrName === 'string') { + name = variableOrIdentifierOrName; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + node = parent; + } + else { + name = variableOrIdentifierOrName.name; + node = variableOrIdentifierOrName; + } + let currentScope = this.getScope(node); + while (currentScope) { + const variable = currentScope.variables.find(scopeVar => scopeVar.name === name); + if (variable) { + variable.eslintUsed = true; + return; + } + currentScope = currentScope.upper; + } + } + visitClass(node) { + // skip a variable of class itself name in the class scope + const scope = this.getScope(node); + for (const variable of scope.variables) { + if (variable.identifiers[0] === scope.block.id) { + this.markVariableAsUsed(variable); + return; + } + } + } + visitForInForOf(node) { + /** + * (Brad Zacher): I hate that this has to exist. + * But it is required for compat with the base ESLint rule. + * + * In 2015, ESLint decided to add an exception for these two specific cases + * ``` + * for (var key in object) return; + * + * var key; + * for (key in object) return; + * ``` + * + * I disagree with it, but what are you going to do... + * + * https://github.com/eslint/eslint/issues/2342 + */ + let idOrVariable; + if (node.left.type === utils_1.AST_NODE_TYPES.VariableDeclaration) { + const variable = this.#scopeManager.getDeclaredVariables(node.left).at(0); + if (!variable) { + return; + } + idOrVariable = variable; + } + if (node.left.type === utils_1.AST_NODE_TYPES.Identifier) { + idOrVariable = node.left; + } + if (idOrVariable == null) { + return; + } + let body = node.body; + if (node.body.type === utils_1.AST_NODE_TYPES.BlockStatement) { + if (node.body.body.length !== 1) { + return; + } + body = node.body.body[0]; + } + if (body.type !== utils_1.AST_NODE_TYPES.ReturnStatement) { + return; + } + this.markVariableAsUsed(idOrVariable); + } + visitFunction(node) { + const scope = this.getScope(node); + // skip implicit "arguments" variable + const variable = scope.set.get('arguments'); + if (variable?.defs.length === 0) { + this.markVariableAsUsed(variable); + } + } + visitFunctionTypeSignature(node) { + // function type signature params create variables because they can be referenced within the signature, + // but they obviously aren't unused variables for the purposes of this rule. + for (const param of node.params) { + this.visitPattern(param, name => { + this.markVariableAsUsed(name); + }); + } + } + visitSetter(node) { + if (node.kind === 'set') { + // ignore setter parameters because they're syntactically required to exist + for (const param of node.value.params) { + this.visitPattern(param, id => { + this.markVariableAsUsed(id); + }); + } + } + } +} +//#region private helpers +/** + * Checks the position of given nodes. + * @param inner A node which is expected as inside. + * @param outer A node which is expected as outside. + * @returns `true` if the `inner` node exists in the `outer` node. + */ +function isInside(inner, outer) { + return inner.range[0] >= outer.range[0] && inner.range[1] <= outer.range[1]; +} +/** + * Determine if an identifier is referencing an enclosing name. + * This only applies to declarations that create their own scope (modules, functions, classes) + * @param ref The reference to check. + * @param nodes The candidate function nodes. + * @returns True if it's a self-reference, false if not. + */ +function isSelfReference(ref, nodes) { + let scope = ref.from; + while (scope) { + if (nodes.has(scope.block)) { + return true; + } + scope = scope.upper; + } + return false; +} +const MERGABLE_TYPES = new Set([ + utils_1.AST_NODE_TYPES.ClassDeclaration, + utils_1.AST_NODE_TYPES.FunctionDeclaration, + utils_1.AST_NODE_TYPES.TSInterfaceDeclaration, + utils_1.AST_NODE_TYPES.TSModuleDeclaration, + utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration, +]); +/** + * Determine if the variable is directly exported + * @param variable the variable to check + */ +function isMergableExported(variable) { + // If all of the merged things are of the same type, TS will error if not all of them are exported - so we only need to find one + for (const def of variable.defs) { + // parameters can never be exported. + // their `node` prop points to the function decl, which can be exported + // so we need to special case them + if (def.type === utils_1.TSESLint.Scope.DefinitionType.Parameter) { + continue; + } + if ((MERGABLE_TYPES.has(def.node.type) && + def.node.parent.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration) || + def.node.parent.type === utils_1.AST_NODE_TYPES.ExportDefaultDeclaration) { + return true; + } + } + return false; +} +/** + * Determines if a given variable is being exported from a module. + * @param variable eslint-scope variable object. + * @returns True if the variable is exported, false if not. + */ +function isExported(variable) { + return variable.defs.some(definition => { + let node = definition.node; + if (node.type === utils_1.AST_NODE_TYPES.VariableDeclarator) { + node = node.parent; + } + else if (definition.type === utils_1.TSESLint.Scope.DefinitionType.Parameter) { + return false; + } + return node.parent.type.startsWith('Export'); + }); +} +const LOGICAL_ASSIGNMENT_OPERATORS = new Set(['??=', '&&=', '||=']); +/** + * Determines if the variable is used. + * @param variable The variable to check. + * @returns True if the variable is used + */ +function isUsedVariable(variable) { + /** + * Gets a list of function definitions for a specified variable. + * @param variable eslint-scope variable object. + * @returns Function nodes. + */ + function getFunctionDefinitions(variable) { + const functionDefinitions = new Set(); + variable.defs.forEach(def => { + // FunctionDeclarations + if (def.type === utils_1.TSESLint.Scope.DefinitionType.FunctionName) { + functionDefinitions.add(def.node); + } + // FunctionExpressions + if (def.type === utils_1.TSESLint.Scope.DefinitionType.Variable && + (def.node.init?.type === utils_1.AST_NODE_TYPES.FunctionExpression || + def.node.init?.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression)) { + functionDefinitions.add(def.node.init); + } + }); + return functionDefinitions; + } + function getTypeDeclarations(variable) { + const nodes = new Set(); + variable.defs.forEach(def => { + if (def.node.type === utils_1.AST_NODE_TYPES.TSInterfaceDeclaration || + def.node.type === utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration) { + nodes.add(def.node); + } + }); + return nodes; + } + function getModuleDeclarations(variable) { + const nodes = new Set(); + variable.defs.forEach(def => { + if (def.node.type === utils_1.AST_NODE_TYPES.TSModuleDeclaration) { + nodes.add(def.node); + } + }); + return nodes; + } + function getEnumDeclarations(variable) { + const nodes = new Set(); + variable.defs.forEach(def => { + if (def.node.type === utils_1.AST_NODE_TYPES.TSEnumDeclaration) { + nodes.add(def.node); + } + }); + return nodes; + } + /** + * Checks if the ref is contained within one of the given nodes + */ + function isInsideOneOf(ref, nodes) { + for (const node of nodes) { + if (isInside(ref.identifier, node)) { + return true; + } + } + return false; + } + /** + * Checks whether a given node is unused expression or not. + * @param node The node itself + * @returns The node is an unused expression. + */ + function isUnusedExpression(node) { + const parent = node.parent; + if (parent.type === utils_1.AST_NODE_TYPES.ExpressionStatement) { + return true; + } + if (parent.type === utils_1.AST_NODE_TYPES.SequenceExpression) { + const isLastExpression = parent.expressions[parent.expressions.length - 1] === node; + if (!isLastExpression) { + return true; + } + return isUnusedExpression(parent); + } + return false; + } + /** + * If a given reference is left-hand side of an assignment, this gets + * the right-hand side node of the assignment. + * + * In the following cases, this returns null. + * + * - The reference is not the LHS of an assignment expression. + * - The reference is inside of a loop. + * - The reference is inside of a function scope which is different from + * the declaration. + * @param ref A reference to check. + * @param prevRhsNode The previous RHS node. + * @returns The RHS node or null. + */ + function getRhsNode(ref, prevRhsNode) { + /** + * Checks whether the given node is in a loop or not. + * @param node The node to check. + * @returns `true` if the node is in a loop. + */ + function isInLoop(node) { + let currentNode = node; + while (currentNode) { + if (utils_1.ASTUtils.isFunction(currentNode)) { + break; + } + if (utils_1.ASTUtils.isLoop(currentNode)) { + return true; + } + currentNode = currentNode.parent; + } + return false; + } + const id = ref.identifier; + const parent = id.parent; + const refScope = ref.from.variableScope; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const varScope = ref.resolved.scope.variableScope; + const canBeUsedLater = refScope !== varScope || isInLoop(id); + /* + * Inherits the previous node if this reference is in the node. + * This is for `a = a + a`-like code. + */ + if (prevRhsNode && isInside(id, prevRhsNode)) { + return prevRhsNode; + } + if (parent.type === utils_1.AST_NODE_TYPES.AssignmentExpression && + isUnusedExpression(parent) && + id === parent.left && + !canBeUsedLater) { + return parent.right; + } + return null; + } + /** + * Checks whether a given reference is a read to update itself or not. + * @param ref A reference to check. + * @param rhsNode The RHS node of the previous assignment. + * @returns The reference is a read to update itself. + */ + function isReadForItself(ref, rhsNode) { + /** + * Checks whether a given Identifier node exists inside of a function node which can be used later. + * + * "can be used later" means: + * - the function is assigned to a variable. + * - the function is bound to a property and the object can be used later. + * - the function is bound as an argument of a function call. + * + * If a reference exists in a function which can be used later, the reference is read when the function is called. + * @param id An Identifier node to check. + * @param rhsNode The RHS node of the previous assignment. + * @returns `true` if the `id` node exists inside of a function node which can be used later. + */ + function isInsideOfStorableFunction(id, rhsNode) { + /** + * Finds a function node from ancestors of a node. + * @param node A start node to find. + * @returns A found function node. + */ + function getUpperFunction(node) { + let currentNode = node; + while (currentNode) { + if (utils_1.ASTUtils.isFunction(currentNode)) { + return currentNode; + } + currentNode = currentNode.parent; + } + return null; + } + /** + * Checks whether a given function node is stored to somewhere or not. + * If the function node is stored, the function can be used later. + * @param funcNode A function node to check. + * @param rhsNode The RHS node of the previous assignment. + * @returns `true` if under the following conditions: + * - the funcNode is assigned to a variable. + * - the funcNode is bound as an argument of a function call. + * - the function is bound to a property and the object satisfies above conditions. + */ + function isStorableFunction(funcNode, rhsNode) { + let node = funcNode; + let parent = funcNode.parent; + while (parent && isInside(parent, rhsNode)) { + switch (parent.type) { + case utils_1.AST_NODE_TYPES.SequenceExpression: + if (parent.expressions[parent.expressions.length - 1] !== node) { + return false; + } + break; + case utils_1.AST_NODE_TYPES.CallExpression: + case utils_1.AST_NODE_TYPES.NewExpression: + return parent.callee !== node; + case utils_1.AST_NODE_TYPES.AssignmentExpression: + case utils_1.AST_NODE_TYPES.TaggedTemplateExpression: + case utils_1.AST_NODE_TYPES.YieldExpression: + return true; + default: + if (parent.type.endsWith('Statement') || + parent.type.endsWith('Declaration')) { + /* + * If it encountered statements, this is a complex pattern. + * Since analyzing complex patterns is hard, this returns `true` to avoid false positive. + */ + return true; + } + } + node = parent; + parent = parent.parent; + } + return false; + } + const funcNode = getUpperFunction(id); + return (!!funcNode && + isInside(funcNode, rhsNode) && + isStorableFunction(funcNode, rhsNode)); + } + const id = ref.identifier; + const parent = id.parent; + return (ref.isRead() && // in RHS of an assignment for itself. e.g. `a = a + 1` + // self update. e.g. `a += 1`, `a++` + ((parent.type === utils_1.AST_NODE_TYPES.AssignmentExpression && + !LOGICAL_ASSIGNMENT_OPERATORS.has(parent.operator) && + isUnusedExpression(parent) && + parent.left === id) || + (parent.type === utils_1.AST_NODE_TYPES.UpdateExpression && + isUnusedExpression(parent)) || + (!!rhsNode && + isInside(id, rhsNode) && + !isInsideOfStorableFunction(id, rhsNode)))); + } + const functionNodes = getFunctionDefinitions(variable); + const isFunctionDefinition = functionNodes.size > 0; + const typeDeclNodes = getTypeDeclarations(variable); + const isTypeDecl = typeDeclNodes.size > 0; + const moduleDeclNodes = getModuleDeclarations(variable); + const isModuleDecl = moduleDeclNodes.size > 0; + const enumDeclNodes = getEnumDeclarations(variable); + const isEnumDecl = enumDeclNodes.size > 0; + const isImportedAsType = variable.defs.every(isTypeImport_1.isTypeImport); + let rhsNode = null; + return variable.references.some(ref => { + const forItself = isReadForItself(ref, rhsNode); + rhsNode = getRhsNode(ref, rhsNode); + return (ref.isRead() && + !forItself && + !(!isImportedAsType && (0, referenceContainsTypeQuery_1.referenceContainsTypeQuery)(ref.identifier)) && + !(isFunctionDefinition && isSelfReference(ref, functionNodes)) && + !(isTypeDecl && isInsideOneOf(ref, typeDeclNodes)) && + !(isModuleDecl && isSelfReference(ref, moduleDeclNodes)) && + !(isEnumDecl && isSelfReference(ref, enumDeclNodes))); + }); +} +//#endregion private helpers +/** + * Collects the set of unused variables for a given context. + * + * Due to complexity, this does not take into consideration: + * - variables within declaration files + * - variables within ambient module declarations + */ +function collectVariables(context) { + return UnusedVarsVisitor.collectUnusedVariables(context.sourceCode.ast, utils_1.ESLintUtils.nullThrows(context.sourceCode.scopeManager, 'Missing required scope manager')); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.d.ts new file mode 100644 index 0000000..c3c6c1e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.d.ts @@ -0,0 +1,4 @@ +import { ESLintUtils } from '@typescript-eslint/utils'; +import type { ESLintPluginDocs } from '../../rules'; +export declare const createRule: ({ meta, name, ...rule }: Readonly>) => ESLintUtils.RuleModule; +//# sourceMappingURL=createRule.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.d.ts.map new file mode 100644 index 0000000..cd1e578 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createRule.d.ts","sourceRoot":"","sources":["../../src/util/createRule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,eAAO,MAAM,UAAU,uQAEtB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js new file mode 100644 index 0000000..0a474f8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createRule = void 0; +const utils_1 = require("@typescript-eslint/utils"); +exports.createRule = utils_1.ESLintUtils.RuleCreator(name => `https://typescript-eslint.io/rules/${name}`); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/escapeRegExp.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/escapeRegExp.d.ts new file mode 100644 index 0000000..653ce28 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/escapeRegExp.d.ts @@ -0,0 +1,2 @@ +export declare function escapeRegExp(string?: string): string; +//# sourceMappingURL=escapeRegExp.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/escapeRegExp.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/escapeRegExp.d.ts.map new file mode 100644 index 0000000..c838ca5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/escapeRegExp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"escapeRegExp.d.ts","sourceRoot":"","sources":["../../src/util/escapeRegExp.ts"],"names":[],"mappings":"AAOA,wBAAgB,YAAY,CAAC,MAAM,SAAK,GAAG,MAAM,CAIhD"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/escapeRegExp.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/escapeRegExp.js new file mode 100644 index 0000000..96521da --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/escapeRegExp.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.escapeRegExp = escapeRegExp; +/** + * Lodash + * Released under MIT license + */ +const reRegExpChar = /[\\^$.*+?()[\]{}|]/g; +const reHasRegExpChar = RegExp(reRegExpChar.source); +function escapeRegExp(string = '') { + return string && reHasRegExpChar.test(string) + ? string.replaceAll(reRegExpChar, '\\$&') + : string; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.d.ts new file mode 100644 index 0000000..894b872 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.d.ts @@ -0,0 +1,48 @@ +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; +export type FunctionExpression = TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression; +export type FunctionNode = FunctionExpression | TSESTree.FunctionDeclaration; +export interface FunctionInfo { + node: T; + returns: TSESTree.ReturnStatement[]; +} +/** + * Checks if a function belongs to: + * ``` + * () => () => ... + * () => function () { ... } + * () => { return () => ... } + * () => { return function () { ... } } + * function fn() { return () => ... } + * function fn() { return function() { ... } } + * ``` + */ +export declare function doesImmediatelyReturnFunctionExpression({ node, returns, }: FunctionInfo): boolean; +interface Options { + allowDirectConstAssertionInArrowFunctions?: boolean; + allowExpressions?: boolean; + allowHigherOrderFunctions?: boolean; + allowTypedFunctionExpressions?: boolean; +} +/** + * True when the provided function expression is typed. + */ +export declare function isTypedFunctionExpression(node: FunctionExpression, options: Options): boolean; +/** + * Check whether the function expression return type is either typed or valid + * with the provided options. + */ +export declare function isValidFunctionExpressionReturnType(node: FunctionExpression, options: Options): boolean; +/** + * Checks if a function declaration/expression has a return type. + */ +export declare function checkFunctionReturnType({ node, returns }: FunctionInfo, options: Options, sourceCode: TSESLint.SourceCode, report: (loc: TSESTree.SourceLocation) => void): void; +/** + * Checks if a function declaration/expression has a return type. + */ +export declare function checkFunctionExpressionReturnType(info: FunctionInfo, options: Options, sourceCode: TSESLint.SourceCode, report: (loc: TSESTree.SourceLocation) => void): void; +/** + * Check whether any ancestor of the provided function has a valid return type. + */ +export declare function ancestorHasReturnType(node: FunctionNode): boolean; +export {}; +//# sourceMappingURL=explicitReturnTypeUtils.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.d.ts.map new file mode 100644 index 0000000..5e82fd3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"explicitReturnTypeUtils.d.ts","sourceRoot":"","sources":["../../src/util/explicitReturnTypeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAOnE,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,CAAC,uBAAuB,GAChC,QAAQ,CAAC,kBAAkB,CAAC;AAChC,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAE7E,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,YAAY;IAClD,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,EAAE,QAAQ,CAAC,eAAe,EAAE,CAAC;CACrC;AA6HD;;;;;;;;;;GAUG;AACH,wBAAgB,uCAAuC,CAAC,EACtD,IAAI,EACJ,OAAO,GACR,EAAE,YAAY,CAAC,YAAY,CAAC,GAAG,OAAO,CAetC;AAyBD,UAAU,OAAO;IACf,yCAAyC,CAAC,EAAE,OAAO,CAAC;IACpD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,6BAA6B,CAAC,EAAE,OAAO,CAAC;CACzC;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,kBAAkB,EACxB,OAAO,EAAE,OAAO,GACf,OAAO,CAUT;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,CACjD,IAAI,EAAE,kBAAkB,EACxB,OAAO,EAAE,OAAO,GACf,OAAO,CA6BT;AAuBD;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,YAAY,CAAC,YAAY,CAAC,EAC7C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,QAAQ,CAAC,UAAU,EAC/B,MAAM,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,cAAc,KAAK,IAAI,GAC7C,IAAI,CAMN;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,YAAY,CAAC,kBAAkB,CAAC,EACtC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,QAAQ,CAAC,UAAU,EAC/B,MAAM,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,cAAc,KAAK,IAAI,GAC7C,IAAI,CAMN;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAyCjE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.js new file mode 100644 index 0000000..b3d88bb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.js @@ -0,0 +1,238 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.doesImmediatelyReturnFunctionExpression = doesImmediatelyReturnFunctionExpression; +exports.isTypedFunctionExpression = isTypedFunctionExpression; +exports.isValidFunctionExpressionReturnType = isValidFunctionExpressionReturnType; +exports.checkFunctionReturnType = checkFunctionReturnType; +exports.checkFunctionExpressionReturnType = checkFunctionExpressionReturnType; +exports.ancestorHasReturnType = ancestorHasReturnType; +const utils_1 = require("@typescript-eslint/utils"); +const astUtils_1 = require("./astUtils"); +const getFunctionHeadLoc_1 = require("./getFunctionHeadLoc"); +/** + * Checks if a node is a variable declarator with a type annotation. + * ``` + * const x: Foo = ... + * ``` + */ +function isVariableDeclaratorWithTypeAnnotation(node) { + return (node.type === utils_1.AST_NODE_TYPES.VariableDeclarator && !!node.id.typeAnnotation); +} +/** + * Checks if a node is a class property with a type annotation. + * ``` + * public x: Foo = ... + * ``` + */ +function isPropertyDefinitionWithTypeAnnotation(node) { + return (node.type === utils_1.AST_NODE_TYPES.PropertyDefinition && !!node.typeAnnotation); +} +/** + * Checks if a node belongs to: + * ``` + * foo(() => 1) + * ``` + */ +function isFunctionArgument(parent, callee) { + return (parent.type === utils_1.AST_NODE_TYPES.CallExpression && + // make sure this isn't an IIFE + parent.callee !== callee); +} +/** + * Checks if a node is type-constrained in JSX + * ``` + * {}} /> + * {() => {}} + * + * ``` + */ +function isTypedJSX(node) { + return (node.type === utils_1.AST_NODE_TYPES.JSXExpressionContainer || + node.type === utils_1.AST_NODE_TYPES.JSXSpreadAttribute); +} +function isTypedParent(parent, callee) { + return ((0, astUtils_1.isTypeAssertion)(parent) || + isVariableDeclaratorWithTypeAnnotation(parent) || + isDefaultFunctionParameterWithTypeAnnotation(parent) || + isPropertyDefinitionWithTypeAnnotation(parent) || + isFunctionArgument(parent, callee) || + isTypedJSX(parent)); +} +function isDefaultFunctionParameterWithTypeAnnotation(node) { + return (node.type === utils_1.AST_NODE_TYPES.AssignmentPattern && + node.left.typeAnnotation != null); +} +/** + * Checks if a node belongs to: + * ``` + * new Foo(() => {}) + * ^^^^^^^^ + * ``` + */ +function isConstructorArgument(node) { + return node.type === utils_1.AST_NODE_TYPES.NewExpression; +} +/** + * Checks if a node is a property or a nested property of a typed object: + * ``` + * const x: Foo = { prop: () => {} } + * const x = { prop: () => {} } as Foo + * const x = { prop: () => {} } + * const x: Foo = { bar: { prop: () => {} } } + * ``` + */ +function isPropertyOfObjectWithType(property) { + if (!property || property.type !== utils_1.AST_NODE_TYPES.Property) { + return false; + } + const objectExpr = property.parent; + if (objectExpr.type !== utils_1.AST_NODE_TYPES.ObjectExpression) { + return false; + } + const parent = objectExpr.parent; + return isTypedParent(parent) || isPropertyOfObjectWithType(parent); +} +/** + * Checks if a function belongs to: + * ``` + * () => () => ... + * () => function () { ... } + * () => { return () => ... } + * () => { return function () { ... } } + * function fn() { return () => ... } + * function fn() { return function() { ... } } + * ``` + */ +function doesImmediatelyReturnFunctionExpression({ node, returns, }) { + if (node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression && + utils_1.ASTUtils.isFunction(node.body)) { + return true; + } + if (returns.length === 0) { + return false; + } + return returns.every(node => node.argument && utils_1.ASTUtils.isFunction(node.argument)); +} +/** + * Checks if a function belongs to: + * ``` + * ({ action: 'xxx' } as const) + * ``` + */ +function isConstAssertion(node) { + if ((0, astUtils_1.isTypeAssertion)(node)) { + const { typeAnnotation } = node; + if (typeAnnotation.type === utils_1.AST_NODE_TYPES.TSTypeReference) { + const { typeName } = typeAnnotation; + if (typeName.type === utils_1.AST_NODE_TYPES.Identifier && + typeName.name === 'const') { + return true; + } + } + } + return false; +} +/** + * True when the provided function expression is typed. + */ +function isTypedFunctionExpression(node, options) { + if (!options.allowTypedFunctionExpressions) { + return false; + } + return (isTypedParent(node.parent, node) || + isPropertyOfObjectWithType(node.parent) || + isConstructorArgument(node.parent)); +} +/** + * Check whether the function expression return type is either typed or valid + * with the provided options. + */ +function isValidFunctionExpressionReturnType(node, options) { + if (isTypedFunctionExpression(node, options)) { + return true; + } + if (options.allowExpressions && + node.parent.type !== utils_1.AST_NODE_TYPES.VariableDeclarator && + node.parent.type !== utils_1.AST_NODE_TYPES.MethodDefinition && + node.parent.type !== utils_1.AST_NODE_TYPES.ExportDefaultDeclaration && + node.parent.type !== utils_1.AST_NODE_TYPES.PropertyDefinition) { + return true; + } + // https://github.com/typescript-eslint/typescript-eslint/issues/653 + if (!options.allowDirectConstAssertionInArrowFunctions || + node.type !== utils_1.AST_NODE_TYPES.ArrowFunctionExpression) { + return false; + } + let body = node.body; + while (body.type === utils_1.AST_NODE_TYPES.TSSatisfiesExpression) { + body = body.expression; + } + return isConstAssertion(body); +} +/** + * Check that the function expression or declaration is valid. + */ +function isValidFunctionReturnType({ node, returns }, options) { + if (options.allowHigherOrderFunctions && + doesImmediatelyReturnFunctionExpression({ node, returns })) { + return true; + } + return (node.returnType != null || + (0, astUtils_1.isConstructor)(node.parent) || + (0, astUtils_1.isSetter)(node.parent)); +} +/** + * Checks if a function declaration/expression has a return type. + */ +function checkFunctionReturnType({ node, returns }, options, sourceCode, report) { + if (isValidFunctionReturnType({ node, returns }, options)) { + return; + } + report((0, getFunctionHeadLoc_1.getFunctionHeadLoc)(node, sourceCode)); +} +/** + * Checks if a function declaration/expression has a return type. + */ +function checkFunctionExpressionReturnType(info, options, sourceCode, report) { + if (isValidFunctionExpressionReturnType(info.node, options)) { + return; + } + checkFunctionReturnType(info, options, sourceCode, report); +} +/** + * Check whether any ancestor of the provided function has a valid return type. + */ +function ancestorHasReturnType(node) { + let ancestor = node.parent; + if (ancestor.type === utils_1.AST_NODE_TYPES.Property) { + ancestor = ancestor.value; + } + // if the ancestor is not a return, then this function was not returned at all, so we can exit early + const isReturnStatement = ancestor.type === utils_1.AST_NODE_TYPES.ReturnStatement; + const isBodylessArrow = ancestor.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression && + ancestor.body.type !== utils_1.AST_NODE_TYPES.BlockStatement; + if (!isReturnStatement && !isBodylessArrow) { + return false; + } + while (ancestor) { + switch (ancestor.type) { + case utils_1.AST_NODE_TYPES.ArrowFunctionExpression: + case utils_1.AST_NODE_TYPES.FunctionExpression: + case utils_1.AST_NODE_TYPES.FunctionDeclaration: + if (ancestor.returnType) { + return true; + } + break; + // const x: Foo = () => {}; + // Assume that a typed variable types the function expression + case utils_1.AST_NODE_TYPES.VariableDeclarator: + return !!ancestor.id.typeAnnotation; + case utils_1.AST_NODE_TYPES.PropertyDefinition: + return !!ancestor.typeAnnotation; + case utils_1.AST_NODE_TYPES.ExpressionStatement: + return false; + } + ancestor = ancestor.parent; + } + return false; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getConstraintInfo.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getConstraintInfo.d.ts new file mode 100644 index 0000000..25f1560 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getConstraintInfo.d.ts @@ -0,0 +1,36 @@ +import type * as ts from 'typescript'; +export interface ConstraintTypeInfoUnconstrained { + constraintType: undefined; + isTypeParameter: true; +} +export interface ConstraintTypeInfoConstrained { + constraintType: ts.Type; + isTypeParameter: true; +} +export interface ConstraintTypeInfoNonGeneric { + constraintType: ts.Type; + isTypeParameter: false; +} +export type ConstraintTypeInfo = ConstraintTypeInfoConstrained | ConstraintTypeInfoNonGeneric | ConstraintTypeInfoUnconstrained; +/** + * Returns whether the type is a generic and what its constraint is. + * + * If the type is not a generic, `isTypeParameter` will be `false`, and + * `constraintType` will be the same as the input type. + * + * If the type is a generic, and it is constrained, `isTypeParameter` will be + * `true`, and `constraintType` will be the constraint type. + * + * If the type is a generic, but it is not constrained, `constraintType` will be + * `undefined` (rather than an `unknown` type), due to https://github.com/microsoft/TypeScript/issues/60475 + * + * Successor to {@link getConstrainedTypeAtLocation} due to https://github.com/typescript-eslint/typescript-eslint/issues/10438 + * + * This is considered internal since it is unstable for now and may have breaking changes at any time. + * Use at your own risk. + * + * @internal + * + */ +export declare function getConstraintInfo(checker: ts.TypeChecker, type: ts.Type): ConstraintTypeInfo; +//# sourceMappingURL=getConstraintInfo.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getConstraintInfo.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getConstraintInfo.d.ts.map new file mode 100644 index 0000000..7b37dcb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getConstraintInfo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getConstraintInfo.d.ts","sourceRoot":"","sources":["../../src/util/getConstraintInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAItC,MAAM,WAAW,+BAA+B;IAC9C,cAAc,EAAE,SAAS,CAAC;IAC1B,eAAe,EAAE,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,6BAA6B;IAC5C,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC;IACxB,eAAe,EAAE,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,4BAA4B;IAC3C,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC;IACxB,eAAe,EAAE,KAAK,CAAC;CACxB;AAED,MAAM,MAAM,kBAAkB,GAC1B,6BAA6B,GAC7B,4BAA4B,GAC5B,+BAA+B,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,kBAAkB,CAYpB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getConstraintInfo.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getConstraintInfo.js new file mode 100644 index 0000000..56e400a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getConstraintInfo.js @@ -0,0 +1,70 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getConstraintInfo = getConstraintInfo; +const tsutils = __importStar(require("ts-api-utils")); +/** + * Returns whether the type is a generic and what its constraint is. + * + * If the type is not a generic, `isTypeParameter` will be `false`, and + * `constraintType` will be the same as the input type. + * + * If the type is a generic, and it is constrained, `isTypeParameter` will be + * `true`, and `constraintType` will be the constraint type. + * + * If the type is a generic, but it is not constrained, `constraintType` will be + * `undefined` (rather than an `unknown` type), due to https://github.com/microsoft/TypeScript/issues/60475 + * + * Successor to {@link getConstrainedTypeAtLocation} due to https://github.com/typescript-eslint/typescript-eslint/issues/10438 + * + * This is considered internal since it is unstable for now and may have breaking changes at any time. + * Use at your own risk. + * + * @internal + * + */ +function getConstraintInfo(checker, type) { + if (tsutils.isTypeParameter(type)) { + const constraintType = checker.getBaseConstraintOfType(type); + return { + constraintType, + isTypeParameter: true, + }; + } + return { + constraintType: type, + isTypeParameter: false, + }; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.d.ts new file mode 100644 index 0000000..17da491 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.d.ts @@ -0,0 +1,28 @@ +interface RuleMap { + 'arrow-parens': typeof import('eslint/lib/rules/arrow-parens'); + 'consistent-return': typeof import('eslint/lib/rules/consistent-return'); + 'dot-notation': typeof import('eslint/lib/rules/dot-notation'); + 'init-declarations': typeof import('eslint/lib/rules/init-declarations'); + 'max-params': typeof import('eslint/lib/rules/max-params'); + 'no-dupe-args': typeof import('eslint/lib/rules/no-dupe-args'); + 'no-dupe-class-members': typeof import('eslint/lib/rules/no-dupe-class-members'); + 'no-empty-function': typeof import('eslint/lib/rules/no-empty-function'); + 'no-implicit-globals': typeof import('eslint/lib/rules/no-implicit-globals'); + 'no-invalid-this': typeof import('eslint/lib/rules/no-invalid-this'); + 'no-loop-func': typeof import('eslint/lib/rules/no-loop-func'); + 'no-loss-of-precision': typeof import('eslint/lib/rules/no-loss-of-precision'); + 'no-magic-numbers': typeof import('eslint/lib/rules/no-magic-numbers'); + 'no-restricted-globals': typeof import('eslint/lib/rules/no-restricted-globals'); + 'no-restricted-imports': typeof import('eslint/lib/rules/no-restricted-imports'); + 'no-undef': typeof import('eslint/lib/rules/no-undef'); + 'no-unused-expressions': typeof import('eslint/lib/rules/no-unused-expressions'); + 'no-useless-constructor': typeof import('eslint/lib/rules/no-useless-constructor'); + 'prefer-const': typeof import('eslint/lib/rules/prefer-const'); + 'prefer-destructuring': typeof import('eslint/lib/rules/prefer-destructuring'); + strict: typeof import('eslint/lib/rules/strict'); +} +type RuleId = keyof RuleMap; +export declare const getESLintCoreRule: (ruleId: R) => RuleMap[R]; +export declare function maybeGetESLintCoreRule(ruleId: R): RuleMap[R] | null; +export {}; +//# sourceMappingURL=getESLintCoreRule.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.d.ts.map new file mode 100644 index 0000000..eabe509 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getESLintCoreRule.d.ts","sourceRoot":"","sources":["../../src/util/getESLintCoreRule.ts"],"names":[],"mappings":"AAGA,UAAU,OAAO;IAEf,cAAc,EAAE,cAAc,+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line at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js new file mode 100644 index 0000000..f86db32 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getESLintCoreRule = void 0; +exports.maybeGetESLintCoreRule = maybeGetESLintCoreRule; +const utils_1 = require("@typescript-eslint/utils"); +const use_at_your_own_risk_1 = require("eslint/use-at-your-own-risk"); +const getESLintCoreRule = (ruleId) => utils_1.ESLintUtils.nullThrows(use_at_your_own_risk_1.builtinRules.get(ruleId), `ESLint's core rule '${ruleId}' not found.`); +exports.getESLintCoreRule = getESLintCoreRule; +function maybeGetESLintCoreRule(ruleId) { + try { + return (0, exports.getESLintCoreRule)(ruleId); + } + catch { + return null; + } +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFixOrSuggest.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFixOrSuggest.d.ts new file mode 100644 index 0000000..a28eda1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFixOrSuggest.d.ts @@ -0,0 +1,10 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +export declare function getFixOrSuggest({ fixOrSuggest, suggestion, }: { + fixOrSuggest: 'fix' | 'none' | 'suggest'; + suggestion: TSESLint.SuggestionReportDescriptor; +}): { + fix: TSESLint.ReportFixFunction; +} | { + suggest: TSESLint.SuggestionReportDescriptor[]; +} | undefined; +//# sourceMappingURL=getFixOrSuggest.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFixOrSuggest.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFixOrSuggest.d.ts.map new file mode 100644 index 0000000..cf3d3ea --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFixOrSuggest.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getFixOrSuggest.d.ts","sourceRoot":"","sources":["../../src/util/getFixOrSuggest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,wBAAgB,eAAe,CAAC,SAAS,SAAS,MAAM,EAAE,EACxD,YAAY,EACZ,UAAU,GACX,EAAE;IACD,YAAY,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IACzC,UAAU,EAAE,QAAQ,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC;CAC5D,GACG;IAAE,GAAG,EAAE,QAAQ,CAAC,iBAAiB,CAAA;CAAE,GACnC;IAAE,OAAO,EAAE,QAAQ,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,CAAA;CAAE,GAC7D,SAAS,CASZ"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFixOrSuggest.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFixOrSuggest.js new file mode 100644 index 0000000..d1e2b84 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFixOrSuggest.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getFixOrSuggest = getFixOrSuggest; +function getFixOrSuggest({ fixOrSuggest, suggestion, }) { + switch (fixOrSuggest) { + case 'fix': + return { fix: suggestion.fix }; + case 'none': + return undefined; + case 'suggest': + return { suggest: [suggestion] }; + } +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.d.ts new file mode 100644 index 0000000..2995d8e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.d.ts @@ -0,0 +1,18 @@ +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; +/** + * Gets the location of the head of the given for statement variant for reporting. + * + * - `for (const foo in bar) expressionOrBlock` + * ^^^^^^^^^^^^^^^^^^^^^^ + * + * - `for (const foo of bar) expressionOrBlock` + * ^^^^^^^^^^^^^^^^^^^^^^ + * + * - `for await (const foo of bar) expressionOrBlock` + * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + * + * - `for (let i = 0; i < 10; i++) expressionOrBlock` + * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + */ +export declare function getForStatementHeadLoc(sourceCode: TSESLint.SourceCode, node: TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement): TSESTree.SourceLocation; +//# sourceMappingURL=getForStatementHeadLoc.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.d.ts.map new file mode 100644 index 0000000..54d261f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getForStatementHeadLoc.d.ts","sourceRoot":"","sources":["../../src/util/getForStatementHeadLoc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAInE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,QAAQ,CAAC,UAAU,EAC/B,IAAI,EACA,QAAQ,CAAC,cAAc,GACvB,QAAQ,CAAC,cAAc,GACvB,QAAQ,CAAC,YAAY,GACxB,QAAQ,CAAC,cAAc,CASzB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.js new file mode 100644 index 0000000..c919eee --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getForStatementHeadLoc = getForStatementHeadLoc; +const eslint_utils_1 = require("@typescript-eslint/utils/eslint-utils"); +/** + * Gets the location of the head of the given for statement variant for reporting. + * + * - `for (const foo in bar) expressionOrBlock` + * ^^^^^^^^^^^^^^^^^^^^^^ + * + * - `for (const foo of bar) expressionOrBlock` + * ^^^^^^^^^^^^^^^^^^^^^^ + * + * - `for await (const foo of bar) expressionOrBlock` + * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + * + * - `for (let i = 0; i < 10; i++) expressionOrBlock` + * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + */ +function getForStatementHeadLoc(sourceCode, node) { + const closingParens = (0, eslint_utils_1.nullThrows)(sourceCode.getTokenBefore(node.body, token => token.value === ')'), 'for statement must have a closing parenthesis.'); + return { + end: structuredClone(closingParens.loc.end), + start: structuredClone(node.loc.start), + }; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFunctionHeadLoc.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFunctionHeadLoc.d.ts new file mode 100644 index 0000000..b3048db --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFunctionHeadLoc.d.ts @@ -0,0 +1,102 @@ +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; +type FunctionNode = TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression; +/** + * Gets the location of the given function node for reporting. + * + * - `function foo() {}` + * ^^^^^^^^^^^^ + * - `(function foo() {})` + * ^^^^^^^^^^^^ + * - `(function() {})` + * ^^^^^^^^ + * - `function* foo() {}` + * ^^^^^^^^^^^^^ + * - `(function* foo() {})` + * ^^^^^^^^^^^^^ + * - `(function*() {})` + * ^^^^^^^^^ + * - `() => {}` + * ^^ + * - `async () => {}` + * ^^ + * - `({ foo: function foo() {} })` + * ^^^^^^^^^^^^^^^^^ + * - `({ foo: function() {} })` + * ^^^^^^^^^^^^^ + * - `({ ['foo']: function() {} })` + * ^^^^^^^^^^^^^^^^^ + * - `({ [foo]: function() {} })` + * ^^^^^^^^^^^^^^^ + * - `({ foo() {} })` + * ^^^ + * - `({ foo: function* foo() {} })` + * ^^^^^^^^^^^^^^^^^^ + * - `({ foo: function*() {} })` + * ^^^^^^^^^^^^^^ + * - `({ ['foo']: function*() {} })` + * ^^^^^^^^^^^^^^^^^^ + * - `({ [foo]: function*() {} })` + * ^^^^^^^^^^^^^^^^ + * - `({ *foo() {} })` + * ^^^^ + * - `({ foo: async function foo() {} })` + * ^^^^^^^^^^^^^^^^^^^^^^^ + * - `({ foo: async function() {} })` + * ^^^^^^^^^^^^^^^^^^^ + * - `({ ['foo']: async function() {} })` + * ^^^^^^^^^^^^^^^^^^^^^^^ + * - `({ [foo]: async function() {} })` + * ^^^^^^^^^^^^^^^^^^^^^ + * - `({ async foo() {} })` + * ^^^^^^^^^ + * - `({ get foo() {} })` + * ^^^^^^^ + * - `({ set foo(a) {} })` + * ^^^^^^^ + * - `class A { constructor() {} }` + * ^^^^^^^^^^^ + * - `class A { foo() {} }` + * ^^^ + * - `class A { *foo() {} }` + * ^^^^ + * - `class A { async foo() {} }` + * ^^^^^^^^^ + * - `class A { ['foo']() {} }` + * ^^^^^^^ + * - `class A { *['foo']() {} }` + * ^^^^^^^^ + * - `class A { async ['foo']() {} }` + * ^^^^^^^^^^^^^ + * - `class A { [foo]() {} }` + * ^^^^^ + * - `class A { *[foo]() {} }` + * ^^^^^^ + * - `class A { async [foo]() {} }` + * ^^^^^^^^^^^ + * - `class A { get foo() {} }` + * ^^^^^^^ + * - `class A { set foo(a) {} }` + * ^^^^^^^ + * - `class A { static foo() {} }` + * ^^^^^^^^^^ + * - `class A { static *foo() {} }` + * ^^^^^^^^^^^ + * - `class A { static async foo() {} }` + * ^^^^^^^^^^^^^^^^ + * - `class A { static get foo() {} }` + * ^^^^^^^^^^^^^^ + * - `class A { static set foo(a) {} }` + * ^^^^^^^^^^^^^^ + * - `class A { foo = function() {} }` + * ^^^^^^^^^^^^^^ + * - `class A { static foo = function() {} }` + * ^^^^^^^^^^^^^^^^^^^^^ + * - `class A { foo = (a, b) => {} }` + * ^^^^^^ + * @param node The function node to get. + * @param sourceCode The source code object to get tokens. + * @returns The location of the function node for reporting. + */ +export declare function getFunctionHeadLoc(node: FunctionNode, sourceCode: TSESLint.SourceCode): TSESTree.SourceLocation; +export {}; +//# sourceMappingURL=getFunctionHeadLoc.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFunctionHeadLoc.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFunctionHeadLoc.d.ts.map new file mode 100644 index 0000000..1bcd0bb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFunctionHeadLoc.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getFunctionHeadLoc.d.ts","sourceRoot":"","sources":["../../src/util/getFunctionHeadLoc.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAMnE,KAAK,YAAY,GACb,QAAQ,CAAC,uBAAuB,GAChC,QAAQ,CAAC,mBAAmB,GAC5B,QAAQ,CAAC,kBAAkB,CAAC;AA2ChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,YAAY,EAClB,UAAU,EAAE,QAAQ,CAAC,UAAU,GAC9B,QAAQ,CAAC,cAAc,CAiDzB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFunctionHeadLoc.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFunctionHeadLoc.js new file mode 100644 index 0000000..75c21b8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFunctionHeadLoc.js @@ -0,0 +1,161 @@ +"use strict"; +// adapted from https://github.com/eslint/eslint/blob/5bdaae205c3a0089ea338b382df59e21d5b06436/lib/rules/utils/ast-utils.js#L1668-L1787 +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getFunctionHeadLoc = getFunctionHeadLoc; +const utils_1 = require("@typescript-eslint/utils"); +const astUtils_1 = require("./astUtils"); +/** + * Gets the `(` token of the given function node. + * @param node The function node to get. + * @param sourceCode The source code object to get tokens. + * @returns `(` token. + */ +function getOpeningParenOfParams(node, sourceCode) { + // If the node is an arrow function and doesn't have parens, this returns the identifier of the first param. + if (node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression && + node.params.length === 1) { + const argToken = utils_1.ESLintUtils.nullThrows(sourceCode.getFirstToken(node.params[0]), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('parameter', 'arrow function')); + const maybeParenToken = sourceCode.getTokenBefore(argToken); + return maybeParenToken && (0, astUtils_1.isOpeningParenToken)(maybeParenToken) + ? maybeParenToken + : argToken; + } + // Otherwise, returns paren. + return node.id != null + ? utils_1.ESLintUtils.nullThrows(sourceCode.getTokenAfter(node.id, astUtils_1.isOpeningParenToken), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('id', 'function')) + : utils_1.ESLintUtils.nullThrows(sourceCode.getFirstToken(node, astUtils_1.isOpeningParenToken), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('opening parenthesis', 'function')); +} +/** + * Gets the location of the given function node for reporting. + * + * - `function foo() {}` + * ^^^^^^^^^^^^ + * - `(function foo() {})` + * ^^^^^^^^^^^^ + * - `(function() {})` + * ^^^^^^^^ + * - `function* foo() {}` + * ^^^^^^^^^^^^^ + * - `(function* foo() {})` + * ^^^^^^^^^^^^^ + * - `(function*() {})` + * ^^^^^^^^^ + * - `() => {}` + * ^^ + * - `async () => {}` + * ^^ + * - `({ foo: function foo() {} })` + * ^^^^^^^^^^^^^^^^^ + * - `({ foo: function() {} })` + * ^^^^^^^^^^^^^ + * - `({ ['foo']: function() {} })` + * ^^^^^^^^^^^^^^^^^ + * - `({ [foo]: function() {} })` + * ^^^^^^^^^^^^^^^ + * - `({ foo() {} })` + * ^^^ + * - `({ foo: function* foo() {} })` + * ^^^^^^^^^^^^^^^^^^ + * - `({ foo: function*() {} })` + * ^^^^^^^^^^^^^^ + * - `({ ['foo']: function*() {} })` + * ^^^^^^^^^^^^^^^^^^ + * - `({ [foo]: function*() {} })` + * ^^^^^^^^^^^^^^^^ + * - `({ *foo() {} })` + * ^^^^ + * - `({ foo: async function foo() {} })` + * ^^^^^^^^^^^^^^^^^^^^^^^ + * - `({ foo: async function() {} })` + * ^^^^^^^^^^^^^^^^^^^ + * - `({ ['foo']: async function() {} })` + * ^^^^^^^^^^^^^^^^^^^^^^^ + * - `({ [foo]: async function() {} })` + * ^^^^^^^^^^^^^^^^^^^^^ + * - `({ async foo() {} })` + * ^^^^^^^^^ + * - `({ get foo() {} })` + * ^^^^^^^ + * - `({ set foo(a) {} })` + * ^^^^^^^ + * - `class A { constructor() {} }` + * ^^^^^^^^^^^ + * - `class A { foo() {} }` + * ^^^ + * - `class A { *foo() {} }` + * ^^^^ + * - `class A { async foo() {} }` + * ^^^^^^^^^ + * - `class A { ['foo']() {} }` + * ^^^^^^^ + * - `class A { *['foo']() {} }` + * ^^^^^^^^ + * - `class A { async ['foo']() {} }` + * ^^^^^^^^^^^^^ + * - `class A { [foo]() {} }` + * ^^^^^ + * - `class A { *[foo]() {} }` + * ^^^^^^ + * - `class A { async [foo]() {} }` + * ^^^^^^^^^^^ + * - `class A { get foo() {} }` + * ^^^^^^^ + * - `class A { set foo(a) {} }` + * ^^^^^^^ + * - `class A { static foo() {} }` + * ^^^^^^^^^^ + * - `class A { static *foo() {} }` + * ^^^^^^^^^^^ + * - `class A { static async foo() {} }` + * ^^^^^^^^^^^^^^^^ + * - `class A { static get foo() {} }` + * ^^^^^^^^^^^^^^ + * - `class A { static set foo(a) {} }` + * ^^^^^^^^^^^^^^ + * - `class A { foo = function() {} }` + * ^^^^^^^^^^^^^^ + * - `class A { static foo = function() {} }` + * ^^^^^^^^^^^^^^^^^^^^^ + * - `class A { foo = (a, b) => {} }` + * ^^^^^^ + * @param node The function node to get. + * @param sourceCode The source code object to get tokens. + * @returns The location of the function node for reporting. + */ +function getFunctionHeadLoc(node, sourceCode) { + const parent = node.parent; + let start; + let end; + if (parent.type === utils_1.AST_NODE_TYPES.MethodDefinition || + parent.type === utils_1.AST_NODE_TYPES.PropertyDefinition) { + // the decorator's range is included within the member + // however it's usually irrelevant to the member itself - so we don't want + // to highlight it ever. + if (parent.decorators.length > 0) { + const lastDecorator = parent.decorators[parent.decorators.length - 1]; + const firstTokenAfterDecorator = utils_1.ESLintUtils.nullThrows(sourceCode.getTokenAfter(lastDecorator), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('modifier or member name', 'class member')); + start = firstTokenAfterDecorator.loc.start; + } + else { + start = parent.loc.start; + } + end = getOpeningParenOfParams(node, sourceCode).loc.start; + } + else if (parent.type === utils_1.AST_NODE_TYPES.Property) { + start = parent.loc.start; + end = getOpeningParenOfParams(node, sourceCode).loc.start; + } + else if (node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression) { + const arrowToken = utils_1.ESLintUtils.nullThrows(sourceCode.getTokenBefore(node.body, astUtils_1.isArrowToken), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('arrow token', 'arrow function')); + start = arrowToken.loc.start; + end = arrowToken.loc.end; + } + else { + start = node.loc.start; + end = getOpeningParenOfParams(node, sourceCode).loc.start; + } + return { + end: { ...end }, + start: { ...start }, + }; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getMemberHeadLoc.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getMemberHeadLoc.d.ts new file mode 100644 index 0000000..f30a6e9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getMemberHeadLoc.d.ts @@ -0,0 +1,37 @@ +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; +/** + * Generates report loc suitable for reporting on how a class member is + * declared, rather than how it's implemented. + * + * ```ts + * class A { + * abstract method(): void; + * ~~~~~~~~~~~~~~~ + * + * concreteMethod(): void { + * ~~~~~~~~~~~~~~ + * // code + * } + * + * abstract private property?: string; + * ~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * @decorator override concreteProperty = 'value'; + * ~~~~~~~~~~~~~~~~~~~~~~~~~ + * } + * ``` + */ +export declare function getMemberHeadLoc(sourceCode: Readonly, node: TSESTree.AccessorProperty | TSESTree.MethodDefinition | TSESTree.PropertyDefinition | TSESTree.TSAbstractAccessorProperty | TSESTree.TSAbstractMethodDefinition | TSESTree.TSAbstractPropertyDefinition): TSESTree.SourceLocation; +/** + * Generates report loc suitable for reporting on how a parameter property is + * declared. + * + * ```ts + * class A { + * constructor(private property: string = 'value') { + * ~~~~~~~~~~~~~~~~ + * } + * ``` + */ +export declare function getParameterPropertyHeadLoc(sourceCode: Readonly, node: TSESTree.TSParameterProperty, nodeName: string): TSESTree.SourceLocation; +//# sourceMappingURL=getMemberHeadLoc.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getMemberHeadLoc.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getMemberHeadLoc.d.ts.map new file mode 100644 index 0000000..1098308 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getMemberHeadLoc.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getMemberHeadLoc.d.ts","sourceRoot":"","sources":["../../src/util/getMemberHeadLoc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAOnE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EACzC,IAAI,EACA,QAAQ,CAAC,gBAAgB,GACzB,QAAQ,CAAC,gBAAgB,GACzB,QAAQ,CAAC,kBAAkB,GAC3B,QAAQ,CAAC,0BAA0B,GACnC,QAAQ,CAAC,0BAA0B,GACnC,QAAQ,CAAC,4BAA4B,GACxC,QAAQ,CAAC,cAAc,CA8BzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EACzC,IAAI,EAAE,QAAQ,CAAC,mBAAmB,EAClC,QAAQ,EAAE,MAAM,GACf,QAAQ,CAAC,cAAc,CAyBzB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getMemberHeadLoc.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getMemberHeadLoc.js new file mode 100644 index 0000000..0b8b9b5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getMemberHeadLoc.js @@ -0,0 +1,79 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getMemberHeadLoc = getMemberHeadLoc; +exports.getParameterPropertyHeadLoc = getParameterPropertyHeadLoc; +const eslint_utils_1 = require("@typescript-eslint/utils/eslint-utils"); +/** + * Generates report loc suitable for reporting on how a class member is + * declared, rather than how it's implemented. + * + * ```ts + * class A { + * abstract method(): void; + * ~~~~~~~~~~~~~~~ + * + * concreteMethod(): void { + * ~~~~~~~~~~~~~~ + * // code + * } + * + * abstract private property?: string; + * ~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * @decorator override concreteProperty = 'value'; + * ~~~~~~~~~~~~~~~~~~~~~~~~~ + * } + * ``` + */ +function getMemberHeadLoc(sourceCode, node) { + let start; + if (node.decorators.length === 0) { + start = node.loc.start; + } + else { + const lastDecorator = node.decorators[node.decorators.length - 1]; + const nextToken = (0, eslint_utils_1.nullThrows)(sourceCode.getTokenAfter(lastDecorator), eslint_utils_1.NullThrowsReasons.MissingToken('token', 'last decorator')); + start = nextToken.loc.start; + } + let end; + if (!node.computed) { + end = node.key.loc.end; + } + else { + const closingBracket = (0, eslint_utils_1.nullThrows)(sourceCode.getTokenAfter(node.key, token => token.value === ']'), eslint_utils_1.NullThrowsReasons.MissingToken(']', node.type)); + end = closingBracket.loc.end; + } + return { + end: structuredClone(end), + start: structuredClone(start), + }; +} +/** + * Generates report loc suitable for reporting on how a parameter property is + * declared. + * + * ```ts + * class A { + * constructor(private property: string = 'value') { + * ~~~~~~~~~~~~~~~~ + * } + * ``` + */ +function getParameterPropertyHeadLoc(sourceCode, node, nodeName) { + // Parameter properties have a weirdly different AST structure + // than other class members. + let start; + if (node.decorators.length === 0) { + start = structuredClone(node.loc.start); + } + else { + const lastDecorator = node.decorators[node.decorators.length - 1]; + const nextToken = (0, eslint_utils_1.nullThrows)(sourceCode.getTokenAfter(lastDecorator), eslint_utils_1.NullThrowsReasons.MissingToken('token', 'last decorator')); + start = structuredClone(nextToken.loc.start); + } + const end = sourceCode.getLocFromIndex(node.parameter.range[0] + nodeName.length); + return { + end, + start, + }; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.d.ts new file mode 100644 index 0000000..b2e3d0d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.d.ts @@ -0,0 +1,36 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import { SyntaxKind } from 'typescript'; +import type { ValueOf } from './types'; +export declare enum OperatorPrecedence { + Comma = 0, + Spread = 1, + Yield = 2, + Assignment = 3, + Conditional = 4, + Coalesce = 4,// NOTE: This is wrong + LogicalOR = 5, + LogicalAND = 6, + BitwiseOR = 7, + BitwiseXOR = 8, + BitwiseAND = 9, + Equality = 10, + Relational = 11, + Shift = 12, + Additive = 13, + Multiplicative = 14, + Exponentiation = 15, + Unary = 16, + Update = 17, + LeftHandSide = 18, + Member = 19, + Primary = 20, + Highest = 20, + Lowest = 0, + Invalid = -1 +} +export declare function getOperatorPrecedenceForNode(node: TSESTree.Node): OperatorPrecedence; +type TSESTreeOperatorKind = ValueOf | ValueOf; +export declare function getOperatorPrecedence(nodeKind: SyntaxKind, operatorKind: SyntaxKind, hasArguments?: boolean): OperatorPrecedence; +export declare function getBinaryOperatorPrecedence(kind: SyntaxKind | TSESTreeOperatorKind): OperatorPrecedence; +export {}; +//# sourceMappingURL=getOperatorPrecedence.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.d.ts.map new file mode 100644 index 0000000..79f0e25 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getOperatorPrecedence.d.ts","sourceRoot":"","sources":["../../src/util/getOperatorPrecedence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,oBAAY,kBAAkB;IAI5B,KAAK,IAAA;IAKL,MAAM,IAAA;IAkBN,KAAK,IAAA;IAML,UAAU,IAAA;IAWV,WAAW,IAAA;IAOX,QAAQ,IAAc,CAAE,sBAAsB;IAK9C,SAAS,IAAA;IAKT,UAAU,IAAA;IAKV,SAAS,IAAA;IAKT,UAAU,IAAA;IAKV,UAAU,IAAA;IAQV,QAAQ,KAAA;IAWR,UAAU,KAAA;IAOV,KAAK,KAAA;IAML,QAAQ,KAAA;IAMR,cAAc,KAAA;IAKd,cAAc,KAAA;IAed,KAAK,KAAA;IAML,MAAM,KAAA;IAQN,YAAY,KAAA;IAkBZ,MAAM,KAAA;IAiBN,OAAO,KAAA;IAEP,OAAO,KAAU;IACjB,MAAM,IAAQ;IAGd,OAAO,KAAK;CACb;AAED,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,QAAQ,CAAC,IAAI,GAClB,kBAAkB,CA8FpB;AAED,KAAK,oBAAoB,GACrB,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GACtC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AAE5C,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,UAAU,EACpB,YAAY,EAAE,UAAU,EACxB,YAAY,CAAC,EAAE,OAAO,GACrB,kBAAkB,CAqGpB;AAED,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,UAAU,GAAG,oBAAoB,GACtC,kBAAkB,CAkFpB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js new file mode 100644 index 0000000..860f230 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js @@ -0,0 +1,417 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OperatorPrecedence = void 0; +exports.getOperatorPrecedenceForNode = getOperatorPrecedenceForNode; +exports.getOperatorPrecedence = getOperatorPrecedence; +exports.getBinaryOperatorPrecedence = getBinaryOperatorPrecedence; +const utils_1 = require("@typescript-eslint/utils"); +const typescript_1 = require("typescript"); +var OperatorPrecedence; +(function (OperatorPrecedence) { + // Expression: + // AssignmentExpression + // Expression `,` AssignmentExpression + OperatorPrecedence[OperatorPrecedence["Comma"] = 0] = "Comma"; + // NOTE: `Spread` is higher than `Comma` due to how it is parsed in |ElementList| + // SpreadElement: + // `...` AssignmentExpression + OperatorPrecedence[OperatorPrecedence["Spread"] = 1] = "Spread"; + // AssignmentExpression: + // ConditionalExpression + // YieldExpression + // ArrowFunction + // AsyncArrowFunction + // LeftHandSideExpression `=` AssignmentExpression + // LeftHandSideExpression AssignmentOperator AssignmentExpression + // + // NOTE: AssignmentExpression is broken down into several precedences due to the requirements + // of the parenthesize rules. + // AssignmentExpression: YieldExpression + // YieldExpression: + // `yield` + // `yield` AssignmentExpression + // `yield` `*` AssignmentExpression + OperatorPrecedence[OperatorPrecedence["Yield"] = 2] = "Yield"; + // AssignmentExpression: LeftHandSideExpression `=` AssignmentExpression + // AssignmentExpression: LeftHandSideExpression AssignmentOperator AssignmentExpression + // AssignmentOperator: one of + // `*=` `/=` `%=` `+=` `-=` `<<=` `>>=` `>>>=` `&=` `^=` `|=` `**=` + OperatorPrecedence[OperatorPrecedence["Assignment"] = 3] = "Assignment"; + // NOTE: `Conditional` is considered higher than `Assignment` here, but in reality they have + // the same precedence. + // AssignmentExpression: ConditionalExpression + // ConditionalExpression: + // ShortCircuitExpression + // ShortCircuitExpression `?` AssignmentExpression `:` AssignmentExpression + // ShortCircuitExpression: + // LogicalORExpression + // CoalesceExpression + OperatorPrecedence[OperatorPrecedence["Conditional"] = 4] = "Conditional"; + // CoalesceExpression: + // CoalesceExpressionHead `??` BitwiseORExpression + // CoalesceExpressionHead: + // CoalesceExpression + // BitwiseORExpression + OperatorPrecedence[OperatorPrecedence["Coalesce"] = 4] = "Coalesce"; + // LogicalORExpression: + // LogicalANDExpression + // LogicalORExpression `||` LogicalANDExpression + OperatorPrecedence[OperatorPrecedence["LogicalOR"] = 5] = "LogicalOR"; + // LogicalANDExpression: + // BitwiseORExpression + // LogicalANDExpression `&&` BitwiseORExpression + OperatorPrecedence[OperatorPrecedence["LogicalAND"] = 6] = "LogicalAND"; + // BitwiseORExpression: + // BitwiseXORExpression + // BitwiseORExpression `^` BitwiseXORExpression + OperatorPrecedence[OperatorPrecedence["BitwiseOR"] = 7] = "BitwiseOR"; + // BitwiseXORExpression: + // BitwiseANDExpression + // BitwiseXORExpression `^` BitwiseANDExpression + OperatorPrecedence[OperatorPrecedence["BitwiseXOR"] = 8] = "BitwiseXOR"; + // BitwiseANDExpression: + // EqualityExpression + // BitwiseANDExpression `^` EqualityExpression + OperatorPrecedence[OperatorPrecedence["BitwiseAND"] = 9] = "BitwiseAND"; + // EqualityExpression: + // RelationalExpression + // EqualityExpression `==` RelationalExpression + // EqualityExpression `!=` RelationalExpression + // EqualityExpression `===` RelationalExpression + // EqualityExpression `!==` RelationalExpression + OperatorPrecedence[OperatorPrecedence["Equality"] = 10] = "Equality"; + // RelationalExpression: + // ShiftExpression + // RelationalExpression `<` ShiftExpression + // RelationalExpression `>` ShiftExpression + // RelationalExpression `<=` ShiftExpression + // RelationalExpression `>=` ShiftExpression + // RelationalExpression `instanceof` ShiftExpression + // RelationalExpression `in` ShiftExpression + // [+TypeScript] RelationalExpression `as` Type + OperatorPrecedence[OperatorPrecedence["Relational"] = 11] = "Relational"; + // ShiftExpression: + // AdditiveExpression + // ShiftExpression `<<` AdditiveExpression + // ShiftExpression `>>` AdditiveExpression + // ShiftExpression `>>>` AdditiveExpression + OperatorPrecedence[OperatorPrecedence["Shift"] = 12] = "Shift"; + // AdditiveExpression: + // MultiplicativeExpression + // AdditiveExpression `+` MultiplicativeExpression + // AdditiveExpression `-` MultiplicativeExpression + OperatorPrecedence[OperatorPrecedence["Additive"] = 13] = "Additive"; + // MultiplicativeExpression: + // ExponentiationExpression + // MultiplicativeExpression MultiplicativeOperator ExponentiationExpression + // MultiplicativeOperator: one of `*`, `/`, `%` + OperatorPrecedence[OperatorPrecedence["Multiplicative"] = 14] = "Multiplicative"; + // ExponentiationExpression: + // UnaryExpression + // UpdateExpression `**` ExponentiationExpression + OperatorPrecedence[OperatorPrecedence["Exponentiation"] = 15] = "Exponentiation"; + // UnaryExpression: + // UpdateExpression + // `delete` UnaryExpression + // `void` UnaryExpression + // `typeof` UnaryExpression + // `+` UnaryExpression + // `-` UnaryExpression + // `~` UnaryExpression + // `!` UnaryExpression + // AwaitExpression + // UpdateExpression: // TODO: Do we need to investigate the precedence here? + // `++` UnaryExpression + // `--` UnaryExpression + OperatorPrecedence[OperatorPrecedence["Unary"] = 16] = "Unary"; + // UpdateExpression: + // LeftHandSideExpression + // LeftHandSideExpression `++` + // LeftHandSideExpression `--` + OperatorPrecedence[OperatorPrecedence["Update"] = 17] = "Update"; + // LeftHandSideExpression: + // NewExpression + // CallExpression + // NewExpression: + // MemberExpression + // `new` NewExpression + OperatorPrecedence[OperatorPrecedence["LeftHandSide"] = 18] = "LeftHandSide"; + // CallExpression: + // CoverCallExpressionAndAsyncArrowHead + // SuperCall + // ImportCall + // CallExpression Arguments + // CallExpression `[` Expression `]` + // CallExpression `.` IdentifierName + // CallExpression TemplateLiteral + // MemberExpression: + // PrimaryExpression + // MemberExpression `[` Expression `]` + // MemberExpression `.` IdentifierName + // MemberExpression TemplateLiteral + // SuperProperty + // MetaProperty + // `new` MemberExpression Arguments + OperatorPrecedence[OperatorPrecedence["Member"] = 19] = "Member"; + // TODO: JSXElement? + // PrimaryExpression: + // `this` + // IdentifierReference + // Literal + // ArrayLiteral + // ObjectLiteral + // FunctionExpression + // ClassExpression + // GeneratorExpression + // AsyncFunctionExpression + // AsyncGeneratorExpression + // RegularExpressionLiteral + // TemplateLiteral + // CoverParenthesizedExpressionAndArrowParameterList + OperatorPrecedence[OperatorPrecedence["Primary"] = 20] = "Primary"; + OperatorPrecedence[OperatorPrecedence["Highest"] = 20] = "Highest"; + OperatorPrecedence[OperatorPrecedence["Lowest"] = 0] = "Lowest"; + // -1 is lower than all other precedences. Returning it will cause binary expression + // parsing to stop. + OperatorPrecedence[OperatorPrecedence["Invalid"] = -1] = "Invalid"; +})(OperatorPrecedence || (exports.OperatorPrecedence = OperatorPrecedence = {})); +function getOperatorPrecedenceForNode(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.SpreadElement: + case utils_1.AST_NODE_TYPES.RestElement: + return OperatorPrecedence.Spread; + case utils_1.AST_NODE_TYPES.YieldExpression: + case utils_1.AST_NODE_TYPES.ArrowFunctionExpression: + return OperatorPrecedence.Yield; + case utils_1.AST_NODE_TYPES.ConditionalExpression: + return OperatorPrecedence.Conditional; + case utils_1.AST_NODE_TYPES.SequenceExpression: + return OperatorPrecedence.Comma; + case utils_1.AST_NODE_TYPES.AssignmentExpression: + case utils_1.AST_NODE_TYPES.BinaryExpression: + case utils_1.AST_NODE_TYPES.LogicalExpression: + switch (node.operator) { + case '==': + case '+=': + case '-=': + case '**=': + case '*=': + case '/=': + case '%=': + case '<<=': + case '>>=': + case '>>>=': + case '&=': + case '^=': + case '|=': + case '||=': + case '&&=': + case '??=': + return OperatorPrecedence.Assignment; + default: + return getBinaryOperatorPrecedence(node.operator); + } + case utils_1.AST_NODE_TYPES.TSTypeAssertion: + case utils_1.AST_NODE_TYPES.TSNonNullExpression: + case utils_1.AST_NODE_TYPES.UnaryExpression: + case utils_1.AST_NODE_TYPES.AwaitExpression: + return OperatorPrecedence.Unary; + case utils_1.AST_NODE_TYPES.UpdateExpression: + // TODO: Should prefix `++` and `--` be moved to the `Update` precedence? + if (node.prefix) { + return OperatorPrecedence.Unary; + } + return OperatorPrecedence.Update; + case utils_1.AST_NODE_TYPES.ChainExpression: + return getOperatorPrecedenceForNode(node.expression); + case utils_1.AST_NODE_TYPES.CallExpression: + return OperatorPrecedence.LeftHandSide; + case utils_1.AST_NODE_TYPES.NewExpression: + return node.arguments.length > 0 + ? OperatorPrecedence.Member + : OperatorPrecedence.LeftHandSide; + case utils_1.AST_NODE_TYPES.TaggedTemplateExpression: + case utils_1.AST_NODE_TYPES.MemberExpression: + case utils_1.AST_NODE_TYPES.MetaProperty: + return OperatorPrecedence.Member; + case utils_1.AST_NODE_TYPES.TSAsExpression: + return OperatorPrecedence.Relational; + case utils_1.AST_NODE_TYPES.ThisExpression: + case utils_1.AST_NODE_TYPES.Super: + case utils_1.AST_NODE_TYPES.Identifier: + case utils_1.AST_NODE_TYPES.PrivateIdentifier: + case utils_1.AST_NODE_TYPES.Literal: + case utils_1.AST_NODE_TYPES.ArrayExpression: + case utils_1.AST_NODE_TYPES.ObjectExpression: + case utils_1.AST_NODE_TYPES.FunctionExpression: + case utils_1.AST_NODE_TYPES.ClassExpression: + case utils_1.AST_NODE_TYPES.TemplateLiteral: + case utils_1.AST_NODE_TYPES.JSXElement: + case utils_1.AST_NODE_TYPES.JSXFragment: + // we don't have nodes for these cases + // case SyntaxKind.ParenthesizedExpression: + // case SyntaxKind.OmittedExpression: + return OperatorPrecedence.Primary; + default: + return OperatorPrecedence.Invalid; + } +} +function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { + switch (nodeKind) { + // A list of comma-separated expressions. This node is only created by transformations. + case typescript_1.SyntaxKind.CommaListExpression: + return OperatorPrecedence.Comma; + case typescript_1.SyntaxKind.SpreadElement: + return OperatorPrecedence.Spread; + case typescript_1.SyntaxKind.YieldExpression: + return OperatorPrecedence.Yield; + case typescript_1.SyntaxKind.ConditionalExpression: + return OperatorPrecedence.Conditional; + case typescript_1.SyntaxKind.BinaryExpression: + switch (operatorKind) { + case typescript_1.SyntaxKind.AmpersandAmpersandEqualsToken: + case typescript_1.SyntaxKind.AmpersandEqualsToken: + case typescript_1.SyntaxKind.AsteriskAsteriskEqualsToken: + case typescript_1.SyntaxKind.AsteriskEqualsToken: + case typescript_1.SyntaxKind.BarBarEqualsToken: + case typescript_1.SyntaxKind.BarEqualsToken: + case typescript_1.SyntaxKind.CaretEqualsToken: + case typescript_1.SyntaxKind.EqualsToken: + case typescript_1.SyntaxKind.GreaterThanGreaterThanEqualsToken: + case typescript_1.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken: + case typescript_1.SyntaxKind.LessThanLessThanEqualsToken: + case typescript_1.SyntaxKind.MinusEqualsToken: + case typescript_1.SyntaxKind.PercentEqualsToken: + case typescript_1.SyntaxKind.PlusEqualsToken: + case typescript_1.SyntaxKind.QuestionQuestionEqualsToken: + case typescript_1.SyntaxKind.SlashEqualsToken: + return OperatorPrecedence.Assignment; + case typescript_1.SyntaxKind.CommaToken: + return OperatorPrecedence.Comma; + default: + return getBinaryOperatorPrecedence(operatorKind); + } + // TODO: Should prefix `++` and `--` be moved to the `Update` precedence? + case typescript_1.SyntaxKind.TypeAssertionExpression: + case typescript_1.SyntaxKind.NonNullExpression: + case typescript_1.SyntaxKind.PrefixUnaryExpression: + case typescript_1.SyntaxKind.TypeOfExpression: + case typescript_1.SyntaxKind.VoidExpression: + case typescript_1.SyntaxKind.DeleteExpression: + case typescript_1.SyntaxKind.AwaitExpression: + return OperatorPrecedence.Unary; + case typescript_1.SyntaxKind.PostfixUnaryExpression: + return OperatorPrecedence.Update; + case typescript_1.SyntaxKind.CallExpression: + return OperatorPrecedence.LeftHandSide; + case typescript_1.SyntaxKind.NewExpression: + return hasArguments + ? OperatorPrecedence.Member + : OperatorPrecedence.LeftHandSide; + case typescript_1.SyntaxKind.TaggedTemplateExpression: + case typescript_1.SyntaxKind.PropertyAccessExpression: + case typescript_1.SyntaxKind.ElementAccessExpression: + case typescript_1.SyntaxKind.MetaProperty: + return OperatorPrecedence.Member; + case typescript_1.SyntaxKind.AsExpression: + case typescript_1.SyntaxKind.SatisfiesExpression: + return OperatorPrecedence.Relational; + case typescript_1.SyntaxKind.ThisKeyword: + case typescript_1.SyntaxKind.SuperKeyword: + case typescript_1.SyntaxKind.Identifier: + case typescript_1.SyntaxKind.PrivateIdentifier: + case typescript_1.SyntaxKind.NullKeyword: + case typescript_1.SyntaxKind.TrueKeyword: + case typescript_1.SyntaxKind.FalseKeyword: + case typescript_1.SyntaxKind.NumericLiteral: + case typescript_1.SyntaxKind.BigIntLiteral: + case typescript_1.SyntaxKind.StringLiteral: + case typescript_1.SyntaxKind.ArrayLiteralExpression: + case typescript_1.SyntaxKind.ObjectLiteralExpression: + case typescript_1.SyntaxKind.FunctionExpression: + case typescript_1.SyntaxKind.ArrowFunction: + case typescript_1.SyntaxKind.ClassExpression: + case typescript_1.SyntaxKind.RegularExpressionLiteral: + case typescript_1.SyntaxKind.NoSubstitutionTemplateLiteral: + case typescript_1.SyntaxKind.TemplateExpression: + case typescript_1.SyntaxKind.ParenthesizedExpression: + case typescript_1.SyntaxKind.OmittedExpression: + case typescript_1.SyntaxKind.JsxElement: + case typescript_1.SyntaxKind.JsxSelfClosingElement: + case typescript_1.SyntaxKind.JsxFragment: + return OperatorPrecedence.Primary; + default: + return OperatorPrecedence.Invalid; + } +} +function getBinaryOperatorPrecedence(kind) { + switch (kind) { + case '-': + case '+': + case typescript_1.SyntaxKind.MinusToken: + case typescript_1.SyntaxKind.PlusToken: + return OperatorPrecedence.Additive; + case '!=': + case '!==': + case '==': + case '===': + case typescript_1.SyntaxKind.EqualsEqualsEqualsToken: + case typescript_1.SyntaxKind.EqualsEqualsToken: + case typescript_1.SyntaxKind.ExclamationEqualsEqualsToken: + case typescript_1.SyntaxKind.ExclamationEqualsToken: + return OperatorPrecedence.Equality; + case '??': + case typescript_1.SyntaxKind.QuestionQuestionToken: + return OperatorPrecedence.Coalesce; + case '*': + case '/': + case '%': + case typescript_1.SyntaxKind.AsteriskToken: + case typescript_1.SyntaxKind.PercentToken: + case typescript_1.SyntaxKind.SlashToken: + return OperatorPrecedence.Multiplicative; + case '**': + case typescript_1.SyntaxKind.AsteriskAsteriskToken: + return OperatorPrecedence.Exponentiation; + case '&': + case typescript_1.SyntaxKind.AmpersandToken: + return OperatorPrecedence.BitwiseAND; + case '&&': + case typescript_1.SyntaxKind.AmpersandAmpersandToken: + return OperatorPrecedence.LogicalAND; + case '^': + case typescript_1.SyntaxKind.CaretToken: + return OperatorPrecedence.BitwiseXOR; + case '<': + case '<=': + case '>': + case '>=': + case 'in': + case 'instanceof': + case typescript_1.SyntaxKind.AsKeyword: + case typescript_1.SyntaxKind.GreaterThanEqualsToken: + case typescript_1.SyntaxKind.GreaterThanToken: + case typescript_1.SyntaxKind.InKeyword: + case typescript_1.SyntaxKind.InstanceOfKeyword: + case typescript_1.SyntaxKind.LessThanEqualsToken: + case typescript_1.SyntaxKind.LessThanToken: + // case 'as': -- we don't have a token for this + return OperatorPrecedence.Relational; + case '<<': + case '>>': + case '>>>': + case typescript_1.SyntaxKind.GreaterThanGreaterThanGreaterThanToken: + case typescript_1.SyntaxKind.GreaterThanGreaterThanToken: + case typescript_1.SyntaxKind.LessThanLessThanToken: + return OperatorPrecedence.Shift; + case '|': + case typescript_1.SyntaxKind.BarToken: + return OperatorPrecedence.BitwiseOR; + case '||': + case typescript_1.SyntaxKind.BarBarToken: + return OperatorPrecedence.LogicalOR; + } + // -1 is lower than all other precedences. Returning it will cause binary expression + // parsing to stop. + return -1; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getParentFunctionNode.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getParentFunctionNode.d.ts new file mode 100644 index 0000000..fedf880 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getParentFunctionNode.d.ts @@ -0,0 +1,3 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +export declare function getParentFunctionNode(node: TSESTree.Node): TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | null; +//# sourceMappingURL=getParentFunctionNode.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getParentFunctionNode.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getParentFunctionNode.d.ts.map new file mode 100644 index 0000000..065cffc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getParentFunctionNode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getParentFunctionNode.d.ts","sourceRoot":"","sources":["../../src/util/getParentFunctionNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAEjB,QAAQ,CAAC,uBAAuB,GAChC,QAAQ,CAAC,mBAAmB,GAC5B,QAAQ,CAAC,kBAAkB,GAC3B,IAAI,CAiBP"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getParentFunctionNode.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getParentFunctionNode.js new file mode 100644 index 0000000..fa15287 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getParentFunctionNode.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getParentFunctionNode = getParentFunctionNode; +const utils_1 = require("@typescript-eslint/utils"); +function getParentFunctionNode(node) { + let current = node.parent; + while (current) { + if (current.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression || + current.type === utils_1.AST_NODE_TYPES.FunctionDeclaration || + current.type === utils_1.AST_NODE_TYPES.FunctionExpression) { + return current; + } + current = current.parent; + } + // this shouldn't happen in correct code, but someone may attempt to parse bad code + // the parser won't error, so we shouldn't throw here + /* istanbul ignore next */ return null; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStaticStringValue.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStaticStringValue.d.ts new file mode 100644 index 0000000..542c911 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStaticStringValue.d.ts @@ -0,0 +1,12 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +/** + * Returns the result of the string conversion applied to the evaluated value of the given expression node, + * if it can be determined statically. + * + * This function returns a `string` value for all `Literal` nodes and simple `TemplateLiteral` nodes only. + * In all other cases, this function returns `null`. + * @param node Expression node. + * @returns String value if it can be determined. Otherwise, `null`. + */ +export declare function getStaticStringValue(node: TSESTree.Node): string | null; +//# sourceMappingURL=getStaticStringValue.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStaticStringValue.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStaticStringValue.d.ts.map new file mode 100644 index 0000000..ad22fd2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStaticStringValue.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getStaticStringValue.d.ts","sourceRoot":"","sources":["../../src/util/getStaticStringValue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAMzD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,MAAM,GAAG,IAAI,CAgCvE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStaticStringValue.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStaticStringValue.js new file mode 100644 index 0000000..56582d1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStaticStringValue.js @@ -0,0 +1,44 @@ +"use strict"; +// adapted from https://github.com/eslint/eslint/blob/5bdaae205c3a0089ea338b382df59e21d5b06436/lib/rules/utils/ast-utils.js#L191-L230 +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getStaticStringValue = getStaticStringValue; +const utils_1 = require("@typescript-eslint/utils"); +const isNullLiteral_1 = require("./isNullLiteral"); +/** + * Returns the result of the string conversion applied to the evaluated value of the given expression node, + * if it can be determined statically. + * + * This function returns a `string` value for all `Literal` nodes and simple `TemplateLiteral` nodes only. + * In all other cases, this function returns `null`. + * @param node Expression node. + * @returns String value if it can be determined. Otherwise, `null`. + */ +function getStaticStringValue(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.Literal: + // eslint-disable-next-line eqeqeq, @typescript-eslint/internal/eqeq-nullish -- intentional strict comparison for literal value + if (node.value === null) { + if ((0, isNullLiteral_1.isNullLiteral)(node)) { + return String(node.value); // "null" + } + if ('regex' in node) { + return `/${node.regex.pattern}/${node.regex.flags}`; + } + if ('bigint' in node) { + return node.bigint; + } + // Otherwise, this is an unknown literal. The function will return null. + } + else { + return String(node.value); + } + break; + case utils_1.AST_NODE_TYPES.TemplateLiteral: + if (node.expressions.length === 0 && node.quasis.length === 1) { + return node.quasis[0].value.cooked; + } + break; + // no default + } + return null; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.d.ts new file mode 100644 index 0000000..6d7c3c4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.d.ts @@ -0,0 +1,2 @@ +export declare function getStringLength(value: string): number; +//# sourceMappingURL=getStringLength.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.d.ts.map new file mode 100644 index 0000000..0169f8a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getStringLength.d.ts","sourceRoot":"","sources":["../../src/util/getStringLength.ts"],"names":[],"mappings":"AAQA,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQrD"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.js new file mode 100644 index 0000000..981dbb2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.js @@ -0,0 +1,18 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getStringLength = getStringLength; +const graphemer_1 = __importDefault(require("graphemer")); +let splitter; +function isASCII(value) { + return /^[\u0020-\u007f]*$/u.test(value); +} +function getStringLength(value) { + if (isASCII(value)) { + return value.length; + } + splitter ??= new graphemer_1.default(); + return splitter.countGraphemes(value); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getTextWithParentheses.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getTextWithParentheses.d.ts new file mode 100644 index 0000000..8dafaed --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getTextWithParentheses.d.ts @@ -0,0 +1,4 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { SourceCode } from '@typescript-eslint/utils/ts-eslint'; +export declare function getTextWithParentheses(sourceCode: Readonly, node: TSESTree.Node): string; +//# sourceMappingURL=getTextWithParentheses.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getTextWithParentheses.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getTextWithParentheses.d.ts.map new file mode 100644 index 0000000..b8738da --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getTextWithParentheses.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getTextWithParentheses.d.ts","sourceRoot":"","sources":["../../src/util/getTextWithParentheses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAUrE,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,EAChC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAClB,MAAM,CAoBR"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getTextWithParentheses.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getTextWithParentheses.js new file mode 100644 index 0000000..78b3315 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getTextWithParentheses.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getTextWithParentheses = getTextWithParentheses; +const _1 = require("."); +function getTextWithParentheses(sourceCode, node) { + // Capture parentheses before and after the node + let beforeCount = 0; + let afterCount = 0; + if ((0, _1.isParenthesized)(node, sourceCode)) { + const bodyOpeningParen = (0, _1.nullThrows)(sourceCode.getTokenBefore(node, _1.isOpeningParenToken), _1.NullThrowsReasons.MissingToken('(', 'node')); + const bodyClosingParen = (0, _1.nullThrows)(sourceCode.getTokenAfter(node, _1.isClosingParenToken), _1.NullThrowsReasons.MissingToken(')', 'node')); + beforeCount = node.range[0] - bodyOpeningParen.range[0]; + afterCount = bodyClosingParen.range[1] - node.range[1]; + } + return sourceCode.getText(node, beforeCount, afterCount); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getThisExpression.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getThisExpression.d.ts new file mode 100644 index 0000000..7a7b30f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getThisExpression.d.ts @@ -0,0 +1,3 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +export declare function getThisExpression(node: TSESTree.Node): TSESTree.ThisExpression | undefined; +//# sourceMappingURL=getThisExpression.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getThisExpression.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getThisExpression.d.ts.map new file mode 100644 index 0000000..c86b63b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getThisExpression.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getThisExpression.d.ts","sourceRoot":"","sources":["../../src/util/getThisExpression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,QAAQ,CAAC,IAAI,GAClB,QAAQ,CAAC,cAAc,GAAG,SAAS,CAgBrC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getThisExpression.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getThisExpression.js new file mode 100644 index 0000000..d7d3666 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getThisExpression.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getThisExpression = getThisExpression; +const utils_1 = require("@typescript-eslint/utils"); +function getThisExpression(node) { + while (true) { + if (node.type === utils_1.AST_NODE_TYPES.CallExpression) { + node = node.callee; + } + else if (node.type === utils_1.AST_NODE_TYPES.ThisExpression) { + return node; + } + else if (node.type === utils_1.AST_NODE_TYPES.MemberExpression) { + node = node.object; + } + else if (node.type === utils_1.AST_NODE_TYPES.ChainExpression) { + node = node.expression; + } + else { + break; + } + } + return; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getValueOfLiteralType.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getValueOfLiteralType.d.ts new file mode 100644 index 0000000..83460dc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getValueOfLiteralType.d.ts @@ -0,0 +1,3 @@ +import type * as ts from 'typescript'; +export declare const getValueOfLiteralType: (type: ts.LiteralType) => bigint | number | string; +//# sourceMappingURL=getValueOfLiteralType.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getValueOfLiteralType.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getValueOfLiteralType.d.ts.map new file mode 100644 index 0000000..4508519 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getValueOfLiteralType.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getValueOfLiteralType.d.ts","sourceRoot":"","sources":["../../src/util/getValueOfLiteralType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAYtC,eAAO,MAAM,qBAAqB,GAChC,MAAM,EAAE,CAAC,WAAW,KACnB,MAAM,GAAG,MAAM,GAAG,MAKpB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getValueOfLiteralType.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getValueOfLiteralType.js new file mode 100644 index 0000000..0b2156b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getValueOfLiteralType.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getValueOfLiteralType = void 0; +const valueIsPseudoBigInt = (value) => { + return typeof value === 'object'; +}; +const pseudoBigIntToBigInt = (value) => { + return BigInt((value.negative ? '-' : '') + value.base10Value); +}; +const getValueOfLiteralType = (type) => { + if (valueIsPseudoBigInt(type.value)) { + return pseudoBigIntToBigInt(type.value); + } + return type.value; +}; +exports.getValueOfLiteralType = getValueOfLiteralType; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.d.ts new file mode 100644 index 0000000..4ee59b9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.d.ts @@ -0,0 +1,3 @@ +import type { OperatorPrecedence } from './getOperatorPrecedence'; +export declare function getWrappedCode(text: string, nodePrecedence: OperatorPrecedence, parentPrecedence: OperatorPrecedence): string; +//# sourceMappingURL=getWrappedCode.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.d.ts.map new file mode 100644 index 0000000..b9fd20b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getWrappedCode.d.ts","sourceRoot":"","sources":["../../src/util/getWrappedCode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,kBAAkB,EAClC,gBAAgB,EAAE,kBAAkB,GACnC,MAAM,CAER"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.js new file mode 100644 index 0000000..19aaad4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getWrappedCode = getWrappedCode; +function getWrappedCode(text, nodePrecedence, parentPrecedence) { + return nodePrecedence > parentPrecedence ? text : `(${text})`; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.d.ts new file mode 100644 index 0000000..3409a2e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.d.ts @@ -0,0 +1,43 @@ +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; +interface WrappingFixerParams { + /** + * Descendant of `node` we want to preserve. + * Use this to replace some code with another. + * By default it's the node we are modifying (so nothing is removed). + * You can pass multiple nodes as an array. + */ + innerNode?: TSESTree.Node | TSESTree.Node[]; + /** The node we want to modify. */ + node: TSESTree.Node; + /** Source code. */ + sourceCode: Readonly; + /** + * The function which gets the code of the `innerNode` and returns some code around it. + * Receives multiple arguments if there are multiple innerNodes. + * E.g. ``code => `${code} != null` `` + */ + wrap?: (...code: string[]) => string; +} +/** + * Wraps node with some code. Adds parentheses as necessary. + * @returns Fixer which adds the specified code and parens if necessary. + */ +export declare function getWrappingFixer(params: WrappingFixerParams): (fixer: TSESLint.RuleFixer) => TSESLint.RuleFix; +/** + * If the node to be moved and the destination node require parentheses, include parentheses in the node to be moved. + * @param sourceCode Source code of current file + * @param nodeToMove Nodes that need to be moved + * @param destinationNode Final destination node with nodeToMove + * @returns If parentheses are required, code for the nodeToMove node is returned with parentheses at both ends of the code. + */ +export declare function getMovedNodeCode(params: { + destinationNode: TSESTree.Node; + nodeToMove: TSESTree.Node; + sourceCode: Readonly; +}): string; +/** + * Check if a node will always have the same precedence if its parent changes. + */ +export declare function isStrongPrecedenceNode(innerNode: TSESTree.Node): boolean; +export {}; +//# sourceMappingURL=getWrappingFixer.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.d.ts.map new file mode 100644 index 0000000..d33e335 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getWrappingFixer.d.ts","sourceRoot":"","sources":["../../src/util/getWrappingFixer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQnE,UAAU,mBAAmB;IAC3B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC5C,kCAAkC;IAClC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IACpB,mBAAmB;IACnB,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC1C;;;;OAIG;IACH,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;CACtC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,mBAAmB,GAC1B,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,KAAK,QAAQ,CAAC,OAAO,CA+CjD;AACD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IACvC,eAAe,EAAE,QAAQ,CAAC,IAAI,CAAC;IAC/B,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC;IAC1B,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;CAC3C,GAAG,MAAM,CAeT;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,QAAQ,CAAC,IAAI,GAAG,OAAO,CAcxE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js new file mode 100644 index 0000000..0fa1ca7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js @@ -0,0 +1,184 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getWrappingFixer = getWrappingFixer; +exports.getMovedNodeCode = getMovedNodeCode; +exports.isStrongPrecedenceNode = isStrongPrecedenceNode; +const utils_1 = require("@typescript-eslint/utils"); +/** + * Wraps node with some code. Adds parentheses as necessary. + * @returns Fixer which adds the specified code and parens if necessary. + */ +function getWrappingFixer(params) { + const { node, innerNode = node, sourceCode, wrap } = params; + const innerNodes = Array.isArray(innerNode) ? innerNode : [innerNode]; + return (fixer) => { + const innerCodes = innerNodes.map(innerNode => { + let code = sourceCode.getText(innerNode); + /** + * Wrap our node in parens to prevent the following cases: + * - It has a weaker precedence than the code we are wrapping it in + * - It's gotten mistaken as block statement instead of object expression + */ + if (!isStrongPrecedenceNode(innerNode) || + isObjectExpressionInOneLineReturn(node, innerNode)) { + code = `(${code})`; + } + return code; + }); + if (!wrap) { + return fixer.replaceText(node, innerCodes.join('')); + } + // do the wrapping + let code = wrap(...innerCodes); + // check the outer expression's precedence + if (isWeakPrecedenceParent(node) && + // we wrapped the node in some expression which very likely has a different precedence than original wrapped node + // let's wrap the whole expression in parens just in case + !utils_1.ASTUtils.isParenthesized(node, sourceCode)) { + code = `(${code})`; + } + // check if we need to insert semicolon + if (/^[`([]/.test(code) && isMissingSemicolonBefore(node, sourceCode)) { + code = `;${code}`; + } + return fixer.replaceText(node, code); + }; +} +/** + * If the node to be moved and the destination node require parentheses, include parentheses in the node to be moved. + * @param sourceCode Source code of current file + * @param nodeToMove Nodes that need to be moved + * @param destinationNode Final destination node with nodeToMove + * @returns If parentheses are required, code for the nodeToMove node is returned with parentheses at both ends of the code. + */ +function getMovedNodeCode(params) { + const { destinationNode, nodeToMove: existingNode, sourceCode } = params; + const code = sourceCode.getText(existingNode); + if (isStrongPrecedenceNode(existingNode)) { + // Moved node never needs parens + return code; + } + if (!isWeakPrecedenceParent(destinationNode)) { + // Destination would never needs parens, regardless what node moves there + return code; + } + // Parens may be necessary + return `(${code})`; +} +/** + * Check if a node will always have the same precedence if its parent changes. + */ +function isStrongPrecedenceNode(innerNode) { + return (innerNode.type === utils_1.AST_NODE_TYPES.Literal || + innerNode.type === utils_1.AST_NODE_TYPES.Identifier || + innerNode.type === utils_1.AST_NODE_TYPES.TSTypeReference || + innerNode.type === utils_1.AST_NODE_TYPES.TSTypeOperator || + innerNode.type === utils_1.AST_NODE_TYPES.ArrayExpression || + innerNode.type === utils_1.AST_NODE_TYPES.ObjectExpression || + innerNode.type === utils_1.AST_NODE_TYPES.MemberExpression || + innerNode.type === utils_1.AST_NODE_TYPES.CallExpression || + innerNode.type === utils_1.AST_NODE_TYPES.NewExpression || + innerNode.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression || + innerNode.type === utils_1.AST_NODE_TYPES.TSInstantiationExpression); +} +/** + * Check if a node's parent could have different precedence if the node changes. + */ +function isWeakPrecedenceParent(node) { + const parent = node.parent; + if (!parent) { + return false; + } + if (parent.type === utils_1.AST_NODE_TYPES.UpdateExpression || + parent.type === utils_1.AST_NODE_TYPES.UnaryExpression || + parent.type === utils_1.AST_NODE_TYPES.BinaryExpression || + parent.type === utils_1.AST_NODE_TYPES.LogicalExpression || + parent.type === utils_1.AST_NODE_TYPES.ConditionalExpression || + parent.type === utils_1.AST_NODE_TYPES.AwaitExpression) { + return true; + } + if (parent.type === utils_1.AST_NODE_TYPES.MemberExpression && + parent.object === node) { + return true; + } + if ((parent.type === utils_1.AST_NODE_TYPES.CallExpression || + parent.type === utils_1.AST_NODE_TYPES.NewExpression) && + parent.callee === node) { + return true; + } + if (parent.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression && + parent.tag === node) { + return true; + } + return false; +} +/** + * Returns true if a node is at the beginning of expression statement and the statement above doesn't end with semicolon. + * Doesn't check if the node begins with `(`, `[` or `` ` ``. + */ +function isMissingSemicolonBefore(node, sourceCode) { + for (;;) { + // https://github.com/typescript-eslint/typescript-eslint/issues/6225 + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const parent = node.parent; + if (parent.type === utils_1.AST_NODE_TYPES.ExpressionStatement) { + const block = parent.parent; + if (block.type === utils_1.AST_NODE_TYPES.Program || + block.type === utils_1.AST_NODE_TYPES.BlockStatement) { + // parent is an expression statement in a block + const statementIndex = block.body.indexOf(parent); + const previousStatement = block.body[statementIndex - 1]; + if (statementIndex > 0 && + utils_1.ESLintUtils.nullThrows(sourceCode.getLastToken(previousStatement), 'Mismatched semicolon and block').value !== ';') { + return true; + } + } + } + if (!isLeftHandSide(node)) { + return false; + } + node = parent; + } +} +/** + * Checks if a node is LHS of an operator. + */ +function isLeftHandSide(node) { + // https://github.com/typescript-eslint/typescript-eslint/issues/6225 + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const parent = node.parent; + // a++ + if (parent.type === utils_1.AST_NODE_TYPES.UpdateExpression) { + return true; + } + // a + b + if ((parent.type === utils_1.AST_NODE_TYPES.BinaryExpression || + parent.type === utils_1.AST_NODE_TYPES.LogicalExpression || + parent.type === utils_1.AST_NODE_TYPES.AssignmentExpression) && + node === parent.left) { + return true; + } + // a ? b : c + if (parent.type === utils_1.AST_NODE_TYPES.ConditionalExpression && + node === parent.test) { + return true; + } + // a(b) + if (parent.type === utils_1.AST_NODE_TYPES.CallExpression && node === parent.callee) { + return true; + } + // a`b` + if (parent.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression && + node === parent.tag) { + return true; + } + return false; +} +/** + * Checks if a node's parent is arrow function expression and a inner node is object expression + */ +function isObjectExpressionInOneLineReturn(node, innerNode) { + return (node.parent?.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression && + node.parent.body === node && + innerNode.type === utils_1.AST_NODE_TYPES.ObjectExpression); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/hasOverloadSignatures.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/hasOverloadSignatures.d.ts new file mode 100644 index 0000000..6e66934 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/hasOverloadSignatures.d.ts @@ -0,0 +1,7 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { RuleContext } from '@typescript-eslint/utils/ts-eslint'; +/** + * @return `true` if the function or method node has overload signatures. + */ +export declare function hasOverloadSignatures(node: TSESTree.FunctionDeclaration | TSESTree.MethodDefinition, context: RuleContext): boolean; +//# sourceMappingURL=hasOverloadSignatures.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/hasOverloadSignatures.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/hasOverloadSignatures.d.ts.map new file mode 100644 index 0000000..166f4ec --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/hasOverloadSignatures.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hasOverloadSignatures.d.ts","sourceRoot":"","sources":["../../src/util/hasOverloadSignatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAMtE;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,QAAQ,CAAC,mBAAmB,GAAG,QAAQ,CAAC,gBAAgB,EAC9D,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,GACtC,OAAO,CAqCT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/hasOverloadSignatures.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/hasOverloadSignatures.js new file mode 100644 index 0000000..fcca5f1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/hasOverloadSignatures.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hasOverloadSignatures = hasOverloadSignatures; +const utils_1 = require("@typescript-eslint/utils"); +const misc_1 = require("./misc"); +/** + * @return `true` if the function or method node has overload signatures. + */ +function hasOverloadSignatures(node, context) { + // `export default function () {}` + if (node.parent.type === utils_1.AST_NODE_TYPES.ExportDefaultDeclaration) { + return node.parent.parent.body.some(member => { + return (member.type === utils_1.AST_NODE_TYPES.ExportDefaultDeclaration && + member.declaration.type === utils_1.AST_NODE_TYPES.TSDeclareFunction); + }); + } + // `export function f() {}` + if (node.parent.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration) { + return node.parent.parent.body.some(member => { + return (member.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration && + member.declaration?.type === utils_1.AST_NODE_TYPES.TSDeclareFunction && + getFunctionDeclarationName(member.declaration, context) === + getFunctionDeclarationName(node, context)); + }); + } + // either: + // - `function f() {}` + // - `class T { foo() {} }` + const nodeKey = getFunctionDeclarationName(node, context); + return node.parent.body.some(member => { + return ((member.type === utils_1.AST_NODE_TYPES.TSDeclareFunction || + (member.type === utils_1.AST_NODE_TYPES.MethodDefinition && + member.value.body == null)) && + nodeKey === getFunctionDeclarationName(member, context)); + }); +} +function getFunctionDeclarationName(node, context) { + if (node.type === utils_1.AST_NODE_TYPES.FunctionDeclaration || + node.type === utils_1.AST_NODE_TYPES.TSDeclareFunction) { + // For a `FunctionDeclaration` or `TSDeclareFunction` this may be `null` if + // and only if the parent is an `ExportDefaultDeclaration`. + // + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return node.id.name; + } + return (0, misc_1.getStaticMemberAccessValue)(node, context); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.d.ts new file mode 100644 index 0000000..aaf5b06 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.d.ts @@ -0,0 +1,38 @@ +import { ESLintUtils } from '@typescript-eslint/utils'; +export * from './astUtils'; +export * from './collectUnusedVariables'; +export * from './createRule'; +export * from './getFixOrSuggest'; +export * from './getFunctionHeadLoc'; +export * from './getOperatorPrecedence'; +export * from './getStaticStringValue'; +export * from './getStringLength'; +export * from './getTextWithParentheses'; +export * from './getThisExpression'; +export * from './getWrappingFixer'; +export * from './hasOverloadSignatures'; +export * from './isArrayMethodCallWithPredicate'; +export * from './isAssignee'; +export * from './isNodeEqual'; +export * from './isNullLiteral'; +export * from './isStartOfExpressionStatement'; +export * from './isUndefinedIdentifier'; +export * from './misc'; +export * from './needsPrecedingSemiColon'; +export * from './objectIterators'; +export * from './needsToBeAwaited'; +export * from './scopeUtils'; +export * from './types'; +export * from './getConstraintInfo'; +export * from './getValueOfLiteralType'; +export * from './isHigherPrecedenceThanAwait'; +export * from './skipChainExpression'; +export * from './truthinessUtils'; +export * from '@typescript-eslint/type-utils'; +export declare const applyDefault: typeof ESLintUtils.applyDefault, deepMerge: typeof ESLintUtils.deepMerge, getParserServices: typeof ESLintUtils.getParserServices, isObjectNotArray: typeof ESLintUtils.isObjectNotArray, nullThrows: typeof ESLintUtils.nullThrows, NullThrowsReasons: { + readonly MissingParent: "Expected node to have a parent."; + readonly MissingToken: (token: string, thing: string) => string; +}; +export type InferMessageIdsTypeFromRule = ESLintUtils.InferMessageIdsTypeFromRule; +export type InferOptionsTypeFromRule = ESLintUtils.InferOptionsTypeFromRule; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.d.ts.map new file mode 100644 index 0000000..d68a4d0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,+BAA+B,CAAC;AAE9C,eAAO,MACL,YAAY,mCACZ,SAAS,gCACT,iBAAiB,wCACjB,gBAAgB,uCAChB,UAAU,iCACV,iBAAiB;;;CACJ,CAAC;AAChB,MAAM,MAAM,2BAA2B,CAAC,CAAC,IACvC,WAAW,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC;AAC7C,MAAM,MAAM,wBAAwB,CAAC,CAAC,IACpC,WAAW,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js new file mode 100644 index 0000000..92a46d2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js @@ -0,0 +1,50 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NullThrowsReasons = exports.nullThrows = exports.isObjectNotArray = exports.getParserServices = exports.deepMerge = exports.applyDefault = void 0; +const utils_1 = require("@typescript-eslint/utils"); +__exportStar(require("./astUtils"), exports); +__exportStar(require("./collectUnusedVariables"), exports); +__exportStar(require("./createRule"), exports); +__exportStar(require("./getFixOrSuggest"), exports); +__exportStar(require("./getFunctionHeadLoc"), exports); +__exportStar(require("./getOperatorPrecedence"), exports); +__exportStar(require("./getStaticStringValue"), exports); +__exportStar(require("./getStringLength"), exports); +__exportStar(require("./getTextWithParentheses"), exports); +__exportStar(require("./getThisExpression"), exports); +__exportStar(require("./getWrappingFixer"), exports); +__exportStar(require("./hasOverloadSignatures"), exports); +__exportStar(require("./isArrayMethodCallWithPredicate"), exports); +__exportStar(require("./isAssignee"), exports); +__exportStar(require("./isNodeEqual"), exports); +__exportStar(require("./isNullLiteral"), exports); +__exportStar(require("./isStartOfExpressionStatement"), exports); +__exportStar(require("./isUndefinedIdentifier"), exports); +__exportStar(require("./misc"), exports); +__exportStar(require("./needsPrecedingSemiColon"), exports); +__exportStar(require("./objectIterators"), exports); +__exportStar(require("./needsToBeAwaited"), exports); +__exportStar(require("./scopeUtils"), exports); +__exportStar(require("./types"), exports); +__exportStar(require("./getConstraintInfo"), exports); +__exportStar(require("./getValueOfLiteralType"), exports); +__exportStar(require("./isHigherPrecedenceThanAwait"), exports); +__exportStar(require("./skipChainExpression"), exports); +__exportStar(require("./truthinessUtils"), exports); +// this is done for convenience - saves migrating all of the old rules +__exportStar(require("@typescript-eslint/type-utils"), exports); +exports.applyDefault = utils_1.ESLintUtils.applyDefault, exports.deepMerge = utils_1.ESLintUtils.deepMerge, exports.getParserServices = utils_1.ESLintUtils.getParserServices, exports.isObjectNotArray = utils_1.ESLintUtils.isObjectNotArray, exports.nullThrows = utils_1.ESLintUtils.nullThrows, exports.NullThrowsReasons = utils_1.ESLintUtils.NullThrowsReasons; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isArrayMethodCallWithPredicate.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isArrayMethodCallWithPredicate.d.ts new file mode 100644 index 0000000..15f30c1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isArrayMethodCallWithPredicate.d.ts @@ -0,0 +1,4 @@ +import type { ParserServicesWithTypeInformation, TSESTree } from '@typescript-eslint/utils'; +import type { RuleContext } from '@typescript-eslint/utils/ts-eslint'; +export declare function isArrayMethodCallWithPredicate(context: RuleContext, services: ParserServicesWithTypeInformation, node: TSESTree.CallExpression): boolean; +//# sourceMappingURL=isArrayMethodCallWithPredicate.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isArrayMethodCallWithPredicate.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isArrayMethodCallWithPredicate.d.ts.map new file mode 100644 index 0000000..b15ef09 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isArrayMethodCallWithPredicate.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isArrayMethodCallWithPredicate.d.ts","sourceRoot":"","sources":["../../src/util/isArrayMethodCallWithPredicate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAkBtE,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EACvC,QAAQ,EAAE,iCAAiC,EAC3C,IAAI,EAAE,QAAQ,CAAC,cAAc,GAC5B,OAAO,CAiBT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isArrayMethodCallWithPredicate.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isArrayMethodCallWithPredicate.js new file mode 100644 index 0000000..16c285b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isArrayMethodCallWithPredicate.js @@ -0,0 +1,64 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isArrayMethodCallWithPredicate = isArrayMethodCallWithPredicate; +const type_utils_1 = require("@typescript-eslint/type-utils"); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const misc_1 = require("./misc"); +const ARRAY_PREDICATE_FUNCTIONS = new Set([ + 'every', + 'filter', + 'find', + 'findIndex', + 'findLast', + 'findLastIndex', + 'some', +]); +function isArrayMethodCallWithPredicate(context, services, node) { + if (node.callee.type !== utils_1.AST_NODE_TYPES.MemberExpression) { + return false; + } + const staticAccessValue = (0, misc_1.getStaticMemberAccessValue)(node.callee, context); + if (!ARRAY_PREDICATE_FUNCTIONS.has(staticAccessValue)) { + return false; + } + const checker = services.program.getTypeChecker(); + const type = (0, type_utils_1.getConstrainedTypeAtLocation)(services, node.callee.object); + return tsutils + .unionConstituents(type) + .flatMap(part => tsutils.intersectionConstituents(part)) + .some(t => checker.isArrayType(t) || checker.isTupleType(t)); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.d.ts new file mode 100644 index 0000000..2c9546a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.d.ts @@ -0,0 +1,3 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +export declare function isAssignee(node: TSESTree.Node): boolean; +//# sourceMappingURL=isAssignee.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.d.ts.map new file mode 100644 index 0000000..7f4fa50 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isAssignee.d.ts","sourceRoot":"","sources":["../../src/util/isAssignee.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,OAAO,CA+DvD"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.js new file mode 100644 index 0000000..da36a29 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isAssignee = isAssignee; +const utils_1 = require("@typescript-eslint/utils"); +function isAssignee(node) { + const parent = node.parent; + if (!parent) { + return false; + } + // a[i] = 1, a[i] += 1, etc. + if (parent.type === utils_1.AST_NODE_TYPES.AssignmentExpression && + parent.left === node) { + return true; + } + // delete a[i] + if (parent.type === utils_1.AST_NODE_TYPES.UnaryExpression && + parent.operator === 'delete' && + parent.argument === node) { + return true; + } + // a[i]++, --a[i], etc. + if (parent.type === utils_1.AST_NODE_TYPES.UpdateExpression && + parent.argument === node) { + return true; + } + // [a[i]] = [0] + if (parent.type === utils_1.AST_NODE_TYPES.ArrayPattern) { + return true; + } + // [...a[i]] = [0] + if (parent.type === utils_1.AST_NODE_TYPES.RestElement) { + return true; + } + // ({ foo: a[i] }) = { foo: 0 } + if (parent.type === utils_1.AST_NODE_TYPES.Property && + parent.value === node && + parent.parent.type === utils_1.AST_NODE_TYPES.ObjectExpression && + isAssignee(parent.parent)) { + return true; + } + // (a[i] as number)++, [...a[i]!] = [0], etc. + if ((parent.type === utils_1.AST_NODE_TYPES.TSNonNullExpression || + parent.type === utils_1.AST_NODE_TYPES.TSAsExpression || + parent.type === utils_1.AST_NODE_TYPES.TSTypeAssertion || + parent.type === utils_1.AST_NODE_TYPES.TSSatisfiesExpression) && + isAssignee(parent)) { + return true; + } + return false; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isHigherPrecedenceThanAwait.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isHigherPrecedenceThanAwait.d.ts new file mode 100644 index 0000000..6933e43 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isHigherPrecedenceThanAwait.d.ts @@ -0,0 +1,3 @@ +import * as ts from 'typescript'; +export declare function isHigherPrecedenceThanAwait(tsNode: ts.Node): boolean; +//# sourceMappingURL=isHigherPrecedenceThanAwait.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isHigherPrecedenceThanAwait.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isHigherPrecedenceThanAwait.d.ts.map new file mode 100644 index 0000000..7ddabbb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isHigherPrecedenceThanAwait.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isHigherPrecedenceThanAwait.d.ts","sourceRoot":"","sources":["../../src/util/isHigherPrecedenceThanAwait.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAIjC,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAUpE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isHigherPrecedenceThanAwait.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isHigherPrecedenceThanAwait.js new file mode 100644 index 0000000..bd2cf82 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isHigherPrecedenceThanAwait.js @@ -0,0 +1,46 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isHigherPrecedenceThanAwait = isHigherPrecedenceThanAwait; +const ts = __importStar(require("typescript")); +const getOperatorPrecedence_1 = require("./getOperatorPrecedence"); +function isHigherPrecedenceThanAwait(tsNode) { + const operator = ts.isBinaryExpression(tsNode) + ? tsNode.operatorToken.kind + : ts.SyntaxKind.Unknown; + const nodePrecedence = (0, getOperatorPrecedence_1.getOperatorPrecedence)(tsNode.kind, operator); + const awaitPrecedence = (0, getOperatorPrecedence_1.getOperatorPrecedence)(ts.SyntaxKind.AwaitExpression, ts.SyntaxKind.Unknown); + return nodePrecedence > awaitPrecedence; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.d.ts new file mode 100644 index 0000000..d896733 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.d.ts @@ -0,0 +1,3 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +export declare function isNodeEqual(a: TSESTree.Node, b: TSESTree.Node): boolean; +//# sourceMappingURL=isNodeEqual.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.d.ts.map new file mode 100644 index 0000000..dc2e953 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isNodeEqual.d.ts","sourceRoot":"","sources":["../../src/util/isNodeEqual.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,wBAAgB,WAAW,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,IAAI,GAAG,OAAO,CA4BvE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js new file mode 100644 index 0000000..3b5c9ad --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isNodeEqual = isNodeEqual; +const utils_1 = require("@typescript-eslint/utils"); +function isNodeEqual(a, b) { + if (a.type !== b.type) { + return false; + } + if (a.type === utils_1.AST_NODE_TYPES.ThisExpression && + b.type === utils_1.AST_NODE_TYPES.ThisExpression) { + return true; + } + if (a.type === utils_1.AST_NODE_TYPES.Literal && b.type === utils_1.AST_NODE_TYPES.Literal) { + return a.value === b.value; + } + if (a.type === utils_1.AST_NODE_TYPES.Identifier && + b.type === utils_1.AST_NODE_TYPES.Identifier) { + return a.name === b.name; + } + if (a.type === utils_1.AST_NODE_TYPES.MemberExpression && + b.type === utils_1.AST_NODE_TYPES.MemberExpression) { + return (isNodeEqual(a.property, b.property) && isNodeEqual(a.object, b.object)); + } + return false; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.d.ts new file mode 100644 index 0000000..60af235 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.d.ts @@ -0,0 +1,3 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +export declare function isNullLiteral(i: TSESTree.Node): i is TSESTree.NullLiteral; +//# sourceMappingURL=isNullLiteral.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.d.ts.map new file mode 100644 index 0000000..1946d9a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isNullLiteral.d.ts","sourceRoot":"","sources":["../../src/util/isNullLiteral.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,wBAAgB,aAAa,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,GAAG,CAAC,IAAI,QAAQ,CAAC,WAAW,CAEzE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js new file mode 100644 index 0000000..0655562 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isNullLiteral = isNullLiteral; +const utils_1 = require("@typescript-eslint/utils"); +function isNullLiteral(i) { + return i.type === utils_1.AST_NODE_TYPES.Literal && i.value == null; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isPromiseAggregatorMethod.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isPromiseAggregatorMethod.d.ts new file mode 100644 index 0000000..0c749b4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isPromiseAggregatorMethod.d.ts @@ -0,0 +1,4 @@ +import type { ParserServicesWithTypeInformation, TSESTree } from '@typescript-eslint/utils'; +import type { RuleContext } from '@typescript-eslint/utils/ts-eslint'; +export declare function isPromiseAggregatorMethod(context: RuleContext, services: ParserServicesWithTypeInformation, node: TSESTree.CallExpression): boolean; +//# sourceMappingURL=isPromiseAggregatorMethod.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isPromiseAggregatorMethod.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isPromiseAggregatorMethod.d.ts.map new file mode 100644 index 0000000..1fe33e7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isPromiseAggregatorMethod.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isPromiseAggregatorMethod.d.ts","sourceRoot":"","sources":["../../src/util/isPromiseAggregatorMethod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAiBtE,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EACvC,QAAQ,EAAE,iCAAiC,EAC3C,IAAI,EAAE,QAAQ,CAAC,cAAc,GAC5B,OAAO,CAeT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isPromiseAggregatorMethod.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isPromiseAggregatorMethod.js new file mode 100644 index 0000000..40dc4d3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isPromiseAggregatorMethod.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isPromiseAggregatorMethod = isPromiseAggregatorMethod; +const type_utils_1 = require("@typescript-eslint/type-utils"); +const utils_1 = require("@typescript-eslint/utils"); +const misc_1 = require("./misc"); +const PROMISE_CONSTRUCTOR_ARRAY_METHODS = new Set([ + 'all', + 'allSettled', + 'race', + 'any', +]); +function isPromiseAggregatorMethod(context, services, node) { + if (node.callee.type !== utils_1.AST_NODE_TYPES.MemberExpression) { + return false; + } + const staticAccessValue = (0, misc_1.getStaticMemberAccessValue)(node.callee, context); + if (!PROMISE_CONSTRUCTOR_ARRAY_METHODS.has(staticAccessValue)) { + return false; + } + return (0, type_utils_1.isPromiseConstructorLike)(services.program, (0, type_utils_1.getConstrainedTypeAtLocation)(services, node.callee.object)); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatement.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatement.d.ts new file mode 100644 index 0000000..9597553 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatement.d.ts @@ -0,0 +1,8 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +/** + * Tests if a node appears at the beginning of an ancestor ExpressionStatement node. + * @param node The node to check. + * @returns Whether the node appears at the beginning of an ancestor ExpressionStatement node. + */ +export declare function isStartOfExpressionStatement(node: TSESTree.Node): boolean; +//# sourceMappingURL=isStartOfExpressionStatement.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatement.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatement.d.ts.map new file mode 100644 index 0000000..44e6d3c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatement.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isStartOfExpressionStatement.d.ts","sourceRoot":"","sources":["../../src/util/isStartOfExpressionStatement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAOzD;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,OAAO,CAUzE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatement.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatement.js new file mode 100644 index 0000000..055ea4a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatement.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isStartOfExpressionStatement = isStartOfExpressionStatement; +const utils_1 = require("@typescript-eslint/utils"); +// The following is copied from `eslint`'s source code. +// https://github.com/eslint/eslint/blob/3a4eaf921543b1cd5d1df4ea9dec02fab396af2a/lib/rules/utils/ast-utils.js#L1026-L1041 +// Could be export { isStartOfExpressionStatement } from 'eslint/lib/rules/utils/ast-utils' +/** + * Tests if a node appears at the beginning of an ancestor ExpressionStatement node. + * @param node The node to check. + * @returns Whether the node appears at the beginning of an ancestor ExpressionStatement node. + */ +function isStartOfExpressionStatement(node) { + const start = node.range[0]; + let ancestor = node; + while ((ancestor = ancestor.parent) && ancestor.range[0] === start) { + if (ancestor.type === utils_1.AST_NODE_TYPES.ExpressionStatement) { + return true; + } + } + return false; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeImport.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeImport.d.ts new file mode 100644 index 0000000..81e0f38 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeImport.d.ts @@ -0,0 +1,13 @@ +import type { Definition, ImportBindingDefinition } from '@typescript-eslint/scope-manager'; +/** + * Determine whether a variable definition is a type import. e.g.: + * + * ```ts + * import type { Foo } from 'foo'; + * import { type Bar } from 'bar'; + * ``` + * + * @param definition - The variable definition to check. + */ +export declare function isTypeImport(definition?: Definition): definition is ImportBindingDefinition; +//# sourceMappingURL=isTypeImport.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeImport.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeImport.d.ts.map new file mode 100644 index 0000000..313e90b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeImport.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isTypeImport.d.ts","sourceRoot":"","sources":["../../src/util/isTypeImport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACxB,MAAM,kCAAkC,CAAC;AAK1C;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,UAAU,CAAC,EAAE,UAAU,GACtB,UAAU,IAAI,uBAAuB,CAOvC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeImport.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeImport.js new file mode 100644 index 0000000..1414c22 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeImport.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isTypeImport = isTypeImport; +const scope_manager_1 = require("@typescript-eslint/scope-manager"); +const utils_1 = require("@typescript-eslint/utils"); +/** + * Determine whether a variable definition is a type import. e.g.: + * + * ```ts + * import type { Foo } from 'foo'; + * import { type Bar } from 'bar'; + * ``` + * + * @param definition - The variable definition to check. + */ +function isTypeImport(definition) { + return (definition?.type === scope_manager_1.DefinitionType.ImportBinding && + (definition.parent.importKind === 'type' || + (definition.node.type === utils_1.AST_NODE_TYPES.ImportSpecifier && + definition.node.importKind === 'type'))); +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.d.ts new file mode 100644 index 0000000..9afe73b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.d.ts @@ -0,0 +1,3 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +export declare function isUndefinedIdentifier(i: TSESTree.Node): boolean; +//# sourceMappingURL=isUndefinedIdentifier.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.d.ts.map new file mode 100644 index 0000000..72402ee --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isUndefinedIdentifier.d.ts","sourceRoot":"","sources":["../../src/util/isUndefinedIdentifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,GAAG,OAAO,CAE/D"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js new file mode 100644 index 0000000..0bcae75 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isUndefinedIdentifier = isUndefinedIdentifier; +const utils_1 = require("@typescript-eslint/utils"); +function isUndefinedIdentifier(i) { + return i.type === utils_1.AST_NODE_TYPES.Identifier && i.name === 'undefined'; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.d.ts new file mode 100644 index 0000000..8b0906f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.d.ts @@ -0,0 +1,116 @@ +/** + * @fileoverview Really small utility functions that didn't deserve their own files + */ +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; +import type { RuleContext } from '@typescript-eslint/utils/ts-eslint'; +import * as ts from 'typescript'; +/** + * Check if the context file name is *.d.ts or *.d.tsx + */ +export declare function isDefinitionFile(fileName: string): boolean; +/** + * Upper cases the first character or the string + */ +export declare function upperCaseFirst(str: string): string; +export declare function arrayGroupByToMap(array: T[], getKey: (item: T) => Key): Map; +/** Return true if both parameters are equal. */ +export type Equal = (a: T, b: T) => boolean; +export declare function arraysAreEqual(a: T[] | undefined, b: T[] | undefined, eq: (a: T, b: T) => boolean): boolean; +/** Returns the first non-`undefined` result. */ +export declare function findFirstResult(inputs: T[], getResult: (t: T) => U | undefined): U | undefined; +/** + * Gets a string representation of the name of the index signature. + */ +export declare function getNameFromIndexSignature(node: TSESTree.TSIndexSignature): string; +export declare enum MemberNameType { + Private = 1, + Quoted = 2, + Normal = 3, + Expression = 4 +} +/** + * Gets a string name representation of the name of the given MethodDefinition + * or PropertyDefinition node, with handling for computed property names. + */ +export declare function getNameFromMember(member: TSESTree.AccessorProperty | TSESTree.MethodDefinition | TSESTree.Property | TSESTree.PropertyDefinition | TSESTree.TSAbstractAccessorProperty | TSESTree.TSAbstractMethodDefinition | TSESTree.TSAbstractPropertyDefinition | TSESTree.TSMethodSignature | TSESTree.TSPropertySignature, sourceCode: TSESLint.SourceCode): { + name: string; + type: MemberNameType; +}; +export type ExcludeKeys, Keys extends keyof Obj> = { + [k in Exclude]: Obj[k]; +}; +export type RequireKeys, Keys extends keyof Obj> = { + [k in Keys]-?: Exclude; +} & ExcludeKeys; +export declare function getEnumNames(myEnum: Record): T[]; +/** + * Given an array of words, returns an English-friendly concatenation, separated with commas, with + * the `and` clause inserted before the last item. + * + * Example: ['foo', 'bar', 'baz' ] returns the string "foo, bar, and baz". + */ +export declare function formatWordList(words: string[]): string; +/** + * Iterates the array in reverse and returns the index of the first element it + * finds which passes the predicate function. + * + * @returns Returns the index of the element if it finds it or -1 otherwise. + */ +export declare function findLastIndex(members: T[], predicate: (member: T) => boolean | null | undefined): number; +export declare function typeNodeRequiresParentheses(node: TSESTree.TypeNode, text: string): boolean; +export declare function isRestParameterDeclaration(decl: ts.Declaration): boolean; +export declare function isParenlessArrowFunction(node: TSESTree.ArrowFunctionExpression, sourceCode: TSESLint.SourceCode): boolean; +export type NodeWithKey = TSESTree.AccessorProperty | TSESTree.MemberExpression | TSESTree.MethodDefinition | TSESTree.Property | TSESTree.PropertyDefinition | TSESTree.TSAbstractMethodDefinition | TSESTree.TSAbstractPropertyDefinition; +/** + * Gets a member being accessed or declared if its value can be determined statically, and + * resolves it to the string or symbol value that will be used as the actual member + * access key at runtime. Otherwise, returns `undefined`. + * + * ```ts + * x.member // returns 'member' + * ^^^^^^^^ + * + * x?.member // returns 'member' (optional chaining is treated the same) + * ^^^^^^^^^ + * + * x['value'] // returns 'value' + * ^^^^^^^^^^ + * + * x[Math.random()] // returns undefined (not a static value) + * ^^^^^^^^^^^^^^^^ + * + * arr[0] // returns '0' (NOT 0) + * ^^^^^^ + * + * arr[0n] // returns '0' (NOT 0n) + * ^^^^^^^ + * + * const s = Symbol.for('symbolName') + * x[s] // returns `Symbol.for('symbolName')` (since it's a static/global symbol) + * ^^^^ + * + * const us = Symbol('symbolName') + * x[us] // returns undefined (since it's a unique symbol, so not statically analyzable) + * ^^^^^ + * + * var object = { + * 1234: '4567', // returns '1234' (NOT 1234) + * ^^^^^^^^^^^^ + * method() { } // returns 'method' + * ^^^^^^^^^^^^ + * } + * + * class WithMembers { + * foo: string // returns 'foo' + * ^^^^^^^^^^^ + * } + * ``` + */ +export declare function getStaticMemberAccessValue(node: NodeWithKey, { sourceCode }: RuleContext): string | symbol | undefined; +/** + * Answers whether the member expression looks like + * `x.value`, `x['value']`, + * or even `const v = 'value'; x[v]` (or optional variants thereof). + */ +export declare const isStaticMemberAccessOfValue: (memberExpression: NodeWithKey, context: RuleContext, ...values: (string | symbol)[]) => boolean; +//# sourceMappingURL=misc.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.d.ts.map new file mode 100644 index 0000000..f31ebc1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../src/util/misc.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAA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ACvB,IAAI,EAAE,MAAM,GACX,OAAO,CAQT;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,GAAG,OAAO,CAExE;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,QAAQ,CAAC,uBAAuB,EACtC,UAAU,EAAE,QAAQ,CAAC,UAAU,GAC9B,OAAO,CAIT;AAED,MAAM,MAAM,WAAW,GACnB,QAAQ,CAAC,gBAAgB,GACzB,QAAQ,CAAC,gBAAgB,GACzB,QAAQ,CAAC,gBAAgB,GACzB,QAAQ,CAAC,QAAQ,GACjB,QAAQ,CAAC,kBAAkB,GAC3B,QAAQ,CAAC,0BAA0B,GACnC,QAAQ,CAAC,4BAA4B,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,WAAW,EACjB,EAAE,UAAU,EAAE,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,GAC7C,MAAM,GAAG,MAAM,GAAG,SAAS,CAiB7B;AAED;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GACtC,kBAAkB,WAAW,EAC7B,SAAS,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EACvC,GAAG,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAC7B,OAGA,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js new file mode 100644 index 0000000..c9fecd3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js @@ -0,0 +1,273 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isStaticMemberAccessOfValue = exports.MemberNameType = void 0; +exports.isDefinitionFile = isDefinitionFile; +exports.upperCaseFirst = upperCaseFirst; +exports.arrayGroupByToMap = arrayGroupByToMap; +exports.arraysAreEqual = arraysAreEqual; +exports.findFirstResult = findFirstResult; +exports.getNameFromIndexSignature = getNameFromIndexSignature; +exports.getNameFromMember = getNameFromMember; +exports.getEnumNames = getEnumNames; +exports.formatWordList = formatWordList; +exports.findLastIndex = findLastIndex; +exports.typeNodeRequiresParentheses = typeNodeRequiresParentheses; +exports.isRestParameterDeclaration = isRestParameterDeclaration; +exports.isParenlessArrowFunction = isParenlessArrowFunction; +exports.getStaticMemberAccessValue = getStaticMemberAccessValue; +const type_utils_1 = require("@typescript-eslint/type-utils"); +const utils_1 = require("@typescript-eslint/utils"); +const ts = __importStar(require("typescript")); +const astUtils_1 = require("./astUtils"); +const DEFINITION_EXTENSIONS = [ + ts.Extension.Dts, + ts.Extension.Dcts, + ts.Extension.Dmts, +]; +/** + * Check if the context file name is *.d.ts or *.d.tsx + */ +function isDefinitionFile(fileName) { + const lowerFileName = fileName.toLowerCase(); + for (const definitionExt of DEFINITION_EXTENSIONS) { + if (lowerFileName.endsWith(definitionExt)) { + return true; + } + } + return /\.d\.(ts|cts|mts|.*\.ts)$/.test(lowerFileName); +} +/** + * Upper cases the first character or the string + */ +function upperCaseFirst(str) { + return str[0].toUpperCase() + str.slice(1); +} +function arrayGroupByToMap(array, getKey) { + const groups = new Map(); + for (const item of array) { + const key = getKey(item); + const existing = groups.get(key); + if (existing) { + existing.push(item); + } + else { + groups.set(key, [item]); + } + } + return groups; +} +function arraysAreEqual(a, b, eq) { + return (a === b || + (a != null && + b != null && + a.length === b.length && + a.every((x, idx) => eq(x, b[idx])))); +} +/** Returns the first non-`undefined` result. */ +function findFirstResult(inputs, getResult) { + for (const element of inputs) { + const result = getResult(element); + // eslint-disable-next-line @typescript-eslint/internal/eqeq-nullish + if (result !== undefined) { + return result; + } + } + return undefined; +} +/** + * Gets a string representation of the name of the index signature. + */ +function getNameFromIndexSignature(node) { + const propName = node.parameters.find((parameter) => parameter.type === utils_1.AST_NODE_TYPES.Identifier); + return propName ? propName.name : '(index signature)'; +} +var MemberNameType; +(function (MemberNameType) { + MemberNameType[MemberNameType["Private"] = 1] = "Private"; + MemberNameType[MemberNameType["Quoted"] = 2] = "Quoted"; + MemberNameType[MemberNameType["Normal"] = 3] = "Normal"; + MemberNameType[MemberNameType["Expression"] = 4] = "Expression"; +})(MemberNameType || (exports.MemberNameType = MemberNameType = {})); +/** + * Gets a string name representation of the name of the given MethodDefinition + * or PropertyDefinition node, with handling for computed property names. + */ +function getNameFromMember(member, sourceCode) { + if (member.key.type === utils_1.AST_NODE_TYPES.Identifier) { + return { + name: member.key.name, + type: MemberNameType.Normal, + }; + } + if (member.key.type === utils_1.AST_NODE_TYPES.PrivateIdentifier) { + return { + name: `#${member.key.name}`, + type: MemberNameType.Private, + }; + } + if (member.key.type === utils_1.AST_NODE_TYPES.Literal) { + const name = `${member.key.value}`; + if ((0, type_utils_1.requiresQuoting)(name)) { + return { + name: `"${name}"`, + type: MemberNameType.Quoted, + }; + } + return { + name, + type: MemberNameType.Normal, + }; + } + return { + name: sourceCode.text.slice(...member.key.range), + type: MemberNameType.Expression, + }; +} +function getEnumNames(myEnum) { + return Object.keys(myEnum).filter(x => isNaN(Number(x))); +} +/** + * Given an array of words, returns an English-friendly concatenation, separated with commas, with + * the `and` clause inserted before the last item. + * + * Example: ['foo', 'bar', 'baz' ] returns the string "foo, bar, and baz". + */ +function formatWordList(words) { + if (!words.length) { + return ''; + } + if (words.length === 1) { + return words[0]; + } + return [words.slice(0, -1).join(', '), words.slice(-1)[0]].join(' and '); +} +/** + * Iterates the array in reverse and returns the index of the first element it + * finds which passes the predicate function. + * + * @returns Returns the index of the element if it finds it or -1 otherwise. + */ +function findLastIndex(members, predicate) { + let idx = members.length - 1; + while (idx >= 0) { + const valid = predicate(members[idx]); + if (valid) { + return idx; + } + idx--; + } + return -1; +} +function typeNodeRequiresParentheses(node, text) { + return (node.type === utils_1.AST_NODE_TYPES.TSFunctionType || + node.type === utils_1.AST_NODE_TYPES.TSConstructorType || + node.type === utils_1.AST_NODE_TYPES.TSConditionalType || + (node.type === utils_1.AST_NODE_TYPES.TSUnionType && text.startsWith('|')) || + (node.type === utils_1.AST_NODE_TYPES.TSIntersectionType && text.startsWith('&'))); +} +function isRestParameterDeclaration(decl) { + return ts.isParameter(decl) && decl.dotDotDotToken != null; +} +function isParenlessArrowFunction(node, sourceCode) { + return (node.params.length === 1 && !(0, astUtils_1.isParenthesized)(node.params[0], sourceCode)); +} +/** + * Gets a member being accessed or declared if its value can be determined statically, and + * resolves it to the string or symbol value that will be used as the actual member + * access key at runtime. Otherwise, returns `undefined`. + * + * ```ts + * x.member // returns 'member' + * ^^^^^^^^ + * + * x?.member // returns 'member' (optional chaining is treated the same) + * ^^^^^^^^^ + * + * x['value'] // returns 'value' + * ^^^^^^^^^^ + * + * x[Math.random()] // returns undefined (not a static value) + * ^^^^^^^^^^^^^^^^ + * + * arr[0] // returns '0' (NOT 0) + * ^^^^^^ + * + * arr[0n] // returns '0' (NOT 0n) + * ^^^^^^^ + * + * const s = Symbol.for('symbolName') + * x[s] // returns `Symbol.for('symbolName')` (since it's a static/global symbol) + * ^^^^ + * + * const us = Symbol('symbolName') + * x[us] // returns undefined (since it's a unique symbol, so not statically analyzable) + * ^^^^^ + * + * var object = { + * 1234: '4567', // returns '1234' (NOT 1234) + * ^^^^^^^^^^^^ + * method() { } // returns 'method' + * ^^^^^^^^^^^^ + * } + * + * class WithMembers { + * foo: string // returns 'foo' + * ^^^^^^^^^^^ + * } + * ``` + */ +function getStaticMemberAccessValue(node, { sourceCode }) { + const key = node.type === utils_1.AST_NODE_TYPES.MemberExpression ? node.property : node.key; + const { type } = key; + if (!node.computed && + (type === utils_1.AST_NODE_TYPES.Identifier || + type === utils_1.AST_NODE_TYPES.PrivateIdentifier)) { + return key.name; + } + const result = (0, astUtils_1.getStaticValue)(key, sourceCode.getScope(node)); + if (!result) { + return undefined; + } + const { value } = result; + return typeof value === 'symbol' ? value : String(value); +} +/** + * Answers whether the member expression looks like + * `x.value`, `x['value']`, + * or even `const v = 'value'; x[v]` (or optional variants thereof). + */ +const isStaticMemberAccessOfValue = (memberExpression, context, ...values) => values.includes(getStaticMemberAccessValue(memberExpression, context)); +exports.isStaticMemberAccessOfValue = isStaticMemberAccessOfValue; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsPrecedingSemiColon.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsPrecedingSemiColon.d.ts new file mode 100644 index 0000000..af6cefb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsPrecedingSemiColon.d.ts @@ -0,0 +1,12 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { SourceCode } from '@typescript-eslint/utils/ts-eslint'; +/** + * Determines whether an opening parenthesis `(`, bracket `[` or backtick ``` ` ``` needs to be preceded by a semicolon. + * This opening parenthesis or bracket should be at the start of an `ExpressionStatement`, a `MethodDefinition` or at + * the start of the body of an `ArrowFunctionExpression`. + * @param sourceCode The source code object. + * @param node A node at the position where an opening parenthesis or bracket will be inserted. + * @returns Whether a semicolon is required before the opening parenthesis or bracket. + */ +export declare function needsPrecedingSemicolon(sourceCode: SourceCode, node: TSESTree.Node): boolean; +//# sourceMappingURL=needsPrecedingSemiColon.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsPrecedingSemiColon.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsPrecedingSemiColon.d.ts.map new file mode 100644 index 0000000..83a0c5e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsPrecedingSemiColon.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"needsPrecedingSemiColon.d.ts","sourceRoot":"","sources":["../../src/util/needsPrecedingSemiColon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AA6DrE;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,QAAQ,CAAC,IAAI,GAClB,OAAO,CAoDT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsPrecedingSemiColon.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsPrecedingSemiColon.js new file mode 100644 index 0000000..7bfa2a5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsPrecedingSemiColon.js @@ -0,0 +1,97 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.needsPrecedingSemicolon = needsPrecedingSemicolon; +const utils_1 = require("@typescript-eslint/utils"); +const ast_utils_1 = require("@typescript-eslint/utils/ast-utils"); +// The following is adapted from `eslint`'s source code. +// https://github.com/eslint/eslint/blob/3a4eaf921543b1cd5d1df4ea9dec02fab396af2a/lib/rules/utils/ast-utils.js#L1043-L1132 +// Could be export { isStartOfExpressionStatement } from 'eslint/lib/rules/utils/ast-utils' +const BREAK_OR_CONTINUE = new Set([ + utils_1.AST_NODE_TYPES.BreakStatement, + utils_1.AST_NODE_TYPES.ContinueStatement, +]); +// Declaration types that must contain a string Literal node at the end. +const DECLARATIONS = new Set([ + utils_1.AST_NODE_TYPES.ExportAllDeclaration, + utils_1.AST_NODE_TYPES.ExportNamedDeclaration, + utils_1.AST_NODE_TYPES.ImportDeclaration, +]); +const IDENTIFIER_OR_KEYWORD = new Set([ + utils_1.AST_NODE_TYPES.Identifier, + utils_1.AST_TOKEN_TYPES.Keyword, +]); +// Keywords that can immediately precede an ExpressionStatement node, mapped to the their node types. +const NODE_TYPES_BY_KEYWORD = { + __proto__: null, + break: utils_1.AST_NODE_TYPES.BreakStatement, + continue: utils_1.AST_NODE_TYPES.ContinueStatement, + debugger: utils_1.AST_NODE_TYPES.DebuggerStatement, + do: utils_1.AST_NODE_TYPES.DoWhileStatement, + else: utils_1.AST_NODE_TYPES.IfStatement, + return: utils_1.AST_NODE_TYPES.ReturnStatement, + yield: utils_1.AST_NODE_TYPES.YieldExpression, +}; +/* + * Before an opening parenthesis, postfix `++` and `--` always trigger ASI; + * the tokens `:`, `;`, `{` and `=>` don't expect a semicolon, as that would count as an empty statement. + */ +const PUNCTUATORS = new Set(['--', ';', ':', '{', '++', '=>']); +/* + * Statements that can contain an `ExpressionStatement` after a closing parenthesis. + * DoWhileStatement is an exception in that it always triggers ASI after the closing parenthesis. + */ +const STATEMENTS = new Set([ + utils_1.AST_NODE_TYPES.DoWhileStatement, + utils_1.AST_NODE_TYPES.ForInStatement, + utils_1.AST_NODE_TYPES.ForOfStatement, + utils_1.AST_NODE_TYPES.ForStatement, + utils_1.AST_NODE_TYPES.IfStatement, + utils_1.AST_NODE_TYPES.WhileStatement, + utils_1.AST_NODE_TYPES.WithStatement, +]); +/** + * Determines whether an opening parenthesis `(`, bracket `[` or backtick ``` ` ``` needs to be preceded by a semicolon. + * This opening parenthesis or bracket should be at the start of an `ExpressionStatement`, a `MethodDefinition` or at + * the start of the body of an `ArrowFunctionExpression`. + * @param sourceCode The source code object. + * @param node A node at the position where an opening parenthesis or bracket will be inserted. + * @returns Whether a semicolon is required before the opening parenthesis or bracket. + */ +function needsPrecedingSemicolon(sourceCode, node) { + const prevToken = sourceCode.getTokenBefore(node); + if (!prevToken || + (prevToken.type === utils_1.AST_TOKEN_TYPES.Punctuator && + PUNCTUATORS.has(prevToken.value))) { + return false; + } + const prevNode = sourceCode.getNodeByRangeIndex(prevToken.range[0]); + if (!prevNode) { + return false; + } + if ((0, ast_utils_1.isClosingParenToken)(prevToken)) { + return !STATEMENTS.has(prevNode.type); + } + if ((0, ast_utils_1.isClosingBraceToken)(prevToken)) { + return ((prevNode.type === utils_1.AST_NODE_TYPES.BlockStatement && + prevNode.parent.type === utils_1.AST_NODE_TYPES.FunctionExpression && + prevNode.parent.parent.type !== utils_1.AST_NODE_TYPES.MethodDefinition) || + (prevNode.type === utils_1.AST_NODE_TYPES.ClassBody && + prevNode.parent.type === utils_1.AST_NODE_TYPES.ClassExpression) || + prevNode.type === utils_1.AST_NODE_TYPES.ObjectExpression); + } + if (!prevNode.parent) { + return false; + } + if (IDENTIFIER_OR_KEYWORD.has(prevToken.type)) { + if (BREAK_OR_CONTINUE.has(prevNode.parent.type)) { + return false; + } + const keyword = prevToken.value; + const nodeType = NODE_TYPES_BY_KEYWORD[keyword]; + return prevNode.type !== nodeType; + } + if (prevToken.type === utils_1.AST_TOKEN_TYPES.String) { + return !DECLARATIONS.has(prevNode.parent.type); + } + return true; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsToBeAwaited.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsToBeAwaited.d.ts new file mode 100644 index 0000000..5e1c7fd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsToBeAwaited.d.ts @@ -0,0 +1,8 @@ +import type * as ts from 'typescript'; +export declare enum Awaitable { + Always = 0, + Never = 1, + May = 2 +} +export declare function needsToBeAwaited(checker: ts.TypeChecker, node: ts.Node, type: ts.Type): Awaitable; +//# sourceMappingURL=needsToBeAwaited.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsToBeAwaited.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsToBeAwaited.d.ts.map new file mode 100644 index 0000000..7c8cd09 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsToBeAwaited.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"needsToBeAwaited.d.ts","sourceRoot":"","sources":["../../src/util/needsToBeAwaited.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAUtC,oBAAY,SAAS;IACnB,MAAM,IAAA;IACN,KAAK,IAAA;IACL,GAAG,IAAA;CACJ;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,SAAS,CAoBX"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsToBeAwaited.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsToBeAwaited.js new file mode 100644 index 0000000..d8c64e1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsToBeAwaited.js @@ -0,0 +1,63 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Awaitable = void 0; +exports.needsToBeAwaited = needsToBeAwaited; +const type_utils_1 = require("@typescript-eslint/type-utils"); +const tsutils = __importStar(require("ts-api-utils")); +const getConstraintInfo_1 = require("./getConstraintInfo"); +var Awaitable; +(function (Awaitable) { + Awaitable[Awaitable["Always"] = 0] = "Always"; + Awaitable[Awaitable["Never"] = 1] = "Never"; + Awaitable[Awaitable["May"] = 2] = "May"; +})(Awaitable || (exports.Awaitable = Awaitable = {})); +function needsToBeAwaited(checker, node, type) { + const { constraintType, isTypeParameter } = (0, getConstraintInfo_1.getConstraintInfo)(checker, type); + // unconstrained generic types should be treated as unknown + if (isTypeParameter && constraintType == null) { + return Awaitable.May; + } + // `any` and `unknown` types may need to be awaited + if ((0, type_utils_1.isTypeAnyType)(constraintType) || (0, type_utils_1.isTypeUnknownType)(constraintType)) { + return Awaitable.May; + } + // 'thenable' values should always be be awaited + if (tsutils.isThenableType(checker, node, constraintType)) { + return Awaitable.Always; + } + // anything else should not be awaited + return Awaitable.Never; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.d.ts new file mode 100644 index 0000000..63cc12c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.d.ts @@ -0,0 +1,4 @@ +export declare function objectForEachKey>(obj: T, callback: (key: keyof T) => void): void; +export declare function objectMapKey, Return>(obj: T, callback: (key: keyof T) => Return): Return[]; +export declare function objectReduceKey, Accumulator>(obj: T, callback: (acc: Accumulator, key: keyof T) => Accumulator, initial: Accumulator): Accumulator; +//# sourceMappingURL=objectIterators.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.d.ts.map new file mode 100644 index 0000000..f155f3f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"objectIterators.d.ts","sourceRoot":"","sources":["../../src/util/objectIterators.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,GAAG,EAAE,CAAC,EACN,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,IAAI,GAC/B,IAAI,CAKN;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EACpE,GAAG,EAAE,CAAC,EACN,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,MAAM,GACjC,MAAM,EAAE,CAMV;AAED,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,EAC5E,GAAG,EAAE,CAAC,EACN,QAAQ,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,CAAC,KAAK,WAAW,EACzD,OAAO,EAAE,WAAW,GACnB,WAAW,CAMb"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.js new file mode 100644 index 0000000..4c334ad --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.objectForEachKey = objectForEachKey; +exports.objectMapKey = objectMapKey; +exports.objectReduceKey = objectReduceKey; +function objectForEachKey(obj, callback) { + const keys = Object.keys(obj); + for (const key of keys) { + callback(key); + } +} +function objectMapKey(obj, callback) { + const values = []; + objectForEachKey(obj, key => { + values.push(callback(key)); + }); + return values; +} +function objectReduceKey(obj, callback, initial) { + let accumulator = initial; + objectForEachKey(obj, key => { + accumulator = callback(accumulator, key); + }); + return accumulator; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/promiseUtils.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/promiseUtils.d.ts new file mode 100644 index 0000000..42897a2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/promiseUtils.d.ts @@ -0,0 +1,28 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { RuleContext } from '@typescript-eslint/utils/ts-eslint'; +/** + * Parses a syntactically possible `Promise.then()` call. Does not check the + * type of the callee. + */ +export declare function parseThenCall(node: TSESTree.CallExpression, context: RuleContext): { + onFulfilled?: TSESTree.Expression | undefined; + onRejected?: TSESTree.Expression | undefined; + object: TSESTree.Expression; +} | undefined; +/** + * Parses a syntactically possible `Promise.catch()` call. Does not check the + * type of the callee. + */ +export declare function parseCatchCall(node: TSESTree.CallExpression, context: RuleContext): { + onRejected?: TSESTree.Expression | undefined; + object: TSESTree.Expression; +} | undefined; +/** + * Parses a syntactically possible `Promise.finally()` call. Does not check the + * type of the callee. + */ +export declare function parseFinallyCall(node: TSESTree.CallExpression, context: RuleContext): { + object: TSESTree.Expression; + onFinally?: TSESTree.Expression | undefined; +} | undefined; +//# sourceMappingURL=promiseUtils.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/promiseUtils.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/promiseUtils.d.ts.map new file mode 100644 index 0000000..7a8d7ca --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/promiseUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"promiseUtils.d.ts","sourceRoot":"","sources":["../../src/util/promiseUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAMtE;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,QAAQ,CAAC,cAAc,EAC7B,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,GAErC;IACE,WAAW,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9C,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7C,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC;CAC7B,GACD,SAAS,CAqCZ;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,QAAQ,CAAC,cAAc,EAC7B,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,GAErC;IACE,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7C,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC;CAC7B,GACD,SAAS,CAuBZ;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,QAAQ,CAAC,cAAc,EAC7B,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,GAErC;IACE,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC;IAC5B,SAAS,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,SAAS,CAAC;CAC7C,GACD,SAAS,CAsBZ"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/promiseUtils.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/promiseUtils.js new file mode 100644 index 0000000..ec5b02e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/promiseUtils.js @@ -0,0 +1,98 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseThenCall = parseThenCall; +exports.parseCatchCall = parseCatchCall; +exports.parseFinallyCall = parseFinallyCall; +const utils_1 = require("@typescript-eslint/utils"); +const misc_1 = require("./misc"); +/** + * Parses a syntactically possible `Promise.then()` call. Does not check the + * type of the callee. + */ +function parseThenCall(node, context) { + if (node.callee.type === utils_1.AST_NODE_TYPES.MemberExpression) { + const methodName = (0, misc_1.getStaticMemberAccessValue)(node.callee, context); + if (methodName === 'then') { + if (node.arguments.length >= 1) { + if (node.arguments[0].type === utils_1.AST_NODE_TYPES.SpreadElement) { + return { + object: node.callee.object, + }; + } + if (node.arguments.length >= 2) { + if (node.arguments[1].type === utils_1.AST_NODE_TYPES.SpreadElement) { + return { + object: node.callee.object, + onFulfilled: node.arguments[0], + }; + } + return { + object: node.callee.object, + onFulfilled: node.arguments[0], + onRejected: node.arguments[1], + }; + } + return { + object: node.callee.object, + onFulfilled: node.arguments[0], + }; + } + return { + object: node.callee.object, + }; + } + } + return undefined; +} +/** + * Parses a syntactically possible `Promise.catch()` call. Does not check the + * type of the callee. + */ +function parseCatchCall(node, context) { + if (node.callee.type === utils_1.AST_NODE_TYPES.MemberExpression) { + const methodName = (0, misc_1.getStaticMemberAccessValue)(node.callee, context); + if (methodName === 'catch') { + if (node.arguments.length >= 1) { + if (node.arguments[0].type === utils_1.AST_NODE_TYPES.SpreadElement) { + return { + object: node.callee.object, + }; + } + return { + object: node.callee.object, + onRejected: node.arguments[0], + }; + } + return { + object: node.callee.object, + }; + } + } + return undefined; +} +/** + * Parses a syntactically possible `Promise.finally()` call. Does not check the + * type of the callee. + */ +function parseFinallyCall(node, context) { + if (node.callee.type === utils_1.AST_NODE_TYPES.MemberExpression) { + const methodName = (0, misc_1.getStaticMemberAccessValue)(node.callee, context); + if (methodName === 'finally') { + if (node.arguments.length >= 1) { + if (node.arguments[0].type === utils_1.AST_NODE_TYPES.SpreadElement) { + return { + object: node.callee.object, + }; + } + return { + object: node.callee.object, + onFinally: node.arguments[0], + }; + } + return { + object: node.callee.object, + }; + } + } + return undefined; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/rangeToLoc.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/rangeToLoc.d.ts new file mode 100644 index 0000000..d8021be --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/rangeToLoc.d.ts @@ -0,0 +1,3 @@ +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; +export declare function rangeToLoc(sourceCode: TSESLint.SourceCode, range: TSESLint.AST.Range): TSESTree.SourceLocation; +//# sourceMappingURL=rangeToLoc.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/rangeToLoc.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/rangeToLoc.d.ts.map new file mode 100644 index 0000000..81aa482 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/rangeToLoc.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rangeToLoc.d.ts","sourceRoot":"","sources":["../../src/util/rangeToLoc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEnE,wBAAgB,UAAU,CACxB,UAAU,EAAE,QAAQ,CAAC,UAAU,EAC/B,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,GACxB,QAAQ,CAAC,cAAc,CAKzB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/rangeToLoc.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/rangeToLoc.js new file mode 100644 index 0000000..348f667 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/rangeToLoc.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.rangeToLoc = rangeToLoc; +function rangeToLoc(sourceCode, range) { + return { + end: sourceCode.getLocFromIndex(range[1]), + start: sourceCode.getLocFromIndex(range[0]), + }; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/referenceContainsTypeQuery.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/referenceContainsTypeQuery.d.ts new file mode 100644 index 0000000..c765c73 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/referenceContainsTypeQuery.d.ts @@ -0,0 +1,6 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +/** + * Recursively checks whether a given reference has a type query declaration among its parents + */ +export declare function referenceContainsTypeQuery(node: TSESTree.Node): boolean; +//# sourceMappingURL=referenceContainsTypeQuery.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/referenceContainsTypeQuery.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/referenceContainsTypeQuery.d.ts.map new file mode 100644 index 0000000..79e1468 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/referenceContainsTypeQuery.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"referenceContainsTypeQuery.d.ts","sourceRoot":"","sources":["../../src/util/referenceContainsTypeQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,OAAO,CAavE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/referenceContainsTypeQuery.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/referenceContainsTypeQuery.js new file mode 100644 index 0000000..9479eff --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/referenceContainsTypeQuery.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.referenceContainsTypeQuery = referenceContainsTypeQuery; +const utils_1 = require("@typescript-eslint/utils"); +/** + * Recursively checks whether a given reference has a type query declaration among its parents + */ +function referenceContainsTypeQuery(node) { + switch (node.type) { + case utils_1.AST_NODE_TYPES.TSTypeQuery: + return true; + case utils_1.AST_NODE_TYPES.TSQualifiedName: + case utils_1.AST_NODE_TYPES.Identifier: + return referenceContainsTypeQuery(node.parent); + default: + // if we find a different node, there's no chance that we're in a TSTypeQuery + return false; + } +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/scopeUtils.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/scopeUtils.d.ts new file mode 100644 index 0000000..e74043b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/scopeUtils.d.ts @@ -0,0 +1,4 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type { SourceCode } from '@typescript-eslint/utils/ts-eslint'; +export declare function isReferenceToGlobalFunction(calleeName: string, node: TSESTree.Node, sourceCode: SourceCode): boolean; +//# sourceMappingURL=scopeUtils.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/scopeUtils.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/scopeUtils.d.ts.map new file mode 100644 index 0000000..0f325b0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/scopeUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scopeUtils.d.ts","sourceRoot":"","sources":["../../src/util/scopeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAErE,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,UAAU,EAAE,UAAU,GACrB,OAAO,CAOT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/scopeUtils.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/scopeUtils.js new file mode 100644 index 0000000..cc7b901 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/scopeUtils.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isReferenceToGlobalFunction = isReferenceToGlobalFunction; +function isReferenceToGlobalFunction(calleeName, node, sourceCode) { + const ref = sourceCode + .getScope(node) + .references.find(ref => ref.identifier.name === calleeName); + // ensure it's the "global" version + return !ref?.resolved?.defs.length; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/skipChainExpression.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/skipChainExpression.d.ts new file mode 100644 index 0000000..fe1eafe --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/skipChainExpression.d.ts @@ -0,0 +1,3 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +export declare function skipChainExpression(node: T): T | TSESTree.ChainElement; +//# sourceMappingURL=skipChainExpression.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/skipChainExpression.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/skipChainExpression.d.ts.map new file mode 100644 index 0000000..b361387 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/skipChainExpression.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"skipChainExpression.d.ts","sourceRoot":"","sources":["../../src/util/skipChainExpression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,QAAQ,CAAC,IAAI,EACzD,IAAI,EAAE,CAAC,GACN,CAAC,GAAG,QAAQ,CAAC,YAAY,CAE3B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/skipChainExpression.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/skipChainExpression.js new file mode 100644 index 0000000..ffba66f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/skipChainExpression.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.skipChainExpression = skipChainExpression; +const utils_1 = require("@typescript-eslint/utils"); +function skipChainExpression(node) { + return node.type === utils_1.AST_NODE_TYPES.ChainExpression ? node.expression : node; +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/truthinessUtils.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/truthinessUtils.d.ts new file mode 100644 index 0000000..dc5fb4f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/truthinessUtils.d.ts @@ -0,0 +1,4 @@ +import * as ts from 'typescript'; +export declare const isPossiblyFalsy: (type: ts.Type) => boolean; +export declare const isPossiblyTruthy: (type: ts.Type) => boolean; +//# sourceMappingURL=truthinessUtils.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/truthinessUtils.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/truthinessUtils.d.ts.map new file mode 100644 index 0000000..f664124 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/truthinessUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"truthinessUtils.d.ts","sourceRoot":"","sources":["../../src/util/truthinessUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AASjC,eAAO,MAAM,eAAe,GAAI,MAAM,EAAE,CAAC,IAAI,KAAG,OAS0B,CAAC;AAE3E,eAAO,MAAM,gBAAgB,GAAI,MAAM,EAAE,CAAC,IAAI,KAAG,OAQ5C,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/truthinessUtils.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/truthinessUtils.js new file mode 100644 index 0000000..9148838 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/truthinessUtils.js @@ -0,0 +1,60 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isPossiblyTruthy = exports.isPossiblyFalsy = void 0; +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const getValueOfLiteralType_1 = require("./getValueOfLiteralType"); +// Truthiness utilities +const isTruthyLiteral = (type) => tsutils.isTrueLiteralType(type) || + (type.isLiteral() && !!(0, getValueOfLiteralType_1.getValueOfLiteralType)(type)); +const isPossiblyFalsy = (type) => tsutils + .unionConstituents(type) + // Intersections like `string & {}` can also be possibly falsy, + // requiring us to look into the intersection. + .flatMap(type => tsutils.intersectionConstituents(type)) + // PossiblyFalsy flag includes literal values, so exclude ones that + // are definitely truthy + .filter(t => !isTruthyLiteral(t)) + .some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.PossiblyFalsy)); +exports.isPossiblyFalsy = isPossiblyFalsy; +const isPossiblyTruthy = (type) => tsutils + .unionConstituents(type) + .map(type => tsutils.intersectionConstituents(type)) + .some(intersectionParts => +// It is possible to define intersections that are always falsy, +// like `"" & { __brand: string }`. +intersectionParts.every(type => !tsutils.isFalsyType(type))); +exports.isPossiblyTruthy = isPossiblyTruthy; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.d.ts new file mode 100644 index 0000000..e95e660 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.d.ts @@ -0,0 +1,3 @@ +export type MakeRequired = Omit & Required>>; +export type ValueOf = T[keyof T]; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.d.ts.map b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.d.ts.map new file mode 100644 index 0000000..e926b46 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/util/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,CAAC,IAAI,EAAE,GAAG,SAAS,MAAM,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,GACtE,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhD,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.js b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.js new file mode 100644 index 0000000..fabb051 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/index.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/index.d.ts new file mode 100644 index 0000000..e9500ca --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/index.d.ts @@ -0,0 +1,13 @@ +import type { + ClassicConfig, + FlatConfig, +} from '@typescript-eslint/utils/ts-eslint'; + +import type rules from './rules'; + +declare const cjsExport: { + configs: Record; + meta: FlatConfig.PluginMeta; + rules: typeof rules; +}; +export = cjsExport; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/LICENSE-MIT b/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/LICENSE-MIT new file mode 100644 index 0000000..96a5ae1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/LICENSE-MIT @@ -0,0 +1,21 @@ +Copyright (c) 2013 Kael Zhang , contributors +http://kael.me/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/README.md b/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/README.md new file mode 100644 index 0000000..7b8ca61 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/README.md @@ -0,0 +1,452 @@ +| Linux / MacOS / Windows | Coverage | Downloads | +| ----------------------- | -------- | --------- | +| [![build][bb]][bl] | [![coverage][cb]][cl] | [![downloads][db]][dl] | + +[bb]: https://github.com/kaelzhang/node-ignore/actions/workflows/nodejs.yml/badge.svg +[bl]: https://github.com/kaelzhang/node-ignore/actions/workflows/nodejs.yml + +[cb]: https://codecov.io/gh/kaelzhang/node-ignore/branch/master/graph/badge.svg +[cl]: https://codecov.io/gh/kaelzhang/node-ignore + +[db]: http://img.shields.io/npm/dm/ignore.svg +[dl]: https://www.npmjs.org/package/ignore + +# ignore + +`ignore` is a manager, filter and parser which implemented in pure JavaScript according to the [.gitignore spec 2.22.1](http://git-scm.com/docs/gitignore). + +`ignore` is used by eslint, gitbook and [many others](https://www.npmjs.com/browse/depended/ignore). + +Pay **ATTENTION** that [`minimatch`](https://www.npmjs.org/package/minimatch) (which used by `fstream-ignore`) does not follow the gitignore spec. + +To filter filenames according to a .gitignore file, I recommend this npm package, `ignore`. + +To parse an `.npmignore` file, you should use `minimatch`, because an `.npmignore` file is parsed by npm using `minimatch` and it does not work in the .gitignore way. + +### Tested on + +`ignore` is fully tested, and has more than **five hundreds** of unit tests. + +- Linux + Node: `0.8` - `7.x` +- Windows + Node: `0.10` - `7.x`, node < `0.10` is not tested due to the lack of support of appveyor. + +Actually, `ignore` does not rely on any versions of node specially. + +Since `4.0.0`, ignore will no longer support `node < 6` by default, to use in node < 6, `require('ignore/legacy')`. For details, see [CHANGELOG](https://github.com/kaelzhang/node-ignore/blob/master/CHANGELOG.md). + +## Table Of Main Contents + +- [Usage](#usage) +- [`Pathname` Conventions](#pathname-conventions) +- See Also: + - [`glob-gitignore`](https://www.npmjs.com/package/glob-gitignore) matches files using patterns and filters them according to gitignore rules. +- [Upgrade Guide](#upgrade-guide) + +## Install + +```sh +npm i ignore +``` + +## Usage + +```js +import ignore from 'ignore' +const ig = ignore().add(['.abc/*', '!.abc/d/']) +``` + +### Filter the given paths + +```js +const paths = [ + '.abc/a.js', // filtered out + '.abc/d/e.js' // included +] + +ig.filter(paths) // ['.abc/d/e.js'] +ig.ignores('.abc/a.js') // true +``` + +### As the filter function + +```js +paths.filter(ig.createFilter()); // ['.abc/d/e.js'] +``` + +### Win32 paths will be handled + +```js +ig.filter(['.abc\\a.js', '.abc\\d\\e.js']) +// if the code above runs on windows, the result will be +// ['.abc\\d\\e.js'] +``` + +## Why another ignore? + +- `ignore` is a standalone module, and is much simpler so that it could easy work with other programs, unlike [isaacs](https://npmjs.org/~isaacs)'s [fstream-ignore](https://npmjs.org/package/fstream-ignore) which must work with the modules of the fstream family. + +- `ignore` only contains utility methods to filter paths according to the specified ignore rules, so + - `ignore` never try to find out ignore rules by traversing directories or fetching from git configurations. + - `ignore` don't cares about sub-modules of git projects. + +- Exactly according to [gitignore man page](http://git-scm.com/docs/gitignore), fixes some known matching issues of fstream-ignore, such as: + - '`/*.js`' should only match '`a.js`', but not '`abc/a.js`'. + - '`**/foo`' should match '`foo`' anywhere. + - Prevent re-including a file if a parent directory of that file is excluded. + - Handle trailing whitespaces: + - `'a '`(one space) should not match `'a '`(two spaces). + - `'a \ '` matches `'a '` + - All test cases are verified with the result of `git check-ignore`. + +# Methods + +## .add(pattern: string | Ignore): this +## .add(patterns: Array): this +## .add({pattern: string, mark?: string}): this since 7.0.0 + +- **pattern** `string | Ignore` An ignore pattern string, or the `Ignore` instance +- **patterns** `Array` Array of ignore patterns. +- **mark?** `string` Pattern mark, which is used to associate the pattern with a certain marker, such as the line no of the `.gitignore` file. Actually it could be an arbitrary string and is optional. + +Adds a rule or several rules to the current manager. + +Returns `this` + +Notice that a line starting with `'#'`(hash) is treated as a comment. Put a backslash (`'\'`) in front of the first hash for patterns that begin with a hash, if you want to ignore a file with a hash at the beginning of the filename. + +```js +ignore().add('#abc').ignores('#abc') // false +ignore().add('\\#abc').ignores('#abc') // true +``` + +`pattern` could either be a line of ignore pattern or a string of multiple ignore patterns, which means we could just `ignore().add()` the content of a ignore file: + +```js +ignore() +.add(fs.readFileSync(filenameOfGitignore).toString()) +.filter(filenames) +``` + +`pattern` could also be an `ignore` instance, so that we could easily inherit the rules of another `Ignore` instance. + +## .ignores(pathname: [Pathname](#pathname-conventions)): boolean + +> new in 3.2.0 + +Returns `Boolean` whether `pathname` should be ignored. + +```js +ig.ignores('.abc/a.js') // true +``` + +Please **PAY ATTENTION** that `.ignores()` is **NOT** equivalent to `git check-ignore` although in most cases they return equivalent results. + +However, for the purposes of imitating the behavior of `git check-ignore`, please use `.checkIgnore()` instead. + +### `Pathname` Conventions: + +#### 1. `Pathname` should be a `path.relative()`d pathname + +`Pathname` should be a string that have been `path.join()`ed, or the return value of `path.relative()` to the current directory, + +```js +// WRONG, an error will be thrown +ig.ignores('./abc') + +// WRONG, for it will never happen, and an error will be thrown +// If the gitignore rule locates at the root directory, +// `'/abc'` should be changed to `'abc'`. +// ``` +// path.relative('/', '/abc') -> 'abc' +// ``` +ig.ignores('/abc') + +// WRONG, that it is an absolute path on Windows, an error will be thrown +ig.ignores('C:\\abc') + +// Right +ig.ignores('abc') + +// Right +ig.ignores(path.join('./abc')) // path.join('./abc') -> 'abc' +``` + +In other words, each `Pathname` here should be a relative path to the directory of the gitignore rules. + +Suppose the dir structure is: + +``` +/path/to/your/repo + |-- a + | |-- a.js + | + |-- .b + | + |-- .c + |-- .DS_store +``` + +Then the `paths` might be like this: + +```js +[ + 'a/a.js' + '.b', + '.c/.DS_store' +] +``` + +#### 2. filenames and dirnames + +`node-ignore` does NO `fs.stat` during path matching, so `node-ignore` treats +- `foo` as a file +- **`foo/` as a directory** + +For the example below: + +```js +// First, we add a ignore pattern to ignore a directory +ig.add('config/') + +// `ig` does NOT know if 'config', in the real world, +// is a normal file, directory or something. + +ig.ignores('config') +// `ig` treats `config` as a file, so it returns `false` + +ig.ignores('config/') +// returns `true` +``` + +Specially for people who develop some library based on `node-ignore`, it is important to understand that. + +Usually, you could use [`glob`](http://npmjs.org/package/glob) with `option.mark = true` to fetch the structure of the current directory: + +```js +import glob from 'glob' + +glob('**', { + // Adds a / character to directory matches. + mark: true +}, (err, files) => { + if (err) { + return console.error(err) + } + + let filtered = ignore().add(patterns).filter(files) + console.log(filtered) +}) +``` + + +## .filter(paths: Array<Pathname>): Array<Pathname> + +```ts +type Pathname = string +``` + +Filters the given array of pathnames, and returns the filtered array. + +- **paths** `Array.` The array of `pathname`s to be filtered. + +## .createFilter() + +Creates a filter function which could filter an array of paths with `Array.prototype.filter`. + +Returns `function(path)` the filter function. + +## .test(pathname: Pathname): TestResult + +> New in 5.0.0 + +Returns `TestResult` + +```ts +// Since 5.0.0 +interface TestResult { + ignored: boolean + // true if the `pathname` is finally unignored by some negative pattern + unignored: boolean + // The `IgnoreRule` which ignores the pathname + rule?: IgnoreRule +} + +// Since 7.0.0 +interface IgnoreRule { + // The original pattern + pattern: string + // Whether the pattern is a negative pattern + negative: boolean + // Which is used for other packages to build things upon `node-ignore` + mark?: string +} +``` + +- `{ignored: true, unignored: false}`: the `pathname` is ignored +- `{ignored: false, unignored: true}`: the `pathname` is unignored +- `{ignored: false, unignored: false}`: the `pathname` is never matched by any ignore rules. + +## .checkIgnore(target: string): TestResult + +> new in 7.0.0 + +Debugs gitignore / exclude files, which is equivalent to `git check-ignore -v`. Usually this method is used for other packages to implement the function of `git check-ignore -v` upon `node-ignore` + +- **target** `string` the target to test. + +Returns `TestResult` + +```js +ig.add({ + pattern: 'foo/*', + mark: '60' +}) + +const { + ignored, + rule +} = checkIgnore('foo/') + +if (ignored) { + console.log(`.gitignore:${result}:${rule.mark}:${rule.pattern} foo/`) +} + +// .gitignore:60:foo/* foo/ +``` + +Please pay attention that this method does not have a strong built-in cache mechanism. + +The purpose of introducing this method is to make it possible to implement the `git check-ignore` command in JavaScript based on `node-ignore`. + +So do not use this method in those situations where performance is extremely important. + +## static `isPathValid(pathname): boolean` since 5.0.0 + +Check whether the `pathname` is an valid `path.relative()`d path according to the [convention](#1-pathname-should-be-a-pathrelatived-pathname). + +This method is **NOT** used to check if an ignore pattern is valid. + +```js +import {isPathValid} from 'ignore' + +isPathValid('./foo') // false +``` + +## .addIgnoreFile(path) + +REMOVED in `3.x` for now. + +To upgrade `ignore@2.x` up to `3.x`, use + +```js +import fs from 'fs' + +if (fs.existsSync(filename)) { + ignore().add(fs.readFileSync(filename).toString()) +} +``` + +instead. + +## ignore(options) + +### `options.ignorecase` since 4.0.0 + +Similar to the `core.ignorecase` option of [git-config](https://git-scm.com/docs/git-config), `node-ignore` will be case insensitive if `options.ignorecase` is set to `true` (the default value), otherwise case sensitive. + +```js +const ig = ignore({ + ignorecase: false +}) + +ig.add('*.png') + +ig.ignores('*.PNG') // false +``` + +### `options.ignoreCase?: boolean` since 5.2.0 + +Which is an alternative to `options.ignoreCase` + +### `options.allowRelativePaths?: boolean` since 5.2.0 + +This option brings backward compatibility with projects which based on `ignore@4.x`. If `options.allowRelativePaths` is `true`, `ignore` will not check whether the given path to be tested is [`path.relative()`d](#pathname-conventions). + +However, passing a relative path, such as `'./foo'` or `'../foo'`, to test if it is ignored or not is not a good practise, which might lead to unexpected behavior + +```js +ignore({ + allowRelativePaths: true +}).ignores('../foo/bar.js') // And it will not throw +``` + +**** + +# Upgrade Guide + +## Upgrade 4.x -> 5.x + +Since `5.0.0`, if an invalid `Pathname` passed into `ig.ignores()`, an error will be thrown, unless `options.allowRelative = true` is passed to the `Ignore` factory. + +While `ignore < 5.0.0` did not make sure what the return value was, as well as + +```ts +.ignores(pathname: Pathname): boolean + +.filter(pathnames: Array): Array + +.createFilter(): (pathname: Pathname) => boolean + +.test(pathname: Pathname): {ignored: boolean, unignored: boolean} +``` + +See the convention [here](#1-pathname-should-be-a-pathrelatived-pathname) for details. + +If there are invalid pathnames, the conversion and filtration should be done by users. + +```js +import {isPathValid} from 'ignore' // introduced in 5.0.0 + +const paths = [ + // invalid + ////////////////// + '', + false, + '../foo', + '.', + ////////////////// + + // valid + 'foo' +] +.filter(isPathValid) + +ig.filter(paths) +``` + +## Upgrade 3.x -> 4.x + +Since `4.0.0`, `ignore` will no longer support node < 6, to use `ignore` in node < 6: + +```js +var ignore = require('ignore/legacy') +``` + +## Upgrade 2.x -> 3.x + +- All `options` of 2.x are unnecessary and removed, so just remove them. +- `ignore()` instance is no longer an [`EventEmitter`](nodejs.org/api/events.html), and all events are unnecessary and removed. +- `.addIgnoreFile()` is removed, see the [.addIgnoreFile](#addignorefilepath) section for details. + +**** + +# Collaborators + +- [@whitecolor](https://github.com/whitecolor) *Alex* +- [@SamyPesse](https://github.com/SamyPesse) *Samy Pessé* +- [@azproduction](https://github.com/azproduction) *Mikhail Davydov* +- [@TrySound](https://github.com/TrySound) *Bogdan Chadkin* +- [@JanMattner](https://github.com/JanMattner) *Jan Mattner* +- [@ntwb](https://github.com/ntwb) *Stephen Edgar* +- [@kasperisager](https://github.com/kasperisager) *Kasper Isager* +- [@sandersn](https://github.com/sandersn) *Nathan Shively-Sanders* diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/index.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/index.d.ts new file mode 100644 index 0000000..8e7443e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/index.d.ts @@ -0,0 +1,81 @@ +type Pathname = string + +interface IgnoreRule { + pattern: string + mark?: string + negative: boolean +} + +interface TestResult { + ignored: boolean + unignored: boolean + rule?: IgnoreRule +} + +interface PatternParams { + pattern: string + mark?: string +} + +/** + * Creates new ignore manager. + */ +declare function ignore(options?: ignore.Options): ignore.Ignore +declare namespace ignore { + interface Ignore { + /** + * Adds one or several rules to the current manager. + * @param {string[]} patterns + * @returns IgnoreBase + */ + add( + patterns: string | Ignore | readonly (string | Ignore)[] | PatternParams + ): this + + /** + * Filters the given array of pathnames, and returns the filtered array. + * NOTICE that each path here should be a relative path to the root of your repository. + * @param paths the array of paths to be filtered. + * @returns The filtered array of paths + */ + filter(pathnames: readonly Pathname[]): Pathname[] + + /** + * Creates a filter function which could filter + * an array of paths with Array.prototype.filter. + */ + createFilter(): (pathname: Pathname) => boolean + + /** + * Returns Boolean whether pathname should be ignored. + * @param {string} pathname a path to check + * @returns boolean + */ + ignores(pathname: Pathname): boolean + + /** + * Returns whether pathname should be ignored or unignored + * @param {string} pathname a path to check + * @returns TestResult + */ + test(pathname: Pathname): TestResult + + /** + * Debugs ignore rules and returns the checking result, which is + * equivalent to `git check-ignore -v`. + * @returns TestResult + */ + checkIgnore(pathname: Pathname): TestResult + } + + interface Options { + ignorecase?: boolean + // For compatibility + ignoreCase?: boolean + allowRelativePaths?: boolean + } + + function isPathValid(pathname: string): boolean +} + +export = ignore diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/index.js b/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/index.js new file mode 100644 index 0000000..33940d1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/index.js @@ -0,0 +1,784 @@ +// A simple implementation of make-array +function makeArray (subject) { + return Array.isArray(subject) + ? subject + : [subject] +} + +const UNDEFINED = undefined +const EMPTY = '' +const SPACE = ' ' +const ESCAPE = '\\' +const REGEX_TEST_BLANK_LINE = /^\s+$/ +const REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/ +const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/ +const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/ +const REGEX_SPLITALL_CRLF = /\r?\n/g + +// Invalid: +// - /foo, +// - ./foo, +// - ../foo, +// - . +// - .. +// Valid: +// - .foo +const REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/ + +const REGEX_TEST_TRAILING_SLASH = /\/$/ + +const SLASH = '/' + +// Do not use ternary expression here, since "istanbul ignore next" is buggy +let TMP_KEY_IGNORE = 'node-ignore' +/* istanbul ignore else */ +if (typeof Symbol !== 'undefined') { + TMP_KEY_IGNORE = Symbol.for('node-ignore') +} +const KEY_IGNORE = TMP_KEY_IGNORE + +const define = (object, key, value) => { + Object.defineProperty(object, key, {value}) + return value +} + +const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g + +const RETURN_FALSE = () => false + +// Sanitize the range of a regular expression +// The cases are complicated, see test cases for details +const sanitizeRange = range => range.replace( + REGEX_REGEXP_RANGE, + (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) + ? match + // Invalid range (out of order) which is ok for gitignore rules but + // fatal for JavaScript regular expression, so eliminate it. + : EMPTY +) + +// See fixtures #59 +const cleanRangeBackSlash = slashes => { + const {length} = slashes + return slashes.slice(0, length - length % 2) +} + +// > If the pattern ends with a slash, +// > it is removed for the purpose of the following description, +// > but it would only find a match with a directory. +// > In other words, foo/ will match a directory foo and paths underneath it, +// > but will not match a regular file or a symbolic link foo +// > (this is consistent with the way how pathspec works in general in Git). +// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`' +// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call +// you could use option `mark: true` with `glob` + +// '`foo/`' should not continue with the '`..`' +const REPLACERS = [ + + [ + // Remove BOM + // TODO: + // Other similar zero-width characters? + /^\uFEFF/, + () => EMPTY + ], + + // > Trailing spaces are ignored unless they are quoted with backslash ("\") + [ + // (a\ ) -> (a ) + // (a ) -> (a) + // (a ) -> (a) + // (a \ ) -> (a ) + /((?:\\\\)*?)(\\?\s+)$/, + (_, m1, m2) => m1 + ( + m2.indexOf('\\') === 0 + ? SPACE + : EMPTY + ) + ], + + // Replace (\ ) with ' ' + // (\ ) -> ' ' + // (\\ ) -> '\\ ' + // (\\\ ) -> '\\ ' + [ + /(\\+?)\s/g, + (_, m1) => { + const {length} = m1 + return m1.slice(0, length - length % 2) + SPACE + } + ], + + // Escape metacharacters + // which is written down by users but means special for regular expressions. + + // > There are 12 characters with special meanings: + // > - the backslash \, + // > - the caret ^, + // > - the dollar sign $, + // > - the period or dot ., + // > - the vertical bar or pipe symbol |, + // > - the question mark ?, + // > - the asterisk or star *, + // > - the plus sign +, + // > - the opening parenthesis (, + // > - the closing parenthesis ), + // > - and the opening square bracket [, + // > - the opening curly brace {, + // > These special characters are often called "metacharacters". + [ + /[\\$.|*+(){^]/g, + match => `\\${match}` + ], + + [ + // > a question mark (?) matches a single character + /(?!\\)\?/g, + () => '[^/]' + ], + + // leading slash + [ + + // > A leading slash matches the beginning of the pathname. + // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". + // A leading slash matches the beginning of the pathname + /^\//, + () => '^' + ], + + // replace special metacharacter slash after the leading slash + [ + /\//g, + () => '\\/' + ], + + [ + // > A leading "**" followed by a slash means match in all directories. + // > For example, "**/foo" matches file or directory "foo" anywhere, + // > the same as pattern "foo". + // > "**/foo/bar" matches file or directory "bar" anywhere that is directly + // > under directory "foo". + // Notice that the '*'s have been replaced as '\\*' + /^\^*\\\*\\\*\\\//, + + // '**/foo' <-> 'foo' + () => '^(?:.*\\/)?' + ], + + // starting + [ + // there will be no leading '/' + // (which has been replaced by section "leading slash") + // If starts with '**', adding a '^' to the regular expression also works + /^(?=[^^])/, + function startingReplacer () { + // If has a slash `/` at the beginning or middle + return !/\/(?!$)/.test(this) + // > Prior to 2.22.1 + // > If the pattern does not contain a slash /, + // > Git treats it as a shell glob pattern + // Actually, if there is only a trailing slash, + // git also treats it as a shell glob pattern + + // After 2.22.1 (compatible but clearer) + // > If there is a separator at the beginning or middle (or both) + // > of the pattern, then the pattern is relative to the directory + // > level of the particular .gitignore file itself. + // > Otherwise the pattern may also match at any level below + // > the .gitignore level. + ? '(?:^|\\/)' + + // > Otherwise, Git treats the pattern as a shell glob suitable for + // > consumption by fnmatch(3) + : '^' + } + ], + + // two globstars + [ + // Use lookahead assertions so that we could match more than one `'/**'` + /\\\/\\\*\\\*(?=\\\/|$)/g, + + // Zero, one or several directories + // should not use '*', or it will be replaced by the next replacer + + // Check if it is not the last `'/**'` + (_, index, str) => index + 6 < str.length + + // case: /**/ + // > A slash followed by two consecutive asterisks then a slash matches + // > zero or more directories. + // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on. + // '/**/' + ? '(?:\\/[^\\/]+)*' + + // case: /** + // > A trailing `"/**"` matches everything inside. + + // #21: everything inside but it should not include the current folder + : '\\/.+' + ], + + // normal intermediate wildcards + [ + // Never replace escaped '*' + // ignore rule '\*' will match the path '*' + + // 'abc.*/' -> go + // 'abc.*' -> skip this rule, + // coz trailing single wildcard will be handed by [trailing wildcard] + /(^|[^\\]+)(\\\*)+(?=.+)/g, + + // '*.js' matches '.js' + // '*.js' doesn't match 'abc' + (_, p1, p2) => { + // 1. + // > An asterisk "*" matches anything except a slash. + // 2. + // > Other consecutive asterisks are considered regular asterisks + // > and will match according to the previous rules. + const unescaped = p2.replace(/\\\*/g, '[^\\/]*') + return p1 + unescaped + } + ], + + [ + // unescape, revert step 3 except for back slash + // For example, if a user escape a '\\*', + // after step 3, the result will be '\\\\\\*' + /\\\\\\(?=[$.|*+(){^])/g, + () => ESCAPE + ], + + [ + // '\\\\' -> '\\' + /\\\\/g, + () => ESCAPE + ], + + [ + // > The range notation, e.g. [a-zA-Z], + // > can be used to match one of the characters in a range. + + // `\` is escaped by step 3 + /(\\)?\[([^\]/]*?)(\\*)($|\])/g, + (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE + // '\\[bar]' -> '\\\\[bar\\]' + ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` + : close === ']' + ? endEscape.length % 2 === 0 + // A normal case, and it is a range notation + // '[bar]' + // '[bar\\\\]' + ? `[${sanitizeRange(range)}${endEscape}]` + // Invalid range notaton + // '[bar\\]' -> '[bar\\\\]' + : '[]' + : '[]' + ], + + // ending + [ + // 'js' will not match 'js.' + // 'ab' will not match 'abc' + /(?:[^*])$/, + + // WTF! + // https://git-scm.com/docs/gitignore + // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) + // which re-fixes #24, #38 + + // > If there is a separator at the end of the pattern then the pattern + // > will only match directories, otherwise the pattern can match both + // > files and directories. + + // 'js*' will not match 'a.js' + // 'js/' will not match 'a.js' + // 'js' will match 'a.js' and 'a.js/' + match => /\/$/.test(match) + // foo/ will not match 'foo' + ? `${match}$` + // foo matches 'foo' and 'foo/' + : `${match}(?=$|\\/$)` + ] +] + +const REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/ +const MODE_IGNORE = 'regex' +const MODE_CHECK_IGNORE = 'checkRegex' +const UNDERSCORE = '_' + +const TRAILING_WILD_CARD_REPLACERS = { + [MODE_IGNORE] (_, p1) { + const prefix = p1 + // '\^': + // '/*' does not match EMPTY + // '/*' does not match everything + + // '\\\/': + // 'abc/*' does not match 'abc/' + ? `${p1}[^/]+` + + // 'a*' matches 'a' + // 'a*' matches 'aa' + : '[^/]*' + + return `${prefix}(?=$|\\/$)` + }, + + [MODE_CHECK_IGNORE] (_, p1) { + // When doing `git check-ignore` + const prefix = p1 + // '\\\/': + // 'abc/*' DOES match 'abc/' ! + ? `${p1}[^/]*` + + // 'a*' matches 'a' + // 'a*' matches 'aa' + : '[^/]*' + + return `${prefix}(?=$|\\/$)` + } +} + +// @param {pattern} +const makeRegexPrefix = pattern => REPLACERS.reduce( + (prev, [matcher, replacer]) => + prev.replace(matcher, replacer.bind(pattern)), + pattern +) + +const isString = subject => typeof subject === 'string' + +// > A blank line matches no files, so it can serve as a separator for readability. +const checkPattern = pattern => pattern + && isString(pattern) + && !REGEX_TEST_BLANK_LINE.test(pattern) + && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) + + // > A line starting with # serves as a comment. + && pattern.indexOf('#') !== 0 + +const splitPattern = pattern => pattern +.split(REGEX_SPLITALL_CRLF) +.filter(Boolean) + +class IgnoreRule { + constructor ( + pattern, + mark, + body, + ignoreCase, + negative, + prefix + ) { + this.pattern = pattern + this.mark = mark + this.negative = negative + + define(this, 'body', body) + define(this, 'ignoreCase', ignoreCase) + define(this, 'regexPrefix', prefix) + } + + get regex () { + const key = UNDERSCORE + MODE_IGNORE + + if (this[key]) { + return this[key] + } + + return this._make(MODE_IGNORE, key) + } + + get checkRegex () { + const key = UNDERSCORE + MODE_CHECK_IGNORE + + if (this[key]) { + return this[key] + } + + return this._make(MODE_CHECK_IGNORE, key) + } + + _make (mode, key) { + const str = this.regexPrefix.replace( + REGEX_REPLACE_TRAILING_WILDCARD, + + // It does not need to bind pattern + TRAILING_WILD_CARD_REPLACERS[mode] + ) + + const regex = this.ignoreCase + ? new RegExp(str, 'i') + : new RegExp(str) + + return define(this, key, regex) + } +} + +const createRule = ({ + pattern, + mark +}, ignoreCase) => { + let negative = false + let body = pattern + + // > An optional prefix "!" which negates the pattern; + if (body.indexOf('!') === 0) { + negative = true + body = body.substr(1) + } + + body = body + // > Put a backslash ("\") in front of the first "!" for patterns that + // > begin with a literal "!", for example, `"\!important!.txt"`. + .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!') + // > Put a backslash ("\") in front of the first hash for patterns that + // > begin with a hash. + .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#') + + const regexPrefix = makeRegexPrefix(body) + + return new IgnoreRule( + pattern, + mark, + body, + ignoreCase, + negative, + regexPrefix + ) +} + +class RuleManager { + constructor (ignoreCase) { + this._ignoreCase = ignoreCase + this._rules = [] + } + + _add (pattern) { + // #32 + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules._rules) + this._added = true + return + } + + if (isString(pattern)) { + pattern = { + pattern + } + } + + if (checkPattern(pattern.pattern)) { + const rule = createRule(pattern, this._ignoreCase) + this._added = true + this._rules.push(rule) + } + } + + // @param {Array | string | Ignore} pattern + add (pattern) { + this._added = false + + makeArray( + isString(pattern) + ? splitPattern(pattern) + : pattern + ).forEach(this._add, this) + + return this._added + } + + // Test one single path without recursively checking parent directories + // + // - checkUnignored `boolean` whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE` + + // @returns {TestResult} true if a file is ignored + test (path, checkUnignored, mode) { + let ignored = false + let unignored = false + let matchedRule + + this._rules.forEach(rule => { + const {negative} = rule + + // | ignored : unignored + // -------- | --------------------------------------- + // negative | 0:0 | 0:1 | 1:0 | 1:1 + // -------- | ------- | ------- | ------- | -------- + // 0 | TEST | TEST | SKIP | X + // 1 | TESTIF | SKIP | TEST | X + + // - SKIP: always skip + // - TEST: always test + // - TESTIF: only test if checkUnignored + // - X: that never happen + if ( + unignored === negative && ignored !== unignored + || negative && !ignored && !unignored && !checkUnignored + ) { + return + } + + const matched = rule[mode].test(path) + + if (!matched) { + return + } + + ignored = !negative + unignored = negative + + matchedRule = negative + ? UNDEFINED + : rule + }) + + const ret = { + ignored, + unignored + } + + if (matchedRule) { + ret.rule = matchedRule + } + + return ret + } +} + +const throwError = (message, Ctor) => { + throw new Ctor(message) +} + +const checkPath = (path, originalPath, doThrow) => { + if (!isString(path)) { + return doThrow( + `path must be a string, but got \`${originalPath}\``, + TypeError + ) + } + + // We don't know if we should ignore EMPTY, so throw + if (!path) { + return doThrow(`path must not be empty`, TypeError) + } + + // Check if it is a relative path + if (checkPath.isNotRelative(path)) { + const r = '`path.relative()`d' + return doThrow( + `path should be a ${r} string, but got "${originalPath}"`, + RangeError + ) + } + + return true +} + +const isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path) + +checkPath.isNotRelative = isNotRelative + +// On windows, the following function will be replaced +/* istanbul ignore next */ +checkPath.convert = p => p + + +class Ignore { + constructor ({ + ignorecase = true, + ignoreCase = ignorecase, + allowRelativePaths = false + } = {}) { + define(this, KEY_IGNORE, true) + + this._rules = new RuleManager(ignoreCase) + this._strictPathCheck = !allowRelativePaths + this._initCache() + } + + _initCache () { + // A cache for the result of `.ignores()` + this._ignoreCache = Object.create(null) + + // A cache for the result of `.test()` + this._testCache = Object.create(null) + } + + add (pattern) { + if (this._rules.add(pattern)) { + // Some rules have just added to the ignore, + // making the behavior changed, + // so we need to re-initialize the result cache + this._initCache() + } + + return this + } + + // legacy + addPattern (pattern) { + return this.add(pattern) + } + + // @returns {TestResult} + _test (originalPath, cache, checkUnignored, slices) { + const path = originalPath + // Supports nullable path + && checkPath.convert(originalPath) + + checkPath( + path, + originalPath, + this._strictPathCheck + ? throwError + : RETURN_FALSE + ) + + return this._t(path, cache, checkUnignored, slices) + } + + checkIgnore (path) { + // If the path doest not end with a slash, `.ignores()` is much equivalent + // to `git check-ignore` + if (!REGEX_TEST_TRAILING_SLASH.test(path)) { + return this.test(path) + } + + const slices = path.split(SLASH).filter(Boolean) + slices.pop() + + if (slices.length) { + const parent = this._t( + slices.join(SLASH) + SLASH, + this._testCache, + true, + slices + ) + + if (parent.ignored) { + return parent + } + } + + return this._rules.test(path, false, MODE_CHECK_IGNORE) + } + + _t ( + // The path to be tested + path, + + // The cache for the result of a certain checking + cache, + + // Whether should check if the path is unignored + checkUnignored, + + // The path slices + slices + ) { + if (path in cache) { + return cache[path] + } + + if (!slices) { + // path/to/a.js + // ['path', 'to', 'a.js'] + slices = path.split(SLASH).filter(Boolean) + } + + slices.pop() + + // If the path has no parent directory, just test it + if (!slices.length) { + return cache[path] = this._rules.test(path, checkUnignored, MODE_IGNORE) + } + + const parent = this._t( + slices.join(SLASH) + SLASH, + cache, + checkUnignored, + slices + ) + + // If the path contains a parent directory, check the parent first + return cache[path] = parent.ignored + // > It is not possible to re-include a file if a parent directory of + // > that file is excluded. + ? parent + : this._rules.test(path, checkUnignored, MODE_IGNORE) + } + + ignores (path) { + return this._test(path, this._ignoreCache, false).ignored + } + + createFilter () { + return path => !this.ignores(path) + } + + filter (paths) { + return makeArray(paths).filter(this.createFilter()) + } + + // @returns {TestResult} + test (path) { + return this._test(path, this._testCache, true) + } +} + +const factory = options => new Ignore(options) + +const isPathValid = path => + checkPath(path && checkPath.convert(path), path, RETURN_FALSE) + +/* istanbul ignore next */ +const setupWindows = () => { + /* eslint no-control-regex: "off" */ + const makePosix = str => /^\\\\\?\\/.test(str) + || /["<>|\u0000-\u001F]+/u.test(str) + ? str + : str.replace(/\\/g, '/') + + checkPath.convert = makePosix + + // 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/' + // 'd:\\foo' + const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i + checkPath.isNotRelative = path => + REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path) + || isNotRelative(path) +} + + +// Windows +// -------------------------------------------------------------- +/* istanbul ignore next */ +if ( + // Detect `process` so that it can run in browsers. + typeof process !== 'undefined' + && process.platform === 'win32' +) { + setupWindows() +} + +// COMMONJS_EXPORTS //////////////////////////////////////////////////////////// + +module.exports = factory + +// Although it is an anti-pattern, +// it is still widely misused by a lot of libraries in github +// Ref: https://github.com/search?q=ignore.default%28%29&type=code +factory.default = factory + +module.exports.isPathValid = isPathValid + +// For testing purposes +define(module.exports, Symbol.for('setupWindows'), setupWindows) diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/legacy.js b/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/legacy.js new file mode 100644 index 0000000..7a0c0c0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/legacy.js @@ -0,0 +1,681 @@ +"use strict"; + +var _TRAILING_WILD_CARD_R; +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } +function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } } +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +// A simple implementation of make-array +function makeArray(subject) { + return Array.isArray(subject) ? subject : [subject]; +} +var UNDEFINED = undefined; +var EMPTY = ''; +var SPACE = ' '; +var ESCAPE = '\\'; +var REGEX_TEST_BLANK_LINE = /^\s+$/; +var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; +var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; +var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; +var REGEX_SPLITALL_CRLF = /\r?\n/g; + +// Invalid: +// - /foo, +// - ./foo, +// - ../foo, +// - . +// - .. +// Valid: +// - .foo +var REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/; +var REGEX_TEST_TRAILING_SLASH = /\/$/; +var SLASH = '/'; + +// Do not use ternary expression here, since "istanbul ignore next" is buggy +var TMP_KEY_IGNORE = 'node-ignore'; +/* istanbul ignore else */ +if (typeof Symbol !== 'undefined') { + TMP_KEY_IGNORE = Symbol["for"]('node-ignore'); +} +var KEY_IGNORE = TMP_KEY_IGNORE; +var define = function define(object, key, value) { + Object.defineProperty(object, key, { + value: value + }); + return value; +}; +var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; +var RETURN_FALSE = function RETURN_FALSE() { + return false; +}; + +// Sanitize the range of a regular expression +// The cases are complicated, see test cases for details +var sanitizeRange = function sanitizeRange(range) { + return range.replace(REGEX_REGEXP_RANGE, function (match, from, to) { + return from.charCodeAt(0) <= to.charCodeAt(0) ? match + // Invalid range (out of order) which is ok for gitignore rules but + // fatal for JavaScript regular expression, so eliminate it. + : EMPTY; + }); +}; + +// See fixtures #59 +var cleanRangeBackSlash = function cleanRangeBackSlash(slashes) { + var length = slashes.length; + return slashes.slice(0, length - length % 2); +}; + +// > If the pattern ends with a slash, +// > it is removed for the purpose of the following description, +// > but it would only find a match with a directory. +// > In other words, foo/ will match a directory foo and paths underneath it, +// > but will not match a regular file or a symbolic link foo +// > (this is consistent with the way how pathspec works in general in Git). +// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`' +// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call +// you could use option `mark: true` with `glob` + +// '`foo/`' should not continue with the '`..`' +var REPLACERS = [[ +// Remove BOM +// TODO: +// Other similar zero-width characters? +/^\uFEFF/, function () { + return EMPTY; +}], +// > Trailing spaces are ignored unless they are quoted with backslash ("\") +[ +// (a\ ) -> (a ) +// (a ) -> (a) +// (a ) -> (a) +// (a \ ) -> (a ) +/((?:\\\\)*?)(\\?\s+)$/, function (_, m1, m2) { + return m1 + (m2.indexOf('\\') === 0 ? SPACE : EMPTY); +}], +// Replace (\ ) with ' ' +// (\ ) -> ' ' +// (\\ ) -> '\\ ' +// (\\\ ) -> '\\ ' +[/(\\+?)\s/g, function (_, m1) { + var length = m1.length; + return m1.slice(0, length - length % 2) + SPACE; +}], +// Escape metacharacters +// which is written down by users but means special for regular expressions. + +// > There are 12 characters with special meanings: +// > - the backslash \, +// > - the caret ^, +// > - the dollar sign $, +// > - the period or dot ., +// > - the vertical bar or pipe symbol |, +// > - the question mark ?, +// > - the asterisk or star *, +// > - the plus sign +, +// > - the opening parenthesis (, +// > - the closing parenthesis ), +// > - and the opening square bracket [, +// > - the opening curly brace {, +// > These special characters are often called "metacharacters". +[/[\\$.|*+(){^]/g, function (match) { + return "\\".concat(match); +}], [ +// > a question mark (?) matches a single character +/(?!\\)\?/g, function () { + return '[^/]'; +}], +// leading slash +[ +// > A leading slash matches the beginning of the pathname. +// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". +// A leading slash matches the beginning of the pathname +/^\//, function () { + return '^'; +}], +// replace special metacharacter slash after the leading slash +[/\//g, function () { + return '\\/'; +}], [ +// > A leading "**" followed by a slash means match in all directories. +// > For example, "**/foo" matches file or directory "foo" anywhere, +// > the same as pattern "foo". +// > "**/foo/bar" matches file or directory "bar" anywhere that is directly +// > under directory "foo". +// Notice that the '*'s have been replaced as '\\*' +/^\^*\\\*\\\*\\\//, +// '**/foo' <-> 'foo' +function () { + return '^(?:.*\\/)?'; +}], +// starting +[ +// there will be no leading '/' +// (which has been replaced by section "leading slash") +// If starts with '**', adding a '^' to the regular expression also works +/^(?=[^^])/, function startingReplacer() { + // If has a slash `/` at the beginning or middle + return !/\/(?!$)/.test(this) + // > Prior to 2.22.1 + // > If the pattern does not contain a slash /, + // > Git treats it as a shell glob pattern + // Actually, if there is only a trailing slash, + // git also treats it as a shell glob pattern + + // After 2.22.1 (compatible but clearer) + // > If there is a separator at the beginning or middle (or both) + // > of the pattern, then the pattern is relative to the directory + // > level of the particular .gitignore file itself. + // > Otherwise the pattern may also match at any level below + // > the .gitignore level. + ? '(?:^|\\/)' + + // > Otherwise, Git treats the pattern as a shell glob suitable for + // > consumption by fnmatch(3) + : '^'; +}], +// two globstars +[ +// Use lookahead assertions so that we could match more than one `'/**'` +/\\\/\\\*\\\*(?=\\\/|$)/g, +// Zero, one or several directories +// should not use '*', or it will be replaced by the next replacer + +// Check if it is not the last `'/**'` +function (_, index, str) { + return index + 6 < str.length + + // case: /**/ + // > A slash followed by two consecutive asterisks then a slash matches + // > zero or more directories. + // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on. + // '/**/' + ? '(?:\\/[^\\/]+)*' + + // case: /** + // > A trailing `"/**"` matches everything inside. + + // #21: everything inside but it should not include the current folder + : '\\/.+'; +}], +// normal intermediate wildcards +[ +// Never replace escaped '*' +// ignore rule '\*' will match the path '*' + +// 'abc.*/' -> go +// 'abc.*' -> skip this rule, +// coz trailing single wildcard will be handed by [trailing wildcard] +/(^|[^\\]+)(\\\*)+(?=.+)/g, +// '*.js' matches '.js' +// '*.js' doesn't match 'abc' +function (_, p1, p2) { + // 1. + // > An asterisk "*" matches anything except a slash. + // 2. + // > Other consecutive asterisks are considered regular asterisks + // > and will match according to the previous rules. + var unescaped = p2.replace(/\\\*/g, '[^\\/]*'); + return p1 + unescaped; +}], [ +// unescape, revert step 3 except for back slash +// For example, if a user escape a '\\*', +// after step 3, the result will be '\\\\\\*' +/\\\\\\(?=[$.|*+(){^])/g, function () { + return ESCAPE; +}], [ +// '\\\\' -> '\\' +/\\\\/g, function () { + return ESCAPE; +}], [ +// > The range notation, e.g. [a-zA-Z], +// > can be used to match one of the characters in a range. + +// `\` is escaped by step 3 +/(\\)?\[([^\]/]*?)(\\*)($|\])/g, function (match, leadEscape, range, endEscape, close) { + return leadEscape === ESCAPE + // '\\[bar]' -> '\\\\[bar\\]' + ? "\\[".concat(range).concat(cleanRangeBackSlash(endEscape)).concat(close) : close === ']' ? endEscape.length % 2 === 0 + // A normal case, and it is a range notation + // '[bar]' + // '[bar\\\\]' + ? "[".concat(sanitizeRange(range)).concat(endEscape, "]") // Invalid range notaton + // '[bar\\]' -> '[bar\\\\]' + : '[]' : '[]'; +}], +// ending +[ +// 'js' will not match 'js.' +// 'ab' will not match 'abc' +/(?:[^*])$/, +// WTF! +// https://git-scm.com/docs/gitignore +// changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) +// which re-fixes #24, #38 + +// > If there is a separator at the end of the pattern then the pattern +// > will only match directories, otherwise the pattern can match both +// > files and directories. + +// 'js*' will not match 'a.js' +// 'js/' will not match 'a.js' +// 'js' will match 'a.js' and 'a.js/' +function (match) { + return /\/$/.test(match) + // foo/ will not match 'foo' + ? "".concat(match, "$") // foo matches 'foo' and 'foo/' + : "".concat(match, "(?=$|\\/$)"); +}]]; +var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/; +var MODE_IGNORE = 'regex'; +var MODE_CHECK_IGNORE = 'checkRegex'; +var UNDERSCORE = '_'; +var TRAILING_WILD_CARD_REPLACERS = (_TRAILING_WILD_CARD_R = {}, _defineProperty(_TRAILING_WILD_CARD_R, MODE_IGNORE, function (_, p1) { + var prefix = p1 + // '\^': + // '/*' does not match EMPTY + // '/*' does not match everything + + // '\\\/': + // 'abc/*' does not match 'abc/' + ? "".concat(p1, "[^/]+") // 'a*' matches 'a' + // 'a*' matches 'aa' + : '[^/]*'; + return "".concat(prefix, "(?=$|\\/$)"); +}), _defineProperty(_TRAILING_WILD_CARD_R, MODE_CHECK_IGNORE, function (_, p1) { + // When doing `git check-ignore` + var prefix = p1 + // '\\\/': + // 'abc/*' DOES match 'abc/' ! + ? "".concat(p1, "[^/]*") // 'a*' matches 'a' + // 'a*' matches 'aa' + : '[^/]*'; + return "".concat(prefix, "(?=$|\\/$)"); +}), _TRAILING_WILD_CARD_R); + +// @param {pattern} +var makeRegexPrefix = function makeRegexPrefix(pattern) { + return REPLACERS.reduce(function (prev, _ref) { + var _ref2 = _slicedToArray(_ref, 2), + matcher = _ref2[0], + replacer = _ref2[1]; + return prev.replace(matcher, replacer.bind(pattern)); + }, pattern); +}; +var isString = function isString(subject) { + return typeof subject === 'string'; +}; + +// > A blank line matches no files, so it can serve as a separator for readability. +var checkPattern = function checkPattern(pattern) { + return pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) + + // > A line starting with # serves as a comment. + && pattern.indexOf('#') !== 0; +}; +var splitPattern = function splitPattern(pattern) { + return pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean); +}; +var IgnoreRule = /*#__PURE__*/function () { + function IgnoreRule(pattern, mark, body, ignoreCase, negative, prefix) { + _classCallCheck(this, IgnoreRule); + this.pattern = pattern; + this.mark = mark; + this.negative = negative; + define(this, 'body', body); + define(this, 'ignoreCase', ignoreCase); + define(this, 'regexPrefix', prefix); + } + _createClass(IgnoreRule, [{ + key: "regex", + get: function get() { + var key = UNDERSCORE + MODE_IGNORE; + if (this[key]) { + return this[key]; + } + return this._make(MODE_IGNORE, key); + } + }, { + key: "checkRegex", + get: function get() { + var key = UNDERSCORE + MODE_CHECK_IGNORE; + if (this[key]) { + return this[key]; + } + return this._make(MODE_CHECK_IGNORE, key); + } + }, { + key: "_make", + value: function _make(mode, key) { + var str = this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD, + // It does not need to bind pattern + TRAILING_WILD_CARD_REPLACERS[mode]); + var regex = this.ignoreCase ? new RegExp(str, 'i') : new RegExp(str); + return define(this, key, regex); + } + }]); + return IgnoreRule; +}(); +var createRule = function createRule(_ref3, ignoreCase) { + var pattern = _ref3.pattern, + mark = _ref3.mark; + var negative = false; + var body = pattern; + + // > An optional prefix "!" which negates the pattern; + if (body.indexOf('!') === 0) { + negative = true; + body = body.substr(1); + } + body = body + // > Put a backslash ("\") in front of the first "!" for patterns that + // > begin with a literal "!", for example, `"\!important!.txt"`. + .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!') + // > Put a backslash ("\") in front of the first hash for patterns that + // > begin with a hash. + .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#'); + var regexPrefix = makeRegexPrefix(body); + return new IgnoreRule(pattern, mark, body, ignoreCase, negative, regexPrefix); +}; +var RuleManager = /*#__PURE__*/function () { + function RuleManager(ignoreCase) { + _classCallCheck(this, RuleManager); + this._ignoreCase = ignoreCase; + this._rules = []; + } + _createClass(RuleManager, [{ + key: "_add", + value: function _add(pattern) { + // #32 + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules._rules); + this._added = true; + return; + } + if (isString(pattern)) { + pattern = { + pattern: pattern + }; + } + if (checkPattern(pattern.pattern)) { + var rule = createRule(pattern, this._ignoreCase); + this._added = true; + this._rules.push(rule); + } + } + + // @param {Array | string | Ignore} pattern + }, { + key: "add", + value: function add(pattern) { + this._added = false; + makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._add, this); + return this._added; + } + + // Test one single path without recursively checking parent directories + // + // - checkUnignored `boolean` whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE` + + // @returns {TestResult} true if a file is ignored + }, { + key: "test", + value: function test(path, checkUnignored, mode) { + var ignored = false; + var unignored = false; + var matchedRule; + this._rules.forEach(function (rule) { + var negative = rule.negative; + + // | ignored : unignored + // -------- | --------------------------------------- + // negative | 0:0 | 0:1 | 1:0 | 1:1 + // -------- | ------- | ------- | ------- | -------- + // 0 | TEST | TEST | SKIP | X + // 1 | TESTIF | SKIP | TEST | X + + // - SKIP: always skip + // - TEST: always test + // - TESTIF: only test if checkUnignored + // - X: that never happen + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { + return; + } + var matched = rule[mode].test(path); + if (!matched) { + return; + } + ignored = !negative; + unignored = negative; + matchedRule = negative ? UNDEFINED : rule; + }); + var ret = { + ignored: ignored, + unignored: unignored + }; + if (matchedRule) { + ret.rule = matchedRule; + } + return ret; + } + }]); + return RuleManager; +}(); +var throwError = function throwError(message, Ctor) { + throw new Ctor(message); +}; +var checkPath = function checkPath(path, originalPath, doThrow) { + if (!isString(path)) { + return doThrow("path must be a string, but got `".concat(originalPath, "`"), TypeError); + } + + // We don't know if we should ignore EMPTY, so throw + if (!path) { + return doThrow("path must not be empty", TypeError); + } + + // Check if it is a relative path + if (checkPath.isNotRelative(path)) { + var r = '`path.relative()`d'; + return doThrow("path should be a ".concat(r, " string, but got \"").concat(originalPath, "\""), RangeError); + } + return true; +}; +var isNotRelative = function isNotRelative(path) { + return REGEX_TEST_INVALID_PATH.test(path); +}; +checkPath.isNotRelative = isNotRelative; + +// On windows, the following function will be replaced +/* istanbul ignore next */ +checkPath.convert = function (p) { + return p; +}; +var Ignore = /*#__PURE__*/function () { + function Ignore() { + var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref4$ignorecase = _ref4.ignorecase, + ignorecase = _ref4$ignorecase === void 0 ? true : _ref4$ignorecase, + _ref4$ignoreCase = _ref4.ignoreCase, + ignoreCase = _ref4$ignoreCase === void 0 ? ignorecase : _ref4$ignoreCase, + _ref4$allowRelativePa = _ref4.allowRelativePaths, + allowRelativePaths = _ref4$allowRelativePa === void 0 ? false : _ref4$allowRelativePa; + _classCallCheck(this, Ignore); + define(this, KEY_IGNORE, true); + this._rules = new RuleManager(ignoreCase); + this._strictPathCheck = !allowRelativePaths; + this._initCache(); + } + _createClass(Ignore, [{ + key: "_initCache", + value: function _initCache() { + // A cache for the result of `.ignores()` + this._ignoreCache = Object.create(null); + + // A cache for the result of `.test()` + this._testCache = Object.create(null); + } + }, { + key: "add", + value: function add(pattern) { + if (this._rules.add(pattern)) { + // Some rules have just added to the ignore, + // making the behavior changed, + // so we need to re-initialize the result cache + this._initCache(); + } + return this; + } + + // legacy + }, { + key: "addPattern", + value: function addPattern(pattern) { + return this.add(pattern); + } + + // @returns {TestResult} + }, { + key: "_test", + value: function _test(originalPath, cache, checkUnignored, slices) { + var path = originalPath + // Supports nullable path + && checkPath.convert(originalPath); + checkPath(path, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE); + return this._t(path, cache, checkUnignored, slices); + } + }, { + key: "checkIgnore", + value: function checkIgnore(path) { + // If the path doest not end with a slash, `.ignores()` is much equivalent + // to `git check-ignore` + if (!REGEX_TEST_TRAILING_SLASH.test(path)) { + return this.test(path); + } + var slices = path.split(SLASH).filter(Boolean); + slices.pop(); + if (slices.length) { + var parent = this._t(slices.join(SLASH) + SLASH, this._testCache, true, slices); + if (parent.ignored) { + return parent; + } + } + return this._rules.test(path, false, MODE_CHECK_IGNORE); + } + }, { + key: "_t", + value: function _t( + // The path to be tested + path, + // The cache for the result of a certain checking + cache, + // Whether should check if the path is unignored + checkUnignored, + // The path slices + slices) { + if (path in cache) { + return cache[path]; + } + if (!slices) { + // path/to/a.js + // ['path', 'to', 'a.js'] + slices = path.split(SLASH).filter(Boolean); + } + slices.pop(); + + // If the path has no parent directory, just test it + if (!slices.length) { + return cache[path] = this._rules.test(path, checkUnignored, MODE_IGNORE); + } + var parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices); + + // If the path contains a parent directory, check the parent first + return cache[path] = parent.ignored + // > It is not possible to re-include a file if a parent directory of + // > that file is excluded. + ? parent : this._rules.test(path, checkUnignored, MODE_IGNORE); + } + }, { + key: "ignores", + value: function ignores(path) { + return this._test(path, this._ignoreCache, false).ignored; + } + }, { + key: "createFilter", + value: function createFilter() { + var _this = this; + return function (path) { + return !_this.ignores(path); + }; + } + }, { + key: "filter", + value: function filter(paths) { + return makeArray(paths).filter(this.createFilter()); + } + + // @returns {TestResult} + }, { + key: "test", + value: function test(path) { + return this._test(path, this._testCache, true); + } + }]); + return Ignore; +}(); +var factory = function factory(options) { + return new Ignore(options); +}; +var isPathValid = function isPathValid(path) { + return checkPath(path && checkPath.convert(path), path, RETURN_FALSE); +}; + +/* istanbul ignore next */ +var setupWindows = function setupWindows() { + /* eslint no-control-regex: "off" */ + var makePosix = function makePosix(str) { + return /^\\\\\?\\/.test(str) || /[\0-\x1F"<>\|]+/.test(str) ? str : str.replace(/\\/g, '/'); + }; + checkPath.convert = makePosix; + + // 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/' + // 'd:\\foo' + var REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = function (path) { + return REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path); + }; +}; + +// Windows +// -------------------------------------------------------------- +/* istanbul ignore next */ +if ( +// Detect `process` so that it can run in browsers. +typeof process !== 'undefined' && process.platform === 'win32') { + setupWindows(); +} + +// COMMONJS_EXPORTS //////////////////////////////////////////////////////////// + +module.exports = factory; + +// Although it is an anti-pattern, +// it is still widely misused by a lot of libraries in github +// Ref: https://github.com/search?q=ignore.default%28%29&type=code +factory["default"] = factory; +module.exports.isPathValid = isPathValid; + +// For testing purposes +define(module.exports, Symbol["for"]('setupWindows'), setupWindows); diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/package.json b/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/package.json new file mode 100644 index 0000000..c0bee68 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/package.json @@ -0,0 +1,87 @@ +{ + "name": "ignore", + "version": "7.0.5", + "description": "Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.", + "types": "index.d.ts", + "files": [ + "legacy.js", + "index.js", + "index.d.ts", + "LICENSE-MIT" + ], + "scripts": { + "prepublishOnly": "npm run build", + "build": "babel -o legacy.js index.js", + + "==================== linting ======================": "", + "lint": "eslint .", + + "===================== import ======================": "", + "ts": "npm run test:ts && npm run test:16", + "test:ts": "ts-node ./test/import/simple.ts", + "test:16": "npm run test:ts:16 && npm run test:cjs:16 && npm run test:mjs:16", + "test:ts:16": "ts-node --compilerOptions '{\"moduleResolution\": \"Node16\", \"module\": \"Node16\"}' ./test/import/simple.ts && tsc ./test/import/simple.ts --lib ES6 --moduleResolution Node16 --module Node16 && node ./test/import/simple.js", + "test:cjs:16": "ts-node --compilerOptions '{\"moduleResolution\": \"Node16\", \"module\": \"Node16\"}' ./test/import/simple.cjs", + "test:mjs:16": "ts-node --compilerOptions '{\"moduleResolution\": \"Node16\", \"module\": \"Node16\"}' ./test/import/simple.mjs && babel -o ./test/import/simple-mjs.js ./test/import/simple.mjs && node ./test/import/simple-mjs.js", + + "===================== cases =======================": "", + "test:cases": "npm run tap test/*.test.js -- --coverage", + "tap": "tap --reporter classic", + + "===================== debug =======================": "", + "test:git": "npm run tap test/git-check-ignore.test.js", + "test:ignore": "npm run tap test/ignore.test.js", + "test:ignore:only": "IGNORE_ONLY_IGNORES=1 npm run tap test/ignore.test.js", + "test:others": "npm run tap test/others.test.js", + "test:no-coverage": "npm run tap test/*.test.js -- --no-check-coverage", + + "test": "npm run lint && npm run ts && npm run build && npm run test:cases", + "test:win32": "IGNORE_TEST_WIN32=1 npm run test", + "report": "tap --coverage-report=html" + }, + "repository": { + "type": "git", + "url": "git@github.com:kaelzhang/node-ignore.git" + }, + "keywords": [ + "ignore", + ".gitignore", + "gitignore", + "npmignore", + "rules", + "manager", + "filter", + "regexp", + "regex", + "fnmatch", + "glob", + "asterisks", + "regular-expression" + ], + "author": "kael", + "license": "MIT", + "bugs": { + "url": "https://github.com/kaelzhang/node-ignore/issues" + }, + "devDependencies": { + "@babel/cli": "^7.22.9", + "@babel/core": "^7.22.9", + "@babel/preset-env": "^7.22.9", + "@typescript-eslint/eslint-plugin": "^8.19.1", + "debug": "^4.3.4", + "eslint": "^8.46.0", + "eslint-config-ostai": "^3.0.0", + "eslint-plugin-import": "^2.28.0", + "mkdirp": "^3.0.1", + "pre-suf": "^1.1.1", + "rimraf": "^6.0.1", + "spawn-sync": "^2.0.0", + "tap": "^16.3.9", + "tmp": "0.2.3", + "ts-node": "^10.9.2", + "typescript": "^5.6.2" + }, + "engines": { + "node": ">= 4" + } +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/package.json b/slider/node_modules/@typescript-eslint/eslint-plugin/package.json new file mode 100644 index 0000000..1f6a06c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/package.json @@ -0,0 +1,123 @@ +{ + "name": "@typescript-eslint/eslint-plugin", + "version": "8.44.1", + "description": "TypeScript plugin for ESLint", + "files": [ + "dist", + "!*.tsbuildinfo", + "index.d.ts", + "raw-plugin.d.ts", + "rules.d.ts", + "package.json", + "./README.md", + "LICENSE" + ], + "type": "commonjs", + "exports": { + ".": { + "types": "./index.d.ts", + "default": "./dist/index.js" + }, + "./package.json": "./package.json", + "./use-at-your-own-risk/rules": { + "types": "./rules.d.ts", + "default": "./dist/rules/index.js" + }, + "./use-at-your-own-risk/raw-plugin": { + "types": "./raw-plugin.d.ts", + "default": "./dist/raw-plugin.js" + } + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/eslint-plugin" + }, + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "homepage": "https://typescript-eslint.io/packages/eslint-plugin", + "license": "MIT", + "keywords": [ + "eslint", + "eslintplugin", + "eslint-plugin", + "typescript" + ], + "scripts": { + "build": "yarn run -BT nx build", + "clean": "rimraf dist/ coverage/", + "format": "yarn run -T format", + "generate-breaking-changes": "yarn run -BT nx generate-breaking-changes", + "generate-configs": "yarn run -BT nx generate-configs repo", + "lint": "yarn run -BT nx lint", + "test": "yarn run -BT nx test", + "typecheck": "yarn run -BT nx typecheck" + }, + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.44.1", + "@typescript-eslint/type-utils": "8.44.1", + "@typescript-eslint/utils": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "devDependencies": { + "@types/mdast": "^4.0.3", + "@types/natural-compare": "*", + "@typescript-eslint/rule-schema-to-typescript-types": "8.44.1", + "@typescript-eslint/rule-tester": "8.44.1", + "@vitest/coverage-v8": "^3.1.3", + "ajv": "^6.12.6", + "cross-fetch": "*", + "eslint": "*", + "json-schema": "*", + "markdown-table": "^3.0.3", + "marked": "^15.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-mdx": "^3.0.0", + "micromark-extension-mdxjs": "^3.0.0", + "prettier": "3.6.2", + "rimraf": "*", + "title-case": "^4.0.0", + "tsx": "*", + "typescript": "*", + "unist-util-visit": "^5.0.0", + "vitest": "^3.1.3" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.44.1", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "nx": { + "name": "eslint-plugin", + "includedScripts": [ + "clean" + ], + "targets": { + "generate-breaking-changes": { + "command": "tsx tools/generate-breaking-changes.mts", + "options": { + "cwd": "{projectRoot}" + }, + "dependsOn": [ + "type-utils:build" + ] + }, + "lint": { + "command": "eslint" + } + } + } +} diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/raw-plugin.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/raw-plugin.d.ts new file mode 100644 index 0000000..f0d41a5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/raw-plugin.d.ts @@ -0,0 +1,25 @@ +import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'; + +import type plugin from './index'; + +declare const cjsExport: { + flatConfigs: { + 'flat/all': FlatConfig.ConfigArray; + 'flat/base': FlatConfig.Config; + 'flat/disable-type-checked': FlatConfig.Config; + 'flat/eslint-recommended': FlatConfig.Config; + 'flat/recommended': FlatConfig.ConfigArray; + 'flat/recommended-type-checked': FlatConfig.ConfigArray; + 'flat/recommended-type-checked-only': FlatConfig.ConfigArray; + 'flat/strict': FlatConfig.ConfigArray; + 'flat/strict-type-checked': FlatConfig.ConfigArray; + 'flat/strict-type-checked-only': FlatConfig.ConfigArray; + 'flat/stylistic': FlatConfig.ConfigArray; + 'flat/stylistic-type-checked': FlatConfig.ConfigArray; + 'flat/stylistic-type-checked-only': FlatConfig.ConfigArray; + }; + parser: FlatConfig.Parser; + plugin: typeof plugin; +}; + +export = cjsExport; diff --git a/slider/node_modules/@typescript-eslint/eslint-plugin/rules.d.ts b/slider/node_modules/@typescript-eslint/eslint-plugin/rules.d.ts new file mode 100644 index 0000000..ad45f71 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/eslint-plugin/rules.d.ts @@ -0,0 +1,87 @@ +/* +We purposely don't generate types for our plugin because TL;DR: +1) there's no real reason that anyone should do a typed import of our rules, +2) it would require us to change our code so there aren't as many inferred types + +This type declaration exists as a hacky way to add a type to the export for our +internal packages that require it. + +*** Long reason *** + +When you turn on declaration files, TS requires all types to be "fully resolvable" +without changes to the code. +All of our lint rules `export default createRule(...)`, which means they all +implicitly reference the `TSESLint.Rule` type for the export. + +TS wants to transpile each rule file to this `.d.ts` file: + +```ts +import type { TSESLint } from '@typescript-eslint/utils'; +declare const _default: TSESLint.RuleModule; +export default _default; +``` + +Because we don't import `TSESLint` in most files, it means that TS would have to +insert a new import during the declaration emit to make this work. +However TS wants to avoid adding new imports to the file because a new module +could have type side-effects (like global augmentation) which could cause weird +type side-effects in the decl file that wouldn't exist in source TS file. + +So TS errors on most of our rules with the following error: +``` +The inferred type of 'default' cannot be named without a reference to +'../../../../node_modules/@typescript-eslint/utils/src/ts-eslint/Rule'. +This is likely not portable. A type annotation is necessary. ts(2742) +``` +*/ +/* eslint-disable no-restricted-syntax */ + +import type { + RuleModuleWithMetaDocs, + RuleRecommendation, + RuleRecommendationAcrossConfigs, +} from '@typescript-eslint/utils/ts-eslint'; + +interface ESLintPluginDocs { + /** + * Does the rule extend (or is it based off of) an ESLint code rule? + * Alternately accepts the name of the base rule, in case the rule has been renamed. + * This is only used for documentation purposes. + */ + extendsBaseRule?: boolean | string; + + /** + * If a string config name, which starting config this rule is enabled in. + * If an object, which settings it has enabled in each of those configs. + */ + recommended?: RuleRecommendation | RuleRecommendationAcrossConfigs; + + /** + * Does the rule require us to create a full TypeScript Program in order for it + * to type-check code. This is only used for documentation purposes. + */ + requiresTypeChecking?: boolean; +} + +type ESLintPluginRuleModule = RuleModuleWithMetaDocs< + string, + readonly unknown[], + ESLintPluginDocs +>; + +type TypeScriptESLintRules = Record< + string, + RuleModuleWithMetaDocs +>; + +declare const rules: TypeScriptESLintRules; + +declare namespace rules { + export type { + ESLintPluginDocs, + ESLintPluginRuleModule, + TypeScriptESLintRules, + }; +} + +export = rules; diff --git a/slider/node_modules/@typescript-eslint/parser/LICENSE b/slider/node_modules/@typescript-eslint/parser/LICENSE new file mode 100644 index 0000000..5de6cb6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/parser/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 typescript-eslint and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@typescript-eslint/parser/README.md b/slider/node_modules/@typescript-eslint/parser/README.md new file mode 100644 index 0000000..5eea570 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/parser/README.md @@ -0,0 +1,12 @@ +# `@typescript-eslint/parser` + +> An ESLint parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source code. + +[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/parser.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/parser) +[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/parser.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/parser) + +👉 See **https://typescript-eslint.io/packages/parser** for documentation on this package. + +> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code. + + diff --git a/slider/node_modules/@typescript-eslint/parser/dist/index.d.ts b/slider/node_modules/@typescript-eslint/parser/dist/index.d.ts new file mode 100644 index 0000000..9b07b94 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/parser/dist/index.d.ts @@ -0,0 +1,8 @@ +export { parse, parseForESLint, type ParserOptions } from './parser'; +export { clearCaches, createProgram, type ParserServices, type ParserServicesWithoutTypeInformation, type ParserServicesWithTypeInformation, withoutProjectParserOptions, } from '@typescript-eslint/typescript-estree'; +export declare const version: string; +export declare const meta: { + name: string; + version: string; +}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/parser/dist/index.d.ts.map b/slider/node_modules/@typescript-eslint/parser/dist/index.d.ts.map new file mode 100644 index 0000000..d8aefab --- /dev/null +++ b/slider/node_modules/@typescript-eslint/parser/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EACL,WAAW,EACX,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,oCAAoC,EACzC,KAAK,iCAAiC,EACtC,2BAA2B,GAC5B,MAAM,sCAAsC,CAAC;AAI9C,eAAO,MAAM,OAAO,EAAE,MAA2C,CAAC;AAElE,eAAO,MAAM,IAAI;;;CAGhB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/parser/dist/index.js b/slider/node_modules/@typescript-eslint/parser/dist/index.js new file mode 100644 index 0000000..e5868aa --- /dev/null +++ b/slider/node_modules/@typescript-eslint/parser/dist/index.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.meta = exports.version = exports.withoutProjectParserOptions = exports.createProgram = exports.clearCaches = exports.parseForESLint = exports.parse = void 0; +var parser_1 = require("./parser"); +Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parser_1.parse; } }); +Object.defineProperty(exports, "parseForESLint", { enumerable: true, get: function () { return parser_1.parseForESLint; } }); +var typescript_estree_1 = require("@typescript-eslint/typescript-estree"); +Object.defineProperty(exports, "clearCaches", { enumerable: true, get: function () { return typescript_estree_1.clearCaches; } }); +Object.defineProperty(exports, "createProgram", { enumerable: true, get: function () { return typescript_estree_1.createProgram; } }); +Object.defineProperty(exports, "withoutProjectParserOptions", { enumerable: true, get: function () { return typescript_estree_1.withoutProjectParserOptions; } }); +// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access +exports.version = require('../package.json').version; +exports.meta = { + name: 'typescript-eslint/parser', + version: exports.version, +}; diff --git a/slider/node_modules/@typescript-eslint/parser/dist/parser.d.ts b/slider/node_modules/@typescript-eslint/parser/dist/parser.d.ts new file mode 100644 index 0000000..ea9bd09 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/parser/dist/parser.d.ts @@ -0,0 +1,23 @@ +import type { ScopeManager } from '@typescript-eslint/scope-manager'; +import type { ParserOptions, TSESTree } from '@typescript-eslint/types'; +import type { AST, ParserServices } from '@typescript-eslint/typescript-estree'; +import type { VisitorKeys } from '@typescript-eslint/visitor-keys'; +import type * as ts from 'typescript'; +interface ESLintProgram extends AST<{ + comment: true; + tokens: true; +}> { + comments: TSESTree.Comment[]; + range: [number, number]; + tokens: TSESTree.Token[]; +} +interface ParseForESLintResult { + ast: ESLintProgram; + scopeManager: ScopeManager; + services: ParserServices; + visitorKeys: VisitorKeys; +} +export declare function parse(code: string | ts.SourceFile, options?: ParserOptions): ParseForESLintResult['ast']; +export declare function parseForESLint(code: string | ts.SourceFile, parserOptions?: ParserOptions | null): ParseForESLintResult; +export type { ParserOptions } from '@typescript-eslint/types'; +//# sourceMappingURL=parser.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/parser/dist/parser.d.ts.map b/slider/node_modules/@typescript-eslint/parser/dist/parser.d.ts.map new file mode 100644 index 0000000..87d0752 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/parser/dist/parser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAO,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,EACV,GAAG,EACH,cAAc,EAEf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAUtC,UAAU,aAAc,SAAQ,GAAG,CAAC;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,IAAI,CAAA;CAAE,CAAC;IAClE,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;IAC7B,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;CAC1B;AAED,UAAU,oBAAoB;IAC5B,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAkDD,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,GAAG,EAAE,CAAC,UAAU,EAC5B,OAAO,CAAC,EAAE,aAAa,GACtB,oBAAoB,CAAC,KAAK,CAAC,CAE7B;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,GAAG,EAAE,CAAC,UAAU,EAC5B,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,GACnC,oBAAoB,CAiGtB;AAED,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/parser/dist/parser.js b/slider/node_modules/@typescript-eslint/parser/dist/parser.js new file mode 100644 index 0000000..4d3200a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/parser/dist/parser.js @@ -0,0 +1,139 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parse = parse; +exports.parseForESLint = parseForESLint; +const scope_manager_1 = require("@typescript-eslint/scope-manager"); +const typescript_estree_1 = require("@typescript-eslint/typescript-estree"); +const visitor_keys_1 = require("@typescript-eslint/visitor-keys"); +const debug_1 = __importDefault(require("debug")); +const typescript_1 = require("typescript"); +const log = (0, debug_1.default)('typescript-eslint:parser:parser'); +function validateBoolean(value, fallback = false) { + if (typeof value !== 'boolean') { + return fallback; + } + return value; +} +const LIB_FILENAME_REGEX = /lib\.(.+)\.d\.[cm]?ts$/; +function getLib(compilerOptions) { + if (compilerOptions.lib) { + return compilerOptions.lib + .map(lib => LIB_FILENAME_REGEX.exec(lib.toLowerCase())?.[1]) + .filter((lib) => !!lib); + } + const target = compilerOptions.target ?? typescript_1.ScriptTarget.ES5; + // https://github.com/microsoft/TypeScript/blob/ae582a22ee1bb052e19b7c1bc4cac60509b574e0/src/compiler/utilitiesPublic.ts#L13-L36 + switch (target) { + case typescript_1.ScriptTarget.ES2015: + return ['es6']; + case typescript_1.ScriptTarget.ES2016: + return ['es2016.full']; + case typescript_1.ScriptTarget.ES2017: + return ['es2017.full']; + case typescript_1.ScriptTarget.ES2018: + return ['es2018.full']; + case typescript_1.ScriptTarget.ES2019: + return ['es2019.full']; + case typescript_1.ScriptTarget.ES2020: + return ['es2020.full']; + case typescript_1.ScriptTarget.ES2021: + return ['es2021.full']; + case typescript_1.ScriptTarget.ES2022: + return ['es2022.full']; + case typescript_1.ScriptTarget.ES2023: + return ['es2023.full']; + case typescript_1.ScriptTarget.ES2024: + return ['es2024.full']; + case typescript_1.ScriptTarget.ESNext: + return ['esnext.full']; + default: + return ['lib']; + } +} +function parse(code, options) { + return parseForESLint(code, options).ast; +} +function parseForESLint(code, parserOptions) { + if (!parserOptions || typeof parserOptions !== 'object') { + parserOptions = {}; + } + else { + parserOptions = { ...parserOptions }; + } + // https://eslint.org/docs/user-guide/configuring#specifying-parser-options + // if sourceType is not provided by default eslint expect that it will be set to "script" + if (parserOptions.sourceType !== 'module' && + parserOptions.sourceType !== 'script') { + parserOptions.sourceType = 'script'; + } + if (typeof parserOptions.ecmaFeatures !== 'object') { + parserOptions.ecmaFeatures = {}; + } + /** + * Allow the user to suppress the warning from typescript-estree if they are using an unsupported + * version of TypeScript + */ + const warnOnUnsupportedTypeScriptVersion = validateBoolean(parserOptions.warnOnUnsupportedTypeScriptVersion, true); + const tsestreeOptions = { + jsx: validateBoolean(parserOptions.ecmaFeatures.jsx), + ...(!warnOnUnsupportedTypeScriptVersion && { loggerFn: false }), + ...parserOptions, + // Override errorOnTypeScriptSyntacticAndSemanticIssues and set it to false to prevent use from user config + // https://github.com/typescript-eslint/typescript-eslint/issues/8681#issuecomment-2000411834 + errorOnTypeScriptSyntacticAndSemanticIssues: false, + // comment, loc, range, and tokens should always be set for ESLint usage + // https://github.com/typescript-eslint/typescript-eslint/issues/8347 + comment: true, + loc: true, + range: true, + tokens: true, + }; + const analyzeOptions = { + globalReturn: parserOptions.ecmaFeatures.globalReturn, + jsxFragmentName: parserOptions.jsxFragmentName, + jsxPragma: parserOptions.jsxPragma, + lib: parserOptions.lib, + sourceType: parserOptions.sourceType, + }; + const { ast, services } = (0, typescript_estree_1.parseAndGenerateServices)(code, tsestreeOptions); + ast.sourceType = parserOptions.sourceType; + if (services.program) { + // automatically apply the options configured for the program + const compilerOptions = services.program.getCompilerOptions(); + if (analyzeOptions.lib == null) { + analyzeOptions.lib = getLib(compilerOptions); + log('Resolved libs from program: %o', analyzeOptions.lib); + } + if ( + // eslint-disable-next-line @typescript-eslint/internal/eqeq-nullish + analyzeOptions.jsxPragma === undefined && + compilerOptions.jsxFactory != null) { + // in case the user has specified something like "preact.h" + const factory = compilerOptions.jsxFactory.split('.')[0].trim(); + analyzeOptions.jsxPragma = factory; + log('Resolved jsxPragma from program: %s', analyzeOptions.jsxPragma); + } + if ( + // eslint-disable-next-line @typescript-eslint/internal/eqeq-nullish + analyzeOptions.jsxFragmentName === undefined && + compilerOptions.jsxFragmentFactory != null) { + // in case the user has specified something like "preact.Fragment" + const fragFactory = compilerOptions.jsxFragmentFactory + .split('.')[0] + .trim(); + analyzeOptions.jsxFragmentName = fragFactory; + log('Resolved jsxFragmentName from program: %s', analyzeOptions.jsxFragmentName); + } + } + const scopeManager = (0, scope_manager_1.analyze)(ast, analyzeOptions); + // if not defined - override from the parserOptions + services.emitDecoratorMetadata ??= + parserOptions.emitDecoratorMetadata === true; + services.experimentalDecorators ??= + parserOptions.experimentalDecorators === true; + services.isolatedDeclarations ??= parserOptions.isolatedDeclarations === true; + return { ast, scopeManager, services, visitorKeys: visitor_keys_1.visitorKeys }; +} diff --git a/slider/node_modules/@typescript-eslint/parser/package.json b/slider/node_modules/@typescript-eslint/parser/package.json new file mode 100644 index 0000000..e0f9df2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/parser/package.json @@ -0,0 +1,83 @@ +{ + "name": "@typescript-eslint/parser", + "version": "8.44.1", + "description": "An ESLint custom parser which leverages TypeScript ESTree", + "files": [ + "dist", + "!*.tsbuildinfo", + "README.md", + "LICENSE" + ], + "type": "commonjs", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/parser" + }, + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "homepage": "https://typescript-eslint.io/packages/parser", + "license": "MIT", + "keywords": [ + "ast", + "ecmascript", + "javascript", + "typescript", + "parser", + "syntax", + "eslint" + ], + "scripts": { + "build": "yarn run -BT nx build", + "clean": "rimraf dist/ coverage/", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", + "test": "yarn run -BT nx test", + "typecheck": "yarn run -BT nx typecheck" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + }, + "dependencies": { + "@typescript-eslint/scope-manager": "8.44.1", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1", + "debug": "^4.3.4" + }, + "devDependencies": { + "@vitest/coverage-v8": "^3.1.3", + "eslint": "*", + "glob": "*", + "rimraf": "*", + "typescript": "*", + "vitest": "^3.1.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "nx": { + "name": "parser", + "includedScripts": [ + "clean" + ], + "targets": { + "lint": { + "command": "eslint" + } + } + } +} diff --git a/slider/node_modules/@typescript-eslint/project-service/LICENSE b/slider/node_modules/@typescript-eslint/project-service/LICENSE new file mode 100644 index 0000000..d405c09 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/project-service/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 typescript-eslint and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@typescript-eslint/project-service/README.md b/slider/node_modules/@typescript-eslint/project-service/README.md new file mode 100644 index 0000000..299a933 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/project-service/README.md @@ -0,0 +1,12 @@ +# `@typescript-eslint/project-service` + +> Standalone TypeScript project service wrapper for linting. + +[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/project-service.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/project-service) +[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/project-service.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/project-service) + +A standalone export of the "Project Service" that powers typed linting for typescript-eslint. + +> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code. + + diff --git a/slider/node_modules/@typescript-eslint/project-service/dist/createProjectService.d.ts b/slider/node_modules/@typescript-eslint/project-service/dist/createProjectService.d.ts new file mode 100644 index 0000000..9319ac5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/project-service/dist/createProjectService.d.ts @@ -0,0 +1,60 @@ +import type { ProjectServiceOptions } from '@typescript-eslint/types'; +import type * as ts from 'typescript/lib/tsserverlibrary'; +/** + * Shortcut type to refer to TypeScript's server ProjectService. + */ +export type TypeScriptProjectService = ts.server.ProjectService; +/** + * A created Project Service instance, as well as metadata on its creation. + */ +export interface ProjectServiceAndMetadata { + /** + * Files allowed to be loaded from the default project, if any were specified. + */ + allowDefaultProject: string[] | undefined; + /** + * The performance.now() timestamp of the last reload of the project service. + */ + lastReloadTimestamp: number; + /** + * The maximum number of files that can be matched by the default project. + */ + maximumDefaultProjectFileMatchCount: number; + /** + * The created TypeScript Project Service instance. + */ + service: TypeScriptProjectService; +} +/** + * Settings to create a new Project Service instance with {@link createProjectService}. + */ +export interface CreateProjectServiceSettings { + /** + * Granular options to configure the project service. + */ + options?: ProjectServiceOptions; + /** + * How aggressively (and slowly) to parse JSDoc comments. + */ + jsDocParsingMode?: ts.JSDocParsingMode; + /** + * Root directory for the tsconfig.json file, if not the current directory. + */ + tsconfigRootDir?: string; +} +/** + * Creates a new Project Service instance, as well as metadata on its creation. + * @param settings Settings to create a new Project Service instance. + * @returns A new Project Service instance, as well as metadata on its creation. + * @example + * ```ts + * import { createProjectService } from '@typescript-eslint/project-service'; + * + * const { service } = createProjectService(); + * + * service.openClientFile('index.ts'); + * ``` + */ +export declare function createProjectService({ jsDocParsingMode, options: optionsRaw, tsconfigRootDir, }?: CreateProjectServiceSettings): ProjectServiceAndMetadata; +export { type ProjectServiceOptions } from '@typescript-eslint/types'; +//# sourceMappingURL=createProjectService.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/project-service/dist/createProjectService.d.ts.map b/slider/node_modules/@typescript-eslint/project-service/dist/createProjectService.d.ts.map new file mode 100644 index 0000000..9795374 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/project-service/dist/createProjectService.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createProjectService.d.ts","sourceRoot":"","sources":["../src/createProjectService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,KAAK,EAAE,MAAM,gCAAgC,CAAC;AA4B1D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,mBAAmB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAE1C;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,mCAAmC,EAAE,MAAM,CAAC;IAE5C;;OAEG;IACH,OAAO,EAAE,wBAAwB,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAEhC;;OAEG;IACH,gBAAgB,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC;IAEvC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,gBAAgB,EAChB,OAAO,EAAE,UAAe,EACxB,eAAe,GAChB,GAAE,4BAAiC,GAAG,yBAAyB,CA0H/D;AAED,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,0BAA0B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/project-service/dist/createProjectService.js b/slider/node_modules/@typescript-eslint/project-service/dist/createProjectService.js new file mode 100644 index 0000000..03ac1fd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/project-service/dist/createProjectService.js @@ -0,0 +1,137 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProjectService = createProjectService; +const debug_1 = __importDefault(require("debug")); +const getParsedConfigFileFromTSServer_js_1 = require("./getParsedConfigFileFromTSServer.js"); +const DEFAULT_PROJECT_MATCHED_FILES_THRESHOLD = 8; +const log = (0, debug_1.default)('typescript-eslint:project-service:createProjectService'); +const logTsserverErr = (0, debug_1.default)('typescript-eslint:project-service:tsserver:err'); +const logTsserverInfo = (0, debug_1.default)('typescript-eslint:project-service:tsserver:info'); +const logTsserverPerf = (0, debug_1.default)('typescript-eslint:project-service:tsserver:perf'); +const logTsserverEvent = (0, debug_1.default)('typescript-eslint:project-service:tsserver:event'); +// For TypeScript APIs that expect a function to be passed in +// eslint-disable-next-line @typescript-eslint/no-empty-function +const doNothing = () => { }; +const createStubFileWatcher = () => ({ + close: doNothing, +}); +/** + * Creates a new Project Service instance, as well as metadata on its creation. + * @param settings Settings to create a new Project Service instance. + * @returns A new Project Service instance, as well as metadata on its creation. + * @example + * ```ts + * import { createProjectService } from '@typescript-eslint/project-service'; + * + * const { service } = createProjectService(); + * + * service.openClientFile('index.ts'); + * ``` + */ +function createProjectService({ jsDocParsingMode, options: optionsRaw = {}, tsconfigRootDir, } = {}) { + const options = { + defaultProject: 'tsconfig.json', + ...optionsRaw, + }; + // We import this lazily to avoid its cost for users who don't use the service + // TODO: Once we drop support for TS<5.3 we can import from "typescript" directly + // eslint-disable-next-line @typescript-eslint/no-require-imports + const tsserver = require('typescript/lib/tsserverlibrary'); + // TODO: see getWatchProgramsForProjects + // We don't watch the disk, we just refer to these when ESLint calls us + // there's a whole separate update pass in maybeInvalidateProgram at the bottom of getWatchProgramsForProjects + // (this "goes nuclear on TypeScript") + const system = { + ...tsserver.sys, + clearImmediate, + clearTimeout, + setImmediate, + setTimeout, + watchDirectory: createStubFileWatcher, + watchFile: createStubFileWatcher, + // We stop loading any TypeScript plugins by default, to prevent them from attaching disk watchers + // See https://github.com/typescript-eslint/typescript-eslint/issues/9905 + ...(!options.loadTypeScriptPlugins && { + require: () => ({ + error: { + message: 'TypeScript plugins are not required when using parserOptions.projectService.', + }, + module: undefined, + }), + }), + }; + const logger = { + close: doNothing, + endGroup: doNothing, + getLogFileName: () => undefined, + // The debug library doesn't use levels without creating a namespace for each. + // Log levels are not passed to the writer so we wouldn't be able to forward + // to a respective namespace. Supporting would require an additional flag for + // granular control. Defaulting to all levels for now. + hasLevel: () => true, + info(s) { + this.msg(s, tsserver.server.Msg.Info); + }, + loggingEnabled: () => + // if none of the debug namespaces are enabled, then don't enable logging in tsserver + logTsserverInfo.enabled || + logTsserverErr.enabled || + logTsserverPerf.enabled, + msg: (s, type) => { + switch (type) { + case tsserver.server.Msg.Err: + logTsserverErr(s); + break; + case tsserver.server.Msg.Perf: + logTsserverPerf(s); + break; + default: + logTsserverInfo(s); + } + }, + perftrc(s) { + this.msg(s, tsserver.server.Msg.Perf); + }, + startGroup: doNothing, + }; + log('Creating Project Service with: %o', options); + const service = new tsserver.server.ProjectService({ + cancellationToken: { isCancellationRequested: () => false }, + eventHandler: logTsserverEvent.enabled + ? (e) => { + logTsserverEvent(e); + } + : undefined, + host: system, + jsDocParsingMode, + logger, + session: undefined, + useInferredProjectPerProjectRoot: false, + useSingleInferredProject: false, + }); + service.setHostConfiguration({ + preferences: { + includePackageJsonAutoImports: 'off', + }, + }); + log('Enabling default project: %s', options.defaultProject); + const configFile = (0, getParsedConfigFileFromTSServer_js_1.getParsedConfigFileFromTSServer)(tsserver, options.defaultProject, !!optionsRaw.defaultProject, tsconfigRootDir); + if (configFile) { + service.setCompilerOptionsForInferredProjects( + // NOTE: The inferred projects API is not intended for source files when a tsconfig + // exists. There is no API that generates an InferredProjectCompilerOptions suggesting + // it is meant for hard coded options passed in. Hard asserting as a work around. + // See https://github.com/microsoft/TypeScript/blob/27bcd4cb5a98bce46c9cdd749752703ead021a4b/src/server/protocol.ts#L1904 + configFile.options); + } + return { + allowDefaultProject: options.allowDefaultProject, + lastReloadTimestamp: performance.now(), + maximumDefaultProjectFileMatchCount: options.maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING ?? + DEFAULT_PROJECT_MATCHED_FILES_THRESHOLD, + service, + }; +} diff --git a/slider/node_modules/@typescript-eslint/project-service/dist/getParsedConfigFileFromTSServer.d.ts b/slider/node_modules/@typescript-eslint/project-service/dist/getParsedConfigFileFromTSServer.d.ts new file mode 100644 index 0000000..78acf35 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/project-service/dist/getParsedConfigFileFromTSServer.d.ts @@ -0,0 +1,3 @@ +import type * as ts from 'typescript/lib/tsserverlibrary'; +export declare function getParsedConfigFileFromTSServer(tsserver: typeof ts, defaultProject: string, throwOnFailure: boolean, tsconfigRootDir?: string): ts.ParsedCommandLine | undefined; +//# sourceMappingURL=getParsedConfigFileFromTSServer.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/project-service/dist/getParsedConfigFileFromTSServer.d.ts.map b/slider/node_modules/@typescript-eslint/project-service/dist/getParsedConfigFileFromTSServer.d.ts.map new file mode 100644 index 0000000..667f22f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/project-service/dist/getParsedConfigFileFromTSServer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getParsedConfigFileFromTSServer.d.ts","sourceRoot":"","sources":["../src/getParsedConfigFileFromTSServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAI1D,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,OAAO,EAAE,EACnB,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,OAAO,EACvB,eAAe,CAAC,EAAE,MAAM,GACvB,EAAE,CAAC,iBAAiB,GAAG,SAAS,CAYlC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/project-service/dist/getParsedConfigFileFromTSServer.js b/slider/node_modules/@typescript-eslint/project-service/dist/getParsedConfigFileFromTSServer.js new file mode 100644 index 0000000..090367d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/project-service/dist/getParsedConfigFileFromTSServer.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getParsedConfigFileFromTSServer = getParsedConfigFileFromTSServer; +const tsconfig_utils_1 = require("@typescript-eslint/tsconfig-utils"); +function getParsedConfigFileFromTSServer(tsserver, defaultProject, throwOnFailure, tsconfigRootDir) { + try { + return (0, tsconfig_utils_1.getParsedConfigFile)(tsserver, defaultProject, tsconfigRootDir); + } + catch (error) { + if (throwOnFailure) { + throw new Error(`Could not read Project Service default project '${defaultProject}': ${error.message}`); + } + } + return undefined; +} diff --git a/slider/node_modules/@typescript-eslint/project-service/dist/index.d.ts b/slider/node_modules/@typescript-eslint/project-service/dist/index.d.ts new file mode 100644 index 0000000..0f5e6f0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/project-service/dist/index.d.ts @@ -0,0 +1,2 @@ +export * from './createProjectService'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/project-service/dist/index.d.ts.map b/slider/node_modules/@typescript-eslint/project-service/dist/index.d.ts.map new file mode 100644 index 0000000..b345d2b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/project-service/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/project-service/dist/index.js b/slider/node_modules/@typescript-eslint/project-service/dist/index.js new file mode 100644 index 0000000..a35a51b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/project-service/dist/index.js @@ -0,0 +1,17 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./createProjectService"), exports); diff --git a/slider/node_modules/@typescript-eslint/project-service/package.json b/slider/node_modules/@typescript-eslint/project-service/package.json new file mode 100644 index 0000000..843f62b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/project-service/package.json @@ -0,0 +1,75 @@ +{ + "name": "@typescript-eslint/project-service", + "version": "8.44.1", + "description": "Standalone TypeScript project service wrapper for linting.", + "files": [ + "dist", + "!*.tsbuildinfo", + "package.json", + "README.md", + "LICENSE" + ], + "type": "commonjs", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "types": "./dist/index.d.ts", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/project-service" + }, + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "homepage": "https://typescript-eslint.io", + "license": "MIT", + "keywords": [ + "eslint", + "typescript", + "estree" + ], + "scripts": { + "//": "These package scripts are mostly here for convenience. Task running is handled by Nx at the root level.", + "build": "yarn run -BT nx build", + "clean": "rimraf dist/ coverage/", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", + "test": "yarn run -BT nx test", + "typecheck": "yarn run -BT nx typecheck" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + }, + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.44.1", + "@typescript-eslint/types": "^8.44.1", + "debug": "^4.3.4" + }, + "devDependencies": { + "@vitest/coverage-v8": "^3.1.3", + "rimraf": "*", + "typescript": "*", + "vitest": "^3.1.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "publishConfig": { + "access": "public" + }, + "nx": { + "name": "project-service", + "includedScripts": [ + "clean" + ] + } +} diff --git a/slider/node_modules/@typescript-eslint/scope-manager/LICENSE b/slider/node_modules/@typescript-eslint/scope-manager/LICENSE new file mode 100644 index 0000000..5de6cb6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 typescript-eslint and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@typescript-eslint/scope-manager/README.md b/slider/node_modules/@typescript-eslint/scope-manager/README.md new file mode 100644 index 0000000..310222e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/README.md @@ -0,0 +1,10 @@ +# `@typescript-eslint/scope-manager` + +[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/scope-manager.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/scope-manager) +[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/scope-manager.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/scope-manager) + +👉 See **https://typescript-eslint.io/packages/scope-manager** for documentation on this package. + +> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code. + + diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts new file mode 100644 index 0000000..7d6fd45 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts @@ -0,0 +1,3 @@ +export declare function createIdGenerator(): () => number; +export declare function resetIds(): void; +//# sourceMappingURL=ID.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts.map new file mode 100644 index 0000000..dd80fa4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ID.d.ts","sourceRoot":"","sources":["../src/ID.ts"],"names":[],"mappings":"AAGA,wBAAgB,iBAAiB,IAAI,MAAM,MAAM,CAUhD;AAED,wBAAgB,QAAQ,IAAI,IAAI,CAE/B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/ID.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/ID.js new file mode 100644 index 0000000..7019b2e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/ID.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createIdGenerator = createIdGenerator; +exports.resetIds = resetIds; +const ID_CACHE = new Map(); +let NEXT_KEY = 0; +function createIdGenerator() { + const key = (NEXT_KEY += 1); + ID_CACHE.set(key, 0); + return () => { + const current = ID_CACHE.get(key) ?? 0; + const next = current + 1; + ID_CACHE.set(key, next); + return next; + }; +} +function resetIds() { + ID_CACHE.clear(); +} diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts new file mode 100644 index 0000000..d5ae674 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts @@ -0,0 +1,72 @@ +import type { SourceType, TSESTree } from '@typescript-eslint/types'; +import type { Scope } from './scope'; +import type { Variable } from './variable'; +import { BlockScope, CatchScope, ClassScope, ConditionalTypeScope, ForScope, FunctionExpressionNameScope, FunctionScope, FunctionTypeScope, GlobalScope, MappedTypeScope, ModuleScope, SwitchScope, TSEnumScope, TSModuleScope, TypeScope, WithScope } from './scope'; +import { ClassFieldInitializerScope } from './scope/ClassFieldInitializerScope'; +import { ClassStaticBlockScope } from './scope/ClassStaticBlockScope'; +interface ScopeManagerOptions { + globalReturn?: boolean; + impliedStrict?: boolean; + sourceType?: SourceType; +} +/** + * @see https://eslint.org/docs/latest/developer-guide/scope-manager-interface#scopemanager-interface + */ +export declare class ScopeManager { + #private; + currentScope: Scope | null; + readonly declaredVariables: WeakMap; + /** + * The root scope + */ + globalScope: GlobalScope | null; + readonly nodeToScope: WeakMap; + /** + * All scopes + * @public + */ + readonly scopes: Scope[]; + constructor(options: ScopeManagerOptions); + isES6(): boolean; + isGlobalReturn(): boolean; + isImpliedStrict(): boolean; + isModule(): boolean; + isStrictModeSupported(): boolean; + get variables(): Variable[]; + /** + * Get the variables that a given AST node defines. The gotten variables' `def[].node`/`def[].parent` property is the node. + * If the node does not define any variable, this returns an empty array. + * @param node An AST node to get their variables. + */ + getDeclaredVariables(node: TSESTree.Node): Variable[]; + /** + * Get the scope of a given AST node. The gotten scope's `block` property is the node. + * This method never returns `function-expression-name` scope. If the node does not have their scope, this returns `null`. + * + * @param node An AST node to get their scope. + * @param inner If the node has multiple scopes, this returns the outermost scope normally. + * If `inner` is `true` then this returns the innermost scope. + */ + acquire(node: TSESTree.Node, inner?: boolean): Scope | null; + nestBlockScope(node: BlockScope['block']): BlockScope; + nestCatchScope(node: CatchScope['block']): CatchScope; + nestClassFieldInitializerScope(node: ClassFieldInitializerScope['block']): ClassFieldInitializerScope; + nestClassScope(node: ClassScope['block']): ClassScope; + nestClassStaticBlockScope(node: ClassStaticBlockScope['block']): ClassStaticBlockScope; + nestConditionalTypeScope(node: ConditionalTypeScope['block']): ConditionalTypeScope; + nestForScope(node: ForScope['block']): ForScope; + nestFunctionExpressionNameScope(node: FunctionExpressionNameScope['block']): FunctionExpressionNameScope; + nestFunctionScope(node: FunctionScope['block'], isMethodDefinition: boolean): FunctionScope; + nestFunctionTypeScope(node: FunctionTypeScope['block']): FunctionTypeScope; + nestGlobalScope(node: GlobalScope['block']): GlobalScope; + nestMappedTypeScope(node: MappedTypeScope['block']): MappedTypeScope; + nestModuleScope(node: ModuleScope['block']): ModuleScope; + nestSwitchScope(node: SwitchScope['block']): SwitchScope; + nestTSEnumScope(node: TSEnumScope['block']): TSEnumScope; + nestTSModuleScope(node: TSModuleScope['block']): TSModuleScope; + nestTypeScope(node: TypeScope['block']): TypeScope; + nestWithScope(node: WithScope['block']): WithScope; + protected nestScope(scope: T): T; +} +export {}; +//# sourceMappingURL=ScopeManager.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts.map new file mode 100644 index 0000000..1b19e97 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ScopeManager.d.ts","sourceRoot":"","sources":["../src/ScopeManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAA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AAO,CAAC,GAAG,aAAa;IAK9D,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,SAAS;IAKlD,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,SAAS;IAOzD,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC;CASlD"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js new file mode 100644 index 0000000..c2d3707 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js @@ -0,0 +1,181 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ScopeManager = void 0; +const assert_1 = require("./assert"); +const scope_1 = require("./scope"); +const ClassFieldInitializerScope_1 = require("./scope/ClassFieldInitializerScope"); +const ClassStaticBlockScope_1 = require("./scope/ClassStaticBlockScope"); +/** + * @see https://eslint.org/docs/latest/developer-guide/scope-manager-interface#scopemanager-interface + */ +class ScopeManager { + #options; + currentScope; + declaredVariables; + /** + * The root scope + */ + globalScope; + nodeToScope; + /** + * All scopes + * @public + */ + scopes; + constructor(options) { + this.scopes = []; + this.globalScope = null; + this.nodeToScope = new WeakMap(); + this.currentScope = null; + this.#options = options; + this.declaredVariables = new WeakMap(); + } + isES6() { + return true; + } + isGlobalReturn() { + return this.#options.globalReturn === true; + } + isImpliedStrict() { + return this.#options.impliedStrict === true; + } + isModule() { + return this.#options.sourceType === 'module'; + } + isStrictModeSupported() { + return true; + } + get variables() { + const variables = new Set(); + function recurse(scope) { + scope.variables.forEach(v => variables.add(v)); + scope.childScopes.forEach(recurse); + } + this.scopes.forEach(recurse); + return [...variables].sort((a, b) => a.$id - b.$id); + } + /** + * Get the variables that a given AST node defines. The gotten variables' `def[].node`/`def[].parent` property is the node. + * If the node does not define any variable, this returns an empty array. + * @param node An AST node to get their variables. + */ + getDeclaredVariables(node) { + return this.declaredVariables.get(node) ?? []; + } + /** + * Get the scope of a given AST node. The gotten scope's `block` property is the node. + * This method never returns `function-expression-name` scope. If the node does not have their scope, this returns `null`. + * + * @param node An AST node to get their scope. + * @param inner If the node has multiple scopes, this returns the outermost scope normally. + * If `inner` is `true` then this returns the innermost scope. + */ + acquire(node, inner = false) { + function predicate(testScope) { + if (testScope.type === scope_1.ScopeType.function && + testScope.functionExpressionScope) { + return false; + } + return true; + } + const scopes = this.nodeToScope.get(node); + if (!scopes || scopes.length === 0) { + return null; + } + // Heuristic selection from all scopes. + // If you would like to get all scopes, please use ScopeManager#acquireAll. + if (scopes.length === 1) { + return scopes[0]; + } + if (inner) { + for (let i = scopes.length - 1; i >= 0; --i) { + const scope = scopes[i]; + if (predicate(scope)) { + return scope; + } + } + return null; + } + return scopes.find(predicate) ?? null; + } + nestBlockScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.BlockScope(this, this.currentScope, node)); + } + nestCatchScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.CatchScope(this, this.currentScope, node)); + } + nestClassFieldInitializerScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new ClassFieldInitializerScope_1.ClassFieldInitializerScope(this, this.currentScope, node)); + } + nestClassScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.ClassScope(this, this.currentScope, node)); + } + nestClassStaticBlockScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new ClassStaticBlockScope_1.ClassStaticBlockScope(this, this.currentScope, node)); + } + nestConditionalTypeScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.ConditionalTypeScope(this, this.currentScope, node)); + } + nestForScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.ForScope(this, this.currentScope, node)); + } + nestFunctionExpressionNameScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.FunctionExpressionNameScope(this, this.currentScope, node)); + } + nestFunctionScope(node, isMethodDefinition) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.FunctionScope(this, this.currentScope, node, isMethodDefinition)); + } + nestFunctionTypeScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.FunctionTypeScope(this, this.currentScope, node)); + } + nestGlobalScope(node) { + return this.nestScope(new scope_1.GlobalScope(this, node)); + } + nestMappedTypeScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.MappedTypeScope(this, this.currentScope, node)); + } + nestModuleScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.ModuleScope(this, this.currentScope, node)); + } + nestSwitchScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.SwitchScope(this, this.currentScope, node)); + } + nestTSEnumScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.TSEnumScope(this, this.currentScope, node)); + } + nestTSModuleScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.TSModuleScope(this, this.currentScope, node)); + } + nestTypeScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.TypeScope(this, this.currentScope, node)); + } + nestWithScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.WithScope(this, this.currentScope, node)); + } + nestScope(scope) { + if (scope instanceof scope_1.GlobalScope) { + (0, assert_1.assert)(this.currentScope == null); + this.globalScope = scope; + } + this.currentScope = scope; + return scope; + } +} +exports.ScopeManager = ScopeManager; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts new file mode 100644 index 0000000..40b4b70 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts @@ -0,0 +1,54 @@ +import type { Lib, SourceType, TSESTree } from '@typescript-eslint/types'; +import type { ReferencerOptions } from './referencer'; +import { ScopeManager } from './ScopeManager'; +export interface AnalyzeOptions { + /** + * Known visitor keys. + */ + childVisitorKeys?: ReferencerOptions['childVisitorKeys']; + /** + * Whether the whole script is executed under node.js environment. + * When enabled, the scope manager adds a function scope immediately following the global scope. + * Defaults to `false`. + */ + globalReturn?: boolean; + /** + * Implied strict mode. + * Defaults to `false`. + */ + impliedStrict?: boolean; + /** + * The identifier that's used for JSX Element creation (after transpilation). + * This should not be a member expression - just the root identifier (i.e. use "React" instead of "React.createElement"). + * Defaults to `"React"`. + */ + jsxPragma?: string | null; + /** + * The identifier that's used for JSX fragment elements (after transpilation). + * If `null`, assumes transpilation will always use a member on `jsxFactory` (i.e. React.Fragment). + * This should not be a member expression - just the root identifier (i.e. use "h" instead of "h.Fragment"). + * Defaults to `null`. + */ + jsxFragmentName?: string | null; + /** + * The lib used by the project. + * This automatically defines a type variable for any types provided by the configured TS libs. + * Defaults to ['esnext']. + * + * https://www.typescriptlang.org/tsconfig#lib + */ + lib?: Lib[]; + /** + * The source type of the script. + */ + sourceType?: SourceType; + /** + * @deprecated This option never did what it was intended for and will be removed in a future major release. + */ + emitDecoratorMetadata?: boolean; +} +/** + * Takes an AST and returns the analyzed scopes. + */ +export declare function analyze(tree: TSESTree.Node, providedOptions?: AnalyzeOptions): ScopeManager; +//# sourceMappingURL=analyze.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts.map new file mode 100644 index 0000000..80256f3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../src/analyze.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAI1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAM9C,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IAEzD;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;IAEZ;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAGxB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAaD;;GAEG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,eAAe,CAAC,EAAE,cAAc,GAC/B,YAAY,CA4Bd"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/analyze.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/analyze.js new file mode 100644 index 0000000..32c2a35 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/analyze.js @@ -0,0 +1,41 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.analyze = analyze; +const visitor_keys_1 = require("@typescript-eslint/visitor-keys"); +const referencer_1 = require("./referencer"); +const ScopeManager_1 = require("./ScopeManager"); +const DEFAULT_OPTIONS = { + childVisitorKeys: visitor_keys_1.visitorKeys, + emitDecoratorMetadata: false, + globalReturn: false, + impliedStrict: false, + jsxFragmentName: null, + jsxPragma: 'React', + lib: ['es2018'], + sourceType: 'script', +}; +/** + * Takes an AST and returns the analyzed scopes. + */ +function analyze(tree, providedOptions) { + const options = { + childVisitorKeys: providedOptions?.childVisitorKeys ?? DEFAULT_OPTIONS.childVisitorKeys, + emitDecoratorMetadata: false, + globalReturn: providedOptions?.globalReturn ?? DEFAULT_OPTIONS.globalReturn, + impliedStrict: providedOptions?.impliedStrict ?? DEFAULT_OPTIONS.impliedStrict, + jsxFragmentName: providedOptions?.jsxFragmentName ?? DEFAULT_OPTIONS.jsxFragmentName, + jsxPragma: + // eslint-disable-next-line @typescript-eslint/internal/eqeq-nullish + providedOptions?.jsxPragma === undefined + ? DEFAULT_OPTIONS.jsxPragma + : providedOptions.jsxPragma, + lib: providedOptions?.lib ?? ['esnext'], + sourceType: providedOptions?.sourceType ?? DEFAULT_OPTIONS.sourceType, + }; + // ensure the option is lower cased + options.lib = options.lib.map(l => l.toLowerCase()); + const scopeManager = new ScopeManager_1.ScopeManager(options); + const referencer = new referencer_1.Referencer(options, scopeManager); + referencer.visit(tree); + return scopeManager; +} diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts new file mode 100644 index 0000000..5222277 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts @@ -0,0 +1,2 @@ +export declare function assert(value: unknown, message?: string): asserts value; +//# sourceMappingURL=assert.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts.map new file mode 100644 index 0000000..9956b08 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../src/assert.ts"],"names":[],"mappings":"AACA,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAItE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/assert.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/assert.js new file mode 100644 index 0000000..5fe4106 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/assert.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.assert = assert; +// the base assert module doesn't use ts assertion syntax +function assert(value, message) { + if (value == null) { + throw new Error(message); + } +} diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts new file mode 100644 index 0000000..f26f0f8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +export declare class CatchClauseDefinition extends DefinitionBase { + readonly isTypeDefinition = false; + readonly isVariableDefinition = true; + constructor(name: TSESTree.BindingName, node: CatchClauseDefinition['node']); +} +//# sourceMappingURL=CatchClauseDefinition.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts.map new file mode 100644 index 0000000..209bfdc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CatchClauseDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/CatchClauseDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,qBAAsB,SAAQ,cAAc,CACvD,cAAc,CAAC,WAAW,EAC1B,QAAQ,CAAC,WAAW,EACpB,IAAI,EACJ,QAAQ,CAAC,WAAW,CACrB;IACC,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;gBAEhC,IAAI,EAAE,QAAQ,CAAC,WAAW,EAAE,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC;CAG5E"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js new file mode 100644 index 0000000..93d6665 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CatchClauseDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class CatchClauseDefinition extends DefinitionBase_1.DefinitionBase { + isTypeDefinition = false; + isVariableDefinition = true; + constructor(name, node) { + super(DefinitionType_1.DefinitionType.CatchClause, name, node, null); + } +} +exports.CatchClauseDefinition = CatchClauseDefinition; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts new file mode 100644 index 0000000..408fb5c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +export declare class ClassNameDefinition extends DefinitionBase { + readonly isTypeDefinition = true; + readonly isVariableDefinition = true; + constructor(name: TSESTree.Identifier, node: ClassNameDefinition['node']); +} +//# sourceMappingURL=ClassNameDefinition.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts.map new file mode 100644 index 0000000..f44277d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassNameDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/ClassNameDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,mBAAoB,SAAQ,cAAc,CACrD,cAAc,CAAC,SAAS,EACxB,QAAQ,CAAC,gBAAgB,GAAG,QAAQ,CAAC,eAAe,EACpD,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;IACC,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;gBAEhC,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC;CAGzE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js new file mode 100644 index 0000000..b79f0c2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ClassNameDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class ClassNameDefinition extends DefinitionBase_1.DefinitionBase { + isTypeDefinition = true; + isVariableDefinition = true; + constructor(name, node) { + super(DefinitionType_1.DefinitionType.ClassName, name, node, null); + } +} +exports.ClassNameDefinition = ClassNameDefinition; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts new file mode 100644 index 0000000..3ac3ba9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts @@ -0,0 +1,13 @@ +import type { CatchClauseDefinition } from './CatchClauseDefinition'; +import type { ClassNameDefinition } from './ClassNameDefinition'; +import type { FunctionNameDefinition } from './FunctionNameDefinition'; +import type { ImplicitGlobalVariableDefinition } from './ImplicitGlobalVariableDefinition'; +import type { ImportBindingDefinition } from './ImportBindingDefinition'; +import type { ParameterDefinition } from './ParameterDefinition'; +import type { TSEnumMemberDefinition } from './TSEnumMemberDefinition'; +import type { TSEnumNameDefinition } from './TSEnumNameDefinition'; +import type { TSModuleNameDefinition } from './TSModuleNameDefinition'; +import type { TypeDefinition } from './TypeDefinition'; +import type { VariableDefinition } from './VariableDefinition'; +export type Definition = CatchClauseDefinition | ClassNameDefinition | FunctionNameDefinition | ImplicitGlobalVariableDefinition | ImportBindingDefinition | ParameterDefinition | TSEnumMemberDefinition | TSEnumNameDefinition | TSModuleNameDefinition | TypeDefinition | VariableDefinition; +//# sourceMappingURL=Definition.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts.map new file mode 100644 index 0000000..78514e2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Definition.d.ts","sourceRoot":"","sources":["../../src/definition/Definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,UAAU,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,sBAAsB,GACtB,gCAAgC,GAChC,uBAAuB,GACvB,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,sBAAsB,GACtB,cAAc,GACd,kBAAkB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js new file mode 100644 index 0000000..fabb051 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts new file mode 100644 index 0000000..6ca5513 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts @@ -0,0 +1,34 @@ +import type { NodeWithParent, TSESTree } from '@typescript-eslint/types'; +import type { DefinitionType } from './DefinitionType'; +export declare abstract class DefinitionBase { + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + readonly $id: number; + readonly type: Type; + /** + * The `Identifier` node of this definition + * @public + */ + readonly name: Name; + /** + * The enclosing node of the name. + * @public + */ + readonly node: Node; + /** + * the enclosing statement node of the identifier. + * @public + */ + readonly parent: Parent; + constructor(type: Type, name: Name, node: Node, parent: Parent); + /** + * `true` if the variable is valid in a type context, false otherwise + */ + abstract readonly isTypeDefinition: boolean; + /** + * `true` if the variable is valid in a value context, false otherwise + */ + abstract readonly isVariableDefinition: boolean; +} +//# sourceMappingURL=DefinitionBase.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts.map new file mode 100644 index 0000000..3ba6cc9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DefinitionBase.d.ts","sourceRoot":"","sources":["../../src/definition/DefinitionBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMvD,8BAAsB,cAAc,CAClC,IAAI,SAAS,cAAc,EAC3B,IAAI,SAAS,cAAc,EAC3B,MAAM,SAAS,QAAQ,CAAC,IAAI,GAAG,IAAI,EACnC,IAAI,SAAS,QAAQ,CAAC,IAAI;IAE1B;;OAEG;IACH,SAAgB,GAAG,EAAE,MAAM,CAAe;IAE1C,SAAgB,IAAI,EAAE,IAAI,CAAC;IAE3B;;;OAGG;IACH,SAAgB,IAAI,EAAE,IAAI,CAAC;IAE3B;;;OAGG;IACH,SAAgB,IAAI,EAAE,IAAI,CAAC;IAE3B;;;OAGG;IACH,SAAgB,MAAM,EAAE,MAAM,CAAC;gBAEnB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM;IAO9D;;OAEG;IACH,kBAAyB,gBAAgB,EAAE,OAAO,CAAC;IAEnD;;OAEG;IACH,kBAAyB,oBAAoB,EAAE,OAAO,CAAC;CACxD"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js new file mode 100644 index 0000000..7613561 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DefinitionBase = void 0; +const ID_1 = require("../ID"); +const generator = (0, ID_1.createIdGenerator)(); +class DefinitionBase { + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + $id = generator(); + type; + /** + * The `Identifier` node of this definition + * @public + */ + name; + /** + * The enclosing node of the name. + * @public + */ + node; + /** + * the enclosing statement node of the identifier. + * @public + */ + parent; + constructor(type, name, node, parent) { + this.type = type; + this.name = name; + this.node = node; + this.parent = parent; + } +} +exports.DefinitionBase = DefinitionBase; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts new file mode 100644 index 0000000..b12c502 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts @@ -0,0 +1,14 @@ +export declare enum DefinitionType { + CatchClause = "CatchClause", + ClassName = "ClassName", + FunctionName = "FunctionName", + ImplicitGlobalVariable = "ImplicitGlobalVariable", + ImportBinding = "ImportBinding", + Parameter = "Parameter", + TSEnumName = "TSEnumName", + TSEnumMember = "TSEnumMemberName", + TSModuleName = "TSModuleName", + Type = "Type", + Variable = "Variable" +} +//# sourceMappingURL=DefinitionType.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts.map new file mode 100644 index 0000000..79dcd17 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DefinitionType.d.ts","sourceRoot":"","sources":["../../src/definition/DefinitionType.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,sBAAsB,2BAA2B;IACjD,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,YAAY,qBAAqB;IACjC,YAAY,iBAAiB;IAC7B,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js new file mode 100644 index 0000000..418aa0b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DefinitionType = void 0; +var DefinitionType; +(function (DefinitionType) { + DefinitionType["CatchClause"] = "CatchClause"; + DefinitionType["ClassName"] = "ClassName"; + DefinitionType["FunctionName"] = "FunctionName"; + DefinitionType["ImplicitGlobalVariable"] = "ImplicitGlobalVariable"; + DefinitionType["ImportBinding"] = "ImportBinding"; + DefinitionType["Parameter"] = "Parameter"; + DefinitionType["TSEnumName"] = "TSEnumName"; + DefinitionType["TSEnumMember"] = "TSEnumMemberName"; + DefinitionType["TSModuleName"] = "TSModuleName"; + DefinitionType["Type"] = "Type"; + DefinitionType["Variable"] = "Variable"; +})(DefinitionType || (exports.DefinitionType = DefinitionType = {})); diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts new file mode 100644 index 0000000..531d75f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +export declare class FunctionNameDefinition extends DefinitionBase { + readonly isTypeDefinition = false; + readonly isVariableDefinition = true; + constructor(name: TSESTree.Identifier, node: FunctionNameDefinition['node']); +} +//# sourceMappingURL=FunctionNameDefinition.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts.map new file mode 100644 index 0000000..6e2b4ad --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"FunctionNameDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/FunctionNameDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,sBAAuB,SAAQ,cAAc,CACxD,cAAc,CAAC,YAAY,EACzB,QAAQ,CAAC,mBAAmB,GAC5B,QAAQ,CAAC,kBAAkB,GAC3B,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,6BAA6B,EACxC,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;IACC,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;gBAEhC,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;CAG5E"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js new file mode 100644 index 0000000..6f672ce --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FunctionNameDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class FunctionNameDefinition extends DefinitionBase_1.DefinitionBase { + isTypeDefinition = false; + isVariableDefinition = true; + constructor(name, node) { + super(DefinitionType_1.DefinitionType.FunctionName, name, node, null); + } +} +exports.FunctionNameDefinition = FunctionNameDefinition; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts new file mode 100644 index 0000000..984d597 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts @@ -0,0 +1,9 @@ +import type { NodeWithParent, TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +export declare class ImplicitGlobalVariableDefinition extends DefinitionBase { + readonly isTypeDefinition = false; + readonly isVariableDefinition = true; + constructor(name: TSESTree.BindingName, node: ImplicitGlobalVariableDefinition['node']); +} +//# sourceMappingURL=ImplicitGlobalVariableDefinition.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts.map new file mode 100644 index 0000000..cd8f88f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ImplicitGlobalVariableDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/ImplicitGlobalVariableDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,gCAAiC,SAAQ,cAAc,CAClE,cAAc,CAAC,sBAAsB,EACrC,cAAc,EACd,IAAI,EACJ,QAAQ,CAAC,WAAW,CACrB;IACC,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;gBAG1C,IAAI,EAAE,QAAQ,CAAC,WAAW,EAC1B,IAAI,EAAE,gCAAgC,CAAC,MAAM,CAAC;CAIjD"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js new file mode 100644 index 0000000..516a973 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ImplicitGlobalVariableDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class ImplicitGlobalVariableDefinition extends DefinitionBase_1.DefinitionBase { + isTypeDefinition = false; + isVariableDefinition = true; + constructor(name, node) { + super(DefinitionType_1.DefinitionType.ImplicitGlobalVariable, name, node, null); + } +} +exports.ImplicitGlobalVariableDefinition = ImplicitGlobalVariableDefinition; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts new file mode 100644 index 0000000..6427fc2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +export declare class ImportBindingDefinition extends DefinitionBase { + readonly isTypeDefinition = true; + readonly isVariableDefinition = true; + constructor(name: TSESTree.Identifier, node: TSESTree.TSImportEqualsDeclaration, decl: TSESTree.TSImportEqualsDeclaration); + constructor(name: TSESTree.Identifier, node: Exclude, decl: TSESTree.ImportDeclaration); +} +//# sourceMappingURL=ImportBindingDefinition.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts.map new file mode 100644 index 0000000..f197147 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ImportBindingDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/ImportBindingDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,uBAAwB,SAAQ,cAAc,CACzD,cAAc,CAAC,aAAa,EAC1B,QAAQ,CAAC,sBAAsB,GAC/B,QAAQ,CAAC,wBAAwB,GACjC,QAAQ,CAAC,eAAe,GACxB,QAAQ,CAAC,yBAAyB,EACpC,QAAQ,CAAC,iBAAiB,GAAG,QAAQ,CAAC,yBAAyB,EAC/D,QAAQ,CAAC,UAAU,CACpB;IACC,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;gBAG1C,IAAI,EAAE,QAAQ,CAAC,UAAU,EACzB,IAAI,EAAE,QAAQ,CAAC,yBAAyB,EACxC,IAAI,EAAE,QAAQ,CAAC,yBAAyB;gBAGxC,IAAI,EAAE,QAAQ,CAAC,UAAU,EACzB,IAAI,EAAE,OAAO,CACX,uBAAuB,CAAC,MAAM,CAAC,EAC/B,QAAQ,CAAC,yBAAyB,CACnC,EACD,IAAI,EAAE,QAAQ,CAAC,iBAAiB;CASnC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js new file mode 100644 index 0000000..5f7abb3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ImportBindingDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class ImportBindingDefinition extends DefinitionBase_1.DefinitionBase { + isTypeDefinition = true; + isVariableDefinition = true; + constructor(name, node, decl) { + super(DefinitionType_1.DefinitionType.ImportBinding, name, node, decl); + } +} +exports.ImportBindingDefinition = ImportBindingDefinition; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts new file mode 100644 index 0000000..a9d3001 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts @@ -0,0 +1,13 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +export declare class ParameterDefinition extends DefinitionBase { + /** + * Whether the parameter definition is a part of a rest parameter. + */ + readonly isTypeDefinition = false; + readonly isVariableDefinition = true; + readonly rest: boolean; + constructor(name: TSESTree.BindingName, node: ParameterDefinition['node'], rest: boolean); +} +//# sourceMappingURL=ParameterDefinition.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts.map new file mode 100644 index 0000000..9c4188a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ParameterDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/ParameterDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,mBAAoB,SAAQ,cAAc,CACrD,cAAc,CAAC,SAAS,EACtB,QAAQ,CAAC,uBAAuB,GAChC,QAAQ,CAAC,mBAAmB,GAC5B,QAAQ,CAAC,kBAAkB,GAC3B,QAAQ,CAAC,0BAA0B,GACnC,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,+BAA+B,GACxC,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,6BAA6B,GACtC,QAAQ,CAAC,cAAc,GACvB,QAAQ,CAAC,iBAAiB,EAC5B,IAAI,EACJ,QAAQ,CAAC,WAAW,CACrB;IACC;;OAEG;IACH,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;IAC5C,SAAgB,IAAI,EAAE,OAAO,CAAC;gBAG5B,IAAI,EAAE,QAAQ,CAAC,WAAW,EAC1B,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,EACjC,IAAI,EAAE,OAAO;CAKhB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js new file mode 100644 index 0000000..e07c63b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ParameterDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class ParameterDefinition extends DefinitionBase_1.DefinitionBase { + /** + * Whether the parameter definition is a part of a rest parameter. + */ + isTypeDefinition = false; + isVariableDefinition = true; + rest; + constructor(name, node, rest) { + super(DefinitionType_1.DefinitionType.Parameter, name, node, null); + this.rest = rest; + } +} +exports.ParameterDefinition = ParameterDefinition; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts new file mode 100644 index 0000000..357c53a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +export declare class TSEnumMemberDefinition extends DefinitionBase { + readonly isTypeDefinition = true; + readonly isVariableDefinition = true; + constructor(name: TSESTree.Identifier | TSESTree.StringLiteral, node: TSEnumMemberDefinition['node']); +} +//# sourceMappingURL=TSEnumMemberDefinition.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts.map new file mode 100644 index 0000000..f9b3a9a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSEnumMemberDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/TSEnumMemberDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,sBAAuB,SAAQ,cAAc,CACxD,cAAc,CAAC,YAAY,EAC3B,QAAQ,CAAC,YAAY,EACrB,IAAI,EACJ,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,CAC7C;IACC,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;gBAG1C,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,EAClD,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;CAIvC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js new file mode 100644 index 0000000..bc16bc9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSEnumMemberDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class TSEnumMemberDefinition extends DefinitionBase_1.DefinitionBase { + isTypeDefinition = true; + isVariableDefinition = true; + constructor(name, node) { + super(DefinitionType_1.DefinitionType.TSEnumMember, name, node, null); + } +} +exports.TSEnumMemberDefinition = TSEnumMemberDefinition; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts new file mode 100644 index 0000000..dc08ce9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +export declare class TSEnumNameDefinition extends DefinitionBase { + readonly isTypeDefinition = true; + readonly isVariableDefinition = true; + constructor(name: TSESTree.Identifier, node: TSEnumNameDefinition['node']); +} +//# sourceMappingURL=TSEnumNameDefinition.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts.map new file mode 100644 index 0000000..66c0b84 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSEnumNameDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/TSEnumNameDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,oBAAqB,SAAQ,cAAc,CACtD,cAAc,CAAC,UAAU,EACzB,QAAQ,CAAC,iBAAiB,EAC1B,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;IACC,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;gBAEhC,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC;CAG1E"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js new file mode 100644 index 0000000..52036df --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSEnumNameDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class TSEnumNameDefinition extends DefinitionBase_1.DefinitionBase { + isTypeDefinition = true; + isVariableDefinition = true; + constructor(name, node) { + super(DefinitionType_1.DefinitionType.TSEnumName, name, node, null); + } +} +exports.TSEnumNameDefinition = TSEnumNameDefinition; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts new file mode 100644 index 0000000..d0ca9bc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +export declare class TSModuleNameDefinition extends DefinitionBase { + readonly isTypeDefinition = true; + readonly isVariableDefinition = true; + constructor(name: TSESTree.Identifier, node: TSModuleNameDefinition['node']); +} +//# sourceMappingURL=TSModuleNameDefinition.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts.map new file mode 100644 index 0000000..cb41b08 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSModuleNameDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/TSModuleNameDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,sBAAuB,SAAQ,cAAc,CACxD,cAAc,CAAC,YAAY,EAC3B,QAAQ,CAAC,mBAAmB,EAC5B,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;IACC,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;gBAEhC,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;CAG5E"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js new file mode 100644 index 0000000..4658a31 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSModuleNameDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class TSModuleNameDefinition extends DefinitionBase_1.DefinitionBase { + isTypeDefinition = true; + isVariableDefinition = true; + constructor(name, node) { + super(DefinitionType_1.DefinitionType.TSModuleName, name, node, null); + } +} +exports.TSModuleNameDefinition = TSModuleNameDefinition; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts new file mode 100644 index 0000000..b3b0335 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +export declare class TypeDefinition extends DefinitionBase { + readonly isTypeDefinition = true; + readonly isVariableDefinition = false; + constructor(name: TSESTree.Identifier, node: TypeDefinition['node']); +} +//# sourceMappingURL=TypeDefinition.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts.map new file mode 100644 index 0000000..17937c5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TypeDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/TypeDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,cAAe,SAAQ,cAAc,CAChD,cAAc,CAAC,IAAI,EACjB,QAAQ,CAAC,sBAAsB,GAC/B,QAAQ,CAAC,YAAY,GACrB,QAAQ,CAAC,sBAAsB,GAC/B,QAAQ,CAAC,eAAe,EAC1B,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;IACC,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,SAAS;gBAEjC,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;CAGpE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js new file mode 100644 index 0000000..6112ad5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class TypeDefinition extends DefinitionBase_1.DefinitionBase { + isTypeDefinition = true; + isVariableDefinition = false; + constructor(name, node) { + super(DefinitionType_1.DefinitionType.Type, name, node, null); + } +} +exports.TypeDefinition = TypeDefinition; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts new file mode 100644 index 0000000..d4ea59a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +export declare class VariableDefinition extends DefinitionBase { + readonly isTypeDefinition = false; + readonly isVariableDefinition = true; + constructor(name: TSESTree.Identifier, node: VariableDefinition['node'], decl: TSESTree.VariableDeclaration); +} +//# sourceMappingURL=VariableDefinition.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts.map new file mode 100644 index 0000000..cf8cc7a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"VariableDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/VariableDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,kBAAmB,SAAQ,cAAc,CACpD,cAAc,CAAC,QAAQ,EACvB,QAAQ,CAAC,kBAAkB,EAC3B,QAAQ,CAAC,mBAAmB,EAC5B,QAAQ,CAAC,UAAU,CACpB;IACC,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;gBAG1C,IAAI,EAAE,QAAQ,CAAC,UAAU,EACzB,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAC,EAChC,IAAI,EAAE,QAAQ,CAAC,mBAAmB;CAIrC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js new file mode 100644 index 0000000..3bcfd2f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VariableDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class VariableDefinition extends DefinitionBase_1.DefinitionBase { + isTypeDefinition = false; + isVariableDefinition = true; + constructor(name, node, decl) { + super(DefinitionType_1.DefinitionType.Variable, name, node, decl); + } +} +exports.VariableDefinition = VariableDefinition; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts new file mode 100644 index 0000000..f580bce --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts @@ -0,0 +1,14 @@ +export * from './CatchClauseDefinition'; +export * from './ClassNameDefinition'; +export * from './Definition'; +export * from './DefinitionType'; +export * from './FunctionNameDefinition'; +export * from './ImplicitGlobalVariableDefinition'; +export * from './ImportBindingDefinition'; +export * from './ParameterDefinition'; +export * from './TSEnumMemberDefinition'; +export * from './TSEnumNameDefinition'; +export * from './TSModuleNameDefinition'; +export * from './TypeDefinition'; +export * from './VariableDefinition'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts.map new file mode 100644 index 0000000..8dc3b18 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js new file mode 100644 index 0000000..76ff6b5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js @@ -0,0 +1,29 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./CatchClauseDefinition"), exports); +__exportStar(require("./ClassNameDefinition"), exports); +__exportStar(require("./Definition"), exports); +__exportStar(require("./DefinitionType"), exports); +__exportStar(require("./FunctionNameDefinition"), exports); +__exportStar(require("./ImplicitGlobalVariableDefinition"), exports); +__exportStar(require("./ImportBindingDefinition"), exports); +__exportStar(require("./ParameterDefinition"), exports); +__exportStar(require("./TSEnumMemberDefinition"), exports); +__exportStar(require("./TSEnumNameDefinition"), exports); +__exportStar(require("./TSModuleNameDefinition"), exports); +__exportStar(require("./TypeDefinition"), exports); +__exportStar(require("./VariableDefinition"), exports); diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts new file mode 100644 index 0000000..c872b13 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts @@ -0,0 +1,9 @@ +export { analyze, type AnalyzeOptions } from './analyze'; +export * from './definition'; +export { PatternVisitor, type PatternVisitorCallback, type PatternVisitorOptions, } from './referencer/PatternVisitor'; +export { Reference } from './referencer/Reference'; +export { Visitor } from './referencer/Visitor'; +export * from './scope'; +export { ScopeManager } from './ScopeManager'; +export * from './variable'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts.map new file mode 100644 index 0000000..3d35e0e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AACzD,cAAc,cAAc,CAAC;AAC7B,OAAO,EACL,cAAc,EACd,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,GAC3B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,cAAc,YAAY,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/index.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/index.js new file mode 100644 index 0000000..2855aaf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/index.js @@ -0,0 +1,30 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ScopeManager = exports.Visitor = exports.Reference = exports.PatternVisitor = exports.analyze = void 0; +var analyze_1 = require("./analyze"); +Object.defineProperty(exports, "analyze", { enumerable: true, get: function () { return analyze_1.analyze; } }); +__exportStar(require("./definition"), exports); +var PatternVisitor_1 = require("./referencer/PatternVisitor"); +Object.defineProperty(exports, "PatternVisitor", { enumerable: true, get: function () { return PatternVisitor_1.PatternVisitor; } }); +var Reference_1 = require("./referencer/Reference"); +Object.defineProperty(exports, "Reference", { enumerable: true, get: function () { return Reference_1.Reference; } }); +var Visitor_1 = require("./referencer/Visitor"); +Object.defineProperty(exports, "Visitor", { enumerable: true, get: function () { return Visitor_1.Visitor; } }); +__exportStar(require("./scope"), exports); +var ScopeManager_1 = require("./ScopeManager"); +Object.defineProperty(exports, "ScopeManager", { enumerable: true, get: function () { return ScopeManager_1.ScopeManager; } }); +__exportStar(require("./variable"), exports); diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts new file mode 100644 index 0000000..7cb0419 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts @@ -0,0 +1,16 @@ +export declare const TYPE: Readonly<{ + eslintImplicitGlobalSetting: "readonly"; + isTypeVariable: true; + isValueVariable: false; +}>; +export declare const VALUE: Readonly<{ + eslintImplicitGlobalSetting: "readonly"; + isTypeVariable: false; + isValueVariable: true; +}>; +export declare const TYPE_VALUE: Readonly<{ + eslintImplicitGlobalSetting: "readonly"; + isTypeVariable: true; + isValueVariable: true; +}>; +//# sourceMappingURL=base-config.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts.map new file mode 100644 index 0000000..324dd7f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base-config.d.ts","sourceRoot":"","sources":["../../src/lib/base-config.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;;;EAIf,CAAC;AACH,eAAO,MAAM,KAAK;;;;EAIhB,CAAC;AACH,eAAO,MAAM,UAAU;;;;EAIrB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js new file mode 100644 index 0000000..5e4bf67 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js @@ -0,0 +1,22 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TYPE_VALUE = exports.VALUE = exports.TYPE = void 0; +exports.TYPE = Object.freeze({ + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, +}); +exports.VALUE = Object.freeze({ + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: false, + isValueVariable: true, +}); +exports.TYPE_VALUE = Object.freeze({ + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: true, +}); diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts new file mode 100644 index 0000000..bd71a63 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const decorators: LibDefinition; +//# sourceMappingURL=decorators.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts.map new file mode 100644 index 0000000..4770152 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/lib/decorators.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,UAAU,EAAE,aAgBxB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js new file mode 100644 index 0000000..448d714 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js @@ -0,0 +1,25 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decorators = void 0; +const base_config_1 = require("./base-config"); +exports.decorators = { + libs: [], + variables: [ + ['ClassMemberDecoratorContext', base_config_1.TYPE], + ['DecoratorContext', base_config_1.TYPE], + ['DecoratorMetadataObject', base_config_1.TYPE], + ['DecoratorMetadata', base_config_1.TYPE], + ['ClassDecoratorContext', base_config_1.TYPE], + ['ClassMethodDecoratorContext', base_config_1.TYPE], + ['ClassGetterDecoratorContext', base_config_1.TYPE], + ['ClassSetterDecoratorContext', base_config_1.TYPE], + ['ClassAccessorDecoratorContext', base_config_1.TYPE], + ['ClassAccessorDecoratorTarget', base_config_1.TYPE], + ['ClassAccessorDecoratorResult', base_config_1.TYPE], + ['ClassFieldDecoratorContext', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts new file mode 100644 index 0000000..11d962f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const decorators_legacy: LibDefinition; +//# sourceMappingURL=decorators.legacy.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts.map new file mode 100644 index 0000000..13dec35 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decorators.legacy.d.ts","sourceRoot":"","sources":["../../src/lib/decorators.legacy.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,iBAAiB,EAAE,aAQ/B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js new file mode 100644 index 0000000..6b3d185 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js @@ -0,0 +1,17 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decorators_legacy = void 0; +const base_config_1 = require("./base-config"); +exports.decorators_legacy = { + libs: [], + variables: [ + ['ClassDecorator', base_config_1.TYPE], + ['PropertyDecorator', base_config_1.TYPE], + ['MethodDecorator', base_config_1.TYPE], + ['ParameterDecorator', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.asynciterable.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.asynciterable.d.ts new file mode 100644 index 0000000..64cea57 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.asynciterable.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const dom_asynciterable: LibDefinition; +//# sourceMappingURL=dom.asynciterable.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.asynciterable.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.asynciterable.d.ts.map new file mode 100644 index 0000000..6046148 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.asynciterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dom.asynciterable.d.ts","sourceRoot":"","sources":["../../src/lib/dom.asynciterable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,iBAAiB,EAAE,aAQ/B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.asynciterable.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.asynciterable.js new file mode 100644 index 0000000..e5c496b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.asynciterable.js @@ -0,0 +1,17 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.dom_asynciterable = void 0; +const base_config_1 = require("./base-config"); +exports.dom_asynciterable = { + libs: [], + variables: [ + ['FileSystemDirectoryHandleAsyncIterator', base_config_1.TYPE], + ['FileSystemDirectoryHandle', base_config_1.TYPE], + ['ReadableStreamAsyncIterator', base_config_1.TYPE], + ['ReadableStream', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts new file mode 100644 index 0000000..e0b9a02 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const dom: LibDefinition; +//# sourceMappingURL=dom.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts.map new file mode 100644 index 0000000..0d1ba7d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/lib/dom.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,GAAG,EAAE,aA2gDjB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts new file mode 100644 index 0000000..84757de --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const dom_iterable: LibDefinition; +//# sourceMappingURL=dom.iterable.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts.map new file mode 100644 index 0000000..da515d4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dom.iterable.d.ts","sourceRoot":"","sources":["../../src/lib/dom.iterable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,YAAY,EAAE,aA+E1B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js new file mode 100644 index 0000000..487fd1a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js @@ -0,0 +1,88 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.dom_iterable = void 0; +const base_config_1 = require("./base-config"); +exports.dom_iterable = { + libs: [], + variables: [ + ['AudioParam', base_config_1.TYPE], + ['AudioParamMap', base_config_1.TYPE], + ['BaseAudioContext', base_config_1.TYPE], + ['CSSKeyframesRule', base_config_1.TYPE], + ['CSSNumericArray', base_config_1.TYPE], + ['CSSRuleList', base_config_1.TYPE], + ['CSSStyleDeclaration', base_config_1.TYPE], + ['CSSTransformValue', base_config_1.TYPE], + ['CSSUnparsedValue', base_config_1.TYPE], + ['Cache', base_config_1.TYPE], + ['CanvasPath', base_config_1.TYPE], + ['CanvasPathDrawingStyles', base_config_1.TYPE], + ['CookieStoreManager', base_config_1.TYPE], + ['CustomStateSet', base_config_1.TYPE], + ['DOMRectList', base_config_1.TYPE], + ['DOMStringList', base_config_1.TYPE], + ['DOMTokenList', base_config_1.TYPE], + ['DataTransferItemList', base_config_1.TYPE], + ['EventCounts', base_config_1.TYPE], + ['FileList', base_config_1.TYPE], + ['FontFaceSet', base_config_1.TYPE], + ['FormDataIterator', base_config_1.TYPE], + ['FormData', base_config_1.TYPE], + ['HTMLAllCollection', base_config_1.TYPE], + ['HTMLCollectionBase', base_config_1.TYPE], + ['HTMLCollectionOf', base_config_1.TYPE], + ['HTMLFormElement', base_config_1.TYPE], + ['HTMLSelectElement', base_config_1.TYPE], + ['HeadersIterator', base_config_1.TYPE], + ['Headers', base_config_1.TYPE], + ['Highlight', base_config_1.TYPE], + ['HighlightRegistry', base_config_1.TYPE], + ['IDBDatabase', base_config_1.TYPE], + ['IDBObjectStore', base_config_1.TYPE], + ['ImageTrackList', base_config_1.TYPE], + ['MIDIInputMap', base_config_1.TYPE], + ['MIDIOutput', base_config_1.TYPE], + ['MIDIOutputMap', base_config_1.TYPE], + ['MediaKeyStatusMapIterator', base_config_1.TYPE], + ['MediaKeyStatusMap', base_config_1.TYPE], + ['MediaList', base_config_1.TYPE], + ['MessageEvent', base_config_1.TYPE], + ['MimeTypeArray', base_config_1.TYPE], + ['NamedNodeMap', base_config_1.TYPE], + ['Navigator', base_config_1.TYPE], + ['NodeList', base_config_1.TYPE], + ['NodeListOf', base_config_1.TYPE], + ['Plugin', base_config_1.TYPE], + ['PluginArray', base_config_1.TYPE], + ['RTCRtpTransceiver', base_config_1.TYPE], + ['RTCStatsReport', base_config_1.TYPE], + ['SVGLengthList', base_config_1.TYPE], + ['SVGNumberList', base_config_1.TYPE], + ['SVGPointList', base_config_1.TYPE], + ['SVGStringList', base_config_1.TYPE], + ['SVGTransformList', base_config_1.TYPE], + ['SourceBufferList', base_config_1.TYPE], + ['SpeechRecognitionResult', base_config_1.TYPE], + ['SpeechRecognitionResultList', base_config_1.TYPE], + ['StylePropertyMapReadOnlyIterator', base_config_1.TYPE], + ['StylePropertyMapReadOnly', base_config_1.TYPE], + ['StyleSheetList', base_config_1.TYPE], + ['SubtleCrypto', base_config_1.TYPE], + ['TextTrackCueList', base_config_1.TYPE], + ['TextTrackList', base_config_1.TYPE], + ['TouchList', base_config_1.TYPE], + ['URLSearchParamsIterator', base_config_1.TYPE], + ['URLSearchParams', base_config_1.TYPE], + ['ViewTransitionTypeSet', base_config_1.TYPE], + ['WEBGL_draw_buffers', base_config_1.TYPE], + ['WEBGL_multi_draw', base_config_1.TYPE], + ['WebGL2RenderingContextBase', base_config_1.TYPE], + ['WebGL2RenderingContextOverloads', base_config_1.TYPE], + ['WebGLRenderingContextBase', base_config_1.TYPE], + ['WebGLRenderingContextOverloads', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js new file mode 100644 index 0000000..266b028 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js @@ -0,0 +1,1556 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.dom = void 0; +const base_config_1 = require("./base-config"); +exports.dom = { + libs: [], + variables: [ + ['AddEventListenerOptions', base_config_1.TYPE], + ['AddressErrors', base_config_1.TYPE], + ['AesCbcParams', base_config_1.TYPE], + ['AesCtrParams', base_config_1.TYPE], + ['AesDerivedKeyParams', base_config_1.TYPE], + ['AesGcmParams', base_config_1.TYPE], + ['AesKeyAlgorithm', base_config_1.TYPE], + ['AesKeyGenParams', base_config_1.TYPE], + ['Algorithm', base_config_1.TYPE], + ['AnalyserOptions', base_config_1.TYPE], + ['AnimationEventInit', base_config_1.TYPE], + ['AnimationPlaybackEventInit', base_config_1.TYPE], + ['AssignedNodesOptions', base_config_1.TYPE], + ['AudioBufferOptions', base_config_1.TYPE], + ['AudioBufferSourceOptions', base_config_1.TYPE], + ['AudioConfiguration', base_config_1.TYPE], + ['AudioContextOptions', base_config_1.TYPE], + ['AudioDataCopyToOptions', base_config_1.TYPE], + ['AudioDataInit', base_config_1.TYPE], + ['AudioDecoderConfig', base_config_1.TYPE], + ['AudioDecoderInit', base_config_1.TYPE], + ['AudioDecoderSupport', base_config_1.TYPE], + ['AudioEncoderConfig', base_config_1.TYPE], + ['AudioEncoderInit', base_config_1.TYPE], + ['AudioEncoderSupport', base_config_1.TYPE], + ['AudioNodeOptions', base_config_1.TYPE], + ['AudioProcessingEventInit', base_config_1.TYPE], + ['AudioTimestamp', base_config_1.TYPE], + ['AudioWorkletNodeOptions', base_config_1.TYPE], + ['AuthenticationExtensionsClientInputs', base_config_1.TYPE], + ['AuthenticationExtensionsClientInputsJSON', base_config_1.TYPE], + ['AuthenticationExtensionsClientOutputs', base_config_1.TYPE], + ['AuthenticationExtensionsLargeBlobInputs', base_config_1.TYPE], + ['AuthenticationExtensionsLargeBlobInputsJSON', base_config_1.TYPE], + ['AuthenticationExtensionsLargeBlobOutputs', base_config_1.TYPE], + ['AuthenticationExtensionsPRFInputs', base_config_1.TYPE], + ['AuthenticationExtensionsPRFInputsJSON', base_config_1.TYPE], + ['AuthenticationExtensionsPRFOutputs', base_config_1.TYPE], + ['AuthenticationExtensionsPRFValues', base_config_1.TYPE], + ['AuthenticationExtensionsPRFValuesJSON', base_config_1.TYPE], + ['AuthenticatorSelectionCriteria', base_config_1.TYPE], + ['AvcEncoderConfig', base_config_1.TYPE], + ['BiquadFilterOptions', base_config_1.TYPE], + ['BlobEventInit', base_config_1.TYPE], + ['BlobPropertyBag', base_config_1.TYPE], + ['CSSMatrixComponentOptions', base_config_1.TYPE], + ['CSSNumericType', base_config_1.TYPE], + ['CSSStyleSheetInit', base_config_1.TYPE], + ['CacheQueryOptions', base_config_1.TYPE], + ['CanvasRenderingContext2DSettings', base_config_1.TYPE], + ['CaretPositionFromPointOptions', base_config_1.TYPE], + ['ChannelMergerOptions', base_config_1.TYPE], + ['ChannelSplitterOptions', base_config_1.TYPE], + ['CheckVisibilityOptions', base_config_1.TYPE], + ['ClientQueryOptions', base_config_1.TYPE], + ['ClipboardEventInit', base_config_1.TYPE], + ['ClipboardItemOptions', base_config_1.TYPE], + ['CloseEventInit', base_config_1.TYPE], + ['CompositionEventInit', base_config_1.TYPE], + ['ComputedEffectTiming', base_config_1.TYPE], + ['ComputedKeyframe', base_config_1.TYPE], + ['ConstantSourceOptions', base_config_1.TYPE], + ['ConstrainBooleanParameters', base_config_1.TYPE], + ['ConstrainDOMStringParameters', base_config_1.TYPE], + ['ConstrainDoubleRange', base_config_1.TYPE], + ['ConstrainULongRange', base_config_1.TYPE], + ['ContentVisibilityAutoStateChangeEventInit', base_config_1.TYPE], + ['ConvolverOptions', base_config_1.TYPE], + ['CookieChangeEventInit', base_config_1.TYPE], + ['CookieInit', base_config_1.TYPE], + ['CookieListItem', base_config_1.TYPE], + ['CookieStoreDeleteOptions', base_config_1.TYPE], + ['CookieStoreGetOptions', base_config_1.TYPE], + ['CredentialCreationOptions', base_config_1.TYPE], + ['CredentialPropertiesOutput', base_config_1.TYPE], + ['CredentialRequestOptions', base_config_1.TYPE], + ['CryptoKeyPair', base_config_1.TYPE], + ['CustomEventInit', base_config_1.TYPE], + ['DOMMatrix2DInit', base_config_1.TYPE], + ['DOMMatrixInit', base_config_1.TYPE], + ['DOMPointInit', base_config_1.TYPE], + ['DOMQuadInit', base_config_1.TYPE], + ['DOMRectInit', base_config_1.TYPE], + ['DelayOptions', base_config_1.TYPE], + ['DeviceMotionEventAccelerationInit', base_config_1.TYPE], + ['DeviceMotionEventInit', base_config_1.TYPE], + ['DeviceMotionEventRotationRateInit', base_config_1.TYPE], + ['DeviceOrientationEventInit', base_config_1.TYPE], + ['DisplayMediaStreamOptions', base_config_1.TYPE], + ['DocumentTimelineOptions', base_config_1.TYPE], + ['DoubleRange', base_config_1.TYPE], + ['DragEventInit', base_config_1.TYPE], + ['DynamicsCompressorOptions', base_config_1.TYPE], + ['EcKeyAlgorithm', base_config_1.TYPE], + ['EcKeyGenParams', base_config_1.TYPE], + ['EcKeyImportParams', base_config_1.TYPE], + ['EcdhKeyDeriveParams', base_config_1.TYPE], + ['EcdsaParams', base_config_1.TYPE], + ['EffectTiming', base_config_1.TYPE], + ['ElementCreationOptions', base_config_1.TYPE], + ['ElementDefinitionOptions', base_config_1.TYPE], + ['EncodedAudioChunkInit', base_config_1.TYPE], + ['EncodedAudioChunkMetadata', base_config_1.TYPE], + ['EncodedVideoChunkInit', base_config_1.TYPE], + ['EncodedVideoChunkMetadata', base_config_1.TYPE], + ['ErrorEventInit', base_config_1.TYPE], + ['EventInit', base_config_1.TYPE], + ['EventListenerOptions', base_config_1.TYPE], + ['EventModifierInit', base_config_1.TYPE], + ['EventSourceInit', base_config_1.TYPE], + ['FilePropertyBag', base_config_1.TYPE], + ['FileSystemCreateWritableOptions', base_config_1.TYPE], + ['FileSystemFlags', base_config_1.TYPE], + ['FileSystemGetDirectoryOptions', base_config_1.TYPE], + ['FileSystemGetFileOptions', base_config_1.TYPE], + ['FileSystemRemoveOptions', base_config_1.TYPE], + ['FocusEventInit', base_config_1.TYPE], + ['FocusOptions', base_config_1.TYPE], + ['FontFaceDescriptors', base_config_1.TYPE], + ['FontFaceSetLoadEventInit', base_config_1.TYPE], + ['FormDataEventInit', base_config_1.TYPE], + ['FullscreenOptions', base_config_1.TYPE], + ['GainOptions', base_config_1.TYPE], + ['GamepadEffectParameters', base_config_1.TYPE], + ['GamepadEventInit', base_config_1.TYPE], + ['GetAnimationsOptions', base_config_1.TYPE], + ['GetComposedRangesOptions', base_config_1.TYPE], + ['GetHTMLOptions', base_config_1.TYPE], + ['GetNotificationOptions', base_config_1.TYPE], + ['GetRootNodeOptions', base_config_1.TYPE], + ['HashChangeEventInit', base_config_1.TYPE], + ['HkdfParams', base_config_1.TYPE], + ['HmacImportParams', base_config_1.TYPE], + ['HmacKeyAlgorithm', base_config_1.TYPE], + ['HmacKeyGenParams', base_config_1.TYPE], + ['IDBDatabaseInfo', base_config_1.TYPE], + ['IDBIndexParameters', base_config_1.TYPE], + ['IDBObjectStoreParameters', base_config_1.TYPE], + ['IDBTransactionOptions', base_config_1.TYPE], + ['IDBVersionChangeEventInit', base_config_1.TYPE], + ['IIRFilterOptions', base_config_1.TYPE], + ['IdleRequestOptions', base_config_1.TYPE], + ['ImageBitmapOptions', base_config_1.TYPE], + ['ImageBitmapRenderingContextSettings', base_config_1.TYPE], + ['ImageDataSettings', base_config_1.TYPE], + ['ImageDecodeOptions', base_config_1.TYPE], + ['ImageDecodeResult', base_config_1.TYPE], + ['ImageDecoderInit', base_config_1.TYPE], + ['ImageEncodeOptions', base_config_1.TYPE], + ['ImportNodeOptions', base_config_1.TYPE], + ['InputEventInit', base_config_1.TYPE], + ['IntersectionObserverInit', base_config_1.TYPE], + ['JsonWebKey', base_config_1.TYPE], + ['KeyAlgorithm', base_config_1.TYPE], + ['KeySystemTrackConfiguration', base_config_1.TYPE], + ['KeyboardEventInit', base_config_1.TYPE], + ['Keyframe', base_config_1.TYPE], + ['KeyframeAnimationOptions', base_config_1.TYPE], + ['KeyframeEffectOptions', base_config_1.TYPE], + ['LockInfo', base_config_1.TYPE], + ['LockManagerSnapshot', base_config_1.TYPE], + ['LockOptions', base_config_1.TYPE], + ['MIDIConnectionEventInit', base_config_1.TYPE], + ['MIDIMessageEventInit', base_config_1.TYPE], + ['MIDIOptions', base_config_1.TYPE], + ['MediaCapabilitiesDecodingInfo', base_config_1.TYPE], + ['MediaCapabilitiesEncodingInfo', base_config_1.TYPE], + ['MediaCapabilitiesInfo', base_config_1.TYPE], + ['MediaCapabilitiesKeySystemConfiguration', base_config_1.TYPE], + ['MediaConfiguration', base_config_1.TYPE], + ['MediaDecodingConfiguration', base_config_1.TYPE], + ['MediaElementAudioSourceOptions', base_config_1.TYPE], + ['MediaEncodingConfiguration', base_config_1.TYPE], + ['MediaEncryptedEventInit', base_config_1.TYPE], + ['MediaImage', base_config_1.TYPE], + ['MediaKeyMessageEventInit', base_config_1.TYPE], + ['MediaKeySystemConfiguration', base_config_1.TYPE], + ['MediaKeySystemMediaCapability', base_config_1.TYPE], + ['MediaKeysPolicy', base_config_1.TYPE], + ['MediaMetadataInit', base_config_1.TYPE], + ['MediaPositionState', base_config_1.TYPE], + ['MediaQueryListEventInit', base_config_1.TYPE], + ['MediaRecorderOptions', base_config_1.TYPE], + ['MediaSessionActionDetails', base_config_1.TYPE], + ['MediaSettingsRange', base_config_1.TYPE], + ['MediaStreamAudioSourceOptions', base_config_1.TYPE], + ['MediaStreamConstraints', base_config_1.TYPE], + ['MediaStreamTrackEventInit', base_config_1.TYPE], + ['MediaTrackCapabilities', base_config_1.TYPE], + ['MediaTrackConstraintSet', base_config_1.TYPE], + ['MediaTrackConstraints', base_config_1.TYPE], + ['MediaTrackSettings', base_config_1.TYPE], + ['MediaTrackSupportedConstraints', base_config_1.TYPE], + ['MessageEventInit', base_config_1.TYPE], + ['MouseEventInit', base_config_1.TYPE], + ['MultiCacheQueryOptions', base_config_1.TYPE], + ['MutationObserverInit', base_config_1.TYPE], + ['NavigationPreloadState', base_config_1.TYPE], + ['NotificationOptions', base_config_1.TYPE], + ['OfflineAudioCompletionEventInit', base_config_1.TYPE], + ['OfflineAudioContextOptions', base_config_1.TYPE], + ['OptionalEffectTiming', base_config_1.TYPE], + ['OpusEncoderConfig', base_config_1.TYPE], + ['OscillatorOptions', base_config_1.TYPE], + ['PageRevealEventInit', base_config_1.TYPE], + ['PageSwapEventInit', base_config_1.TYPE], + ['PageTransitionEventInit', base_config_1.TYPE], + ['PannerOptions', base_config_1.TYPE], + ['PayerErrors', base_config_1.TYPE], + ['PaymentCurrencyAmount', base_config_1.TYPE], + ['PaymentDetailsBase', base_config_1.TYPE], + ['PaymentDetailsInit', base_config_1.TYPE], + ['PaymentDetailsModifier', base_config_1.TYPE], + ['PaymentDetailsUpdate', base_config_1.TYPE], + ['PaymentItem', base_config_1.TYPE], + ['PaymentMethodChangeEventInit', base_config_1.TYPE], + ['PaymentMethodData', base_config_1.TYPE], + ['PaymentOptions', base_config_1.TYPE], + ['PaymentRequestUpdateEventInit', base_config_1.TYPE], + ['PaymentShippingOption', base_config_1.TYPE], + ['PaymentValidationErrors', base_config_1.TYPE], + ['Pbkdf2Params', base_config_1.TYPE], + ['PerformanceMarkOptions', base_config_1.TYPE], + ['PerformanceMeasureOptions', base_config_1.TYPE], + ['PerformanceObserverInit', base_config_1.TYPE], + ['PeriodicWaveConstraints', base_config_1.TYPE], + ['PeriodicWaveOptions', base_config_1.TYPE], + ['PermissionDescriptor', base_config_1.TYPE], + ['PhotoCapabilities', base_config_1.TYPE], + ['PhotoSettings', base_config_1.TYPE], + ['PictureInPictureEventInit', base_config_1.TYPE], + ['PlaneLayout', base_config_1.TYPE], + ['PointerEventInit', base_config_1.TYPE], + ['PointerLockOptions', base_config_1.TYPE], + ['PopStateEventInit', base_config_1.TYPE], + ['PositionOptions', base_config_1.TYPE], + ['ProgressEventInit', base_config_1.TYPE], + ['PromiseRejectionEventInit', base_config_1.TYPE], + ['PropertyDefinition', base_config_1.TYPE], + ['PropertyIndexedKeyframes', base_config_1.TYPE], + ['PublicKeyCredentialCreationOptions', base_config_1.TYPE], + ['PublicKeyCredentialCreationOptionsJSON', base_config_1.TYPE], + ['PublicKeyCredentialDescriptor', base_config_1.TYPE], + ['PublicKeyCredentialDescriptorJSON', base_config_1.TYPE], + ['PublicKeyCredentialEntity', base_config_1.TYPE], + ['PublicKeyCredentialParameters', base_config_1.TYPE], + ['PublicKeyCredentialRequestOptions', base_config_1.TYPE], + ['PublicKeyCredentialRequestOptionsJSON', base_config_1.TYPE], + ['PublicKeyCredentialRpEntity', base_config_1.TYPE], + ['PublicKeyCredentialUserEntity', base_config_1.TYPE], + ['PublicKeyCredentialUserEntityJSON', base_config_1.TYPE], + ['PushSubscriptionJSON', base_config_1.TYPE], + ['PushSubscriptionOptionsInit', base_config_1.TYPE], + ['QueuingStrategy', base_config_1.TYPE], + ['QueuingStrategyInit', base_config_1.TYPE], + ['RTCAnswerOptions', base_config_1.TYPE], + ['RTCCertificateExpiration', base_config_1.TYPE], + ['RTCConfiguration', base_config_1.TYPE], + ['RTCDTMFToneChangeEventInit', base_config_1.TYPE], + ['RTCDataChannelEventInit', base_config_1.TYPE], + ['RTCDataChannelInit', base_config_1.TYPE], + ['RTCDtlsFingerprint', base_config_1.TYPE], + ['RTCEncodedAudioFrameMetadata', base_config_1.TYPE], + ['RTCEncodedFrameMetadata', base_config_1.TYPE], + ['RTCEncodedVideoFrameMetadata', base_config_1.TYPE], + ['RTCErrorEventInit', base_config_1.TYPE], + ['RTCErrorInit', base_config_1.TYPE], + ['RTCIceCandidateInit', base_config_1.TYPE], + ['RTCIceCandidatePairStats', base_config_1.TYPE], + ['RTCIceServer', base_config_1.TYPE], + ['RTCInboundRtpStreamStats', base_config_1.TYPE], + ['RTCLocalIceCandidateInit', base_config_1.TYPE], + ['RTCLocalSessionDescriptionInit', base_config_1.TYPE], + ['RTCOfferAnswerOptions', base_config_1.TYPE], + ['RTCOfferOptions', base_config_1.TYPE], + ['RTCOutboundRtpStreamStats', base_config_1.TYPE], + ['RTCPeerConnectionIceErrorEventInit', base_config_1.TYPE], + ['RTCPeerConnectionIceEventInit', base_config_1.TYPE], + ['RTCReceivedRtpStreamStats', base_config_1.TYPE], + ['RTCRtcpParameters', base_config_1.TYPE], + ['RTCRtpCapabilities', base_config_1.TYPE], + ['RTCRtpCodec', base_config_1.TYPE], + ['RTCRtpCodecParameters', base_config_1.TYPE], + ['RTCRtpCodingParameters', base_config_1.TYPE], + ['RTCRtpContributingSource', base_config_1.TYPE], + ['RTCRtpEncodingParameters', base_config_1.TYPE], + ['RTCRtpHeaderExtensionCapability', base_config_1.TYPE], + ['RTCRtpHeaderExtensionParameters', base_config_1.TYPE], + ['RTCRtpParameters', base_config_1.TYPE], + ['RTCRtpReceiveParameters', base_config_1.TYPE], + ['RTCRtpSendParameters', base_config_1.TYPE], + ['RTCRtpStreamStats', base_config_1.TYPE], + ['RTCRtpSynchronizationSource', base_config_1.TYPE], + ['RTCRtpTransceiverInit', base_config_1.TYPE], + ['RTCSentRtpStreamStats', base_config_1.TYPE], + ['RTCSessionDescriptionInit', base_config_1.TYPE], + ['RTCSetParameterOptions', base_config_1.TYPE], + ['RTCStats', base_config_1.TYPE], + ['RTCTrackEventInit', base_config_1.TYPE], + ['RTCTransportStats', base_config_1.TYPE], + ['ReadableStreamGetReaderOptions', base_config_1.TYPE], + ['ReadableStreamIteratorOptions', base_config_1.TYPE], + ['ReadableStreamReadDoneResult', base_config_1.TYPE], + ['ReadableStreamReadValueResult', base_config_1.TYPE], + ['ReadableWritablePair', base_config_1.TYPE], + ['RegistrationOptions', base_config_1.TYPE], + ['ReportingObserverOptions', base_config_1.TYPE], + ['RequestInit', base_config_1.TYPE], + ['ResizeObserverOptions', base_config_1.TYPE], + ['ResponseInit', base_config_1.TYPE], + ['RsaHashedImportParams', base_config_1.TYPE], + ['RsaHashedKeyAlgorithm', base_config_1.TYPE], + ['RsaHashedKeyGenParams', base_config_1.TYPE], + ['RsaKeyAlgorithm', base_config_1.TYPE], + ['RsaKeyGenParams', base_config_1.TYPE], + ['RsaOaepParams', base_config_1.TYPE], + ['RsaOtherPrimesInfo', base_config_1.TYPE], + ['RsaPssParams', base_config_1.TYPE], + ['SVGBoundingBoxOptions', base_config_1.TYPE], + ['ScrollIntoViewOptions', base_config_1.TYPE], + ['ScrollOptions', base_config_1.TYPE], + ['ScrollToOptions', base_config_1.TYPE], + ['SecurityPolicyViolationEventInit', base_config_1.TYPE], + ['ShadowRootInit', base_config_1.TYPE], + ['ShareData', base_config_1.TYPE], + ['SpeechSynthesisErrorEventInit', base_config_1.TYPE], + ['SpeechSynthesisEventInit', base_config_1.TYPE], + ['StartViewTransitionOptions', base_config_1.TYPE], + ['StaticRangeInit', base_config_1.TYPE], + ['StereoPannerOptions', base_config_1.TYPE], + ['StorageEstimate', base_config_1.TYPE], + ['StorageEventInit', base_config_1.TYPE], + ['StreamPipeOptions', base_config_1.TYPE], + ['StructuredSerializeOptions', base_config_1.TYPE], + ['SubmitEventInit', base_config_1.TYPE], + ['TextDecodeOptions', base_config_1.TYPE], + ['TextDecoderOptions', base_config_1.TYPE], + ['TextEncoderEncodeIntoResult', base_config_1.TYPE], + ['ToggleEventInit', base_config_1.TYPE], + ['TouchEventInit', base_config_1.TYPE], + ['TouchInit', base_config_1.TYPE], + ['TrackEventInit', base_config_1.TYPE], + ['Transformer', base_config_1.TYPE], + ['TransitionEventInit', base_config_1.TYPE], + ['UIEventInit', base_config_1.TYPE], + ['ULongRange', base_config_1.TYPE], + ['UnderlyingByteSource', base_config_1.TYPE], + ['UnderlyingDefaultSource', base_config_1.TYPE], + ['UnderlyingSink', base_config_1.TYPE], + ['UnderlyingSource', base_config_1.TYPE], + ['ValidityStateFlags', base_config_1.TYPE], + ['VideoColorSpaceInit', base_config_1.TYPE], + ['VideoConfiguration', base_config_1.TYPE], + ['VideoDecoderConfig', base_config_1.TYPE], + ['VideoDecoderInit', base_config_1.TYPE], + ['VideoDecoderSupport', base_config_1.TYPE], + ['VideoEncoderConfig', base_config_1.TYPE], + ['VideoEncoderEncodeOptions', base_config_1.TYPE], + ['VideoEncoderEncodeOptionsForAvc', base_config_1.TYPE], + ['VideoEncoderInit', base_config_1.TYPE], + ['VideoEncoderSupport', base_config_1.TYPE], + ['VideoFrameBufferInit', base_config_1.TYPE], + ['VideoFrameCallbackMetadata', base_config_1.TYPE], + ['VideoFrameCopyToOptions', base_config_1.TYPE], + ['VideoFrameInit', base_config_1.TYPE], + ['WaveShaperOptions', base_config_1.TYPE], + ['WebGLContextAttributes', base_config_1.TYPE], + ['WebGLContextEventInit', base_config_1.TYPE], + ['WebTransportCloseInfo', base_config_1.TYPE], + ['WebTransportErrorOptions', base_config_1.TYPE], + ['WebTransportHash', base_config_1.TYPE], + ['WebTransportOptions', base_config_1.TYPE], + ['WebTransportSendOptions', base_config_1.TYPE], + ['WebTransportSendStreamOptions', base_config_1.TYPE], + ['WheelEventInit', base_config_1.TYPE], + ['WindowPostMessageOptions', base_config_1.TYPE], + ['WorkerOptions', base_config_1.TYPE], + ['WorkletOptions', base_config_1.TYPE], + ['WriteParams', base_config_1.TYPE], + ['NodeFilter', base_config_1.TYPE_VALUE], + ['XPathNSResolver', base_config_1.TYPE], + ['ANGLE_instanced_arrays', base_config_1.TYPE], + ['ARIAMixin', base_config_1.TYPE], + ['AbortController', base_config_1.TYPE_VALUE], + ['AbortSignalEventMap', base_config_1.TYPE], + ['AbortSignal', base_config_1.TYPE_VALUE], + ['AbstractRange', base_config_1.TYPE_VALUE], + ['AbstractWorkerEventMap', base_config_1.TYPE], + ['AbstractWorker', base_config_1.TYPE], + ['AnalyserNode', base_config_1.TYPE_VALUE], + ['Animatable', base_config_1.TYPE], + ['AnimationEventMap', base_config_1.TYPE], + ['Animation', base_config_1.TYPE_VALUE], + ['AnimationEffect', base_config_1.TYPE_VALUE], + ['AnimationEvent', base_config_1.TYPE_VALUE], + ['AnimationFrameProvider', base_config_1.TYPE], + ['AnimationPlaybackEvent', base_config_1.TYPE_VALUE], + ['AnimationTimeline', base_config_1.TYPE_VALUE], + ['Attr', base_config_1.TYPE_VALUE], + ['AudioBuffer', base_config_1.TYPE_VALUE], + ['AudioBufferSourceNode', base_config_1.TYPE_VALUE], + ['AudioContext', base_config_1.TYPE_VALUE], + ['AudioData', base_config_1.TYPE_VALUE], + ['AudioDecoderEventMap', base_config_1.TYPE], + ['AudioDecoder', base_config_1.TYPE_VALUE], + ['AudioDestinationNode', base_config_1.TYPE_VALUE], + ['AudioEncoderEventMap', base_config_1.TYPE], + ['AudioEncoder', base_config_1.TYPE_VALUE], + ['AudioListener', base_config_1.TYPE_VALUE], + ['AudioNode', base_config_1.TYPE_VALUE], + ['AudioParam', base_config_1.TYPE_VALUE], + ['AudioParamMap', base_config_1.TYPE_VALUE], + ['AudioProcessingEvent', base_config_1.TYPE_VALUE], + ['AudioScheduledSourceNodeEventMap', base_config_1.TYPE], + ['AudioScheduledSourceNode', base_config_1.TYPE_VALUE], + ['AudioWorklet', base_config_1.TYPE_VALUE], + ['AudioWorkletNodeEventMap', base_config_1.TYPE], + ['AudioWorkletNode', base_config_1.TYPE_VALUE], + ['AuthenticatorAssertionResponse', base_config_1.TYPE_VALUE], + ['AuthenticatorAttestationResponse', base_config_1.TYPE_VALUE], + ['AuthenticatorResponse', base_config_1.TYPE_VALUE], + ['BarProp', base_config_1.TYPE_VALUE], + ['BaseAudioContextEventMap', base_config_1.TYPE], + ['BaseAudioContext', base_config_1.TYPE_VALUE], + ['BeforeUnloadEvent', base_config_1.TYPE_VALUE], + ['BiquadFilterNode', base_config_1.TYPE_VALUE], + ['Blob', base_config_1.TYPE_VALUE], + ['BlobEvent', base_config_1.TYPE_VALUE], + ['Body', base_config_1.TYPE], + ['BroadcastChannelEventMap', base_config_1.TYPE], + ['BroadcastChannel', base_config_1.TYPE_VALUE], + ['ByteLengthQueuingStrategy', base_config_1.TYPE_VALUE], + ['CDATASection', base_config_1.TYPE_VALUE], + ['CSPViolationReportBody', base_config_1.TYPE_VALUE], + ['CSSAnimation', base_config_1.TYPE_VALUE], + ['CSSConditionRule', base_config_1.TYPE_VALUE], + ['CSSContainerRule', base_config_1.TYPE_VALUE], + ['CSSCounterStyleRule', base_config_1.TYPE_VALUE], + ['CSSFontFaceRule', base_config_1.TYPE_VALUE], + ['CSSFontFeatureValuesRule', base_config_1.TYPE_VALUE], + ['CSSFontPaletteValuesRule', base_config_1.TYPE_VALUE], + ['CSSGroupingRule', base_config_1.TYPE_VALUE], + ['CSSImageValue', base_config_1.TYPE_VALUE], + ['CSSImportRule', base_config_1.TYPE_VALUE], + ['CSSKeyframeRule', base_config_1.TYPE_VALUE], + ['CSSKeyframesRule', base_config_1.TYPE_VALUE], + ['CSSKeywordValue', base_config_1.TYPE_VALUE], + ['CSSLayerBlockRule', base_config_1.TYPE_VALUE], + ['CSSLayerStatementRule', base_config_1.TYPE_VALUE], + ['CSSMathClamp', base_config_1.TYPE_VALUE], + ['CSSMathInvert', base_config_1.TYPE_VALUE], + ['CSSMathMax', base_config_1.TYPE_VALUE], + ['CSSMathMin', base_config_1.TYPE_VALUE], + ['CSSMathNegate', base_config_1.TYPE_VALUE], + ['CSSMathProduct', base_config_1.TYPE_VALUE], + ['CSSMathSum', base_config_1.TYPE_VALUE], + ['CSSMathValue', base_config_1.TYPE_VALUE], + ['CSSMatrixComponent', base_config_1.TYPE_VALUE], + ['CSSMediaRule', base_config_1.TYPE_VALUE], + ['CSSNamespaceRule', base_config_1.TYPE_VALUE], + ['CSSNestedDeclarations', base_config_1.TYPE_VALUE], + ['CSSNumericArray', base_config_1.TYPE_VALUE], + ['CSSNumericValue', base_config_1.TYPE_VALUE], + ['CSSPageRule', base_config_1.TYPE_VALUE], + ['CSSPerspective', base_config_1.TYPE_VALUE], + ['CSSPropertyRule', base_config_1.TYPE_VALUE], + ['CSSRotate', base_config_1.TYPE_VALUE], + ['CSSRule', base_config_1.TYPE_VALUE], + ['CSSRuleList', base_config_1.TYPE_VALUE], + ['CSSScale', base_config_1.TYPE_VALUE], + ['CSSScopeRule', base_config_1.TYPE_VALUE], + ['CSSSkew', base_config_1.TYPE_VALUE], + ['CSSSkewX', base_config_1.TYPE_VALUE], + ['CSSSkewY', base_config_1.TYPE_VALUE], + ['CSSStartingStyleRule', base_config_1.TYPE_VALUE], + ['CSSStyleDeclaration', base_config_1.TYPE_VALUE], + ['CSSStyleRule', base_config_1.TYPE_VALUE], + ['CSSStyleSheet', base_config_1.TYPE_VALUE], + ['CSSStyleValue', base_config_1.TYPE_VALUE], + ['CSSSupportsRule', base_config_1.TYPE_VALUE], + ['CSSTransformComponent', base_config_1.TYPE_VALUE], + ['CSSTransformValue', base_config_1.TYPE_VALUE], + ['CSSTransition', base_config_1.TYPE_VALUE], + ['CSSTranslate', base_config_1.TYPE_VALUE], + ['CSSUnitValue', base_config_1.TYPE_VALUE], + ['CSSUnparsedValue', base_config_1.TYPE_VALUE], + ['CSSVariableReferenceValue', base_config_1.TYPE_VALUE], + ['CSSViewTransitionRule', base_config_1.TYPE_VALUE], + ['Cache', base_config_1.TYPE_VALUE], + ['CacheStorage', base_config_1.TYPE_VALUE], + ['CanvasCaptureMediaStreamTrack', base_config_1.TYPE_VALUE], + ['CanvasCompositing', base_config_1.TYPE], + ['CanvasDrawImage', base_config_1.TYPE], + ['CanvasDrawPath', base_config_1.TYPE], + ['CanvasFillStrokeStyles', base_config_1.TYPE], + ['CanvasFilters', base_config_1.TYPE], + ['CanvasGradient', base_config_1.TYPE_VALUE], + ['CanvasImageData', base_config_1.TYPE], + ['CanvasImageSmoothing', base_config_1.TYPE], + ['CanvasPath', base_config_1.TYPE], + ['CanvasPathDrawingStyles', base_config_1.TYPE], + ['CanvasPattern', base_config_1.TYPE_VALUE], + ['CanvasRect', base_config_1.TYPE], + ['CanvasRenderingContext2D', base_config_1.TYPE_VALUE], + ['CanvasSettings', base_config_1.TYPE], + ['CanvasShadowStyles', base_config_1.TYPE], + ['CanvasState', base_config_1.TYPE], + ['CanvasText', base_config_1.TYPE], + ['CanvasTextDrawingStyles', base_config_1.TYPE], + ['CanvasTransform', base_config_1.TYPE], + ['CanvasUserInterface', base_config_1.TYPE], + ['CaretPosition', base_config_1.TYPE_VALUE], + ['ChannelMergerNode', base_config_1.TYPE_VALUE], + ['ChannelSplitterNode', base_config_1.TYPE_VALUE], + ['CharacterData', base_config_1.TYPE_VALUE], + ['ChildNode', base_config_1.TYPE], + ['ClientRect', base_config_1.TYPE], + ['Clipboard', base_config_1.TYPE_VALUE], + ['ClipboardEvent', base_config_1.TYPE_VALUE], + ['ClipboardItem', base_config_1.TYPE_VALUE], + ['CloseEvent', base_config_1.TYPE_VALUE], + ['Comment', base_config_1.TYPE_VALUE], + ['CompositionEvent', base_config_1.TYPE_VALUE], + ['CompressionStream', base_config_1.TYPE_VALUE], + ['ConstantSourceNode', base_config_1.TYPE_VALUE], + ['ContentVisibilityAutoStateChangeEvent', base_config_1.TYPE_VALUE], + ['ConvolverNode', base_config_1.TYPE_VALUE], + ['CookieChangeEvent', base_config_1.TYPE_VALUE], + ['CookieStoreEventMap', base_config_1.TYPE], + ['CookieStore', base_config_1.TYPE_VALUE], + ['CookieStoreManager', base_config_1.TYPE_VALUE], + ['CountQueuingStrategy', base_config_1.TYPE_VALUE], + ['Credential', base_config_1.TYPE_VALUE], + ['CredentialsContainer', base_config_1.TYPE_VALUE], + ['Crypto', base_config_1.TYPE_VALUE], + ['CryptoKey', base_config_1.TYPE_VALUE], + ['CustomElementRegistry', base_config_1.TYPE_VALUE], + ['CustomEvent', base_config_1.TYPE_VALUE], + ['CustomStateSet', base_config_1.TYPE_VALUE], + ['DOMException', base_config_1.TYPE_VALUE], + ['DOMImplementation', base_config_1.TYPE_VALUE], + ['DOMMatrix', base_config_1.TYPE_VALUE], + ['SVGMatrix', base_config_1.TYPE_VALUE], + ['WebKitCSSMatrix', base_config_1.TYPE_VALUE], + ['DOMMatrixReadOnly', base_config_1.TYPE_VALUE], + ['DOMParser', base_config_1.TYPE_VALUE], + ['DOMPoint', base_config_1.TYPE_VALUE], + ['SVGPoint', base_config_1.TYPE_VALUE], + ['DOMPointReadOnly', base_config_1.TYPE_VALUE], + ['DOMQuad', base_config_1.TYPE_VALUE], + ['DOMRect', base_config_1.TYPE_VALUE], + ['SVGRect', base_config_1.TYPE_VALUE], + ['DOMRectList', base_config_1.TYPE_VALUE], + ['DOMRectReadOnly', base_config_1.TYPE_VALUE], + ['DOMStringList', base_config_1.TYPE_VALUE], + ['DOMStringMap', base_config_1.TYPE_VALUE], + ['DOMTokenList', base_config_1.TYPE_VALUE], + ['DataTransfer', base_config_1.TYPE_VALUE], + ['DataTransferItem', base_config_1.TYPE_VALUE], + ['DataTransferItemList', base_config_1.TYPE_VALUE], + ['DecompressionStream', base_config_1.TYPE_VALUE], + ['DelayNode', base_config_1.TYPE_VALUE], + ['DeviceMotionEvent', base_config_1.TYPE_VALUE], + ['DeviceMotionEventAcceleration', base_config_1.TYPE], + ['DeviceMotionEventRotationRate', base_config_1.TYPE], + ['DeviceOrientationEvent', base_config_1.TYPE_VALUE], + ['DocumentEventMap', base_config_1.TYPE], + ['Document', base_config_1.TYPE_VALUE], + ['DocumentFragment', base_config_1.TYPE_VALUE], + ['DocumentOrShadowRoot', base_config_1.TYPE], + ['DocumentTimeline', base_config_1.TYPE_VALUE], + ['DocumentType', base_config_1.TYPE_VALUE], + ['DragEvent', base_config_1.TYPE_VALUE], + ['DynamicsCompressorNode', base_config_1.TYPE_VALUE], + ['EXT_blend_minmax', base_config_1.TYPE], + ['EXT_color_buffer_float', base_config_1.TYPE], + ['EXT_color_buffer_half_float', base_config_1.TYPE], + ['EXT_float_blend', base_config_1.TYPE], + ['EXT_frag_depth', base_config_1.TYPE], + ['EXT_sRGB', base_config_1.TYPE], + ['EXT_shader_texture_lod', base_config_1.TYPE], + ['EXT_texture_compression_bptc', base_config_1.TYPE], + ['EXT_texture_compression_rgtc', base_config_1.TYPE], + ['EXT_texture_filter_anisotropic', base_config_1.TYPE], + ['EXT_texture_norm16', base_config_1.TYPE], + ['ElementEventMap', base_config_1.TYPE], + ['Element', base_config_1.TYPE_VALUE], + ['ElementCSSInlineStyle', base_config_1.TYPE], + ['ElementContentEditable', base_config_1.TYPE], + ['ElementInternals', base_config_1.TYPE_VALUE], + ['EncodedAudioChunk', base_config_1.TYPE_VALUE], + ['EncodedVideoChunk', base_config_1.TYPE_VALUE], + ['ErrorEvent', base_config_1.TYPE_VALUE], + ['Event', base_config_1.TYPE_VALUE], + ['EventCounts', base_config_1.TYPE_VALUE], + ['EventListener', base_config_1.TYPE], + ['EventListenerObject', base_config_1.TYPE], + ['EventSourceEventMap', base_config_1.TYPE], + ['EventSource', base_config_1.TYPE_VALUE], + ['EventTarget', base_config_1.TYPE_VALUE], + ['External', base_config_1.TYPE_VALUE], + ['File', base_config_1.TYPE_VALUE], + ['FileList', base_config_1.TYPE_VALUE], + ['FileReaderEventMap', base_config_1.TYPE], + ['FileReader', base_config_1.TYPE_VALUE], + ['FileSystem', base_config_1.TYPE_VALUE], + ['FileSystemDirectoryEntry', base_config_1.TYPE_VALUE], + ['FileSystemDirectoryHandle', base_config_1.TYPE_VALUE], + ['FileSystemDirectoryReader', base_config_1.TYPE_VALUE], + ['FileSystemEntry', base_config_1.TYPE_VALUE], + ['FileSystemFileEntry', base_config_1.TYPE_VALUE], + ['FileSystemFileHandle', base_config_1.TYPE_VALUE], + ['FileSystemHandle', base_config_1.TYPE_VALUE], + ['FileSystemWritableFileStream', base_config_1.TYPE_VALUE], + ['FocusEvent', base_config_1.TYPE_VALUE], + ['FontFace', base_config_1.TYPE_VALUE], + ['FontFaceSetEventMap', base_config_1.TYPE], + ['FontFaceSet', base_config_1.TYPE_VALUE], + ['FontFaceSetLoadEvent', base_config_1.TYPE_VALUE], + ['FontFaceSource', base_config_1.TYPE], + ['FormData', base_config_1.TYPE_VALUE], + ['FormDataEvent', base_config_1.TYPE_VALUE], + ['FragmentDirective', base_config_1.TYPE_VALUE], + ['GPUError', base_config_1.TYPE], + ['GainNode', base_config_1.TYPE_VALUE], + ['Gamepad', base_config_1.TYPE_VALUE], + ['GamepadButton', base_config_1.TYPE_VALUE], + ['GamepadEvent', base_config_1.TYPE_VALUE], + ['GamepadHapticActuator', base_config_1.TYPE_VALUE], + ['GenericTransformStream', base_config_1.TYPE], + ['Geolocation', base_config_1.TYPE_VALUE], + ['GeolocationCoordinates', base_config_1.TYPE_VALUE], + ['GeolocationPosition', base_config_1.TYPE_VALUE], + ['GeolocationPositionError', base_config_1.TYPE_VALUE], + ['GlobalEventHandlersEventMap', base_config_1.TYPE], + ['GlobalEventHandlers', base_config_1.TYPE], + ['HTMLAllCollection', base_config_1.TYPE_VALUE], + ['HTMLAnchorElement', base_config_1.TYPE_VALUE], + ['HTMLAreaElement', base_config_1.TYPE_VALUE], + ['HTMLAudioElement', base_config_1.TYPE_VALUE], + ['HTMLBRElement', base_config_1.TYPE_VALUE], + ['HTMLBaseElement', base_config_1.TYPE_VALUE], + ['HTMLBodyElementEventMap', base_config_1.TYPE], + ['HTMLBodyElement', base_config_1.TYPE_VALUE], + ['HTMLButtonElement', base_config_1.TYPE_VALUE], + ['HTMLCanvasElement', base_config_1.TYPE_VALUE], + ['HTMLCollectionBase', base_config_1.TYPE], + ['HTMLCollection', base_config_1.TYPE_VALUE], + ['HTMLCollectionOf', base_config_1.TYPE], + ['HTMLDListElement', base_config_1.TYPE_VALUE], + ['HTMLDataElement', base_config_1.TYPE_VALUE], + ['HTMLDataListElement', base_config_1.TYPE_VALUE], + ['HTMLDetailsElement', base_config_1.TYPE_VALUE], + ['HTMLDialogElement', base_config_1.TYPE_VALUE], + ['HTMLDirectoryElement', base_config_1.TYPE_VALUE], + ['HTMLDivElement', base_config_1.TYPE_VALUE], + ['HTMLDocument', base_config_1.TYPE_VALUE], + ['HTMLElementEventMap', base_config_1.TYPE], + ['HTMLElement', base_config_1.TYPE_VALUE], + ['HTMLEmbedElement', base_config_1.TYPE_VALUE], + ['HTMLFieldSetElement', base_config_1.TYPE_VALUE], + ['HTMLFontElement', base_config_1.TYPE_VALUE], + ['HTMLFormControlsCollection', base_config_1.TYPE_VALUE], + ['HTMLFormElement', base_config_1.TYPE_VALUE], + ['HTMLFrameElement', base_config_1.TYPE_VALUE], + ['HTMLFrameSetElementEventMap', base_config_1.TYPE], + ['HTMLFrameSetElement', base_config_1.TYPE_VALUE], + ['HTMLHRElement', base_config_1.TYPE_VALUE], + ['HTMLHeadElement', base_config_1.TYPE_VALUE], + ['HTMLHeadingElement', base_config_1.TYPE_VALUE], + ['HTMLHtmlElement', base_config_1.TYPE_VALUE], + ['HTMLHyperlinkElementUtils', base_config_1.TYPE], + ['HTMLIFrameElement', base_config_1.TYPE_VALUE], + ['HTMLImageElement', base_config_1.TYPE_VALUE], + ['HTMLInputElement', base_config_1.TYPE_VALUE], + ['HTMLLIElement', base_config_1.TYPE_VALUE], + ['HTMLLabelElement', base_config_1.TYPE_VALUE], + ['HTMLLegendElement', base_config_1.TYPE_VALUE], + ['HTMLLinkElement', base_config_1.TYPE_VALUE], + ['HTMLMapElement', base_config_1.TYPE_VALUE], + ['HTMLMarqueeElement', base_config_1.TYPE_VALUE], + ['HTMLMediaElementEventMap', base_config_1.TYPE], + ['HTMLMediaElement', base_config_1.TYPE_VALUE], + ['HTMLMenuElement', base_config_1.TYPE_VALUE], + ['HTMLMetaElement', base_config_1.TYPE_VALUE], + ['HTMLMeterElement', base_config_1.TYPE_VALUE], + ['HTMLModElement', base_config_1.TYPE_VALUE], + ['HTMLOListElement', base_config_1.TYPE_VALUE], + ['HTMLObjectElement', base_config_1.TYPE_VALUE], + ['HTMLOptGroupElement', base_config_1.TYPE_VALUE], + ['HTMLOptionElement', base_config_1.TYPE_VALUE], + ['HTMLOptionsCollection', base_config_1.TYPE_VALUE], + ['HTMLOrSVGElement', base_config_1.TYPE], + ['HTMLOutputElement', base_config_1.TYPE_VALUE], + ['HTMLParagraphElement', base_config_1.TYPE_VALUE], + ['HTMLParamElement', base_config_1.TYPE_VALUE], + ['HTMLPictureElement', base_config_1.TYPE_VALUE], + ['HTMLPreElement', base_config_1.TYPE_VALUE], + ['HTMLProgressElement', base_config_1.TYPE_VALUE], + ['HTMLQuoteElement', base_config_1.TYPE_VALUE], + ['HTMLScriptElement', base_config_1.TYPE_VALUE], + ['HTMLSelectElement', base_config_1.TYPE_VALUE], + ['HTMLSlotElement', base_config_1.TYPE_VALUE], + ['HTMLSourceElement', base_config_1.TYPE_VALUE], + ['HTMLSpanElement', base_config_1.TYPE_VALUE], + ['HTMLStyleElement', base_config_1.TYPE_VALUE], + ['HTMLTableCaptionElement', base_config_1.TYPE_VALUE], + ['HTMLTableCellElement', base_config_1.TYPE_VALUE], + ['HTMLTableColElement', base_config_1.TYPE_VALUE], + ['HTMLTableDataCellElement', base_config_1.TYPE], + ['HTMLTableElement', base_config_1.TYPE_VALUE], + ['HTMLTableHeaderCellElement', base_config_1.TYPE], + ['HTMLTableRowElement', base_config_1.TYPE_VALUE], + ['HTMLTableSectionElement', base_config_1.TYPE_VALUE], + ['HTMLTemplateElement', base_config_1.TYPE_VALUE], + ['HTMLTextAreaElement', base_config_1.TYPE_VALUE], + ['HTMLTimeElement', base_config_1.TYPE_VALUE], + ['HTMLTitleElement', base_config_1.TYPE_VALUE], + ['HTMLTrackElement', base_config_1.TYPE_VALUE], + ['HTMLUListElement', base_config_1.TYPE_VALUE], + ['HTMLUnknownElement', base_config_1.TYPE_VALUE], + ['HTMLVideoElementEventMap', base_config_1.TYPE], + ['HTMLVideoElement', base_config_1.TYPE_VALUE], + ['HashChangeEvent', base_config_1.TYPE_VALUE], + ['Headers', base_config_1.TYPE_VALUE], + ['Highlight', base_config_1.TYPE_VALUE], + ['HighlightRegistry', base_config_1.TYPE_VALUE], + ['History', base_config_1.TYPE_VALUE], + ['IDBCursor', base_config_1.TYPE_VALUE], + ['IDBCursorWithValue', base_config_1.TYPE_VALUE], + ['IDBDatabaseEventMap', base_config_1.TYPE], + ['IDBDatabase', base_config_1.TYPE_VALUE], + ['IDBFactory', base_config_1.TYPE_VALUE], + ['IDBIndex', base_config_1.TYPE_VALUE], + ['IDBKeyRange', base_config_1.TYPE_VALUE], + ['IDBObjectStore', base_config_1.TYPE_VALUE], + ['IDBOpenDBRequestEventMap', base_config_1.TYPE], + ['IDBOpenDBRequest', base_config_1.TYPE_VALUE], + ['IDBRequestEventMap', base_config_1.TYPE], + ['IDBRequest', base_config_1.TYPE_VALUE], + ['IDBTransactionEventMap', base_config_1.TYPE], + ['IDBTransaction', base_config_1.TYPE_VALUE], + ['IDBVersionChangeEvent', base_config_1.TYPE_VALUE], + ['IIRFilterNode', base_config_1.TYPE_VALUE], + ['IdleDeadline', base_config_1.TYPE_VALUE], + ['ImageBitmap', base_config_1.TYPE_VALUE], + ['ImageBitmapRenderingContext', base_config_1.TYPE_VALUE], + ['ImageCapture', base_config_1.TYPE_VALUE], + ['ImageData', base_config_1.TYPE_VALUE], + ['ImageDecoder', base_config_1.TYPE_VALUE], + ['ImageTrack', base_config_1.TYPE_VALUE], + ['ImageTrackList', base_config_1.TYPE_VALUE], + ['ImportMeta', base_config_1.TYPE], + ['InputDeviceInfo', base_config_1.TYPE_VALUE], + ['InputEvent', base_config_1.TYPE_VALUE], + ['IntersectionObserver', base_config_1.TYPE_VALUE], + ['IntersectionObserverEntry', base_config_1.TYPE_VALUE], + ['KHR_parallel_shader_compile', base_config_1.TYPE], + ['KeyboardEvent', base_config_1.TYPE_VALUE], + ['KeyframeEffect', base_config_1.TYPE_VALUE], + ['LargestContentfulPaint', base_config_1.TYPE_VALUE], + ['LinkStyle', base_config_1.TYPE], + ['Location', base_config_1.TYPE_VALUE], + ['Lock', base_config_1.TYPE_VALUE], + ['LockManager', base_config_1.TYPE_VALUE], + ['MIDIAccessEventMap', base_config_1.TYPE], + ['MIDIAccess', base_config_1.TYPE_VALUE], + ['MIDIConnectionEvent', base_config_1.TYPE_VALUE], + ['MIDIInputEventMap', base_config_1.TYPE], + ['MIDIInput', base_config_1.TYPE_VALUE], + ['MIDIInputMap', base_config_1.TYPE_VALUE], + ['MIDIMessageEvent', base_config_1.TYPE_VALUE], + ['MIDIOutput', base_config_1.TYPE_VALUE], + ['MIDIOutputMap', base_config_1.TYPE_VALUE], + ['MIDIPortEventMap', base_config_1.TYPE], + ['MIDIPort', base_config_1.TYPE_VALUE], + ['MathMLElementEventMap', base_config_1.TYPE], + ['MathMLElement', base_config_1.TYPE_VALUE], + ['MediaCapabilities', base_config_1.TYPE_VALUE], + ['MediaDeviceInfo', base_config_1.TYPE_VALUE], + ['MediaDevicesEventMap', base_config_1.TYPE], + ['MediaDevices', base_config_1.TYPE_VALUE], + ['MediaElementAudioSourceNode', base_config_1.TYPE_VALUE], + ['MediaEncryptedEvent', base_config_1.TYPE_VALUE], + ['MediaError', base_config_1.TYPE_VALUE], + ['MediaKeyMessageEvent', base_config_1.TYPE_VALUE], + ['MediaKeySessionEventMap', base_config_1.TYPE], + ['MediaKeySession', base_config_1.TYPE_VALUE], + ['MediaKeyStatusMap', base_config_1.TYPE_VALUE], + ['MediaKeySystemAccess', base_config_1.TYPE_VALUE], + ['MediaKeys', base_config_1.TYPE_VALUE], + ['MediaList', base_config_1.TYPE_VALUE], + ['MediaMetadata', base_config_1.TYPE_VALUE], + ['MediaQueryListEventMap', base_config_1.TYPE], + ['MediaQueryList', base_config_1.TYPE_VALUE], + ['MediaQueryListEvent', base_config_1.TYPE_VALUE], + ['MediaRecorderEventMap', base_config_1.TYPE], + ['MediaRecorder', base_config_1.TYPE_VALUE], + ['MediaSession', base_config_1.TYPE_VALUE], + ['MediaSourceEventMap', base_config_1.TYPE], + ['MediaSource', base_config_1.TYPE_VALUE], + ['MediaSourceHandle', base_config_1.TYPE_VALUE], + ['MediaStreamEventMap', base_config_1.TYPE], + ['MediaStream', base_config_1.TYPE_VALUE], + ['MediaStreamAudioDestinationNode', base_config_1.TYPE_VALUE], + ['MediaStreamAudioSourceNode', base_config_1.TYPE_VALUE], + ['MediaStreamTrackEventMap', base_config_1.TYPE], + ['MediaStreamTrack', base_config_1.TYPE_VALUE], + ['MediaStreamTrackEvent', base_config_1.TYPE_VALUE], + ['MessageChannel', base_config_1.TYPE_VALUE], + ['MessageEvent', base_config_1.TYPE_VALUE], + ['MessageEventTargetEventMap', base_config_1.TYPE], + ['MessageEventTarget', base_config_1.TYPE], + ['MessagePortEventMap', base_config_1.TYPE], + ['MessagePort', base_config_1.TYPE_VALUE], + ['MimeType', base_config_1.TYPE_VALUE], + ['MimeTypeArray', base_config_1.TYPE_VALUE], + ['MouseEvent', base_config_1.TYPE_VALUE], + ['MutationObserver', base_config_1.TYPE_VALUE], + ['MutationRecord', base_config_1.TYPE_VALUE], + ['NamedNodeMap', base_config_1.TYPE_VALUE], + ['NavigationActivation', base_config_1.TYPE_VALUE], + ['NavigationHistoryEntryEventMap', base_config_1.TYPE], + ['NavigationHistoryEntry', base_config_1.TYPE_VALUE], + ['NavigationPreloadManager', base_config_1.TYPE_VALUE], + ['Navigator', base_config_1.TYPE_VALUE], + ['NavigatorAutomationInformation', base_config_1.TYPE], + ['NavigatorBadge', base_config_1.TYPE], + ['NavigatorConcurrentHardware', base_config_1.TYPE], + ['NavigatorContentUtils', base_config_1.TYPE], + ['NavigatorCookies', base_config_1.TYPE], + ['NavigatorID', base_config_1.TYPE], + ['NavigatorLanguage', base_config_1.TYPE], + ['NavigatorLocks', base_config_1.TYPE], + ['NavigatorLogin', base_config_1.TYPE_VALUE], + ['NavigatorOnLine', base_config_1.TYPE], + ['NavigatorPlugins', base_config_1.TYPE], + ['NavigatorStorage', base_config_1.TYPE], + ['Node', base_config_1.TYPE_VALUE], + ['NodeIterator', base_config_1.TYPE_VALUE], + ['NodeList', base_config_1.TYPE_VALUE], + ['NodeListOf', base_config_1.TYPE], + ['NonDocumentTypeChildNode', base_config_1.TYPE], + ['NonElementParentNode', base_config_1.TYPE], + ['NotificationEventMap', base_config_1.TYPE], + ['Notification', base_config_1.TYPE_VALUE], + ['OES_draw_buffers_indexed', base_config_1.TYPE], + ['OES_element_index_uint', base_config_1.TYPE], + ['OES_fbo_render_mipmap', base_config_1.TYPE], + ['OES_standard_derivatives', base_config_1.TYPE], + ['OES_texture_float', base_config_1.TYPE], + ['OES_texture_float_linear', base_config_1.TYPE], + ['OES_texture_half_float', base_config_1.TYPE], + ['OES_texture_half_float_linear', base_config_1.TYPE], + ['OES_vertex_array_object', base_config_1.TYPE], + ['OVR_multiview2', base_config_1.TYPE], + ['OfflineAudioCompletionEvent', base_config_1.TYPE_VALUE], + ['OfflineAudioContextEventMap', base_config_1.TYPE], + ['OfflineAudioContext', base_config_1.TYPE_VALUE], + ['OffscreenCanvasEventMap', base_config_1.TYPE], + ['OffscreenCanvas', base_config_1.TYPE_VALUE], + ['OffscreenCanvasRenderingContext2D', base_config_1.TYPE_VALUE], + ['OscillatorNode', base_config_1.TYPE_VALUE], + ['OverconstrainedError', base_config_1.TYPE_VALUE], + ['PageRevealEvent', base_config_1.TYPE_VALUE], + ['PageSwapEvent', base_config_1.TYPE_VALUE], + ['PageTransitionEvent', base_config_1.TYPE_VALUE], + ['PannerNode', base_config_1.TYPE_VALUE], + ['ParentNode', base_config_1.TYPE], + ['Path2D', base_config_1.TYPE_VALUE], + ['PaymentAddress', base_config_1.TYPE_VALUE], + ['PaymentMethodChangeEvent', base_config_1.TYPE_VALUE], + ['PaymentRequestEventMap', base_config_1.TYPE], + ['PaymentRequest', base_config_1.TYPE_VALUE], + ['PaymentRequestUpdateEvent', base_config_1.TYPE_VALUE], + ['PaymentResponseEventMap', base_config_1.TYPE], + ['PaymentResponse', base_config_1.TYPE_VALUE], + ['PerformanceEventMap', base_config_1.TYPE], + ['Performance', base_config_1.TYPE_VALUE], + ['PerformanceEntry', base_config_1.TYPE_VALUE], + ['PerformanceEventTiming', base_config_1.TYPE_VALUE], + ['PerformanceMark', base_config_1.TYPE_VALUE], + ['PerformanceMeasure', base_config_1.TYPE_VALUE], + ['PerformanceNavigation', base_config_1.TYPE_VALUE], + ['PerformanceNavigationTiming', base_config_1.TYPE_VALUE], + ['PerformanceObserver', base_config_1.TYPE_VALUE], + ['PerformanceObserverEntryList', base_config_1.TYPE_VALUE], + ['PerformancePaintTiming', base_config_1.TYPE_VALUE], + ['PerformanceResourceTiming', base_config_1.TYPE_VALUE], + ['PerformanceServerTiming', base_config_1.TYPE_VALUE], + ['PerformanceTiming', base_config_1.TYPE_VALUE], + ['PeriodicWave', base_config_1.TYPE_VALUE], + ['PermissionStatusEventMap', base_config_1.TYPE], + ['PermissionStatus', base_config_1.TYPE_VALUE], + ['Permissions', base_config_1.TYPE_VALUE], + ['PictureInPictureEvent', base_config_1.TYPE_VALUE], + ['PictureInPictureWindowEventMap', base_config_1.TYPE], + ['PictureInPictureWindow', base_config_1.TYPE_VALUE], + ['Plugin', base_config_1.TYPE_VALUE], + ['PluginArray', base_config_1.TYPE_VALUE], + ['PointerEvent', base_config_1.TYPE_VALUE], + ['PopStateEvent', base_config_1.TYPE_VALUE], + ['PopoverInvokerElement', base_config_1.TYPE], + ['ProcessingInstruction', base_config_1.TYPE_VALUE], + ['ProgressEvent', base_config_1.TYPE_VALUE], + ['PromiseRejectionEvent', base_config_1.TYPE_VALUE], + ['PublicKeyCredential', base_config_1.TYPE_VALUE], + ['PushManager', base_config_1.TYPE_VALUE], + ['PushSubscription', base_config_1.TYPE_VALUE], + ['PushSubscriptionOptions', base_config_1.TYPE_VALUE], + ['RTCCertificate', base_config_1.TYPE_VALUE], + ['RTCDTMFSenderEventMap', base_config_1.TYPE], + ['RTCDTMFSender', base_config_1.TYPE_VALUE], + ['RTCDTMFToneChangeEvent', base_config_1.TYPE_VALUE], + ['RTCDataChannelEventMap', base_config_1.TYPE], + ['RTCDataChannel', base_config_1.TYPE_VALUE], + ['RTCDataChannelEvent', base_config_1.TYPE_VALUE], + ['RTCDtlsTransportEventMap', base_config_1.TYPE], + ['RTCDtlsTransport', base_config_1.TYPE_VALUE], + ['RTCEncodedAudioFrame', base_config_1.TYPE_VALUE], + ['RTCEncodedVideoFrame', base_config_1.TYPE_VALUE], + ['RTCError', base_config_1.TYPE_VALUE], + ['RTCErrorEvent', base_config_1.TYPE_VALUE], + ['RTCIceCandidate', base_config_1.TYPE_VALUE], + ['RTCIceCandidatePair', base_config_1.TYPE], + ['RTCIceTransportEventMap', base_config_1.TYPE], + ['RTCIceTransport', base_config_1.TYPE_VALUE], + ['RTCPeerConnectionEventMap', base_config_1.TYPE], + ['RTCPeerConnection', base_config_1.TYPE_VALUE], + ['RTCPeerConnectionIceErrorEvent', base_config_1.TYPE_VALUE], + ['RTCPeerConnectionIceEvent', base_config_1.TYPE_VALUE], + ['RTCRtpReceiver', base_config_1.TYPE_VALUE], + ['RTCRtpScriptTransform', base_config_1.TYPE_VALUE], + ['RTCRtpSender', base_config_1.TYPE_VALUE], + ['RTCRtpTransceiver', base_config_1.TYPE_VALUE], + ['RTCSctpTransportEventMap', base_config_1.TYPE], + ['RTCSctpTransport', base_config_1.TYPE_VALUE], + ['RTCSessionDescription', base_config_1.TYPE_VALUE], + ['RTCStatsReport', base_config_1.TYPE_VALUE], + ['RTCTrackEvent', base_config_1.TYPE_VALUE], + ['RadioNodeList', base_config_1.TYPE_VALUE], + ['Range', base_config_1.TYPE_VALUE], + ['ReadableByteStreamController', base_config_1.TYPE_VALUE], + ['ReadableStream', base_config_1.TYPE_VALUE], + ['ReadableStreamBYOBReader', base_config_1.TYPE_VALUE], + ['ReadableStreamBYOBRequest', base_config_1.TYPE_VALUE], + ['ReadableStreamDefaultController', base_config_1.TYPE_VALUE], + ['ReadableStreamDefaultReader', base_config_1.TYPE_VALUE], + ['ReadableStreamGenericReader', base_config_1.TYPE], + ['RemotePlaybackEventMap', base_config_1.TYPE], + ['RemotePlayback', base_config_1.TYPE_VALUE], + ['Report', base_config_1.TYPE_VALUE], + ['ReportBody', base_config_1.TYPE_VALUE], + ['ReportingObserver', base_config_1.TYPE_VALUE], + ['Request', base_config_1.TYPE_VALUE], + ['ResizeObserver', base_config_1.TYPE_VALUE], + ['ResizeObserverEntry', base_config_1.TYPE_VALUE], + ['ResizeObserverSize', base_config_1.TYPE_VALUE], + ['Response', base_config_1.TYPE_VALUE], + ['SVGAElement', base_config_1.TYPE_VALUE], + ['SVGAngle', base_config_1.TYPE_VALUE], + ['SVGAnimateElement', base_config_1.TYPE_VALUE], + ['SVGAnimateMotionElement', base_config_1.TYPE_VALUE], + ['SVGAnimateTransformElement', base_config_1.TYPE_VALUE], + ['SVGAnimatedAngle', base_config_1.TYPE_VALUE], + ['SVGAnimatedBoolean', base_config_1.TYPE_VALUE], + ['SVGAnimatedEnumeration', base_config_1.TYPE_VALUE], + ['SVGAnimatedInteger', base_config_1.TYPE_VALUE], + ['SVGAnimatedLength', base_config_1.TYPE_VALUE], + ['SVGAnimatedLengthList', base_config_1.TYPE_VALUE], + ['SVGAnimatedNumber', base_config_1.TYPE_VALUE], + ['SVGAnimatedNumberList', base_config_1.TYPE_VALUE], + ['SVGAnimatedPoints', base_config_1.TYPE], + ['SVGAnimatedPreserveAspectRatio', base_config_1.TYPE_VALUE], + ['SVGAnimatedRect', base_config_1.TYPE_VALUE], + ['SVGAnimatedString', base_config_1.TYPE_VALUE], + ['SVGAnimatedTransformList', base_config_1.TYPE_VALUE], + ['SVGAnimationElement', base_config_1.TYPE_VALUE], + ['SVGCircleElement', base_config_1.TYPE_VALUE], + ['SVGClipPathElement', base_config_1.TYPE_VALUE], + ['SVGComponentTransferFunctionElement', base_config_1.TYPE_VALUE], + ['SVGDefsElement', base_config_1.TYPE_VALUE], + ['SVGDescElement', base_config_1.TYPE_VALUE], + ['SVGElementEventMap', base_config_1.TYPE], + ['SVGElement', base_config_1.TYPE_VALUE], + ['SVGEllipseElement', base_config_1.TYPE_VALUE], + ['SVGFEBlendElement', base_config_1.TYPE_VALUE], + ['SVGFEColorMatrixElement', base_config_1.TYPE_VALUE], + ['SVGFEComponentTransferElement', base_config_1.TYPE_VALUE], + ['SVGFECompositeElement', base_config_1.TYPE_VALUE], + ['SVGFEConvolveMatrixElement', base_config_1.TYPE_VALUE], + ['SVGFEDiffuseLightingElement', base_config_1.TYPE_VALUE], + ['SVGFEDisplacementMapElement', base_config_1.TYPE_VALUE], + ['SVGFEDistantLightElement', base_config_1.TYPE_VALUE], + ['SVGFEDropShadowElement', base_config_1.TYPE_VALUE], + ['SVGFEFloodElement', base_config_1.TYPE_VALUE], + ['SVGFEFuncAElement', base_config_1.TYPE_VALUE], + ['SVGFEFuncBElement', base_config_1.TYPE_VALUE], + ['SVGFEFuncGElement', base_config_1.TYPE_VALUE], + ['SVGFEFuncRElement', base_config_1.TYPE_VALUE], + ['SVGFEGaussianBlurElement', base_config_1.TYPE_VALUE], + ['SVGFEImageElement', base_config_1.TYPE_VALUE], + ['SVGFEMergeElement', base_config_1.TYPE_VALUE], + ['SVGFEMergeNodeElement', base_config_1.TYPE_VALUE], + ['SVGFEMorphologyElement', base_config_1.TYPE_VALUE], + ['SVGFEOffsetElement', base_config_1.TYPE_VALUE], + ['SVGFEPointLightElement', base_config_1.TYPE_VALUE], + ['SVGFESpecularLightingElement', base_config_1.TYPE_VALUE], + ['SVGFESpotLightElement', base_config_1.TYPE_VALUE], + ['SVGFETileElement', base_config_1.TYPE_VALUE], + ['SVGFETurbulenceElement', base_config_1.TYPE_VALUE], + ['SVGFilterElement', base_config_1.TYPE_VALUE], + ['SVGFilterPrimitiveStandardAttributes', base_config_1.TYPE], + ['SVGFitToViewBox', base_config_1.TYPE], + ['SVGForeignObjectElement', base_config_1.TYPE_VALUE], + ['SVGGElement', base_config_1.TYPE_VALUE], + ['SVGGeometryElement', base_config_1.TYPE_VALUE], + ['SVGGradientElement', base_config_1.TYPE_VALUE], + ['SVGGraphicsElement', base_config_1.TYPE_VALUE], + ['SVGImageElement', base_config_1.TYPE_VALUE], + ['SVGLength', base_config_1.TYPE_VALUE], + ['SVGLengthList', base_config_1.TYPE_VALUE], + ['SVGLineElement', base_config_1.TYPE_VALUE], + ['SVGLinearGradientElement', base_config_1.TYPE_VALUE], + ['SVGMPathElement', base_config_1.TYPE_VALUE], + ['SVGMarkerElement', base_config_1.TYPE_VALUE], + ['SVGMaskElement', base_config_1.TYPE_VALUE], + ['SVGMetadataElement', base_config_1.TYPE_VALUE], + ['SVGNumber', base_config_1.TYPE_VALUE], + ['SVGNumberList', base_config_1.TYPE_VALUE], + ['SVGPathElement', base_config_1.TYPE_VALUE], + ['SVGPatternElement', base_config_1.TYPE_VALUE], + ['SVGPointList', base_config_1.TYPE_VALUE], + ['SVGPolygonElement', base_config_1.TYPE_VALUE], + ['SVGPolylineElement', base_config_1.TYPE_VALUE], + ['SVGPreserveAspectRatio', base_config_1.TYPE_VALUE], + ['SVGRadialGradientElement', base_config_1.TYPE_VALUE], + ['SVGRectElement', base_config_1.TYPE_VALUE], + ['SVGSVGElementEventMap', base_config_1.TYPE], + ['SVGSVGElement', base_config_1.TYPE_VALUE], + ['SVGScriptElement', base_config_1.TYPE_VALUE], + ['SVGSetElement', base_config_1.TYPE_VALUE], + ['SVGStopElement', base_config_1.TYPE_VALUE], + ['SVGStringList', base_config_1.TYPE_VALUE], + ['SVGStyleElement', base_config_1.TYPE_VALUE], + ['SVGSwitchElement', base_config_1.TYPE_VALUE], + ['SVGSymbolElement', base_config_1.TYPE_VALUE], + ['SVGTSpanElement', base_config_1.TYPE_VALUE], + ['SVGTests', base_config_1.TYPE], + ['SVGTextContentElement', base_config_1.TYPE_VALUE], + ['SVGTextElement', base_config_1.TYPE_VALUE], + ['SVGTextPathElement', base_config_1.TYPE_VALUE], + ['SVGTextPositioningElement', base_config_1.TYPE_VALUE], + ['SVGTitleElement', base_config_1.TYPE_VALUE], + ['SVGTransform', base_config_1.TYPE_VALUE], + ['SVGTransformList', base_config_1.TYPE_VALUE], + ['SVGURIReference', base_config_1.TYPE], + ['SVGUnitTypes', base_config_1.TYPE_VALUE], + ['SVGUseElement', base_config_1.TYPE_VALUE], + ['SVGViewElement', base_config_1.TYPE_VALUE], + ['Screen', base_config_1.TYPE_VALUE], + ['ScreenOrientationEventMap', base_config_1.TYPE], + ['ScreenOrientation', base_config_1.TYPE_VALUE], + ['ScriptProcessorNodeEventMap', base_config_1.TYPE], + ['ScriptProcessorNode', base_config_1.TYPE_VALUE], + ['SecurityPolicyViolationEvent', base_config_1.TYPE_VALUE], + ['Selection', base_config_1.TYPE_VALUE], + ['ServiceWorkerEventMap', base_config_1.TYPE], + ['ServiceWorker', base_config_1.TYPE_VALUE], + ['ServiceWorkerContainerEventMap', base_config_1.TYPE], + ['ServiceWorkerContainer', base_config_1.TYPE_VALUE], + ['ServiceWorkerRegistrationEventMap', base_config_1.TYPE], + ['ServiceWorkerRegistration', base_config_1.TYPE_VALUE], + ['ShadowRootEventMap', base_config_1.TYPE], + ['ShadowRoot', base_config_1.TYPE_VALUE], + ['SharedWorker', base_config_1.TYPE_VALUE], + ['Slottable', base_config_1.TYPE], + ['SourceBufferEventMap', base_config_1.TYPE], + ['SourceBuffer', base_config_1.TYPE_VALUE], + ['SourceBufferListEventMap', base_config_1.TYPE], + ['SourceBufferList', base_config_1.TYPE_VALUE], + ['SpeechRecognitionAlternative', base_config_1.TYPE_VALUE], + ['SpeechRecognitionResult', base_config_1.TYPE_VALUE], + ['SpeechRecognitionResultList', base_config_1.TYPE_VALUE], + ['SpeechSynthesisEventMap', base_config_1.TYPE], + ['SpeechSynthesis', base_config_1.TYPE_VALUE], + ['SpeechSynthesisErrorEvent', base_config_1.TYPE_VALUE], + ['SpeechSynthesisEvent', base_config_1.TYPE_VALUE], + ['SpeechSynthesisUtteranceEventMap', base_config_1.TYPE], + ['SpeechSynthesisUtterance', base_config_1.TYPE_VALUE], + ['SpeechSynthesisVoice', base_config_1.TYPE_VALUE], + ['StaticRange', base_config_1.TYPE_VALUE], + ['StereoPannerNode', base_config_1.TYPE_VALUE], + ['Storage', base_config_1.TYPE_VALUE], + ['StorageEvent', base_config_1.TYPE_VALUE], + ['StorageManager', base_config_1.TYPE_VALUE], + ['StyleMedia', base_config_1.TYPE], + ['StylePropertyMap', base_config_1.TYPE_VALUE], + ['StylePropertyMapReadOnly', base_config_1.TYPE_VALUE], + ['StyleSheet', base_config_1.TYPE_VALUE], + ['StyleSheetList', base_config_1.TYPE_VALUE], + ['SubmitEvent', base_config_1.TYPE_VALUE], + ['SubtleCrypto', base_config_1.TYPE_VALUE], + ['Text', base_config_1.TYPE_VALUE], + ['TextDecoder', base_config_1.TYPE_VALUE], + ['TextDecoderCommon', base_config_1.TYPE], + ['TextDecoderStream', base_config_1.TYPE_VALUE], + ['TextEncoder', base_config_1.TYPE_VALUE], + ['TextEncoderCommon', base_config_1.TYPE], + ['TextEncoderStream', base_config_1.TYPE_VALUE], + ['TextEvent', base_config_1.TYPE_VALUE], + ['TextMetrics', base_config_1.TYPE_VALUE], + ['TextTrackEventMap', base_config_1.TYPE], + ['TextTrack', base_config_1.TYPE_VALUE], + ['TextTrackCueEventMap', base_config_1.TYPE], + ['TextTrackCue', base_config_1.TYPE_VALUE], + ['TextTrackCueList', base_config_1.TYPE_VALUE], + ['TextTrackListEventMap', base_config_1.TYPE], + ['TextTrackList', base_config_1.TYPE_VALUE], + ['TimeRanges', base_config_1.TYPE_VALUE], + ['ToggleEvent', base_config_1.TYPE_VALUE], + ['Touch', base_config_1.TYPE_VALUE], + ['TouchEvent', base_config_1.TYPE_VALUE], + ['TouchList', base_config_1.TYPE_VALUE], + ['TrackEvent', base_config_1.TYPE_VALUE], + ['TransformStream', base_config_1.TYPE_VALUE], + ['TransformStreamDefaultController', base_config_1.TYPE_VALUE], + ['TransitionEvent', base_config_1.TYPE_VALUE], + ['TreeWalker', base_config_1.TYPE_VALUE], + ['UIEvent', base_config_1.TYPE_VALUE], + ['URL', base_config_1.TYPE_VALUE], + ['webkitURL', base_config_1.TYPE_VALUE], + ['URLSearchParams', base_config_1.TYPE_VALUE], + ['UserActivation', base_config_1.TYPE_VALUE], + ['VTTCue', base_config_1.TYPE_VALUE], + ['VTTRegion', base_config_1.TYPE_VALUE], + ['ValidityState', base_config_1.TYPE_VALUE], + ['VideoColorSpace', base_config_1.TYPE_VALUE], + ['VideoDecoderEventMap', base_config_1.TYPE], + ['VideoDecoder', base_config_1.TYPE_VALUE], + ['VideoEncoderEventMap', base_config_1.TYPE], + ['VideoEncoder', base_config_1.TYPE_VALUE], + ['VideoFrame', base_config_1.TYPE_VALUE], + ['VideoPlaybackQuality', base_config_1.TYPE_VALUE], + ['ViewTransition', base_config_1.TYPE_VALUE], + ['ViewTransitionTypeSet', base_config_1.TYPE_VALUE], + ['VisualViewportEventMap', base_config_1.TYPE], + ['VisualViewport', base_config_1.TYPE_VALUE], + ['WEBGL_color_buffer_float', base_config_1.TYPE], + ['WEBGL_compressed_texture_astc', base_config_1.TYPE], + ['WEBGL_compressed_texture_etc', base_config_1.TYPE], + ['WEBGL_compressed_texture_etc1', base_config_1.TYPE], + ['WEBGL_compressed_texture_pvrtc', base_config_1.TYPE], + ['WEBGL_compressed_texture_s3tc', base_config_1.TYPE], + ['WEBGL_compressed_texture_s3tc_srgb', base_config_1.TYPE], + ['WEBGL_debug_renderer_info', base_config_1.TYPE], + ['WEBGL_debug_shaders', base_config_1.TYPE], + ['WEBGL_depth_texture', base_config_1.TYPE], + ['WEBGL_draw_buffers', base_config_1.TYPE], + ['WEBGL_lose_context', base_config_1.TYPE], + ['WEBGL_multi_draw', base_config_1.TYPE], + ['WakeLock', base_config_1.TYPE_VALUE], + ['WakeLockSentinelEventMap', base_config_1.TYPE], + ['WakeLockSentinel', base_config_1.TYPE_VALUE], + ['WaveShaperNode', base_config_1.TYPE_VALUE], + ['WebGL2RenderingContext', base_config_1.TYPE_VALUE], + ['WebGL2RenderingContextBase', base_config_1.TYPE], + ['WebGL2RenderingContextOverloads', base_config_1.TYPE], + ['WebGLActiveInfo', base_config_1.TYPE_VALUE], + ['WebGLBuffer', base_config_1.TYPE_VALUE], + ['WebGLContextEvent', base_config_1.TYPE_VALUE], + ['WebGLFramebuffer', base_config_1.TYPE_VALUE], + ['WebGLProgram', base_config_1.TYPE_VALUE], + ['WebGLQuery', base_config_1.TYPE_VALUE], + ['WebGLRenderbuffer', base_config_1.TYPE_VALUE], + ['WebGLRenderingContext', base_config_1.TYPE_VALUE], + ['WebGLRenderingContextBase', base_config_1.TYPE], + ['WebGLRenderingContextOverloads', base_config_1.TYPE], + ['WebGLSampler', base_config_1.TYPE_VALUE], + ['WebGLShader', base_config_1.TYPE_VALUE], + ['WebGLShaderPrecisionFormat', base_config_1.TYPE_VALUE], + ['WebGLSync', base_config_1.TYPE_VALUE], + ['WebGLTexture', base_config_1.TYPE_VALUE], + ['WebGLTransformFeedback', base_config_1.TYPE_VALUE], + ['WebGLUniformLocation', base_config_1.TYPE_VALUE], + ['WebGLVertexArrayObject', base_config_1.TYPE_VALUE], + ['WebGLVertexArrayObjectOES', base_config_1.TYPE], + ['WebSocketEventMap', base_config_1.TYPE], + ['WebSocket', base_config_1.TYPE_VALUE], + ['WebTransport', base_config_1.TYPE_VALUE], + ['WebTransportBidirectionalStream', base_config_1.TYPE_VALUE], + ['WebTransportDatagramDuplexStream', base_config_1.TYPE_VALUE], + ['WebTransportError', base_config_1.TYPE_VALUE], + ['WheelEvent', base_config_1.TYPE_VALUE], + ['WindowEventMap', base_config_1.TYPE], + ['Window', base_config_1.TYPE_VALUE], + ['WindowEventHandlersEventMap', base_config_1.TYPE], + ['WindowEventHandlers', base_config_1.TYPE], + ['WindowLocalStorage', base_config_1.TYPE], + ['WindowOrWorkerGlobalScope', base_config_1.TYPE], + ['WindowSessionStorage', base_config_1.TYPE], + ['WorkerEventMap', base_config_1.TYPE], + ['Worker', base_config_1.TYPE_VALUE], + ['Worklet', base_config_1.TYPE_VALUE], + ['WritableStream', base_config_1.TYPE_VALUE], + ['WritableStreamDefaultController', base_config_1.TYPE_VALUE], + ['WritableStreamDefaultWriter', base_config_1.TYPE_VALUE], + ['XMLDocument', base_config_1.TYPE_VALUE], + ['XMLHttpRequestEventMap', base_config_1.TYPE], + ['XMLHttpRequest', base_config_1.TYPE_VALUE], + ['XMLHttpRequestEventTargetEventMap', base_config_1.TYPE], + ['XMLHttpRequestEventTarget', base_config_1.TYPE_VALUE], + ['XMLHttpRequestUpload', base_config_1.TYPE_VALUE], + ['XMLSerializer', base_config_1.TYPE_VALUE], + ['XPathEvaluator', base_config_1.TYPE_VALUE], + ['XPathEvaluatorBase', base_config_1.TYPE], + ['XPathExpression', base_config_1.TYPE_VALUE], + ['XPathResult', base_config_1.TYPE_VALUE], + ['XSLTProcessor', base_config_1.TYPE_VALUE], + ['CSS', base_config_1.TYPE_VALUE], + ['WebAssembly', base_config_1.TYPE_VALUE], + ['Console', base_config_1.TYPE], + ['AudioDataOutputCallback', base_config_1.TYPE], + ['BlobCallback', base_config_1.TYPE], + ['CustomElementConstructor', base_config_1.TYPE], + ['DecodeErrorCallback', base_config_1.TYPE], + ['DecodeSuccessCallback', base_config_1.TYPE], + ['EncodedAudioChunkOutputCallback', base_config_1.TYPE], + ['EncodedVideoChunkOutputCallback', base_config_1.TYPE], + ['ErrorCallback', base_config_1.TYPE], + ['FileCallback', base_config_1.TYPE], + ['FileSystemEntriesCallback', base_config_1.TYPE], + ['FileSystemEntryCallback', base_config_1.TYPE], + ['FrameRequestCallback', base_config_1.TYPE], + ['FunctionStringCallback', base_config_1.TYPE], + ['IdleRequestCallback', base_config_1.TYPE], + ['IntersectionObserverCallback', base_config_1.TYPE], + ['LockGrantedCallback', base_config_1.TYPE], + ['MediaSessionActionHandler', base_config_1.TYPE], + ['MutationCallback', base_config_1.TYPE], + ['NotificationPermissionCallback', base_config_1.TYPE], + ['OnBeforeUnloadEventHandlerNonNull', base_config_1.TYPE], + ['OnErrorEventHandlerNonNull', base_config_1.TYPE], + ['PerformanceObserverCallback', base_config_1.TYPE], + ['PositionCallback', base_config_1.TYPE], + ['PositionErrorCallback', base_config_1.TYPE], + ['QueuingStrategySize', base_config_1.TYPE], + ['RTCPeerConnectionErrorCallback', base_config_1.TYPE], + ['RTCSessionDescriptionCallback', base_config_1.TYPE], + ['RemotePlaybackAvailabilityCallback', base_config_1.TYPE], + ['ReportingObserverCallback', base_config_1.TYPE], + ['ResizeObserverCallback', base_config_1.TYPE], + ['TransformerFlushCallback', base_config_1.TYPE], + ['TransformerStartCallback', base_config_1.TYPE], + ['TransformerTransformCallback', base_config_1.TYPE], + ['UnderlyingSinkAbortCallback', base_config_1.TYPE], + ['UnderlyingSinkCloseCallback', base_config_1.TYPE], + ['UnderlyingSinkStartCallback', base_config_1.TYPE], + ['UnderlyingSinkWriteCallback', base_config_1.TYPE], + ['UnderlyingSourceCancelCallback', base_config_1.TYPE], + ['UnderlyingSourcePullCallback', base_config_1.TYPE], + ['UnderlyingSourceStartCallback', base_config_1.TYPE], + ['VideoFrameOutputCallback', base_config_1.TYPE], + ['VideoFrameRequestCallback', base_config_1.TYPE], + ['ViewTransitionUpdateCallback', base_config_1.TYPE], + ['VoidFunction', base_config_1.TYPE], + ['WebCodecsErrorCallback', base_config_1.TYPE], + ['HTMLElementTagNameMap', base_config_1.TYPE], + ['HTMLElementDeprecatedTagNameMap', base_config_1.TYPE], + ['SVGElementTagNameMap', base_config_1.TYPE], + ['MathMLElementTagNameMap', base_config_1.TYPE], + ['ElementTagNameMap', base_config_1.TYPE], + ['AlgorithmIdentifier', base_config_1.TYPE], + ['AllowSharedBufferSource', base_config_1.TYPE], + ['AutoFill', base_config_1.TYPE], + ['AutoFillField', base_config_1.TYPE], + ['AutoFillSection', base_config_1.TYPE], + ['Base64URLString', base_config_1.TYPE], + ['BigInteger', base_config_1.TYPE], + ['BlobPart', base_config_1.TYPE], + ['BodyInit', base_config_1.TYPE], + ['BufferSource', base_config_1.TYPE], + ['COSEAlgorithmIdentifier', base_config_1.TYPE], + ['CSSKeywordish', base_config_1.TYPE], + ['CSSNumberish', base_config_1.TYPE], + ['CSSPerspectiveValue', base_config_1.TYPE], + ['CSSUnparsedSegment', base_config_1.TYPE], + ['CanvasImageSource', base_config_1.TYPE], + ['ClipboardItemData', base_config_1.TYPE], + ['ClipboardItems', base_config_1.TYPE], + ['ConstrainBoolean', base_config_1.TYPE], + ['ConstrainDOMString', base_config_1.TYPE], + ['ConstrainDouble', base_config_1.TYPE], + ['ConstrainULong', base_config_1.TYPE], + ['CookieList', base_config_1.TYPE], + ['DOMHighResTimeStamp', base_config_1.TYPE], + ['EpochTimeStamp', base_config_1.TYPE], + ['EventListenerOrEventListenerObject', base_config_1.TYPE], + ['FileSystemWriteChunkType', base_config_1.TYPE], + ['Float32List', base_config_1.TYPE], + ['FormDataEntryValue', base_config_1.TYPE], + ['GLbitfield', base_config_1.TYPE], + ['GLboolean', base_config_1.TYPE], + ['GLclampf', base_config_1.TYPE], + ['GLenum', base_config_1.TYPE], + ['GLfloat', base_config_1.TYPE], + ['GLint', base_config_1.TYPE], + ['GLint64', base_config_1.TYPE], + ['GLintptr', base_config_1.TYPE], + ['GLsizei', base_config_1.TYPE], + ['GLsizeiptr', base_config_1.TYPE], + ['GLuint', base_config_1.TYPE], + ['GLuint64', base_config_1.TYPE], + ['HTMLOrSVGImageElement', base_config_1.TYPE], + ['HTMLOrSVGScriptElement', base_config_1.TYPE], + ['HashAlgorithmIdentifier', base_config_1.TYPE], + ['HeadersInit', base_config_1.TYPE], + ['IDBValidKey', base_config_1.TYPE], + ['ImageBitmapSource', base_config_1.TYPE], + ['ImageBufferSource', base_config_1.TYPE], + ['ImageDataArray', base_config_1.TYPE], + ['Int32List', base_config_1.TYPE], + ['LineAndPositionSetting', base_config_1.TYPE], + ['MediaProvider', base_config_1.TYPE], + ['MessageEventSource', base_config_1.TYPE], + ['MutationRecordType', base_config_1.TYPE], + ['NamedCurve', base_config_1.TYPE], + ['OffscreenRenderingContext', base_config_1.TYPE], + ['OnBeforeUnloadEventHandler', base_config_1.TYPE], + ['OnErrorEventHandler', base_config_1.TYPE], + ['OptionalPostfixToken', base_config_1.TYPE], + ['OptionalPrefixToken', base_config_1.TYPE], + ['PerformanceEntryList', base_config_1.TYPE], + ['PublicKeyCredentialClientCapabilities', base_config_1.TYPE], + ['PublicKeyCredentialJSON', base_config_1.TYPE], + ['RTCRtpTransform', base_config_1.TYPE], + ['ReadableStreamController', base_config_1.TYPE], + ['ReadableStreamReadResult', base_config_1.TYPE], + ['ReadableStreamReader', base_config_1.TYPE], + ['RenderingContext', base_config_1.TYPE], + ['ReportList', base_config_1.TYPE], + ['RequestInfo', base_config_1.TYPE], + ['TexImageSource', base_config_1.TYPE], + ['TimerHandler', base_config_1.TYPE], + ['Transferable', base_config_1.TYPE], + ['Uint32List', base_config_1.TYPE], + ['VibratePattern', base_config_1.TYPE], + ['WindowProxy', base_config_1.TYPE], + ['XMLHttpRequestBodyInit', base_config_1.TYPE], + ['AlignSetting', base_config_1.TYPE], + ['AlphaOption', base_config_1.TYPE], + ['AnimationPlayState', base_config_1.TYPE], + ['AnimationReplaceState', base_config_1.TYPE], + ['AppendMode', base_config_1.TYPE], + ['AttestationConveyancePreference', base_config_1.TYPE], + ['AudioContextLatencyCategory', base_config_1.TYPE], + ['AudioContextState', base_config_1.TYPE], + ['AudioSampleFormat', base_config_1.TYPE], + ['AuthenticatorAttachment', base_config_1.TYPE], + ['AuthenticatorTransport', base_config_1.TYPE], + ['AutoFillAddressKind', base_config_1.TYPE], + ['AutoFillBase', base_config_1.TYPE], + ['AutoFillContactField', base_config_1.TYPE], + ['AutoFillContactKind', base_config_1.TYPE], + ['AutoFillCredentialField', base_config_1.TYPE], + ['AutoFillNormalField', base_config_1.TYPE], + ['AutoKeyword', base_config_1.TYPE], + ['AutomationRate', base_config_1.TYPE], + ['AvcBitstreamFormat', base_config_1.TYPE], + ['BinaryType', base_config_1.TYPE], + ['BiquadFilterType', base_config_1.TYPE], + ['BitrateMode', base_config_1.TYPE], + ['CSSMathOperator', base_config_1.TYPE], + ['CSSNumericBaseType', base_config_1.TYPE], + ['CanPlayTypeResult', base_config_1.TYPE], + ['CanvasDirection', base_config_1.TYPE], + ['CanvasFillRule', base_config_1.TYPE], + ['CanvasFontKerning', base_config_1.TYPE], + ['CanvasFontStretch', base_config_1.TYPE], + ['CanvasFontVariantCaps', base_config_1.TYPE], + ['CanvasLineCap', base_config_1.TYPE], + ['CanvasLineJoin', base_config_1.TYPE], + ['CanvasTextAlign', base_config_1.TYPE], + ['CanvasTextBaseline', base_config_1.TYPE], + ['CanvasTextRendering', base_config_1.TYPE], + ['ChannelCountMode', base_config_1.TYPE], + ['ChannelInterpretation', base_config_1.TYPE], + ['ClientTypes', base_config_1.TYPE], + ['CodecState', base_config_1.TYPE], + ['ColorGamut', base_config_1.TYPE], + ['ColorSpaceConversion', base_config_1.TYPE], + ['CompositeOperation', base_config_1.TYPE], + ['CompositeOperationOrAuto', base_config_1.TYPE], + ['CompressionFormat', base_config_1.TYPE], + ['CookieSameSite', base_config_1.TYPE], + ['CredentialMediationRequirement', base_config_1.TYPE], + ['DOMParserSupportedType', base_config_1.TYPE], + ['DirectionSetting', base_config_1.TYPE], + ['DisplayCaptureSurfaceType', base_config_1.TYPE], + ['DistanceModelType', base_config_1.TYPE], + ['DocumentReadyState', base_config_1.TYPE], + ['DocumentVisibilityState', base_config_1.TYPE], + ['EncodedAudioChunkType', base_config_1.TYPE], + ['EncodedVideoChunkType', base_config_1.TYPE], + ['EndOfStreamError', base_config_1.TYPE], + ['EndingType', base_config_1.TYPE], + ['FileSystemHandleKind', base_config_1.TYPE], + ['FillLightMode', base_config_1.TYPE], + ['FillMode', base_config_1.TYPE], + ['FontDisplay', base_config_1.TYPE], + ['FontFaceLoadStatus', base_config_1.TYPE], + ['FontFaceSetLoadStatus', base_config_1.TYPE], + ['FullscreenNavigationUI', base_config_1.TYPE], + ['GamepadHapticEffectType', base_config_1.TYPE], + ['GamepadHapticsResult', base_config_1.TYPE], + ['GamepadMappingType', base_config_1.TYPE], + ['GlobalCompositeOperation', base_config_1.TYPE], + ['HardwareAcceleration', base_config_1.TYPE], + ['HdrMetadataType', base_config_1.TYPE], + ['HighlightType', base_config_1.TYPE], + ['IDBCursorDirection', base_config_1.TYPE], + ['IDBRequestReadyState', base_config_1.TYPE], + ['IDBTransactionDurability', base_config_1.TYPE], + ['IDBTransactionMode', base_config_1.TYPE], + ['ImageOrientation', base_config_1.TYPE], + ['ImageSmoothingQuality', base_config_1.TYPE], + ['InsertPosition', base_config_1.TYPE], + ['IterationCompositeOperation', base_config_1.TYPE], + ['KeyFormat', base_config_1.TYPE], + ['KeyType', base_config_1.TYPE], + ['KeyUsage', base_config_1.TYPE], + ['LatencyMode', base_config_1.TYPE], + ['LineAlignSetting', base_config_1.TYPE], + ['LockMode', base_config_1.TYPE], + ['LoginStatus', base_config_1.TYPE], + ['MIDIPortConnectionState', base_config_1.TYPE], + ['MIDIPortDeviceState', base_config_1.TYPE], + ['MIDIPortType', base_config_1.TYPE], + ['MediaDecodingType', base_config_1.TYPE], + ['MediaDeviceKind', base_config_1.TYPE], + ['MediaEncodingType', base_config_1.TYPE], + ['MediaKeyMessageType', base_config_1.TYPE], + ['MediaKeySessionClosedReason', base_config_1.TYPE], + ['MediaKeySessionType', base_config_1.TYPE], + ['MediaKeyStatus', base_config_1.TYPE], + ['MediaKeysRequirement', base_config_1.TYPE], + ['MediaSessionAction', base_config_1.TYPE], + ['MediaSessionPlaybackState', base_config_1.TYPE], + ['MediaStreamTrackState', base_config_1.TYPE], + ['NavigationTimingType', base_config_1.TYPE], + ['NavigationType', base_config_1.TYPE], + ['NotificationDirection', base_config_1.TYPE], + ['NotificationPermission', base_config_1.TYPE], + ['OffscreenRenderingContextId', base_config_1.TYPE], + ['OpusBitstreamFormat', base_config_1.TYPE], + ['OrientationType', base_config_1.TYPE], + ['OscillatorType', base_config_1.TYPE], + ['OverSampleType', base_config_1.TYPE], + ['PanningModelType', base_config_1.TYPE], + ['PaymentComplete', base_config_1.TYPE], + ['PaymentShippingType', base_config_1.TYPE], + ['PermissionName', base_config_1.TYPE], + ['PermissionState', base_config_1.TYPE], + ['PlaybackDirection', base_config_1.TYPE], + ['PositionAlignSetting', base_config_1.TYPE], + ['PredefinedColorSpace', base_config_1.TYPE], + ['PremultiplyAlpha', base_config_1.TYPE], + ['PresentationStyle', base_config_1.TYPE], + ['PublicKeyCredentialType', base_config_1.TYPE], + ['PushEncryptionKeyName', base_config_1.TYPE], + ['RTCBundlePolicy', base_config_1.TYPE], + ['RTCDataChannelState', base_config_1.TYPE], + ['RTCDegradationPreference', base_config_1.TYPE], + ['RTCDtlsRole', base_config_1.TYPE], + ['RTCDtlsTransportState', base_config_1.TYPE], + ['RTCEncodedVideoFrameType', base_config_1.TYPE], + ['RTCErrorDetailType', base_config_1.TYPE], + ['RTCIceCandidateType', base_config_1.TYPE], + ['RTCIceComponent', base_config_1.TYPE], + ['RTCIceConnectionState', base_config_1.TYPE], + ['RTCIceGathererState', base_config_1.TYPE], + ['RTCIceGatheringState', base_config_1.TYPE], + ['RTCIceProtocol', base_config_1.TYPE], + ['RTCIceRole', base_config_1.TYPE], + ['RTCIceTcpCandidateType', base_config_1.TYPE], + ['RTCIceTransportPolicy', base_config_1.TYPE], + ['RTCIceTransportState', base_config_1.TYPE], + ['RTCPeerConnectionState', base_config_1.TYPE], + ['RTCPriorityType', base_config_1.TYPE], + ['RTCQualityLimitationReason', base_config_1.TYPE], + ['RTCRtcpMuxPolicy', base_config_1.TYPE], + ['RTCRtpTransceiverDirection', base_config_1.TYPE], + ['RTCSctpTransportState', base_config_1.TYPE], + ['RTCSdpType', base_config_1.TYPE], + ['RTCSignalingState', base_config_1.TYPE], + ['RTCStatsIceCandidatePairState', base_config_1.TYPE], + ['RTCStatsType', base_config_1.TYPE], + ['ReadableStreamReaderMode', base_config_1.TYPE], + ['ReadableStreamType', base_config_1.TYPE], + ['ReadyState', base_config_1.TYPE], + ['RecordingState', base_config_1.TYPE], + ['RedEyeReduction', base_config_1.TYPE], + ['ReferrerPolicy', base_config_1.TYPE], + ['RemotePlaybackState', base_config_1.TYPE], + ['RequestCache', base_config_1.TYPE], + ['RequestCredentials', base_config_1.TYPE], + ['RequestDestination', base_config_1.TYPE], + ['RequestMode', base_config_1.TYPE], + ['RequestPriority', base_config_1.TYPE], + ['RequestRedirect', base_config_1.TYPE], + ['ResidentKeyRequirement', base_config_1.TYPE], + ['ResizeObserverBoxOptions', base_config_1.TYPE], + ['ResizeQuality', base_config_1.TYPE], + ['ResponseType', base_config_1.TYPE], + ['ScrollBehavior', base_config_1.TYPE], + ['ScrollLogicalPosition', base_config_1.TYPE], + ['ScrollRestoration', base_config_1.TYPE], + ['ScrollSetting', base_config_1.TYPE], + ['SecurityPolicyViolationEventDisposition', base_config_1.TYPE], + ['SelectionMode', base_config_1.TYPE], + ['ServiceWorkerState', base_config_1.TYPE], + ['ServiceWorkerUpdateViaCache', base_config_1.TYPE], + ['ShadowRootMode', base_config_1.TYPE], + ['SlotAssignmentMode', base_config_1.TYPE], + ['SpeechSynthesisErrorCode', base_config_1.TYPE], + ['TextTrackKind', base_config_1.TYPE], + ['TextTrackMode', base_config_1.TYPE], + ['TouchType', base_config_1.TYPE], + ['TransferFunction', base_config_1.TYPE], + ['UserVerificationRequirement', base_config_1.TYPE], + ['VideoColorPrimaries', base_config_1.TYPE], + ['VideoEncoderBitrateMode', base_config_1.TYPE], + ['VideoFacingModeEnum', base_config_1.TYPE], + ['VideoMatrixCoefficients', base_config_1.TYPE], + ['VideoPixelFormat', base_config_1.TYPE], + ['VideoTransferCharacteristics', base_config_1.TYPE], + ['WakeLockType', base_config_1.TYPE], + ['WebGLPowerPreference', base_config_1.TYPE], + ['WebTransportCongestionControl', base_config_1.TYPE], + ['WebTransportErrorSource', base_config_1.TYPE], + ['WorkerType', base_config_1.TYPE], + ['WriteCommandType', base_config_1.TYPE], + ['XMLHttpRequestResponseType', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts new file mode 100644 index 0000000..2f623e7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2015_collection: LibDefinition; +//# sourceMappingURL=es2015.collection.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts.map new file mode 100644 index 0000000..3f4c05d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.collection.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.collection.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,iBAAiB,EAAE,aAc/B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js new file mode 100644 index 0000000..d4eae8b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js @@ -0,0 +1,23 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_collection = void 0; +const base_config_1 = require("./base-config"); +exports.es2015_collection = { + libs: [], + variables: [ + ['Map', base_config_1.TYPE_VALUE], + ['MapConstructor', base_config_1.TYPE], + ['ReadonlyMap', base_config_1.TYPE], + ['WeakMap', base_config_1.TYPE_VALUE], + ['WeakMapConstructor', base_config_1.TYPE], + ['Set', base_config_1.TYPE_VALUE], + ['SetConstructor', base_config_1.TYPE], + ['ReadonlySet', base_config_1.TYPE], + ['WeakSet', base_config_1.TYPE_VALUE], + ['WeakSetConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts new file mode 100644 index 0000000..6ac939a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2015_core: LibDefinition; +//# sourceMappingURL=es2015.core.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts.map new file mode 100644 index 0000000..17a475a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.core.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.core.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,WAAW,EAAE,aAyBzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js new file mode 100644 index 0000000..0b9b39d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js @@ -0,0 +1,34 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_core = void 0; +const base_config_1 = require("./base-config"); +exports.es2015_core = { + libs: [], + variables: [ + ['Array', base_config_1.TYPE], + ['ArrayConstructor', base_config_1.TYPE], + ['DateConstructor', base_config_1.TYPE], + ['Function', base_config_1.TYPE], + ['Math', base_config_1.TYPE], + ['NumberConstructor', base_config_1.TYPE], + ['ObjectConstructor', base_config_1.TYPE], + ['ReadonlyArray', base_config_1.TYPE], + ['RegExp', base_config_1.TYPE], + ['RegExpConstructor', base_config_1.TYPE], + ['String', base_config_1.TYPE], + ['StringConstructor', base_config_1.TYPE], + ['Int8Array', base_config_1.TYPE], + ['Uint8Array', base_config_1.TYPE], + ['Uint8ClampedArray', base_config_1.TYPE], + ['Int16Array', base_config_1.TYPE], + ['Uint16Array', base_config_1.TYPE], + ['Int32Array', base_config_1.TYPE], + ['Uint32Array', base_config_1.TYPE], + ['Float32Array', base_config_1.TYPE], + ['Float64Array', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts new file mode 100644 index 0000000..5ea5a5a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2015: LibDefinition; +//# sourceMappingURL=es2015.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts.map new file mode 100644 index 0000000..ab88c65 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAajD,eAAO,MAAM,MAAM,EAAE,aAcpB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts new file mode 100644 index 0000000..983086f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2015_generator: LibDefinition; +//# sourceMappingURL=es2015.generator.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts.map new file mode 100644 index 0000000..3a2e27b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.generator.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.generator.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,gBAAgB,EAAE,aAO9B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js new file mode 100644 index 0000000..1697b85 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js @@ -0,0 +1,17 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_generator = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +exports.es2015_generator = { + libs: [es2015_iterable_1.es2015_iterable], + variables: [ + ['Generator', base_config_1.TYPE], + ['GeneratorFunction', base_config_1.TYPE], + ['GeneratorFunctionConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts new file mode 100644 index 0000000..f0b538b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2015_iterable: LibDefinition; +//# sourceMappingURL=es2015.iterable.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts.map new file mode 100644 index 0000000..753b5ea --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.iterable.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.iterable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,eAAe,EAAE,aAoD7B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js new file mode 100644 index 0000000..e420f53 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js @@ -0,0 +1,62 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_iterable = void 0; +const base_config_1 = require("./base-config"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.es2015_iterable = { + libs: [es2015_symbol_1.es2015_symbol], + variables: [ + ['SymbolConstructor', base_config_1.TYPE], + ['IteratorYieldResult', base_config_1.TYPE], + ['IteratorReturnResult', base_config_1.TYPE], + ['IteratorResult', base_config_1.TYPE], + ['Iterator', base_config_1.TYPE], + ['Iterable', base_config_1.TYPE], + ['IterableIterator', base_config_1.TYPE], + ['IteratorObject', base_config_1.TYPE], + ['BuiltinIteratorReturn', base_config_1.TYPE], + ['ArrayIterator', base_config_1.TYPE], + ['Array', base_config_1.TYPE], + ['ArrayConstructor', base_config_1.TYPE], + ['ReadonlyArray', base_config_1.TYPE], + ['IArguments', base_config_1.TYPE], + ['MapIterator', base_config_1.TYPE], + ['Map', base_config_1.TYPE], + ['ReadonlyMap', base_config_1.TYPE], + ['MapConstructor', base_config_1.TYPE], + ['WeakMap', base_config_1.TYPE], + ['WeakMapConstructor', base_config_1.TYPE], + ['SetIterator', base_config_1.TYPE], + ['Set', base_config_1.TYPE], + ['ReadonlySet', base_config_1.TYPE], + ['SetConstructor', base_config_1.TYPE], + ['WeakSet', base_config_1.TYPE], + ['WeakSetConstructor', base_config_1.TYPE], + ['Promise', base_config_1.TYPE], + ['PromiseConstructor', base_config_1.TYPE], + ['StringIterator', base_config_1.TYPE], + ['String', base_config_1.TYPE], + ['Int8Array', base_config_1.TYPE], + ['Int8ArrayConstructor', base_config_1.TYPE], + ['Uint8Array', base_config_1.TYPE], + ['Uint8ArrayConstructor', base_config_1.TYPE], + ['Uint8ClampedArray', base_config_1.TYPE], + ['Uint8ClampedArrayConstructor', base_config_1.TYPE], + ['Int16Array', base_config_1.TYPE], + ['Int16ArrayConstructor', base_config_1.TYPE], + ['Uint16Array', base_config_1.TYPE], + ['Uint16ArrayConstructor', base_config_1.TYPE], + ['Int32Array', base_config_1.TYPE], + ['Int32ArrayConstructor', base_config_1.TYPE], + ['Uint32Array', base_config_1.TYPE], + ['Uint32ArrayConstructor', base_config_1.TYPE], + ['Float32Array', base_config_1.TYPE], + ['Float32ArrayConstructor', base_config_1.TYPE], + ['Float64Array', base_config_1.TYPE], + ['Float64ArrayConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js new file mode 100644 index 0000000..c810c2c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js @@ -0,0 +1,32 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015 = void 0; +const es5_1 = require("./es5"); +const es2015_collection_1 = require("./es2015.collection"); +const es2015_core_1 = require("./es2015.core"); +const es2015_generator_1 = require("./es2015.generator"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_promise_1 = require("./es2015.promise"); +const es2015_proxy_1 = require("./es2015.proxy"); +const es2015_reflect_1 = require("./es2015.reflect"); +const es2015_symbol_1 = require("./es2015.symbol"); +const es2015_symbol_wellknown_1 = require("./es2015.symbol.wellknown"); +exports.es2015 = { + libs: [ + es5_1.es5, + es2015_core_1.es2015_core, + es2015_collection_1.es2015_collection, + es2015_iterable_1.es2015_iterable, + es2015_generator_1.es2015_generator, + es2015_promise_1.es2015_promise, + es2015_proxy_1.es2015_proxy, + es2015_reflect_1.es2015_reflect, + es2015_symbol_1.es2015_symbol, + es2015_symbol_wellknown_1.es2015_symbol_wellknown, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts new file mode 100644 index 0000000..f65ef73 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2015_promise: LibDefinition; +//# sourceMappingURL=es2015.promise.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts.map new file mode 100644 index 0000000..c8d9ab8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.promise.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.promise.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,cAAc,EAAE,aAG5B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js new file mode 100644 index 0000000..b15ce91 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_promise = void 0; +const base_config_1 = require("./base-config"); +exports.es2015_promise = { + libs: [], + variables: [['PromiseConstructor', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts new file mode 100644 index 0000000..d1ebabb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2015_proxy: LibDefinition; +//# sourceMappingURL=es2015.proxy.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts.map new file mode 100644 index 0000000..a25eac2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.proxy.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.proxy.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,YAAY,EAAE,aAM1B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js new file mode 100644 index 0000000..2d3b5bd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js @@ -0,0 +1,15 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_proxy = void 0; +const base_config_1 = require("./base-config"); +exports.es2015_proxy = { + libs: [], + variables: [ + ['ProxyHandler', base_config_1.TYPE], + ['ProxyConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts new file mode 100644 index 0000000..e2bd908 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2015_reflect: LibDefinition; +//# sourceMappingURL=es2015.reflect.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts.map new file mode 100644 index 0000000..a51b41b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.reflect.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.reflect.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,cAAc,EAAE,aAG5B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js new file mode 100644 index 0000000..58f9489 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_reflect = void 0; +const base_config_1 = require("./base-config"); +exports.es2015_reflect = { + libs: [], + variables: [['Reflect', base_config_1.TYPE_VALUE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts new file mode 100644 index 0000000..0adf0c1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2015_symbol: LibDefinition; +//# sourceMappingURL=es2015.symbol.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts.map new file mode 100644 index 0000000..ea625e8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.symbol.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.symbol.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js new file mode 100644 index 0000000..e8b6fba --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_symbol = void 0; +const base_config_1 = require("./base-config"); +exports.es2015_symbol = { + libs: [], + variables: [['SymbolConstructor', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts new file mode 100644 index 0000000..4a96ccd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2015_symbol_wellknown: LibDefinition; +//# sourceMappingURL=es2015.symbol.wellknown.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts.map new file mode 100644 index 0000000..22ba62f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.symbol.wellknown.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.symbol.wellknown.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,uBAAuB,EAAE,aAqCrC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js new file mode 100644 index 0000000..c910722 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js @@ -0,0 +1,47 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_symbol_wellknown = void 0; +const base_config_1 = require("./base-config"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.es2015_symbol_wellknown = { + libs: [es2015_symbol_1.es2015_symbol], + variables: [ + ['SymbolConstructor', base_config_1.TYPE], + ['Symbol', base_config_1.TYPE], + ['Array', base_config_1.TYPE], + ['ReadonlyArray', base_config_1.TYPE], + ['Date', base_config_1.TYPE], + ['Map', base_config_1.TYPE], + ['WeakMap', base_config_1.TYPE], + ['Set', base_config_1.TYPE], + ['WeakSet', base_config_1.TYPE], + ['JSON', base_config_1.TYPE], + ['Function', base_config_1.TYPE], + ['GeneratorFunction', base_config_1.TYPE], + ['Math', base_config_1.TYPE], + ['Promise', base_config_1.TYPE], + ['PromiseConstructor', base_config_1.TYPE], + ['RegExp', base_config_1.TYPE], + ['RegExpConstructor', base_config_1.TYPE], + ['String', base_config_1.TYPE], + ['ArrayBuffer', base_config_1.TYPE], + ['DataView', base_config_1.TYPE], + ['Int8Array', base_config_1.TYPE], + ['Uint8Array', base_config_1.TYPE], + ['Uint8ClampedArray', base_config_1.TYPE], + ['Int16Array', base_config_1.TYPE], + ['Uint16Array', base_config_1.TYPE], + ['Int32Array', base_config_1.TYPE], + ['Uint32Array', base_config_1.TYPE], + ['Float32Array', base_config_1.TYPE], + ['Float64Array', base_config_1.TYPE], + ['ArrayConstructor', base_config_1.TYPE], + ['MapConstructor', base_config_1.TYPE], + ['SetConstructor', base_config_1.TYPE], + ['ArrayBufferConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts new file mode 100644 index 0000000..a82c6a9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2016_array_include: LibDefinition; +//# sourceMappingURL=es2016.array.include.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts.map new file mode 100644 index 0000000..61af3f4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2016.array.include.d.ts","sourceRoot":"","sources":["../../src/lib/es2016.array.include.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,oBAAoB,EAAE,aAelC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js new file mode 100644 index 0000000..7825e3a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2016_array_include = void 0; +const base_config_1 = require("./base-config"); +exports.es2016_array_include = { + libs: [], + variables: [ + ['Array', base_config_1.TYPE], + ['ReadonlyArray', base_config_1.TYPE], + ['Int8Array', base_config_1.TYPE], + ['Uint8Array', base_config_1.TYPE], + ['Uint8ClampedArray', base_config_1.TYPE], + ['Int16Array', base_config_1.TYPE], + ['Uint16Array', base_config_1.TYPE], + ['Int32Array', base_config_1.TYPE], + ['Uint32Array', base_config_1.TYPE], + ['Float32Array', base_config_1.TYPE], + ['Float64Array', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts new file mode 100644 index 0000000..2dcfedb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2016: LibDefinition; +//# sourceMappingURL=es2016.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts.map new file mode 100644 index 0000000..11742f6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2016.d.ts","sourceRoot":"","sources":["../../src/lib/es2016.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,eAAO,MAAM,MAAM,EAAE,aAGpB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts new file mode 100644 index 0000000..34cecc1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2016_full: LibDefinition; +//# sourceMappingURL=es2016.full.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts.map new file mode 100644 index 0000000..4944a3a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2016.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2016.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD,eAAO,MAAM,WAAW,EAAE,aAGzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js new file mode 100644 index 0000000..5daf259 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js @@ -0,0 +1,16 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2016_full = void 0; +const dom_1 = require("./dom"); +const dom_iterable_1 = require("./dom.iterable"); +const es2016_1 = require("./es2016"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2016_full = { + libs: [es2016_1.es2016, dom_1.dom, webworker_importscripts_1.webworker_importscripts, scripthost_1.scripthost, dom_iterable_1.dom_iterable], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.intl.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.intl.d.ts new file mode 100644 index 0000000..363537d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.intl.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2016_intl: LibDefinition; +//# sourceMappingURL=es2016.intl.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.intl.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.intl.d.ts.map new file mode 100644 index 0000000..417ea35 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2016.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2016.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,WAAW,EAAE,aAGzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.intl.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.intl.js new file mode 100644 index 0000000..6a9ef66 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2016_intl = void 0; +const base_config_1 = require("./base-config"); +exports.es2016_intl = { + libs: [], + variables: [['Intl', base_config_1.TYPE_VALUE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js new file mode 100644 index 0000000..33e4b6b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js @@ -0,0 +1,14 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2016 = void 0; +const es2015_1 = require("./es2015"); +const es2016_array_include_1 = require("./es2016.array.include"); +const es2016_intl_1 = require("./es2016.intl"); +exports.es2016 = { + libs: [es2015_1.es2015, es2016_array_include_1.es2016_array_include, es2016_intl_1.es2016_intl], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.arraybuffer.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.arraybuffer.d.ts new file mode 100644 index 0000000..05af514 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.arraybuffer.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2017_arraybuffer: LibDefinition; +//# sourceMappingURL=es2017.arraybuffer.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.arraybuffer.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.arraybuffer.d.ts.map new file mode 100644 index 0000000..058c75d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.arraybuffer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.arraybuffer.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.arraybuffer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,kBAAkB,EAAE,aAGhC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.arraybuffer.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.arraybuffer.js new file mode 100644 index 0000000..47b32dc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.arraybuffer.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_arraybuffer = void 0; +const base_config_1 = require("./base-config"); +exports.es2017_arraybuffer = { + libs: [], + variables: [['ArrayBufferConstructor', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts new file mode 100644 index 0000000..662a558 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2017: LibDefinition; +//# sourceMappingURL=es2017.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts.map new file mode 100644 index 0000000..7a0ce95 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAWjD,eAAO,MAAM,MAAM,EAAE,aAYpB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts new file mode 100644 index 0000000..c7a0db8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2017_date: LibDefinition; +//# sourceMappingURL=es2017.date.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts.map new file mode 100644 index 0000000..0ba9b42 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.date.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.date.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,WAAW,EAAE,aAGzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.js new file mode 100644 index 0000000..c1d8ff6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_date = void 0; +const base_config_1 = require("./base-config"); +exports.es2017_date = { + libs: [], + variables: [['DateConstructor', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts new file mode 100644 index 0000000..3c4edb3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2017_full: LibDefinition; +//# sourceMappingURL=es2017.full.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts.map new file mode 100644 index 0000000..5535662 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD,eAAO,MAAM,WAAW,EAAE,aAGzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js new file mode 100644 index 0000000..cc5c720 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js @@ -0,0 +1,16 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_full = void 0; +const dom_1 = require("./dom"); +const dom_iterable_1 = require("./dom.iterable"); +const es2017_1 = require("./es2017"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2017_full = { + libs: [es2017_1.es2017, dom_1.dom, webworker_importscripts_1.webworker_importscripts, scripthost_1.scripthost, dom_iterable_1.dom_iterable], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts new file mode 100644 index 0000000..ea08254 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2017_intl: LibDefinition; +//# sourceMappingURL=es2017.intl.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts.map new file mode 100644 index 0000000..58a713b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,WAAW,EAAE,aAGzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js new file mode 100644 index 0000000..7e818b8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_intl = void 0; +const base_config_1 = require("./base-config"); +exports.es2017_intl = { + libs: [], + variables: [['Intl', base_config_1.TYPE_VALUE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js new file mode 100644 index 0000000..987a9c0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js @@ -0,0 +1,28 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017 = void 0; +const es2016_1 = require("./es2016"); +const es2017_arraybuffer_1 = require("./es2017.arraybuffer"); +const es2017_date_1 = require("./es2017.date"); +const es2017_intl_1 = require("./es2017.intl"); +const es2017_object_1 = require("./es2017.object"); +const es2017_sharedmemory_1 = require("./es2017.sharedmemory"); +const es2017_string_1 = require("./es2017.string"); +const es2017_typedarrays_1 = require("./es2017.typedarrays"); +exports.es2017 = { + libs: [ + es2016_1.es2016, + es2017_arraybuffer_1.es2017_arraybuffer, + es2017_date_1.es2017_date, + es2017_intl_1.es2017_intl, + es2017_object_1.es2017_object, + es2017_sharedmemory_1.es2017_sharedmemory, + es2017_string_1.es2017_string, + es2017_typedarrays_1.es2017_typedarrays, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts new file mode 100644 index 0000000..803f1ae --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2017_object: LibDefinition; +//# sourceMappingURL=es2017.object.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts.map new file mode 100644 index 0000000..d7c53ad --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.object.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.object.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js new file mode 100644 index 0000000..93cda9b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_object = void 0; +const base_config_1 = require("./base-config"); +exports.es2017_object = { + libs: [], + variables: [['ObjectConstructor', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts new file mode 100644 index 0000000..c44e78d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2017_sharedmemory: LibDefinition; +//# sourceMappingURL=es2017.sharedmemory.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts.map new file mode 100644 index 0000000..582cee6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.sharedmemory.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.sharedmemory.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,eAAO,MAAM,mBAAmB,EAAE,aAQjC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js new file mode 100644 index 0000000..7832144 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js @@ -0,0 +1,19 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_sharedmemory = void 0; +const base_config_1 = require("./base-config"); +const es2015_symbol_1 = require("./es2015.symbol"); +const es2015_symbol_wellknown_1 = require("./es2015.symbol.wellknown"); +exports.es2017_sharedmemory = { + libs: [es2015_symbol_1.es2015_symbol, es2015_symbol_wellknown_1.es2015_symbol_wellknown], + variables: [ + ['SharedArrayBuffer', base_config_1.TYPE_VALUE], + ['SharedArrayBufferConstructor', base_config_1.TYPE], + ['ArrayBufferTypes', base_config_1.TYPE], + ['Atomics', base_config_1.TYPE_VALUE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts new file mode 100644 index 0000000..41a2116 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2017_string: LibDefinition; +//# sourceMappingURL=es2017.string.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts.map new file mode 100644 index 0000000..aa8f504 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.string.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.string.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js new file mode 100644 index 0000000..3853d0b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_string = void 0; +const base_config_1 = require("./base-config"); +exports.es2017_string = { + libs: [], + variables: [['String', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts new file mode 100644 index 0000000..50342c5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2017_typedarrays: LibDefinition; +//# sourceMappingURL=es2017.typedarrays.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts.map new file mode 100644 index 0000000..eef674a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.typedarrays.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.typedarrays.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,kBAAkB,EAAE,aAahC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js new file mode 100644 index 0000000..90272da --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js @@ -0,0 +1,22 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_typedarrays = void 0; +const base_config_1 = require("./base-config"); +exports.es2017_typedarrays = { + libs: [], + variables: [ + ['Int8ArrayConstructor', base_config_1.TYPE], + ['Uint8ArrayConstructor', base_config_1.TYPE], + ['Uint8ClampedArrayConstructor', base_config_1.TYPE], + ['Int16ArrayConstructor', base_config_1.TYPE], + ['Uint16ArrayConstructor', base_config_1.TYPE], + ['Int32ArrayConstructor', base_config_1.TYPE], + ['Uint32ArrayConstructor', base_config_1.TYPE], + ['Float32ArrayConstructor', base_config_1.TYPE], + ['Float64ArrayConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts new file mode 100644 index 0000000..f6e87ea --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2018_asyncgenerator: LibDefinition; +//# sourceMappingURL=es2018.asyncgenerator.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts.map new file mode 100644 index 0000000..6dd2153 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.asyncgenerator.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.asyncgenerator.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,qBAAqB,EAAE,aAOnC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js new file mode 100644 index 0000000..47b4d43 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js @@ -0,0 +1,17 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018_asyncgenerator = void 0; +const base_config_1 = require("./base-config"); +const es2018_asynciterable_1 = require("./es2018.asynciterable"); +exports.es2018_asyncgenerator = { + libs: [es2018_asynciterable_1.es2018_asynciterable], + variables: [ + ['AsyncGenerator', base_config_1.TYPE], + ['AsyncGeneratorFunction', base_config_1.TYPE], + ['AsyncGeneratorFunctionConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts new file mode 100644 index 0000000..cb92830 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2018_asynciterable: LibDefinition; +//# sourceMappingURL=es2018.asynciterable.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts.map new file mode 100644 index 0000000..2513d58 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.asynciterable.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.asynciterable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,eAAO,MAAM,oBAAoB,EAAE,aASlC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js new file mode 100644 index 0000000..bae3f07 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js @@ -0,0 +1,20 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018_asynciterable = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.es2018_asynciterable = { + libs: [es2015_symbol_1.es2015_symbol, es2015_iterable_1.es2015_iterable], + variables: [ + ['SymbolConstructor', base_config_1.TYPE], + ['AsyncIterator', base_config_1.TYPE], + ['AsyncIterable', base_config_1.TYPE], + ['AsyncIterableIterator', base_config_1.TYPE], + ['AsyncIteratorObject', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts new file mode 100644 index 0000000..36b1cef --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2018: LibDefinition; +//# sourceMappingURL=es2018.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts.map new file mode 100644 index 0000000..48b10a9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,eAAO,MAAM,MAAM,EAAE,aAUpB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts new file mode 100644 index 0000000..231ad9d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2018_full: LibDefinition; +//# sourceMappingURL=es2018.full.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts.map new file mode 100644 index 0000000..7242cf8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,eAAO,MAAM,WAAW,EAAE,aAUzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js new file mode 100644 index 0000000..814d553 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018_full = void 0; +const dom_1 = require("./dom"); +const dom_asynciterable_1 = require("./dom.asynciterable"); +const dom_iterable_1 = require("./dom.iterable"); +const es2018_1 = require("./es2018"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2018_full = { + libs: [ + es2018_1.es2018, + dom_1.dom, + webworker_importscripts_1.webworker_importscripts, + scripthost_1.scripthost, + dom_iterable_1.dom_iterable, + dom_asynciterable_1.dom_asynciterable, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts new file mode 100644 index 0000000..217a49c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2018_intl: LibDefinition; +//# sourceMappingURL=es2018.intl.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts.map new file mode 100644 index 0000000..ec866a0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,WAAW,EAAE,aAGzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js new file mode 100644 index 0000000..1349e22 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018_intl = void 0; +const base_config_1 = require("./base-config"); +exports.es2018_intl = { + libs: [], + variables: [['Intl', base_config_1.TYPE_VALUE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js new file mode 100644 index 0000000..5ceeff6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018 = void 0; +const es2017_1 = require("./es2017"); +const es2018_asyncgenerator_1 = require("./es2018.asyncgenerator"); +const es2018_asynciterable_1 = require("./es2018.asynciterable"); +const es2018_intl_1 = require("./es2018.intl"); +const es2018_promise_1 = require("./es2018.promise"); +const es2018_regexp_1 = require("./es2018.regexp"); +exports.es2018 = { + libs: [ + es2017_1.es2017, + es2018_asynciterable_1.es2018_asynciterable, + es2018_asyncgenerator_1.es2018_asyncgenerator, + es2018_promise_1.es2018_promise, + es2018_regexp_1.es2018_regexp, + es2018_intl_1.es2018_intl, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts new file mode 100644 index 0000000..ce89852 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2018_promise: LibDefinition; +//# sourceMappingURL=es2018.promise.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts.map new file mode 100644 index 0000000..2d73370 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.promise.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.promise.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,cAAc,EAAE,aAG5B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js new file mode 100644 index 0000000..77a8842 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018_promise = void 0; +const base_config_1 = require("./base-config"); +exports.es2018_promise = { + libs: [], + variables: [['Promise', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts new file mode 100644 index 0000000..c4879f6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2018_regexp: LibDefinition; +//# sourceMappingURL=es2018.regexp.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts.map new file mode 100644 index 0000000..010f20e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.regexp.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.regexp.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAO3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js new file mode 100644 index 0000000..ae3442a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js @@ -0,0 +1,16 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018_regexp = void 0; +const base_config_1 = require("./base-config"); +exports.es2018_regexp = { + libs: [], + variables: [ + ['RegExpMatchArray', base_config_1.TYPE], + ['RegExpExecArray', base_config_1.TYPE], + ['RegExp', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts new file mode 100644 index 0000000..a16bd45 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2019_array: LibDefinition; +//# sourceMappingURL=es2019.array.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts.map new file mode 100644 index 0000000..d966052 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.array.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.array.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,YAAY,EAAE,aAO1B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js new file mode 100644 index 0000000..25bb4da --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js @@ -0,0 +1,16 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019_array = void 0; +const base_config_1 = require("./base-config"); +exports.es2019_array = { + libs: [], + variables: [ + ['FlatArray', base_config_1.TYPE], + ['ReadonlyArray', base_config_1.TYPE], + ['Array', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts new file mode 100644 index 0000000..318ecbd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2019: LibDefinition; +//# sourceMappingURL=es2019.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts.map new file mode 100644 index 0000000..007e989 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,eAAO,MAAM,MAAM,EAAE,aAUpB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts new file mode 100644 index 0000000..9cfdf2c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2019_full: LibDefinition; +//# sourceMappingURL=es2019.full.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts.map new file mode 100644 index 0000000..9a12afd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,eAAO,MAAM,WAAW,EAAE,aAUzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js new file mode 100644 index 0000000..8f22031 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019_full = void 0; +const dom_1 = require("./dom"); +const dom_asynciterable_1 = require("./dom.asynciterable"); +const dom_iterable_1 = require("./dom.iterable"); +const es2019_1 = require("./es2019"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2019_full = { + libs: [ + es2019_1.es2019, + dom_1.dom, + webworker_importscripts_1.webworker_importscripts, + scripthost_1.scripthost, + dom_iterable_1.dom_iterable, + dom_asynciterable_1.dom_asynciterable, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts new file mode 100644 index 0000000..cd1dbb6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2019_intl: LibDefinition; +//# sourceMappingURL=es2019.intl.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts.map new file mode 100644 index 0000000..7d86d68 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,WAAW,EAAE,aAGzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js new file mode 100644 index 0000000..070ce1f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019_intl = void 0; +const base_config_1 = require("./base-config"); +exports.es2019_intl = { + libs: [], + variables: [['Intl', base_config_1.TYPE_VALUE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js new file mode 100644 index 0000000..c7ab390 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019 = void 0; +const es2018_1 = require("./es2018"); +const es2019_array_1 = require("./es2019.array"); +const es2019_intl_1 = require("./es2019.intl"); +const es2019_object_1 = require("./es2019.object"); +const es2019_string_1 = require("./es2019.string"); +const es2019_symbol_1 = require("./es2019.symbol"); +exports.es2019 = { + libs: [ + es2018_1.es2018, + es2019_array_1.es2019_array, + es2019_object_1.es2019_object, + es2019_string_1.es2019_string, + es2019_symbol_1.es2019_symbol, + es2019_intl_1.es2019_intl, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts new file mode 100644 index 0000000..f67ba5d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2019_object: LibDefinition; +//# sourceMappingURL=es2019.object.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts.map new file mode 100644 index 0000000..320ca6d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.object.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.object.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js new file mode 100644 index 0000000..6f3ce75 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js @@ -0,0 +1,13 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019_object = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +exports.es2019_object = { + libs: [es2015_iterable_1.es2015_iterable], + variables: [['ObjectConstructor', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts new file mode 100644 index 0000000..34e2be1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2019_string: LibDefinition; +//# sourceMappingURL=es2019.string.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts.map new file mode 100644 index 0000000..15cffed --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.string.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.string.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js new file mode 100644 index 0000000..5050ab3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019_string = void 0; +const base_config_1 = require("./base-config"); +exports.es2019_string = { + libs: [], + variables: [['String', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts new file mode 100644 index 0000000..da59ebe --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2019_symbol: LibDefinition; +//# sourceMappingURL=es2019.symbol.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts.map new file mode 100644 index 0000000..9317551 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.symbol.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.symbol.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js new file mode 100644 index 0000000..1fec027 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019_symbol = void 0; +const base_config_1 = require("./base-config"); +exports.es2019_symbol = { + libs: [], + variables: [['Symbol', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts new file mode 100644 index 0000000..fcd7d9e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2020_bigint: LibDefinition; +//# sourceMappingURL=es2020.bigint.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts.map new file mode 100644 index 0000000..c721b66 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.bigint.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.bigint.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,aAAa,EAAE,aAa3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js new file mode 100644 index 0000000..e520568 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js @@ -0,0 +1,23 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_bigint = void 0; +const base_config_1 = require("./base-config"); +const es2020_intl_1 = require("./es2020.intl"); +exports.es2020_bigint = { + libs: [es2020_intl_1.es2020_intl], + variables: [ + ['BigIntToLocaleStringOptions', base_config_1.TYPE], + ['BigInt', base_config_1.TYPE_VALUE], + ['BigIntConstructor', base_config_1.TYPE], + ['BigInt64Array', base_config_1.TYPE_VALUE], + ['BigInt64ArrayConstructor', base_config_1.TYPE], + ['BigUint64Array', base_config_1.TYPE_VALUE], + ['BigUint64ArrayConstructor', base_config_1.TYPE], + ['DataView', base_config_1.TYPE], + ['Intl', base_config_1.TYPE_VALUE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts new file mode 100644 index 0000000..b7bfeb4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2020: LibDefinition; +//# sourceMappingURL=es2020.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts.map new file mode 100644 index 0000000..556b369 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAYjD,eAAO,MAAM,MAAM,EAAE,aAapB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts new file mode 100644 index 0000000..d5c4f9f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2020_date: LibDefinition; +//# sourceMappingURL=es2020.date.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts.map new file mode 100644 index 0000000..55fe7e0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.date.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.date.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,WAAW,EAAE,aAGzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js new file mode 100644 index 0000000..78ca302 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js @@ -0,0 +1,13 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_date = void 0; +const base_config_1 = require("./base-config"); +const es2020_intl_1 = require("./es2020.intl"); +exports.es2020_date = { + libs: [es2020_intl_1.es2020_intl], + variables: [['Date', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts new file mode 100644 index 0000000..674993b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2020_full: LibDefinition; +//# sourceMappingURL=es2020.full.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts.map new file mode 100644 index 0000000..1db474d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,eAAO,MAAM,WAAW,EAAE,aAUzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js new file mode 100644 index 0000000..9ed8fdd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_full = void 0; +const dom_1 = require("./dom"); +const dom_asynciterable_1 = require("./dom.asynciterable"); +const dom_iterable_1 = require("./dom.iterable"); +const es2020_1 = require("./es2020"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2020_full = { + libs: [ + es2020_1.es2020, + dom_1.dom, + webworker_importscripts_1.webworker_importscripts, + scripthost_1.scripthost, + dom_iterable_1.dom_iterable, + dom_asynciterable_1.dom_asynciterable, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts new file mode 100644 index 0000000..f69d8a9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2020_intl: LibDefinition; +//# sourceMappingURL=es2020.intl.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts.map new file mode 100644 index 0000000..b3fb5b9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,WAAW,EAAE,aAGzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js new file mode 100644 index 0000000..930f5cb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js @@ -0,0 +1,13 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_intl = void 0; +const base_config_1 = require("./base-config"); +const es2018_intl_1 = require("./es2018.intl"); +exports.es2020_intl = { + libs: [es2018_intl_1.es2018_intl], + variables: [['Intl', base_config_1.TYPE_VALUE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js new file mode 100644 index 0000000..76fb4dc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js @@ -0,0 +1,30 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020 = void 0; +const es2019_1 = require("./es2019"); +const es2020_bigint_1 = require("./es2020.bigint"); +const es2020_date_1 = require("./es2020.date"); +const es2020_intl_1 = require("./es2020.intl"); +const es2020_number_1 = require("./es2020.number"); +const es2020_promise_1 = require("./es2020.promise"); +const es2020_sharedmemory_1 = require("./es2020.sharedmemory"); +const es2020_string_1 = require("./es2020.string"); +const es2020_symbol_wellknown_1 = require("./es2020.symbol.wellknown"); +exports.es2020 = { + libs: [ + es2019_1.es2019, + es2020_bigint_1.es2020_bigint, + es2020_date_1.es2020_date, + es2020_number_1.es2020_number, + es2020_promise_1.es2020_promise, + es2020_sharedmemory_1.es2020_sharedmemory, + es2020_string_1.es2020_string, + es2020_symbol_wellknown_1.es2020_symbol_wellknown, + es2020_intl_1.es2020_intl, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts new file mode 100644 index 0000000..bd0c8f5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2020_number: LibDefinition; +//# sourceMappingURL=es2020.number.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts.map new file mode 100644 index 0000000..20969e9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.number.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.number.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js new file mode 100644 index 0000000..ec575c6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js @@ -0,0 +1,13 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_number = void 0; +const base_config_1 = require("./base-config"); +const es2020_intl_1 = require("./es2020.intl"); +exports.es2020_number = { + libs: [es2020_intl_1.es2020_intl], + variables: [['Number', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts new file mode 100644 index 0000000..8934777 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2020_promise: LibDefinition; +//# sourceMappingURL=es2020.promise.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts.map new file mode 100644 index 0000000..e3b21dd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.promise.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.promise.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,cAAc,EAAE,aAQ5B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js new file mode 100644 index 0000000..d3262cd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js @@ -0,0 +1,17 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_promise = void 0; +const base_config_1 = require("./base-config"); +exports.es2020_promise = { + libs: [], + variables: [ + ['PromiseFulfilledResult', base_config_1.TYPE], + ['PromiseRejectedResult', base_config_1.TYPE], + ['PromiseSettledResult', base_config_1.TYPE], + ['PromiseConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts new file mode 100644 index 0000000..0c633fc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2020_sharedmemory: LibDefinition; +//# sourceMappingURL=es2020.sharedmemory.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts.map new file mode 100644 index 0000000..98701b5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.sharedmemory.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.sharedmemory.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,mBAAmB,EAAE,aAGjC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js new file mode 100644 index 0000000..d164371 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js @@ -0,0 +1,13 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_sharedmemory = void 0; +const base_config_1 = require("./base-config"); +const es2020_bigint_1 = require("./es2020.bigint"); +exports.es2020_sharedmemory = { + libs: [es2020_bigint_1.es2020_bigint], + variables: [['Atomics', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts new file mode 100644 index 0000000..48debbc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2020_string: LibDefinition; +//# sourceMappingURL=es2020.string.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts.map new file mode 100644 index 0000000..eba4b64 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.string.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.string.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAOjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js new file mode 100644 index 0000000..5dd8773 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js @@ -0,0 +1,15 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_string = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2020_intl_1 = require("./es2020.intl"); +const es2020_symbol_wellknown_1 = require("./es2020.symbol.wellknown"); +exports.es2020_string = { + libs: [es2015_iterable_1.es2015_iterable, es2020_intl_1.es2020_intl, es2020_symbol_wellknown_1.es2020_symbol_wellknown], + variables: [['String', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts new file mode 100644 index 0000000..c96e4cd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2020_symbol_wellknown: LibDefinition; +//# sourceMappingURL=es2020.symbol.wellknown.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts.map new file mode 100644 index 0000000..cdf2303 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.symbol.wellknown.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.symbol.wellknown.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,eAAO,MAAM,uBAAuB,EAAE,aAOrC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js new file mode 100644 index 0000000..5f2c349 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js @@ -0,0 +1,18 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_symbol_wellknown = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.es2020_symbol_wellknown = { + libs: [es2015_iterable_1.es2015_iterable, es2015_symbol_1.es2015_symbol], + variables: [ + ['SymbolConstructor', base_config_1.TYPE], + ['RegExpStringIterator', base_config_1.TYPE], + ['RegExp', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts new file mode 100644 index 0000000..799547f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2021: LibDefinition; +//# sourceMappingURL=es2021.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts.map new file mode 100644 index 0000000..2fc69d3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.d.ts","sourceRoot":"","sources":["../../src/lib/es2021.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD,eAAO,MAAM,MAAM,EAAE,aAGpB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts new file mode 100644 index 0000000..1d8d759 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2021_full: LibDefinition; +//# sourceMappingURL=es2021.full.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts.map new file mode 100644 index 0000000..c8eb55e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2021.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,eAAO,MAAM,WAAW,EAAE,aAUzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js new file mode 100644 index 0000000..68211ac --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2021_full = void 0; +const dom_1 = require("./dom"); +const dom_asynciterable_1 = require("./dom.asynciterable"); +const dom_iterable_1 = require("./dom.iterable"); +const es2021_1 = require("./es2021"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2021_full = { + libs: [ + es2021_1.es2021, + dom_1.dom, + webworker_importscripts_1.webworker_importscripts, + scripthost_1.scripthost, + dom_iterable_1.dom_iterable, + dom_asynciterable_1.dom_asynciterable, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts new file mode 100644 index 0000000..fb2303c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2021_intl: LibDefinition; +//# sourceMappingURL=es2021.intl.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts.map new file mode 100644 index 0000000..e166845 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2021.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,WAAW,EAAE,aAGzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js new file mode 100644 index 0000000..3238df5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2021_intl = void 0; +const base_config_1 = require("./base-config"); +exports.es2021_intl = { + libs: [], + variables: [['Intl', base_config_1.TYPE_VALUE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js new file mode 100644 index 0000000..af52656 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js @@ -0,0 +1,16 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2021 = void 0; +const es2020_1 = require("./es2020"); +const es2021_intl_1 = require("./es2021.intl"); +const es2021_promise_1 = require("./es2021.promise"); +const es2021_string_1 = require("./es2021.string"); +const es2021_weakref_1 = require("./es2021.weakref"); +exports.es2021 = { + libs: [es2020_1.es2020, es2021_promise_1.es2021_promise, es2021_string_1.es2021_string, es2021_weakref_1.es2021_weakref, es2021_intl_1.es2021_intl], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts new file mode 100644 index 0000000..e79a33a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2021_promise: LibDefinition; +//# sourceMappingURL=es2021.promise.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts.map new file mode 100644 index 0000000..07caf6c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.promise.d.ts","sourceRoot":"","sources":["../../src/lib/es2021.promise.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,cAAc,EAAE,aAO5B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js new file mode 100644 index 0000000..962bf64 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js @@ -0,0 +1,16 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2021_promise = void 0; +const base_config_1 = require("./base-config"); +exports.es2021_promise = { + libs: [], + variables: [ + ['AggregateError', base_config_1.TYPE_VALUE], + ['AggregateErrorConstructor', base_config_1.TYPE], + ['PromiseConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts new file mode 100644 index 0000000..27dbf82 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2021_string: LibDefinition; +//# sourceMappingURL=es2021.string.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts.map new file mode 100644 index 0000000..1850741 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.string.d.ts","sourceRoot":"","sources":["../../src/lib/es2021.string.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js new file mode 100644 index 0000000..049f475 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2021_string = void 0; +const base_config_1 = require("./base-config"); +exports.es2021_string = { + libs: [], + variables: [['String', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts new file mode 100644 index 0000000..4fd3fdc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2021_weakref: LibDefinition; +//# sourceMappingURL=es2021.weakref.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts.map new file mode 100644 index 0000000..171dc6d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.weakref.d.ts","sourceRoot":"","sources":["../../src/lib/es2021.weakref.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,cAAc,EAAE,aAQ5B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js new file mode 100644 index 0000000..2359f8f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js @@ -0,0 +1,18 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2021_weakref = void 0; +const base_config_1 = require("./base-config"); +const es2015_symbol_wellknown_1 = require("./es2015.symbol.wellknown"); +exports.es2021_weakref = { + libs: [es2015_symbol_wellknown_1.es2015_symbol_wellknown], + variables: [ + ['WeakRef', base_config_1.TYPE_VALUE], + ['WeakRefConstructor', base_config_1.TYPE], + ['FinalizationRegistry', base_config_1.TYPE_VALUE], + ['FinalizationRegistryConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts new file mode 100644 index 0000000..dcf8a65 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2022_array: LibDefinition; +//# sourceMappingURL=es2022.array.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts.map new file mode 100644 index 0000000..874d8f6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.array.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.array.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,YAAY,EAAE,aAiB1B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js new file mode 100644 index 0000000..c26025e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js @@ -0,0 +1,26 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_array = void 0; +const base_config_1 = require("./base-config"); +exports.es2022_array = { + libs: [], + variables: [ + ['Array', base_config_1.TYPE], + ['ReadonlyArray', base_config_1.TYPE], + ['Int8Array', base_config_1.TYPE], + ['Uint8Array', base_config_1.TYPE], + ['Uint8ClampedArray', base_config_1.TYPE], + ['Int16Array', base_config_1.TYPE], + ['Uint16Array', base_config_1.TYPE], + ['Int32Array', base_config_1.TYPE], + ['Uint32Array', base_config_1.TYPE], + ['Float32Array', base_config_1.TYPE], + ['Float64Array', base_config_1.TYPE], + ['BigInt64Array', base_config_1.TYPE], + ['BigUint64Array', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts new file mode 100644 index 0000000..7f71f44 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2022: LibDefinition; +//# sourceMappingURL=es2022.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts.map new file mode 100644 index 0000000..7063bf0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAUjD,eAAO,MAAM,MAAM,EAAE,aAWpB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts new file mode 100644 index 0000000..db04d67 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2022_error: LibDefinition; +//# sourceMappingURL=es2022.error.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts.map new file mode 100644 index 0000000..58cf82b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.error.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.error.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,YAAY,EAAE,aAc1B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js new file mode 100644 index 0000000..45573e2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_error = void 0; +const base_config_1 = require("./base-config"); +const es2021_promise_1 = require("./es2021.promise"); +exports.es2022_error = { + libs: [es2021_promise_1.es2021_promise], + variables: [ + ['ErrorOptions', base_config_1.TYPE], + ['Error', base_config_1.TYPE], + ['ErrorConstructor', base_config_1.TYPE], + ['EvalErrorConstructor', base_config_1.TYPE], + ['RangeErrorConstructor', base_config_1.TYPE], + ['ReferenceErrorConstructor', base_config_1.TYPE], + ['SyntaxErrorConstructor', base_config_1.TYPE], + ['TypeErrorConstructor', base_config_1.TYPE], + ['URIErrorConstructor', base_config_1.TYPE], + ['AggregateErrorConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts new file mode 100644 index 0000000..b1cc8a5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2022_full: LibDefinition; +//# sourceMappingURL=es2022.full.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts.map new file mode 100644 index 0000000..efedf76 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,eAAO,MAAM,WAAW,EAAE,aAUzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js new file mode 100644 index 0000000..8a91d48 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_full = void 0; +const dom_1 = require("./dom"); +const dom_asynciterable_1 = require("./dom.asynciterable"); +const dom_iterable_1 = require("./dom.iterable"); +const es2022_1 = require("./es2022"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2022_full = { + libs: [ + es2022_1.es2022, + dom_1.dom, + webworker_importscripts_1.webworker_importscripts, + scripthost_1.scripthost, + dom_iterable_1.dom_iterable, + dom_asynciterable_1.dom_asynciterable, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts new file mode 100644 index 0000000..420a66e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2022_intl: LibDefinition; +//# sourceMappingURL=es2022.intl.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts.map new file mode 100644 index 0000000..7fcf0ac --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,WAAW,EAAE,aAGzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js new file mode 100644 index 0000000..7fe4a9f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_intl = void 0; +const base_config_1 = require("./base-config"); +exports.es2022_intl = { + libs: [], + variables: [['Intl', base_config_1.TYPE_VALUE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js new file mode 100644 index 0000000..c6b0af9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js @@ -0,0 +1,26 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022 = void 0; +const es2021_1 = require("./es2021"); +const es2022_array_1 = require("./es2022.array"); +const es2022_error_1 = require("./es2022.error"); +const es2022_intl_1 = require("./es2022.intl"); +const es2022_object_1 = require("./es2022.object"); +const es2022_regexp_1 = require("./es2022.regexp"); +const es2022_string_1 = require("./es2022.string"); +exports.es2022 = { + libs: [ + es2021_1.es2021, + es2022_array_1.es2022_array, + es2022_error_1.es2022_error, + es2022_intl_1.es2022_intl, + es2022_object_1.es2022_object, + es2022_regexp_1.es2022_regexp, + es2022_string_1.es2022_string, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts new file mode 100644 index 0000000..cc00ffe --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2022_object: LibDefinition; +//# sourceMappingURL=es2022.object.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts.map new file mode 100644 index 0000000..6f622c1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.object.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.object.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js new file mode 100644 index 0000000..e5f2881 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_object = void 0; +const base_config_1 = require("./base-config"); +exports.es2022_object = { + libs: [], + variables: [['ObjectConstructor', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts new file mode 100644 index 0000000..b8a01c4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2022_regexp: LibDefinition; +//# sourceMappingURL=es2022.regexp.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts.map new file mode 100644 index 0000000..0dd42d2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.regexp.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.regexp.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAQ3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js new file mode 100644 index 0000000..c8e9209 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js @@ -0,0 +1,17 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_regexp = void 0; +const base_config_1 = require("./base-config"); +exports.es2022_regexp = { + libs: [], + variables: [ + ['RegExpMatchArray', base_config_1.TYPE], + ['RegExpExecArray', base_config_1.TYPE], + ['RegExpIndicesArray', base_config_1.TYPE], + ['RegExp', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts new file mode 100644 index 0000000..370f9cb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2022_string: LibDefinition; +//# sourceMappingURL=es2022.string.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts.map new file mode 100644 index 0000000..426c547 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.string.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.string.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js new file mode 100644 index 0000000..155de41 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_string = void 0; +const base_config_1 = require("./base-config"); +exports.es2022_string = { + libs: [], + variables: [['String', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts new file mode 100644 index 0000000..75da629 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2023_array: LibDefinition; +//# sourceMappingURL=es2023.array.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts.map new file mode 100644 index 0000000..183edef --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2023.array.d.ts","sourceRoot":"","sources":["../../src/lib/es2023.array.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,YAAY,EAAE,aAiB1B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js new file mode 100644 index 0000000..c188200 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js @@ -0,0 +1,26 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2023_array = void 0; +const base_config_1 = require("./base-config"); +exports.es2023_array = { + libs: [], + variables: [ + ['Array', base_config_1.TYPE], + ['ReadonlyArray', base_config_1.TYPE], + ['Int8Array', base_config_1.TYPE], + ['Uint8Array', base_config_1.TYPE], + ['Uint8ClampedArray', base_config_1.TYPE], + ['Int16Array', base_config_1.TYPE], + ['Uint16Array', base_config_1.TYPE], + ['Int32Array', base_config_1.TYPE], + ['Uint32Array', base_config_1.TYPE], + ['Float32Array', base_config_1.TYPE], + ['Float64Array', base_config_1.TYPE], + ['BigInt64Array', base_config_1.TYPE], + ['BigUint64Array', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts new file mode 100644 index 0000000..4d6a79b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2023_collection: LibDefinition; +//# sourceMappingURL=es2023.collection.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts.map new file mode 100644 index 0000000..20c5c44 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2023.collection.d.ts","sourceRoot":"","sources":["../../src/lib/es2023.collection.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,iBAAiB,EAAE,aAG/B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.js new file mode 100644 index 0000000..a504625 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2023_collection = void 0; +const base_config_1 = require("./base-config"); +exports.es2023_collection = { + libs: [], + variables: [['WeakKeyTypes', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts new file mode 100644 index 0000000..37d0a6e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2023: LibDefinition; +//# sourceMappingURL=es2023.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts.map new file mode 100644 index 0000000..f9d6d24 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2023.d.ts","sourceRoot":"","sources":["../../src/lib/es2023.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAOjD,eAAO,MAAM,MAAM,EAAE,aAGpB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts new file mode 100644 index 0000000..f768938 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2023_full: LibDefinition; +//# sourceMappingURL=es2023.full.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts.map new file mode 100644 index 0000000..60758df --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2023.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2023.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,eAAO,MAAM,WAAW,EAAE,aAUzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js new file mode 100644 index 0000000..d3817e8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2023_full = void 0; +const dom_1 = require("./dom"); +const dom_asynciterable_1 = require("./dom.asynciterable"); +const dom_iterable_1 = require("./dom.iterable"); +const es2023_1 = require("./es2023"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2023_full = { + libs: [ + es2023_1.es2023, + dom_1.dom, + webworker_importscripts_1.webworker_importscripts, + scripthost_1.scripthost, + dom_iterable_1.dom_iterable, + dom_asynciterable_1.dom_asynciterable, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.intl.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.intl.d.ts new file mode 100644 index 0000000..662fed6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.intl.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2023_intl: LibDefinition; +//# sourceMappingURL=es2023.intl.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.intl.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.intl.d.ts.map new file mode 100644 index 0000000..2b1fd02 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2023.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2023.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,WAAW,EAAE,aAGzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.intl.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.intl.js new file mode 100644 index 0000000..7c5a6a8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2023_intl = void 0; +const base_config_1 = require("./base-config"); +exports.es2023_intl = { + libs: [], + variables: [['Intl', base_config_1.TYPE_VALUE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js new file mode 100644 index 0000000..55b6650 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js @@ -0,0 +1,15 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2023 = void 0; +const es2022_1 = require("./es2022"); +const es2023_array_1 = require("./es2023.array"); +const es2023_collection_1 = require("./es2023.collection"); +const es2023_intl_1 = require("./es2023.intl"); +exports.es2023 = { + libs: [es2022_1.es2022, es2023_array_1.es2023_array, es2023_collection_1.es2023_collection, es2023_intl_1.es2023_intl], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.arraybuffer.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.arraybuffer.d.ts new file mode 100644 index 0000000..ede642d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.arraybuffer.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2024_arraybuffer: LibDefinition; +//# sourceMappingURL=es2024.arraybuffer.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.arraybuffer.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.arraybuffer.d.ts.map new file mode 100644 index 0000000..6589781 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.arraybuffer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2024.arraybuffer.d.ts","sourceRoot":"","sources":["../../src/lib/es2024.arraybuffer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,kBAAkB,EAAE,aAMhC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.arraybuffer.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.arraybuffer.js new file mode 100644 index 0000000..851fe30 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.arraybuffer.js @@ -0,0 +1,15 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2024_arraybuffer = void 0; +const base_config_1 = require("./base-config"); +exports.es2024_arraybuffer = { + libs: [], + variables: [ + ['ArrayBuffer', base_config_1.TYPE], + ['ArrayBufferConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.collection.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.collection.d.ts new file mode 100644 index 0000000..5e4b9e1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.collection.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2024_collection: LibDefinition; +//# sourceMappingURL=es2024.collection.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.collection.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.collection.d.ts.map new file mode 100644 index 0000000..d03e25d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.collection.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2024.collection.d.ts","sourceRoot":"","sources":["../../src/lib/es2024.collection.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,iBAAiB,EAAE,aAG/B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.collection.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.collection.js new file mode 100644 index 0000000..cdea04e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.collection.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2024_collection = void 0; +const base_config_1 = require("./base-config"); +exports.es2024_collection = { + libs: [], + variables: [['MapConstructor', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.d.ts new file mode 100644 index 0000000..8fb3ec4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2024: LibDefinition; +//# sourceMappingURL=es2024.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.d.ts.map new file mode 100644 index 0000000..1653625 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2024.d.ts","sourceRoot":"","sources":["../../src/lib/es2024.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAWjD,eAAO,MAAM,MAAM,EAAE,aAYpB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.full.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.full.d.ts new file mode 100644 index 0000000..0889576 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.full.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2024_full: LibDefinition; +//# sourceMappingURL=es2024.full.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.full.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.full.d.ts.map new file mode 100644 index 0000000..3b3c64b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2024.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2024.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,eAAO,MAAM,WAAW,EAAE,aAUzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.full.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.full.js new file mode 100644 index 0000000..1b67490 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.full.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2024_full = void 0; +const dom_1 = require("./dom"); +const dom_asynciterable_1 = require("./dom.asynciterable"); +const dom_iterable_1 = require("./dom.iterable"); +const es2024_1 = require("./es2024"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2024_full = { + libs: [ + es2024_1.es2024, + dom_1.dom, + webworker_importscripts_1.webworker_importscripts, + scripthost_1.scripthost, + dom_iterable_1.dom_iterable, + dom_asynciterable_1.dom_asynciterable, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.js new file mode 100644 index 0000000..18b199a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.js @@ -0,0 +1,28 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2024 = void 0; +const es2023_1 = require("./es2023"); +const es2024_arraybuffer_1 = require("./es2024.arraybuffer"); +const es2024_collection_1 = require("./es2024.collection"); +const es2024_object_1 = require("./es2024.object"); +const es2024_promise_1 = require("./es2024.promise"); +const es2024_regexp_1 = require("./es2024.regexp"); +const es2024_sharedmemory_1 = require("./es2024.sharedmemory"); +const es2024_string_1 = require("./es2024.string"); +exports.es2024 = { + libs: [ + es2023_1.es2023, + es2024_arraybuffer_1.es2024_arraybuffer, + es2024_collection_1.es2024_collection, + es2024_object_1.es2024_object, + es2024_promise_1.es2024_promise, + es2024_regexp_1.es2024_regexp, + es2024_sharedmemory_1.es2024_sharedmemory, + es2024_string_1.es2024_string, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.object.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.object.d.ts new file mode 100644 index 0000000..672c4e2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.object.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2024_object: LibDefinition; +//# sourceMappingURL=es2024.object.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.object.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.object.d.ts.map new file mode 100644 index 0000000..5c73868 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.object.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2024.object.d.ts","sourceRoot":"","sources":["../../src/lib/es2024.object.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.object.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.object.js new file mode 100644 index 0000000..2ab883c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.object.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2024_object = void 0; +const base_config_1 = require("./base-config"); +exports.es2024_object = { + libs: [], + variables: [['ObjectConstructor', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.promise.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.promise.d.ts new file mode 100644 index 0000000..cc97ba5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.promise.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2024_promise: LibDefinition; +//# sourceMappingURL=es2024.promise.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.promise.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.promise.d.ts.map new file mode 100644 index 0000000..853d47d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.promise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2024.promise.d.ts","sourceRoot":"","sources":["../../src/lib/es2024.promise.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,cAAc,EAAE,aAM5B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.promise.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.promise.js new file mode 100644 index 0000000..9fb32a9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.promise.js @@ -0,0 +1,15 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2024_promise = void 0; +const base_config_1 = require("./base-config"); +exports.es2024_promise = { + libs: [], + variables: [ + ['PromiseWithResolvers', base_config_1.TYPE], + ['PromiseConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.regexp.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.regexp.d.ts new file mode 100644 index 0000000..5860a54 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.regexp.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2024_regexp: LibDefinition; +//# sourceMappingURL=es2024.regexp.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.regexp.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.regexp.d.ts.map new file mode 100644 index 0000000..a44994c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.regexp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2024.regexp.d.ts","sourceRoot":"","sources":["../../src/lib/es2024.regexp.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.regexp.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.regexp.js new file mode 100644 index 0000000..96a3007 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.regexp.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2024_regexp = void 0; +const base_config_1 = require("./base-config"); +exports.es2024_regexp = { + libs: [], + variables: [['RegExp', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.sharedmemory.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.sharedmemory.d.ts new file mode 100644 index 0000000..aac225e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.sharedmemory.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2024_sharedmemory: LibDefinition; +//# sourceMappingURL=es2024.sharedmemory.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.sharedmemory.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.sharedmemory.d.ts.map new file mode 100644 index 0000000..fa18ff0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.sharedmemory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2024.sharedmemory.d.ts","sourceRoot":"","sources":["../../src/lib/es2024.sharedmemory.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,mBAAmB,EAAE,aAOjC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.sharedmemory.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.sharedmemory.js new file mode 100644 index 0000000..5826cfd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.sharedmemory.js @@ -0,0 +1,17 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2024_sharedmemory = void 0; +const base_config_1 = require("./base-config"); +const es2020_bigint_1 = require("./es2020.bigint"); +exports.es2024_sharedmemory = { + libs: [es2020_bigint_1.es2020_bigint], + variables: [ + ['Atomics', base_config_1.TYPE], + ['SharedArrayBuffer', base_config_1.TYPE], + ['SharedArrayBufferConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.string.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.string.d.ts new file mode 100644 index 0000000..fa79c5b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.string.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es2024_string: LibDefinition; +//# sourceMappingURL=es2024.string.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.string.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.string.d.ts.map new file mode 100644 index 0000000..11c413c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2024.string.d.ts","sourceRoot":"","sources":["../../src/lib/es2024.string.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.string.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.string.js new file mode 100644 index 0000000..b0b36cf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.string.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2024_string = void 0; +const base_config_1 = require("./base-config"); +exports.es2024_string = { + libs: [], + variables: [['String', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts new file mode 100644 index 0000000..09fc22e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es5: LibDefinition; +//# sourceMappingURL=es5.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts.map new file mode 100644 index 0000000..ec44208 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es5.d.ts","sourceRoot":"","sources":["../../src/lib/es5.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,eAAO,MAAM,GAAG,EAAE,aA2GjB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js new file mode 100644 index 0000000..511da74 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js @@ -0,0 +1,118 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es5 = void 0; +const base_config_1 = require("./base-config"); +const decorators_1 = require("./decorators"); +const decorators_legacy_1 = require("./decorators.legacy"); +exports.es5 = { + libs: [decorators_1.decorators, decorators_legacy_1.decorators_legacy], + variables: [ + ['Symbol', base_config_1.TYPE], + ['PropertyKey', base_config_1.TYPE], + ['PropertyDescriptor', base_config_1.TYPE], + ['PropertyDescriptorMap', base_config_1.TYPE], + ['Object', base_config_1.TYPE_VALUE], + ['ObjectConstructor', base_config_1.TYPE], + ['Function', base_config_1.TYPE_VALUE], + ['FunctionConstructor', base_config_1.TYPE], + ['ThisParameterType', base_config_1.TYPE], + ['OmitThisParameter', base_config_1.TYPE], + ['CallableFunction', base_config_1.TYPE], + ['NewableFunction', base_config_1.TYPE], + ['IArguments', base_config_1.TYPE], + ['String', base_config_1.TYPE_VALUE], + ['StringConstructor', base_config_1.TYPE], + ['Boolean', base_config_1.TYPE_VALUE], + ['BooleanConstructor', base_config_1.TYPE], + ['Number', base_config_1.TYPE_VALUE], + ['NumberConstructor', base_config_1.TYPE], + ['TemplateStringsArray', base_config_1.TYPE], + ['ImportMeta', base_config_1.TYPE], + ['ImportCallOptions', base_config_1.TYPE], + ['ImportAssertions', base_config_1.TYPE], + ['ImportAttributes', base_config_1.TYPE], + ['Math', base_config_1.TYPE_VALUE], + ['Date', base_config_1.TYPE_VALUE], + ['DateConstructor', base_config_1.TYPE], + ['RegExpMatchArray', base_config_1.TYPE], + ['RegExpExecArray', base_config_1.TYPE], + ['RegExp', base_config_1.TYPE_VALUE], + ['RegExpConstructor', base_config_1.TYPE], + ['Error', base_config_1.TYPE_VALUE], + ['ErrorConstructor', base_config_1.TYPE], + ['EvalError', base_config_1.TYPE_VALUE], + ['EvalErrorConstructor', base_config_1.TYPE], + ['RangeError', base_config_1.TYPE_VALUE], + ['RangeErrorConstructor', base_config_1.TYPE], + ['ReferenceError', base_config_1.TYPE_VALUE], + ['ReferenceErrorConstructor', base_config_1.TYPE], + ['SyntaxError', base_config_1.TYPE_VALUE], + ['SyntaxErrorConstructor', base_config_1.TYPE], + ['TypeError', base_config_1.TYPE_VALUE], + ['TypeErrorConstructor', base_config_1.TYPE], + ['URIError', base_config_1.TYPE_VALUE], + ['URIErrorConstructor', base_config_1.TYPE], + ['JSON', base_config_1.TYPE_VALUE], + ['ReadonlyArray', base_config_1.TYPE], + ['ConcatArray', base_config_1.TYPE], + ['Array', base_config_1.TYPE_VALUE], + ['ArrayConstructor', base_config_1.TYPE], + ['TypedPropertyDescriptor', base_config_1.TYPE], + ['PromiseConstructorLike', base_config_1.TYPE], + ['PromiseLike', base_config_1.TYPE], + ['Promise', base_config_1.TYPE], + ['Awaited', base_config_1.TYPE], + ['ArrayLike', base_config_1.TYPE], + ['Partial', base_config_1.TYPE], + ['Required', base_config_1.TYPE], + ['Readonly', base_config_1.TYPE], + ['Pick', base_config_1.TYPE], + ['Record', base_config_1.TYPE], + ['Exclude', base_config_1.TYPE], + ['Extract', base_config_1.TYPE], + ['Omit', base_config_1.TYPE], + ['NonNullable', base_config_1.TYPE], + ['Parameters', base_config_1.TYPE], + ['ConstructorParameters', base_config_1.TYPE], + ['ReturnType', base_config_1.TYPE], + ['InstanceType', base_config_1.TYPE], + ['Uppercase', base_config_1.TYPE], + ['Lowercase', base_config_1.TYPE], + ['Capitalize', base_config_1.TYPE], + ['Uncapitalize', base_config_1.TYPE], + ['NoInfer', base_config_1.TYPE], + ['ThisType', base_config_1.TYPE], + ['WeakKeyTypes', base_config_1.TYPE], + ['WeakKey', base_config_1.TYPE], + ['ArrayBuffer', base_config_1.TYPE_VALUE], + ['ArrayBufferTypes', base_config_1.TYPE], + ['ArrayBufferLike', base_config_1.TYPE], + ['ArrayBufferConstructor', base_config_1.TYPE], + ['ArrayBufferView', base_config_1.TYPE], + ['DataView', base_config_1.TYPE_VALUE], + ['DataViewConstructor', base_config_1.TYPE], + ['Int8Array', base_config_1.TYPE_VALUE], + ['Int8ArrayConstructor', base_config_1.TYPE], + ['Uint8Array', base_config_1.TYPE_VALUE], + ['Uint8ArrayConstructor', base_config_1.TYPE], + ['Uint8ClampedArray', base_config_1.TYPE_VALUE], + ['Uint8ClampedArrayConstructor', base_config_1.TYPE], + ['Int16Array', base_config_1.TYPE_VALUE], + ['Int16ArrayConstructor', base_config_1.TYPE], + ['Uint16Array', base_config_1.TYPE_VALUE], + ['Uint16ArrayConstructor', base_config_1.TYPE], + ['Int32Array', base_config_1.TYPE_VALUE], + ['Int32ArrayConstructor', base_config_1.TYPE], + ['Uint32Array', base_config_1.TYPE_VALUE], + ['Uint32ArrayConstructor', base_config_1.TYPE], + ['Float32Array', base_config_1.TYPE_VALUE], + ['Float32ArrayConstructor', base_config_1.TYPE], + ['Float64Array', base_config_1.TYPE_VALUE], + ['Float64ArrayConstructor', base_config_1.TYPE], + ['Intl', base_config_1.TYPE_VALUE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts new file mode 100644 index 0000000..623e0ff --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es6: LibDefinition; +//# sourceMappingURL=es6.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts.map new file mode 100644 index 0000000..283d3ac --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es6.d.ts","sourceRoot":"","sources":["../../src/lib/es6.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAajD,eAAO,MAAM,GAAG,EAAE,aAcjB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js new file mode 100644 index 0000000..6165da8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js @@ -0,0 +1,32 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es6 = void 0; +const es5_1 = require("./es5"); +const es2015_collection_1 = require("./es2015.collection"); +const es2015_core_1 = require("./es2015.core"); +const es2015_generator_1 = require("./es2015.generator"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_promise_1 = require("./es2015.promise"); +const es2015_proxy_1 = require("./es2015.proxy"); +const es2015_reflect_1 = require("./es2015.reflect"); +const es2015_symbol_1 = require("./es2015.symbol"); +const es2015_symbol_wellknown_1 = require("./es2015.symbol.wellknown"); +exports.es6 = { + libs: [ + es5_1.es5, + es2015_core_1.es2015_core, + es2015_collection_1.es2015_collection, + es2015_iterable_1.es2015_iterable, + es2015_generator_1.es2015_generator, + es2015_promise_1.es2015_promise, + es2015_proxy_1.es2015_proxy, + es2015_reflect_1.es2015_reflect, + es2015_symbol_1.es2015_symbol, + es2015_symbol_wellknown_1.es2015_symbol_wellknown, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts new file mode 100644 index 0000000..dbe8a20 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const es7: LibDefinition; +//# sourceMappingURL=es7.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts.map new file mode 100644 index 0000000..ebebae9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es7.d.ts","sourceRoot":"","sources":["../../src/lib/es7.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,eAAO,MAAM,GAAG,EAAE,aAGjB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js new file mode 100644 index 0000000..40b0fff --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js @@ -0,0 +1,14 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es7 = void 0; +const es2015_1 = require("./es2015"); +const es2016_array_include_1 = require("./es2016.array.include"); +const es2016_intl_1 = require("./es2016.intl"); +exports.es7 = { + libs: [es2015_1.es2015, es2016_array_include_1.es2016_array_include, es2016_intl_1.es2016_intl], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts new file mode 100644 index 0000000..5dc7d50 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_array: LibDefinition; +//# sourceMappingURL=esnext.array.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts.map new file mode 100644 index 0000000..0d55f89 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.array.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.array.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,YAAY,EAAE,aAG1B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js new file mode 100644 index 0000000..584fdf2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_array = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_array = { + libs: [], + variables: [['ArrayConstructor', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts new file mode 100644 index 0000000..6d448b0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_asynciterable: LibDefinition; +//# sourceMappingURL=esnext.asynciterable.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts.map new file mode 100644 index 0000000..a98c3db --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.asynciterable.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.asynciterable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,eAAO,MAAM,oBAAoB,EAAE,aASlC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js new file mode 100644 index 0000000..db39fb8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js @@ -0,0 +1,20 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_asynciterable = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.esnext_asynciterable = { + libs: [es2015_symbol_1.es2015_symbol, es2015_iterable_1.es2015_iterable], + variables: [ + ['SymbolConstructor', base_config_1.TYPE], + ['AsyncIterator', base_config_1.TYPE], + ['AsyncIterable', base_config_1.TYPE], + ['AsyncIterableIterator', base_config_1.TYPE], + ['AsyncIteratorObject', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts new file mode 100644 index 0000000..331339b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_bigint: LibDefinition; +//# sourceMappingURL=esnext.bigint.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts.map new file mode 100644 index 0000000..45ffaeb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.bigint.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.bigint.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,aAAa,EAAE,aAa3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js new file mode 100644 index 0000000..e60b199 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js @@ -0,0 +1,23 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_bigint = void 0; +const base_config_1 = require("./base-config"); +const es2020_intl_1 = require("./es2020.intl"); +exports.esnext_bigint = { + libs: [es2020_intl_1.es2020_intl], + variables: [ + ['BigIntToLocaleStringOptions', base_config_1.TYPE], + ['BigInt', base_config_1.TYPE_VALUE], + ['BigIntConstructor', base_config_1.TYPE], + ['BigInt64Array', base_config_1.TYPE_VALUE], + ['BigInt64ArrayConstructor', base_config_1.TYPE], + ['BigUint64Array', base_config_1.TYPE_VALUE], + ['BigUint64ArrayConstructor', base_config_1.TYPE], + ['DataView', base_config_1.TYPE], + ['Intl', base_config_1.TYPE_VALUE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts new file mode 100644 index 0000000..58af4bf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_collection: LibDefinition; +//# sourceMappingURL=esnext.collection.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts.map new file mode 100644 index 0000000..1c77fa6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.collection.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.collection.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,iBAAiB,EAAE,aAO/B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.js new file mode 100644 index 0000000..99b84e3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.js @@ -0,0 +1,17 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_collection = void 0; +const base_config_1 = require("./base-config"); +const es2024_collection_1 = require("./es2024.collection"); +exports.esnext_collection = { + libs: [es2024_collection_1.es2024_collection], + variables: [ + ['ReadonlySetLike', base_config_1.TYPE], + ['Set', base_config_1.TYPE], + ['ReadonlySet', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts new file mode 100644 index 0000000..6829dd6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext: LibDefinition; +//# sourceMappingURL=esnext.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts.map new file mode 100644 index 0000000..c3aea59 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAcjD,eAAO,MAAM,MAAM,EAAE,aAepB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts new file mode 100644 index 0000000..df4b020 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_decorators: LibDefinition; +//# sourceMappingURL=esnext.decorators.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts.map new file mode 100644 index 0000000..48c4969 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.decorators.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.decorators.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,eAAO,MAAM,iBAAiB,EAAE,aAM/B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.js new file mode 100644 index 0000000..259ee3b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.js @@ -0,0 +1,17 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_decorators = void 0; +const base_config_1 = require("./base-config"); +const decorators_1 = require("./decorators"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.esnext_decorators = { + libs: [es2015_symbol_1.es2015_symbol, decorators_1.decorators], + variables: [ + ['SymbolConstructor', base_config_1.TYPE], + ['Function', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts new file mode 100644 index 0000000..e25076d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_disposable: LibDefinition; +//# sourceMappingURL=esnext.disposable.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts.map new file mode 100644 index 0000000..67e6835 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.disposable.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.disposable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAOjD,eAAO,MAAM,iBAAiB,EAAE,aAe/B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.js new file mode 100644 index 0000000..3110b50 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.js @@ -0,0 +1,27 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_disposable = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_symbol_1 = require("./es2015.symbol"); +const es2018_asynciterable_1 = require("./es2018.asynciterable"); +exports.esnext_disposable = { + libs: [es2015_symbol_1.es2015_symbol, es2015_iterable_1.es2015_iterable, es2018_asynciterable_1.es2018_asynciterable], + variables: [ + ['SymbolConstructor', base_config_1.TYPE], + ['Disposable', base_config_1.TYPE], + ['AsyncDisposable', base_config_1.TYPE], + ['SuppressedError', base_config_1.TYPE_VALUE], + ['SuppressedErrorConstructor', base_config_1.TYPE], + ['DisposableStack', base_config_1.TYPE_VALUE], + ['DisposableStackConstructor', base_config_1.TYPE], + ['AsyncDisposableStack', base_config_1.TYPE_VALUE], + ['AsyncDisposableStackConstructor', base_config_1.TYPE], + ['IteratorObject', base_config_1.TYPE], + ['AsyncIteratorObject', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.error.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.error.d.ts new file mode 100644 index 0000000..3c8929a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.error.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_error: LibDefinition; +//# sourceMappingURL=esnext.error.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.error.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.error.d.ts.map new file mode 100644 index 0000000..36807a4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.error.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.error.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,YAAY,EAAE,aAG1B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.error.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.error.js new file mode 100644 index 0000000..200938d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.error.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_error = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_error = { + libs: [], + variables: [['ErrorConstructor', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.float16.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.float16.d.ts new file mode 100644 index 0000000..0e6000b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.float16.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_float16: LibDefinition; +//# sourceMappingURL=esnext.float16.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.float16.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.float16.d.ts.map new file mode 100644 index 0000000..e8f5c6f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.float16.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.float16.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.float16.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,eAAO,MAAM,cAAc,EAAE,aAQ5B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.float16.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.float16.js new file mode 100644 index 0000000..ca6c720 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.float16.js @@ -0,0 +1,19 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_float16 = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.esnext_float16 = { + libs: [es2015_symbol_1.es2015_symbol, es2015_iterable_1.es2015_iterable], + variables: [ + ['Float16Array', base_config_1.TYPE_VALUE], + ['Float16ArrayConstructor', base_config_1.TYPE], + ['Math', base_config_1.TYPE], + ['DataView', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts new file mode 100644 index 0000000..8b538a1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_full: LibDefinition; +//# sourceMappingURL=esnext.full.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts.map new file mode 100644 index 0000000..bfe8521 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.full.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,eAAO,MAAM,WAAW,EAAE,aAUzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js new file mode 100644 index 0000000..a2f3bd0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_full = void 0; +const dom_1 = require("./dom"); +const dom_asynciterable_1 = require("./dom.asynciterable"); +const dom_iterable_1 = require("./dom.iterable"); +const esnext_1 = require("./esnext"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.esnext_full = { + libs: [ + esnext_1.esnext, + dom_1.dom, + webworker_importscripts_1.webworker_importscripts, + scripthost_1.scripthost, + dom_iterable_1.dom_iterable, + dom_asynciterable_1.dom_asynciterable, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts new file mode 100644 index 0000000..6d36336 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_intl: LibDefinition; +//# sourceMappingURL=esnext.intl.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts.map new file mode 100644 index 0000000..9601f7f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.intl.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,WAAW,EAAE,aAGzB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js new file mode 100644 index 0000000..ad06c9c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_intl = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_intl = { + libs: [], + variables: [['Intl', base_config_1.TYPE_VALUE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.iterator.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.iterator.d.ts new file mode 100644 index 0000000..93378ad --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.iterator.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_iterator: LibDefinition; +//# sourceMappingURL=esnext.iterator.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.iterator.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.iterator.d.ts.map new file mode 100644 index 0000000..3698cf5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.iterator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.iterator.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.iterator.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,eAAe,EAAE,aAM7B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.iterator.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.iterator.js new file mode 100644 index 0000000..6bbd390 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.iterator.js @@ -0,0 +1,16 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_iterator = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +exports.esnext_iterator = { + libs: [es2015_iterable_1.es2015_iterable], + variables: [ + ['Iterator', base_config_1.TYPE_VALUE], + ['IteratorObjectConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js new file mode 100644 index 0000000..0209750 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js @@ -0,0 +1,34 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext = void 0; +const es2024_1 = require("./es2024"); +const esnext_array_1 = require("./esnext.array"); +const esnext_collection_1 = require("./esnext.collection"); +const esnext_decorators_1 = require("./esnext.decorators"); +const esnext_disposable_1 = require("./esnext.disposable"); +const esnext_error_1 = require("./esnext.error"); +const esnext_float16_1 = require("./esnext.float16"); +const esnext_intl_1 = require("./esnext.intl"); +const esnext_iterator_1 = require("./esnext.iterator"); +const esnext_promise_1 = require("./esnext.promise"); +const esnext_sharedmemory_1 = require("./esnext.sharedmemory"); +exports.esnext = { + libs: [ + es2024_1.es2024, + esnext_intl_1.esnext_intl, + esnext_decorators_1.esnext_decorators, + esnext_disposable_1.esnext_disposable, + esnext_collection_1.esnext_collection, + esnext_array_1.esnext_array, + esnext_iterator_1.esnext_iterator, + esnext_promise_1.esnext_promise, + esnext_float16_1.esnext_float16, + esnext_error_1.esnext_error, + esnext_sharedmemory_1.esnext_sharedmemory, + ], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.object.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.object.d.ts new file mode 100644 index 0000000..6c59d3e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.object.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_object: LibDefinition; +//# sourceMappingURL=esnext.object.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.object.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.object.d.ts.map new file mode 100644 index 0000000..adab380 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.object.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.object.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.object.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.object.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.object.js new file mode 100644 index 0000000..4a95c1c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.object.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_object = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_object = { + libs: [], + variables: [['ObjectConstructor', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts new file mode 100644 index 0000000..59e23f8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_promise: LibDefinition; +//# sourceMappingURL=esnext.promise.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts.map new file mode 100644 index 0000000..8ec9a1c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.promise.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.promise.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,cAAc,EAAE,aAG5B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js new file mode 100644 index 0000000..0d702e0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_promise = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_promise = { + libs: [], + variables: [['PromiseConstructor', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.regexp.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.regexp.d.ts new file mode 100644 index 0000000..c3a9792 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.regexp.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_regexp: LibDefinition; +//# sourceMappingURL=esnext.regexp.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.regexp.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.regexp.d.ts.map new file mode 100644 index 0000000..19d0c96 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.regexp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.regexp.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.regexp.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.regexp.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.regexp.js new file mode 100644 index 0000000..ae28d6b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.regexp.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_regexp = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_regexp = { + libs: [], + variables: [['RegExp', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.sharedmemory.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.sharedmemory.d.ts new file mode 100644 index 0000000..133a5fb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.sharedmemory.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_sharedmemory: LibDefinition; +//# sourceMappingURL=esnext.sharedmemory.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.sharedmemory.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.sharedmemory.d.ts.map new file mode 100644 index 0000000..cdd6ba3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.sharedmemory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.sharedmemory.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.sharedmemory.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,mBAAmB,EAAE,aAGjC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.sharedmemory.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.sharedmemory.js new file mode 100644 index 0000000..0df6ff6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.sharedmemory.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_sharedmemory = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_sharedmemory = { + libs: [], + variables: [['Atomics', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts new file mode 100644 index 0000000..9febd55 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_string: LibDefinition; +//# sourceMappingURL=esnext.string.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts.map new file mode 100644 index 0000000..ff40bcc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.string.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.string.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js new file mode 100644 index 0000000..5df1e0c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_string = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_string = { + libs: [], + variables: [['String', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts new file mode 100644 index 0000000..07cd971 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_symbol: LibDefinition; +//# sourceMappingURL=esnext.symbol.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts.map new file mode 100644 index 0000000..a99512c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.symbol.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.symbol.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js new file mode 100644 index 0000000..9763ddd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_symbol = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_symbol = { + libs: [], + variables: [['Symbol', base_config_1.TYPE]], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts new file mode 100644 index 0000000..4ebd36e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const esnext_weakref: LibDefinition; +//# sourceMappingURL=esnext.weakref.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts.map new file mode 100644 index 0000000..9cfc5ae --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.weakref.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.weakref.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,eAAO,MAAM,cAAc,EAAE,aAQ5B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js new file mode 100644 index 0000000..e5e2abb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js @@ -0,0 +1,18 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_weakref = void 0; +const base_config_1 = require("./base-config"); +const es2015_symbol_wellknown_1 = require("./es2015.symbol.wellknown"); +exports.esnext_weakref = { + libs: [es2015_symbol_wellknown_1.es2015_symbol_wellknown], + variables: [ + ['WeakRef', base_config_1.TYPE_VALUE], + ['WeakRefConstructor', base_config_1.TYPE], + ['FinalizationRegistry', base_config_1.TYPE_VALUE], + ['FinalizationRegistryConstructor', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts new file mode 100644 index 0000000..dd0840d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const lib: ReadonlyMap; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts.map new file mode 100644 index 0000000..0bb477c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA+GjD,eAAO,MAAM,GAAG,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAgHjD,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js new file mode 100644 index 0000000..dbbc1d1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js @@ -0,0 +1,225 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lib = void 0; +const decorators_1 = require("./decorators"); +const decorators_legacy_1 = require("./decorators.legacy"); +const dom_1 = require("./dom"); +const dom_asynciterable_1 = require("./dom.asynciterable"); +const dom_iterable_1 = require("./dom.iterable"); +const es5_1 = require("./es5"); +const es6_1 = require("./es6"); +const es7_1 = require("./es7"); +const es2015_1 = require("./es2015"); +const es2015_collection_1 = require("./es2015.collection"); +const es2015_core_1 = require("./es2015.core"); +const es2015_generator_1 = require("./es2015.generator"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_promise_1 = require("./es2015.promise"); +const es2015_proxy_1 = require("./es2015.proxy"); +const es2015_reflect_1 = require("./es2015.reflect"); +const es2015_symbol_1 = require("./es2015.symbol"); +const es2015_symbol_wellknown_1 = require("./es2015.symbol.wellknown"); +const es2016_1 = require("./es2016"); +const es2016_array_include_1 = require("./es2016.array.include"); +const es2016_full_1 = require("./es2016.full"); +const es2016_intl_1 = require("./es2016.intl"); +const es2017_1 = require("./es2017"); +const es2017_arraybuffer_1 = require("./es2017.arraybuffer"); +const es2017_date_1 = require("./es2017.date"); +const es2017_full_1 = require("./es2017.full"); +const es2017_intl_1 = require("./es2017.intl"); +const es2017_object_1 = require("./es2017.object"); +const es2017_sharedmemory_1 = require("./es2017.sharedmemory"); +const es2017_string_1 = require("./es2017.string"); +const es2017_typedarrays_1 = require("./es2017.typedarrays"); +const es2018_1 = require("./es2018"); +const es2018_asyncgenerator_1 = require("./es2018.asyncgenerator"); +const es2018_asynciterable_1 = require("./es2018.asynciterable"); +const es2018_full_1 = require("./es2018.full"); +const es2018_intl_1 = require("./es2018.intl"); +const es2018_promise_1 = require("./es2018.promise"); +const es2018_regexp_1 = require("./es2018.regexp"); +const es2019_1 = require("./es2019"); +const es2019_array_1 = require("./es2019.array"); +const es2019_full_1 = require("./es2019.full"); +const es2019_intl_1 = require("./es2019.intl"); +const es2019_object_1 = require("./es2019.object"); +const es2019_string_1 = require("./es2019.string"); +const es2019_symbol_1 = require("./es2019.symbol"); +const es2020_1 = require("./es2020"); +const es2020_bigint_1 = require("./es2020.bigint"); +const es2020_date_1 = require("./es2020.date"); +const es2020_full_1 = require("./es2020.full"); +const es2020_intl_1 = require("./es2020.intl"); +const es2020_number_1 = require("./es2020.number"); +const es2020_promise_1 = require("./es2020.promise"); +const es2020_sharedmemory_1 = require("./es2020.sharedmemory"); +const es2020_string_1 = require("./es2020.string"); +const es2020_symbol_wellknown_1 = require("./es2020.symbol.wellknown"); +const es2021_1 = require("./es2021"); +const es2021_full_1 = require("./es2021.full"); +const es2021_intl_1 = require("./es2021.intl"); +const es2021_promise_1 = require("./es2021.promise"); +const es2021_string_1 = require("./es2021.string"); +const es2021_weakref_1 = require("./es2021.weakref"); +const es2022_1 = require("./es2022"); +const es2022_array_1 = require("./es2022.array"); +const es2022_error_1 = require("./es2022.error"); +const es2022_full_1 = require("./es2022.full"); +const es2022_intl_1 = require("./es2022.intl"); +const es2022_object_1 = require("./es2022.object"); +const es2022_regexp_1 = require("./es2022.regexp"); +const es2022_string_1 = require("./es2022.string"); +const es2023_1 = require("./es2023"); +const es2023_array_1 = require("./es2023.array"); +const es2023_collection_1 = require("./es2023.collection"); +const es2023_full_1 = require("./es2023.full"); +const es2023_intl_1 = require("./es2023.intl"); +const es2024_1 = require("./es2024"); +const es2024_arraybuffer_1 = require("./es2024.arraybuffer"); +const es2024_collection_1 = require("./es2024.collection"); +const es2024_full_1 = require("./es2024.full"); +const es2024_object_1 = require("./es2024.object"); +const es2024_promise_1 = require("./es2024.promise"); +const es2024_regexp_1 = require("./es2024.regexp"); +const es2024_sharedmemory_1 = require("./es2024.sharedmemory"); +const es2024_string_1 = require("./es2024.string"); +const esnext_1 = require("./esnext"); +const esnext_array_1 = require("./esnext.array"); +const esnext_asynciterable_1 = require("./esnext.asynciterable"); +const esnext_bigint_1 = require("./esnext.bigint"); +const esnext_collection_1 = require("./esnext.collection"); +const esnext_decorators_1 = require("./esnext.decorators"); +const esnext_disposable_1 = require("./esnext.disposable"); +const esnext_error_1 = require("./esnext.error"); +const esnext_float16_1 = require("./esnext.float16"); +const esnext_full_1 = require("./esnext.full"); +const esnext_intl_1 = require("./esnext.intl"); +const esnext_iterator_1 = require("./esnext.iterator"); +const esnext_object_1 = require("./esnext.object"); +const esnext_promise_1 = require("./esnext.promise"); +const esnext_regexp_1 = require("./esnext.regexp"); +const esnext_sharedmemory_1 = require("./esnext.sharedmemory"); +const esnext_string_1 = require("./esnext.string"); +const esnext_symbol_1 = require("./esnext.symbol"); +const esnext_weakref_1 = require("./esnext.weakref"); +const lib_1 = require("./lib"); +const scripthost_1 = require("./scripthost"); +const webworker_1 = require("./webworker"); +const webworker_asynciterable_1 = require("./webworker.asynciterable"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +const webworker_iterable_1 = require("./webworker.iterable"); +exports.lib = new Map([ + ['es5', es5_1.es5], + ['es6', es6_1.es6], + ['es2015', es2015_1.es2015], + ['es7', es7_1.es7], + ['es2016', es2016_1.es2016], + ['es2017', es2017_1.es2017], + ['es2018', es2018_1.es2018], + ['es2019', es2019_1.es2019], + ['es2020', es2020_1.es2020], + ['es2021', es2021_1.es2021], + ['es2022', es2022_1.es2022], + ['es2023', es2023_1.es2023], + ['es2024', es2024_1.es2024], + ['esnext', esnext_1.esnext], + ['dom', dom_1.dom], + ['dom.iterable', dom_iterable_1.dom_iterable], + ['dom.asynciterable', dom_asynciterable_1.dom_asynciterable], + ['webworker', webworker_1.webworker], + ['webworker.importscripts', webworker_importscripts_1.webworker_importscripts], + ['webworker.iterable', webworker_iterable_1.webworker_iterable], + ['webworker.asynciterable', webworker_asynciterable_1.webworker_asynciterable], + ['scripthost', scripthost_1.scripthost], + ['es2015.core', es2015_core_1.es2015_core], + ['es2015.collection', es2015_collection_1.es2015_collection], + ['es2015.generator', es2015_generator_1.es2015_generator], + ['es2015.iterable', es2015_iterable_1.es2015_iterable], + ['es2015.promise', es2015_promise_1.es2015_promise], + ['es2015.proxy', es2015_proxy_1.es2015_proxy], + ['es2015.reflect', es2015_reflect_1.es2015_reflect], + ['es2015.symbol', es2015_symbol_1.es2015_symbol], + ['es2015.symbol.wellknown', es2015_symbol_wellknown_1.es2015_symbol_wellknown], + ['es2016.array.include', es2016_array_include_1.es2016_array_include], + ['es2016.intl', es2016_intl_1.es2016_intl], + ['es2017.arraybuffer', es2017_arraybuffer_1.es2017_arraybuffer], + ['es2017.date', es2017_date_1.es2017_date], + ['es2017.object', es2017_object_1.es2017_object], + ['es2017.sharedmemory', es2017_sharedmemory_1.es2017_sharedmemory], + ['es2017.string', es2017_string_1.es2017_string], + ['es2017.intl', es2017_intl_1.es2017_intl], + ['es2017.typedarrays', es2017_typedarrays_1.es2017_typedarrays], + ['es2018.asyncgenerator', es2018_asyncgenerator_1.es2018_asyncgenerator], + ['es2018.asynciterable', es2018_asynciterable_1.es2018_asynciterable], + ['es2018.intl', es2018_intl_1.es2018_intl], + ['es2018.promise', es2018_promise_1.es2018_promise], + ['es2018.regexp', es2018_regexp_1.es2018_regexp], + ['es2019.array', es2019_array_1.es2019_array], + ['es2019.object', es2019_object_1.es2019_object], + ['es2019.string', es2019_string_1.es2019_string], + ['es2019.symbol', es2019_symbol_1.es2019_symbol], + ['es2019.intl', es2019_intl_1.es2019_intl], + ['es2020.bigint', es2020_bigint_1.es2020_bigint], + ['es2020.date', es2020_date_1.es2020_date], + ['es2020.promise', es2020_promise_1.es2020_promise], + ['es2020.sharedmemory', es2020_sharedmemory_1.es2020_sharedmemory], + ['es2020.string', es2020_string_1.es2020_string], + ['es2020.symbol.wellknown', es2020_symbol_wellknown_1.es2020_symbol_wellknown], + ['es2020.intl', es2020_intl_1.es2020_intl], + ['es2020.number', es2020_number_1.es2020_number], + ['es2021.promise', es2021_promise_1.es2021_promise], + ['es2021.string', es2021_string_1.es2021_string], + ['es2021.weakref', es2021_weakref_1.es2021_weakref], + ['es2021.intl', es2021_intl_1.es2021_intl], + ['es2022.array', es2022_array_1.es2022_array], + ['es2022.error', es2022_error_1.es2022_error], + ['es2022.intl', es2022_intl_1.es2022_intl], + ['es2022.object', es2022_object_1.es2022_object], + ['es2022.string', es2022_string_1.es2022_string], + ['es2022.regexp', es2022_regexp_1.es2022_regexp], + ['es2023.array', es2023_array_1.es2023_array], + ['es2023.collection', es2023_collection_1.es2023_collection], + ['es2023.intl', es2023_intl_1.es2023_intl], + ['es2024.arraybuffer', es2024_arraybuffer_1.es2024_arraybuffer], + ['es2024.collection', es2024_collection_1.es2024_collection], + ['es2024.object', es2024_object_1.es2024_object], + ['es2024.promise', es2024_promise_1.es2024_promise], + ['es2024.regexp', es2024_regexp_1.es2024_regexp], + ['es2024.sharedmemory', es2024_sharedmemory_1.es2024_sharedmemory], + ['es2024.string', es2024_string_1.es2024_string], + ['esnext.array', esnext_array_1.esnext_array], + ['esnext.collection', esnext_collection_1.esnext_collection], + ['esnext.symbol', esnext_symbol_1.esnext_symbol], + ['esnext.asynciterable', esnext_asynciterable_1.esnext_asynciterable], + ['esnext.intl', esnext_intl_1.esnext_intl], + ['esnext.disposable', esnext_disposable_1.esnext_disposable], + ['esnext.bigint', esnext_bigint_1.esnext_bigint], + ['esnext.string', esnext_string_1.esnext_string], + ['esnext.promise', esnext_promise_1.esnext_promise], + ['esnext.weakref', esnext_weakref_1.esnext_weakref], + ['esnext.decorators', esnext_decorators_1.esnext_decorators], + ['esnext.object', esnext_object_1.esnext_object], + ['esnext.regexp', esnext_regexp_1.esnext_regexp], + ['esnext.iterator', esnext_iterator_1.esnext_iterator], + ['esnext.float16', esnext_float16_1.esnext_float16], + ['esnext.error', esnext_error_1.esnext_error], + ['esnext.sharedmemory', esnext_sharedmemory_1.esnext_sharedmemory], + ['decorators', decorators_1.decorators], + ['decorators.legacy', decorators_legacy_1.decorators_legacy], + ['es2016.full', es2016_full_1.es2016_full], + ['es2017.full', es2017_full_1.es2017_full], + ['es2018.full', es2018_full_1.es2018_full], + ['es2019.full', es2019_full_1.es2019_full], + ['es2020.full', es2020_full_1.es2020_full], + ['es2021.full', es2021_full_1.es2021_full], + ['es2022.full', es2022_full_1.es2022_full], + ['es2023.full', es2023_full_1.es2023_full], + ['es2024.full', es2024_full_1.es2024_full], + ['esnext.full', esnext_full_1.esnext_full], + ['lib', lib_1.lib], +]); diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts new file mode 100644 index 0000000..9deedeb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const lib: LibDefinition; +//# sourceMappingURL=lib.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts.map new file mode 100644 index 0000000..a823218 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib/lib.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAOjD,eAAO,MAAM,GAAG,EAAE,aAGjB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js new file mode 100644 index 0000000..0630b1c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js @@ -0,0 +1,15 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lib = void 0; +const dom_1 = require("./dom"); +const es5_1 = require("./es5"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.lib = { + libs: [es5_1.es5, dom_1.dom, webworker_importscripts_1.webworker_importscripts, scripthost_1.scripthost], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts new file mode 100644 index 0000000..c998900 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const scripthost: LibDefinition; +//# sourceMappingURL=scripthost.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts.map new file mode 100644 index 0000000..d82aed3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scripthost.d.ts","sourceRoot":"","sources":["../../src/lib/scripthost.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,UAAU,EAAE,aAiBxB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js new file mode 100644 index 0000000..9c89601 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js @@ -0,0 +1,26 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scripthost = void 0; +const base_config_1 = require("./base-config"); +exports.scripthost = { + libs: [], + variables: [ + ['ActiveXObject', base_config_1.TYPE_VALUE], + ['ITextWriter', base_config_1.TYPE], + ['TextStreamBase', base_config_1.TYPE], + ['TextStreamWriter', base_config_1.TYPE], + ['TextStreamReader', base_config_1.TYPE], + ['SafeArray', base_config_1.TYPE_VALUE], + ['Enumerator', base_config_1.TYPE_VALUE], + ['EnumeratorConstructor', base_config_1.TYPE], + ['VBArray', base_config_1.TYPE_VALUE], + ['VBArrayConstructor', base_config_1.TYPE], + ['VarDate', base_config_1.TYPE_VALUE], + ['DateConstructor', base_config_1.TYPE], + ['Date', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.asynciterable.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.asynciterable.d.ts new file mode 100644 index 0000000..72a18fb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.asynciterable.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const webworker_asynciterable: LibDefinition; +//# sourceMappingURL=webworker.asynciterable.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.asynciterable.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.asynciterable.d.ts.map new file mode 100644 index 0000000..d4ed612 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.asynciterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"webworker.asynciterable.d.ts","sourceRoot":"","sources":["../../src/lib/webworker.asynciterable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,uBAAuB,EAAE,aAQrC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.asynciterable.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.asynciterable.js new file mode 100644 index 0000000..b929f27 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.asynciterable.js @@ -0,0 +1,17 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.webworker_asynciterable = void 0; +const base_config_1 = require("./base-config"); +exports.webworker_asynciterable = { + libs: [], + variables: [ + ['FileSystemDirectoryHandleAsyncIterator', base_config_1.TYPE], + ['FileSystemDirectoryHandle', base_config_1.TYPE], + ['ReadableStreamAsyncIterator', base_config_1.TYPE], + ['ReadableStream', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts new file mode 100644 index 0000000..18ec84a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const webworker: LibDefinition; +//# sourceMappingURL=webworker.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts.map new file mode 100644 index 0000000..6444ea7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"webworker.d.ts","sourceRoot":"","sources":["../../src/lib/webworker.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,SAAS,EAAE,aAioBvB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts new file mode 100644 index 0000000..b5cd03d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const webworker_importscripts: LibDefinition; +//# sourceMappingURL=webworker.importscripts.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts.map new file mode 100644 index 0000000..0d17941 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"webworker.importscripts.d.ts","sourceRoot":"","sources":["../../src/lib/webworker.importscripts.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,uBAAuB,EAAE,aAGrC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js new file mode 100644 index 0000000..3fb1dfa --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js @@ -0,0 +1,11 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.webworker_importscripts = void 0; +exports.webworker_importscripts = { + libs: [], + variables: [], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts new file mode 100644 index 0000000..ff78885 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts @@ -0,0 +1,3 @@ +import type { LibDefinition } from '../variable'; +export declare const webworker_iterable: LibDefinition; +//# sourceMappingURL=webworker.iterable.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts.map new file mode 100644 index 0000000..a63af08 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"webworker.iterable.d.ts","sourceRoot":"","sources":["../../src/lib/webworker.iterable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,kBAAkB,EAAE,aAiChC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js new file mode 100644 index 0000000..fd80647 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js @@ -0,0 +1,42 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.webworker_iterable = void 0; +const base_config_1 = require("./base-config"); +exports.webworker_iterable = { + libs: [], + variables: [ + ['CSSNumericArray', base_config_1.TYPE], + ['CSSTransformValue', base_config_1.TYPE], + ['CSSUnparsedValue', base_config_1.TYPE], + ['Cache', base_config_1.TYPE], + ['CanvasPath', base_config_1.TYPE], + ['CanvasPathDrawingStyles', base_config_1.TYPE], + ['CookieStoreManager', base_config_1.TYPE], + ['DOMStringList', base_config_1.TYPE], + ['FileList', base_config_1.TYPE], + ['FontFaceSet', base_config_1.TYPE], + ['FormDataIterator', base_config_1.TYPE], + ['FormData', base_config_1.TYPE], + ['HeadersIterator', base_config_1.TYPE], + ['Headers', base_config_1.TYPE], + ['IDBDatabase', base_config_1.TYPE], + ['IDBObjectStore', base_config_1.TYPE], + ['ImageTrackList', base_config_1.TYPE], + ['MessageEvent', base_config_1.TYPE], + ['StylePropertyMapReadOnlyIterator', base_config_1.TYPE], + ['StylePropertyMapReadOnly', base_config_1.TYPE], + ['SubtleCrypto', base_config_1.TYPE], + ['URLSearchParamsIterator', base_config_1.TYPE], + ['URLSearchParams', base_config_1.TYPE], + ['WEBGL_draw_buffers', base_config_1.TYPE], + ['WEBGL_multi_draw', base_config_1.TYPE], + ['WebGL2RenderingContextBase', base_config_1.TYPE], + ['WebGL2RenderingContextOverloads', base_config_1.TYPE], + ['WebGLRenderingContextBase', base_config_1.TYPE], + ['WebGLRenderingContextOverloads', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js new file mode 100644 index 0000000..0ff468e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js @@ -0,0 +1,650 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); +exports.webworker = void 0; +const base_config_1 = require("./base-config"); +exports.webworker = { + libs: [], + variables: [ + ['AddEventListenerOptions', base_config_1.TYPE], + ['AesCbcParams', base_config_1.TYPE], + ['AesCtrParams', base_config_1.TYPE], + ['AesDerivedKeyParams', base_config_1.TYPE], + ['AesGcmParams', base_config_1.TYPE], + ['AesKeyAlgorithm', base_config_1.TYPE], + ['AesKeyGenParams', base_config_1.TYPE], + ['Algorithm', base_config_1.TYPE], + ['AudioConfiguration', base_config_1.TYPE], + ['AudioDataCopyToOptions', base_config_1.TYPE], + ['AudioDataInit', base_config_1.TYPE], + ['AudioDecoderConfig', base_config_1.TYPE], + ['AudioDecoderInit', base_config_1.TYPE], + ['AudioDecoderSupport', base_config_1.TYPE], + ['AudioEncoderConfig', base_config_1.TYPE], + ['AudioEncoderInit', base_config_1.TYPE], + ['AudioEncoderSupport', base_config_1.TYPE], + ['AvcEncoderConfig', base_config_1.TYPE], + ['BlobPropertyBag', base_config_1.TYPE], + ['CSSMatrixComponentOptions', base_config_1.TYPE], + ['CSSNumericType', base_config_1.TYPE], + ['CacheQueryOptions', base_config_1.TYPE], + ['ClientQueryOptions', base_config_1.TYPE], + ['CloseEventInit', base_config_1.TYPE], + ['CookieInit', base_config_1.TYPE], + ['CookieListItem', base_config_1.TYPE], + ['CookieStoreDeleteOptions', base_config_1.TYPE], + ['CookieStoreGetOptions', base_config_1.TYPE], + ['CryptoKeyPair', base_config_1.TYPE], + ['CustomEventInit', base_config_1.TYPE], + ['DOMMatrix2DInit', base_config_1.TYPE], + ['DOMMatrixInit', base_config_1.TYPE], + ['DOMPointInit', base_config_1.TYPE], + ['DOMQuadInit', base_config_1.TYPE], + ['DOMRectInit', base_config_1.TYPE], + ['EcKeyGenParams', base_config_1.TYPE], + ['EcKeyImportParams', base_config_1.TYPE], + ['EcdhKeyDeriveParams', base_config_1.TYPE], + ['EcdsaParams', base_config_1.TYPE], + ['EncodedAudioChunkInit', base_config_1.TYPE], + ['EncodedAudioChunkMetadata', base_config_1.TYPE], + ['EncodedVideoChunkInit', base_config_1.TYPE], + ['EncodedVideoChunkMetadata', base_config_1.TYPE], + ['ErrorEventInit', base_config_1.TYPE], + ['EventInit', base_config_1.TYPE], + ['EventListenerOptions', base_config_1.TYPE], + ['EventSourceInit', base_config_1.TYPE], + ['ExtendableCookieChangeEventInit', base_config_1.TYPE], + ['ExtendableEventInit', base_config_1.TYPE], + ['ExtendableMessageEventInit', base_config_1.TYPE], + ['FetchEventInit', base_config_1.TYPE], + ['FilePropertyBag', base_config_1.TYPE], + ['FileSystemCreateWritableOptions', base_config_1.TYPE], + ['FileSystemGetDirectoryOptions', base_config_1.TYPE], + ['FileSystemGetFileOptions', base_config_1.TYPE], + ['FileSystemReadWriteOptions', base_config_1.TYPE], + ['FileSystemRemoveOptions', base_config_1.TYPE], + ['FontFaceDescriptors', base_config_1.TYPE], + ['FontFaceSetLoadEventInit', base_config_1.TYPE], + ['GetNotificationOptions', base_config_1.TYPE], + ['HkdfParams', base_config_1.TYPE], + ['HmacImportParams', base_config_1.TYPE], + ['HmacKeyGenParams', base_config_1.TYPE], + ['IDBDatabaseInfo', base_config_1.TYPE], + ['IDBIndexParameters', base_config_1.TYPE], + ['IDBObjectStoreParameters', base_config_1.TYPE], + ['IDBTransactionOptions', base_config_1.TYPE], + ['IDBVersionChangeEventInit', base_config_1.TYPE], + ['ImageBitmapOptions', base_config_1.TYPE], + ['ImageBitmapRenderingContextSettings', base_config_1.TYPE], + ['ImageDataSettings', base_config_1.TYPE], + ['ImageDecodeOptions', base_config_1.TYPE], + ['ImageDecodeResult', base_config_1.TYPE], + ['ImageDecoderInit', base_config_1.TYPE], + ['ImageEncodeOptions', base_config_1.TYPE], + ['JsonWebKey', base_config_1.TYPE], + ['KeyAlgorithm', base_config_1.TYPE], + ['KeySystemTrackConfiguration', base_config_1.TYPE], + ['LockInfo', base_config_1.TYPE], + ['LockManagerSnapshot', base_config_1.TYPE], + ['LockOptions', base_config_1.TYPE], + ['MediaCapabilitiesDecodingInfo', base_config_1.TYPE], + ['MediaCapabilitiesEncodingInfo', base_config_1.TYPE], + ['MediaCapabilitiesInfo', base_config_1.TYPE], + ['MediaCapabilitiesKeySystemConfiguration', base_config_1.TYPE], + ['MediaConfiguration', base_config_1.TYPE], + ['MediaDecodingConfiguration', base_config_1.TYPE], + ['MediaEncodingConfiguration', base_config_1.TYPE], + ['MediaStreamTrackProcessorInit', base_config_1.TYPE], + ['MessageEventInit', base_config_1.TYPE], + ['MultiCacheQueryOptions', base_config_1.TYPE], + ['NavigationPreloadState', base_config_1.TYPE], + ['NotificationEventInit', base_config_1.TYPE], + ['NotificationOptions', base_config_1.TYPE], + ['OpusEncoderConfig', base_config_1.TYPE], + ['Pbkdf2Params', base_config_1.TYPE], + ['PerformanceMarkOptions', base_config_1.TYPE], + ['PerformanceMeasureOptions', base_config_1.TYPE], + ['PerformanceObserverInit', base_config_1.TYPE], + ['PermissionDescriptor', base_config_1.TYPE], + ['PlaneLayout', base_config_1.TYPE], + ['ProgressEventInit', base_config_1.TYPE], + ['PromiseRejectionEventInit', base_config_1.TYPE], + ['PushEventInit', base_config_1.TYPE], + ['PushSubscriptionChangeEventInit', base_config_1.TYPE], + ['PushSubscriptionJSON', base_config_1.TYPE], + ['PushSubscriptionOptionsInit', base_config_1.TYPE], + ['QueuingStrategy', base_config_1.TYPE], + ['QueuingStrategyInit', base_config_1.TYPE], + ['RTCEncodedAudioFrameMetadata', base_config_1.TYPE], + ['RTCEncodedFrameMetadata', base_config_1.TYPE], + ['RTCEncodedVideoFrameMetadata', base_config_1.TYPE], + ['ReadableStreamGetReaderOptions', base_config_1.TYPE], + ['ReadableStreamIteratorOptions', base_config_1.TYPE], + ['ReadableStreamReadDoneResult', base_config_1.TYPE], + ['ReadableStreamReadValueResult', base_config_1.TYPE], + ['ReadableWritablePair', base_config_1.TYPE], + ['RegistrationOptions', base_config_1.TYPE], + ['ReportingObserverOptions', base_config_1.TYPE], + ['RequestInit', base_config_1.TYPE], + ['ResponseInit', base_config_1.TYPE], + ['RsaHashedImportParams', base_config_1.TYPE], + ['RsaHashedKeyGenParams', base_config_1.TYPE], + ['RsaKeyGenParams', base_config_1.TYPE], + ['RsaOaepParams', base_config_1.TYPE], + ['RsaOtherPrimesInfo', base_config_1.TYPE], + ['RsaPssParams', base_config_1.TYPE], + ['SecurityPolicyViolationEventInit', base_config_1.TYPE], + ['StorageEstimate', base_config_1.TYPE], + ['StreamPipeOptions', base_config_1.TYPE], + ['StructuredSerializeOptions', base_config_1.TYPE], + ['TextDecodeOptions', base_config_1.TYPE], + ['TextDecoderOptions', base_config_1.TYPE], + ['TextEncoderEncodeIntoResult', base_config_1.TYPE], + ['Transformer', base_config_1.TYPE], + ['UnderlyingByteSource', base_config_1.TYPE], + ['UnderlyingDefaultSource', base_config_1.TYPE], + ['UnderlyingSink', base_config_1.TYPE], + ['UnderlyingSource', base_config_1.TYPE], + ['VideoColorSpaceInit', base_config_1.TYPE], + ['VideoConfiguration', base_config_1.TYPE], + ['VideoDecoderConfig', base_config_1.TYPE], + ['VideoDecoderInit', base_config_1.TYPE], + ['VideoDecoderSupport', base_config_1.TYPE], + ['VideoEncoderConfig', base_config_1.TYPE], + ['VideoEncoderEncodeOptions', base_config_1.TYPE], + ['VideoEncoderEncodeOptionsForAvc', base_config_1.TYPE], + ['VideoEncoderInit', base_config_1.TYPE], + ['VideoEncoderSupport', base_config_1.TYPE], + ['VideoFrameBufferInit', base_config_1.TYPE], + ['VideoFrameCopyToOptions', base_config_1.TYPE], + ['VideoFrameInit', base_config_1.TYPE], + ['WebGLContextAttributes', base_config_1.TYPE], + ['WebGLContextEventInit', base_config_1.TYPE], + ['WebTransportCloseInfo', base_config_1.TYPE], + ['WebTransportErrorOptions', base_config_1.TYPE], + ['WebTransportHash', base_config_1.TYPE], + ['WebTransportOptions', base_config_1.TYPE], + ['WebTransportSendOptions', base_config_1.TYPE], + ['WebTransportSendStreamOptions', base_config_1.TYPE], + ['WorkerOptions', base_config_1.TYPE], + ['WriteParams', base_config_1.TYPE], + ['ANGLE_instanced_arrays', base_config_1.TYPE], + ['AbortController', base_config_1.TYPE_VALUE], + ['AbortSignalEventMap', base_config_1.TYPE], + ['AbortSignal', base_config_1.TYPE_VALUE], + ['AbstractWorkerEventMap', base_config_1.TYPE], + ['AbstractWorker', base_config_1.TYPE], + ['AnimationFrameProvider', base_config_1.TYPE], + ['AudioData', base_config_1.TYPE_VALUE], + ['AudioDecoderEventMap', base_config_1.TYPE], + ['AudioDecoder', base_config_1.TYPE_VALUE], + ['AudioEncoderEventMap', base_config_1.TYPE], + ['AudioEncoder', base_config_1.TYPE_VALUE], + ['Blob', base_config_1.TYPE_VALUE], + ['Body', base_config_1.TYPE], + ['BroadcastChannelEventMap', base_config_1.TYPE], + ['BroadcastChannel', base_config_1.TYPE_VALUE], + ['ByteLengthQueuingStrategy', base_config_1.TYPE_VALUE], + ['CSSImageValue', base_config_1.TYPE_VALUE], + ['CSSKeywordValue', base_config_1.TYPE_VALUE], + ['CSSMathClamp', base_config_1.TYPE_VALUE], + ['CSSMathInvert', base_config_1.TYPE_VALUE], + ['CSSMathMax', base_config_1.TYPE_VALUE], + ['CSSMathMin', base_config_1.TYPE_VALUE], + ['CSSMathNegate', base_config_1.TYPE_VALUE], + ['CSSMathProduct', base_config_1.TYPE_VALUE], + ['CSSMathSum', base_config_1.TYPE_VALUE], + ['CSSMathValue', base_config_1.TYPE_VALUE], + ['CSSMatrixComponent', base_config_1.TYPE_VALUE], + ['CSSNumericArray', base_config_1.TYPE_VALUE], + ['CSSNumericValue', base_config_1.TYPE_VALUE], + ['CSSPerspective', base_config_1.TYPE_VALUE], + ['CSSRotate', base_config_1.TYPE_VALUE], + ['CSSScale', base_config_1.TYPE_VALUE], + ['CSSSkew', base_config_1.TYPE_VALUE], + ['CSSSkewX', base_config_1.TYPE_VALUE], + ['CSSSkewY', base_config_1.TYPE_VALUE], + ['CSSStyleValue', base_config_1.TYPE_VALUE], + ['CSSTransformComponent', base_config_1.TYPE_VALUE], + ['CSSTransformValue', base_config_1.TYPE_VALUE], + ['CSSTranslate', base_config_1.TYPE_VALUE], + ['CSSUnitValue', base_config_1.TYPE_VALUE], + ['CSSUnparsedValue', base_config_1.TYPE_VALUE], + ['CSSVariableReferenceValue', base_config_1.TYPE_VALUE], + ['Cache', base_config_1.TYPE_VALUE], + ['CacheStorage', base_config_1.TYPE_VALUE], + ['CanvasCompositing', base_config_1.TYPE], + ['CanvasDrawImage', base_config_1.TYPE], + ['CanvasDrawPath', base_config_1.TYPE], + ['CanvasFillStrokeStyles', base_config_1.TYPE], + ['CanvasFilters', base_config_1.TYPE], + ['CanvasGradient', base_config_1.TYPE_VALUE], + ['CanvasImageData', base_config_1.TYPE], + ['CanvasImageSmoothing', base_config_1.TYPE], + ['CanvasPath', base_config_1.TYPE], + ['CanvasPathDrawingStyles', base_config_1.TYPE], + ['CanvasPattern', base_config_1.TYPE_VALUE], + ['CanvasRect', base_config_1.TYPE], + ['CanvasShadowStyles', base_config_1.TYPE], + ['CanvasState', base_config_1.TYPE], + ['CanvasText', base_config_1.TYPE], + ['CanvasTextDrawingStyles', base_config_1.TYPE], + ['CanvasTransform', base_config_1.TYPE], + ['Client', base_config_1.TYPE_VALUE], + ['Clients', base_config_1.TYPE_VALUE], + ['CloseEvent', base_config_1.TYPE_VALUE], + ['CompressionStream', base_config_1.TYPE_VALUE], + ['CookieStore', base_config_1.TYPE_VALUE], + ['CookieStoreManager', base_config_1.TYPE_VALUE], + ['CountQueuingStrategy', base_config_1.TYPE_VALUE], + ['Crypto', base_config_1.TYPE_VALUE], + ['CryptoKey', base_config_1.TYPE_VALUE], + ['CustomEvent', base_config_1.TYPE_VALUE], + ['DOMException', base_config_1.TYPE_VALUE], + ['DOMMatrix', base_config_1.TYPE_VALUE], + ['DOMMatrixReadOnly', base_config_1.TYPE_VALUE], + ['DOMPoint', base_config_1.TYPE_VALUE], + ['DOMPointReadOnly', base_config_1.TYPE_VALUE], + ['DOMQuad', base_config_1.TYPE_VALUE], + ['DOMRect', base_config_1.TYPE_VALUE], + ['DOMRectReadOnly', base_config_1.TYPE_VALUE], + ['DOMStringList', base_config_1.TYPE_VALUE], + ['DecompressionStream', base_config_1.TYPE_VALUE], + ['DedicatedWorkerGlobalScopeEventMap', base_config_1.TYPE], + ['DedicatedWorkerGlobalScope', base_config_1.TYPE_VALUE], + ['EXT_blend_minmax', base_config_1.TYPE], + ['EXT_color_buffer_float', base_config_1.TYPE], + ['EXT_color_buffer_half_float', base_config_1.TYPE], + ['EXT_float_blend', base_config_1.TYPE], + ['EXT_frag_depth', base_config_1.TYPE], + ['EXT_sRGB', base_config_1.TYPE], + ['EXT_shader_texture_lod', base_config_1.TYPE], + ['EXT_texture_compression_bptc', base_config_1.TYPE], + ['EXT_texture_compression_rgtc', base_config_1.TYPE], + ['EXT_texture_filter_anisotropic', base_config_1.TYPE], + ['EXT_texture_norm16', base_config_1.TYPE], + ['EncodedAudioChunk', base_config_1.TYPE_VALUE], + ['EncodedVideoChunk', base_config_1.TYPE_VALUE], + ['ErrorEvent', base_config_1.TYPE_VALUE], + ['Event', base_config_1.TYPE_VALUE], + ['EventListener', base_config_1.TYPE], + ['EventListenerObject', base_config_1.TYPE], + ['EventSourceEventMap', base_config_1.TYPE], + ['EventSource', base_config_1.TYPE_VALUE], + ['EventTarget', base_config_1.TYPE_VALUE], + ['ExtendableCookieChangeEvent', base_config_1.TYPE_VALUE], + ['ExtendableEvent', base_config_1.TYPE_VALUE], + ['ExtendableMessageEvent', base_config_1.TYPE_VALUE], + ['FetchEvent', base_config_1.TYPE_VALUE], + ['File', base_config_1.TYPE_VALUE], + ['FileList', base_config_1.TYPE_VALUE], + ['FileReaderEventMap', base_config_1.TYPE], + ['FileReader', base_config_1.TYPE_VALUE], + ['FileReaderSync', base_config_1.TYPE_VALUE], + ['FileSystemDirectoryHandle', base_config_1.TYPE_VALUE], + ['FileSystemFileHandle', base_config_1.TYPE_VALUE], + ['FileSystemHandle', base_config_1.TYPE_VALUE], + ['FileSystemSyncAccessHandle', base_config_1.TYPE_VALUE], + ['FileSystemWritableFileStream', base_config_1.TYPE_VALUE], + ['FontFace', base_config_1.TYPE_VALUE], + ['FontFaceSetEventMap', base_config_1.TYPE], + ['FontFaceSet', base_config_1.TYPE_VALUE], + ['FontFaceSetLoadEvent', base_config_1.TYPE_VALUE], + ['FontFaceSource', base_config_1.TYPE], + ['FormData', base_config_1.TYPE_VALUE], + ['GPUError', base_config_1.TYPE], + ['GenericTransformStream', base_config_1.TYPE], + ['Headers', base_config_1.TYPE_VALUE], + ['IDBCursor', base_config_1.TYPE_VALUE], + ['IDBCursorWithValue', base_config_1.TYPE_VALUE], + ['IDBDatabaseEventMap', base_config_1.TYPE], + ['IDBDatabase', base_config_1.TYPE_VALUE], + ['IDBFactory', base_config_1.TYPE_VALUE], + ['IDBIndex', base_config_1.TYPE_VALUE], + ['IDBKeyRange', base_config_1.TYPE_VALUE], + ['IDBObjectStore', base_config_1.TYPE_VALUE], + ['IDBOpenDBRequestEventMap', base_config_1.TYPE], + ['IDBOpenDBRequest', base_config_1.TYPE_VALUE], + ['IDBRequestEventMap', base_config_1.TYPE], + ['IDBRequest', base_config_1.TYPE_VALUE], + ['IDBTransactionEventMap', base_config_1.TYPE], + ['IDBTransaction', base_config_1.TYPE_VALUE], + ['IDBVersionChangeEvent', base_config_1.TYPE_VALUE], + ['ImageBitmap', base_config_1.TYPE_VALUE], + ['ImageBitmapRenderingContext', base_config_1.TYPE_VALUE], + ['ImageData', base_config_1.TYPE_VALUE], + ['ImageDecoder', base_config_1.TYPE_VALUE], + ['ImageTrack', base_config_1.TYPE_VALUE], + ['ImageTrackList', base_config_1.TYPE_VALUE], + ['ImportMeta', base_config_1.TYPE], + ['KHR_parallel_shader_compile', base_config_1.TYPE], + ['Lock', base_config_1.TYPE_VALUE], + ['LockManager', base_config_1.TYPE_VALUE], + ['MediaCapabilities', base_config_1.TYPE_VALUE], + ['MediaSourceHandle', base_config_1.TYPE_VALUE], + ['MediaStreamTrackProcessor', base_config_1.TYPE_VALUE], + ['MessageChannel', base_config_1.TYPE_VALUE], + ['MessageEvent', base_config_1.TYPE_VALUE], + ['MessageEventTargetEventMap', base_config_1.TYPE], + ['MessageEventTarget', base_config_1.TYPE], + ['MessagePortEventMap', base_config_1.TYPE], + ['MessagePort', base_config_1.TYPE_VALUE], + ['NavigationPreloadManager', base_config_1.TYPE_VALUE], + ['NavigatorBadge', base_config_1.TYPE], + ['NavigatorConcurrentHardware', base_config_1.TYPE], + ['NavigatorID', base_config_1.TYPE], + ['NavigatorLanguage', base_config_1.TYPE], + ['NavigatorLocks', base_config_1.TYPE], + ['NavigatorOnLine', base_config_1.TYPE], + ['NavigatorStorage', base_config_1.TYPE], + ['NotificationEventMap', base_config_1.TYPE], + ['Notification', base_config_1.TYPE_VALUE], + ['NotificationEvent', base_config_1.TYPE_VALUE], + ['OES_draw_buffers_indexed', base_config_1.TYPE], + ['OES_element_index_uint', base_config_1.TYPE], + ['OES_fbo_render_mipmap', base_config_1.TYPE], + ['OES_standard_derivatives', base_config_1.TYPE], + ['OES_texture_float', base_config_1.TYPE], + ['OES_texture_float_linear', base_config_1.TYPE], + ['OES_texture_half_float', base_config_1.TYPE], + ['OES_texture_half_float_linear', base_config_1.TYPE], + ['OES_vertex_array_object', base_config_1.TYPE], + ['OVR_multiview2', base_config_1.TYPE], + ['OffscreenCanvasEventMap', base_config_1.TYPE], + ['OffscreenCanvas', base_config_1.TYPE_VALUE], + ['OffscreenCanvasRenderingContext2D', base_config_1.TYPE_VALUE], + ['Path2D', base_config_1.TYPE_VALUE], + ['PerformanceEventMap', base_config_1.TYPE], + ['Performance', base_config_1.TYPE_VALUE], + ['PerformanceEntry', base_config_1.TYPE_VALUE], + ['PerformanceMark', base_config_1.TYPE_VALUE], + ['PerformanceMeasure', base_config_1.TYPE_VALUE], + ['PerformanceObserver', base_config_1.TYPE_VALUE], + ['PerformanceObserverEntryList', base_config_1.TYPE_VALUE], + ['PerformanceResourceTiming', base_config_1.TYPE_VALUE], + ['PerformanceServerTiming', base_config_1.TYPE_VALUE], + ['PermissionStatusEventMap', base_config_1.TYPE], + ['PermissionStatus', base_config_1.TYPE_VALUE], + ['Permissions', base_config_1.TYPE_VALUE], + ['ProgressEvent', base_config_1.TYPE_VALUE], + ['PromiseRejectionEvent', base_config_1.TYPE_VALUE], + ['PushEvent', base_config_1.TYPE_VALUE], + ['PushManager', base_config_1.TYPE_VALUE], + ['PushMessageData', base_config_1.TYPE_VALUE], + ['PushSubscription', base_config_1.TYPE_VALUE], + ['PushSubscriptionChangeEvent', base_config_1.TYPE_VALUE], + ['PushSubscriptionOptions', base_config_1.TYPE_VALUE], + ['RTCDataChannelEventMap', base_config_1.TYPE], + ['RTCDataChannel', base_config_1.TYPE_VALUE], + ['RTCEncodedAudioFrame', base_config_1.TYPE_VALUE], + ['RTCEncodedVideoFrame', base_config_1.TYPE_VALUE], + ['RTCRtpScriptTransformer', base_config_1.TYPE_VALUE], + ['RTCTransformEvent', base_config_1.TYPE_VALUE], + ['ReadableByteStreamController', base_config_1.TYPE_VALUE], + ['ReadableStream', base_config_1.TYPE_VALUE], + ['ReadableStreamBYOBReader', base_config_1.TYPE_VALUE], + ['ReadableStreamBYOBRequest', base_config_1.TYPE_VALUE], + ['ReadableStreamDefaultController', base_config_1.TYPE_VALUE], + ['ReadableStreamDefaultReader', base_config_1.TYPE_VALUE], + ['ReadableStreamGenericReader', base_config_1.TYPE], + ['Report', base_config_1.TYPE_VALUE], + ['ReportBody', base_config_1.TYPE_VALUE], + ['ReportingObserver', base_config_1.TYPE_VALUE], + ['Request', base_config_1.TYPE_VALUE], + ['Response', base_config_1.TYPE_VALUE], + ['SecurityPolicyViolationEvent', base_config_1.TYPE_VALUE], + ['ServiceWorkerEventMap', base_config_1.TYPE], + ['ServiceWorker', base_config_1.TYPE_VALUE], + ['ServiceWorkerContainerEventMap', base_config_1.TYPE], + ['ServiceWorkerContainer', base_config_1.TYPE_VALUE], + ['ServiceWorkerGlobalScopeEventMap', base_config_1.TYPE], + ['ServiceWorkerGlobalScope', base_config_1.TYPE_VALUE], + ['ServiceWorkerRegistrationEventMap', base_config_1.TYPE], + ['ServiceWorkerRegistration', base_config_1.TYPE_VALUE], + ['SharedWorkerGlobalScopeEventMap', base_config_1.TYPE], + ['SharedWorkerGlobalScope', base_config_1.TYPE_VALUE], + ['StorageManager', base_config_1.TYPE_VALUE], + ['StylePropertyMapReadOnly', base_config_1.TYPE_VALUE], + ['SubtleCrypto', base_config_1.TYPE_VALUE], + ['TextDecoder', base_config_1.TYPE_VALUE], + ['TextDecoderCommon', base_config_1.TYPE], + ['TextDecoderStream', base_config_1.TYPE_VALUE], + ['TextEncoder', base_config_1.TYPE_VALUE], + ['TextEncoderCommon', base_config_1.TYPE], + ['TextEncoderStream', base_config_1.TYPE_VALUE], + ['TextMetrics', base_config_1.TYPE_VALUE], + ['TransformStream', base_config_1.TYPE_VALUE], + ['TransformStreamDefaultController', base_config_1.TYPE_VALUE], + ['URL', base_config_1.TYPE_VALUE], + ['URLSearchParams', base_config_1.TYPE_VALUE], + ['VideoColorSpace', base_config_1.TYPE_VALUE], + ['VideoDecoderEventMap', base_config_1.TYPE], + ['VideoDecoder', base_config_1.TYPE_VALUE], + ['VideoEncoderEventMap', base_config_1.TYPE], + ['VideoEncoder', base_config_1.TYPE_VALUE], + ['VideoFrame', base_config_1.TYPE_VALUE], + ['WEBGL_color_buffer_float', base_config_1.TYPE], + ['WEBGL_compressed_texture_astc', base_config_1.TYPE], + ['WEBGL_compressed_texture_etc', base_config_1.TYPE], + ['WEBGL_compressed_texture_etc1', base_config_1.TYPE], + ['WEBGL_compressed_texture_pvrtc', base_config_1.TYPE], + ['WEBGL_compressed_texture_s3tc', base_config_1.TYPE], + ['WEBGL_compressed_texture_s3tc_srgb', base_config_1.TYPE], + ['WEBGL_debug_renderer_info', base_config_1.TYPE], + ['WEBGL_debug_shaders', base_config_1.TYPE], + ['WEBGL_depth_texture', base_config_1.TYPE], + ['WEBGL_draw_buffers', base_config_1.TYPE], + ['WEBGL_lose_context', base_config_1.TYPE], + ['WEBGL_multi_draw', base_config_1.TYPE], + ['WebGL2RenderingContext', base_config_1.TYPE_VALUE], + ['WebGL2RenderingContextBase', base_config_1.TYPE], + ['WebGL2RenderingContextOverloads', base_config_1.TYPE], + ['WebGLActiveInfo', base_config_1.TYPE_VALUE], + ['WebGLBuffer', base_config_1.TYPE_VALUE], + ['WebGLContextEvent', base_config_1.TYPE_VALUE], + ['WebGLFramebuffer', base_config_1.TYPE_VALUE], + ['WebGLProgram', base_config_1.TYPE_VALUE], + ['WebGLQuery', base_config_1.TYPE_VALUE], + ['WebGLRenderbuffer', base_config_1.TYPE_VALUE], + ['WebGLRenderingContext', base_config_1.TYPE_VALUE], + ['WebGLRenderingContextBase', base_config_1.TYPE], + ['WebGLRenderingContextOverloads', base_config_1.TYPE], + ['WebGLSampler', base_config_1.TYPE_VALUE], + ['WebGLShader', base_config_1.TYPE_VALUE], + ['WebGLShaderPrecisionFormat', base_config_1.TYPE_VALUE], + ['WebGLSync', base_config_1.TYPE_VALUE], + ['WebGLTexture', base_config_1.TYPE_VALUE], + ['WebGLTransformFeedback', base_config_1.TYPE_VALUE], + ['WebGLUniformLocation', base_config_1.TYPE_VALUE], + ['WebGLVertexArrayObject', base_config_1.TYPE_VALUE], + ['WebGLVertexArrayObjectOES', base_config_1.TYPE], + ['WebSocketEventMap', base_config_1.TYPE], + ['WebSocket', base_config_1.TYPE_VALUE], + ['WebTransport', base_config_1.TYPE_VALUE], + ['WebTransportBidirectionalStream', base_config_1.TYPE_VALUE], + ['WebTransportDatagramDuplexStream', base_config_1.TYPE_VALUE], + ['WebTransportError', base_config_1.TYPE_VALUE], + ['WindowClient', base_config_1.TYPE_VALUE], + ['WindowOrWorkerGlobalScope', base_config_1.TYPE], + ['WorkerEventMap', base_config_1.TYPE], + ['Worker', base_config_1.TYPE_VALUE], + ['WorkerGlobalScopeEventMap', base_config_1.TYPE], + ['WorkerGlobalScope', base_config_1.TYPE_VALUE], + ['WorkerLocation', base_config_1.TYPE_VALUE], + ['WorkerNavigator', base_config_1.TYPE_VALUE], + ['WritableStream', base_config_1.TYPE_VALUE], + ['WritableStreamDefaultController', base_config_1.TYPE_VALUE], + ['WritableStreamDefaultWriter', base_config_1.TYPE_VALUE], + ['XMLHttpRequestEventMap', base_config_1.TYPE], + ['XMLHttpRequest', base_config_1.TYPE_VALUE], + ['XMLHttpRequestEventTargetEventMap', base_config_1.TYPE], + ['XMLHttpRequestEventTarget', base_config_1.TYPE_VALUE], + ['XMLHttpRequestUpload', base_config_1.TYPE_VALUE], + ['WebAssembly', base_config_1.TYPE_VALUE], + ['Console', base_config_1.TYPE], + ['AudioDataOutputCallback', base_config_1.TYPE], + ['EncodedAudioChunkOutputCallback', base_config_1.TYPE], + ['EncodedVideoChunkOutputCallback', base_config_1.TYPE], + ['FrameRequestCallback', base_config_1.TYPE], + ['LockGrantedCallback', base_config_1.TYPE], + ['OnErrorEventHandlerNonNull', base_config_1.TYPE], + ['PerformanceObserverCallback', base_config_1.TYPE], + ['QueuingStrategySize', base_config_1.TYPE], + ['ReportingObserverCallback', base_config_1.TYPE], + ['TransformerFlushCallback', base_config_1.TYPE], + ['TransformerStartCallback', base_config_1.TYPE], + ['TransformerTransformCallback', base_config_1.TYPE], + ['UnderlyingSinkAbortCallback', base_config_1.TYPE], + ['UnderlyingSinkCloseCallback', base_config_1.TYPE], + ['UnderlyingSinkStartCallback', base_config_1.TYPE], + ['UnderlyingSinkWriteCallback', base_config_1.TYPE], + ['UnderlyingSourceCancelCallback', base_config_1.TYPE], + ['UnderlyingSourcePullCallback', base_config_1.TYPE], + ['UnderlyingSourceStartCallback', base_config_1.TYPE], + ['VideoFrameOutputCallback', base_config_1.TYPE], + ['VoidFunction', base_config_1.TYPE], + ['WebCodecsErrorCallback', base_config_1.TYPE], + ['AlgorithmIdentifier', base_config_1.TYPE], + ['AllowSharedBufferSource', base_config_1.TYPE], + ['BigInteger', base_config_1.TYPE], + ['BlobPart', base_config_1.TYPE], + ['BodyInit', base_config_1.TYPE], + ['BufferSource', base_config_1.TYPE], + ['CSSKeywordish', base_config_1.TYPE], + ['CSSNumberish', base_config_1.TYPE], + ['CSSPerspectiveValue', base_config_1.TYPE], + ['CSSUnparsedSegment', base_config_1.TYPE], + ['CanvasImageSource', base_config_1.TYPE], + ['CookieList', base_config_1.TYPE], + ['DOMHighResTimeStamp', base_config_1.TYPE], + ['EpochTimeStamp', base_config_1.TYPE], + ['EventListenerOrEventListenerObject', base_config_1.TYPE], + ['FileSystemWriteChunkType', base_config_1.TYPE], + ['Float32List', base_config_1.TYPE], + ['FormDataEntryValue', base_config_1.TYPE], + ['GLbitfield', base_config_1.TYPE], + ['GLboolean', base_config_1.TYPE], + ['GLclampf', base_config_1.TYPE], + ['GLenum', base_config_1.TYPE], + ['GLfloat', base_config_1.TYPE], + ['GLint', base_config_1.TYPE], + ['GLint64', base_config_1.TYPE], + ['GLintptr', base_config_1.TYPE], + ['GLsizei', base_config_1.TYPE], + ['GLsizeiptr', base_config_1.TYPE], + ['GLuint', base_config_1.TYPE], + ['GLuint64', base_config_1.TYPE], + ['HashAlgorithmIdentifier', base_config_1.TYPE], + ['HeadersInit', base_config_1.TYPE], + ['IDBValidKey', base_config_1.TYPE], + ['ImageBitmapSource', base_config_1.TYPE], + ['ImageBufferSource', base_config_1.TYPE], + ['ImageDataArray', base_config_1.TYPE], + ['Int32List', base_config_1.TYPE], + ['MessageEventSource', base_config_1.TYPE], + ['NamedCurve', base_config_1.TYPE], + ['OffscreenRenderingContext', base_config_1.TYPE], + ['OnErrorEventHandler', base_config_1.TYPE], + ['PerformanceEntryList', base_config_1.TYPE], + ['PushMessageDataInit', base_config_1.TYPE], + ['ReadableStreamController', base_config_1.TYPE], + ['ReadableStreamReadResult', base_config_1.TYPE], + ['ReadableStreamReader', base_config_1.TYPE], + ['ReportList', base_config_1.TYPE], + ['RequestInfo', base_config_1.TYPE], + ['TexImageSource', base_config_1.TYPE], + ['TimerHandler', base_config_1.TYPE], + ['Transferable', base_config_1.TYPE], + ['Uint32List', base_config_1.TYPE], + ['XMLHttpRequestBodyInit', base_config_1.TYPE], + ['AlphaOption', base_config_1.TYPE], + ['AudioSampleFormat', base_config_1.TYPE], + ['AvcBitstreamFormat', base_config_1.TYPE], + ['BinaryType', base_config_1.TYPE], + ['BitrateMode', base_config_1.TYPE], + ['CSSMathOperator', base_config_1.TYPE], + ['CSSNumericBaseType', base_config_1.TYPE], + ['CanvasDirection', base_config_1.TYPE], + ['CanvasFillRule', base_config_1.TYPE], + ['CanvasFontKerning', base_config_1.TYPE], + ['CanvasFontStretch', base_config_1.TYPE], + ['CanvasFontVariantCaps', base_config_1.TYPE], + ['CanvasLineCap', base_config_1.TYPE], + ['CanvasLineJoin', base_config_1.TYPE], + ['CanvasTextAlign', base_config_1.TYPE], + ['CanvasTextBaseline', base_config_1.TYPE], + ['CanvasTextRendering', base_config_1.TYPE], + ['ClientTypes', base_config_1.TYPE], + ['CodecState', base_config_1.TYPE], + ['ColorGamut', base_config_1.TYPE], + ['ColorSpaceConversion', base_config_1.TYPE], + ['CompressionFormat', base_config_1.TYPE], + ['CookieSameSite', base_config_1.TYPE], + ['DocumentVisibilityState', base_config_1.TYPE], + ['EncodedAudioChunkType', base_config_1.TYPE], + ['EncodedVideoChunkType', base_config_1.TYPE], + ['EndingType', base_config_1.TYPE], + ['FileSystemHandleKind', base_config_1.TYPE], + ['FontDisplay', base_config_1.TYPE], + ['FontFaceLoadStatus', base_config_1.TYPE], + ['FontFaceSetLoadStatus', base_config_1.TYPE], + ['FrameType', base_config_1.TYPE], + ['GlobalCompositeOperation', base_config_1.TYPE], + ['HardwareAcceleration', base_config_1.TYPE], + ['HdrMetadataType', base_config_1.TYPE], + ['IDBCursorDirection', base_config_1.TYPE], + ['IDBRequestReadyState', base_config_1.TYPE], + ['IDBTransactionDurability', base_config_1.TYPE], + ['IDBTransactionMode', base_config_1.TYPE], + ['ImageOrientation', base_config_1.TYPE], + ['ImageSmoothingQuality', base_config_1.TYPE], + ['KeyFormat', base_config_1.TYPE], + ['KeyType', base_config_1.TYPE], + ['KeyUsage', base_config_1.TYPE], + ['LatencyMode', base_config_1.TYPE], + ['LockMode', base_config_1.TYPE], + ['MediaDecodingType', base_config_1.TYPE], + ['MediaEncodingType', base_config_1.TYPE], + ['MediaKeysRequirement', base_config_1.TYPE], + ['NotificationDirection', base_config_1.TYPE], + ['NotificationPermission', base_config_1.TYPE], + ['OffscreenRenderingContextId', base_config_1.TYPE], + ['OpusBitstreamFormat', base_config_1.TYPE], + ['PermissionName', base_config_1.TYPE], + ['PermissionState', base_config_1.TYPE], + ['PredefinedColorSpace', base_config_1.TYPE], + ['PremultiplyAlpha', base_config_1.TYPE], + ['PushEncryptionKeyName', base_config_1.TYPE], + ['RTCDataChannelState', base_config_1.TYPE], + ['RTCEncodedVideoFrameType', base_config_1.TYPE], + ['ReadableStreamReaderMode', base_config_1.TYPE], + ['ReadableStreamType', base_config_1.TYPE], + ['ReferrerPolicy', base_config_1.TYPE], + ['RequestCache', base_config_1.TYPE], + ['RequestCredentials', base_config_1.TYPE], + ['RequestDestination', base_config_1.TYPE], + ['RequestMode', base_config_1.TYPE], + ['RequestPriority', base_config_1.TYPE], + ['RequestRedirect', base_config_1.TYPE], + ['ResizeQuality', base_config_1.TYPE], + ['ResponseType', base_config_1.TYPE], + ['SecurityPolicyViolationEventDisposition', base_config_1.TYPE], + ['ServiceWorkerState', base_config_1.TYPE], + ['ServiceWorkerUpdateViaCache', base_config_1.TYPE], + ['TransferFunction', base_config_1.TYPE], + ['VideoColorPrimaries', base_config_1.TYPE], + ['VideoEncoderBitrateMode', base_config_1.TYPE], + ['VideoMatrixCoefficients', base_config_1.TYPE], + ['VideoPixelFormat', base_config_1.TYPE], + ['VideoTransferCharacteristics', base_config_1.TYPE], + ['WebGLPowerPreference', base_config_1.TYPE], + ['WebTransportCongestionControl', base_config_1.TYPE], + ['WebTransportErrorSource', base_config_1.TYPE], + ['WorkerType', base_config_1.TYPE], + ['WriteCommandType', base_config_1.TYPE], + ['XMLHttpRequestResponseType', base_config_1.TYPE], + ], +}; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts new file mode 100644 index 0000000..40496fe --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts @@ -0,0 +1,28 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Referencer } from './Referencer'; +import { Visitor } from './Visitor'; +export declare class ClassVisitor extends Visitor { + #private; + constructor(referencer: Referencer); + static visit(referencer: Referencer, node: TSESTree.ClassDeclaration | TSESTree.ClassExpression): void; + visit(node: TSESTree.Node | null | undefined): void; + protected visitClass(node: TSESTree.ClassDeclaration | TSESTree.ClassExpression): void; + protected visitFunctionParameterTypeAnnotation(node: TSESTree.Parameter): void; + protected visitMethod(node: TSESTree.MethodDefinition): void; + protected visitMethodFunction(node: TSESTree.FunctionExpression): void; + protected visitPropertyBase(node: TSESTree.AccessorProperty | TSESTree.PropertyDefinition | TSESTree.TSAbstractAccessorProperty | TSESTree.TSAbstractMethodDefinition | TSESTree.TSAbstractPropertyDefinition): void; + protected visitPropertyDefinition(node: TSESTree.AccessorProperty | TSESTree.PropertyDefinition | TSESTree.TSAbstractAccessorProperty | TSESTree.TSAbstractPropertyDefinition): void; + protected visitType(node: TSESTree.Node | null | undefined): void; + protected AccessorProperty(node: TSESTree.AccessorProperty): void; + protected ClassBody(node: TSESTree.ClassBody): void; + protected Identifier(node: TSESTree.Identifier): void; + protected MethodDefinition(node: TSESTree.MethodDefinition): void; + protected PrivateIdentifier(): void; + protected PropertyDefinition(node: TSESTree.PropertyDefinition): void; + protected StaticBlock(node: TSESTree.StaticBlock): void; + protected TSAbstractAccessorProperty(node: TSESTree.TSAbstractAccessorProperty): void; + protected TSAbstractMethodDefinition(node: TSESTree.TSAbstractMethodDefinition): void; + protected TSAbstractPropertyDefinition(node: TSESTree.TSAbstractPropertyDefinition): void; + protected TSIndexSignature(node: TSESTree.TSIndexSignature): void; +} +//# sourceMappingURL=ClassVisitor.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map new file mode 100644 index 0000000..beb7fbe --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassVisitor.d.ts","sourceRoot":"","sources":["../../src/referencer/ClassVisitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,qBAAa,YAAa,SAAQ,OAAO;;gBAG3B,UAAU,EA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AAI;IAIrD,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,GAAG,IAAI;IAIjE,SAAS,CAAC,iBAAiB,IAAI,IAAI;IAInC,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,kBAAkB,GAAG,IAAI;IAIrE,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,WAAW,GAAG,IAAI;IAQvD,SAAS,CAAC,0BAA0B,CAClC,IAAI,EAAE,QAAQ,CAAC,0BAA0B,GACxC,IAAI;IAIP,SAAS,CAAC,0BAA0B,CAClC,IAAI,EAAE,QAAQ,CAAC,0BAA0B,GACxC,IAAI;IAIP,SAAS,CAAC,4BAA4B,CACpC,IAAI,EAAE,QAAQ,CAAC,4BAA4B,GAC1C,IAAI;IAIP,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,GAAG,IAAI;CAGlE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js new file mode 100644 index 0000000..3c40e31 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js @@ -0,0 +1,178 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ClassVisitor = void 0; +const types_1 = require("@typescript-eslint/types"); +const definition_1 = require("../definition"); +const TypeVisitor_1 = require("./TypeVisitor"); +const Visitor_1 = require("./Visitor"); +class ClassVisitor extends Visitor_1.Visitor { + #referencer; + constructor(referencer) { + super(referencer); + this.#referencer = referencer; + } + static visit(referencer, node) { + const classVisitor = new ClassVisitor(referencer); + classVisitor.visitClass(node); + } + visit(node) { + // make sure we only handle the nodes we are designed to handle + if (node && node.type in this) { + super.visit(node); + } + else { + this.#referencer.visit(node); + } + } + /////////////////// + // Visit helpers // + /////////////////// + visitClass(node) { + if (node.type === types_1.AST_NODE_TYPES.ClassDeclaration && node.id) { + this.#referencer + .currentScope() + .defineIdentifier(node.id, new definition_1.ClassNameDefinition(node.id, node)); + } + node.decorators.forEach(d => this.#referencer.visit(d)); + this.#referencer.scopeManager.nestClassScope(node); + if (node.id) { + // define the class name again inside the new scope + // references to the class should not resolve directly to the parent class + this.#referencer + .currentScope() + .defineIdentifier(node.id, new definition_1.ClassNameDefinition(node.id, node)); + } + this.#referencer.visit(node.superClass); + // visit the type param declarations + this.visitType(node.typeParameters); + // then the usages + this.visitType(node.superTypeArguments); + node.implements.forEach(imp => this.visitType(imp)); + this.visit(node.body); + this.#referencer.close(node); + } + visitFunctionParameterTypeAnnotation(node) { + switch (node.type) { + case types_1.AST_NODE_TYPES.AssignmentPattern: + this.visitType(node.left.typeAnnotation); + break; + case types_1.AST_NODE_TYPES.TSParameterProperty: + this.visitFunctionParameterTypeAnnotation(node.parameter); + break; + default: + this.visitType(node.typeAnnotation); + } + } + visitMethod(node) { + if (node.computed) { + this.#referencer.visit(node.key); + } + if (node.value.type === types_1.AST_NODE_TYPES.FunctionExpression) { + this.visitMethodFunction(node.value); + } + else { + this.#referencer.visit(node.value); + } + node.decorators.forEach(d => this.#referencer.visit(d)); + } + visitMethodFunction(node) { + if (node.id) { + // FunctionExpression with name creates its special scope; + // FunctionExpressionNameScope. + this.#referencer.scopeManager.nestFunctionExpressionNameScope(node); + } + node.params.forEach(param => { + param.decorators.forEach(d => this.visit(d)); + }); + // Consider this function is in the MethodDefinition. + this.#referencer.scopeManager.nestFunctionScope(node, true); + // Process parameter declarations. + for (const param of node.params) { + this.visitPattern(param, (pattern, info) => { + this.#referencer + .currentScope() + .defineIdentifier(pattern, new definition_1.ParameterDefinition(pattern, node, info.rest)); + this.#referencer.referencingDefaultValue(pattern, info.assignments, null, true); + }, { processRightHandNodes: true }); + this.visitFunctionParameterTypeAnnotation(param); + } + this.visitType(node.returnType); + this.visitType(node.typeParameters); + this.#referencer.visitChildren(node.body); + this.#referencer.close(node); + } + visitPropertyBase(node) { + if (node.computed) { + this.#referencer.visit(node.key); + } + if (node.value) { + if (node.type === types_1.AST_NODE_TYPES.PropertyDefinition || + node.type === types_1.AST_NODE_TYPES.AccessorProperty) { + this.#referencer.scopeManager.nestClassFieldInitializerScope(node.value); + } + this.#referencer.visit(node.value); + if (node.type === types_1.AST_NODE_TYPES.PropertyDefinition || + node.type === types_1.AST_NODE_TYPES.AccessorProperty) { + this.#referencer.close(node.value); + } + } + node.decorators.forEach(d => this.#referencer.visit(d)); + } + visitPropertyDefinition(node) { + this.visitPropertyBase(node); + /** + * class A { + * @meta // <--- check this + * foo: Type; + * } + */ + this.visitType(node.typeAnnotation); + } + visitType(node) { + if (!node) { + return; + } + TypeVisitor_1.TypeVisitor.visit(this.#referencer, node); + } + ///////////////////// + // Visit selectors // + ///////////////////// + AccessorProperty(node) { + this.visitPropertyDefinition(node); + } + ClassBody(node) { + // this is here on purpose so that this visitor explicitly declares visitors + // for all nodes it cares about (see the instance visit method above) + this.visitChildren(node); + } + Identifier(node) { + this.#referencer.visit(node); + } + MethodDefinition(node) { + this.visitMethod(node); + } + PrivateIdentifier() { + // intentionally skip + } + PropertyDefinition(node) { + this.visitPropertyDefinition(node); + } + StaticBlock(node) { + this.#referencer.scopeManager.nestClassStaticBlockScope(node); + node.body.forEach(b => this.visit(b)); + this.#referencer.close(node); + } + TSAbstractAccessorProperty(node) { + this.visitPropertyDefinition(node); + } + TSAbstractMethodDefinition(node) { + this.visitPropertyBase(node); + } + TSAbstractPropertyDefinition(node) { + this.visitPropertyDefinition(node); + } + TSIndexSignature(node) { + this.visitType(node); + } +} +exports.ClassVisitor = ClassVisitor; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts new file mode 100644 index 0000000..445e1c3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts @@ -0,0 +1,14 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Referencer } from './Referencer'; +import { Visitor } from './Visitor'; +export type ExportNode = TSESTree.ExportAllDeclaration | TSESTree.ExportDefaultDeclaration | TSESTree.ExportNamedDeclaration; +export declare class ExportVisitor extends Visitor { + #private; + constructor(node: ExportNode, referencer: Referencer); + static visit(referencer: Referencer, node: ExportNode): void; + protected ExportDefaultDeclaration(node: TSESTree.ExportDefaultDeclaration): void; + protected ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void; + protected ExportSpecifier(node: TSESTree.ExportSpecifier): void; + protected Identifier(node: TSESTree.Identifier): void; +} +//# sourceMappingURL=ExportVisitor.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts.map new file mode 100644 index 0000000..6aeface --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ExportVisitor.d.ts","sourceRoot":"","sources":["../../src/referencer/ExportVisitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,MAAM,UAAU,GAClB,QAAQ,CAAC,oBAAoB,GAC7B,QAAQ,CAAC,wBAAwB,GACjC,QAAQ,CAAC,sBAAsB,CAAC;AAEpC,qBAAa,aAAc,SAAQ,OAAO;;gBAI5B,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAMpD,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI;IAK5D,SAAS,CAAC,wBAAwB,CAChC,IAAI,EAAE,QAAQ,CAAC,wBAAwB,GACtC,IAAI;IAaP,SAAS,CAAC,sBAAsB,CAC9B,IAAI,EAAE,QAAQ,CAAC,sBAAsB,GACpC,IAAI;IAgBP,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,GAAG,IAAI;IAgB/D,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI;CAStD"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js new file mode 100644 index 0000000..fe594ea --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js @@ -0,0 +1,71 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExportVisitor = void 0; +const types_1 = require("@typescript-eslint/types"); +const Visitor_1 = require("./Visitor"); +class ExportVisitor extends Visitor_1.Visitor { + #exportNode; + #referencer; + constructor(node, referencer) { + super(referencer); + this.#exportNode = node; + this.#referencer = referencer; + } + static visit(referencer, node) { + const exportReferencer = new ExportVisitor(node, referencer); + exportReferencer.visit(node); + } + ExportDefaultDeclaration(node) { + if (node.declaration.type === types_1.AST_NODE_TYPES.Identifier) { + // export default A; + // this could be a type or a variable + this.visit(node.declaration); + } + else { + // export const a = 1; + // export something(); + // etc + // these not included in the scope of this visitor as they are all guaranteed to be values or declare variables + } + } + ExportNamedDeclaration(node) { + if (node.source) { + // export ... from 'foo'; + // these are external identifiers so there shouldn't be references or defs + return; + } + if (!node.declaration) { + // export { x }; + this.visitChildren(node); + } + else { + // export const x = 1; + // this is not included in the scope of this visitor as it creates a variable + } + } + ExportSpecifier(node) { + if (node.exportKind === 'type' && + node.local.type === types_1.AST_NODE_TYPES.Identifier) { + // export { type T }; + // type exports can only reference types + // + // we can't let this fall through to the Identifier selector because the exportKind is on this node + // and we don't have access to the `.parent` during scope analysis + this.#referencer.currentScope().referenceType(node.local); + } + else { + this.visit(node.local); + } + } + Identifier(node) { + if (this.#exportNode.exportKind === 'type') { + // export type { T }; + // type exports can only reference types + this.#referencer.currentScope().referenceType(node); + } + else { + this.#referencer.currentScope().referenceDualValueType(node); + } + } +} +exports.ExportVisitor = ExportVisitor; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts new file mode 100644 index 0000000..ad2163a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts @@ -0,0 +1,13 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Referencer } from './Referencer'; +import { Visitor } from './Visitor'; +export declare class ImportVisitor extends Visitor { + #private; + constructor(declaration: TSESTree.ImportDeclaration, referencer: Referencer); + static visit(referencer: Referencer, declaration: TSESTree.ImportDeclaration): void; + protected ImportDefaultSpecifier(node: TSESTree.ImportDefaultSpecifier): void; + protected ImportNamespaceSpecifier(node: TSESTree.ImportNamespaceSpecifier): void; + protected ImportSpecifier(node: TSESTree.ImportSpecifier): void; + protected visitImport(id: TSESTree.Identifier, specifier: TSESTree.ImportDefaultSpecifier | TSESTree.ImportNamespaceSpecifier | TSESTree.ImportSpecifier): void; +} +//# sourceMappingURL=ImportVisitor.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts.map new file mode 100644 index 0000000..cd23cb4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ImportVisitor.d.ts","sourceRoot":"","sources":["../../src/referencer/ImportVisitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,qBAAa,aAAc,SAAQ,OAAO;;gBAI5B,WAAW,EAAE,QAAQ,CAAC,iBAAiB,EAAE,UAAU,EAAE,UAAU;IAM3E,MAAM,CAAC,KAAK,CACV,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,QAAQ,CAAC,iBAAiB,GACtC,IAAI;IAKP,SAAS,CAAC,sBAAsB,CAC9B,IAAI,EAAE,QAAQ,CAAC,sBAAsB,GACpC,IAAI;IAKP,SAAS,CAAC,wBAAwB,CAChC,IAAI,EAAE,QAAQ,CAAC,wBAAwB,GACtC,IAAI;IAKP,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,GAAG,IAAI;IAK/D,SAAS,CAAC,WAAW,CACnB,EAAE,EAAE,QAAQ,CAAC,UAAU,EACvB,SAAS,EACL,QAAQ,CAAC,sBAAsB,GAC/B,QAAQ,CAAC,wBAAwB,GACjC,QAAQ,CAAC,eAAe,GAC3B,IAAI;CAQR"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js new file mode 100644 index 0000000..809d6f3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ImportVisitor = void 0; +const definition_1 = require("../definition"); +const Visitor_1 = require("./Visitor"); +class ImportVisitor extends Visitor_1.Visitor { + #declaration; + #referencer; + constructor(declaration, referencer) { + super(referencer); + this.#declaration = declaration; + this.#referencer = referencer; + } + static visit(referencer, declaration) { + const importReferencer = new ImportVisitor(declaration, referencer); + importReferencer.visit(declaration); + } + ImportDefaultSpecifier(node) { + const local = node.local; + this.visitImport(local, node); + } + ImportNamespaceSpecifier(node) { + const local = node.local; + this.visitImport(local, node); + } + ImportSpecifier(node) { + const local = node.local; + this.visitImport(local, node); + } + visitImport(id, specifier) { + this.#referencer + .currentScope() + .defineIdentifier(id, new definition_1.ImportBindingDefinition(id, specifier, this.#declaration)); + } +} +exports.ImportVisitor = ImportVisitor; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts new file mode 100644 index 0000000..bd0c648 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts @@ -0,0 +1,28 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { VisitorOptions } from './VisitorBase'; +import { VisitorBase } from './VisitorBase'; +export type PatternVisitorCallback = (pattern: TSESTree.Identifier, info: { + assignments: (TSESTree.AssignmentExpression | TSESTree.AssignmentPattern)[]; + rest: boolean; + topLevel: boolean; +}) => void; +export type PatternVisitorOptions = VisitorOptions; +export declare class PatternVisitor extends VisitorBase { + #private; + readonly rightHandNodes: TSESTree.Node[]; + constructor(options: PatternVisitorOptions, rootPattern: TSESTree.Node, callback: PatternVisitorCallback); + static isPattern(node: TSESTree.Node): node is TSESTree.ArrayPattern | TSESTree.AssignmentPattern | TSESTree.Identifier | TSESTree.ObjectPattern | TSESTree.RestElement | TSESTree.SpreadElement; + protected ArrayExpression(node: TSESTree.ArrayExpression): void; + protected ArrayPattern(pattern: TSESTree.ArrayPattern): void; + protected AssignmentExpression(node: TSESTree.AssignmentExpression): void; + protected AssignmentPattern(pattern: TSESTree.AssignmentPattern): void; + protected CallExpression(node: TSESTree.CallExpression): void; + protected Decorator(): void; + protected Identifier(pattern: TSESTree.Identifier): void; + protected MemberExpression(node: TSESTree.MemberExpression): void; + protected Property(property: TSESTree.Property): void; + protected RestElement(pattern: TSESTree.RestElement): void; + protected SpreadElement(node: TSESTree.SpreadElement): void; + protected TSTypeAnnotation(): void; +} +//# sourceMappingURL=PatternVisitor.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts.map new file mode 100644 index 0000000..1de78ee --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PatternVisitor.d.ts","sourceRoot":"","sources":["../../src/referencer/PatternVisitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,MAAM,sBAAsB,GAAG,CACnC,OAAO,EAAE,QAAQ,CAAC,UAAU,EAC5B,IAAI,EAAE;IACJ,WAAW,EAAE,CAAC,QAAQ,CAAC,oBAAoB,GAAG,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC;IAC5E,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;CACnB,KACE,IAAI,CAAC;AAEV,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC;AACnD,qBAAa,cAAe,SAAQ,WAAW;;IAS7C,SAAgB,cAAc,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAM;gBAGnD,OAAO,EAAE,qBAAqB,EAC9B,WAAW,EAAE,QAAQ,CAAC,IAAI,EAC1B,QAAQ,EAAE,sBAAsB;WAOpB,SAAS,CACrB,IAAI,EAAE,QAAQ,CAAC,IAAI,GAClB,IAAI,IACH,QAAQ,CAAC,YAAY,GACrB,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,UAAU,GACnB,QAAQ,CAAC,aAAa,GACtB,QAAQ,CAAC,WAAW,GACpB,QAAQ,CAAC,aAAa;IAa1B,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,GAAG,IAAI;IAI/D,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,YAAY,GAAG,IAAI;IAM5D,SAAS,CAAC,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC,oBAAoB,GAAG,IAAI;IAOzE,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,GAAG,IAAI;IAOtE,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,cAAc,GAAG,IAAI;IAQ7D,SAAS,CAAC,SAAS,IAAI,IAAI;IAI3B,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI;IAUxD,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,GAAG,IAAI;IAUjE,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI;IAYrD,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,WAAW,GAAG,IAAI;IAM1D,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,aAAa,GAAG,IAAI;IAI3D,SAAS,CAAC,gBAAgB,IAAI,IAAI;CAGnC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js new file mode 100644 index 0000000..a111064 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js @@ -0,0 +1,94 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PatternVisitor = void 0; +const types_1 = require("@typescript-eslint/types"); +const VisitorBase_1 = require("./VisitorBase"); +class PatternVisitor extends VisitorBase_1.VisitorBase { + #assignments = []; + #callback; + #restElements = []; + #rootPattern; + rightHandNodes = []; + constructor(options, rootPattern, callback) { + super(options); + this.#rootPattern = rootPattern; + this.#callback = callback; + } + static isPattern(node) { + const nodeType = node.type; + return (nodeType === types_1.AST_NODE_TYPES.Identifier || + nodeType === types_1.AST_NODE_TYPES.ObjectPattern || + nodeType === types_1.AST_NODE_TYPES.ArrayPattern || + nodeType === types_1.AST_NODE_TYPES.SpreadElement || + nodeType === types_1.AST_NODE_TYPES.RestElement || + nodeType === types_1.AST_NODE_TYPES.AssignmentPattern); + } + ArrayExpression(node) { + node.elements.forEach(this.visit, this); + } + ArrayPattern(pattern) { + for (const element of pattern.elements) { + this.visit(element); + } + } + AssignmentExpression(node) { + this.#assignments.push(node); + this.visit(node.left); + this.rightHandNodes.push(node.right); + this.#assignments.pop(); + } + AssignmentPattern(pattern) { + this.#assignments.push(pattern); + this.visit(pattern.left); + this.rightHandNodes.push(pattern.right); + this.#assignments.pop(); + } + CallExpression(node) { + // arguments are right hand nodes. + node.arguments.forEach(a => { + this.rightHandNodes.push(a); + }); + this.visit(node.callee); + } + Decorator() { + // don't visit any decorators when exploring a pattern + } + Identifier(pattern) { + const lastRestElement = this.#restElements.at(-1); + this.#callback(pattern, { + assignments: this.#assignments, + rest: lastRestElement?.argument === pattern, + topLevel: pattern === this.#rootPattern, + }); + } + MemberExpression(node) { + // Computed property's key is a right hand node. + if (node.computed) { + this.rightHandNodes.push(node.property); + } + // the object is only read, write to its property. + this.rightHandNodes.push(node.object); + } + Property(property) { + // Computed property's key is a right hand node. + if (property.computed) { + this.rightHandNodes.push(property.key); + } + // If it's shorthand, its key is same as its value. + // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern). + // If it's not shorthand, the name of new variable is its value's. + this.visit(property.value); + } + RestElement(pattern) { + this.#restElements.push(pattern); + this.visit(pattern.argument); + this.#restElements.pop(); + } + SpreadElement(node) { + this.visit(node.argument); + } + TSTypeAnnotation() { + // we don't want to visit types + } +} +exports.PatternVisitor = PatternVisitor; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts new file mode 100644 index 0000000..b4decbf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts @@ -0,0 +1,88 @@ +import type { NodeWithParent, TSESTree } from '@typescript-eslint/types'; +import type { Scope } from '../scope'; +import type { Variable } from '../variable'; +export declare enum ReferenceFlag { + Read = 1, + Write = 2, + ReadWrite = 3 +} +export interface ReferenceImplicitGlobal { + node: NodeWithParent; + pattern: TSESTree.BindingName; + ref?: Reference; +} +export declare enum ReferenceTypeFlag { + Value = 1, + Type = 2 +} +/** + * A Reference represents a single occurrence of an identifier in code. + */ +export declare class Reference { + #private; + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + readonly $id: number; + /** + * Reference to the enclosing Scope. + * @public + */ + readonly from: Scope; + /** + * Identifier syntax node. + * @public + */ + readonly identifier: TSESTree.Identifier | TSESTree.JSXIdentifier; + /** + * `true` if this writing reference is a variable initializer or a default value. + * @public + */ + readonly init?: boolean; + readonly maybeImplicitGlobal?: ReferenceImplicitGlobal | null; + /** + * The {@link Variable} object that this reference refers to. If such variable was not defined, this is `null`. + * @public + */ + resolved: Variable | null; + /** + * If reference is writeable, this is the node being written to it. + * @public + */ + readonly writeExpr?: TSESTree.Node | null; + constructor(identifier: TSESTree.Identifier | TSESTree.JSXIdentifier, scope: Scope, flag: ReferenceFlag, writeExpr?: TSESTree.Node | null, maybeImplicitGlobal?: ReferenceImplicitGlobal | null, init?: boolean, referenceType?: ReferenceTypeFlag); + /** + * True if this reference can reference types + */ + get isTypeReference(): boolean; + /** + * True if this reference can reference values + */ + get isValueReference(): boolean; + /** + * Whether the reference is writeable. + * @public + */ + isWrite(): boolean; + /** + * Whether the reference is readable. + * @public + */ + isRead(): boolean; + /** + * Whether the reference is read-only. + * @public + */ + isReadOnly(): boolean; + /** + * Whether the reference is write-only. + * @public + */ + isWriteOnly(): boolean; + /** + * Whether the reference is read-write. + * @public + */ + isReadWrite(): boolean; +} +//# sourceMappingURL=Reference.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts.map new file mode 100644 index 0000000..2a2f3df --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../src/referencer/Reference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAI5C,oBAAY,aAAa;IACvB,IAAI,IAAM;IACV,KAAK,IAAM;IACX,SAAS,IAAM;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,QAAQ,CAAC,WAAW,CAAC;IAC9B,GAAG,CAAC,EAAE,SAAS,CAAC;CACjB;AAID,oBAAY,iBAAiB;IAC3B,KAAK,IAAM;IACX,IAAI,IAAM;CACX;AAED;;GAEG;AACH,qBAAa,SAAS;;IACpB;;OAEG;IACH,SAAgB,GAAG,EAAE,MAAM,CAAe;IAO1C;;;OAGG;IACH,SAAgB,IAAI,EAAE,KAAK,CAAC;IAE5B;;;OAGG;IACH,SAAgB,UAAU,EAAE,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC;IAEzE;;;OAGG;IACH,SAAgB,IAAI,CAAC,EAAE,OAAO,CAAC;IAE/B,SAAgB,mBAAmB,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAErE;;;OAGG;IACI,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEjC;;;OAGG;IACH,SAAgB,SAAS,CAAC,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;gBAQ/C,UAAU,EAAE,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,EACxD,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,aAAa,EACnB,SAAS,CAAC,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,EAChC,mBAAmB,CAAC,EAAE,uBAAuB,GAAG,IAAI,EACpD,IAAI,CAAC,EAAE,OAAO,EACd,aAAa,oBAA0B;IAgBzC;;OAEG;IACH,IAAW,eAAe,IAAI,OAAO,CAEpC;IAED;;OAEG;IACH,IAAW,gBAAgB,IAAI,OAAO,CAErC;IAED;;;OAGG;IACI,OAAO,IAAI,OAAO;IAIzB;;;OAGG;IACI,MAAM,IAAI,OAAO;IAIxB;;;OAGG;IACI,UAAU,IAAI,OAAO;IAI5B;;;OAGG;IACI,WAAW,IAAI,OAAO;IAI7B;;;OAGG;IACI,WAAW,IAAI,OAAO;CAG9B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js new file mode 100644 index 0000000..caa5211 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js @@ -0,0 +1,119 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Reference = exports.ReferenceTypeFlag = exports.ReferenceFlag = void 0; +const ID_1 = require("../ID"); +var ReferenceFlag; +(function (ReferenceFlag) { + ReferenceFlag[ReferenceFlag["Read"] = 1] = "Read"; + ReferenceFlag[ReferenceFlag["Write"] = 2] = "Write"; + ReferenceFlag[ReferenceFlag["ReadWrite"] = 3] = "ReadWrite"; +})(ReferenceFlag || (exports.ReferenceFlag = ReferenceFlag = {})); +const generator = (0, ID_1.createIdGenerator)(); +var ReferenceTypeFlag; +(function (ReferenceTypeFlag) { + ReferenceTypeFlag[ReferenceTypeFlag["Value"] = 1] = "Value"; + ReferenceTypeFlag[ReferenceTypeFlag["Type"] = 2] = "Type"; +})(ReferenceTypeFlag || (exports.ReferenceTypeFlag = ReferenceTypeFlag = {})); +/** + * A Reference represents a single occurrence of an identifier in code. + */ +class Reference { + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + $id = generator(); + /** + * The read-write mode of the reference. + */ + #flag; + /** + * Reference to the enclosing Scope. + * @public + */ + from; + /** + * Identifier syntax node. + * @public + */ + identifier; + /** + * `true` if this writing reference is a variable initializer or a default value. + * @public + */ + init; + maybeImplicitGlobal; + /** + * The {@link Variable} object that this reference refers to. If such variable was not defined, this is `null`. + * @public + */ + resolved; + /** + * If reference is writeable, this is the node being written to it. + * @public + */ + writeExpr; + /** + * In some cases, a reference may be a type, value or both a type and value reference. + */ + #referenceType; + constructor(identifier, scope, flag, writeExpr, maybeImplicitGlobal, init, referenceType = ReferenceTypeFlag.Value) { + this.identifier = identifier; + this.from = scope; + this.resolved = null; + this.#flag = flag; + if (this.isWrite()) { + this.writeExpr = writeExpr; + this.init = init; + } + this.maybeImplicitGlobal = maybeImplicitGlobal; + this.#referenceType = referenceType; + } + /** + * True if this reference can reference types + */ + get isTypeReference() { + return (this.#referenceType & ReferenceTypeFlag.Type) !== 0; + } + /** + * True if this reference can reference values + */ + get isValueReference() { + return (this.#referenceType & ReferenceTypeFlag.Value) !== 0; + } + /** + * Whether the reference is writeable. + * @public + */ + isWrite() { + return !!(this.#flag & ReferenceFlag.Write); + } + /** + * Whether the reference is readable. + * @public + */ + isRead() { + return !!(this.#flag & ReferenceFlag.Read); + } + /** + * Whether the reference is read-only. + * @public + */ + isReadOnly() { + return this.#flag === ReferenceFlag.Read; + } + /** + * Whether the reference is write-only. + * @public + */ + isWriteOnly() { + return this.#flag === ReferenceFlag.Write; + } + /** + * Whether the reference is read-write. + * @public + */ + isReadWrite() { + return this.#flag === ReferenceFlag.ReadWrite; + } +} +exports.Reference = Reference; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts new file mode 100644 index 0000000..5f2106a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts @@ -0,0 +1,87 @@ +import type { Lib, TSESTree } from '@typescript-eslint/types'; +import type { Scope } from '../scope'; +import type { ScopeManager } from '../ScopeManager'; +import type { ReferenceImplicitGlobal } from './Reference'; +import type { VisitorOptions } from './Visitor'; +import { Visitor } from './Visitor'; +export interface ReferencerOptions extends VisitorOptions { + jsxFragmentName: string | null; + jsxPragma: string | null; + lib: Lib[]; +} +export declare class Referencer extends Visitor { + #private; + readonly scopeManager: ScopeManager; + constructor(options: ReferencerOptions, scopeManager: ScopeManager); + private populateGlobalsFromLib; + close(node: TSESTree.Node): void; + currentScope(): Scope; + currentScope(throwOnNull: true): Scope | null; + referencingDefaultValue(pattern: TSESTree.Identifier, assignments: (TSESTree.AssignmentExpression | TSESTree.AssignmentPattern)[], maybeImplicitGlobal: ReferenceImplicitGlobal | null, init: boolean): void; + /** + * Searches for a variable named "name" in the upper scopes and adds a pseudo-reference from itself to itself + */ + private referenceInSomeUpperScope; + private referenceJsxFragment; + private referenceJsxPragma; + protected visitClass(node: TSESTree.ClassDeclaration | TSESTree.ClassExpression): void; + protected visitForIn(node: TSESTree.ForInStatement | TSESTree.ForOfStatement): void; + protected visitFunction(node: TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.TSDeclareFunction | TSESTree.TSEmptyBodyFunctionExpression): void; + protected visitFunctionParameterTypeAnnotation(node: TSESTree.Parameter): void; + protected visitJSXElement(node: TSESTree.JSXClosingElement | TSESTree.JSXOpeningElement): void; + protected visitProperty(node: TSESTree.Property): void; + protected visitType(node: TSESTree.Node | null | undefined): void; + protected visitTypeAssertion(node: TSESTree.TSAsExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion): void; + protected ArrowFunctionExpression(node: TSESTree.ArrowFunctionExpression): void; + protected AssignmentExpression(node: TSESTree.AssignmentExpression): void; + protected BlockStatement(node: TSESTree.BlockStatement): void; + protected BreakStatement(): void; + protected CallExpression(node: TSESTree.CallExpression): void; + protected CatchClause(node: TSESTree.CatchClause): void; + protected ClassDeclaration(node: TSESTree.ClassDeclaration): void; + protected ClassExpression(node: TSESTree.ClassExpression): void; + protected ContinueStatement(): void; + protected ExportAllDeclaration(): void; + protected ExportDefaultDeclaration(node: TSESTree.ExportDefaultDeclaration): void; + protected ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void; + protected ForInStatement(node: TSESTree.ForInStatement): void; + protected ForOfStatement(node: TSESTree.ForOfStatement): void; + protected ForStatement(node: TSESTree.ForStatement): void; + protected FunctionDeclaration(node: TSESTree.FunctionDeclaration): void; + protected FunctionExpression(node: TSESTree.FunctionExpression): void; + protected Identifier(node: TSESTree.Identifier): void; + protected ImportAttribute(): void; + protected ImportDeclaration(node: TSESTree.ImportDeclaration): void; + protected JSXAttribute(node: TSESTree.JSXAttribute): void; + protected JSXClosingElement(node: TSESTree.JSXClosingElement): void; + protected JSXFragment(node: TSESTree.JSXFragment): void; + protected JSXIdentifier(node: TSESTree.JSXIdentifier): void; + protected JSXMemberExpression(node: TSESTree.JSXMemberExpression): void; + protected JSXOpeningElement(node: TSESTree.JSXOpeningElement): void; + protected LabeledStatement(node: TSESTree.LabeledStatement): void; + protected MemberExpression(node: TSESTree.MemberExpression): void; + protected MetaProperty(): void; + protected NewExpression(node: TSESTree.NewExpression): void; + protected PrivateIdentifier(): void; + protected Program(node: TSESTree.Program): void; + protected Property(node: TSESTree.Property): void; + protected SwitchStatement(node: TSESTree.SwitchStatement): void; + protected TaggedTemplateExpression(node: TSESTree.TaggedTemplateExpression): void; + protected TSAsExpression(node: TSESTree.TSAsExpression): void; + protected TSDeclareFunction(node: TSESTree.TSDeclareFunction): void; + protected TSEmptyBodyFunctionExpression(node: TSESTree.TSEmptyBodyFunctionExpression): void; + protected TSEnumDeclaration(node: TSESTree.TSEnumDeclaration): void; + protected TSExportAssignment(node: TSESTree.TSExportAssignment): void; + protected TSImportEqualsDeclaration(node: TSESTree.TSImportEqualsDeclaration): void; + protected TSInstantiationExpression(node: TSESTree.TSInstantiationExpression): void; + protected TSInterfaceDeclaration(node: TSESTree.TSInterfaceDeclaration): void; + protected TSModuleDeclaration(node: TSESTree.TSModuleDeclaration): void; + protected TSSatisfiesExpression(node: TSESTree.TSSatisfiesExpression): void; + protected TSTypeAliasDeclaration(node: TSESTree.TSTypeAliasDeclaration): void; + protected TSTypeAssertion(node: TSESTree.TSTypeAssertion): void; + protected UpdateExpression(node: TSESTree.UpdateExpression): void; + protected VariableDeclaration(node: TSESTree.VariableDeclaration): void; + protected WithStatement(node: TSESTree.WithStatement): void; + private visitExpressionTarget; +} +//# sourceMappingURL=Referencer.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map new file mode 100644 index 0000000..53831f4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Referencer.d.ts","sourceRoot":"","sources":["../../src/referencer/Referencer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAI9D,OAAO,KAAK,EAAe,KAAK,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAoBhD,OAAO,EAAE,OAAO,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AAI;IAI3E,SAAS,CAAC,sBAAsB,CAC9B,IAAI,EAAE,QAAQ,CAAC,sBAAsB,GACpC,IAAI;IAIP,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,GAAG,IAAI;IAI/D,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,GAAG,IAAI;IAgBjE,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,mBAAmB,GAAG,IAAI;IAoCvE,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,aAAa,GAAG,IAAI;IAW3D,OAAO,CAAC,qBAAqB;CAc9B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js new file mode 100644 index 0000000..4ce721e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js @@ -0,0 +1,551 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Referencer = void 0; +const types_1 = require("@typescript-eslint/types"); +const assert_1 = require("../assert"); +const definition_1 = require("../definition"); +const lib_1 = require("../lib"); +const ClassVisitor_1 = require("./ClassVisitor"); +const ExportVisitor_1 = require("./ExportVisitor"); +const ImportVisitor_1 = require("./ImportVisitor"); +const PatternVisitor_1 = require("./PatternVisitor"); +const Reference_1 = require("./Reference"); +const TypeVisitor_1 = require("./TypeVisitor"); +const Visitor_1 = require("./Visitor"); +// Referencing variables and creating bindings. +class Referencer extends Visitor_1.Visitor { + #hasReferencedJsxFactory = false; + #hasReferencedJsxFragmentFactory = false; + #jsxFragmentName; + #jsxPragma; + #lib; + scopeManager; + constructor(options, scopeManager) { + super(options); + this.scopeManager = scopeManager; + this.#jsxPragma = options.jsxPragma; + this.#jsxFragmentName = options.jsxFragmentName; + this.#lib = options.lib; + } + populateGlobalsFromLib(globalScope) { + const flattenedLibs = new Set(); + for (const lib of this.#lib) { + const definition = lib_1.lib.get(lib); + if (!definition) { + throw new Error(`Invalid value for lib provided: ${lib}`); + } + flattenedLibs.add(definition); + } + // Flatten and deduplicate the set of included libs + for (const lib of flattenedLibs) { + // By adding the dependencies to the set as we iterate it, + // they get iterated only if they are new + for (const referencedLib of lib.libs) { + flattenedLibs.add(referencedLib); + } + // This loop is guaranteed to see each included lib exactly once + for (const [name, variable] of lib.variables) { + globalScope.defineImplicitVariable(name, variable); + } + } + // for const assertions (`{} as const` / `{}`) + globalScope.defineImplicitVariable('const', { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, + }); + } + close(node) { + while (this.currentScope(true) && node === this.currentScope().block) { + this.scopeManager.currentScope = this.currentScope().close(this.scopeManager); + } + } + currentScope(dontThrowOnNull) { + if (!dontThrowOnNull) { + (0, assert_1.assert)(this.scopeManager.currentScope, 'aaa'); + } + return this.scopeManager.currentScope; + } + referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) { + assignments.forEach(assignment => { + this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, assignment.right, maybeImplicitGlobal, init); + }); + } + /** + * Searches for a variable named "name" in the upper scopes and adds a pseudo-reference from itself to itself + */ + referenceInSomeUpperScope(name) { + let scope = this.scopeManager.currentScope; + while (scope) { + const variable = scope.set.get(name); + if (!variable) { + scope = scope.upper; + continue; + } + scope.referenceValue(variable.identifiers[0]); + return true; + } + return false; + } + referenceJsxFragment() { + if (this.#jsxFragmentName == null || + this.#hasReferencedJsxFragmentFactory) { + return; + } + this.#hasReferencedJsxFragmentFactory = this.referenceInSomeUpperScope(this.#jsxFragmentName); + } + referenceJsxPragma() { + if (this.#jsxPragma == null || this.#hasReferencedJsxFactory) { + return; + } + this.#hasReferencedJsxFactory = this.referenceInSomeUpperScope(this.#jsxPragma); + } + /////////////////// + // Visit helpers // + /////////////////// + visitClass(node) { + ClassVisitor_1.ClassVisitor.visit(this, node); + } + visitForIn(node) { + if (node.left.type === types_1.AST_NODE_TYPES.VariableDeclaration && + node.left.kind !== 'var') { + this.scopeManager.nestForScope(node); + } + if (node.left.type === types_1.AST_NODE_TYPES.VariableDeclaration) { + this.visit(node.left); + this.visitPattern(node.left.declarations[0].id, pattern => { + this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, node.right, null, true); + }); + } + else { + this.visitPattern(node.left, (pattern, info) => { + const maybeImplicitGlobal = !this.currentScope().isStrict + ? { + node, + pattern, + } + : null; + this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); + this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, node.right, maybeImplicitGlobal, false); + }, { processRightHandNodes: true }); + } + this.visit(node.right); + this.visit(node.body); + this.close(node); + } + visitFunction(node) { + // FunctionDeclaration name is defined in upper scope + // NOTE: Not referring variableScope. It is intended. + // Since + // in ES5, FunctionDeclaration should be in FunctionBody. + // in ES6, FunctionDeclaration should be block scoped. + if (node.type === types_1.AST_NODE_TYPES.FunctionExpression) { + if (node.id) { + // FunctionExpression with name creates its special scope; + // FunctionExpressionNameScope. + this.scopeManager.nestFunctionExpressionNameScope(node); + } + } + else if (node.id) { + // id is defined in upper scope + this.currentScope().defineIdentifier(node.id, new definition_1.FunctionNameDefinition(node.id, node)); + } + // Consider this function is in the MethodDefinition. + this.scopeManager.nestFunctionScope(node, false); + // Process parameter declarations. + for (const param of node.params) { + this.visitPattern(param, (pattern, info) => { + this.currentScope().defineIdentifier(pattern, new definition_1.ParameterDefinition(pattern, node, info.rest)); + this.referencingDefaultValue(pattern, info.assignments, null, true); + }, { processRightHandNodes: true }); + this.visitFunctionParameterTypeAnnotation(param); + param.decorators.forEach(d => this.visit(d)); + } + this.visitType(node.returnType); + this.visitType(node.typeParameters); + // In TypeScript there are a number of function-like constructs which have no body, + // so check it exists before traversing + if (node.body) { + // Skip BlockStatement to prevent creating BlockStatement scope. + if (node.body.type === types_1.AST_NODE_TYPES.BlockStatement) { + this.visitChildren(node.body); + } + else { + this.visit(node.body); + } + } + this.close(node); + } + visitFunctionParameterTypeAnnotation(node) { + switch (node.type) { + case types_1.AST_NODE_TYPES.AssignmentPattern: + this.visitType(node.left.typeAnnotation); + break; + case types_1.AST_NODE_TYPES.TSParameterProperty: + this.visitFunctionParameterTypeAnnotation(node.parameter); + break; + default: + this.visitType(node.typeAnnotation); + break; + } + } + visitJSXElement(node) { + if (node.name.type === types_1.AST_NODE_TYPES.JSXIdentifier) { + if (node.name.name[0].toUpperCase() === node.name.name[0] || + node.name.name === 'this') { + // lower cased component names are always treated as "intrinsic" names, and are converted to a string, + // not a variable by JSX transforms: + //
=> React.createElement("div", null) + // the only case we want to visit a lower-cased component has its name as "this", + this.visit(node.name); + } + } + else { + this.visit(node.name); + } + } + visitProperty(node) { + if (node.computed) { + this.visit(node.key); + } + this.visit(node.value); + } + visitType(node) { + if (!node) { + return; + } + TypeVisitor_1.TypeVisitor.visit(this, node); + } + visitTypeAssertion(node) { + this.visit(node.expression); + this.visitType(node.typeAnnotation); + } + ///////////////////// + // Visit selectors // + ///////////////////// + ArrowFunctionExpression(node) { + this.visitFunction(node); + } + AssignmentExpression(node) { + const left = this.visitExpressionTarget(node.left); + if (PatternVisitor_1.PatternVisitor.isPattern(left)) { + if (node.operator === '=') { + this.visitPattern(left, (pattern, info) => { + const maybeImplicitGlobal = !this.currentScope().isStrict + ? { + node, + pattern, + } + : null; + this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); + this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, node.right, maybeImplicitGlobal, false); + }, { processRightHandNodes: true }); + } + else if (left.type === types_1.AST_NODE_TYPES.Identifier) { + this.currentScope().referenceValue(left, Reference_1.ReferenceFlag.ReadWrite, node.right); + } + } + else { + this.visit(left); + } + this.visit(node.right); + } + BlockStatement(node) { + this.scopeManager.nestBlockScope(node); + this.visitChildren(node); + this.close(node); + } + BreakStatement() { + // don't reference the break statement's label + } + CallExpression(node) { + this.visitChildren(node, ['typeArguments']); + this.visitType(node.typeArguments); + } + CatchClause(node) { + this.scopeManager.nestCatchScope(node); + if (node.param) { + const param = node.param; + this.visitPattern(param, (pattern, info) => { + this.currentScope().defineIdentifier(pattern, new definition_1.CatchClauseDefinition(param, node)); + this.referencingDefaultValue(pattern, info.assignments, null, true); + }, { processRightHandNodes: true }); + } + this.visit(node.body); + this.close(node); + } + ClassDeclaration(node) { + this.visitClass(node); + } + ClassExpression(node) { + this.visitClass(node); + } + ContinueStatement() { + // don't reference the continue statement's label + } + ExportAllDeclaration() { + // this defines no local variables + } + ExportDefaultDeclaration(node) { + if (node.declaration.type === types_1.AST_NODE_TYPES.Identifier) { + ExportVisitor_1.ExportVisitor.visit(this, node); + } + else { + this.visit(node.declaration); + } + } + ExportNamedDeclaration(node) { + if (node.declaration) { + this.visit(node.declaration); + } + else { + ExportVisitor_1.ExportVisitor.visit(this, node); + } + } + ForInStatement(node) { + this.visitForIn(node); + } + ForOfStatement(node) { + this.visitForIn(node); + } + ForStatement(node) { + // Create ForStatement declaration. + // NOTE: In ES6, ForStatement dynamically generates per iteration environment. However, this is + // a static analyzer, we only generate one scope for ForStatement. + if (node.init && + node.init.type === types_1.AST_NODE_TYPES.VariableDeclaration && + node.init.kind !== 'var') { + this.scopeManager.nestForScope(node); + } + this.visitChildren(node); + this.close(node); + } + FunctionDeclaration(node) { + this.visitFunction(node); + } + FunctionExpression(node) { + this.visitFunction(node); + } + Identifier(node) { + this.currentScope().referenceValue(node); + this.visitType(node.typeAnnotation); + } + ImportAttribute() { + // import assertions are module metadata and thus have no variables to reference + } + ImportDeclaration(node) { + (0, assert_1.assert)(this.scopeManager.isModule(), 'ImportDeclaration should appear when the mode is ES6 and in the module context.'); + ImportVisitor_1.ImportVisitor.visit(this, node); + } + JSXAttribute(node) { + this.visit(node.value); + } + JSXClosingElement(node) { + this.visitJSXElement(node); + } + JSXFragment(node) { + this.referenceJsxPragma(); + this.referenceJsxFragment(); + this.visitChildren(node); + } + JSXIdentifier(node) { + this.currentScope().referenceValue(node); + } + JSXMemberExpression(node) { + if (node.object.type !== types_1.AST_NODE_TYPES.JSXIdentifier || + node.object.name !== 'this') { + this.visit(node.object); + } + // we don't ever reference the property as it's always going to be a property on the thing + } + JSXOpeningElement(node) { + this.referenceJsxPragma(); + this.visitJSXElement(node); + this.visitType(node.typeArguments); + for (const attr of node.attributes) { + this.visit(attr); + } + } + LabeledStatement(node) { + this.visit(node.body); + } + MemberExpression(node) { + this.visit(node.object); + if (node.computed) { + this.visit(node.property); + } + } + MetaProperty() { + // meta properties all builtin globals + } + NewExpression(node) { + this.visitChildren(node, ['typeArguments']); + this.visitType(node.typeArguments); + } + PrivateIdentifier() { + // private identifiers are members on classes and thus have no variables to reference + } + Program(node) { + const globalScope = this.scopeManager.nestGlobalScope(node); + this.populateGlobalsFromLib(globalScope); + if (this.scopeManager.isGlobalReturn()) { + // Force strictness of GlobalScope to false when using node.js scope. + this.currentScope().isStrict = false; + this.scopeManager.nestFunctionScope(node, false); + } + if (this.scopeManager.isModule()) { + this.scopeManager.nestModuleScope(node); + } + if (this.scopeManager.isImpliedStrict()) { + this.currentScope().isStrict = true; + } + this.visitChildren(node); + this.close(node); + } + Property(node) { + this.visitProperty(node); + } + SwitchStatement(node) { + this.visit(node.discriminant); + this.scopeManager.nestSwitchScope(node); + for (const switchCase of node.cases) { + this.visit(switchCase); + } + this.close(node); + } + TaggedTemplateExpression(node) { + this.visit(node.tag); + this.visit(node.quasi); + this.visitType(node.typeArguments); + } + TSAsExpression(node) { + this.visitTypeAssertion(node); + } + TSDeclareFunction(node) { + this.visitFunction(node); + } + TSEmptyBodyFunctionExpression(node) { + this.visitFunction(node); + } + TSEnumDeclaration(node) { + this.currentScope().defineIdentifier(node.id, new definition_1.TSEnumNameDefinition(node.id, node)); + // enum members can be referenced within the enum body + this.scopeManager.nestTSEnumScope(node); + for (const member of node.body.members) { + // TS resolves literal named members to be actual names + // enum Foo { + // 'a' = 1, + // b = a, // this references the 'a' member + // } + if (member.id.type === types_1.AST_NODE_TYPES.Literal && + typeof member.id.value === 'string') { + const name = member.id; + this.currentScope().defineLiteralIdentifier(name, new definition_1.TSEnumMemberDefinition(name, member)); + } + else if (member.id.type === types_1.AST_NODE_TYPES.Identifier) { + this.currentScope().defineIdentifier(member.id, new definition_1.TSEnumMemberDefinition(member.id, member)); + } + this.visit(member.initializer); + } + this.close(node); + } + TSExportAssignment(node) { + if (node.expression.type === types_1.AST_NODE_TYPES.Identifier) { + // this is a special case - you can `export = T` where `T` is a type OR a + // value however `T[U]` is illegal when `T` is a type and `T.U` is illegal + // when `T.U` is a type + // i.e. if the expression is JUST an Identifier - it could be either ref + // kind; otherwise the standard rules apply + this.currentScope().referenceDualValueType(node.expression); + } + else { + this.visit(node.expression); + } + } + TSImportEqualsDeclaration(node) { + this.currentScope().defineIdentifier(node.id, new definition_1.ImportBindingDefinition(node.id, node, node)); + if (node.moduleReference.type === types_1.AST_NODE_TYPES.TSQualifiedName) { + let moduleIdentifier = node.moduleReference.left; + while (moduleIdentifier.type === types_1.AST_NODE_TYPES.TSQualifiedName) { + moduleIdentifier = moduleIdentifier.left; + } + this.visit(moduleIdentifier); + } + else { + this.visit(node.moduleReference); + } + } + TSInstantiationExpression(node) { + this.visitChildren(node, ['typeArguments']); + this.visitType(node.typeArguments); + } + TSInterfaceDeclaration(node) { + this.visitType(node); + } + TSModuleDeclaration(node) { + if (node.id.type === types_1.AST_NODE_TYPES.Identifier && node.kind !== 'global') { + this.currentScope().defineIdentifier(node.id, new definition_1.TSModuleNameDefinition(node.id, node)); + } + this.scopeManager.nestTSModuleScope(node); + this.visit(node.body); + this.close(node); + } + TSSatisfiesExpression(node) { + this.visitTypeAssertion(node); + } + TSTypeAliasDeclaration(node) { + this.visitType(node); + } + TSTypeAssertion(node) { + this.visitTypeAssertion(node); + } + UpdateExpression(node) { + const argument = this.visitExpressionTarget(node.argument); + if (PatternVisitor_1.PatternVisitor.isPattern(argument)) { + this.visitPattern(argument, pattern => { + this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.ReadWrite, null); + }); + } + else { + this.visitChildren(node); + } + } + VariableDeclaration(node) { + const variableTargetScope = node.kind === 'var' + ? this.currentScope().variableScope + : this.currentScope(); + for (const decl of node.declarations) { + const init = decl.init; + this.visitPattern(decl.id, (pattern, info) => { + variableTargetScope.defineIdentifier(pattern, new definition_1.VariableDefinition(pattern, decl, node)); + this.referencingDefaultValue(pattern, info.assignments, null, true); + if (init) { + this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, init, null, true); + } + }, { processRightHandNodes: true }); + this.visit(decl.init); + this.visitType(decl.id.typeAnnotation); + } + } + WithStatement(node) { + this.visit(node.object); + // Then nest scope for WithStatement. + this.scopeManager.nestWithScope(node); + this.visit(node.body); + this.close(node); + } + visitExpressionTarget(left) { + switch (left.type) { + case types_1.AST_NODE_TYPES.TSAsExpression: + case types_1.AST_NODE_TYPES.TSTypeAssertion: + // explicitly visit the type annotation + this.visitType(left.typeAnnotation); + // intentional fallthrough + case types_1.AST_NODE_TYPES.TSNonNullExpression: + // unwrap the expression + left = left.expression; + } + return left; + } +} +exports.Referencer = Referencer; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts new file mode 100644 index 0000000..dbe23c4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts @@ -0,0 +1,32 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Referencer } from './Referencer'; +import { Visitor } from './Visitor'; +export declare class TypeVisitor extends Visitor { + #private; + constructor(referencer: Referencer); + static visit(referencer: Referencer, node: TSESTree.Node): void; + protected visitFunctionType(node: TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSFunctionType | TSESTree.TSMethodSignature): void; + protected visitPropertyKey(node: TSESTree.TSMethodSignature | TSESTree.TSPropertySignature): void; + protected Identifier(node: TSESTree.Identifier): void; + protected MemberExpression(node: TSESTree.MemberExpression): void; + protected TSCallSignatureDeclaration(node: TSESTree.TSCallSignatureDeclaration): void; + protected TSConditionalType(node: TSESTree.TSConditionalType): void; + protected TSConstructorType(node: TSESTree.TSConstructorType): void; + protected TSConstructSignatureDeclaration(node: TSESTree.TSConstructSignatureDeclaration): void; + protected TSFunctionType(node: TSESTree.TSFunctionType): void; + protected TSImportType(node: TSESTree.TSImportType): void; + protected TSIndexSignature(node: TSESTree.TSIndexSignature): void; + protected TSInferType(node: TSESTree.TSInferType): void; + protected TSInterfaceDeclaration(node: TSESTree.TSInterfaceDeclaration): void; + protected TSMappedType(node: TSESTree.TSMappedType): void; + protected TSMethodSignature(node: TSESTree.TSMethodSignature): void; + protected TSNamedTupleMember(node: TSESTree.TSNamedTupleMember): void; + protected TSPropertySignature(node: TSESTree.TSPropertySignature): void; + protected TSQualifiedName(node: TSESTree.TSQualifiedName): void; + protected TSTypeAliasDeclaration(node: TSESTree.TSTypeAliasDeclaration): void; + protected TSTypeParameter(node: TSESTree.TSTypeParameter): void; + protected TSTypePredicate(node: TSESTree.TSTypePredicate): void; + protected TSTypeAnnotation(node: TSESTree.TSTypeAnnotation): void; + protected TSTypeQuery(node: TSESTree.TSTypeQuery): void; +} +//# sourceMappingURL=TypeVisitor.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts.map new file mode 100644 index 0000000..ffad797 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TypeVisitor.d.ts","sourceRoot":"","sources":["../../src/referencer/TypeVisitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0B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AE,QAAQ,CAAC,gBAAgB,GAAG,IAAI;IASjE,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,WAAW,GAAG,IAAI;IAwCvD,SAAS,CAAC,sBAAsB,CAC9B,IAAI,EAAE,QAAQ,CAAC,sBAAsB,GACpC,IAAI;IAmBP,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,YAAY,GAAG,IAAI;IAYzD,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,iBAAiB,GAAG,IAAI;IAKnE,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,kBAAkB,GAAG,IAAI;IAKrE,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,mBAAmB,GAAG,IAAI;IAKvE,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,GAAG,IAAI;IAK/D,SAAS,CAAC,sBAAsB,CAC9B,IAAI,EAAE,QAAQ,CAAC,sBAAsB,GACpC,IAAI;IAkBP,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,GAAG,IAAI;IAS/D,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,GAAG,IAAI;IAQ/D,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,GAAG,IAAI;IAKjE,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,WAAW,GAAG,IAAI;CAwBxD"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js new file mode 100644 index 0000000..43734e8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js @@ -0,0 +1,221 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeVisitor = void 0; +const types_1 = require("@typescript-eslint/types"); +const definition_1 = require("../definition"); +const scope_1 = require("../scope"); +const Visitor_1 = require("./Visitor"); +class TypeVisitor extends Visitor_1.Visitor { + #referencer; + constructor(referencer) { + super(referencer); + this.#referencer = referencer; + } + static visit(referencer, node) { + const typeReferencer = new TypeVisitor(referencer); + typeReferencer.visit(node); + } + /////////////////// + // Visit helpers // + /////////////////// + visitFunctionType(node) { + // arguments and type parameters can only be referenced from within the function + this.#referencer.scopeManager.nestFunctionTypeScope(node); + this.visit(node.typeParameters); + for (const param of node.params) { + let didVisitAnnotation = false; + this.visitPattern(param, (pattern, info) => { + // a parameter name creates a value type variable which can be referenced later via typeof arg + this.#referencer + .currentScope() + .defineIdentifier(pattern, new definition_1.ParameterDefinition(pattern, node, info.rest)); + if (pattern.typeAnnotation) { + this.visit(pattern.typeAnnotation); + didVisitAnnotation = true; + } + }); + // there are a few special cases where the type annotation is owned by the parameter, not the pattern + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (!didVisitAnnotation && 'typeAnnotation' in param) { + this.visit(param.typeAnnotation); + } + } + this.visit(node.returnType); + this.#referencer.close(node); + } + visitPropertyKey(node) { + if (!node.computed) { + return; + } + // computed members are treated as value references, and TS expects they have a literal type + this.#referencer.visit(node.key); + } + ///////////////////// + // Visit selectors // + ///////////////////// + Identifier(node) { + this.#referencer.currentScope().referenceType(node); + } + MemberExpression(node) { + this.visit(node.object); + // don't visit the property + } + TSCallSignatureDeclaration(node) { + this.visitFunctionType(node); + } + TSConditionalType(node) { + // conditional types can define inferred type parameters + // which are only accessible from inside the conditional parameter + this.#referencer.scopeManager.nestConditionalTypeScope(node); + // type parameters inferred in the condition clause are not accessible within the false branch + this.visitChildren(node, ['falseType']); + this.#referencer.close(node); + this.visit(node.falseType); + } + TSConstructorType(node) { + this.visitFunctionType(node); + } + TSConstructSignatureDeclaration(node) { + this.visitFunctionType(node); + } + TSFunctionType(node) { + this.visitFunctionType(node); + } + TSImportType(node) { + // the TS parser allows any type to be the parameter, but it's a syntax error - so we can ignore it + this.visit(node.typeArguments); + // the qualifier is just part of a standard EntityName, so it should not be visited + } + TSIndexSignature(node) { + for (const param of node.parameters) { + if (param.type === types_1.AST_NODE_TYPES.Identifier) { + this.visit(param.typeAnnotation); + } + } + this.visit(node.typeAnnotation); + } + TSInferType(node) { + const typeParameter = node.typeParameter; + let scope = this.#referencer.currentScope(); + /* + In cases where there is a sub-type scope created within a conditional type, then the generic should be defined in the + conditional type's scope, not the child type scope. + If we define it within the child type's scope then it won't be able to be referenced outside the child type + */ + if (scope.type === scope_1.ScopeType.functionType || + scope.type === scope_1.ScopeType.mappedType) { + // search up the scope tree to figure out if we're in a nested type scope + let currentScope = scope.upper; + while (currentScope) { + if (currentScope.type === scope_1.ScopeType.functionType || + currentScope.type === scope_1.ScopeType.mappedType) { + // ensure valid type parents only + currentScope = currentScope.upper; + continue; + } + if (currentScope.type === scope_1.ScopeType.conditionalType) { + scope = currentScope; + break; + } + break; + } + } + scope.defineIdentifier(typeParameter.name, new definition_1.TypeDefinition(typeParameter.name, typeParameter)); + this.visit(typeParameter.constraint); + } + TSInterfaceDeclaration(node) { + this.#referencer + .currentScope() + .defineIdentifier(node.id, new definition_1.TypeDefinition(node.id, node)); + if (node.typeParameters) { + // type parameters cannot be referenced from outside their current scope + this.#referencer.scopeManager.nestTypeScope(node); + this.visit(node.typeParameters); + } + node.extends.forEach(this.visit, this); + this.visit(node.body); + if (node.typeParameters) { + this.#referencer.close(node); + } + } + TSMappedType(node) { + // mapped types key can only be referenced within their return value + this.#referencer.scopeManager.nestMappedTypeScope(node); + this.#referencer + .currentScope() + .defineIdentifier(node.key, new definition_1.TypeDefinition(node.key, node)); + this.visit(node.constraint); + this.visit(node.nameType); + this.visit(node.typeAnnotation); + this.#referencer.close(node); + } + TSMethodSignature(node) { + this.visitPropertyKey(node); + this.visitFunctionType(node); + } + TSNamedTupleMember(node) { + this.visit(node.elementType); + // we don't visit the label as the label only exists for the purposes of documentation + } + TSPropertySignature(node) { + this.visitPropertyKey(node); + this.visit(node.typeAnnotation); + } + TSQualifiedName(node) { + this.visit(node.left); + // we don't visit the right as it a name on the thing, not a name to reference + } + TSTypeAliasDeclaration(node) { + this.#referencer + .currentScope() + .defineIdentifier(node.id, new definition_1.TypeDefinition(node.id, node)); + if (node.typeParameters) { + // type parameters cannot be referenced from outside their current scope + this.#referencer.scopeManager.nestTypeScope(node); + this.visit(node.typeParameters); + } + this.visit(node.typeAnnotation); + if (node.typeParameters) { + this.#referencer.close(node); + } + } + TSTypeParameter(node) { + this.#referencer + .currentScope() + .defineIdentifier(node.name, new definition_1.TypeDefinition(node.name, node)); + this.visit(node.constraint); + this.visit(node.default); + } + TSTypePredicate(node) { + if (node.parameterName.type !== types_1.AST_NODE_TYPES.TSThisType) { + this.#referencer.currentScope().referenceValue(node.parameterName); + } + this.visit(node.typeAnnotation); + } + // a type query `typeof foo` is a special case that references a _non-type_ variable, + TSTypeAnnotation(node) { + // check + this.visitChildren(node); + } + TSTypeQuery(node) { + let entityName; + if (node.exprName.type === types_1.AST_NODE_TYPES.TSQualifiedName) { + let iter = node.exprName; + while (iter.left.type === types_1.AST_NODE_TYPES.TSQualifiedName) { + iter = iter.left; + } + entityName = iter.left; + } + else { + entityName = node.exprName; + if (node.exprName.type === types_1.AST_NODE_TYPES.TSImportType) { + this.visit(node.exprName); + } + } + if (entityName.type === types_1.AST_NODE_TYPES.Identifier) { + this.#referencer.currentScope().referenceValue(entityName); + } + this.visit(node.typeArguments); + } +} +exports.TypeVisitor = TypeVisitor; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts new file mode 100644 index 0000000..e22ffd7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts @@ -0,0 +1,14 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { PatternVisitorCallback, PatternVisitorOptions } from './PatternVisitor'; +import type { VisitorOptions } from './VisitorBase'; +import { VisitorBase } from './VisitorBase'; +interface VisitPatternOptions extends PatternVisitorOptions { + processRightHandNodes?: boolean; +} +export declare class Visitor extends VisitorBase { + #private; + constructor(optionsOrVisitor: Visitor | VisitorOptions); + protected visitPattern(node: TSESTree.Node, callback: PatternVisitorCallback, options?: VisitPatternOptions): void; +} +export { VisitorBase, type VisitorOptions } from './VisitorBase'; +//# sourceMappingURL=Visitor.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts.map new file mode 100644 index 0000000..332a033 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Visitor.d.ts","sourceRoot":"","sources":["../../src/referencer/Visitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,UAAU,mBAAoB,SAAQ,qBAAqB;IACzD,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AACD,qBAAa,OAAQ,SAAQ,WAAW;;gBAE1B,gBAAgB,EAAE,OAAO,GAAG,cAAc;IAatD,SAAS,CAAC,YAAY,CACpB,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,QAAQ,EAAE,sBAAsB,EAChC,OAAO,GAAE,mBAAsD,GAC9D,IAAI;CAWR;AAED,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js new file mode 100644 index 0000000..3b477d7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VisitorBase = exports.Visitor = void 0; +const PatternVisitor_1 = require("./PatternVisitor"); +const VisitorBase_1 = require("./VisitorBase"); +class Visitor extends VisitorBase_1.VisitorBase { + #options; + constructor(optionsOrVisitor) { + super(optionsOrVisitor instanceof Visitor + ? optionsOrVisitor.#options + : optionsOrVisitor); + this.#options = + optionsOrVisitor instanceof Visitor + ? optionsOrVisitor.#options + : optionsOrVisitor; + } + visitPattern(node, callback, options = { processRightHandNodes: false }) { + // Call the callback at left hand identifier nodes, and Collect right hand nodes. + const visitor = new PatternVisitor_1.PatternVisitor(this.#options, node, callback); + visitor.visit(node); + // Process the right hand nodes recursively. + if (options.processRightHandNodes) { + visitor.rightHandNodes.forEach(this.visit, this); + } + } +} +exports.Visitor = Visitor; +var VisitorBase_2 = require("./VisitorBase"); +Object.defineProperty(exports, "VisitorBase", { enumerable: true, get: function () { return VisitorBase_2.VisitorBase; } }); diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts new file mode 100644 index 0000000..d681d8e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts @@ -0,0 +1,22 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { VisitorKeys } from '@typescript-eslint/visitor-keys'; +export interface VisitorOptions { + childVisitorKeys?: VisitorKeys | null; + visitChildrenEvenIfSelectorExists?: boolean; +} +export declare abstract class VisitorBase { + #private; + constructor(options: VisitorOptions); + /** + * Default method for visiting children. + * @param node the node whose children should be visited + * @param excludeArr a list of keys to not visit + */ + visitChildren(node: T | null | undefined, excludeArr?: (keyof T)[]): void; + /** + * Dispatching node. + */ + visit(node: TSESTree.Node | null | undefined): void; +} +export type { VisitorKeys } from '@typescript-eslint/visitor-keys'; +//# sourceMappingURL=VisitorBase.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts.map new file mode 100644 index 0000000..819c86b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"VisitorBase.d.ts","sourceRoot":"","sources":["../../src/referencer/VisitorBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAInE,MAAM,WAAW,cAAc;IAC7B,gBAAgB,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACtC,iCAAiC,CAAC,EAAE,OAAO,CAAC;CAC7C;AAaD,8BAAsB,WAAW;;gBAGnB,OAAO,EAAE,cAAc;IAMnC;;;;OAIG;IACH,aAAa,CAAC,CAAC,SAAS,QAAQ,CAAC,IAAI,EACnC,IAAI,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC1B,UAAU,GAAE,CAAC,MAAM,CAAC,CAAC,EAAO,GAC3B,IAAI;IA6BP;;OAEG;IACH,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI;CAepD;AAED,YAAY,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js new file mode 100644 index 0000000..3e82c45 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js @@ -0,0 +1,67 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VisitorBase = void 0; +const visitor_keys_1 = require("@typescript-eslint/visitor-keys"); +function isObject(obj) { + return typeof obj === 'object' && obj != null; +} +function isNode(node) { + return isObject(node) && typeof node.type === 'string'; +} +class VisitorBase { + #childVisitorKeys; + #visitChildrenEvenIfSelectorExists; + constructor(options) { + this.#childVisitorKeys = options.childVisitorKeys ?? visitor_keys_1.visitorKeys; + this.#visitChildrenEvenIfSelectorExists = + options.visitChildrenEvenIfSelectorExists ?? false; + } + /** + * Default method for visiting children. + * @param node the node whose children should be visited + * @param excludeArr a list of keys to not visit + */ + visitChildren(node, excludeArr = []) { + if (node?.type == null) { + return; + } + const exclude = new Set([...excludeArr, 'parent']); + const children = this.#childVisitorKeys[node.type] ?? Object.keys(node); + for (const key of children) { + if (exclude.has(key)) { + continue; + } + const child = node[key]; + if (!child) { + continue; + } + if (Array.isArray(child)) { + for (const subChild of child) { + if (isNode(subChild)) { + this.visit(subChild); + } + } + } + else if (isNode(child)) { + this.visit(child); + } + } + } + /** + * Dispatching node. + */ + visit(node) { + if (node?.type == null) { + return; + } + const visitor = this[node.type]; + if (visitor) { + visitor.call(this, node); + if (!this.#visitChildrenEvenIfSelectorExists) { + return; + } + } + this.visitChildren(node); + } +} +exports.VisitorBase = VisitorBase; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts new file mode 100644 index 0000000..e359d8c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts @@ -0,0 +1,2 @@ +export { Referencer, type ReferencerOptions } from './Referencer'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts.map new file mode 100644 index 0000000..6b0615f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/referencer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js new file mode 100644 index 0000000..6ea565c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Referencer = void 0; +var Referencer_1 = require("./Referencer"); +Object.defineProperty(exports, "Referencer", { enumerable: true, get: function () { return Referencer_1.Referencer; } }); diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts new file mode 100644 index 0000000..af4d17f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class BlockScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: BlockScope['upper'], block: BlockScope['block']); +} +//# sourceMappingURL=BlockScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts.map new file mode 100644 index 0000000..eb761c7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BlockScope.d.ts","sourceRoot":"","sources":["../../src/scope/BlockScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,UAAW,SAAQ,SAAS,CACvC,SAAS,CAAC,KAAK,EACf,QAAQ,CAAC,cAAc,EACvB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,EAC/B,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;CAI7B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js new file mode 100644 index 0000000..200c5e1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BlockScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class BlockScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.block, upperScope, block, false); + } +} +exports.BlockScope = BlockScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts new file mode 100644 index 0000000..b013bb9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class CatchScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: CatchScope['upper'], block: CatchScope['block']); +} +//# sourceMappingURL=CatchScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts.map new file mode 100644 index 0000000..b928b32 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CatchScope.d.ts","sourceRoot":"","sources":["../../src/scope/CatchScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,UAAW,SAAQ,SAAS,CACvC,SAAS,CAAC,KAAK,EACf,QAAQ,CAAC,WAAW,EACpB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,EAC/B,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;CAI7B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js new file mode 100644 index 0000000..82d9768 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CatchScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class CatchScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.catch, upperScope, block, false); + } +} +exports.CatchScope = CatchScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts new file mode 100644 index 0000000..d421d20 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class ClassFieldInitializerScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: ClassFieldInitializerScope['upper'], block: ClassFieldInitializerScope['block']); +} +//# sourceMappingURL=ClassFieldInitializerScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts.map new file mode 100644 index 0000000..e5a3073 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassFieldInitializerScope.d.ts","sourceRoot":"","sources":["../../src/scope/ClassFieldInitializerScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,0BAA2B,SAAQ,SAAS,CACvD,SAAS,CAAC,qBAAqB,EAE/B,QAAQ,CAAC,UAAU,EACnB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,0BAA0B,CAAC,OAAO,CAAC,EAC/C,KAAK,EAAE,0BAA0B,CAAC,OAAO,CAAC;CAU7C"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js new file mode 100644 index 0000000..aa82588 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ClassFieldInitializerScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class ClassFieldInitializerScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.classFieldInitializer, upperScope, block, false); + } +} +exports.ClassFieldInitializerScope = ClassFieldInitializerScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts new file mode 100644 index 0000000..2072f4f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class ClassScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: ClassScope['upper'], block: ClassScope['block']); +} +//# sourceMappingURL=ClassScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts.map new file mode 100644 index 0000000..e5cebac --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassScope.d.ts","sourceRoot":"","sources":["../../src/scope/ClassScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,UAAW,SAAQ,SAAS,CACvC,SAAS,CAAC,KAAK,EACf,QAAQ,CAAC,gBAAgB,GAAG,QAAQ,CAAC,eAAe,EACpD,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,EAC/B,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;CAI7B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js new file mode 100644 index 0000000..52ada6a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ClassScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class ClassScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.class, upperScope, block, false); + } +} +exports.ClassScope = ClassScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts new file mode 100644 index 0000000..c8a2117 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class ClassStaticBlockScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: ClassStaticBlockScope['upper'], block: ClassStaticBlockScope['block']); +} +//# sourceMappingURL=ClassStaticBlockScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts.map new file mode 100644 index 0000000..28c4759 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassStaticBlockScope.d.ts","sourceRoot":"","sources":["../../src/scope/ClassStaticBlockScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,qBAAsB,SAAQ,SAAS,CAClD,SAAS,CAAC,gBAAgB,EAC1B,QAAQ,CAAC,WAAW,EACpB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,qBAAqB,CAAC,OAAO,CAAC,EAC1C,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC;CAIxC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js new file mode 100644 index 0000000..8a1bd82 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ClassStaticBlockScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class ClassStaticBlockScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.classStaticBlock, upperScope, block, false); + } +} +exports.ClassStaticBlockScope = ClassStaticBlockScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts new file mode 100644 index 0000000..9194252 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class ConditionalTypeScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: ConditionalTypeScope['upper'], block: ConditionalTypeScope['block']); +} +//# sourceMappingURL=ConditionalTypeScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts.map new file mode 100644 index 0000000..9b670f3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ConditionalTypeScope.d.ts","sourceRoot":"","sources":["../../src/scope/ConditionalTypeScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,oBAAqB,SAAQ,SAAS,CACjD,SAAS,CAAC,eAAe,EACzB,QAAQ,CAAC,iBAAiB,EAC1B,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,oBAAoB,CAAC,OAAO,CAAC,EACzC,KAAK,EAAE,oBAAoB,CAAC,OAAO,CAAC;CAIvC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js new file mode 100644 index 0000000..de46f2c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConditionalTypeScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class ConditionalTypeScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.conditionalType, upperScope, block, false); + } +} +exports.ConditionalTypeScope = ConditionalTypeScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts new file mode 100644 index 0000000..a0935a3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class ForScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: ForScope['upper'], block: ForScope['block']); +} +//# sourceMappingURL=ForScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts.map new file mode 100644 index 0000000..1115d48 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ForScope.d.ts","sourceRoot":"","sources":["../../src/scope/ForScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,QAAS,SAAQ,SAAS,CACrC,SAAS,CAAC,GAAG,EACb,QAAQ,CAAC,cAAc,GAAG,QAAQ,CAAC,cAAc,GAAG,QAAQ,CAAC,YAAY,EACzE,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,EAC7B,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC;CAI3B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js new file mode 100644 index 0000000..89976ca --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ForScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class ForScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.for, upperScope, block, false); + } +} +exports.ForScope = ForScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts new file mode 100644 index 0000000..67d8ff9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class FunctionExpressionNameScope extends ScopeBase { + readonly functionExpressionScope: true; + constructor(scopeManager: ScopeManager, upperScope: FunctionExpressionNameScope['upper'], block: FunctionExpressionNameScope['block']); +} +//# sourceMappingURL=FunctionExpressionNameScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts.map new file mode 100644 index 0000000..146bdb6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"FunctionExpressionNameScope.d.ts","sourceRoot":"","sources":["../../src/scope/FunctionExpressionNameScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,2BAA4B,SAAQ,SAAS,CACxD,SAAS,CAAC,sBAAsB,EAChC,QAAQ,CAAC,kBAAkB,EAC3B,KAAK,CACN;IACC,SAAyB,uBAAuB,EAAE,IAAI,CAAC;gBAGrD,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,2BAA2B,CAAC,OAAO,CAAC,EAChD,KAAK,EAAE,2BAA2B,CAAC,OAAO,CAAC;CAiB9C"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js new file mode 100644 index 0000000..7c5723c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FunctionExpressionNameScope = void 0; +const definition_1 = require("../definition"); +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class FunctionExpressionNameScope extends ScopeBase_1.ScopeBase { + functionExpressionScope; + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.functionExpressionName, upperScope, block, false); + if (block.id) { + this.defineIdentifier(block.id, new definition_1.FunctionNameDefinition(block.id, block)); + } + this.functionExpressionScope = true; + } +} +exports.FunctionExpressionNameScope = FunctionExpressionNameScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts new file mode 100644 index 0000000..02916bb --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts @@ -0,0 +1,12 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Reference } from '../referencer/Reference'; +import type { ScopeManager } from '../ScopeManager'; +import type { Variable } from '../variable'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class FunctionScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: FunctionScope['upper'], block: FunctionScope['block'], isMethodDefinition: boolean); + protected isValidResolution(ref: Reference, variable: Variable): boolean; +} +//# sourceMappingURL=FunctionScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts.map new file mode 100644 index 0000000..56264b3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"FunctionScope.d.ts","sourceRoot":"","sources":["../../src/scope/FunctionScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,aAAc,SAAQ,SAAS,CAC1C,SAAS,CAAC,QAAQ,EAChB,QAAQ,CAAC,uBAAuB,GAChC,QAAQ,CAAC,mBAAmB,GAC5B,QAAQ,CAAC,kBAAkB,GAC3B,QAAQ,CAAC,OAAO,GAChB,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,6BAA6B,EACxC,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,EAClC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAC7B,kBAAkB,EAAE,OAAO;cAuBV,iBAAiB,CAClC,GAAG,EAAE,SAAS,EACd,QAAQ,EAAE,QAAQ,GACjB,OAAO;CAiBX"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js new file mode 100644 index 0000000..bf7b5fa --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FunctionScope = void 0; +const types_1 = require("@typescript-eslint/types"); +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class FunctionScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block, isMethodDefinition) { + super(scopeManager, ScopeType_1.ScopeType.function, upperScope, block, isMethodDefinition); + // section 9.2.13, FunctionDeclarationInstantiation. + // NOTE Arrow functions never have an arguments objects. + if (this.block.type !== types_1.AST_NODE_TYPES.ArrowFunctionExpression) { + this.defineVariable('arguments', this.set, this.variables, null, null); + } + } + // References in default parameters isn't resolved to variables which are in their function body. + // const x = 1 + // function f(a = x) { // This `x` is resolved to the `x` in the outer scope. + // const x = 2 + // console.log(a) + // } + isValidResolution(ref, variable) { + // If `options.globalReturn` is true, `this.block` becomes a Program node. + if (this.block.type === types_1.AST_NODE_TYPES.Program) { + return true; + } + const bodyStart = this.block.body?.range[0] ?? -1; + // It's invalid resolution in the following case: + return !((variable.scope === this && + ref.identifier.range[0] < bodyStart && // the reference is in the parameter part. + variable.defs.every(d => d.name.range[0] >= bodyStart)) // the variable is in the body. + ); + } +} +exports.FunctionScope = FunctionScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts new file mode 100644 index 0000000..7375a12 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class FunctionTypeScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: FunctionTypeScope['upper'], block: FunctionTypeScope['block']); +} +//# sourceMappingURL=FunctionTypeScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts.map new file mode 100644 index 0000000..c71aa11 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"FunctionTypeScope.d.ts","sourceRoot":"","sources":["../../src/scope/FunctionTypeScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,iBAAkB,SAAQ,SAAS,CAC9C,SAAS,CAAC,YAAY,EACpB,QAAQ,CAAC,0BAA0B,GACnC,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,+BAA+B,GACxC,QAAQ,CAAC,cAAc,GACvB,QAAQ,CAAC,iBAAiB,EAC5B,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,iBAAiB,CAAC,OAAO,CAAC,EACtC,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC;CAIpC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js new file mode 100644 index 0000000..cb461e7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FunctionTypeScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class FunctionTypeScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.functionType, upperScope, block, false); + } +} +exports.FunctionTypeScope = FunctionTypeScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts new file mode 100644 index 0000000..b49ed06 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts @@ -0,0 +1,17 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { ImplicitLibVariableOptions } from '../variable'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class GlobalScope extends ScopeBase { + private readonly implicit; + constructor(scopeManager: ScopeManager, block: GlobalScope['block']); + close(scopeManager: ScopeManager): Scope | null; + defineImplicitVariable(name: string, options: ImplicitLibVariableOptions): void; +} +//# sourceMappingURL=GlobalScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts.map new file mode 100644 index 0000000..cf57d08 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GlobalScope.d.ts","sourceRoot":"","sources":["../../src/scope/GlobalScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAKzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,0BAA0B,EAAY,MAAM,aAAa,CAAC;AACxE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAKrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,WAAY,SAAQ,SAAS,CACxC,SAAS,CAAC,MAAM,EAChB,QAAQ,CAAC,OAAO;AAChB;;GAEG;AACH,IAAI,CACL;IAEC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAQvB;gBAEU,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC;IASnD,KAAK,CAAC,YAAY,EAAE,YAAY,GAAG,KAAK,GAAG,IAAI;IAwBxD,sBAAsB,CAC3B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,0BAA0B,GAClC,IAAI;CASR"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js new file mode 100644 index 0000000..6eb9d63 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GlobalScope = void 0; +const types_1 = require("@typescript-eslint/types"); +const assert_1 = require("../assert"); +const ImplicitGlobalVariableDefinition_1 = require("../definition/ImplicitGlobalVariableDefinition"); +const variable_1 = require("../variable"); +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class GlobalScope extends ScopeBase_1.ScopeBase { + // note this is accessed in used in the legacy eslint-scope tests, so it can't be true private + implicit; + constructor(scopeManager, block) { + super(scopeManager, ScopeType_1.ScopeType.global, null, block, false); + this.implicit = { + leftToBeResolved: [], + set: new Map(), + variables: [], + }; + } + close(scopeManager) { + (0, assert_1.assert)(this.leftToResolve); + for (const ref of this.leftToResolve) { + if (ref.maybeImplicitGlobal && !this.set.has(ref.identifier.name)) { + // create an implicit global variable from assignment expression + const info = ref.maybeImplicitGlobal; + const node = info.pattern; + if (node.type === types_1.AST_NODE_TYPES.Identifier) { + this.defineVariable(node.name, this.implicit.set, this.implicit.variables, node, new ImplicitGlobalVariableDefinition_1.ImplicitGlobalVariableDefinition(info.pattern, info.node)); + } + } + } + this.implicit.leftToBeResolved = this.leftToResolve; + return super.close(scopeManager); + } + defineImplicitVariable(name, options) { + this.defineVariable(new variable_1.ImplicitLibVariable(this, name, options), this.set, this.variables, null, null); + } +} +exports.GlobalScope = GlobalScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts new file mode 100644 index 0000000..74353b4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class MappedTypeScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: MappedTypeScope['upper'], block: MappedTypeScope['block']); +} +//# sourceMappingURL=MappedTypeScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts.map new file mode 100644 index 0000000..e41b342 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MappedTypeScope.d.ts","sourceRoot":"","sources":["../../src/scope/MappedTypeScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,eAAgB,SAAQ,SAAS,CAC5C,SAAS,CAAC,UAAU,EACpB,QAAQ,CAAC,YAAY,EACrB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,eAAe,CAAC,OAAO,CAAC,EACpC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC;CAIlC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js new file mode 100644 index 0000000..ea8aba4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MappedTypeScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class MappedTypeScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.mappedType, upperScope, block, false); + } +} +exports.MappedTypeScope = MappedTypeScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts new file mode 100644 index 0000000..0e5a4aa --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class ModuleScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: ModuleScope['upper'], block: ModuleScope['block']); +} +//# sourceMappingURL=ModuleScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts.map new file mode 100644 index 0000000..9155e54 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ModuleScope.d.ts","sourceRoot":"","sources":["../../src/scope/ModuleScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,WAAY,SAAQ,SAAS,CACxC,SAAS,CAAC,MAAM,EAChB,QAAQ,CAAC,OAAO,EAChB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,EAChC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC;CAI9B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js new file mode 100644 index 0000000..0839855 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ModuleScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class ModuleScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.module, upperScope, block, false); + } +} +exports.ModuleScope = ModuleScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts new file mode 100644 index 0000000..548fb4f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts @@ -0,0 +1,20 @@ +import type { BlockScope } from './BlockScope'; +import type { CatchScope } from './CatchScope'; +import type { ClassFieldInitializerScope } from './ClassFieldInitializerScope'; +import type { ClassScope } from './ClassScope'; +import type { ClassStaticBlockScope } from './ClassStaticBlockScope'; +import type { ConditionalTypeScope } from './ConditionalTypeScope'; +import type { ForScope } from './ForScope'; +import type { FunctionExpressionNameScope } from './FunctionExpressionNameScope'; +import type { FunctionScope } from './FunctionScope'; +import type { FunctionTypeScope } from './FunctionTypeScope'; +import type { GlobalScope } from './GlobalScope'; +import type { MappedTypeScope } from './MappedTypeScope'; +import type { ModuleScope } from './ModuleScope'; +import type { SwitchScope } from './SwitchScope'; +import type { TSEnumScope } from './TSEnumScope'; +import type { TSModuleScope } from './TSModuleScope'; +import type { TypeScope } from './TypeScope'; +import type { WithScope } from './WithScope'; +export type Scope = BlockScope | CatchScope | ClassFieldInitializerScope | ClassScope | ClassStaticBlockScope | ConditionalTypeScope | ForScope | FunctionExpressionNameScope | FunctionScope | FunctionTypeScope | GlobalScope | MappedTypeScope | ModuleScope | SwitchScope | TSEnumScope | TSModuleScope | TypeScope | WithScope; +//# sourceMappingURL=Scope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts.map new file mode 100644 index 0000000..a5dd01c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Scope.d.ts","sourceRoot":"","sources":["../../src/scope/Scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,KAAK,GACb,UAAU,GACV,UAAU,GACV,0BAA0B,GAC1B,UAAU,GACV,qBAAqB,GACrB,oBAAoB,GACpB,QAAQ,GACR,2BAA2B,GAC3B,aAAa,GACb,iBAAiB,GACjB,WAAW,GACX,eAAe,GACf,WAAW,GACX,WAAW,GACX,WAAW,GACX,aAAa,GACb,SAAS,GACT,SAAS,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js new file mode 100644 index 0000000..fabb051 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts new file mode 100644 index 0000000..c4e5a6a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts @@ -0,0 +1,98 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Definition } from '../definition'; +import type { ReferenceImplicitGlobal } from '../referencer/Reference'; +import type { ScopeManager } from '../ScopeManager'; +import type { FunctionScope } from './FunctionScope'; +import type { GlobalScope } from './GlobalScope'; +import type { ModuleScope } from './ModuleScope'; +import type { Scope } from './Scope'; +import type { TSModuleScope } from './TSModuleScope'; +import { Reference, ReferenceFlag } from '../referencer/Reference'; +import { Variable } from '../variable'; +import { ScopeType } from './ScopeType'; +type VariableScope = FunctionScope | GlobalScope | ModuleScope | TSModuleScope; +export declare abstract class ScopeBase { + #private; + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + readonly $id: number; + /** + * The AST node which created this scope. + * @public + */ + readonly block: Block; + /** + * The array of child scopes. This does not include grandchild scopes. + * @public + */ + readonly childScopes: Scope[]; + /** + * Whether this scope is created by a FunctionExpression. + * @public + */ + readonly functionExpressionScope: boolean; + /** + * Whether 'use strict' is in effect in this scope. + * @public + */ + isStrict: boolean; + /** + * List of {@link Reference}s that are left to be resolved (i.e. which + * need to be linked to the variable they refer to). + */ + protected leftToResolve: Reference[] | null; + /** + * Any variable {@link Reference} found in this scope. + * This includes occurrences of local variables as well as variables from parent scopes (including the global scope). + * For local variables this also includes defining occurrences (like in a 'var' statement). + * In a 'function' scope this does not include the occurrences of the formal parameter in the parameter list. + * @public + */ + readonly references: Reference[]; + /** + * The map from variable names to variable objects. + * @public + */ + readonly set: Map; + /** + * The {@link Reference}s that are not resolved with this scope. + * @public + */ + readonly through: Reference[]; + readonly type: Type; + /** + * Reference to the parent {@link Scope}. + * @public + */ + readonly upper: Upper; + /** + * The scoped {@link Variable}s of this scope. + * In the case of a 'function' scope this includes the automatic argument `arguments` as its first element, as well + * as all further formal arguments. + * This does not include variables which are defined in child scopes. + * @public + */ + readonly variables: Variable[]; + readonly variableScope: VariableScope; + constructor(scopeManager: ScopeManager, type: Type, upperScope: Upper, block: Block, isMethodDefinition: boolean); + private isVariableScope; + private shouldStaticallyCloseForGlobal; + close(scopeManager: ScopeManager): Scope | null; + shouldStaticallyClose(): boolean; + /** + * To override by function scopes. + * References in default parameters isn't resolved to variables which are in their function body. + */ + protected defineVariable(nameOrVariable: string | Variable, set: Map, variables: Variable[], node: TSESTree.Identifier | null, def: Definition | null): void; + protected delegateToUpperScope(ref: Reference): void; + protected isValidResolution(_ref: Reference, _variable: Variable): boolean; + private addDeclaredVariablesOfNode; + defineIdentifier(node: TSESTree.Identifier, def: Definition): void; + defineLiteralIdentifier(node: TSESTree.StringLiteral, def: Definition): void; + referenceDualValueType(node: TSESTree.Identifier): void; + referenceType(node: TSESTree.Identifier): void; + referenceValue(node: TSESTree.Identifier | TSESTree.JSXIdentifier, assign?: ReferenceFlag, writeExpr?: TSESTree.Expression | null, maybeImplicitGlobal?: ReferenceImplicitGlobal | null, init?: boolean): void; +} +export {}; +//# sourceMappingURL=ScopeBase.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts.map new file mode 100644 index 0000000..ee93acc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ScopeBase.d.ts","sourceRoot":"","sources":["../../src/scope/ScopeBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKrD,OAAO,EACL,SAAS,EACT,aAAa,EAEd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAA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c,EAAE,MAAM,GAAG,QAAQ,EACjC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,EAC1B,SAAS,EAAE,QAAQ,EAAE,EACrB,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI,EAChC,GAAG,EAAE,UAAU,GAAG,IAAI,GACrB,IAAI;IAuBP,SAAS,CAAC,oBAAoB,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI;IAKpD,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,GAAG,OAAO;IAI1E,OAAO,CAAC,0BAA0B;IAmB3B,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI;IAIlE,uBAAuB,CAC5B,IAAI,EAAE,QAAQ,CAAC,aAAa,EAC5B,GAAG,EAAE,UAAU,GACd,IAAI;IAIA,sBAAsB,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI;IAevD,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI;IAe9C,cAAc,CACnB,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,EAClD,MAAM,GAAE,aAAkC,EAC1C,SAAS,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI,EACtC,mBAAmB,CAAC,EAAE,uBAAuB,GAAG,IAAI,EACpD,IAAI,UAAQ,GACX,IAAI;CAcR"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js new file mode 100644 index 0000000..b69ff47 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js @@ -0,0 +1,360 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ScopeBase = void 0; +const types_1 = require("@typescript-eslint/types"); +const assert_1 = require("../assert"); +const definition_1 = require("../definition"); +const ID_1 = require("../ID"); +const Reference_1 = require("../referencer/Reference"); +const variable_1 = require("../variable"); +const ScopeType_1 = require("./ScopeType"); +/** + * Test if scope is strict + */ +function isStrictScope(scope, block, isMethodDefinition) { + let body; + // When upper scope is exists and strict, inner scope is also strict. + if (scope.upper?.isStrict) { + return true; + } + if (isMethodDefinition) { + return true; + } + if (scope.type === ScopeType_1.ScopeType.class || + scope.type === ScopeType_1.ScopeType.conditionalType || + scope.type === ScopeType_1.ScopeType.functionType || + scope.type === ScopeType_1.ScopeType.mappedType || + scope.type === ScopeType_1.ScopeType.module || + scope.type === ScopeType_1.ScopeType.tsEnum || + scope.type === ScopeType_1.ScopeType.tsModule || + scope.type === ScopeType_1.ScopeType.type) { + return true; + } + if (scope.type === ScopeType_1.ScopeType.block || scope.type === ScopeType_1.ScopeType.switch) { + return false; + } + if (scope.type === ScopeType_1.ScopeType.function) { + const functionBody = block; + switch (functionBody.type) { + case types_1.AST_NODE_TYPES.ArrowFunctionExpression: + if (functionBody.body.type !== types_1.AST_NODE_TYPES.BlockStatement) { + return false; + } + body = functionBody.body; + break; + case types_1.AST_NODE_TYPES.Program: + body = functionBody; + break; + default: + body = functionBody.body; + } + if (!body) { + return false; + } + } + else if (scope.type === ScopeType_1.ScopeType.global) { + body = block; + } + else { + return false; + } + // Search 'use strict' directive. + for (const stmt of body.body) { + if (stmt.type !== types_1.AST_NODE_TYPES.ExpressionStatement) { + break; + } + if (stmt.directive === 'use strict') { + return true; + } + const expr = stmt.expression; + if (expr.type !== types_1.AST_NODE_TYPES.Literal) { + break; + } + if (expr.raw === '"use strict"' || expr.raw === "'use strict'") { + return true; + } + if (expr.value === 'use strict') { + return true; + } + } + return false; +} +function registerScope(scopeManager, scope) { + scopeManager.scopes.push(scope); + const scopes = scopeManager.nodeToScope.get(scope.block); + if (scopes) { + scopes.push(scope); + } + else { + scopeManager.nodeToScope.set(scope.block, [scope]); + } +} +const generator = (0, ID_1.createIdGenerator)(); +const VARIABLE_SCOPE_TYPES = new Set([ + ScopeType_1.ScopeType.classFieldInitializer, + ScopeType_1.ScopeType.classStaticBlock, + ScopeType_1.ScopeType.function, + ScopeType_1.ScopeType.global, + ScopeType_1.ScopeType.module, + ScopeType_1.ScopeType.tsModule, +]); +class ScopeBase { + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + $id = generator(); + /** + * The AST node which created this scope. + * @public + */ + block; + /** + * The array of child scopes. This does not include grandchild scopes. + * @public + */ + childScopes = []; + /** + * A map of the variables for each node in this scope. + * This is map is a pointer to the one in the parent ScopeManager instance + */ + #declaredVariables; + /** + * Generally, through the lexical scoping of JS you can always know which variable an identifier in the source code + * refers to. There are a few exceptions to this rule. With `global` and `with` scopes you can only decide at runtime + * which variable a reference refers to. + * All those scopes are considered "dynamic". + */ + #dynamic; + /** + * Whether this scope is created by a FunctionExpression. + * @public + */ + functionExpressionScope = false; + /** + * Whether 'use strict' is in effect in this scope. + * @public + */ + isStrict; + /** + * List of {@link Reference}s that are left to be resolved (i.e. which + * need to be linked to the variable they refer to). + */ + leftToResolve = []; + /** + * Any variable {@link Reference} found in this scope. + * This includes occurrences of local variables as well as variables from parent scopes (including the global scope). + * For local variables this also includes defining occurrences (like in a 'var' statement). + * In a 'function' scope this does not include the occurrences of the formal parameter in the parameter list. + * @public + */ + references = []; + /** + * The map from variable names to variable objects. + * @public + */ + set = new Map(); + /** + * The {@link Reference}s that are not resolved with this scope. + * @public + */ + through = []; + type; + /** + * Reference to the parent {@link Scope}. + * @public + */ + upper; + /** + * The scoped {@link Variable}s of this scope. + * In the case of a 'function' scope this includes the automatic argument `arguments` as its first element, as well + * as all further formal arguments. + * This does not include variables which are defined in child scopes. + * @public + */ + variables = []; + /** + * For scopes that can contain variable declarations, this is a self-reference. + * For other scope types this is the *variableScope* value of the parent scope. + * @public + */ + #dynamicCloseRef = (ref) => { + // notify all names are through to global + let current = this; + do { + /* eslint-disable @typescript-eslint/no-non-null-assertion */ + current.through.push(ref); + current = current.upper; + /* eslint-enable @typescript-eslint/no-non-null-assertion */ + } while (current); + }; + #globalCloseRef = (ref, scopeManager) => { + // let/const/class declarations should be resolved statically. + // others should be resolved dynamically. + if (this.shouldStaticallyCloseForGlobal(ref, scopeManager)) { + this.#staticCloseRef(ref); + } + else { + this.#dynamicCloseRef(ref); + } + }; + #staticCloseRef = (ref) => { + const resolve = () => { + const name = ref.identifier.name; + const variable = this.set.get(name); + if (!variable) { + return false; + } + if (!this.isValidResolution(ref, variable)) { + return false; + } + // make sure we don't match a type reference to a value variable + const isValidTypeReference = ref.isTypeReference && variable.isTypeVariable; + const isValidValueReference = ref.isValueReference && variable.isValueVariable; + if (!isValidTypeReference && !isValidValueReference) { + return false; + } + variable.references.push(ref); + ref.resolved = variable; + return true; + }; + if (!resolve()) { + this.delegateToUpperScope(ref); + } + }; + variableScope; + constructor(scopeManager, type, upperScope, block, isMethodDefinition) { + const upperScopeAsScopeBase = upperScope; + this.type = type; + this.#dynamic = + this.type === ScopeType_1.ScopeType.global || this.type === ScopeType_1.ScopeType.with; + this.block = block; + this.variableScope = this.isVariableScope() + ? this + : // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + upperScopeAsScopeBase.variableScope; + this.upper = upperScope; + /** + * Whether 'use strict' is in effect in this scope. + * @member {boolean} Scope#isStrict + */ + this.isStrict = isStrictScope(this, block, isMethodDefinition); + // this is guaranteed to be correct at runtime + upperScopeAsScopeBase?.childScopes.push(this); + this.#declaredVariables = scopeManager.declaredVariables; + registerScope(scopeManager, this); + } + isVariableScope() { + return VARIABLE_SCOPE_TYPES.has(this.type); + } + shouldStaticallyCloseForGlobal(ref, scopeManager) { + // On global scope, let/const/class declarations should be resolved statically. + const name = ref.identifier.name; + const variable = this.set.get(name); + if (!variable) { + return false; + } + // variable exists on the scope + // in module mode, we can statically resolve everything, regardless of its decl type + if (scopeManager.isModule()) { + return true; + } + // in script mode, only certain cases should be statically resolved + // Example: + // a `var` decl is ignored by the runtime if it clashes with a global name + // this means that we should not resolve the reference to the variable + const defs = variable.defs; + return (defs.length > 0 && + defs.every(def => { + if (def.type === definition_1.DefinitionType.Variable && def.parent.kind === 'var') { + return false; + } + return true; + })); + } + close(scopeManager) { + let closeRef; + if (this.shouldStaticallyClose()) { + closeRef = this.#staticCloseRef; + } + else if (this.type !== 'global') { + closeRef = this.#dynamicCloseRef; + } + else { + closeRef = this.#globalCloseRef; + } + // Try Resolving all references in this scope. + (0, assert_1.assert)(this.leftToResolve); + this.leftToResolve.forEach(ref => closeRef(ref, scopeManager)); + this.leftToResolve = null; + return this.upper; + } + shouldStaticallyClose() { + return !this.#dynamic; + } + /** + * To override by function scopes. + * References in default parameters isn't resolved to variables which are in their function body. + */ + defineVariable(nameOrVariable, set, variables, node, def) { + const name = typeof nameOrVariable === 'string' ? nameOrVariable : nameOrVariable.name; + let variable = set.get(name); + if (!variable) { + variable = + typeof nameOrVariable === 'string' + ? new variable_1.Variable(name, this) + : nameOrVariable; + set.set(name, variable); + variables.push(variable); + } + if (def) { + variable.defs.push(def); + this.addDeclaredVariablesOfNode(variable, def.node); + this.addDeclaredVariablesOfNode(variable, def.parent); + } + if (node) { + variable.identifiers.push(node); + } + } + delegateToUpperScope(ref) { + this.upper?.leftToResolve?.push(ref); + this.through.push(ref); + } + isValidResolution(_ref, _variable) { + return true; + } + addDeclaredVariablesOfNode(variable, node) { + if (node == null) { + return; + } + let variables = this.#declaredVariables.get(node); + if (variables == null) { + variables = []; + this.#declaredVariables.set(node, variables); + } + if (!variables.includes(variable)) { + variables.push(variable); + } + } + defineIdentifier(node, def) { + this.defineVariable(node.name, this.set, this.variables, node, def); + } + defineLiteralIdentifier(node, def) { + this.defineVariable(node.value, this.set, this.variables, null, def); + } + referenceDualValueType(node) { + const ref = new Reference_1.Reference(node, this, Reference_1.ReferenceFlag.Read, null, null, false, Reference_1.ReferenceTypeFlag.Type | Reference_1.ReferenceTypeFlag.Value); + this.references.push(ref); + this.leftToResolve?.push(ref); + } + referenceType(node) { + const ref = new Reference_1.Reference(node, this, Reference_1.ReferenceFlag.Read, null, null, false, Reference_1.ReferenceTypeFlag.Type); + this.references.push(ref); + this.leftToResolve?.push(ref); + } + referenceValue(node, assign = Reference_1.ReferenceFlag.Read, writeExpr, maybeImplicitGlobal, init = false) { + const ref = new Reference_1.Reference(node, this, assign, writeExpr, maybeImplicitGlobal, init, Reference_1.ReferenceTypeFlag.Value); + this.references.push(ref); + this.leftToResolve?.push(ref); + } +} +exports.ScopeBase = ScopeBase; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts new file mode 100644 index 0000000..bb9774a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts @@ -0,0 +1,21 @@ +export declare enum ScopeType { + block = "block", + catch = "catch", + class = "class", + classFieldInitializer = "class-field-initializer", + classStaticBlock = "class-static-block", + conditionalType = "conditionalType", + for = "for", + function = "function", + functionExpressionName = "function-expression-name", + functionType = "functionType", + global = "global", + mappedType = "mappedType", + module = "module", + switch = "switch", + tsEnum = "tsEnum", + tsModule = "tsModule", + type = "type", + with = "with" +} +//# sourceMappingURL=ScopeType.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts.map new file mode 100644 index 0000000..94bb958 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ScopeType.d.ts","sourceRoot":"","sources":["../../src/scope/ScopeType.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,qBAAqB,4BAA4B;IACjD,gBAAgB,uBAAuB;IACvC,eAAe,oBAAoB;IACnC,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,sBAAsB,6BAA6B;IACnD,YAAY,iBAAiB;IAC7B,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,IAAI,SAAS;CACd"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js new file mode 100644 index 0000000..d0d5f06 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ScopeType = void 0; +var ScopeType; +(function (ScopeType) { + ScopeType["block"] = "block"; + ScopeType["catch"] = "catch"; + ScopeType["class"] = "class"; + ScopeType["classFieldInitializer"] = "class-field-initializer"; + ScopeType["classStaticBlock"] = "class-static-block"; + ScopeType["conditionalType"] = "conditionalType"; + ScopeType["for"] = "for"; + ScopeType["function"] = "function"; + ScopeType["functionExpressionName"] = "function-expression-name"; + ScopeType["functionType"] = "functionType"; + ScopeType["global"] = "global"; + ScopeType["mappedType"] = "mappedType"; + ScopeType["module"] = "module"; + ScopeType["switch"] = "switch"; + ScopeType["tsEnum"] = "tsEnum"; + ScopeType["tsModule"] = "tsModule"; + ScopeType["type"] = "type"; + ScopeType["with"] = "with"; +})(ScopeType || (exports.ScopeType = ScopeType = {})); diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts new file mode 100644 index 0000000..c6601ba --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class SwitchScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: SwitchScope['upper'], block: SwitchScope['block']); +} +//# sourceMappingURL=SwitchScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts.map new file mode 100644 index 0000000..31d424d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SwitchScope.d.ts","sourceRoot":"","sources":["../../src/scope/SwitchScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,WAAY,SAAQ,SAAS,CACxC,SAAS,CAAC,MAAM,EAChB,QAAQ,CAAC,eAAe,EACxB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,EAChC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC;CAI9B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js new file mode 100644 index 0000000..33c1aad --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SwitchScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class SwitchScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.switch, upperScope, block, false); + } +} +exports.SwitchScope = SwitchScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts new file mode 100644 index 0000000..68dfe82 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class TSEnumScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: TSEnumScope['upper'], block: TSEnumScope['block']); +} +//# sourceMappingURL=TSEnumScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts.map new file mode 100644 index 0000000..f93b14a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSEnumScope.d.ts","sourceRoot":"","sources":["../../src/scope/TSEnumScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,WAAY,SAAQ,SAAS,CACxC,SAAS,CAAC,MAAM,EAChB,QAAQ,CAAC,iBAAiB,EAC1B,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,EAChC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC;CAI9B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js new file mode 100644 index 0000000..bb25072 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSEnumScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class TSEnumScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.tsEnum, upperScope, block, false); + } +} +exports.TSEnumScope = TSEnumScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts new file mode 100644 index 0000000..fcfd746 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class TSModuleScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: TSModuleScope['upper'], block: TSModuleScope['block']); +} +//# sourceMappingURL=TSModuleScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts.map new file mode 100644 index 0000000..300ed79 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSModuleScope.d.ts","sourceRoot":"","sources":["../../src/scope/TSModuleScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,aAAc,SAAQ,SAAS,CAC1C,SAAS,CAAC,QAAQ,EAClB,QAAQ,CAAC,mBAAmB,EAC5B,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,EAClC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC;CAIhC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js new file mode 100644 index 0000000..1a74e5c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSModuleScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class TSModuleScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.tsModule, upperScope, block, false); + } +} +exports.TSModuleScope = TSModuleScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts new file mode 100644 index 0000000..98885fd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts @@ -0,0 +1,9 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class TypeScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: TypeScope['upper'], block: TypeScope['block']); +} +//# sourceMappingURL=TypeScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts.map new file mode 100644 index 0000000..5fadf95 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TypeScope.d.ts","sourceRoot":"","sources":["../../src/scope/TypeScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,SAAU,SAAQ,SAAS,CACtC,SAAS,CAAC,IAAI,EACd,QAAQ,CAAC,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,EACjE,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,SAAS,CAAC,OAAO,CAAC,EAC9B,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC;CAI5B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js new file mode 100644 index 0000000..0c22aaf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class TypeScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.type, upperScope, block, false); + } +} +exports.TypeScope = TypeScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts new file mode 100644 index 0000000..93c86e3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +export declare class WithScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: WithScope['upper'], block: WithScope['block']); + close(scopeManager: ScopeManager): Scope | null; +} +//# sourceMappingURL=WithScope.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts.map new file mode 100644 index 0000000..f17fef1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"WithScope.d.ts","sourceRoot":"","sources":["../../src/scope/WithScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,SAAU,SAAQ,SAAS,CACtC,SAAS,CAAC,IAAI,EACd,QAAQ,CAAC,aAAa,EACtB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,SAAS,CAAC,OAAO,CAAC,EAC9B,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC;IAKX,KAAK,CAAC,YAAY,EAAE,YAAY,GAAG,KAAK,GAAG,IAAI;CAShE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js new file mode 100644 index 0000000..64443b4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WithScope = void 0; +const assert_1 = require("../assert"); +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class WithScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.with, upperScope, block, false); + } + close(scopeManager) { + if (this.shouldStaticallyClose()) { + return super.close(scopeManager); + } + (0, assert_1.assert)(this.leftToResolve); + this.leftToResolve.forEach(ref => this.delegateToUpperScope(ref)); + this.leftToResolve = null; + return this.upper; + } +} +exports.WithScope = WithScope; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts new file mode 100644 index 0000000..9cc72c5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts @@ -0,0 +1,20 @@ +export * from './BlockScope'; +export * from './CatchScope'; +export * from './ClassFieldInitializerScope'; +export * from './ClassScope'; +export * from './ConditionalTypeScope'; +export * from './ForScope'; +export * from './FunctionExpressionNameScope'; +export * from './FunctionScope'; +export * from './FunctionTypeScope'; +export * from './GlobalScope'; +export * from './MappedTypeScope'; +export * from './ModuleScope'; +export * from './Scope'; +export * from './ScopeType'; +export * from './SwitchScope'; +export * from './TSEnumScope'; +export * from './TSModuleScope'; +export * from './TypeScope'; +export * from './WithScope'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts.map new file mode 100644 index 0000000..525ca6f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scope/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js new file mode 100644 index 0000000..6cf2cd6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js @@ -0,0 +1,35 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./BlockScope"), exports); +__exportStar(require("./CatchScope"), exports); +__exportStar(require("./ClassFieldInitializerScope"), exports); +__exportStar(require("./ClassScope"), exports); +__exportStar(require("./ConditionalTypeScope"), exports); +__exportStar(require("./ForScope"), exports); +__exportStar(require("./FunctionExpressionNameScope"), exports); +__exportStar(require("./FunctionScope"), exports); +__exportStar(require("./FunctionTypeScope"), exports); +__exportStar(require("./GlobalScope"), exports); +__exportStar(require("./MappedTypeScope"), exports); +__exportStar(require("./ModuleScope"), exports); +__exportStar(require("./Scope"), exports); +__exportStar(require("./ScopeType"), exports); +__exportStar(require("./SwitchScope"), exports); +__exportStar(require("./TSEnumScope"), exports); +__exportStar(require("./TSModuleScope"), exports); +__exportStar(require("./TypeScope"), exports); +__exportStar(require("./WithScope"), exports); diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts new file mode 100644 index 0000000..64dc11d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts @@ -0,0 +1,33 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { VariableBase } from './VariableBase'; +/** + * ESLint defines global variables using the eslint-scope Variable class + * This is declared here for consumers to use + */ +export declare class ESLintScopeVariable extends VariableBase { + /** + * Written to by ESLint. + * If this key exists, this variable is a global variable added by ESLint. + * If this is `true`, this variable can be assigned arbitrary values. + * If this is `false`, this variable is readonly. + */ + writeable?: boolean; + /** + * Written to by ESLint. + * This property is undefined if there are no globals comment directives. + * The array of globals comment directives which defined this global variable in the source code file. + */ + eslintExplicitGlobal?: boolean; + /** + * Written to by ESLint. + * The configured value in config files. This can be different from `variable.writeable` if there are globals comment directives. + */ + eslintImplicitGlobalSetting?: 'readonly' | 'writable'; + /** + * Written to by ESLint. + * If this key exists, it is a global variable added by ESLint. + * If `true`, this global variable was defined by a globals comment directive in the source code file. + */ + eslintExplicitGlobalComments?: TSESTree.Comment[]; +} +//# sourceMappingURL=ESLintScopeVariable.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts.map new file mode 100644 index 0000000..24d913c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ESLintScopeVariable.d.ts","sourceRoot":"","sources":["../../src/variable/ESLintScopeVariable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,YAAY;IACnD;;;;;OAKG;IACI,SAAS,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;OAIG;IACI,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAEtC;;;OAGG;IACI,2BAA2B,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAE7D;;;;OAIG;IACI,4BAA4B,CAAC,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;CAC1D"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js new file mode 100644 index 0000000..cff8479 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ESLintScopeVariable = void 0; +const VariableBase_1 = require("./VariableBase"); +/** + * ESLint defines global variables using the eslint-scope Variable class + * This is declared here for consumers to use + */ +class ESLintScopeVariable extends VariableBase_1.VariableBase { + /** + * Written to by ESLint. + * If this key exists, this variable is a global variable added by ESLint. + * If this is `true`, this variable can be assigned arbitrary values. + * If this is `false`, this variable is readonly. + */ + writeable; // note that this isn't a typo - ESlint uses this spelling here + /** + * Written to by ESLint. + * This property is undefined if there are no globals comment directives. + * The array of globals comment directives which defined this global variable in the source code file. + */ + eslintExplicitGlobal; + /** + * Written to by ESLint. + * The configured value in config files. This can be different from `variable.writeable` if there are globals comment directives. + */ + eslintImplicitGlobalSetting; + /** + * Written to by ESLint. + * If this key exists, it is a global variable added by ESLint. + * If `true`, this global variable was defined by a globals comment directive in the source code file. + */ + eslintExplicitGlobalComments; +} +exports.ESLintScopeVariable = ESLintScopeVariable; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts new file mode 100644 index 0000000..6dde106 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts @@ -0,0 +1,28 @@ +import type { Scope } from '../scope'; +import type { Variable } from './Variable'; +import { ESLintScopeVariable } from './ESLintScopeVariable'; +export interface ImplicitLibVariableOptions { + readonly eslintImplicitGlobalSetting?: ESLintScopeVariable['eslintImplicitGlobalSetting']; + readonly isTypeVariable?: boolean; + readonly isValueVariable?: boolean; + readonly writeable?: boolean; +} +export interface LibDefinition { + libs: readonly LibDefinition[]; + variables: readonly [string, ImplicitLibVariableOptions][]; +} +/** + * An variable implicitly defined by the TS Lib + */ +export declare class ImplicitLibVariable extends ESLintScopeVariable implements Variable { + /** + * `true` if the variable is valid in a type context, false otherwise + */ + readonly isTypeVariable: boolean; + /** + * `true` if the variable is valid in a value context, false otherwise + */ + readonly isValueVariable: boolean; + constructor(scope: Scope, name: string, { eslintImplicitGlobalSetting, isTypeVariable, isValueVariable, writeable, }: ImplicitLibVariableOptions); +} +//# sourceMappingURL=ImplicitLibVariable.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts.map new file mode 100644 index 0000000..47de75f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ImplicitLibVariable.d.ts","sourceRoot":"","sources":["../../src/variable/ImplicitLibVariable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,2BAA2B,CAAC,EAAE,mBAAmB,CAAC,6BAA6B,CAAC,CAAC;IAC1F,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,aAAa,EAAE,CAAC;IAC/B,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,0BAA0B,CAAC,EAAE,CAAC;CAC5D;AAED;;GAEG;AACH,qBAAa,mBACX,SAAQ,mBACR,YAAW,QAAQ;IAEnB;;OAEG;IACH,SAAgB,cAAc,EAAE,OAAO,CAAC;IAExC;;OAEG;IACH,SAAgB,eAAe,EAAE,OAAO,CAAC;gBAGvC,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,MAAM,EACZ,EACE,2BAA2B,EAC3B,cAAc,EACd,eAAe,EACf,SAAS,GACV,EAAE,0BAA0B;CAShC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js new file mode 100644 index 0000000..86ea2fa --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ImplicitLibVariable = void 0; +const ESLintScopeVariable_1 = require("./ESLintScopeVariable"); +/** + * An variable implicitly defined by the TS Lib + */ +class ImplicitLibVariable extends ESLintScopeVariable_1.ESLintScopeVariable { + /** + * `true` if the variable is valid in a type context, false otherwise + */ + isTypeVariable; + /** + * `true` if the variable is valid in a value context, false otherwise + */ + isValueVariable; + constructor(scope, name, { eslintImplicitGlobalSetting, isTypeVariable, isValueVariable, writeable, }) { + super(name, scope); + this.isTypeVariable = isTypeVariable ?? false; + this.isValueVariable = isValueVariable ?? false; + this.writeable = writeable ?? false; + this.eslintImplicitGlobalSetting = + eslintImplicitGlobalSetting ?? 'readonly'; + } +} +exports.ImplicitLibVariable = ImplicitLibVariable; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts new file mode 100644 index 0000000..0f90d7f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts @@ -0,0 +1,17 @@ +import { VariableBase } from './VariableBase'; +/** + * A Variable represents a locally scoped identifier. These include arguments to functions. + */ +export declare class Variable extends VariableBase { + /** + * `true` if the variable is valid in a type context, false otherwise + * @public + */ + get isTypeVariable(): boolean; + /** + * `true` if the variable is valid in a value context, false otherwise + * @public + */ + get isValueVariable(): boolean; +} +//# sourceMappingURL=Variable.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts.map new file mode 100644 index 0000000..beb1eb3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Variable.d.ts","sourceRoot":"","sources":["../../src/variable/Variable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;GAEG;AACH,qBAAa,QAAS,SAAQ,YAAY;IACxC;;;OAGG;IACH,IAAW,cAAc,IAAI,OAAO,CAOnC;IAED;;;OAGG;IACH,IAAW,eAAe,IAAI,OAAO,CAOpC;CACF"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js new file mode 100644 index 0000000..af176e1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Variable = void 0; +const VariableBase_1 = require("./VariableBase"); +/** + * A Variable represents a locally scoped identifier. These include arguments to functions. + */ +class Variable extends VariableBase_1.VariableBase { + /** + * `true` if the variable is valid in a type context, false otherwise + * @public + */ + get isTypeVariable() { + if (this.defs.length === 0) { + // we don't statically know whether this is a type or a value + return true; + } + return this.defs.some(def => def.isTypeDefinition); + } + /** + * `true` if the variable is valid in a value context, false otherwise + * @public + */ + get isValueVariable() { + if (this.defs.length === 0) { + // we don't statically know whether this is a type or a value + return true; + } + return this.defs.some(def => def.isVariableDefinition); + } +} +exports.Variable = Variable; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts new file mode 100644 index 0000000..6db950b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts @@ -0,0 +1,43 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Definition } from '../definition'; +import type { Reference } from '../referencer/Reference'; +import type { Scope } from '../scope'; +export declare class VariableBase { + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + readonly $id: number; + /** + * The array of the definitions of this variable. + * @public + */ + readonly defs: Definition[]; + /** + * True if the variable is considered used for the purposes of `no-unused-vars`, false otherwise. + * @public + */ + eslintUsed: boolean; + /** + * The array of `Identifier` nodes which define this variable. + * If this variable is redeclared, this array includes two or more nodes. + * @public + */ + readonly identifiers: TSESTree.Identifier[]; + /** + * The variable name, as given in the source code. + * @public + */ + readonly name: string; + /** + * List of {@link Reference} of this variable (excluding parameter entries) in its defining scope and all nested scopes. + * For defining occurrences only see {@link Variable#defs}. + * @public + */ + readonly references: Reference[]; + /** + * Reference to the enclosing Scope. + */ + readonly scope: Scope; + constructor(name: string, scope: Scope); +} +//# sourceMappingURL=VariableBase.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts.map new file mode 100644 index 0000000..ad2bf29 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"VariableBase.d.ts","sourceRoot":"","sources":["../../src/variable/VariableBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAMtC,qBAAa,YAAY;IACvB;;OAEG;IACH,SAAgB,GAAG,EAAE,MAAM,CAAe;IAE1C;;;OAGG;IACH,SAAgB,IAAI,EAAE,UAAU,EAAE,CAAM;IACxC;;;OAGG;IACI,UAAU,UAAS;IAC1B;;;;OAIG;IACH,SAAgB,WAAW,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAM;IACxD;;;OAGG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,SAAgB,UAAU,EAAE,SAAS,EAAE,CAAM;IAC7C;;OAEG;IACH,SAAgB,KAAK,EAAE,KAAK,CAAC;gBAEjB,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK;CAIvC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js new file mode 100644 index 0000000..62a08da --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VariableBase = void 0; +const ID_1 = require("../ID"); +const generator = (0, ID_1.createIdGenerator)(); +class VariableBase { + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + $id = generator(); + /** + * The array of the definitions of this variable. + * @public + */ + defs = []; + /** + * True if the variable is considered used for the purposes of `no-unused-vars`, false otherwise. + * @public + */ + eslintUsed = false; + /** + * The array of `Identifier` nodes which define this variable. + * If this variable is redeclared, this array includes two or more nodes. + * @public + */ + identifiers = []; + /** + * The variable name, as given in the source code. + * @public + */ + name; + /** + * List of {@link Reference} of this variable (excluding parameter entries) in its defining scope and all nested scopes. + * For defining occurrences only see {@link Variable#defs}. + * @public + */ + references = []; + /** + * Reference to the enclosing Scope. + */ + scope; + constructor(name, scope) { + this.name = name; + this.scope = scope; + } +} +exports.VariableBase = VariableBase; diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts new file mode 100644 index 0000000..116a9dd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts @@ -0,0 +1,7 @@ +import type { ESLintScopeVariable } from './ESLintScopeVariable'; +import type { Variable } from './Variable'; +export { ESLintScopeVariable } from './ESLintScopeVariable'; +export { ImplicitLibVariable, type ImplicitLibVariableOptions, type LibDefinition, } from './ImplicitLibVariable'; +export { Variable } from './Variable'; +export type ScopeVariable = ESLintScopeVariable | Variable; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts.map b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts.map new file mode 100644 index 0000000..9e21005 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/variable/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,mBAAmB,EACnB,KAAK,0BAA0B,EAC/B,KAAK,aAAa,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,QAAQ,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js new file mode 100644 index 0000000..1926eed --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Variable = exports.ImplicitLibVariable = exports.ESLintScopeVariable = void 0; +var ESLintScopeVariable_1 = require("./ESLintScopeVariable"); +Object.defineProperty(exports, "ESLintScopeVariable", { enumerable: true, get: function () { return ESLintScopeVariable_1.ESLintScopeVariable; } }); +var ImplicitLibVariable_1 = require("./ImplicitLibVariable"); +Object.defineProperty(exports, "ImplicitLibVariable", { enumerable: true, get: function () { return ImplicitLibVariable_1.ImplicitLibVariable; } }); +var Variable_1 = require("./Variable"); +Object.defineProperty(exports, "Variable", { enumerable: true, get: function () { return Variable_1.Variable; } }); diff --git a/slider/node_modules/@typescript-eslint/scope-manager/package.json b/slider/node_modules/@typescript-eslint/scope-manager/package.json new file mode 100644 index 0000000..d38b13d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/scope-manager/package.json @@ -0,0 +1,79 @@ +{ + "name": "@typescript-eslint/scope-manager", + "version": "8.44.1", + "description": "TypeScript scope analyser for ESLint", + "files": [ + "dist", + "!*.tsbuildinfo", + "package.json", + "README.md", + "LICENSE" + ], + "type": "commonjs", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "types": "./dist/index.d.ts", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/scope-manager" + }, + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "homepage": "https://typescript-eslint.io/packages/scope-manager", + "license": "MIT", + "keywords": [ + "eslint", + "typescript", + "estree" + ], + "scripts": { + "build": "yarn run -BT nx build", + "clean": "rimraf dist/ coverage/", + "clean-fixtures": "rimraf -g \"./src/**/fixtures/**/snapshots\"", + "format": "yarn run -T format", + "generate-lib": "yarn run -BT nx generate-lib repo", + "lint": "yarn run -BT nx lint", + "test": "yarn run -BT nx test", + "typecheck": "yarn run -BT nx typecheck" + }, + "dependencies": { + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1" + }, + "devDependencies": { + "@typescript-eslint/typescript-estree": "8.44.1", + "@vitest/coverage-v8": "^3.1.3", + "@vitest/pretty-format": "^3.1.3", + "eslint": "*", + "glob": "*", + "rimraf": "*", + "typescript": "*", + "vitest": "^3.1.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "nx": { + "name": "scope-manager", + "includedScripts": [ + "clean", + "clean-fixtures" + ], + "targets": { + "lint": { + "command": "eslint" + } + } + } +} diff --git a/slider/node_modules/@typescript-eslint/tsconfig-utils/LICENSE b/slider/node_modules/@typescript-eslint/tsconfig-utils/LICENSE new file mode 100644 index 0000000..d405c09 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/tsconfig-utils/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 typescript-eslint and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@typescript-eslint/tsconfig-utils/README.md b/slider/node_modules/@typescript-eslint/tsconfig-utils/README.md new file mode 100644 index 0000000..8806837 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/tsconfig-utils/README.md @@ -0,0 +1,12 @@ +# `@typescript-eslint/tsconfig-utils` + +> Utilities for collecting TSConfigs for linting scenarios. + +[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/tsconfig-utils.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/tsconfig-utils) +[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/tsconfig-utils.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/tsconfig-utils) + +The utilities in this package are separated from `@typescript-eslint/utils` so that they do not have a dependency on `eslint` or `@typescript-eslint/typescript-estree`. + +> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code. + + diff --git a/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/compilerOptions.d.ts b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/compilerOptions.d.ts new file mode 100644 index 0000000..ae11d13 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/compilerOptions.d.ts @@ -0,0 +1,9 @@ +/** + * Compiler options required to avoid critical functionality issues + */ +export declare const CORE_COMPILER_OPTIONS: { + noEmit: true; + noUnusedLocals: true; + noUnusedParameters: true; +}; +//# sourceMappingURL=compilerOptions.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/compilerOptions.d.ts.map b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/compilerOptions.d.ts.map new file mode 100644 index 0000000..a31baf8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/compilerOptions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"compilerOptions.d.ts","sourceRoot":"","sources":["../src/compilerOptions.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;CAOJ,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/compilerOptions.js b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/compilerOptions.js new file mode 100644 index 0000000..3d2255c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/compilerOptions.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CORE_COMPILER_OPTIONS = void 0; +/** + * Compiler options required to avoid critical functionality issues + */ +exports.CORE_COMPILER_OPTIONS = { + // Required to avoid parse from causing emit to occur + noEmit: true, + // Flags required to make no-unused-vars work + noUnusedLocals: true, + noUnusedParameters: true, +}; diff --git a/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.d.ts b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.d.ts new file mode 100644 index 0000000..85a5358 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.d.ts @@ -0,0 +1,9 @@ +import type * as ts from 'typescript/lib/tsserverlibrary'; +/** + * Parses a TSConfig file using the same logic as tsserver. + * + * @param configFile the path to the tsconfig.json file, relative to `projectDirectory` + * @param projectDirectory the project directory to use as the CWD, defaults to `process.cwd()` + */ +export declare function getParsedConfigFile(tsserver: typeof ts, configFile: string, projectDirectory?: string): ts.ParsedCommandLine; +//# sourceMappingURL=getParsedConfigFile.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.d.ts.map b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.d.ts.map new file mode 100644 index 0000000..9b86875 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getParsedConfigFile.d.ts","sourceRoot":"","sources":["../src/getParsedConfigFile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAO1D;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,OAAO,EAAE,EACnB,UAAU,EAAE,MAAM,EAClB,gBAAgB,CAAC,EAAE,MAAM,GACxB,EAAE,CAAC,iBAAiB,CA6CtB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.js b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.js new file mode 100644 index 0000000..c4bfc48 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.js @@ -0,0 +1,76 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getParsedConfigFile = getParsedConfigFile; +const fs = __importStar(require("node:fs")); +const path = __importStar(require("node:path")); +const compilerOptions_1 = require("./compilerOptions"); +/** + * Parses a TSConfig file using the same logic as tsserver. + * + * @param configFile the path to the tsconfig.json file, relative to `projectDirectory` + * @param projectDirectory the project directory to use as the CWD, defaults to `process.cwd()` + */ +function getParsedConfigFile(tsserver, configFile, projectDirectory) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, @typescript-eslint/internal/eqeq-nullish + if (tsserver.sys === undefined) { + throw new Error('`getParsedConfigFile` is only supported in a Node-like environment.'); + } + const parsed = tsserver.getParsedCommandLineOfConfigFile(configFile, compilerOptions_1.CORE_COMPILER_OPTIONS, { + fileExists: fs.existsSync, + getCurrentDirectory, + onUnRecoverableConfigFileDiagnostic: diag => { + throw new Error(formatDiagnostics([diag])); // ensures that `parsed` is defined. + }, + readDirectory: tsserver.sys.readDirectory, + readFile: file => fs.readFileSync(path.isAbsolute(file) ? file : path.join(getCurrentDirectory(), file), 'utf-8'), + useCaseSensitiveFileNames: tsserver.sys.useCaseSensitiveFileNames, + }); + if (parsed?.errors.length) { + throw new Error(formatDiagnostics(parsed.errors)); + } + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return parsed; + function getCurrentDirectory() { + return projectDirectory ? path.resolve(projectDirectory) : process.cwd(); + } + function formatDiagnostics(diagnostics) { + return tsserver.formatDiagnostics(diagnostics, { + getCanonicalFileName: f => f, + getCurrentDirectory, + getNewLine: () => '\n', + }); + } +} diff --git a/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/index.d.ts b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/index.d.ts new file mode 100644 index 0000000..d8be232 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/index.d.ts @@ -0,0 +1,3 @@ +export * from './compilerOptions'; +export * from './getParsedConfigFile'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/index.d.ts.map b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/index.d.ts.map new file mode 100644 index 0000000..f262981 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/index.js b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/index.js new file mode 100644 index 0000000..a56481b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/tsconfig-utils/dist/index.js @@ -0,0 +1,18 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./compilerOptions"), exports); +__exportStar(require("./getParsedConfigFile"), exports); diff --git a/slider/node_modules/@typescript-eslint/tsconfig-utils/package.json b/slider/node_modules/@typescript-eslint/tsconfig-utils/package.json new file mode 100644 index 0000000..0f8f2be --- /dev/null +++ b/slider/node_modules/@typescript-eslint/tsconfig-utils/package.json @@ -0,0 +1,69 @@ +{ + "name": "@typescript-eslint/tsconfig-utils", + "version": "8.44.1", + "description": "Utilities for collecting TSConfigs for linting scenarios.", + "files": [ + "dist", + "!*.tsbuildinfo", + "package.json", + "README.md", + "LICENSE" + ], + "type": "commonjs", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/tsconfig-utils" + }, + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "homepage": "https://typescript-eslint.io", + "license": "MIT", + "keywords": [ + "eslint", + "typescript", + "estree" + ], + "scripts": { + "//": "These package scripts are mostly here for convenience. Task running is handled by Nx at the root level.", + "build": "yarn run -BT nx build", + "clean": "rimraf dist/ coverage/", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", + "test": "yarn run -BT nx test", + "typecheck": "yarn run -BT nx typecheck" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + }, + "devDependencies": { + "@vitest/coverage-v8": "^3.1.3", + "rimraf": "*", + "typescript": "*", + "vitest": "^3.1.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "publishConfig": { + "access": "public" + }, + "nx": { + "name": "tsconfig-utils", + "includedScripts": [ + "clean" + ] + } +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/LICENSE b/slider/node_modules/@typescript-eslint/type-utils/LICENSE new file mode 100644 index 0000000..fdcc603 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 typescript-eslint and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@typescript-eslint/type-utils/README.md b/slider/node_modules/@typescript-eslint/type-utils/README.md new file mode 100644 index 0000000..3f0696b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/README.md @@ -0,0 +1,12 @@ +# `@typescript-eslint/type-utils` + +> Type utilities for working with TypeScript within ESLint rules. + +[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/utils.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/utils) +[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/utils.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/utils) + +The utilities in this package are separated from `@typescript-eslint/utils` so that that package does not require a dependency on `typescript`. + +> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code. + + diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.d.ts new file mode 100644 index 0000000..5dfc26b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.d.ts @@ -0,0 +1,133 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type * as ts from 'typescript'; +/** + * Describes specific types or values declared in local files. + * See [TypeOrValueSpecifier > FileSpecifier](/packages/type-utils/type-or-value-specifier#filespecifier). + */ +export interface FileSpecifier { + from: 'file'; + /** + * Type or value name(s) to match on. + */ + name: string | string[]; + /** + * A specific file the types or values must be declared in. + */ + path?: string; +} +/** + * Describes specific types or values declared in TypeScript's built-in lib definitions. + * See [TypeOrValueSpecifier > LibSpecifier](/packages/type-utils/type-or-value-specifier#libspecifier). + */ +export interface LibSpecifier { + from: 'lib'; + /** + * Type or value name(s) to match on. + */ + name: string | string[]; +} +/** + * Describes specific types or values imported from packages. + * See [TypeOrValueSpecifier > PackageSpecifier](/packages/type-utils/type-or-value-specifier#packagespecifier). + */ +export interface PackageSpecifier { + from: 'package'; + /** + * Type or value name(s) to match on. + */ + name: string | string[]; + /** + * Package name the type or value must be declared in. + */ + package: string; +} +/** + * A centralized format for rule options to describe specific _types_ and/or _values_. + * See [TypeOrValueSpecifier](/packages/type-utils/type-or-value-specifier). + */ +export type TypeOrValueSpecifier = string | FileSpecifier | LibSpecifier | PackageSpecifier; +export declare const typeOrValueSpecifiersSchema: { + readonly items: { + readonly oneOf: [{ + readonly type: "string"; + }, { + readonly additionalProperties: false; + readonly properties: { + readonly from: { + readonly enum: ["file"]; + readonly type: "string"; + }; + readonly name: { + readonly oneOf: [{ + readonly type: "string"; + }, { + readonly items: { + readonly type: "string"; + }; + readonly minItems: 1; + readonly type: "array"; + readonly uniqueItems: true; + }]; + }; + readonly path: { + readonly type: "string"; + }; + }; + readonly required: ["from", "name"]; + readonly type: "object"; + }, { + readonly additionalProperties: false; + readonly properties: { + readonly from: { + readonly enum: ["lib"]; + readonly type: "string"; + }; + readonly name: { + readonly oneOf: [{ + readonly type: "string"; + }, { + readonly items: { + readonly type: "string"; + }; + readonly minItems: 1; + readonly type: "array"; + readonly uniqueItems: true; + }]; + }; + }; + readonly required: ["from", "name"]; + readonly type: "object"; + }, { + readonly additionalProperties: false; + readonly properties: { + readonly from: { + readonly enum: ["package"]; + readonly type: "string"; + }; + readonly name: { + readonly oneOf: [{ + readonly type: "string"; + }, { + readonly items: { + readonly type: "string"; + }; + readonly minItems: 1; + readonly type: "array"; + readonly uniqueItems: true; + }]; + }; + readonly package: { + readonly type: "string"; + }; + }; + readonly required: ["from", "name", "package"]; + readonly type: "object"; + }]; + }; + readonly type: "array"; +}; +export declare function typeMatchesSpecifier(type: ts.Type, specifier: TypeOrValueSpecifier, program: ts.Program): boolean; +export declare const typeMatchesSomeSpecifier: (type: ts.Type, specifiers: TypeOrValueSpecifier[] | undefined, program: ts.Program) => boolean; +export declare function valueMatchesSpecifier(node: TSESTree.Node, specifier: TypeOrValueSpecifier, program: ts.Program, type: ts.Type): boolean; +export declare const valueMatchesSomeSpecifier: (node: TSESTree.Node, specifiers: TypeOrValueSpecifier[] | undefined, program: ts.Program, type: ts.Type) => boolean; +//# sourceMappingURL=TypeOrValueSpecifier.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.d.ts.map new file mode 100644 index 0000000..aad25c6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TypeOrValueSpecifier.d.ts","sourceRoot":"","sources":["../src/TypeOrValueSpecifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAUtC;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAExB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,KAAK,CAAC;IAEZ;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,SAAS,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAExB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,aAAa,GACb,YAAY,GACZ,gBAAgB,CAAC;AAErB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FR,CAAC;AAEjC,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,EAAE,CAAC,OAAO,GAClB,OAAO,CAiDT;AAED,eAAO,MAAM,wBAAwB,GACnC,MAAM,EAAE,CAAC,IAAI,EACb,YAAY,oBAAoB,EAAE,YAAK,EACvC,SAAS,EAAE,CAAC,OAAO,KAClB,OAC2E,CAAC;AAsB/E,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,EAAE,CAAC,OAAO,EACnB,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,OAAO,CA6BT;AAED,eAAO,MAAM,yBAAyB,GACpC,MAAM,QAAQ,CAAC,IAAI,EACnB,YAAY,oBAAoB,EAAE,YAAK,EACvC,SAAS,EAAE,CAAC,OAAO,EACnB,MAAM,EAAE,CAAC,IAAI,KACZ,OAGA,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.js b/slider/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.js new file mode 100644 index 0000000..77c1f30 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.js @@ -0,0 +1,212 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.valueMatchesSomeSpecifier = exports.typeMatchesSomeSpecifier = exports.typeOrValueSpecifiersSchema = void 0; +exports.typeMatchesSpecifier = typeMatchesSpecifier; +exports.valueMatchesSpecifier = valueMatchesSpecifier; +const types_1 = require("@typescript-eslint/types"); +const tsutils = __importStar(require("ts-api-utils")); +const specifierNameMatches_1 = require("./typeOrValueSpecifiers/specifierNameMatches"); +const typeDeclaredInFile_1 = require("./typeOrValueSpecifiers/typeDeclaredInFile"); +const typeDeclaredInLib_1 = require("./typeOrValueSpecifiers/typeDeclaredInLib"); +const typeDeclaredInPackageDeclarationFile_1 = require("./typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile"); +exports.typeOrValueSpecifiersSchema = { + items: { + oneOf: [ + { + type: 'string', + }, + { + additionalProperties: false, + properties: { + from: { + enum: ['file'], + type: 'string', + }, + name: { + oneOf: [ + { + type: 'string', + }, + { + items: { + type: 'string', + }, + minItems: 1, + type: 'array', + uniqueItems: true, + }, + ], + }, + path: { + type: 'string', + }, + }, + required: ['from', 'name'], + type: 'object', + }, + { + additionalProperties: false, + properties: { + from: { + enum: ['lib'], + type: 'string', + }, + name: { + oneOf: [ + { + type: 'string', + }, + { + items: { + type: 'string', + }, + minItems: 1, + type: 'array', + uniqueItems: true, + }, + ], + }, + }, + required: ['from', 'name'], + type: 'object', + }, + { + additionalProperties: false, + properties: { + from: { + enum: ['package'], + type: 'string', + }, + name: { + oneOf: [ + { + type: 'string', + }, + { + items: { + type: 'string', + }, + minItems: 1, + type: 'array', + uniqueItems: true, + }, + ], + }, + package: { + type: 'string', + }, + }, + required: ['from', 'name', 'package'], + type: 'object', + }, + ], + }, + type: 'array', +}; +function typeMatchesSpecifier(type, specifier, program) { + if (tsutils.isUnionType(type)) { + return type.types.every(t => typeMatchesSpecifier(t, specifier, program)); + } + const wholeTypeMatches = (() => { + if (tsutils.isIntrinsicErrorType(type)) { + return false; + } + if (typeof specifier === 'string') { + return (0, specifierNameMatches_1.specifierNameMatches)(type, specifier); + } + if (!(0, specifierNameMatches_1.specifierNameMatches)(type, specifier.name)) { + return false; + } + const symbol = type.getSymbol() ?? type.aliasSymbol; + const declarations = symbol?.getDeclarations() ?? []; + const declarationFiles = declarations.map(declaration => declaration.getSourceFile()); + switch (specifier.from) { + case 'file': + return (0, typeDeclaredInFile_1.typeDeclaredInFile)(specifier.path, declarationFiles, program); + case 'lib': + return (0, typeDeclaredInLib_1.typeDeclaredInLib)(declarationFiles, program); + case 'package': + return (0, typeDeclaredInPackageDeclarationFile_1.typeDeclaredInPackageDeclarationFile)(specifier.package, declarations, declarationFiles, program); + } + })(); + if (wholeTypeMatches) { + return true; + } + if (tsutils.isIntersectionType(type) && + tsutils + .intersectionConstituents(type) + .some(part => typeMatchesSpecifier(part, specifier, program))) { + return true; + } + return false; +} +const typeMatchesSomeSpecifier = (type, specifiers = [], program) => specifiers.some(specifier => typeMatchesSpecifier(type, specifier, program)); +exports.typeMatchesSomeSpecifier = typeMatchesSomeSpecifier; +const getSpecifierNames = (specifierName) => { + return typeof specifierName === 'string' ? [specifierName] : specifierName; +}; +const getStaticName = (node) => { + if (node.type === types_1.AST_NODE_TYPES.Identifier || + node.type === types_1.AST_NODE_TYPES.JSXIdentifier || + node.type === types_1.AST_NODE_TYPES.PrivateIdentifier) { + return node.name; + } + if (node.type === types_1.AST_NODE_TYPES.Literal && typeof node.value === 'string') { + return node.value; + } + return undefined; +}; +function valueMatchesSpecifier(node, specifier, program, type) { + const staticName = getStaticName(node); + if (!staticName) { + return false; + } + if (typeof specifier === 'string') { + return specifier === staticName; + } + if (!getSpecifierNames(specifier.name).includes(staticName)) { + return false; + } + if (specifier.from === 'package') { + const symbol = type.getSymbol() ?? type.aliasSymbol; + const declarations = symbol?.getDeclarations() ?? []; + const declarationFiles = declarations.map(declaration => declaration.getSourceFile()); + return (0, typeDeclaredInPackageDeclarationFile_1.typeDeclaredInPackageDeclarationFile)(specifier.package, declarations, declarationFiles, program); + } + return true; +} +const valueMatchesSomeSpecifier = (node, specifiers = [], program, type) => specifiers.some(specifier => valueMatchesSpecifier(node, specifier, program, type)); +exports.valueMatchesSomeSpecifier = valueMatchesSomeSpecifier; diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.d.ts new file mode 100644 index 0000000..7de50da --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.d.ts @@ -0,0 +1,54 @@ +import * as ts from 'typescript'; +/** + * @example + * ```ts + * class DerivedClass extends Promise {} + * DerivedClass.reject + * // ^ PromiseLike + * ``` + */ +export declare function isPromiseLike(program: ts.Program, type: ts.Type): boolean; +/** + * @example + * ```ts + * const value = Promise + * value.reject + * // ^ PromiseConstructorLike + * ``` + */ +export declare function isPromiseConstructorLike(program: ts.Program, type: ts.Type): boolean; +/** + * @example + * ```ts + * class Foo extends Error {} + * new Foo() + * // ^ ErrorLike + * ``` + */ +export declare function isErrorLike(program: ts.Program, type: ts.Type): boolean; +/** + * @example + * ```ts + * type T = Readonly + * // ^ ReadonlyErrorLike + * ``` + */ +export declare function isReadonlyErrorLike(program: ts.Program, type: ts.Type): boolean; +/** + * @example + * ```ts + * type T = Readonly<{ foo: 'bar' }> + * // ^ ReadonlyTypeLike + * ``` + */ +export declare function isReadonlyTypeLike(program: ts.Program, type: ts.Type, predicate?: (subType: { + aliasSymbol: ts.Symbol; + aliasTypeArguments: readonly ts.Type[]; +} & ts.Type) => boolean): boolean; +export declare function isBuiltinTypeAliasLike(program: ts.Program, type: ts.Type, predicate: (subType: { + aliasSymbol: ts.Symbol; + aliasTypeArguments: readonly ts.Type[]; +} & ts.Type) => boolean): boolean; +export declare function isBuiltinSymbolLike(program: ts.Program, type: ts.Type, symbolName: string | string[]): boolean; +export declare function isBuiltinSymbolLikeRecurser(program: ts.Program, type: ts.Type, predicate: (subType: ts.Type) => boolean | null): boolean; +//# sourceMappingURL=builtinSymbolLikes.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.d.ts.map new file mode 100644 index 0000000..3e76b1a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"builtinSymbolLikes.d.ts","sourceRoot":"","sources":["../src/builtinSymbolLikes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAIjC;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAEzE;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,EAAE,CAAC,OAAO,EAC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AAO,CAuCT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.js b/slider/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.js new file mode 100644 index 0000000..8b54392 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.js @@ -0,0 +1,164 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isPromiseLike = isPromiseLike; +exports.isPromiseConstructorLike = isPromiseConstructorLike; +exports.isErrorLike = isErrorLike; +exports.isReadonlyErrorLike = isReadonlyErrorLike; +exports.isReadonlyTypeLike = isReadonlyTypeLike; +exports.isBuiltinTypeAliasLike = isBuiltinTypeAliasLike; +exports.isBuiltinSymbolLike = isBuiltinSymbolLike; +exports.isBuiltinSymbolLikeRecurser = isBuiltinSymbolLikeRecurser; +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const isSymbolFromDefaultLibrary_1 = require("./isSymbolFromDefaultLibrary"); +/** + * @example + * ```ts + * class DerivedClass extends Promise {} + * DerivedClass.reject + * // ^ PromiseLike + * ``` + */ +function isPromiseLike(program, type) { + return isBuiltinSymbolLike(program, type, 'Promise'); +} +/** + * @example + * ```ts + * const value = Promise + * value.reject + * // ^ PromiseConstructorLike + * ``` + */ +function isPromiseConstructorLike(program, type) { + return isBuiltinSymbolLike(program, type, 'PromiseConstructor'); +} +/** + * @example + * ```ts + * class Foo extends Error {} + * new Foo() + * // ^ ErrorLike + * ``` + */ +function isErrorLike(program, type) { + return isBuiltinSymbolLike(program, type, 'Error'); +} +/** + * @example + * ```ts + * type T = Readonly + * // ^ ReadonlyErrorLike + * ``` + */ +function isReadonlyErrorLike(program, type) { + return isReadonlyTypeLike(program, type, subtype => { + const [typeArgument] = subtype.aliasTypeArguments; + return (isErrorLike(program, typeArgument) || + isReadonlyErrorLike(program, typeArgument)); + }); +} +/** + * @example + * ```ts + * type T = Readonly<{ foo: 'bar' }> + * // ^ ReadonlyTypeLike + * ``` + */ +function isReadonlyTypeLike(program, type, predicate) { + return isBuiltinTypeAliasLike(program, type, subtype => { + return (subtype.aliasSymbol.getName() === 'Readonly' && !!predicate?.(subtype)); + }); +} +function isBuiltinTypeAliasLike(program, type, predicate) { + return isBuiltinSymbolLikeRecurser(program, type, subtype => { + const { aliasSymbol, aliasTypeArguments } = subtype; + if (!aliasSymbol || !aliasTypeArguments) { + return false; + } + if ((0, isSymbolFromDefaultLibrary_1.isSymbolFromDefaultLibrary)(program, aliasSymbol) && + predicate(subtype)) { + return true; + } + return null; + }); +} +function isBuiltinSymbolLike(program, type, symbolName) { + return isBuiltinSymbolLikeRecurser(program, type, subType => { + const symbol = subType.getSymbol(); + if (!symbol) { + return false; + } + const actualSymbolName = symbol.getName(); + if ((Array.isArray(symbolName) + ? symbolName.some(name => actualSymbolName === name) + : actualSymbolName === symbolName) && + (0, isSymbolFromDefaultLibrary_1.isSymbolFromDefaultLibrary)(program, symbol)) { + return true; + } + return null; + }); +} +function isBuiltinSymbolLikeRecurser(program, type, predicate) { + if (type.isIntersection()) { + return type.types.some(t => isBuiltinSymbolLikeRecurser(program, t, predicate)); + } + if (type.isUnion()) { + return type.types.every(t => isBuiltinSymbolLikeRecurser(program, t, predicate)); + } + if (tsutils.isTypeParameter(type)) { + const t = type.getConstraint(); + if (t) { + return isBuiltinSymbolLikeRecurser(program, t, predicate); + } + return false; + } + const predicateResult = predicate(type); + if (typeof predicateResult === 'boolean') { + return predicateResult; + } + const symbol = type.getSymbol(); + if (symbol && + symbol.flags & (ts.SymbolFlags.Class | ts.SymbolFlags.Interface)) { + const checker = program.getTypeChecker(); + for (const baseType of checker.getBaseTypes(type)) { + if (isBuiltinSymbolLikeRecurser(program, baseType, predicate)) { + return true; + } + } + } + return false; +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts new file mode 100644 index 0000000..0f3f692 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts @@ -0,0 +1,10 @@ +import * as ts from 'typescript'; +/** + * @param type Type being checked by name. + * @param allowAny Whether to consider `any` and `unknown` to match. + * @param allowedNames Symbol names checking on the type. + * @param matchAnyInstead Whether to instead just check if any parts match, rather than all parts. + * @returns Whether the type is, extends, or contains the allowed names (or all matches the allowed names, if mustMatchAll is true). + */ +export declare function containsAllTypesByName(type: ts.Type, allowAny: boolean, allowedNames: Set, matchAnyInstead?: boolean): boolean; +//# sourceMappingURL=containsAllTypesByName.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts.map new file mode 100644 index 0000000..c6a1ede --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"containsAllTypesByName.d.ts","sourceRoot":"","sources":["../src/containsAllTypesByName.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAIjC;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,QAAQ,EAAE,OAAO,EACjB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,eAAe,UAAQ,GACtB,OAAO,CA+BT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.js b/slider/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.js new file mode 100644 index 0000000..249485b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.js @@ -0,0 +1,69 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.containsAllTypesByName = containsAllTypesByName; +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const typeFlagUtils_1 = require("./typeFlagUtils"); +/** + * @param type Type being checked by name. + * @param allowAny Whether to consider `any` and `unknown` to match. + * @param allowedNames Symbol names checking on the type. + * @param matchAnyInstead Whether to instead just check if any parts match, rather than all parts. + * @returns Whether the type is, extends, or contains the allowed names (or all matches the allowed names, if mustMatchAll is true). + */ +function containsAllTypesByName(type, allowAny, allowedNames, matchAnyInstead = false) { + if ((0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.Any | ts.TypeFlags.Unknown)) { + return !allowAny; + } + if (tsutils.isTypeReference(type)) { + type = type.target; + } + const symbol = type.getSymbol(); + if (symbol && allowedNames.has(symbol.name)) { + return true; + } + const predicate = (t) => containsAllTypesByName(t, allowAny, allowedNames, matchAnyInstead); + if (tsutils.isUnionOrIntersectionType(type)) { + return matchAnyInstead + ? type.types.some(predicate) + : type.types.every(predicate); + } + const bases = type.getBaseTypes(); + return (bases != null && + (matchAnyInstead + ? bases.some(predicate) + : bases.length > 0 && bases.every(predicate))); +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/discriminateAnyType.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/discriminateAnyType.d.ts new file mode 100644 index 0000000..1d7cd92 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/discriminateAnyType.d.ts @@ -0,0 +1,13 @@ +import type * as ts from 'typescript'; +export declare enum AnyType { + Any = 0, + PromiseAny = 1, + AnyArray = 2, + Safe = 3 +} +/** + * @returns `AnyType.Any` if the type is `any`, `AnyType.AnyArray` if the type is `any[]` or `readonly any[]`, `AnyType.PromiseAny` if the type is `Promise`, + * otherwise it returns `AnyType.Safe`. + */ +export declare function discriminateAnyType(type: ts.Type, checker: ts.TypeChecker, program: ts.Program, tsNode: ts.Node): AnyType; +//# sourceMappingURL=discriminateAnyType.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/discriminateAnyType.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/discriminateAnyType.d.ts.map new file mode 100644 index 0000000..a265510 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/discriminateAnyType.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"discriminateAnyType.d.ts","sourceRoot":"","sources":["../src/discriminateAnyType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAMtC,oBAAY,OAAO;IACjB,GAAG,IAAA;IACH,UAAU,IAAA;IACV,QAAQ,IAAA;IACR,IAAI,IAAA;CACL;AACD;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,OAAO,EAAE,EAAE,CAAC,OAAO,EACnB,MAAM,EAAE,EAAE,CAAC,IAAI,GACd,OAAO,CAET"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/discriminateAnyType.js b/slider/node_modules/@typescript-eslint/type-utils/dist/discriminateAnyType.js new file mode 100644 index 0000000..f45840c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/discriminateAnyType.js @@ -0,0 +1,77 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AnyType = void 0; +exports.discriminateAnyType = discriminateAnyType; +const tsutils = __importStar(require("ts-api-utils")); +const predicates_1 = require("./predicates"); +var AnyType; +(function (AnyType) { + AnyType[AnyType["Any"] = 0] = "Any"; + AnyType[AnyType["PromiseAny"] = 1] = "PromiseAny"; + AnyType[AnyType["AnyArray"] = 2] = "AnyArray"; + AnyType[AnyType["Safe"] = 3] = "Safe"; +})(AnyType || (exports.AnyType = AnyType = {})); +/** + * @returns `AnyType.Any` if the type is `any`, `AnyType.AnyArray` if the type is `any[]` or `readonly any[]`, `AnyType.PromiseAny` if the type is `Promise`, + * otherwise it returns `AnyType.Safe`. + */ +function discriminateAnyType(type, checker, program, tsNode) { + return discriminateAnyTypeWorker(type, checker, program, tsNode, new Set()); +} +function discriminateAnyTypeWorker(type, checker, program, tsNode, visited) { + if (visited.has(type)) { + return AnyType.Safe; + } + visited.add(type); + if ((0, predicates_1.isTypeAnyType)(type)) { + return AnyType.Any; + } + if ((0, predicates_1.isTypeAnyArrayType)(type, checker)) { + return AnyType.AnyArray; + } + for (const part of tsutils.typeConstituents(type)) { + if (tsutils.isThenableType(checker, tsNode, part)) { + const awaitedType = checker.getAwaitedType(part); + if (awaitedType) { + const awaitedAnyType = discriminateAnyTypeWorker(awaitedType, checker, program, tsNode, visited); + if (awaitedAnyType === AnyType.Any) { + return AnyType.PromiseAny; + } + } + } + } + return AnyType.Safe; +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.d.ts new file mode 100644 index 0000000..db93d03 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.d.ts @@ -0,0 +1,13 @@ +import type { ParserServicesWithTypeInformation, TSESTree } from '@typescript-eslint/typescript-estree'; +import type * as ts from 'typescript'; +/** + * Resolves the given node's type. Will return the type's generic constraint, if it has one. + * + * Warning - if the type is generic and does _not_ have a constraint, the type will be + * returned as-is, rather than returning an `unknown` type. This can be checked + * for by checking for the type flag ts.TypeFlags.TypeParameter. + * + * @see https://github.com/typescript-eslint/typescript-eslint/issues/10438 + */ +export declare function getConstrainedTypeAtLocation(services: ParserServicesWithTypeInformation, node: TSESTree.Node): ts.Type; +//# sourceMappingURL=getConstrainedTypeAtLocation.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.d.ts.map new file mode 100644 index 0000000..e3aa854 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getConstrainedTypeAtLocation.d.ts","sourceRoot":"","sources":["../src/getConstrainedTypeAtLocation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,QAAQ,EACT,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,iCAAiC,EAC3C,IAAI,EAAE,QAAQ,CAAC,IAAI,GAClB,EAAE,CAAC,IAAI,CAOT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.js b/slider/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.js new file mode 100644 index 0000000..53800c1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getConstrainedTypeAtLocation = getConstrainedTypeAtLocation; +/** + * Resolves the given node's type. Will return the type's generic constraint, if it has one. + * + * Warning - if the type is generic and does _not_ have a constraint, the type will be + * returned as-is, rather than returning an `unknown` type. This can be checked + * for by checking for the type flag ts.TypeFlags.TypeParameter. + * + * @see https://github.com/typescript-eslint/typescript-eslint/issues/10438 + */ +function getConstrainedTypeAtLocation(services, node) { + const nodeType = services.getTypeAtLocation(node); + const constrained = services.program + .getTypeChecker() + .getBaseConstraintOfType(nodeType); + return constrained ?? nodeType; +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getContextualType.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/getContextualType.d.ts new file mode 100644 index 0000000..2e64f2b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getContextualType.d.ts @@ -0,0 +1,8 @@ +import * as ts from 'typescript'; +/** + * Returns the contextual type of a given node. + * Contextual type is the type of the target the node is going into. + * i.e. the type of a called function's parameter, or the defined type of a variable declaration + */ +export declare function getContextualType(checker: ts.TypeChecker, node: ts.Expression): ts.Type | undefined; +//# sourceMappingURL=getContextualType.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getContextualType.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/getContextualType.d.ts.map new file mode 100644 index 0000000..411cf9e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getContextualType.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getContextualType.d.ts","sourceRoot":"","sources":["../src/getContextualType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,IAAI,EAAE,EAAE,CAAC,UAAU,GAClB,EAAE,CAAC,IAAI,GAAG,SAAS,CAwCrB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getContextualType.js b/slider/node_modules/@typescript-eslint/type-utils/dist/getContextualType.js new file mode 100644 index 0000000..92fe7c8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getContextualType.js @@ -0,0 +1,76 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getContextualType = getContextualType; +const ts = __importStar(require("typescript")); +/** + * Returns the contextual type of a given node. + * Contextual type is the type of the target the node is going into. + * i.e. the type of a called function's parameter, or the defined type of a variable declaration + */ +function getContextualType(checker, node) { + const parent = node.parent; + if (ts.isCallExpression(parent) || ts.isNewExpression(parent)) { + if (node === parent.expression) { + // is the callee, so has no contextual type + return; + } + } + else if (ts.isVariableDeclaration(parent) || + ts.isPropertyDeclaration(parent) || + ts.isParameter(parent)) { + return parent.type ? checker.getTypeFromTypeNode(parent.type) : undefined; + } + else if (ts.isJsxExpression(parent)) { + return checker.getContextualType(parent); + } + else if (ts.isIdentifier(node) && + (ts.isPropertyAssignment(parent) || + ts.isShorthandPropertyAssignment(parent))) { + return checker.getContextualType(node); + } + else if (ts.isBinaryExpression(parent) && + parent.operatorToken.kind === ts.SyntaxKind.EqualsToken && + parent.right === node) { + // is RHS of assignment + return checker.getTypeAtLocation(parent.left); + } + else if (![ts.SyntaxKind.JsxExpression, ts.SyntaxKind.TemplateSpan].includes(parent.kind)) { + // parent is not something we know we can get the contextual type of + return; + } + // TODO - support return statement checking + return checker.getContextualType(node); +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.d.ts new file mode 100644 index 0000000..4067de4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.d.ts @@ -0,0 +1,7 @@ +import type { ParserServicesWithTypeInformation, TSESTree } from '@typescript-eslint/typescript-estree'; +import type * as ts from 'typescript'; +/** + * Gets the declaration for the given variable + */ +export declare function getDeclaration(services: ParserServicesWithTypeInformation, node: TSESTree.Node): ts.Declaration | null; +//# sourceMappingURL=getDeclaration.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.d.ts.map new file mode 100644 index 0000000..e8cff37 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getDeclaration.d.ts","sourceRoot":"","sources":["../src/getDeclaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,QAAQ,EACT,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,iCAAiC,EAC3C,IAAI,EAAE,QAAQ,CAAC,IAAI,GAClB,EAAE,CAAC,WAAW,GAAG,IAAI,CAOvB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.js b/slider/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.js new file mode 100644 index 0000000..e3d9478 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getDeclaration = getDeclaration; +/** + * Gets the declaration for the given variable + */ +function getDeclaration(services, node) { + const symbol = services.getSymbolAtLocation(node); + if (!symbol) { + return null; + } + const declarations = symbol.getDeclarations(); + return declarations?.[0] ?? null; +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.d.ts new file mode 100644 index 0000000..2cbcc12 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.d.ts @@ -0,0 +1,7 @@ +import * as ts from 'typescript'; +/** + * @deprecated + * Gets the source file for a given node + */ +export declare function getSourceFileOfNode(node: ts.Node): ts.SourceFile; +//# sourceMappingURL=getSourceFileOfNode.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.d.ts.map new file mode 100644 index 0000000..6d5569b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getSourceFileOfNode.d.ts","sourceRoot":"","sources":["../src/getSourceFileOfNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,UAAU,CAKhE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.js b/slider/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.js new file mode 100644 index 0000000..d838714 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.js @@ -0,0 +1,47 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getSourceFileOfNode = getSourceFileOfNode; +const ts = __importStar(require("typescript")); +/** + * @deprecated + * Gets the source file for a given node + */ +function getSourceFileOfNode(node) { + while (node.kind !== ts.SyntaxKind.SourceFile) { + node = node.parent; + } + return node; +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getTypeName.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/getTypeName.d.ts new file mode 100644 index 0000000..c0aad74 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getTypeName.d.ts @@ -0,0 +1,8 @@ +import * as ts from 'typescript'; +/** + * Get the type name of a given type. + * @param typeChecker The context sensitive TypeScript TypeChecker. + * @param type The type to get the name of. + */ +export declare function getTypeName(typeChecker: ts.TypeChecker, type: ts.Type): string; +//# sourceMappingURL=getTypeName.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getTypeName.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/getTypeName.d.ts.map new file mode 100644 index 0000000..92c9078 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getTypeName.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getTypeName.d.ts","sourceRoot":"","sources":["../src/getTypeName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,WAAW,EAAE,EAAE,CAAC,WAAW,EAC3B,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,MAAM,CAqDR"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/getTypeName.js b/slider/node_modules/@typescript-eslint/type-utils/dist/getTypeName.js new file mode 100644 index 0000000..151d8c8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/getTypeName.js @@ -0,0 +1,83 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getTypeName = getTypeName; +const ts = __importStar(require("typescript")); +/** + * Get the type name of a given type. + * @param typeChecker The context sensitive TypeScript TypeChecker. + * @param type The type to get the name of. + */ +function getTypeName(typeChecker, type) { + // It handles `string` and string literal types as string. + if ((type.flags & ts.TypeFlags.StringLike) !== 0) { + return 'string'; + } + // If the type is a type parameter which extends primitive string types, + // but it was not recognized as a string like. So check the constraint + // type of the type parameter. + if ((type.flags & ts.TypeFlags.TypeParameter) !== 0) { + // `type.getConstraint()` method doesn't return the constraint type of + // the type parameter for some reason. So this gets the constraint type + // via AST. + const symbol = type.getSymbol(); + const decls = symbol?.getDeclarations(); + const typeParamDecl = decls?.[0]; + if (typeParamDecl != null && + ts.isTypeParameterDeclaration(typeParamDecl) && + typeParamDecl.constraint != null) { + return getTypeName(typeChecker, typeChecker.getTypeFromTypeNode(typeParamDecl.constraint)); + } + } + // If the type is a union and all types in the union are string like, + // return `string`. For example: + // - `"a" | "b"` is string. + // - `string | string[]` is not string. + if (type.isUnion() && + type.types + .map(value => getTypeName(typeChecker, value)) + .every(t => t === 'string')) { + return 'string'; + } + // If the type is an intersection and a type in the intersection is string + // like, return `string`. For example: `string & {__htmlEscaped: void}` + if (type.isIntersection() && + type.types + .map(value => getTypeName(typeChecker, value)) + .some(t => t === 'string')) { + return 'string'; + } + return typeChecker.typeToString(type); +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/index.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/index.d.ts new file mode 100644 index 0000000..819620d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/index.d.ts @@ -0,0 +1,18 @@ +export * from './builtinSymbolLikes'; +export * from './containsAllTypesByName'; +export * from './getConstrainedTypeAtLocation'; +export * from './getContextualType'; +export * from './getDeclaration'; +export * from './getSourceFileOfNode'; +export * from './getTypeName'; +export * from './isSymbolFromDefaultLibrary'; +export * from './isTypeReadonly'; +export * from './isUnsafeAssignment'; +export * from './predicates'; +export * from './propertyTypes'; +export * from './requiresQuoting'; +export * from './typeFlagUtils'; +export * from './TypeOrValueSpecifier'; +export * from './discriminateAnyType'; +export { getDecorators, getModifiers, typescriptVersionIsAtLeast, } from '@typescript-eslint/typescript-estree'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/index.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/index.d.ts.map new file mode 100644 index 0000000..e91f014 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EACL,aAAa,EACb,YAAY,EACZ,0BAA0B,GAC3B,MAAM,sCAAsC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/index.js b/slider/node_modules/@typescript-eslint/type-utils/dist/index.js new file mode 100644 index 0000000..eac1083 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/index.js @@ -0,0 +1,37 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.typescriptVersionIsAtLeast = exports.getModifiers = exports.getDecorators = void 0; +__exportStar(require("./builtinSymbolLikes"), exports); +__exportStar(require("./containsAllTypesByName"), exports); +__exportStar(require("./getConstrainedTypeAtLocation"), exports); +__exportStar(require("./getContextualType"), exports); +__exportStar(require("./getDeclaration"), exports); +__exportStar(require("./getSourceFileOfNode"), exports); +__exportStar(require("./getTypeName"), exports); +__exportStar(require("./isSymbolFromDefaultLibrary"), exports); +__exportStar(require("./isTypeReadonly"), exports); +__exportStar(require("./isUnsafeAssignment"), exports); +__exportStar(require("./predicates"), exports); +__exportStar(require("./propertyTypes"), exports); +__exportStar(require("./requiresQuoting"), exports); +__exportStar(require("./typeFlagUtils"), exports); +__exportStar(require("./TypeOrValueSpecifier"), exports); +__exportStar(require("./discriminateAnyType"), exports); +var typescript_estree_1 = require("@typescript-eslint/typescript-estree"); +Object.defineProperty(exports, "getDecorators", { enumerable: true, get: function () { return typescript_estree_1.getDecorators; } }); +Object.defineProperty(exports, "getModifiers", { enumerable: true, get: function () { return typescript_estree_1.getModifiers; } }); +Object.defineProperty(exports, "typescriptVersionIsAtLeast", { enumerable: true, get: function () { return typescript_estree_1.typescriptVersionIsAtLeast; } }); diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.d.ts new file mode 100644 index 0000000..0fa1fae --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.d.ts @@ -0,0 +1,3 @@ +import type * as ts from 'typescript'; +export declare function isSymbolFromDefaultLibrary(program: ts.Program, symbol: ts.Symbol | undefined): boolean; +//# sourceMappingURL=isSymbolFromDefaultLibrary.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.d.ts.map new file mode 100644 index 0000000..f7a64c7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isSymbolFromDefaultLibrary.d.ts","sourceRoot":"","sources":["../src/isSymbolFromDefaultLibrary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,EAAE,CAAC,OAAO,EACnB,MAAM,EAAE,EAAE,CAAC,MAAM,GAAG,SAAS,GAC5B,OAAO,CAcT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.js b/slider/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.js new file mode 100644 index 0000000..d7f3616 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isSymbolFromDefaultLibrary = isSymbolFromDefaultLibrary; +function isSymbolFromDefaultLibrary(program, symbol) { + if (!symbol) { + return false; + } + const declarations = symbol.getDeclarations() ?? []; + for (const declaration of declarations) { + const sourceFile = declaration.getSourceFile(); + if (program.isSourceFileDefaultLibrary(sourceFile)) { + return true; + } + } + return false; +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.d.ts new file mode 100644 index 0000000..852841f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.d.ts @@ -0,0 +1,101 @@ +import * as ts from 'typescript'; +import type { TypeOrValueSpecifier } from './TypeOrValueSpecifier'; +export interface ReadonlynessOptions { + readonly allow?: TypeOrValueSpecifier[]; + readonly treatMethodsAsReadonly?: boolean; +} +export declare const readonlynessOptionsSchema: { + additionalProperties: false; + properties: { + allow: { + readonly items: { + readonly oneOf: [{ + readonly type: "string"; + }, { + readonly additionalProperties: false; + readonly properties: { + readonly from: { + readonly enum: ["file"]; + readonly type: "string"; + }; + readonly name: { + readonly oneOf: [{ + readonly type: "string"; + }, { + readonly items: { + readonly type: "string"; + }; + readonly minItems: 1; + readonly type: "array"; + readonly uniqueItems: true; + }]; + }; + readonly path: { + readonly type: "string"; + }; + }; + readonly required: ["from", "name"]; + readonly type: "object"; + }, { + readonly additionalProperties: false; + readonly properties: { + readonly from: { + readonly enum: ["lib"]; + readonly type: "string"; + }; + readonly name: { + readonly oneOf: [{ + readonly type: "string"; + }, { + readonly items: { + readonly type: "string"; + }; + readonly minItems: 1; + readonly type: "array"; + readonly uniqueItems: true; + }]; + }; + }; + readonly required: ["from", "name"]; + readonly type: "object"; + }, { + readonly additionalProperties: false; + readonly properties: { + readonly from: { + readonly enum: ["package"]; + readonly type: "string"; + }; + readonly name: { + readonly oneOf: [{ + readonly type: "string"; + }, { + readonly items: { + readonly type: "string"; + }; + readonly minItems: 1; + readonly type: "array"; + readonly uniqueItems: true; + }]; + }; + readonly package: { + readonly type: "string"; + }; + }; + readonly required: ["from", "name", "package"]; + readonly type: "object"; + }]; + }; + readonly type: "array"; + }; + treatMethodsAsReadonly: { + type: "boolean"; + }; + }; + type: "object"; +}; +export declare const readonlynessOptionsDefaults: ReadonlynessOptions; +/** + * Checks if the given type is readonly + */ +export declare function isTypeReadonly(program: ts.Program, type: ts.Type, options?: ReadonlynessOptions): boolean; +//# sourceMappingURL=isTypeReadonly.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.d.ts.map new file mode 100644 index 0000000..c63feee --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isTypeReadonly.d.ts","sourceRoot":"","sources":["../src/isTypeReadonly.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAiBnE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACxC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAC3C;AAED,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASf,CAAC;AAExB,eAAO,MAAM,2BAA2B,EAAE,mBAGzC,CAAC;AAgSF;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,EAAE,CAAC,OAAO,EACnB,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,OAAO,GAAE,mBAAiD,GACzD,OAAO,CAKT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js b/slider/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js new file mode 100644 index 0000000..de394a4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js @@ -0,0 +1,241 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readonlynessOptionsDefaults = exports.readonlynessOptionsSchema = void 0; +exports.isTypeReadonly = isTypeReadonly; +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const propertyTypes_1 = require("./propertyTypes"); +const TypeOrValueSpecifier_1 = require("./TypeOrValueSpecifier"); +var Readonlyness; +(function (Readonlyness) { + /** the type cannot be handled by the function */ + Readonlyness[Readonlyness["UnknownType"] = 1] = "UnknownType"; + /** the type is mutable */ + Readonlyness[Readonlyness["Mutable"] = 2] = "Mutable"; + /** the type is readonly */ + Readonlyness[Readonlyness["Readonly"] = 3] = "Readonly"; +})(Readonlyness || (Readonlyness = {})); +exports.readonlynessOptionsSchema = { + additionalProperties: false, + properties: { + allow: TypeOrValueSpecifier_1.typeOrValueSpecifiersSchema, + treatMethodsAsReadonly: { + type: 'boolean', + }, + }, + type: 'object', +}; +exports.readonlynessOptionsDefaults = { + allow: [], + treatMethodsAsReadonly: false, +}; +function hasSymbol(node) { + return Object.hasOwn(node, 'symbol'); +} +function isTypeReadonlyArrayOrTuple(program, type, options, seenTypes) { + const checker = program.getTypeChecker(); + function checkTypeArguments(arrayType) { + const typeArguments = checker.getTypeArguments(arrayType); + // this shouldn't happen in reality as: + // - tuples require at least 1 type argument + // - ReadonlyArray requires at least 1 type argument + /* istanbul ignore if */ if (typeArguments.length === 0) { + return Readonlyness.Readonly; + } + // validate the element types are also readonly + if (typeArguments.some(typeArg => isTypeReadonlyRecurser(program, typeArg, options, seenTypes) === + Readonlyness.Mutable)) { + return Readonlyness.Mutable; + } + return Readonlyness.Readonly; + } + if (checker.isArrayType(type)) { + const symbol = utils_1.ESLintUtils.nullThrows(type.getSymbol(), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('symbol', 'array type')); + const escapedName = symbol.getEscapedName(); + // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison + if (escapedName === 'Array') { + return Readonlyness.Mutable; + } + return checkTypeArguments(type); + } + if (checker.isTupleType(type)) { + if (!type.target.readonly) { + return Readonlyness.Mutable; + } + return checkTypeArguments(type); + } + return Readonlyness.UnknownType; +} +function isTypeReadonlyObject(program, type, options, seenTypes) { + const checker = program.getTypeChecker(); + function checkIndexSignature(kind) { + const indexInfo = checker.getIndexInfoOfType(type, kind); + if (indexInfo) { + if (!indexInfo.isReadonly) { + return Readonlyness.Mutable; + } + if (indexInfo.type === type || seenTypes.has(indexInfo.type)) { + return Readonlyness.Readonly; + } + return isTypeReadonlyRecurser(program, indexInfo.type, options, seenTypes); + } + return Readonlyness.UnknownType; + } + const properties = type.getProperties(); + if (properties.length) { + // ensure the properties are marked as readonly + for (const property of properties) { + if (options.treatMethodsAsReadonly) { + if (property.valueDeclaration != null && + hasSymbol(property.valueDeclaration) && + tsutils.isSymbolFlagSet(property.valueDeclaration.symbol, ts.SymbolFlags.Method)) { + continue; + } + const declarations = property.getDeclarations(); + const lastDeclaration = declarations != null && declarations.length > 0 + ? declarations[declarations.length - 1] + : undefined; + if (lastDeclaration != null && + hasSymbol(lastDeclaration) && + tsutils.isSymbolFlagSet(lastDeclaration.symbol, ts.SymbolFlags.Method)) { + continue; + } + } + if (tsutils.isPropertyReadonlyInType(type, property.getEscapedName(), checker)) { + continue; + } + const name = ts.getNameOfDeclaration(property.valueDeclaration); + if (name && ts.isPrivateIdentifier(name)) { + continue; + } + return Readonlyness.Mutable; + } + // all properties were readonly + // now ensure that all of the values are readonly also. + // do this after checking property readonly-ness as a perf optimization, + // as we might be able to bail out early due to a mutable property before + // doing this deep, potentially expensive check. + for (const property of properties) { + const propertyType = utils_1.ESLintUtils.nullThrows((0, propertyTypes_1.getTypeOfPropertyOfType)(checker, type, property), utils_1.ESLintUtils.NullThrowsReasons.MissingToken(`property "${property.name}"`, 'type')); + // handle recursive types. + // we only need this simple check, because a mutable recursive type will break via the above prop readonly check + if (seenTypes.has(propertyType)) { + continue; + } + if (isTypeReadonlyRecurser(program, propertyType, options, seenTypes) === + Readonlyness.Mutable) { + return Readonlyness.Mutable; + } + } + } + const isStringIndexSigReadonly = checkIndexSignature(ts.IndexKind.String); + if (isStringIndexSigReadonly === Readonlyness.Mutable) { + return isStringIndexSigReadonly; + } + const isNumberIndexSigReadonly = checkIndexSignature(ts.IndexKind.Number); + if (isNumberIndexSigReadonly === Readonlyness.Mutable) { + return isNumberIndexSigReadonly; + } + return Readonlyness.Readonly; +} +// a helper function to ensure the seenTypes map is always passed down, except by the external caller +function isTypeReadonlyRecurser(program, type, options, seenTypes) { + const checker = program.getTypeChecker(); + seenTypes.add(type); + if ((0, TypeOrValueSpecifier_1.typeMatchesSomeSpecifier)(type, options.allow, program)) { + return Readonlyness.Readonly; + } + if (tsutils.isUnionType(type)) { + // all types in the union must be readonly + const result = tsutils + .unionConstituents(type) + .every(t => seenTypes.has(t) || + isTypeReadonlyRecurser(program, t, options, seenTypes) === + Readonlyness.Readonly); + const readonlyness = result ? Readonlyness.Readonly : Readonlyness.Mutable; + return readonlyness; + } + if (tsutils.isIntersectionType(type)) { + // Special case for handling arrays/tuples (as readonly arrays/tuples always have mutable methods). + if (type.types.some(t => checker.isArrayType(t) || checker.isTupleType(t))) { + const allReadonlyParts = type.types.every(t => seenTypes.has(t) || + isTypeReadonlyRecurser(program, t, options, seenTypes) === + Readonlyness.Readonly); + return allReadonlyParts ? Readonlyness.Readonly : Readonlyness.Mutable; + } + // Normal case. + const isReadonlyObject = isTypeReadonlyObject(program, type, options, seenTypes); + if (isReadonlyObject !== Readonlyness.UnknownType) { + return isReadonlyObject; + } + } + if (tsutils.isConditionalType(type)) { + const result = [type.root.node.trueType, type.root.node.falseType] + .map(checker.getTypeFromTypeNode) + .every(t => seenTypes.has(t) || + isTypeReadonlyRecurser(program, t, options, seenTypes) === + Readonlyness.Readonly); + const readonlyness = result ? Readonlyness.Readonly : Readonlyness.Mutable; + return readonlyness; + } + // all non-object, non-intersection types are readonly. + // this should only be primitive types + if (!tsutils.isObjectType(type)) { + return Readonlyness.Readonly; + } + // pure function types are readonly + if (type.getCallSignatures().length > 0 && + type.getProperties().length === 0) { + return Readonlyness.Readonly; + } + const isReadonlyArray = isTypeReadonlyArrayOrTuple(program, type, options, seenTypes); + if (isReadonlyArray !== Readonlyness.UnknownType) { + return isReadonlyArray; + } + const isReadonlyObject = isTypeReadonlyObject(program, type, options, seenTypes); + /* istanbul ignore else */ if (isReadonlyObject !== Readonlyness.UnknownType) { + return isReadonlyObject; + } + throw new Error('Unhandled type'); +} +/** + * Checks if the given type is readonly + */ +function isTypeReadonly(program, type, options = exports.readonlynessOptionsDefaults) { + return (isTypeReadonlyRecurser(program, type, options, new Set()) === + Readonlyness.Readonly); +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.d.ts new file mode 100644 index 0000000..9ed7c2c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.d.ts @@ -0,0 +1,17 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import type * as ts from 'typescript'; +/** + * Does a simple check to see if there is an any being assigned to a non-any type. + * + * This also checks generic positions to ensure there's no unsafe sub-assignments. + * Note: in the case of generic positions, it makes the assumption that the two types are the same. + * + * @example See tests for examples + * + * @returns false if it's safe, or an object with the two types if it's unsafe + */ +export declare function isUnsafeAssignment(type: ts.Type, receiver: ts.Type, checker: ts.TypeChecker, senderNode: TSESTree.Node | null): false | { + receiver: ts.Type; + sender: ts.Type; +}; +//# sourceMappingURL=isUnsafeAssignment.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.d.ts.map new file mode 100644 index 0000000..8a52c57 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isUnsafeAssignment.d.ts","sourceRoot":"","sources":["../src/isUnsafeAssignment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAOtC;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,QAAQ,EAAE,EAAE,CAAC,IAAI,EACjB,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,UAAU,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,GAC/B,KAAK,GAAG;IAAE,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC;IAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAA;CAAE,CAQhD"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.js b/slider/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.js new file mode 100644 index 0000000..a6685ed --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.js @@ -0,0 +1,114 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isUnsafeAssignment = isUnsafeAssignment; +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const predicates_1 = require("./predicates"); +/** + * Does a simple check to see if there is an any being assigned to a non-any type. + * + * This also checks generic positions to ensure there's no unsafe sub-assignments. + * Note: in the case of generic positions, it makes the assumption that the two types are the same. + * + * @example See tests for examples + * + * @returns false if it's safe, or an object with the two types if it's unsafe + */ +function isUnsafeAssignment(type, receiver, checker, senderNode) { + return isUnsafeAssignmentWorker(type, receiver, checker, senderNode, new Map()); +} +function isUnsafeAssignmentWorker(type, receiver, checker, senderNode, visited) { + if ((0, predicates_1.isTypeAnyType)(type)) { + // Allow assignment of any ==> unknown. + if ((0, predicates_1.isTypeUnknownType)(receiver)) { + return false; + } + if (!(0, predicates_1.isTypeAnyType)(receiver)) { + return { receiver, sender: type }; + } + } + const typeAlreadyVisited = visited.get(type); + if (typeAlreadyVisited) { + if (typeAlreadyVisited.has(receiver)) { + return false; + } + typeAlreadyVisited.add(receiver); + } + else { + visited.set(type, new Set([receiver])); + } + if (tsutils.isTypeReference(type) && tsutils.isTypeReference(receiver)) { + // TODO - figure out how to handle cases like this, + // where the types are assignable, but not the same type + /* + function foo(): ReadonlySet { return new Set(); } + + // and + + type Test = { prop: T } + type Test2 = { prop: string } + declare const a: Test; + const b: Test2 = a; + */ + if (type.target !== receiver.target) { + // if the type references are different, assume safe, as we won't know how to compare the two types + // the generic positions might not be equivalent for both types + return false; + } + if (senderNode?.type === utils_1.AST_NODE_TYPES.NewExpression && + senderNode.callee.type === utils_1.AST_NODE_TYPES.Identifier && + senderNode.callee.name === 'Map' && + senderNode.arguments.length === 0 && + senderNode.typeArguments == null) { + // special case to handle `new Map()` + // unfortunately Map's default empty constructor is typed to return `Map` :( + // https://github.com/typescript-eslint/typescript-eslint/issues/2109#issuecomment-634144396 + return false; + } + const typeArguments = type.typeArguments ?? []; + const receiverTypeArguments = receiver.typeArguments ?? []; + for (let i = 0; i < typeArguments.length; i += 1) { + const arg = typeArguments[i]; + const receiverArg = receiverTypeArguments[i]; + const unsafe = isUnsafeAssignmentWorker(arg, receiverArg, checker, senderNode, visited); + if (unsafe) { + return { receiver, sender: type }; + } + } + return false; + } + return false; +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/predicates.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/predicates.d.ts new file mode 100644 index 0000000..8475633 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/predicates.d.ts @@ -0,0 +1,38 @@ +import * as ts from 'typescript'; +/** + * Checks if the given type is (or accepts) nullable + */ +export declare function isNullableType(type: ts.Type): boolean; +/** + * Checks if the given type is either an array type, + * or a union made up solely of array types. + */ +export declare function isTypeArrayTypeOrUnionOfArrayTypes(type: ts.Type, checker: ts.TypeChecker): boolean; +/** + * @returns true if the type is `never` + */ +export declare function isTypeNeverType(type: ts.Type): boolean; +/** + * @returns true if the type is `unknown` + */ +export declare function isTypeUnknownType(type: ts.Type): boolean; +export declare function isTypeReferenceType(type: ts.Type): type is ts.TypeReference; +/** + * @returns true if the type is `any` + */ +export declare function isTypeAnyType(type: ts.Type): boolean; +/** + * @returns true if the type is `any[]` + */ +export declare function isTypeAnyArrayType(type: ts.Type, checker: ts.TypeChecker): boolean; +/** + * @returns true if the type is `unknown[]` + */ +export declare function isTypeUnknownArrayType(type: ts.Type, checker: ts.TypeChecker): boolean; +/** + * @returns Whether a type is an instance of the parent type, including for the parent's base types. + */ +export declare function typeIsOrHasBaseType(type: ts.Type, parentType: ts.Type): boolean; +export declare function isTypeBigIntLiteralType(type: ts.Type): type is ts.BigIntLiteralType; +export declare function isTypeTemplateLiteralType(type: ts.Type): type is ts.TemplateLiteralType; +//# sourceMappingURL=predicates.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/predicates.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/predicates.d.ts.map new file mode 100644 index 0000000..be912d0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/predicates.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../src/predicates.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAMjC;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CASrD;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAChD,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,OAAO,EAAE,EAAE,CAAC,WAAW,GACtB,OAAO,CAQT;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAEtD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAExD;AAYD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,aAAa,CAM3E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAQpD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,OAAO,EAAE,EAAE,CAAC,WAAW,GACtB,OAAO,CAKT;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,OAAO,EAAE,EAAE,CAAC,WAAW,GACtB,OAAO,CAKT;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,UAAU,EAAE,EAAE,CAAC,IAAI,GAClB,OAAO,CAqBT;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,IAAI,IAAI,EAAE,CAAC,iBAAiB,CAE9B;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,IAAI,IAAI,EAAE,CAAC,mBAAmB,CAEhC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/predicates.js b/slider/node_modules/@typescript-eslint/type-utils/dist/predicates.js new file mode 100644 index 0000000..77672aa --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/predicates.js @@ -0,0 +1,157 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isNullableType = isNullableType; +exports.isTypeArrayTypeOrUnionOfArrayTypes = isTypeArrayTypeOrUnionOfArrayTypes; +exports.isTypeNeverType = isTypeNeverType; +exports.isTypeUnknownType = isTypeUnknownType; +exports.isTypeReferenceType = isTypeReferenceType; +exports.isTypeAnyType = isTypeAnyType; +exports.isTypeAnyArrayType = isTypeAnyArrayType; +exports.isTypeUnknownArrayType = isTypeUnknownArrayType; +exports.typeIsOrHasBaseType = typeIsOrHasBaseType; +exports.isTypeBigIntLiteralType = isTypeBigIntLiteralType; +exports.isTypeTemplateLiteralType = isTypeTemplateLiteralType; +const debug_1 = __importDefault(require("debug")); +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const typeFlagUtils_1 = require("./typeFlagUtils"); +const log = (0, debug_1.default)('typescript-eslint:type-utils:predicates'); +/** + * Checks if the given type is (or accepts) nullable + */ +function isNullableType(type) { + return (0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.Any | + ts.TypeFlags.Unknown | + ts.TypeFlags.Null | + ts.TypeFlags.Undefined | + ts.TypeFlags.Void); +} +/** + * Checks if the given type is either an array type, + * or a union made up solely of array types. + */ +function isTypeArrayTypeOrUnionOfArrayTypes(type, checker) { + for (const t of tsutils.unionConstituents(type)) { + if (!checker.isArrayType(t)) { + return false; + } + } + return true; +} +/** + * @returns true if the type is `never` + */ +function isTypeNeverType(type) { + return (0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.Never); +} +/** + * @returns true if the type is `unknown` + */ +function isTypeUnknownType(type) { + return (0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.Unknown); +} +// https://github.com/microsoft/TypeScript/blob/42aa18bf442c4df147e30deaf27261a41cbdc617/src/compiler/types.ts#L5157 +const Nullable = ts.TypeFlags.Undefined | ts.TypeFlags.Null; +// https://github.com/microsoft/TypeScript/blob/42aa18bf442c4df147e30deaf27261a41cbdc617/src/compiler/types.ts#L5187 +const ObjectFlagsType = ts.TypeFlags.Any | + Nullable | + ts.TypeFlags.Never | + ts.TypeFlags.Object | + ts.TypeFlags.Union | + ts.TypeFlags.Intersection; +function isTypeReferenceType(type) { + if ((type.flags & ObjectFlagsType) === 0) { + return false; + } + const objectTypeFlags = type.objectFlags; + return (objectTypeFlags & ts.ObjectFlags.Reference) !== 0; +} +/** + * @returns true if the type is `any` + */ +function isTypeAnyType(type) { + if ((0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.Any)) { + if (type.intrinsicName === 'error') { + log('Found an "error" any type'); + } + return true; + } + return false; +} +/** + * @returns true if the type is `any[]` + */ +function isTypeAnyArrayType(type, checker) { + return (checker.isArrayType(type) && + isTypeAnyType(checker.getTypeArguments(type)[0])); +} +/** + * @returns true if the type is `unknown[]` + */ +function isTypeUnknownArrayType(type, checker) { + return (checker.isArrayType(type) && + isTypeUnknownType(checker.getTypeArguments(type)[0])); +} +/** + * @returns Whether a type is an instance of the parent type, including for the parent's base types. + */ +function typeIsOrHasBaseType(type, parentType) { + const parentSymbol = parentType.getSymbol(); + if (!type.getSymbol() || !parentSymbol) { + return false; + } + const typeAndBaseTypes = [type]; + const ancestorTypes = type.getBaseTypes(); + if (ancestorTypes) { + typeAndBaseTypes.push(...ancestorTypes); + } + for (const baseType of typeAndBaseTypes) { + const baseSymbol = baseType.getSymbol(); + if (baseSymbol && baseSymbol.name === parentSymbol.name) { + return true; + } + } + return false; +} +function isTypeBigIntLiteralType(type) { + return (0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.BigIntLiteral); +} +function isTypeTemplateLiteralType(type) { + return (0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.TemplateLiteral); +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.d.ts new file mode 100644 index 0000000..1ca3f93 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.d.ts @@ -0,0 +1,4 @@ +import type * as ts from 'typescript'; +export declare function getTypeOfPropertyOfName(checker: ts.TypeChecker, type: ts.Type, name: string, escapedName?: ts.__String): ts.Type | undefined; +export declare function getTypeOfPropertyOfType(checker: ts.TypeChecker, type: ts.Type, property: ts.Symbol): ts.Type | undefined; +//# sourceMappingURL=propertyTypes.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.d.ts.map new file mode 100644 index 0000000..6b6fcfd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"propertyTypes.d.ts","sourceRoot":"","sources":["../src/propertyTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,EAAE,CAAC,QAAQ,GACxB,EAAE,CAAC,IAAI,GAAG,SAAS,CAerB;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,QAAQ,EAAE,EAAE,CAAC,MAAM,GAClB,EAAE,CAAC,IAAI,GAAG,SAAS,CAOrB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.js b/slider/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.js new file mode 100644 index 0000000..fe48875 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getTypeOfPropertyOfName = getTypeOfPropertyOfName; +exports.getTypeOfPropertyOfType = getTypeOfPropertyOfType; +function getTypeOfPropertyOfName(checker, type, name, escapedName) { + // Most names are directly usable in the checker and aren't different from escaped names + if (!escapedName || !isSymbol(escapedName)) { + return checker.getTypeOfPropertyOfType(type, name); + } + // Symbolic names may differ in their escaped name compared to their human-readable name + // https://github.com/typescript-eslint/typescript-eslint/issues/2143 + const escapedProperty = type + .getProperties() + .find(property => property.escapedName === escapedName); + return escapedProperty + ? checker.getDeclaredTypeOfSymbol(escapedProperty) + : undefined; +} +function getTypeOfPropertyOfType(checker, type, property) { + return getTypeOfPropertyOfName(checker, type, property.getName(), property.getEscapedName()); +} +// Symbolic names need to be specially handled because TS api is not sufficient for these cases. +// Source based on: +// https://github.com/microsoft/TypeScript/blob/0043abe982aae0d35f8df59f9715be6ada758ff7/src/compiler/utilities.ts#L3388-L3402 +function isSymbol(escapedName) { + return isKnownSymbol(escapedName) || isPrivateIdentifierSymbol(escapedName); +} +// case for escapedName: "__@foo@10", name: "__@foo@10" +function isKnownSymbol(escapedName) { + return escapedName.startsWith('__@'); +} +// case for escapedName: "__#1@#foo", name: "#foo" +function isPrivateIdentifierSymbol(escapedName) { + return escapedName.startsWith('__#'); +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.d.ts new file mode 100644 index 0000000..1e47539 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.d.ts @@ -0,0 +1,4 @@ +import * as ts from 'typescript'; +/*** Indicates whether identifiers require the use of quotation marks when accessing property definitions and dot notation. */ +export declare function requiresQuoting(name: string, target?: ts.ScriptTarget): boolean; +//# sourceMappingURL=requiresQuoting.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.d.ts.map new file mode 100644 index 0000000..3a8da9f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"requiresQuoting.d.ts","sourceRoot":"","sources":["../src/requiresQuoting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,8HAA8H;AAC9H,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,EAAE,CAAC,YAAqC,GAC/C,OAAO,CAgBT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.js b/slider/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.js new file mode 100644 index 0000000..84e9987 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.js @@ -0,0 +1,52 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.requiresQuoting = requiresQuoting; +const ts = __importStar(require("typescript")); +/*** Indicates whether identifiers require the use of quotation marks when accessing property definitions and dot notation. */ +function requiresQuoting(name, target = ts.ScriptTarget.ESNext) { + if (name.length === 0) { + return true; + } + if (!ts.isIdentifierStart(name.charCodeAt(0), target)) { + return true; + } + for (let i = 1; i < name.length; i += 1) { + if (!ts.isIdentifierPart(name.charCodeAt(i), target)) { + return true; + } + } + return false; +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.d.ts new file mode 100644 index 0000000..69b6a1c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.d.ts @@ -0,0 +1,18 @@ +import * as ts from 'typescript'; +/** + * Gets all of the type flags in a type, iterating through unions automatically. + */ +export declare function getTypeFlags(type: ts.Type): ts.TypeFlags; +/** + * @param flagsToCheck The composition of one or more `ts.TypeFlags`. + * @param isReceiver Whether the type is a receiving type (e.g. the type of a + * called function's parameter). + * @remarks + * Note that if the type is a union, this function will decompose it into the + * parts and get the flags of every union constituent. If this is not desired, + * use the `isTypeFlag` function from tsutils. + */ +export declare function isTypeFlagSet(type: ts.Type, flagsToCheck: ts.TypeFlags, +/** @deprecated This params is not used and will be removed in the future.*/ +isReceiver?: boolean): boolean; +//# sourceMappingURL=typeFlagUtils.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.d.ts.map new file mode 100644 index 0000000..ebad506 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typeFlagUtils.d.ts","sourceRoot":"","sources":["../src/typeFlagUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAIjC;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,SAAS,CAOxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,YAAY,EAAE,EAAE,CAAC,SAAS;AAC1B,4EAA4E;AAC5E,UAAU,CAAC,EAAE,OAAO,GACnB,OAAO,CAST"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js b/slider/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js new file mode 100644 index 0000000..72aaeac --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js @@ -0,0 +1,70 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getTypeFlags = getTypeFlags; +exports.isTypeFlagSet = isTypeFlagSet; +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const ANY_OR_UNKNOWN = ts.TypeFlags.Any | ts.TypeFlags.Unknown; +/** + * Gets all of the type flags in a type, iterating through unions automatically. + */ +function getTypeFlags(type) { + // @ts-expect-error Since typescript 5.0, this is invalid, but uses 0 as the default value of TypeFlags. + let flags = 0; + for (const t of tsutils.unionConstituents(type)) { + flags |= t.flags; + } + return flags; +} +/** + * @param flagsToCheck The composition of one or more `ts.TypeFlags`. + * @param isReceiver Whether the type is a receiving type (e.g. the type of a + * called function's parameter). + * @remarks + * Note that if the type is a union, this function will decompose it into the + * parts and get the flags of every union constituent. If this is not desired, + * use the `isTypeFlag` function from tsutils. + */ +function isTypeFlagSet(type, flagsToCheck, +/** @deprecated This params is not used and will be removed in the future.*/ +isReceiver) { + const flags = getTypeFlags(type); + // eslint-disable-next-line @typescript-eslint/no-deprecated -- not used + if (isReceiver && flags & ANY_OR_UNKNOWN) { + return true; + } + return (flags & flagsToCheck) !== 0; +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierNameMatches.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierNameMatches.d.ts new file mode 100644 index 0000000..7089787 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierNameMatches.d.ts @@ -0,0 +1,3 @@ +import type * as ts from 'typescript'; +export declare function specifierNameMatches(type: ts.Type, names: string | string[]): boolean; +//# sourceMappingURL=specifierNameMatches.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierNameMatches.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierNameMatches.d.ts.map new file mode 100644 index 0000000..c803c41 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierNameMatches.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"specifierNameMatches.d.ts","sourceRoot":"","sources":["../../src/typeOrValueSpecifiers/specifierNameMatches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GACvB,OAAO,CAeT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierNameMatches.js b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierNameMatches.js new file mode 100644 index 0000000..e1c5d5b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierNameMatches.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.specifierNameMatches = specifierNameMatches; +function specifierNameMatches(type, names) { + if (typeof names === 'string') { + names = [names]; + } + const symbol = type.aliasSymbol ?? type.getSymbol(); + const candidateNames = symbol + ? [symbol.escapedName, type.intrinsicName] + : [type.intrinsicName]; + if (names.some(item => candidateNames.includes(item))) { + return true; + } + return false; +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInFile.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInFile.d.ts new file mode 100644 index 0000000..3745bb1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInFile.d.ts @@ -0,0 +1,3 @@ +import type * as ts from 'typescript'; +export declare function typeDeclaredInFile(relativePath: string | undefined, declarationFiles: ts.SourceFile[], program: ts.Program): boolean; +//# sourceMappingURL=typeDeclaredInFile.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInFile.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInFile.d.ts.map new file mode 100644 index 0000000..216d005 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInFile.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typeDeclaredInFile.d.ts","sourceRoot":"","sources":["../../src/typeOrValueSpecifiers/typeDeclaredInFile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAKtC,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,gBAAgB,EAAE,EAAE,CAAC,UAAU,EAAE,EACjC,OAAO,EAAE,EAAE,CAAC,OAAO,GAClB,OAAO,CAaT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInFile.js b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInFile.js new file mode 100644 index 0000000..3a4ed82 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInFile.js @@ -0,0 +1,16 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.typeDeclaredInFile = typeDeclaredInFile; +const typescript_estree_1 = require("@typescript-eslint/typescript-estree"); +const node_path_1 = __importDefault(require("node:path")); +function typeDeclaredInFile(relativePath, declarationFiles, program) { + if (relativePath == null) { + const cwd = (0, typescript_estree_1.getCanonicalFileName)(program.getCurrentDirectory()); + return declarationFiles.some(declaration => (0, typescript_estree_1.getCanonicalFileName)(declaration.fileName).startsWith(cwd)); + } + const absolutePath = (0, typescript_estree_1.getCanonicalFileName)(node_path_1.default.join(program.getCurrentDirectory(), relativePath)); + return declarationFiles.some(declaration => (0, typescript_estree_1.getCanonicalFileName)(declaration.fileName) === absolutePath); +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInLib.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInLib.d.ts new file mode 100644 index 0000000..32e23c4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInLib.d.ts @@ -0,0 +1,3 @@ +import type * as ts from 'typescript'; +export declare function typeDeclaredInLib(declarationFiles: ts.SourceFile[], program: ts.Program): boolean; +//# sourceMappingURL=typeDeclaredInLib.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInLib.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInLib.d.ts.map new file mode 100644 index 0000000..5a7b8bc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInLib.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typeDeclaredInLib.d.ts","sourceRoot":"","sources":["../../src/typeOrValueSpecifiers/typeDeclaredInLib.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC,wBAAgB,iBAAiB,CAC/B,gBAAgB,EAAE,EAAE,CAAC,UAAU,EAAE,EACjC,OAAO,EAAE,EAAE,CAAC,OAAO,GAClB,OAAO,CAUT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInLib.js b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInLib.js new file mode 100644 index 0000000..1f695f2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInLib.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.typeDeclaredInLib = typeDeclaredInLib; +function typeDeclaredInLib(declarationFiles, program) { + // Assertion: The type is not an error type. + // Intrinsic type (i.e. string, number, boolean, etc) - Treat it as if it's from lib. + if (declarationFiles.length === 0) { + return true; + } + return declarationFiles.some(declaration => program.isSourceFileDefaultLibrary(declaration)); +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.d.ts b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.d.ts new file mode 100644 index 0000000..63c1967 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.d.ts @@ -0,0 +1,3 @@ +import * as ts from 'typescript'; +export declare function typeDeclaredInPackageDeclarationFile(packageName: string, declarations: ts.Node[], declarationFiles: ts.SourceFile[], program: ts.Program): boolean; +//# sourceMappingURL=typeDeclaredInPackageDeclarationFile.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.d.ts.map b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.d.ts.map new file mode 100644 index 0000000..ea6cd84 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typeDeclaredInPackageDeclarationFile.d.ts","sourceRoot":"","sources":["../../src/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAiDjC,wBAAgB,oCAAoC,CAClD,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,EAAE,CAAC,IAAI,EAAE,EACvB,gBAAgB,EAAE,EAAE,CAAC,UAAU,EAAE,EACjC,OAAO,EAAE,EAAE,CAAC,OAAO,GAClB,OAAO,CAKT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.js b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.js new file mode 100644 index 0000000..4656f28 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.js @@ -0,0 +1,70 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.typeDeclaredInPackageDeclarationFile = typeDeclaredInPackageDeclarationFile; +const ts = __importStar(require("typescript")); +function findParentModuleDeclaration(node) { + switch (node.kind) { + case ts.SyntaxKind.ModuleDeclaration: + // "namespace x {...}" should be ignored here + if (node.flags & ts.NodeFlags.Namespace) { + break; + } + return ts.isStringLiteral(node.name) + ? node + : undefined; + case ts.SyntaxKind.SourceFile: + return undefined; + } + return findParentModuleDeclaration(node.parent); +} +function typeDeclaredInDeclareModule(packageName, declarations) { + return declarations.some(declaration => findParentModuleDeclaration(declaration)?.name.text === packageName); +} +function typeDeclaredInDeclarationFile(packageName, declarationFiles, program) { + // Handle scoped packages: if the name starts with @, remove it and replace / with __ + const typesPackageName = packageName.replace(/^@([^/]+)\//, '$1__'); + const matcher = new RegExp(`${packageName}|${typesPackageName}`); + return declarationFiles.some(declaration => { + const packageIdName = program.sourceFileToPackageName.get(declaration.path); + return (packageIdName != null && + matcher.test(packageIdName) && + program.isSourceFileFromExternalLibrary(declaration)); + }); +} +function typeDeclaredInPackageDeclarationFile(packageName, declarations, declarationFiles, program) { + return (typeDeclaredInDeclareModule(packageName, declarations) || + typeDeclaredInDeclarationFile(packageName, declarationFiles, program)); +} diff --git a/slider/node_modules/@typescript-eslint/type-utils/package.json b/slider/node_modules/@typescript-eslint/type-utils/package.json new file mode 100644 index 0000000..24f6386 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/type-utils/package.json @@ -0,0 +1,81 @@ +{ + "name": "@typescript-eslint/type-utils", + "version": "8.44.1", + "description": "Type utilities for working with TypeScript + ESLint together", + "files": [ + "dist", + "!*.tsbuildinfo", + "package.json", + "README.md", + "LICENSE" + ], + "type": "commonjs", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/type-utils" + }, + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "homepage": "https://typescript-eslint.io", + "license": "MIT", + "keywords": [ + "eslint", + "typescript", + "estree" + ], + "scripts": { + "build": "yarn run -BT nx build", + "clean": "rimraf dist/ coverage/", + "format": "yarn run -T format", + "lint": "yarn run -BT nx lint", + "test": "yarn run -BT nx test", + "typecheck": "yarn run -BT nx typecheck" + }, + "dependencies": { + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/utils": "8.44.1", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + }, + "devDependencies": { + "@typescript-eslint/parser": "8.44.1", + "@vitest/coverage-v8": "^3.1.3", + "ajv": "^6.12.6", + "eslint": "*", + "rimraf": "*", + "typescript": "*", + "vitest": "^3.1.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "nx": { + "name": "type-utils", + "includedScripts": [ + "clean" + ], + "targets": { + "lint": { + "command": "eslint" + } + } + } +} diff --git a/slider/node_modules/@typescript-eslint/types/LICENSE b/slider/node_modules/@typescript-eslint/types/LICENSE new file mode 100644 index 0000000..5de6cb6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 typescript-eslint and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@typescript-eslint/types/README.md b/slider/node_modules/@typescript-eslint/types/README.md new file mode 100644 index 0000000..22ded2b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/README.md @@ -0,0 +1,12 @@ +# `@typescript-eslint/types` + +> Types for the TypeScript-ESTree AST spec + +This package exists to help us reduce cycles and provide lighter-weight packages at runtime. + +## ✋ Internal Package + +This is an _internal package_ to the [typescript-eslint monorepo](https://github.com/typescript-eslint/typescript-eslint). +You likely don't want to use it directly. + +👉 See **https://typescript-eslint.io** for docs on typescript-eslint. diff --git a/slider/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts b/slider/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts new file mode 100644 index 0000000..ec43fea --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts @@ -0,0 +1,2144 @@ +/********************************************** + * DO NOT MODIFY THIS FILE MANUALLY * + * * + * THIS FILE HAS BEEN COPIED FROM ast-spec. * + * ANY CHANGES WILL BE LOST ON THE NEXT BUILD * + * * + * MAKE CHANGES TO ast-spec AND THEN RUN * + * yarn build * + **********************************************/ +import type { SyntaxKind } from 'typescript'; +export declare type Accessibility = 'private' | 'protected' | 'public'; +export declare type AccessorProperty = AccessorPropertyComputedName | AccessorPropertyNonComputedName; +export declare interface AccessorPropertyComputedName extends PropertyDefinitionComputedNameBase { + type: AST_NODE_TYPES.AccessorProperty; +} +export declare interface AccessorPropertyNonComputedName extends PropertyDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.AccessorProperty; +} +export declare interface ArrayExpression extends BaseNode { + type: AST_NODE_TYPES.ArrayExpression; + /** + * an element will be `null` in the case of a sparse array: `[1, ,3]` + */ + elements: (Expression | SpreadElement | null)[]; +} +export declare interface ArrayPattern extends BaseNode { + type: AST_NODE_TYPES.ArrayPattern; + decorators: Decorator[]; + elements: (DestructuringPattern | null)[]; + optional: boolean; + typeAnnotation: TSTypeAnnotation | undefined; +} +export declare interface ArrowFunctionExpression extends BaseNode { + type: AST_NODE_TYPES.ArrowFunctionExpression; + async: boolean; + body: BlockStatement | Expression; + expression: boolean; + generator: boolean; + id: null; + params: Parameter[]; + returnType: TSTypeAnnotation | undefined; + typeParameters: TSTypeParameterDeclaration | undefined; +} +export declare interface AssignmentExpression extends BaseNode { + type: AST_NODE_TYPES.AssignmentExpression; + left: Expression; + operator: ValueOf; + right: Expression; +} +export declare interface AssignmentOperatorToText { + [SyntaxKind.AmpersandAmpersandEqualsToken]: '&&='; + [SyntaxKind.AmpersandEqualsToken]: '&='; + [SyntaxKind.AsteriskAsteriskEqualsToken]: '**='; + [SyntaxKind.AsteriskEqualsToken]: '*='; + [SyntaxKind.BarBarEqualsToken]: '||='; + [SyntaxKind.BarEqualsToken]: '|='; + [SyntaxKind.CaretEqualsToken]: '^='; + [SyntaxKind.EqualsToken]: '='; + [SyntaxKind.GreaterThanGreaterThanEqualsToken]: '>>='; + [SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken]: '>>>='; + [SyntaxKind.LessThanLessThanEqualsToken]: '<<='; + [SyntaxKind.MinusEqualsToken]: '-='; + [SyntaxKind.PercentEqualsToken]: '%='; + [SyntaxKind.PlusEqualsToken]: '+='; + [SyntaxKind.QuestionQuestionEqualsToken]: '??='; + [SyntaxKind.SlashEqualsToken]: '/='; +} +export declare interface AssignmentPattern extends BaseNode { + type: AST_NODE_TYPES.AssignmentPattern; + decorators: Decorator[]; + left: BindingName; + optional: boolean; + right: Expression; + typeAnnotation: TSTypeAnnotation | undefined; +} +export declare enum AST_NODE_TYPES { + AccessorProperty = "AccessorProperty", + ArrayExpression = "ArrayExpression", + ArrayPattern = "ArrayPattern", + ArrowFunctionExpression = "ArrowFunctionExpression", + AssignmentExpression = "AssignmentExpression", + AssignmentPattern = "AssignmentPattern", + AwaitExpression = "AwaitExpression", + BinaryExpression = "BinaryExpression", + BlockStatement = "BlockStatement", + BreakStatement = "BreakStatement", + CallExpression = "CallExpression", + CatchClause = "CatchClause", + ChainExpression = "ChainExpression", + ClassBody = "ClassBody", + ClassDeclaration = "ClassDeclaration", + ClassExpression = "ClassExpression", + ConditionalExpression = "ConditionalExpression", + ContinueStatement = "ContinueStatement", + DebuggerStatement = "DebuggerStatement", + Decorator = "Decorator", + DoWhileStatement = "DoWhileStatement", + EmptyStatement = "EmptyStatement", + ExportAllDeclaration = "ExportAllDeclaration", + ExportDefaultDeclaration = "ExportDefaultDeclaration", + ExportNamedDeclaration = "ExportNamedDeclaration", + ExportSpecifier = "ExportSpecifier", + ExpressionStatement = "ExpressionStatement", + ForInStatement = "ForInStatement", + ForOfStatement = "ForOfStatement", + ForStatement = "ForStatement", + FunctionDeclaration = "FunctionDeclaration", + FunctionExpression = "FunctionExpression", + Identifier = "Identifier", + IfStatement = "IfStatement", + ImportAttribute = "ImportAttribute", + ImportDeclaration = "ImportDeclaration", + ImportDefaultSpecifier = "ImportDefaultSpecifier", + ImportExpression = "ImportExpression", + ImportNamespaceSpecifier = "ImportNamespaceSpecifier", + ImportSpecifier = "ImportSpecifier", + JSXAttribute = "JSXAttribute", + JSXClosingElement = "JSXClosingElement", + JSXClosingFragment = "JSXClosingFragment", + JSXElement = "JSXElement", + JSXEmptyExpression = "JSXEmptyExpression", + JSXExpressionContainer = "JSXExpressionContainer", + JSXFragment = "JSXFragment", + JSXIdentifier = "JSXIdentifier", + JSXMemberExpression = "JSXMemberExpression", + JSXNamespacedName = "JSXNamespacedName", + JSXOpeningElement = "JSXOpeningElement", + JSXOpeningFragment = "JSXOpeningFragment", + JSXSpreadAttribute = "JSXSpreadAttribute", + JSXSpreadChild = "JSXSpreadChild", + JSXText = "JSXText", + LabeledStatement = "LabeledStatement", + Literal = "Literal", + LogicalExpression = "LogicalExpression", + MemberExpression = "MemberExpression", + MetaProperty = "MetaProperty", + MethodDefinition = "MethodDefinition", + NewExpression = "NewExpression", + ObjectExpression = "ObjectExpression", + ObjectPattern = "ObjectPattern", + PrivateIdentifier = "PrivateIdentifier", + Program = "Program", + Property = "Property", + PropertyDefinition = "PropertyDefinition", + RestElement = "RestElement", + ReturnStatement = "ReturnStatement", + SequenceExpression = "SequenceExpression", + SpreadElement = "SpreadElement", + StaticBlock = "StaticBlock", + Super = "Super", + SwitchCase = "SwitchCase", + SwitchStatement = "SwitchStatement", + TaggedTemplateExpression = "TaggedTemplateExpression", + TemplateElement = "TemplateElement", + TemplateLiteral = "TemplateLiteral", + ThisExpression = "ThisExpression", + ThrowStatement = "ThrowStatement", + TryStatement = "TryStatement", + UnaryExpression = "UnaryExpression", + UpdateExpression = "UpdateExpression", + VariableDeclaration = "VariableDeclaration", + VariableDeclarator = "VariableDeclarator", + WhileStatement = "WhileStatement", + WithStatement = "WithStatement", + YieldExpression = "YieldExpression", + TSAbstractAccessorProperty = "TSAbstractAccessorProperty", + TSAbstractKeyword = "TSAbstractKeyword", + TSAbstractMethodDefinition = "TSAbstractMethodDefinition", + TSAbstractPropertyDefinition = "TSAbstractPropertyDefinition", + TSAnyKeyword = "TSAnyKeyword", + TSArrayType = "TSArrayType", + TSAsExpression = "TSAsExpression", + TSAsyncKeyword = "TSAsyncKeyword", + TSBigIntKeyword = "TSBigIntKeyword", + TSBooleanKeyword = "TSBooleanKeyword", + TSCallSignatureDeclaration = "TSCallSignatureDeclaration", + TSClassImplements = "TSClassImplements", + TSConditionalType = "TSConditionalType", + TSConstructorType = "TSConstructorType", + TSConstructSignatureDeclaration = "TSConstructSignatureDeclaration", + TSDeclareFunction = "TSDeclareFunction", + TSDeclareKeyword = "TSDeclareKeyword", + TSEmptyBodyFunctionExpression = "TSEmptyBodyFunctionExpression", + TSEnumBody = "TSEnumBody", + TSEnumDeclaration = "TSEnumDeclaration", + TSEnumMember = "TSEnumMember", + TSExportAssignment = "TSExportAssignment", + TSExportKeyword = "TSExportKeyword", + TSExternalModuleReference = "TSExternalModuleReference", + TSFunctionType = "TSFunctionType", + TSImportEqualsDeclaration = "TSImportEqualsDeclaration", + TSImportType = "TSImportType", + TSIndexedAccessType = "TSIndexedAccessType", + TSIndexSignature = "TSIndexSignature", + TSInferType = "TSInferType", + TSInstantiationExpression = "TSInstantiationExpression", + TSInterfaceBody = "TSInterfaceBody", + TSInterfaceDeclaration = "TSInterfaceDeclaration", + TSInterfaceHeritage = "TSInterfaceHeritage", + TSIntersectionType = "TSIntersectionType", + TSIntrinsicKeyword = "TSIntrinsicKeyword", + TSLiteralType = "TSLiteralType", + TSMappedType = "TSMappedType", + TSMethodSignature = "TSMethodSignature", + TSModuleBlock = "TSModuleBlock", + TSModuleDeclaration = "TSModuleDeclaration", + TSNamedTupleMember = "TSNamedTupleMember", + TSNamespaceExportDeclaration = "TSNamespaceExportDeclaration", + TSNeverKeyword = "TSNeverKeyword", + TSNonNullExpression = "TSNonNullExpression", + TSNullKeyword = "TSNullKeyword", + TSNumberKeyword = "TSNumberKeyword", + TSObjectKeyword = "TSObjectKeyword", + TSOptionalType = "TSOptionalType", + TSParameterProperty = "TSParameterProperty", + TSPrivateKeyword = "TSPrivateKeyword", + TSPropertySignature = "TSPropertySignature", + TSProtectedKeyword = "TSProtectedKeyword", + TSPublicKeyword = "TSPublicKeyword", + TSQualifiedName = "TSQualifiedName", + TSReadonlyKeyword = "TSReadonlyKeyword", + TSRestType = "TSRestType", + TSSatisfiesExpression = "TSSatisfiesExpression", + TSStaticKeyword = "TSStaticKeyword", + TSStringKeyword = "TSStringKeyword", + TSSymbolKeyword = "TSSymbolKeyword", + TSTemplateLiteralType = "TSTemplateLiteralType", + TSThisType = "TSThisType", + TSTupleType = "TSTupleType", + TSTypeAliasDeclaration = "TSTypeAliasDeclaration", + TSTypeAnnotation = "TSTypeAnnotation", + TSTypeAssertion = "TSTypeAssertion", + TSTypeLiteral = "TSTypeLiteral", + TSTypeOperator = "TSTypeOperator", + TSTypeParameter = "TSTypeParameter", + TSTypeParameterDeclaration = "TSTypeParameterDeclaration", + TSTypeParameterInstantiation = "TSTypeParameterInstantiation", + TSTypePredicate = "TSTypePredicate", + TSTypeQuery = "TSTypeQuery", + TSTypeReference = "TSTypeReference", + TSUndefinedKeyword = "TSUndefinedKeyword", + TSUnionType = "TSUnionType", + TSUnknownKeyword = "TSUnknownKeyword", + TSVoidKeyword = "TSVoidKeyword" +} +export declare enum AST_TOKEN_TYPES { + Boolean = "Boolean", + Identifier = "Identifier", + JSXIdentifier = "JSXIdentifier", + PrivateIdentifier = "PrivateIdentifier", + JSXText = "JSXText", + Keyword = "Keyword", + Null = "Null", + Numeric = "Numeric", + Punctuator = "Punctuator", + RegularExpression = "RegularExpression", + String = "String", + Template = "Template", + Block = "Block", + Line = "Line" +} +export declare interface AwaitExpression extends BaseNode { + type: AST_NODE_TYPES.AwaitExpression; + argument: Expression; +} +export declare interface BaseNode extends NodeOrTokenData { + type: AST_NODE_TYPES; +} +declare interface BaseToken extends NodeOrTokenData { + type: AST_TOKEN_TYPES; + value: string; +} +export declare interface BigIntLiteral extends LiteralBase { + bigint: string; + value: bigint | null; +} +export declare interface BinaryExpression extends BaseNode { + type: AST_NODE_TYPES.BinaryExpression; + left: Expression | PrivateIdentifier; + operator: ValueOf; + right: Expression; +} +export declare interface BinaryOperatorToText { + [SyntaxKind.AmpersandAmpersandToken]: '&&'; + [SyntaxKind.AmpersandToken]: '&'; + [SyntaxKind.AsteriskAsteriskToken]: '**'; + [SyntaxKind.AsteriskToken]: '*'; + [SyntaxKind.BarBarToken]: '||'; + [SyntaxKind.BarToken]: '|'; + [SyntaxKind.CaretToken]: '^'; + [SyntaxKind.EqualsEqualsEqualsToken]: '==='; + [SyntaxKind.EqualsEqualsToken]: '=='; + [SyntaxKind.ExclamationEqualsEqualsToken]: '!=='; + [SyntaxKind.ExclamationEqualsToken]: '!='; + [SyntaxKind.GreaterThanEqualsToken]: '>='; + [SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>'; + [SyntaxKind.GreaterThanGreaterThanToken]: '>>'; + [SyntaxKind.GreaterThanToken]: '>'; + [SyntaxKind.InKeyword]: 'in'; + [SyntaxKind.InstanceOfKeyword]: 'instanceof'; + [SyntaxKind.LessThanEqualsToken]: '<='; + [SyntaxKind.LessThanLessThanToken]: '<<'; + [SyntaxKind.LessThanToken]: '<'; + [SyntaxKind.MinusToken]: '-'; + [SyntaxKind.PercentToken]: '%'; + [SyntaxKind.PlusToken]: '+'; + [SyntaxKind.SlashToken]: '/'; +} +export declare type BindingName = BindingPattern | Identifier; +export declare type BindingPattern = ArrayPattern | ObjectPattern; +export declare interface BlockComment extends BaseToken { + type: AST_TOKEN_TYPES.Block; +} +export declare interface BlockStatement extends BaseNode { + type: AST_NODE_TYPES.BlockStatement; + body: Statement[]; +} +export declare interface BooleanLiteral extends LiteralBase { + raw: 'false' | 'true'; + value: boolean; +} +export declare interface BooleanToken extends BaseToken { + type: AST_TOKEN_TYPES.Boolean; +} +export declare interface BreakStatement extends BaseNode { + type: AST_NODE_TYPES.BreakStatement; + label: Identifier | null; +} +export declare interface CallExpression extends BaseNode { + type: AST_NODE_TYPES.CallExpression; + arguments: CallExpressionArgument[]; + callee: Expression; + optional: boolean; + typeArguments: TSTypeParameterInstantiation | undefined; +} +export declare type CallExpressionArgument = Expression | SpreadElement; +export declare interface CatchClause extends BaseNode { + type: AST_NODE_TYPES.CatchClause; + body: BlockStatement; + param: BindingName | null; +} +export declare type ChainElement = CallExpression | MemberExpression | TSNonNullExpression; +export declare interface ChainExpression extends BaseNode { + type: AST_NODE_TYPES.ChainExpression; + expression: ChainElement; +} +declare interface ClassBase extends BaseNode { + /** + * Whether the class is an abstract class. + * @example + * ```ts + * abstract class Foo {} + * ``` + */ + abstract: boolean; + /** + * The class body. + */ + body: ClassBody; + /** + * Whether the class has been `declare`d: + * @example + * ```ts + * declare class Foo {} + * ``` + */ + declare: boolean; + /** + * The decorators declared for the class. + * @example + * ```ts + * @deco + * class Foo {} + * ``` + */ + decorators: Decorator[]; + /** + * The class's name. + * - For a `ClassExpression` this may be `null` if the name is omitted. + * - For a `ClassDeclaration` this may be `null` if and only if the parent is + * an `ExportDefaultDeclaration`. + */ + id: Identifier | null; + /** + * The implemented interfaces for the class. + */ + implements: TSClassImplements[]; + /** + * The super class this class extends. + */ + superClass: LeftHandSideExpression | null; + /** + * The generic type parameters passed to the superClass. + */ + superTypeArguments: TSTypeParameterInstantiation | undefined; + /** + * The generic type parameters declared for the class. + */ + typeParameters: TSTypeParameterDeclaration | undefined; +} +export declare interface ClassBody extends BaseNode { + type: AST_NODE_TYPES.ClassBody; + body: ClassElement[]; +} +export declare type ClassDeclaration = ClassDeclarationWithName | ClassDeclarationWithOptionalName; +declare interface ClassDeclarationBase extends ClassBase { + type: AST_NODE_TYPES.ClassDeclaration; +} +/** + * A normal class declaration: + * ``` + * class A {} + * ``` + */ +export declare interface ClassDeclarationWithName extends ClassDeclarationBase { + id: Identifier; +} +/** + * Default-exported class declarations have optional names: + * ``` + * export default class {} + * ``` + */ +export declare interface ClassDeclarationWithOptionalName extends ClassDeclarationBase { + id: Identifier | null; +} +export declare type ClassElement = AccessorProperty | MethodDefinition | PropertyDefinition | StaticBlock | TSAbstractAccessorProperty | TSAbstractMethodDefinition | TSAbstractPropertyDefinition | TSIndexSignature; +export declare interface ClassExpression extends ClassBase { + type: AST_NODE_TYPES.ClassExpression; + abstract: false; + declare: false; +} +declare interface ClassMethodDefinitionNonComputedNameBase extends MethodDefinitionBase { + computed: false; + key: ClassPropertyNameNonComputed; +} +declare interface ClassPropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase { + computed: false; + key: ClassPropertyNameNonComputed; +} +export declare type ClassPropertyNameNonComputed = PrivateIdentifier | PropertyNameNonComputed; +export declare type Comment = BlockComment | LineComment; +export declare interface ConditionalExpression extends BaseNode { + type: AST_NODE_TYPES.ConditionalExpression; + alternate: Expression; + consequent: Expression; + test: Expression; +} +export declare interface ConstDeclaration extends LetOrConstOrVarDeclarationBase { + /** + * In a `declare const` declaration, the declarators may have initializers, but + * not definite assignment assertions. Each declarator cannot have both an + * initializer and a type annotation. + * + * Even if the declaration has no `declare`, it may still be ambient and have + * no initializer. + */ + declarations: VariableDeclaratorMaybeInit[]; + kind: 'const'; +} +export declare interface ContinueStatement extends BaseNode { + type: AST_NODE_TYPES.ContinueStatement; + label: Identifier | null; +} +export declare interface DebuggerStatement extends BaseNode { + type: AST_NODE_TYPES.DebuggerStatement; +} +/** + * @deprecated + * Note that this is neither up to date nor fully correct. + */ +export declare type DeclarationStatement = ClassDeclaration | ClassExpression | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | FunctionDeclaration | TSDeclareFunction | TSEnumDeclaration | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSNamespaceExportDeclaration | TSTypeAliasDeclaration; +export declare interface Decorator extends BaseNode { + type: AST_NODE_TYPES.Decorator; + expression: LeftHandSideExpression; +} +export declare type DefaultExportDeclarations = ClassDeclarationWithOptionalName | Expression | FunctionDeclarationWithName | FunctionDeclarationWithOptionalName | TSDeclareFunction | TSEnumDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclaration; +export declare type DestructuringPattern = ArrayPattern | AssignmentPattern | Identifier | MemberExpression | ObjectPattern | RestElement; +export declare interface DoWhileStatement extends BaseNode { + type: AST_NODE_TYPES.DoWhileStatement; + body: Statement; + test: Expression; +} +export declare interface EmptyStatement extends BaseNode { + type: AST_NODE_TYPES.EmptyStatement; +} +export declare type EntityName = Identifier | ThisExpression | TSQualifiedName; +export declare interface ExportAllDeclaration extends BaseNode { + type: AST_NODE_TYPES.ExportAllDeclaration; + /** + * The assertions declared for the export. + * @example + * ```ts + * export * from 'mod' assert \{ type: 'json' \}; + * ``` + * @deprecated Replaced with {@link `attributes`}. + */ + assertions: ImportAttribute[]; + /** + * The attributes declared for the export. + * @example + * ```ts + * export * from 'mod' with \{ type: 'json' \}; + * ``` + */ + attributes: ImportAttribute[]; + /** + * The name for the exported items (`as X`). `null` if no name is assigned. + */ + exported: Identifier | null; + /** + * The kind of the export. + */ + exportKind: ExportKind; + /** + * The source module being exported from. + */ + source: StringLiteral; +} +declare type ExportAndImportKind = 'type' | 'value'; +export declare type ExportDeclaration = DefaultExportDeclarations | NamedExportDeclarations; +export declare interface ExportDefaultDeclaration extends BaseNode { + type: AST_NODE_TYPES.ExportDefaultDeclaration; + /** + * The declaration being exported. + */ + declaration: DefaultExportDeclarations; + /** + * The kind of the export. Always `value` for default exports. + */ + exportKind: 'value'; +} +declare type ExportKind = ExportAndImportKind; +export declare type ExportNamedDeclaration = ExportNamedDeclarationWithoutSourceWithMultiple | ExportNamedDeclarationWithoutSourceWithSingle | ExportNamedDeclarationWithSource; +declare interface ExportNamedDeclarationBase extends BaseNode { + type: AST_NODE_TYPES.ExportNamedDeclaration; + /** + * The assertions declared for the export. + * @example + * ```ts + * export { foo } from 'mod' assert \{ type: 'json' \}; + * ``` + * This will be an empty array if `source` is `null` + * @deprecated Replaced with {@link `attributes`}. + */ + assertions: ImportAttribute[]; + /** + * The attributes declared for the export. + * @example + * ```ts + * export { foo } from 'mod' with \{ type: 'json' \}; + * ``` + * This will be an empty array if `source` is `null` + */ + attributes: ImportAttribute[]; + /** + * The exported declaration. + * @example + * ```ts + * export const x = 1; + * ``` + * This will be `null` if `source` is not `null`, or if there are `specifiers` + */ + declaration: NamedExportDeclarations | null; + /** + * The kind of the export. + */ + exportKind: ExportKind; + /** + * The source module being exported from. + */ + source: StringLiteral | null; + /** + * The specifiers being exported. + * @example + * ```ts + * export { a, b }; + * ``` + * This will be an empty array if `declaration` is not `null` + */ + specifiers: ExportSpecifier[]; +} +export declare type ExportNamedDeclarationWithoutSource = ExportNamedDeclarationWithoutSourceWithMultiple | ExportNamedDeclarationWithoutSourceWithSingle; +/** + * Exporting names from the current module. + * ``` + * export {}; + * export { a, b }; + * ``` + */ +export declare interface ExportNamedDeclarationWithoutSourceWithMultiple extends ExportNamedDeclarationBase { + /** + * This will always be an empty array. + * @deprecated Replaced with {@link `attributes`}. + */ + assertions: ImportAttribute[]; + /** + * This will always be an empty array. + */ + attributes: ImportAttribute[]; + declaration: null; + source: null; + specifiers: ExportSpecifierWithIdentifierLocal[]; +} +/** + * Exporting a single named declaration. + * ``` + * export const x = 1; + * ``` + */ +export declare interface ExportNamedDeclarationWithoutSourceWithSingle extends ExportNamedDeclarationBase { + /** + * This will always be an empty array. + * @deprecated Replaced with {@link `attributes`}. + */ + assertions: ImportAttribute[]; + /** + * This will always be an empty array. + */ + attributes: ImportAttribute[]; + declaration: NamedExportDeclarations; + source: null; + /** + * This will always be an empty array. + */ + specifiers: ExportSpecifierWithIdentifierLocal[]; +} +/** + * Export names from another module. + * ``` + * export { a, b } from 'mod'; + * ``` + */ +export declare interface ExportNamedDeclarationWithSource extends ExportNamedDeclarationBase { + declaration: null; + source: StringLiteral; +} +export declare type ExportSpecifier = ExportSpecifierWithIdentifierLocal | ExportSpecifierWithStringOrLiteralLocal; +declare interface ExportSpecifierBase extends BaseNode { + type: AST_NODE_TYPES.ExportSpecifier; + exported: Identifier | StringLiteral; + exportKind: ExportKind; + local: Identifier | StringLiteral; +} +export declare interface ExportSpecifierWithIdentifierLocal extends ExportSpecifierBase { + local: Identifier; +} +export declare interface ExportSpecifierWithStringOrLiteralLocal extends ExportSpecifierBase { + local: Identifier | StringLiteral; +} +export declare type Expression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | ClassExpression | ConditionalExpression | FunctionExpression | Identifier | ImportExpression | JSXElement | JSXFragment | LiteralExpression | LogicalExpression | MemberExpression | MetaProperty | NewExpression | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | TemplateLiteral | ThisExpression | TSAsExpression | TSInstantiationExpression | TSNonNullExpression | TSSatisfiesExpression | TSTypeAssertion | UnaryExpression | UpdateExpression | YieldExpression; +export declare interface ExpressionStatement extends BaseNode { + type: AST_NODE_TYPES.ExpressionStatement; + directive: string | undefined; + expression: Expression; +} +export declare type ForInitialiser = Expression | LetOrConstOrVarDeclaration; +export declare interface ForInStatement extends BaseNode { + type: AST_NODE_TYPES.ForInStatement; + body: Statement; + left: ForInitialiser; + right: Expression; +} +declare type ForOfInitialiser = Expression | LetOrConstOrVarDeclaration | UsingInForOfDeclaration; +export declare interface ForOfStatement extends BaseNode { + type: AST_NODE_TYPES.ForOfStatement; + await: boolean; + body: Statement; + left: ForOfInitialiser; + right: Expression; +} +export declare interface ForStatement extends BaseNode { + type: AST_NODE_TYPES.ForStatement; + body: Statement; + init: Expression | ForInitialiser | null; + test: Expression | null; + update: Expression | null; +} +declare interface FunctionBase extends BaseNode { + /** + * Whether the function is async: + * ``` + * async function foo() {} + * const x = async function () {} + * const x = async () => {} + * ``` + */ + async: boolean; + /** + * The body of the function. + * - For an `ArrowFunctionExpression` this may be an `Expression` or `BlockStatement`. + * - For a `FunctionDeclaration` or `FunctionExpression` this is always a `BlockStatement`. + * - For a `TSDeclareFunction` this is always `undefined`. + * - For a `TSEmptyBodyFunctionExpression` this is always `null`. + */ + body: BlockStatement | Expression | null | undefined; + /** + * This is only `true` if and only if the node is a `TSDeclareFunction` and it has `declare`: + * ``` + * declare function foo() {} + * ``` + */ + declare: boolean; + /** + * This is only ever `true` if and only the node is an `ArrowFunctionExpression` and the body + * is an expression: + * ``` + * (() => 1) + * ``` + */ + expression: boolean; + /** + * Whether the function is a generator function: + * ``` + * function *foo() {} + * const x = function *() {} + * ``` + * This is always `false` for arrow functions as they cannot be generators. + */ + generator: boolean; + /** + * The function's name. + * - For an `ArrowFunctionExpression` this is always `null`. + * - For a `FunctionExpression` this may be `null` if the name is omitted. + * - For a `FunctionDeclaration` or `TSDeclareFunction` this may be `null` if + * and only if the parent is an `ExportDefaultDeclaration`. + */ + id: Identifier | null; + /** + * The list of parameters declared for the function. + */ + params: Parameter[]; + /** + * The return type annotation for the function. + */ + returnType: TSTypeAnnotation | undefined; + /** + * The generic type parameter declaration for the function. + */ + typeParameters: TSTypeParameterDeclaration | undefined; +} +export declare type FunctionDeclaration = FunctionDeclarationWithName | FunctionDeclarationWithOptionalName; +declare interface FunctionDeclarationBase extends FunctionBase { + type: AST_NODE_TYPES.FunctionDeclaration; + body: BlockStatement; + declare: false; + expression: false; +} +/** + * A normal function declaration: + * ``` + * function f() {} + * ``` + */ +export declare interface FunctionDeclarationWithName extends FunctionDeclarationBase { + id: Identifier; +} +/** + * Default-exported function declarations have optional names: + * ``` + * export default function () {} + * ``` + */ +export declare interface FunctionDeclarationWithOptionalName extends FunctionDeclarationBase { + id: Identifier | null; +} +export declare interface FunctionExpression extends FunctionBase { + type: AST_NODE_TYPES.FunctionExpression; + body: BlockStatement; + expression: false; +} +export declare type FunctionLike = ArrowFunctionExpression | FunctionDeclaration | FunctionExpression | TSDeclareFunction | TSEmptyBodyFunctionExpression; +export declare interface Identifier extends BaseNode { + type: AST_NODE_TYPES.Identifier; + decorators: Decorator[]; + name: string; + optional: boolean; + typeAnnotation: TSTypeAnnotation | undefined; +} +export declare interface IdentifierToken extends BaseToken { + type: AST_TOKEN_TYPES.Identifier; +} +export declare interface IfStatement extends BaseNode { + type: AST_NODE_TYPES.IfStatement; + alternate: Statement | null; + consequent: Statement; + test: Expression; +} +export declare interface ImportAttribute extends BaseNode { + type: AST_NODE_TYPES.ImportAttribute; + key: Identifier | Literal; + value: Literal; +} +export declare type ImportClause = ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier; +export declare interface ImportDeclaration extends BaseNode { + type: AST_NODE_TYPES.ImportDeclaration; + /** + * The assertions declared for the export. + * @example + * ```ts + * import * from 'mod' assert \{ type: 'json' \}; + * ``` + * @deprecated Replaced with {@link `attributes`}. + */ + assertions: ImportAttribute[]; + /** + * The attributes declared for the export. + * @example + * ```ts + * import * from 'mod' with \{ type: 'json' \}; + * ``` + */ + attributes: ImportAttribute[]; + /** + * The kind of the import. + */ + importKind: ImportKind; + /** + * The source module being imported from. + */ + source: StringLiteral; + /** + * The specifiers being imported. + * If this is an empty array then either there are no specifiers: + * ``` + * import {} from 'mod'; + * ``` + * Or it is a side-effect import: + * ``` + * import 'mod'; + * ``` + */ + specifiers: ImportClause[]; +} +export declare interface ImportDefaultSpecifier extends BaseNode { + type: AST_NODE_TYPES.ImportDefaultSpecifier; + local: Identifier; +} +export declare interface ImportExpression extends BaseNode { + type: AST_NODE_TYPES.ImportExpression; + /** + * The attributes declared for the dynamic import. + * @example + * ```ts + * import('mod', \{ assert: \{ type: 'json' \} \}); + * ``` + * @deprecated Replaced with {@link `options`}. + */ + attributes: Expression | null; + /** + * The options bag declared for the dynamic import. + * @example + * ```ts + * import('mod', \{ assert: \{ type: 'json' \} \}); + * ``` + */ + options: Expression | null; + source: Expression; +} +declare type ImportKind = ExportAndImportKind; +export declare interface ImportNamespaceSpecifier extends BaseNode { + type: AST_NODE_TYPES.ImportNamespaceSpecifier; + local: Identifier; +} +export declare interface ImportSpecifier extends BaseNode { + type: AST_NODE_TYPES.ImportSpecifier; + imported: Identifier | StringLiteral; + importKind: ImportKind; + local: Identifier; +} +export declare type IterationStatement = DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | WhileStatement; +export declare interface JSXAttribute extends BaseNode { + type: AST_NODE_TYPES.JSXAttribute; + name: JSXIdentifier | JSXNamespacedName; + value: JSXElement | JSXExpression | Literal | null; +} +export declare type JSXChild = JSXElement | JSXExpression | JSXFragment | JSXText; +export declare interface JSXClosingElement extends BaseNode { + type: AST_NODE_TYPES.JSXClosingElement; + name: JSXTagNameExpression; +} +export declare interface JSXClosingFragment extends BaseNode { + type: AST_NODE_TYPES.JSXClosingFragment; +} +export declare interface JSXElement extends BaseNode { + type: AST_NODE_TYPES.JSXElement; + children: JSXChild[]; + closingElement: JSXClosingElement | null; + openingElement: JSXOpeningElement; +} +export declare interface JSXEmptyExpression extends BaseNode { + type: AST_NODE_TYPES.JSXEmptyExpression; +} +export declare type JSXExpression = JSXExpressionContainer | JSXSpreadChild; +export declare interface JSXExpressionContainer extends BaseNode { + type: AST_NODE_TYPES.JSXExpressionContainer; + expression: Expression | JSXEmptyExpression; +} +export declare interface JSXFragment extends BaseNode { + type: AST_NODE_TYPES.JSXFragment; + children: JSXChild[]; + closingFragment: JSXClosingFragment; + openingFragment: JSXOpeningFragment; +} +export declare interface JSXIdentifier extends BaseNode { + type: AST_NODE_TYPES.JSXIdentifier; + name: string; +} +export declare interface JSXIdentifierToken extends BaseToken { + type: AST_TOKEN_TYPES.JSXIdentifier; +} +export declare interface JSXMemberExpression extends BaseNode { + type: AST_NODE_TYPES.JSXMemberExpression; + object: JSXTagNameExpression; + property: JSXIdentifier; +} +export declare interface JSXNamespacedName extends BaseNode { + type: AST_NODE_TYPES.JSXNamespacedName; + name: JSXIdentifier; + namespace: JSXIdentifier; +} +export declare interface JSXOpeningElement extends BaseNode { + type: AST_NODE_TYPES.JSXOpeningElement; + attributes: (JSXAttribute | JSXSpreadAttribute)[]; + name: JSXTagNameExpression; + selfClosing: boolean; + typeArguments: TSTypeParameterInstantiation | undefined; +} +export declare interface JSXOpeningFragment extends BaseNode { + type: AST_NODE_TYPES.JSXOpeningFragment; +} +export declare interface JSXSpreadAttribute extends BaseNode { + type: AST_NODE_TYPES.JSXSpreadAttribute; + argument: Expression; +} +export declare interface JSXSpreadChild extends BaseNode { + type: AST_NODE_TYPES.JSXSpreadChild; + expression: Expression | JSXEmptyExpression; +} +export declare type JSXTagNameExpression = JSXIdentifier | JSXMemberExpression | JSXNamespacedName; +export declare interface JSXText extends BaseNode { + type: AST_NODE_TYPES.JSXText; + raw: string; + value: string; +} +export declare interface JSXTextToken extends BaseToken { + type: AST_TOKEN_TYPES.JSXText; +} +export declare interface KeywordToken extends BaseToken { + type: AST_TOKEN_TYPES.Keyword; +} +export declare interface LabeledStatement extends BaseNode { + type: AST_NODE_TYPES.LabeledStatement; + body: Statement; + label: Identifier; +} +export declare type LeftHandSideExpression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | CallExpression | ClassExpression | FunctionExpression | Identifier | JSXElement | JSXFragment | LiteralExpression | MemberExpression | MetaProperty | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | ThisExpression | TSAsExpression | TSNonNullExpression | TSTypeAssertion; +export declare type LetOrConstOrVarDeclaration = ConstDeclaration | LetOrVarDeclaredDeclaration | LetOrVarNonDeclaredDeclaration; +declare interface LetOrConstOrVarDeclarationBase extends BaseNode { + type: AST_NODE_TYPES.VariableDeclaration; + /** + * The variables declared by this declaration. + * Always non-empty. + * @example + * ```ts + * let x; + * let y, z; + * ``` + */ + declarations: LetOrConstOrVarDeclarator[]; + /** + * Whether the declaration is `declare`d + * @example + * ```ts + * declare const x = 1; + * ``` + */ + declare: boolean; + /** + * The keyword used to declare the variable(s) + * @example + * ```ts + * const x = 1; + * let y = 2; + * var z = 3; + * ``` + */ + kind: 'const' | 'let' | 'var'; +} +export declare type LetOrConstOrVarDeclarator = VariableDeclaratorDefiniteAssignment | VariableDeclaratorMaybeInit | VariableDeclaratorNoInit; +export declare interface LetOrVarDeclaredDeclaration extends LetOrConstOrVarDeclarationBase { + /** + * In a `declare let` declaration, the declarators must not have definite assignment + * assertions or initializers. + * + * @example + * ```ts + * using x = 1; + * using y =1, z = 2; + * ``` + */ + declarations: VariableDeclaratorNoInit[]; + declare: true; + kind: 'let' | 'var'; +} +export declare interface LetOrVarNonDeclaredDeclaration extends LetOrConstOrVarDeclarationBase { + /** + * In a `let`/`var` declaration, the declarators may have definite assignment + * assertions or initializers, but not both. + */ + declarations: (VariableDeclaratorDefiniteAssignment | VariableDeclaratorMaybeInit)[]; + declare: false; + kind: 'let' | 'var'; +} +export declare interface LineComment extends BaseToken { + type: AST_TOKEN_TYPES.Line; +} +export declare type Literal = BigIntLiteral | BooleanLiteral | NullLiteral | NumberLiteral | RegExpLiteral | StringLiteral; +declare interface LiteralBase extends BaseNode { + type: AST_NODE_TYPES.Literal; + raw: string; + value: bigint | boolean | number | string | RegExp | null; +} +export declare type LiteralExpression = Literal | TemplateLiteral; +export declare interface LogicalExpression extends BaseNode { + type: AST_NODE_TYPES.LogicalExpression; + left: Expression; + operator: '&&' | '??' | '||'; + right: Expression; +} +export declare type MemberExpression = MemberExpressionComputedName | MemberExpressionNonComputedName; +declare interface MemberExpressionBase extends BaseNode { + computed: boolean; + object: Expression; + optional: boolean; + property: Expression | Identifier | PrivateIdentifier; +} +export declare interface MemberExpressionComputedName extends MemberExpressionBase { + type: AST_NODE_TYPES.MemberExpression; + computed: true; + property: Expression; +} +export declare interface MemberExpressionNonComputedName extends MemberExpressionBase { + type: AST_NODE_TYPES.MemberExpression; + computed: false; + property: Identifier | PrivateIdentifier; +} +export declare interface MetaProperty extends BaseNode { + type: AST_NODE_TYPES.MetaProperty; + meta: Identifier; + property: Identifier; +} +export declare type MethodDefinition = MethodDefinitionComputedName | MethodDefinitionNonComputedName; +/** this should not be directly used - instead use MethodDefinitionComputedNameBase or MethodDefinitionNonComputedNameBase */ +declare interface MethodDefinitionBase extends BaseNode { + accessibility: Accessibility | undefined; + computed: boolean; + decorators: Decorator[]; + key: PropertyName; + kind: 'constructor' | 'get' | 'method' | 'set'; + optional: boolean; + override: boolean; + static: boolean; + value: FunctionExpression | TSEmptyBodyFunctionExpression; +} +export declare interface MethodDefinitionComputedName extends MethodDefinitionComputedNameBase { + type: AST_NODE_TYPES.MethodDefinition; +} +declare interface MethodDefinitionComputedNameBase extends MethodDefinitionBase { + computed: true; + key: PropertyNameComputed; +} +export declare interface MethodDefinitionNonComputedName extends ClassMethodDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.MethodDefinition; +} +declare interface MethodDefinitionNonComputedNameBase extends MethodDefinitionBase { + computed: false; + key: PropertyNameNonComputed; +} +export declare type NamedExportDeclarations = ClassDeclarationWithName | ClassDeclarationWithOptionalName | FunctionDeclarationWithName | FunctionDeclarationWithOptionalName | TSDeclareFunction | TSEnumDeclaration | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclaration; +export declare interface NewExpression extends BaseNode { + type: AST_NODE_TYPES.NewExpression; + arguments: CallExpressionArgument[]; + callee: Expression; + typeArguments: TSTypeParameterInstantiation | undefined; +} +export declare type Node = AccessorProperty | ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BlockStatement | BreakStatement | CallExpression | CatchClause | ChainExpression | ClassBody | ClassDeclaration | ClassExpression | ConditionalExpression | ContinueStatement | DebuggerStatement | Decorator | DoWhileStatement | EmptyStatement | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportExpression | ImportNamespaceSpecifier | ImportSpecifier | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LabeledStatement | Literal | LogicalExpression | MemberExpression | MetaProperty | MethodDefinition | NewExpression | ObjectExpression | ObjectPattern | PrivateIdentifier | Program | Property | PropertyDefinition | RestElement | ReturnStatement | SequenceExpression | SpreadElement | StaticBlock | Super | SwitchCase | SwitchStatement | TaggedTemplateExpression | TemplateElement | TemplateLiteral | ThisExpression | ThrowStatement | TryStatement | TSAbstractAccessorProperty | TSAbstractKeyword | TSAbstractMethodDefinition | TSAbstractPropertyDefinition | TSAnyKeyword | TSArrayType | TSAsExpression | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSClassImplements | TSConditionalType | TSConstructorType | TSConstructSignatureDeclaration | TSDeclareFunction | TSDeclareKeyword | TSEmptyBodyFunctionExpression | TSEnumBody | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExportKeyword | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexedAccessType | TSIndexSignature | TSInferType | TSInstantiationExpression | TSInterfaceBody | TSInterfaceDeclaration | TSInterfaceHeritage | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSPrivateKeyword | TSPropertySignature | TSProtectedKeyword | TSPublicKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSSatisfiesExpression | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; +export declare interface NodeOrTokenData { + type: string; + /** + * The source location information of the node. + * + * The loc property is defined as nullable by ESTree, but ESLint requires this property. + */ + loc: SourceLocation; + range: Range; +} +export declare interface NullLiteral extends LiteralBase { + raw: 'null'; + value: null; +} +export declare interface NullToken extends BaseToken { + type: AST_TOKEN_TYPES.Null; +} +export declare interface NumberLiteral extends LiteralBase { + value: number; +} +export declare interface NumericToken extends BaseToken { + type: AST_TOKEN_TYPES.Numeric; +} +export declare interface ObjectExpression extends BaseNode { + type: AST_NODE_TYPES.ObjectExpression; + properties: ObjectLiteralElement[]; +} +export declare type ObjectLiteralElement = Property | SpreadElement; +export declare type ObjectLiteralElementLike = ObjectLiteralElement; +export declare interface ObjectPattern extends BaseNode { + type: AST_NODE_TYPES.ObjectPattern; + decorators: Decorator[]; + optional: boolean; + properties: (Property | RestElement)[]; + typeAnnotation: TSTypeAnnotation | undefined; +} +export declare type OptionalRangeAndLoc = { + loc?: SourceLocation; + range?: Range; +} & Pick>; +export declare type Parameter = ArrayPattern | AssignmentPattern | Identifier | ObjectPattern | RestElement | TSParameterProperty; +export declare interface Position { + /** + * Column number on the line (0-indexed) + */ + column: number; + /** + * Line number (1-indexed) + */ + line: number; +} +export declare type PrimaryExpression = ArrayExpression | ArrayPattern | ClassExpression | FunctionExpression | Identifier | JSXElement | JSXFragment | JSXOpeningElement | LiteralExpression | MetaProperty | ObjectExpression | ObjectPattern | Super | TemplateLiteral | ThisExpression | TSNullKeyword; +export declare interface PrivateIdentifier extends BaseNode { + type: AST_NODE_TYPES.PrivateIdentifier; + name: string; +} +export declare interface PrivateIdentifierToken extends BaseToken { + type: AST_TOKEN_TYPES.PrivateIdentifier; +} +export declare interface Program extends NodeOrTokenData { + type: AST_NODE_TYPES.Program; + body: ProgramStatement[]; + comments: Comment[] | undefined; + sourceType: 'module' | 'script'; + tokens: Token[] | undefined; +} +export declare type ProgramStatement = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | Statement | TSImportEqualsDeclaration | TSNamespaceExportDeclaration; +export declare type Property = PropertyComputedName | PropertyNonComputedName; +declare interface PropertyBase extends BaseNode { + type: AST_NODE_TYPES.Property; + computed: boolean; + key: PropertyName; + kind: 'get' | 'init' | 'set'; + method: boolean; + optional: boolean; + shorthand: boolean; + value: AssignmentPattern | BindingName | Expression | TSEmptyBodyFunctionExpression; +} +export declare interface PropertyComputedName extends PropertyBase { + computed: true; + key: PropertyNameComputed; +} +export declare type PropertyDefinition = PropertyDefinitionComputedName | PropertyDefinitionNonComputedName; +declare interface PropertyDefinitionBase extends BaseNode { + accessibility: Accessibility | undefined; + computed: boolean; + declare: boolean; + decorators: Decorator[]; + definite: boolean; + key: PropertyName; + optional: boolean; + override: boolean; + readonly: boolean; + static: boolean; + typeAnnotation: TSTypeAnnotation | undefined; + value: Expression | null; +} +export declare interface PropertyDefinitionComputedName extends PropertyDefinitionComputedNameBase { + type: AST_NODE_TYPES.PropertyDefinition; +} +declare interface PropertyDefinitionComputedNameBase extends PropertyDefinitionBase { + computed: true; + key: PropertyNameComputed; +} +export declare interface PropertyDefinitionNonComputedName extends ClassPropertyDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.PropertyDefinition; +} +declare interface PropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase { + computed: false; + key: PropertyNameNonComputed; +} +export declare type PropertyName = ClassPropertyNameNonComputed | PropertyNameComputed | PropertyNameNonComputed; +export declare type PropertyNameComputed = Expression; +export declare type PropertyNameNonComputed = Identifier | NumberLiteral | StringLiteral; +export declare interface PropertyNonComputedName extends PropertyBase { + computed: false; + key: PropertyNameNonComputed; +} +export declare interface PunctuatorToken extends BaseToken { + type: AST_TOKEN_TYPES.Punctuator; + value: ValueOf; +} +export declare interface PunctuatorTokenToText extends AssignmentOperatorToText { + [SyntaxKind.AmpersandAmpersandToken]: '&&'; + [SyntaxKind.AmpersandToken]: '&'; + [SyntaxKind.AsteriskAsteriskToken]: '**'; + [SyntaxKind.AsteriskToken]: '*'; + [SyntaxKind.AtToken]: '@'; + [SyntaxKind.BacktickToken]: '`'; + [SyntaxKind.BarBarToken]: '||'; + [SyntaxKind.BarToken]: '|'; + [SyntaxKind.CaretToken]: '^'; + [SyntaxKind.CloseBraceToken]: '}'; + [SyntaxKind.CloseBracketToken]: ']'; + [SyntaxKind.CloseParenToken]: ')'; + [SyntaxKind.ColonToken]: ':'; + [SyntaxKind.CommaToken]: ','; + [SyntaxKind.DotDotDotToken]: '...'; + [SyntaxKind.DotToken]: '.'; + [SyntaxKind.EqualsEqualsEqualsToken]: '==='; + [SyntaxKind.EqualsEqualsToken]: '=='; + [SyntaxKind.EqualsGreaterThanToken]: '=>'; + [SyntaxKind.ExclamationEqualsEqualsToken]: '!=='; + [SyntaxKind.ExclamationEqualsToken]: '!='; + [SyntaxKind.ExclamationToken]: '!'; + [SyntaxKind.GreaterThanEqualsToken]: '>='; + [SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>'; + [SyntaxKind.GreaterThanGreaterThanToken]: '>>'; + [SyntaxKind.GreaterThanToken]: '>'; + [SyntaxKind.HashToken]: '#'; + [SyntaxKind.LessThanEqualsToken]: '<='; + [SyntaxKind.LessThanLessThanToken]: '<<'; + [SyntaxKind.LessThanSlashToken]: '`) is different from no declaration. + */ + typeParameters: TSTypeParameterDeclaration | undefined; +} +export declare interface TSInterfaceHeritage extends TSHeritageBase { + type: AST_NODE_TYPES.TSInterfaceHeritage; +} +export declare interface TSIntersectionType extends BaseNode { + type: AST_NODE_TYPES.TSIntersectionType; + types: TypeNode[]; +} +export declare interface TSIntrinsicKeyword extends BaseNode { + type: AST_NODE_TYPES.TSIntrinsicKeyword; +} +export declare interface TSLiteralType extends BaseNode { + type: AST_NODE_TYPES.TSLiteralType; + literal: LiteralExpression | UnaryExpression | UpdateExpression; +} +export declare interface TSMappedType extends BaseNode { + type: AST_NODE_TYPES.TSMappedType; + constraint: TypeNode; + key: Identifier; + nameType: TypeNode | null; + optional: boolean | '+' | '-' | undefined; + readonly: boolean | '+' | '-' | undefined; + typeAnnotation: TypeNode | undefined; + /** @deprecated Use {@link `constraint`} and {@link `key`} instead. */ + typeParameter: TSTypeParameter; +} +export declare type TSMethodSignature = TSMethodSignatureComputedName | TSMethodSignatureNonComputedName; +declare interface TSMethodSignatureBase extends BaseNode { + type: AST_NODE_TYPES.TSMethodSignature; + accessibility: Accessibility | undefined; + computed: boolean; + key: PropertyName; + kind: 'get' | 'method' | 'set'; + optional: boolean; + params: Parameter[]; + readonly: boolean; + returnType: TSTypeAnnotation | undefined; + static: boolean; + typeParameters: TSTypeParameterDeclaration | undefined; +} +export declare interface TSMethodSignatureComputedName extends TSMethodSignatureBase { + computed: true; + key: PropertyNameComputed; +} +export declare interface TSMethodSignatureNonComputedName extends TSMethodSignatureBase { + computed: false; + key: PropertyNameNonComputed; +} +export declare interface TSModuleBlock extends BaseNode { + type: AST_NODE_TYPES.TSModuleBlock; + body: ProgramStatement[]; +} +export declare type TSModuleDeclaration = TSModuleDeclarationGlobal | TSModuleDeclarationModule | TSModuleDeclarationNamespace; +declare interface TSModuleDeclarationBase extends BaseNode { + type: AST_NODE_TYPES.TSModuleDeclaration; + /** + * The body of the module. + * This can only be `undefined` for the code `declare module 'mod';` + */ + body?: TSModuleBlock; + /** + * Whether the module is `declare`d + * @example + * ```ts + * declare namespace F {} + * ``` + */ + declare: boolean; + /** + * Whether this is a global declaration + * @example + * ```ts + * declare global {} + * ``` + * + * @deprecated Use {@link kind} instead + */ + global: boolean; + /** + * The name of the module + * ``` + * namespace A {} + * namespace A.B.C {} + * module 'a' {} + * ``` + */ + id: Identifier | Literal | TSQualifiedName; + /** + * The keyword used to define this module declaration + * @example + * ```ts + * namespace Foo {} + * ^^^^^^^^^ + * + * module 'foo' {} + * ^^^^^^ + * + * global {} + * ^^^^^^ + * ``` + */ + kind: TSModuleDeclarationKind; +} +export declare interface TSModuleDeclarationGlobal extends TSModuleDeclarationBase { + body: TSModuleBlock; + /** + * This will always be an Identifier with name `global` + */ + id: Identifier; + kind: 'global'; +} +export declare type TSModuleDeclarationKind = 'global' | 'module' | 'namespace'; +export declare type TSModuleDeclarationModule = TSModuleDeclarationModuleWithIdentifierId | TSModuleDeclarationModuleWithStringId; +declare interface TSModuleDeclarationModuleBase extends TSModuleDeclarationBase { + kind: 'module'; +} +/** + * The legacy module declaration, replaced with namespace declarations. + * ``` + * module A {} + * ``` + */ +export declare interface TSModuleDeclarationModuleWithIdentifierId extends TSModuleDeclarationModuleBase { + body: TSModuleBlock; + id: Identifier; + kind: 'module'; +} +export declare type TSModuleDeclarationModuleWithStringId = TSModuleDeclarationModuleWithStringIdDeclared | TSModuleDeclarationModuleWithStringIdNotDeclared; +/** + * A string module declaration that is declared: + * ``` + * declare module 'foo' {} + * declare module 'foo'; + * ``` + */ +export declare interface TSModuleDeclarationModuleWithStringIdDeclared extends TSModuleDeclarationModuleBase { + body?: TSModuleBlock; + declare: true; + id: StringLiteral; + kind: 'module'; +} +/** + * A string module declaration that is not declared: + * ``` + * module 'foo' {} + * ``` + */ +export declare interface TSModuleDeclarationModuleWithStringIdNotDeclared extends TSModuleDeclarationModuleBase { + body: TSModuleBlock; + declare: false; + id: StringLiteral; + kind: 'module'; +} +export declare interface TSModuleDeclarationNamespace extends TSModuleDeclarationBase { + body: TSModuleBlock; + id: Identifier | TSQualifiedName; + kind: 'namespace'; +} +export declare interface TSNamedTupleMember extends BaseNode { + type: AST_NODE_TYPES.TSNamedTupleMember; + elementType: TypeNode; + label: Identifier; + optional: boolean; +} +/** + * For the following declaration: + * ``` + * export as namespace X; + * ``` + */ +export declare interface TSNamespaceExportDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSNamespaceExportDeclaration; + /** + * The name of the global variable that's exported as namespace + */ + id: Identifier; +} +export declare interface TSNeverKeyword extends BaseNode { + type: AST_NODE_TYPES.TSNeverKeyword; +} +export declare interface TSNonNullExpression extends BaseNode { + type: AST_NODE_TYPES.TSNonNullExpression; + expression: Expression; +} +export declare interface TSNullKeyword extends BaseNode { + type: AST_NODE_TYPES.TSNullKeyword; +} +export declare interface TSNumberKeyword extends BaseNode { + type: AST_NODE_TYPES.TSNumberKeyword; +} +export declare interface TSObjectKeyword extends BaseNode { + type: AST_NODE_TYPES.TSObjectKeyword; +} +export declare interface TSOptionalType extends BaseNode { + type: AST_NODE_TYPES.TSOptionalType; + typeAnnotation: TypeNode; +} +export declare interface TSParameterProperty extends BaseNode { + type: AST_NODE_TYPES.TSParameterProperty; + accessibility: Accessibility | undefined; + decorators: Decorator[]; + override: boolean; + parameter: AssignmentPattern | BindingName | RestElement; + readonly: boolean; + static: boolean; +} +export declare interface TSPrivateKeyword extends BaseNode { + type: AST_NODE_TYPES.TSPrivateKeyword; +} +export declare type TSPropertySignature = TSPropertySignatureComputedName | TSPropertySignatureNonComputedName; +declare interface TSPropertySignatureBase extends BaseNode { + type: AST_NODE_TYPES.TSPropertySignature; + accessibility: Accessibility | undefined; + computed: boolean; + key: PropertyName; + optional: boolean; + readonly: boolean; + static: boolean; + typeAnnotation: TSTypeAnnotation | undefined; +} +export declare interface TSPropertySignatureComputedName extends TSPropertySignatureBase { + computed: true; + key: PropertyNameComputed; +} +export declare interface TSPropertySignatureNonComputedName extends TSPropertySignatureBase { + computed: false; + key: PropertyNameNonComputed; +} +export declare interface TSProtectedKeyword extends BaseNode { + type: AST_NODE_TYPES.TSProtectedKeyword; +} +export declare interface TSPublicKeyword extends BaseNode { + type: AST_NODE_TYPES.TSPublicKeyword; +} +export declare interface TSQualifiedName extends BaseNode { + type: AST_NODE_TYPES.TSQualifiedName; + left: EntityName; + right: Identifier; +} +export declare interface TSReadonlyKeyword extends BaseNode { + type: AST_NODE_TYPES.TSReadonlyKeyword; +} +export declare interface TSRestType extends BaseNode { + type: AST_NODE_TYPES.TSRestType; + typeAnnotation: TypeNode; +} +export declare interface TSSatisfiesExpression extends BaseNode { + type: AST_NODE_TYPES.TSSatisfiesExpression; + expression: Expression; + typeAnnotation: TypeNode; +} +export declare interface TSStaticKeyword extends BaseNode { + type: AST_NODE_TYPES.TSStaticKeyword; +} +export declare interface TSStringKeyword extends BaseNode { + type: AST_NODE_TYPES.TSStringKeyword; +} +export declare interface TSSymbolKeyword extends BaseNode { + type: AST_NODE_TYPES.TSSymbolKeyword; +} +export declare interface TSTemplateLiteralType extends BaseNode { + type: AST_NODE_TYPES.TSTemplateLiteralType; + quasis: TemplateElement[]; + types: TypeNode[]; +} +export declare interface TSThisType extends BaseNode { + type: AST_NODE_TYPES.TSThisType; +} +export declare interface TSTupleType extends BaseNode { + type: AST_NODE_TYPES.TSTupleType; + elementTypes: TypeNode[]; +} +export declare interface TSTypeAliasDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSTypeAliasDeclaration; + /** + * Whether the type was `declare`d. + * @example + * ```ts + * declare type T = 1; + * ``` + */ + declare: boolean; + /** + * The name of the type. + */ + id: Identifier; + /** + * The "value" (type) of the declaration + */ + typeAnnotation: TypeNode; + /** + * The generic type parameters declared for the type. Empty declaration + * (`<>`) is different from no declaration. + */ + typeParameters: TSTypeParameterDeclaration | undefined; +} +export declare interface TSTypeAnnotation extends BaseNode { + type: AST_NODE_TYPES.TSTypeAnnotation; + typeAnnotation: TypeNode; +} +export declare interface TSTypeAssertion extends BaseNode { + type: AST_NODE_TYPES.TSTypeAssertion; + expression: Expression; + typeAnnotation: TypeNode; +} +export declare interface TSTypeLiteral extends BaseNode { + type: AST_NODE_TYPES.TSTypeLiteral; + members: TypeElement[]; +} +export declare interface TSTypeOperator extends BaseNode { + type: AST_NODE_TYPES.TSTypeOperator; + operator: 'keyof' | 'readonly' | 'unique'; + typeAnnotation: TypeNode | undefined; +} +export declare interface TSTypeParameter extends BaseNode { + type: AST_NODE_TYPES.TSTypeParameter; + const: boolean; + constraint: TypeNode | undefined; + default: TypeNode | undefined; + in: boolean; + name: Identifier; + out: boolean; +} +export declare interface TSTypeParameterDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSTypeParameterDeclaration; + params: TSTypeParameter[]; +} +export declare interface TSTypeParameterInstantiation extends BaseNode { + type: AST_NODE_TYPES.TSTypeParameterInstantiation; + params: TypeNode[]; +} +export declare interface TSTypePredicate extends BaseNode { + type: AST_NODE_TYPES.TSTypePredicate; + asserts: boolean; + parameterName: Identifier | TSThisType; + typeAnnotation: TSTypeAnnotation | null; +} +export declare interface TSTypeQuery extends BaseNode { + type: AST_NODE_TYPES.TSTypeQuery; + exprName: EntityName | TSImportType; + typeArguments: TSTypeParameterInstantiation | undefined; +} +export declare interface TSTypeReference extends BaseNode { + type: AST_NODE_TYPES.TSTypeReference; + typeArguments: TSTypeParameterInstantiation | undefined; + typeName: EntityName; +} +export declare type TSUnaryExpression = AwaitExpression | LeftHandSideExpression | UnaryExpression | UpdateExpression; +export declare interface TSUndefinedKeyword extends BaseNode { + type: AST_NODE_TYPES.TSUndefinedKeyword; +} +export declare interface TSUnionType extends BaseNode { + type: AST_NODE_TYPES.TSUnionType; + types: TypeNode[]; +} +export declare interface TSUnknownKeyword extends BaseNode { + type: AST_NODE_TYPES.TSUnknownKeyword; +} +export declare interface TSVoidKeyword extends BaseNode { + type: AST_NODE_TYPES.TSVoidKeyword; +} +export declare type TypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSIndexSignature | TSMethodSignature | TSPropertySignature; +export declare type TypeNode = TSAbstractKeyword | TSAnyKeyword | TSArrayType | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSConditionalType | TSConstructorType | TSDeclareKeyword | TSExportKeyword | TSFunctionType | TSImportType | TSIndexedAccessType | TSInferType | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSNamedTupleMember | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSPrivateKeyword | TSProtectedKeyword | TSPublicKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeLiteral | TSTypeOperator | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword; +export declare interface UnaryExpression extends UnaryExpressionBase { + type: AST_NODE_TYPES.UnaryExpression; + operator: '!' | '+' | '-' | 'delete' | 'typeof' | 'void' | '~'; +} +declare interface UnaryExpressionBase extends BaseNode { + argument: Expression; + operator: string; + prefix: boolean; +} +export declare interface UpdateExpression extends UnaryExpressionBase { + type: AST_NODE_TYPES.UpdateExpression; + operator: '++' | '--'; +} +export declare type UsingDeclaration = UsingInForOfDeclaration | UsingInNormalContextDeclaration; +declare interface UsingDeclarationBase extends BaseNode { + type: AST_NODE_TYPES.VariableDeclaration; + /** + * This value will always be `false` + * because 'declare' modifier cannot appear on a 'using' declaration. + */ + declare: false; + /** + * The keyword used to declare the variable(s) + * @example + * ```ts + * using x = 1; + * await using y = 2; + * ``` + */ + kind: 'await using' | 'using'; +} +export declare type UsingDeclarator = UsingInForOfDeclarator | UsingInNormalContextDeclarator; +export declare interface UsingInForOfDeclaration extends UsingDeclarationBase { + /** + * The variables declared by this declaration. + * Always has exactly one element. + * @example + * ```ts + * for (using x of y) {} + * ``` + */ + declarations: [UsingInForOfDeclarator]; +} +export declare interface UsingInForOfDeclarator extends VariableDeclaratorBase { + definite: false; + id: Identifier; + init: null; +} +export declare interface UsingInNormalContextDeclaration extends UsingDeclarationBase { + /** + * The variables declared by this declaration. + * Always non-empty. + * @example + * ```ts + * using x = 1; + * using y = 1, z = 2; + * ``` + */ + declarations: UsingInNormalContextDeclarator[]; +} +export declare interface UsingInNormalContextDeclarator extends VariableDeclaratorBase { + definite: false; + id: Identifier; + init: Expression; +} +declare type ValueOf = T[keyof T]; +export declare type VariableDeclaration = LetOrConstOrVarDeclaration | UsingDeclaration; +export declare type VariableDeclarator = LetOrConstOrVarDeclarator | UsingDeclarator; +declare interface VariableDeclaratorBase extends BaseNode { + type: AST_NODE_TYPES.VariableDeclarator; + /** + * Whether there's definite assignment assertion (`let x!: number`). + * If `true`, then: `id` must be an identifier with a type annotation, + * `init` must be `null`, and the declarator must be a `var`/`let` declarator. + */ + definite: boolean; + /** + * The name(s) of the variable(s). + */ + id: BindingName; + /** + * The initializer expression of the variable. Must be present for `const` unless + * in a `declare const`. + */ + init: Expression | null; +} +export declare interface VariableDeclaratorDefiniteAssignment extends VariableDeclaratorBase { + definite: true; + /** + * The name of the variable. Must have a type annotation. + */ + id: Identifier; + init: null; +} +export declare interface VariableDeclaratorMaybeInit extends VariableDeclaratorBase { + definite: false; +} +export declare interface VariableDeclaratorNoInit extends VariableDeclaratorBase { + definite: false; + init: null; +} +export declare interface WhileStatement extends BaseNode { + type: AST_NODE_TYPES.WhileStatement; + body: Statement; + test: Expression; +} +export declare interface WithStatement extends BaseNode { + type: AST_NODE_TYPES.WithStatement; + body: Statement; + object: Expression; +} +export declare interface YieldExpression extends BaseNode { + type: AST_NODE_TYPES.YieldExpression; + argument: Expression | null; + delegate: boolean; +} +export {}; +//# sourceMappingURL=ast-spec.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map b/slider/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map new file mode 100644 index 0000000..15e30bc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ast-spec.d.ts","sourceRoot":"","sources":["../../src/generated/ast-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;gDAQgD;AAEhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEvE,MAAM,CAAC,OAAO,MAAM,gBAAgB,GAChC,4BAA4B,GAC5B,+BAA+B,CAAC;AAEpC,MAAM,CAAC,OAAO,WAAW,4BACvB,SAAQ,kCAAkC;IAC1C,IAAI,EAAE,cAAc,CAAC,gBAAgB,CAAC;CACvC;AAED,MAAM,CAAC,OAAO,WAAW,+BACvB,SAAQ,qCAAqC;IAC7C,IAAI,EAAE,cAAc,CAAC,gBAAgB,CAAC;CACvC;AAED,MAAM,CAAC,OAAO,WAAW,eAAgB,SAAQ,QAAQ;IACvD,IAAI,EAAE,cAAc,CAAC,eAAe,CAAC;IACrC;;OAEG;IACH,QAAQ,EAAE,CAAC,UAAU,GAAG,aAAa,GAAG,IAAI,CAAC,EAAE,CAAC;CACjD;AAED,MAAM,CAAC,OAAO,WAAW,YAAa,SAAQ,QAAQ;IACpD,IAAI,EAAE,cAAc,CAAC,YAAY,CAAC;IAClC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,QAAQ,EAAE,CAAC,oBAAoB,GAAG,IAAI,CAAC,EAAE,CAAC;IAC1C,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAC9C;AAED,MAAM,CAAC,OAAO,WAAW,uBAAwB,SAAQ,QAAQ;IAC/D,IAAI,EAAE,cAAc,CAAC,uBAAu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AE,IAAI,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,2BACvB,SAAQ,sBAAsB;IAC9B,QAAQ,EAAE,KAAK,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,wBACvB,SAAQ,sBAAsB;IAC9B,QAAQ,EAAE,KAAK,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,cAAe,SAAQ,QAAQ;IACtD,IAAI,EAAE,cAAc,CAAC,cAAc,CAAC;IACpC,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,aAAc,SAAQ,QAAQ;IACrD,IAAI,EAAE,cAAc,CAAC,aAAa,CAAC;IACnC,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,eAAgB,SAAQ,QAAQ;IACvD,IAAI,EAAE,cAAc,CAAC,eAAe,CAAC;IACrC,QAAQ,EAAE,UAAU,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js b/slider/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js new file mode 100644 index 0000000..2ce805e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js @@ -0,0 +1,200 @@ +"use strict"; +/********************************************** + * DO NOT MODIFY THIS FILE MANUALLY * + * * + * THIS FILE HAS BEEN COPIED FROM ast-spec. * + * ANY CHANGES WILL BE LOST ON THE NEXT BUILD * + * * + * MAKE CHANGES TO ast-spec AND THEN RUN * + * yarn build * + **********************************************/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0; +var AST_NODE_TYPES; +(function (AST_NODE_TYPES) { + AST_NODE_TYPES["AccessorProperty"] = "AccessorProperty"; + AST_NODE_TYPES["ArrayExpression"] = "ArrayExpression"; + AST_NODE_TYPES["ArrayPattern"] = "ArrayPattern"; + AST_NODE_TYPES["ArrowFunctionExpression"] = "ArrowFunctionExpression"; + AST_NODE_TYPES["AssignmentExpression"] = "AssignmentExpression"; + AST_NODE_TYPES["AssignmentPattern"] = "AssignmentPattern"; + AST_NODE_TYPES["AwaitExpression"] = "AwaitExpression"; + AST_NODE_TYPES["BinaryExpression"] = "BinaryExpression"; + AST_NODE_TYPES["BlockStatement"] = "BlockStatement"; + AST_NODE_TYPES["BreakStatement"] = "BreakStatement"; + AST_NODE_TYPES["CallExpression"] = "CallExpression"; + AST_NODE_TYPES["CatchClause"] = "CatchClause"; + AST_NODE_TYPES["ChainExpression"] = "ChainExpression"; + AST_NODE_TYPES["ClassBody"] = "ClassBody"; + AST_NODE_TYPES["ClassDeclaration"] = "ClassDeclaration"; + AST_NODE_TYPES["ClassExpression"] = "ClassExpression"; + AST_NODE_TYPES["ConditionalExpression"] = "ConditionalExpression"; + AST_NODE_TYPES["ContinueStatement"] = "ContinueStatement"; + AST_NODE_TYPES["DebuggerStatement"] = "DebuggerStatement"; + AST_NODE_TYPES["Decorator"] = "Decorator"; + AST_NODE_TYPES["DoWhileStatement"] = "DoWhileStatement"; + AST_NODE_TYPES["EmptyStatement"] = "EmptyStatement"; + AST_NODE_TYPES["ExportAllDeclaration"] = "ExportAllDeclaration"; + AST_NODE_TYPES["ExportDefaultDeclaration"] = "ExportDefaultDeclaration"; + AST_NODE_TYPES["ExportNamedDeclaration"] = "ExportNamedDeclaration"; + AST_NODE_TYPES["ExportSpecifier"] = "ExportSpecifier"; + AST_NODE_TYPES["ExpressionStatement"] = "ExpressionStatement"; + AST_NODE_TYPES["ForInStatement"] = "ForInStatement"; + AST_NODE_TYPES["ForOfStatement"] = "ForOfStatement"; + AST_NODE_TYPES["ForStatement"] = "ForStatement"; + AST_NODE_TYPES["FunctionDeclaration"] = "FunctionDeclaration"; + AST_NODE_TYPES["FunctionExpression"] = "FunctionExpression"; + AST_NODE_TYPES["Identifier"] = "Identifier"; + AST_NODE_TYPES["IfStatement"] = "IfStatement"; + AST_NODE_TYPES["ImportAttribute"] = "ImportAttribute"; + AST_NODE_TYPES["ImportDeclaration"] = "ImportDeclaration"; + AST_NODE_TYPES["ImportDefaultSpecifier"] = "ImportDefaultSpecifier"; + AST_NODE_TYPES["ImportExpression"] = "ImportExpression"; + AST_NODE_TYPES["ImportNamespaceSpecifier"] = "ImportNamespaceSpecifier"; + AST_NODE_TYPES["ImportSpecifier"] = "ImportSpecifier"; + AST_NODE_TYPES["JSXAttribute"] = "JSXAttribute"; + AST_NODE_TYPES["JSXClosingElement"] = "JSXClosingElement"; + AST_NODE_TYPES["JSXClosingFragment"] = "JSXClosingFragment"; + AST_NODE_TYPES["JSXElement"] = "JSXElement"; + AST_NODE_TYPES["JSXEmptyExpression"] = "JSXEmptyExpression"; + AST_NODE_TYPES["JSXExpressionContainer"] = "JSXExpressionContainer"; + AST_NODE_TYPES["JSXFragment"] = "JSXFragment"; + AST_NODE_TYPES["JSXIdentifier"] = "JSXIdentifier"; + AST_NODE_TYPES["JSXMemberExpression"] = "JSXMemberExpression"; + AST_NODE_TYPES["JSXNamespacedName"] = "JSXNamespacedName"; + AST_NODE_TYPES["JSXOpeningElement"] = "JSXOpeningElement"; + AST_NODE_TYPES["JSXOpeningFragment"] = "JSXOpeningFragment"; + AST_NODE_TYPES["JSXSpreadAttribute"] = "JSXSpreadAttribute"; + AST_NODE_TYPES["JSXSpreadChild"] = "JSXSpreadChild"; + AST_NODE_TYPES["JSXText"] = "JSXText"; + AST_NODE_TYPES["LabeledStatement"] = "LabeledStatement"; + AST_NODE_TYPES["Literal"] = "Literal"; + AST_NODE_TYPES["LogicalExpression"] = "LogicalExpression"; + AST_NODE_TYPES["MemberExpression"] = "MemberExpression"; + AST_NODE_TYPES["MetaProperty"] = "MetaProperty"; + AST_NODE_TYPES["MethodDefinition"] = "MethodDefinition"; + AST_NODE_TYPES["NewExpression"] = "NewExpression"; + AST_NODE_TYPES["ObjectExpression"] = "ObjectExpression"; + AST_NODE_TYPES["ObjectPattern"] = "ObjectPattern"; + AST_NODE_TYPES["PrivateIdentifier"] = "PrivateIdentifier"; + AST_NODE_TYPES["Program"] = "Program"; + AST_NODE_TYPES["Property"] = "Property"; + AST_NODE_TYPES["PropertyDefinition"] = "PropertyDefinition"; + AST_NODE_TYPES["RestElement"] = "RestElement"; + AST_NODE_TYPES["ReturnStatement"] = "ReturnStatement"; + AST_NODE_TYPES["SequenceExpression"] = "SequenceExpression"; + AST_NODE_TYPES["SpreadElement"] = "SpreadElement"; + AST_NODE_TYPES["StaticBlock"] = "StaticBlock"; + AST_NODE_TYPES["Super"] = "Super"; + AST_NODE_TYPES["SwitchCase"] = "SwitchCase"; + AST_NODE_TYPES["SwitchStatement"] = "SwitchStatement"; + AST_NODE_TYPES["TaggedTemplateExpression"] = "TaggedTemplateExpression"; + AST_NODE_TYPES["TemplateElement"] = "TemplateElement"; + AST_NODE_TYPES["TemplateLiteral"] = "TemplateLiteral"; + AST_NODE_TYPES["ThisExpression"] = "ThisExpression"; + AST_NODE_TYPES["ThrowStatement"] = "ThrowStatement"; + AST_NODE_TYPES["TryStatement"] = "TryStatement"; + AST_NODE_TYPES["UnaryExpression"] = "UnaryExpression"; + AST_NODE_TYPES["UpdateExpression"] = "UpdateExpression"; + AST_NODE_TYPES["VariableDeclaration"] = "VariableDeclaration"; + AST_NODE_TYPES["VariableDeclarator"] = "VariableDeclarator"; + AST_NODE_TYPES["WhileStatement"] = "WhileStatement"; + AST_NODE_TYPES["WithStatement"] = "WithStatement"; + AST_NODE_TYPES["YieldExpression"] = "YieldExpression"; + AST_NODE_TYPES["TSAbstractAccessorProperty"] = "TSAbstractAccessorProperty"; + AST_NODE_TYPES["TSAbstractKeyword"] = "TSAbstractKeyword"; + AST_NODE_TYPES["TSAbstractMethodDefinition"] = "TSAbstractMethodDefinition"; + AST_NODE_TYPES["TSAbstractPropertyDefinition"] = "TSAbstractPropertyDefinition"; + AST_NODE_TYPES["TSAnyKeyword"] = "TSAnyKeyword"; + AST_NODE_TYPES["TSArrayType"] = "TSArrayType"; + AST_NODE_TYPES["TSAsExpression"] = "TSAsExpression"; + AST_NODE_TYPES["TSAsyncKeyword"] = "TSAsyncKeyword"; + AST_NODE_TYPES["TSBigIntKeyword"] = "TSBigIntKeyword"; + AST_NODE_TYPES["TSBooleanKeyword"] = "TSBooleanKeyword"; + AST_NODE_TYPES["TSCallSignatureDeclaration"] = "TSCallSignatureDeclaration"; + AST_NODE_TYPES["TSClassImplements"] = "TSClassImplements"; + AST_NODE_TYPES["TSConditionalType"] = "TSConditionalType"; + AST_NODE_TYPES["TSConstructorType"] = "TSConstructorType"; + AST_NODE_TYPES["TSConstructSignatureDeclaration"] = "TSConstructSignatureDeclaration"; + AST_NODE_TYPES["TSDeclareFunction"] = "TSDeclareFunction"; + AST_NODE_TYPES["TSDeclareKeyword"] = "TSDeclareKeyword"; + AST_NODE_TYPES["TSEmptyBodyFunctionExpression"] = "TSEmptyBodyFunctionExpression"; + AST_NODE_TYPES["TSEnumBody"] = "TSEnumBody"; + AST_NODE_TYPES["TSEnumDeclaration"] = "TSEnumDeclaration"; + AST_NODE_TYPES["TSEnumMember"] = "TSEnumMember"; + AST_NODE_TYPES["TSExportAssignment"] = "TSExportAssignment"; + AST_NODE_TYPES["TSExportKeyword"] = "TSExportKeyword"; + AST_NODE_TYPES["TSExternalModuleReference"] = "TSExternalModuleReference"; + AST_NODE_TYPES["TSFunctionType"] = "TSFunctionType"; + AST_NODE_TYPES["TSImportEqualsDeclaration"] = "TSImportEqualsDeclaration"; + AST_NODE_TYPES["TSImportType"] = "TSImportType"; + AST_NODE_TYPES["TSIndexedAccessType"] = "TSIndexedAccessType"; + AST_NODE_TYPES["TSIndexSignature"] = "TSIndexSignature"; + AST_NODE_TYPES["TSInferType"] = "TSInferType"; + AST_NODE_TYPES["TSInstantiationExpression"] = "TSInstantiationExpression"; + AST_NODE_TYPES["TSInterfaceBody"] = "TSInterfaceBody"; + AST_NODE_TYPES["TSInterfaceDeclaration"] = "TSInterfaceDeclaration"; + AST_NODE_TYPES["TSInterfaceHeritage"] = "TSInterfaceHeritage"; + AST_NODE_TYPES["TSIntersectionType"] = "TSIntersectionType"; + AST_NODE_TYPES["TSIntrinsicKeyword"] = "TSIntrinsicKeyword"; + AST_NODE_TYPES["TSLiteralType"] = "TSLiteralType"; + AST_NODE_TYPES["TSMappedType"] = "TSMappedType"; + AST_NODE_TYPES["TSMethodSignature"] = "TSMethodSignature"; + AST_NODE_TYPES["TSModuleBlock"] = "TSModuleBlock"; + AST_NODE_TYPES["TSModuleDeclaration"] = "TSModuleDeclaration"; + AST_NODE_TYPES["TSNamedTupleMember"] = "TSNamedTupleMember"; + AST_NODE_TYPES["TSNamespaceExportDeclaration"] = "TSNamespaceExportDeclaration"; + AST_NODE_TYPES["TSNeverKeyword"] = "TSNeverKeyword"; + AST_NODE_TYPES["TSNonNullExpression"] = "TSNonNullExpression"; + AST_NODE_TYPES["TSNullKeyword"] = "TSNullKeyword"; + AST_NODE_TYPES["TSNumberKeyword"] = "TSNumberKeyword"; + AST_NODE_TYPES["TSObjectKeyword"] = "TSObjectKeyword"; + AST_NODE_TYPES["TSOptionalType"] = "TSOptionalType"; + AST_NODE_TYPES["TSParameterProperty"] = "TSParameterProperty"; + AST_NODE_TYPES["TSPrivateKeyword"] = "TSPrivateKeyword"; + AST_NODE_TYPES["TSPropertySignature"] = "TSPropertySignature"; + AST_NODE_TYPES["TSProtectedKeyword"] = "TSProtectedKeyword"; + AST_NODE_TYPES["TSPublicKeyword"] = "TSPublicKeyword"; + AST_NODE_TYPES["TSQualifiedName"] = "TSQualifiedName"; + AST_NODE_TYPES["TSReadonlyKeyword"] = "TSReadonlyKeyword"; + AST_NODE_TYPES["TSRestType"] = "TSRestType"; + AST_NODE_TYPES["TSSatisfiesExpression"] = "TSSatisfiesExpression"; + AST_NODE_TYPES["TSStaticKeyword"] = "TSStaticKeyword"; + AST_NODE_TYPES["TSStringKeyword"] = "TSStringKeyword"; + AST_NODE_TYPES["TSSymbolKeyword"] = "TSSymbolKeyword"; + AST_NODE_TYPES["TSTemplateLiteralType"] = "TSTemplateLiteralType"; + AST_NODE_TYPES["TSThisType"] = "TSThisType"; + AST_NODE_TYPES["TSTupleType"] = "TSTupleType"; + AST_NODE_TYPES["TSTypeAliasDeclaration"] = "TSTypeAliasDeclaration"; + AST_NODE_TYPES["TSTypeAnnotation"] = "TSTypeAnnotation"; + AST_NODE_TYPES["TSTypeAssertion"] = "TSTypeAssertion"; + AST_NODE_TYPES["TSTypeLiteral"] = "TSTypeLiteral"; + AST_NODE_TYPES["TSTypeOperator"] = "TSTypeOperator"; + AST_NODE_TYPES["TSTypeParameter"] = "TSTypeParameter"; + AST_NODE_TYPES["TSTypeParameterDeclaration"] = "TSTypeParameterDeclaration"; + AST_NODE_TYPES["TSTypeParameterInstantiation"] = "TSTypeParameterInstantiation"; + AST_NODE_TYPES["TSTypePredicate"] = "TSTypePredicate"; + AST_NODE_TYPES["TSTypeQuery"] = "TSTypeQuery"; + AST_NODE_TYPES["TSTypeReference"] = "TSTypeReference"; + AST_NODE_TYPES["TSUndefinedKeyword"] = "TSUndefinedKeyword"; + AST_NODE_TYPES["TSUnionType"] = "TSUnionType"; + AST_NODE_TYPES["TSUnknownKeyword"] = "TSUnknownKeyword"; + AST_NODE_TYPES["TSVoidKeyword"] = "TSVoidKeyword"; +})(AST_NODE_TYPES || (exports.AST_NODE_TYPES = AST_NODE_TYPES = {})); +var AST_TOKEN_TYPES; +(function (AST_TOKEN_TYPES) { + AST_TOKEN_TYPES["Boolean"] = "Boolean"; + AST_TOKEN_TYPES["Identifier"] = "Identifier"; + AST_TOKEN_TYPES["JSXIdentifier"] = "JSXIdentifier"; + AST_TOKEN_TYPES["PrivateIdentifier"] = "PrivateIdentifier"; + AST_TOKEN_TYPES["JSXText"] = "JSXText"; + AST_TOKEN_TYPES["Keyword"] = "Keyword"; + AST_TOKEN_TYPES["Null"] = "Null"; + AST_TOKEN_TYPES["Numeric"] = "Numeric"; + AST_TOKEN_TYPES["Punctuator"] = "Punctuator"; + AST_TOKEN_TYPES["RegularExpression"] = "RegularExpression"; + AST_TOKEN_TYPES["String"] = "String"; + AST_TOKEN_TYPES["Template"] = "Template"; + AST_TOKEN_TYPES["Block"] = "Block"; + AST_TOKEN_TYPES["Line"] = "Line"; +})(AST_TOKEN_TYPES || (exports.AST_TOKEN_TYPES = AST_TOKEN_TYPES = {})); diff --git a/slider/node_modules/@typescript-eslint/types/dist/index.d.ts b/slider/node_modules/@typescript-eslint/types/dist/index.d.ts new file mode 100644 index 0000000..bb0bff5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/index.d.ts @@ -0,0 +1,5 @@ +export { AST_NODE_TYPES, AST_TOKEN_TYPES } from './generated/ast-spec'; +export * from './lib'; +export * from './parser-options'; +export * from './ts-estree'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/types/dist/index.d.ts.map b/slider/node_modules/@typescript-eslint/types/dist/index.d.ts.map new file mode 100644 index 0000000..b6efc9c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvE,cAAc,OAAO,CAAC;AACtB,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/types/dist/index.js b/slider/node_modules/@typescript-eslint/types/dist/index.js new file mode 100644 index 0000000..f59a9bc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/index.js @@ -0,0 +1,23 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0; +var ast_spec_1 = require("./generated/ast-spec"); +Object.defineProperty(exports, "AST_NODE_TYPES", { enumerable: true, get: function () { return ast_spec_1.AST_NODE_TYPES; } }); +Object.defineProperty(exports, "AST_TOKEN_TYPES", { enumerable: true, get: function () { return ast_spec_1.AST_TOKEN_TYPES; } }); +__exportStar(require("./lib"), exports); +__exportStar(require("./parser-options"), exports); +__exportStar(require("./ts-estree"), exports); diff --git a/slider/node_modules/@typescript-eslint/types/dist/lib.d.ts b/slider/node_modules/@typescript-eslint/types/dist/lib.d.ts new file mode 100644 index 0000000..18f8bf2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/lib.d.ts @@ -0,0 +1,2 @@ +export type Lib = 'decorators' | 'decorators.legacy' | 'dom' | 'dom.asynciterable' | 'dom.iterable' | 'es5' | 'es6' | 'es7' | 'es2015' | 'es2015.collection' | 'es2015.core' | 'es2015.generator' | 'es2015.iterable' | 'es2015.promise' | 'es2015.proxy' | 'es2015.reflect' | 'es2015.symbol' | 'es2015.symbol.wellknown' | 'es2016' | 'es2016.array.include' | 'es2016.full' | 'es2016.intl' | 'es2017' | 'es2017.arraybuffer' | 'es2017.date' | 'es2017.full' | 'es2017.intl' | 'es2017.object' | 'es2017.sharedmemory' | 'es2017.string' | 'es2017.typedarrays' | 'es2018' | 'es2018.asyncgenerator' | 'es2018.asynciterable' | 'es2018.full' | 'es2018.intl' | 'es2018.promise' | 'es2018.regexp' | 'es2019' | 'es2019.array' | 'es2019.full' | 'es2019.intl' | 'es2019.object' | 'es2019.string' | 'es2019.symbol' | 'es2020' | 'es2020.bigint' | 'es2020.date' | 'es2020.full' | 'es2020.intl' | 'es2020.number' | 'es2020.promise' | 'es2020.sharedmemory' | 'es2020.string' | 'es2020.symbol.wellknown' | 'es2021' | 'es2021.full' | 'es2021.intl' | 'es2021.promise' | 'es2021.string' | 'es2021.weakref' | 'es2022' | 'es2022.array' | 'es2022.error' | 'es2022.full' | 'es2022.intl' | 'es2022.object' | 'es2022.regexp' | 'es2022.string' | 'es2023' | 'es2023.array' | 'es2023.collection' | 'es2023.full' | 'es2023.intl' | 'es2024' | 'es2024.arraybuffer' | 'es2024.collection' | 'es2024.full' | 'es2024.object' | 'es2024.promise' | 'es2024.regexp' | 'es2024.sharedmemory' | 'es2024.string' | 'esnext' | 'esnext.array' | 'esnext.asynciterable' | 'esnext.bigint' | 'esnext.collection' | 'esnext.decorators' | 'esnext.disposable' | 'esnext.error' | 'esnext.float16' | 'esnext.full' | 'esnext.intl' | 'esnext.iterator' | 'esnext.object' | 'esnext.promise' | 'esnext.regexp' | 'esnext.sharedmemory' | 'esnext.string' | 'esnext.symbol' | 'esnext.weakref' | 'lib' | 'scripthost' | 'webworker' | 'webworker.asynciterable' | 'webworker.importscripts' | 'webworker.iterable'; +//# sourceMappingURL=lib.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/types/dist/lib.d.ts.map b/slider/node_modules/@typescript-eslint/types/dist/lib.d.ts.map new file mode 100644 index 0000000..b323b2b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/lib.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,GAAG,GACX,YAAY,GACZ,mBAAmB,GACn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Y,GACZ,WAAW,GACX,yBAAyB,GACzB,yBAAyB,GACzB,oBAAoB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/types/dist/lib.js b/slider/node_modules/@typescript-eslint/types/dist/lib.js new file mode 100644 index 0000000..f447065 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/lib.js @@ -0,0 +1,6 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib repo +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@typescript-eslint/types/dist/parser-options.d.ts b/slider/node_modules/@typescript-eslint/types/dist/parser-options.d.ts new file mode 100644 index 0000000..d662fe1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/parser-options.d.ts @@ -0,0 +1,69 @@ +import type { Program } from 'typescript'; +import type { Lib } from './lib'; +export type DebugLevel = boolean | ('eslint' | 'typescript' | 'typescript-eslint')[]; +export type CacheDurationSeconds = number | 'Infinity'; +export type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | 'latest' | undefined; +export type SourceTypeClassic = 'module' | 'script'; +export type SourceType = 'commonjs' | SourceTypeClassic; +export type JSDocParsingMode = 'all' | 'none' | 'type-info'; +/** + * Granular options to configure the project service. + */ +export interface ProjectServiceOptions { + /** + * Globs of files to allow running with the default project compiler options + * despite not being matched by the project service. + */ + allowDefaultProject?: string[]; + /** + * Path to a TSConfig to use instead of TypeScript's default project configuration. + * @default 'tsconfig.json' + */ + defaultProject?: string; + /** + * Whether to allow TypeScript plugins as configured in the TSConfig. + */ + loadTypeScriptPlugins?: boolean; + /** + * The maximum number of files {@link allowDefaultProject} may match. + * Each file match slows down linting, so if you do need to use this, please + * file an informative issue on typescript-eslint explaining why - so we can + * help you avoid using it! + * @default 8 + */ + maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING?: number; +} +export interface ParserOptions { + [additionalProperties: string]: unknown; + cacheLifetime?: { + glob?: CacheDurationSeconds; + }; + debugLevel?: DebugLevel; + ecmaFeatures?: { + [key: string]: unknown; + globalReturn?: boolean | undefined; + jsx?: boolean | undefined; + } | undefined; + ecmaVersion?: EcmaVersion; + emitDecoratorMetadata?: boolean; + errorOnTypeScriptSyntacticAndSemanticIssues?: boolean; + errorOnUnknownASTType?: boolean; + experimentalDecorators?: boolean; + extraFileExtensions?: string[]; + filePath?: string; + isolatedDeclarations?: boolean; + jsDocParsingMode?: JSDocParsingMode; + jsxFragmentName?: string | null; + jsxPragma?: string | null; + lib?: Lib[]; + programs?: Program[] | null; + project?: boolean | string | string[] | null; + projectFolderIgnoreList?: string[]; + projectService?: boolean | ProjectServiceOptions; + range?: boolean; + sourceType?: SourceType | undefined; + tokens?: boolean; + tsconfigRootDir?: string; + warnOnUnsupportedTypeScriptVersion?: boolean; +} +//# sourceMappingURL=parser-options.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map b/slider/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map new file mode 100644 index 0000000..12afabf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parser-options.d.ts","sourceRoot":"","sources":["../src/parser-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,MAAM,UAAU,GAClB,OAAO,GACP,CAAC,QAAQ,GAAG,YAAY,GAAG,mBAAmB,CAAC,EAAE,CAAC;AACtD,MAAM,MAAM,oBAAoB,GAAG,MAAM,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B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,2CAA2C,CAAC,EAAE,OAAO,CAAC;IAEtD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;IAC7C,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;IACnC,cAAc,CAAC,EAAE,OAAO,GAAG,qBAAqB,CAAC;IACjD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,kCAAkC,CAAC,EAAE,OAAO,CAAC;CAC9C"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/types/dist/parser-options.js b/slider/node_modules/@typescript-eslint/types/dist/parser-options.js new file mode 100644 index 0000000..fabb051 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/parser-options.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts b/slider/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts new file mode 100644 index 0000000..1c67ae5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts @@ -0,0 +1,189 @@ +import type * as TSESTree from './generated/ast-spec'; +declare module './generated/ast-spec' { + interface BaseNode { + parent: TSESTree.Node; + } + interface Program { + /** + * @remarks This never-used property exists only as a convenience for code that tries to access node parents repeatedly. + */ + parent?: never; + } + interface AccessorPropertyComputedName { + parent: TSESTree.ClassBody; + } + interface AccessorPropertyNonComputedName { + parent: TSESTree.ClassBody; + } + interface TSAbstractAccessorPropertyComputedName { + parent: TSESTree.ClassBody; + } + interface TSAbstractAccessorPropertyNonComputedName { + parent: TSESTree.ClassBody; + } + interface VariableDeclaratorDefiniteAssignment { + parent: TSESTree.VariableDeclaration; + } + interface VariableDeclaratorMaybeInit { + parent: TSESTree.VariableDeclaration; + } + interface VariableDeclaratorNoInit { + parent: TSESTree.VariableDeclaration; + } + interface UsingInForOfDeclarator { + parent: TSESTree.VariableDeclaration; + } + interface UsingInNormalContextDeclarator { + parent: TSESTree.VariableDeclaration; + } + interface CatchClause { + parent: TSESTree.TryStatement; + } + interface ClassBody { + parent: TSESTree.ClassDeclaration | TSESTree.ClassExpression; + } + interface ImportAttribute { + parent: TSESTree.ExportAllDeclaration | TSESTree.ExportNamedDeclaration | TSESTree.ImportDeclaration | TSESTree.TSImportType; + } + interface ImportDefaultSpecifier { + parent: TSESTree.ImportDeclaration; + } + interface ImportNamespaceSpecifier { + parent: TSESTree.ImportDeclaration; + } + interface ImportSpecifier { + parent: TSESTree.ExportAllDeclaration | TSESTree.ExportNamedDeclaration | TSESTree.ImportDeclaration; + } + interface ExportDefaultDeclaration { + parent: TSESTree.BlockStatement | TSESTree.Program | TSESTree.TSModuleBlock; + } + interface ExportNamedDeclarationWithoutSourceWithMultiple { + parent: TSESTree.BlockStatement | TSESTree.Program | TSESTree.TSModuleBlock; + } + interface ExportNamedDeclarationWithoutSourceWithSingle { + parent: TSESTree.BlockStatement | TSESTree.Program | TSESTree.TSModuleBlock; + } + interface ExportNamedDeclarationWithSource { + parent: TSESTree.BlockStatement | TSESTree.Program | TSESTree.TSModuleBlock; + } + interface FunctionDeclarationWithName { + parent: TSESTree.BlockStatement | TSESTree.ExportDefaultDeclaration | TSESTree.ExportNamedDeclaration | TSESTree.Program; + } + interface FunctionDeclarationWithOptionalName { + parent: TSESTree.ExportDefaultDeclaration; + } + interface JSXAttribute { + parent: TSESTree.JSXOpeningElement; + } + interface JSXClosingElement { + parent: TSESTree.JSXElement; + } + interface JSXClosingFragment { + parent: TSESTree.JSXFragment; + } + interface JSXOpeningElement { + parent: TSESTree.JSXElement; + } + interface JSXOpeningFragment { + parent: TSESTree.JSXFragment; + } + interface JSXSpreadAttribute { + parent: TSESTree.JSXOpeningElement; + } + interface MethodDefinitionComputedName { + parent: TSESTree.ClassBody; + } + interface MethodDefinitionNonComputedName { + parent: TSESTree.ClassBody; + } + interface TSAbstractMethodDefinitionComputedName { + parent: TSESTree.ClassBody; + } + interface TSAbstractMethodDefinitionNonComputedName { + parent: TSESTree.ClassBody; + } + interface PropertyComputedName { + parent: TSESTree.ObjectExpression | TSESTree.ObjectPattern; + } + interface PropertyNonComputedName { + parent: TSESTree.ObjectExpression | TSESTree.ObjectPattern; + } + interface PropertyDefinitionComputedName { + parent: TSESTree.ClassBody; + } + interface PropertyDefinitionNonComputedName { + parent: TSESTree.ClassBody; + } + interface TSAbstractPropertyDefinitionComputedName { + parent: TSESTree.ClassBody; + } + interface TSAbstractPropertyDefinitionNonComputedName { + parent: TSESTree.ClassBody; + } + interface SpreadElement { + parent: TSESTree.ArrayExpression | TSESTree.CallExpression | TSESTree.NewExpression | TSESTree.ObjectExpression; + } + interface StaticBlock { + parent: TSESTree.ClassBody; + } + interface SwitchCase { + parent: TSESTree.SwitchStatement; + } + interface TemplateElement { + parent: TSESTree.TemplateLiteral | TSESTree.TSTemplateLiteralType; + } + interface TSCallSignatureDeclaration { + parent: TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral; + } + interface TSConstructSignatureDeclaration { + parent: TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral; + } + interface TSClassImplements { + parent: TSESTree.ClassDeclaration | TSESTree.ClassExpression; + } + interface TSEnumBody { + parent: TSESTree.TSEnumDeclaration; + } + interface TSEnumMember { + parent: TSESTree.TSEnumBody; + } + interface TSIndexSignature { + parent: TSESTree.ClassBody | TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral; + } + interface TSInterfaceBody { + parent: TSESTree.TSInterfaceDeclaration; + } + interface TSInterfaceHeritage { + parent: TSESTree.TSInterfaceBody; + } + interface TSMethodSignatureComputedName { + parent: TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral; + } + interface TSMethodSignatureNonComputedName { + parent: TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral; + } + interface TSModuleBlock { + parent: TSESTree.TSModuleDeclaration; + } + interface TSParameterProperty { + parent: TSESTree.FunctionLike; + } + interface TSPropertySignatureComputedName { + parent: TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral; + } + interface TSPropertySignatureNonComputedName { + parent: TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral; + } + interface TSTypeParameter { + parent: TSESTree.TSInferType | TSESTree.TSMappedType | TSESTree.TSTypeParameterDeclaration; + } + interface ExportSpecifierWithIdentifierLocal { + parent: TSESTree.ExportNamedDeclaration; + } + interface ExportSpecifierWithStringOrLiteralLocal { + parent: TSESTree.ExportNamedDeclaration; + } +} +export * as TSESTree from './generated/ast-spec'; +export type NodeWithParent = Exclude; +//# sourceMappingURL=ts-estree.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts.map b/slider/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts.map new file mode 100644 index 0000000..b278f42 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ts-estree.d.ts","sourceRoot":"","sources":["../src/ts-estree.ts"],"names":[],"mappings":"AAAA,OAAO,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Q,CAAC,WAAW,GACpB,QAAQ,CAAC,YAAY,GACrB,QAAQ,CAAC,0BAA0B,CAAC;KACzC;IAED,UAAU,kCAAkC;QAC1C,MAAM,EAAE,QAAQ,CAAC,sBAAsB,CAAC;KACzC;IACD,UAAU,uCAAuC;QAC/C,MAAM,EAAE,QAAQ,CAAC,sBAAsB,CAAC;KACzC;CACF;AAED,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAC;AACjD,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/types/dist/ts-estree.js b/slider/node_modules/@typescript-eslint/types/dist/ts-estree.js new file mode 100644 index 0000000..1fd033c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/dist/ts-estree.js @@ -0,0 +1,37 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSESTree = void 0; +exports.TSESTree = __importStar(require("./generated/ast-spec")); diff --git a/slider/node_modules/@typescript-eslint/types/package.json b/slider/node_modules/@typescript-eslint/types/package.json new file mode 100644 index 0000000..56ea76a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/types/package.json @@ -0,0 +1,94 @@ +{ + "name": "@typescript-eslint/types", + "version": "8.44.1", + "description": "Types for the TypeScript-ESTree AST spec", + "files": [ + "dist", + "!*.tsbuildinfo", + "package.json", + "README.md", + "LICENSE" + ], + "type": "commonjs", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "types": "./dist/index.d.ts", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/types" + }, + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "homepage": "https://typescript-eslint.io", + "license": "MIT", + "keywords": [ + "eslint", + "typescript", + "estree" + ], + "scripts": { + "build": "yarn run -BT nx build", + "clean": "rimraf dist/ src/generated/ coverage/", + "copy-ast-spec": "yarn run -BT nx copy-ast-spec", + "format": "yarn run -T format", + "generate-lib": "yarn run -BT nx generate-lib repo", + "lint": "yarn run -BT nx lint", + "test": "yarn run -BT nx test", + "typecheck": "yarn run -BT nx typecheck" + }, + "devDependencies": { + "@vitest/coverage-v8": "^3.1.3", + "eslint": "*", + "rimraf": "*", + "tsx": "*", + "typescript": "*", + "vitest": "^3.1.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "nx": { + "name": "types", + "includedScripts": [ + "clean" + ], + "targets": { + "build": { + "dependsOn": [ + "copy-ast-spec" + ] + }, + "copy-ast-spec": { + "cache": false, + "command": "tsx tools/copy-ast-spec.mts", + "dependsOn": [ + "ast-spec:build" + ], + "options": { + "cwd": "{projectRoot}" + }, + "outputs": [ + "{projectRoot}/src/generated" + ] + }, + "lint": { + "command": "eslint", + "dependsOn": [ + "typescript-eslint:build", + "eslint-plugin-internal:build" + ] + } + } + } +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/LICENSE b/slider/node_modules/@typescript-eslint/typescript-estree/LICENSE new file mode 100644 index 0000000..5de6cb6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 typescript-eslint and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/README.md b/slider/node_modules/@typescript-eslint/typescript-estree/README.md new file mode 100644 index 0000000..d1c4990 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/README.md @@ -0,0 +1,14 @@ +# `@typescript-eslint/typescript-estree` + +> A parser that produces an ESTree-compatible AST for TypeScript code. + +[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/typescript-estree.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/utils) +[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/typescript-estree.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/utils) + +## Contributing + +👉 See **https://typescript-eslint.io/packages/typescript-estree** for documentation on this package. + +> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code. + + diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts new file mode 100644 index 0000000..ff88be9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts @@ -0,0 +1,9 @@ +import type { SourceFile } from 'typescript'; +import type { ASTMaps } from './convert'; +import type { ParseSettings } from './parseSettings'; +import type { TSESTree } from './ts-estree'; +export declare function astConverter(ast: SourceFile, parseSettings: ParseSettings, shouldPreserveNodeMaps: boolean): { + astMaps: ASTMaps; + estree: TSESTree.Program; +}; +//# sourceMappingURL=ast-converter.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts.map new file mode 100644 index 0000000..3b66a7e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ast-converter.d.ts","sourceRoot":"","sources":["../src/ast-converter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAO5C,wBAAgB,YAAY,CAC1B,GAAG,EAAE,UAAU,EACf,aAAa,EAAE,aAAa,EAC5B,sBAAsB,EAAE,OAAO,GAC9B;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAA;CAAE,CA4DhD"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js new file mode 100644 index 0000000..5b3e2ec --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js @@ -0,0 +1,60 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.astConverter = astConverter; +const convert_1 = require("./convert"); +const convert_comments_1 = require("./convert-comments"); +const node_utils_1 = require("./node-utils"); +const simple_traverse_1 = require("./simple-traverse"); +function astConverter(ast, parseSettings, shouldPreserveNodeMaps) { + /** + * The TypeScript compiler produced fundamental parse errors when parsing the + * source. + */ + const { parseDiagnostics } = ast; + if (parseDiagnostics.length) { + throw (0, convert_1.convertError)(parseDiagnostics[0]); + } + /** + * Recursively convert the TypeScript AST into an ESTree-compatible AST + */ + const instance = new convert_1.Converter(ast, { + allowInvalidAST: parseSettings.allowInvalidAST, + errorOnUnknownASTType: parseSettings.errorOnUnknownASTType, + shouldPreserveNodeMaps, + suppressDeprecatedPropertyWarnings: parseSettings.suppressDeprecatedPropertyWarnings, + }); + const estree = instance.convertProgram(); + /** + * Optionally remove range and loc if specified + */ + if (!parseSettings.range || !parseSettings.loc) { + (0, simple_traverse_1.simpleTraverse)(estree, { + enter: node => { + if (!parseSettings.range) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- TS 4.0 made this an error because the types aren't optional + // @ts-expect-error + delete node.range; + } + if (!parseSettings.loc) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- TS 4.0 made this an error because the types aren't optional + // @ts-expect-error + delete node.loc; + } + }, + }); + } + /** + * Optionally convert and include all tokens in the AST + */ + if (parseSettings.tokens) { + estree.tokens = (0, node_utils_1.convertTokens)(ast); + } + /** + * Optionally convert and include all comments in the AST + */ + if (parseSettings.comment) { + estree.comments = (0, convert_comments_1.convertComments)(ast, parseSettings.codeFullText); + } + const astMaps = instance.getASTMaps(); + return { astMaps, estree }; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts new file mode 100644 index 0000000..e5a1760 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts @@ -0,0 +1,10 @@ +/** + * Clears all of the internal caches. + * Generally you shouldn't need or want to use this. + * Examples of intended uses: + * - In tests to reset parser state to keep tests isolated. + * - In custom lint tooling that iteratively lints one project at a time to prevent OOMs. + */ +export declare function clearCaches(): void; +export declare const clearProgramCache: typeof clearCaches; +//# sourceMappingURL=clear-caches.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts.map new file mode 100644 index 0000000..ae8ad9d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"clear-caches.d.ts","sourceRoot":"","sources":["../src/clear-caches.ts"],"names":[],"mappings":"AAYA;;;;;;GAMG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAGD,eAAO,MAAM,iBAAiB,oBAAc,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js new file mode 100644 index 0000000..fd43574 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.clearProgramCache = void 0; +exports.clearCaches = clearCaches; +const getWatchProgramsForProjects_1 = require("./create-program/getWatchProgramsForProjects"); +const parser_1 = require("./parser"); +const candidateTSConfigRootDirs_1 = require("./parseSettings/candidateTSConfigRootDirs"); +const createParseSettings_1 = require("./parseSettings/createParseSettings"); +const resolveProjectList_1 = require("./parseSettings/resolveProjectList"); +/** + * Clears all of the internal caches. + * Generally you shouldn't need or want to use this. + * Examples of intended uses: + * - In tests to reset parser state to keep tests isolated. + * - In custom lint tooling that iteratively lints one project at a time to prevent OOMs. + */ +function clearCaches() { + (0, candidateTSConfigRootDirs_1.clearCandidateTSConfigRootDirs)(); + (0, parser_1.clearDefaultProjectMatchedFiles)(); + (0, parser_1.clearProgramCache)(); + (0, getWatchProgramsForProjects_1.clearWatchCaches)(); + (0, createParseSettings_1.clearTSConfigMatchCache)(); + (0, createParseSettings_1.clearTSServerProjectService)(); + (0, resolveProjectList_1.clearGlobCache)(); +} +// TODO - delete this in next major +exports.clearProgramCache = clearCaches; diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts new file mode 100644 index 0000000..9f9e5c8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts @@ -0,0 +1,11 @@ +import * as ts from 'typescript'; +import type { TSESTree } from './ts-estree'; +/** + * Convert all comments for the given AST. + * @param ast the AST object + * @param code the TypeScript code + * @returns the converted ESTreeComment + * @private + */ +export declare function convertComments(ast: ts.SourceFile, code: string): TSESTree.Comment[]; +//# sourceMappingURL=convert-comments.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts.map new file mode 100644 index 0000000..5e25178 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"convert-comments.d.ts","sourceRoot":"","sources":["../src/convert-comments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAK5C;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,EAAE,CAAC,UAAU,EAClB,IAAI,EAAE,MAAM,GACX,QAAQ,CAAC,OAAO,EAAE,CAgCpB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js new file mode 100644 index 0000000..36ca455 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js @@ -0,0 +1,71 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.convertComments = convertComments; +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const node_utils_1 = require("./node-utils"); +const ts_estree_1 = require("./ts-estree"); +/** + * Convert all comments for the given AST. + * @param ast the AST object + * @param code the TypeScript code + * @returns the converted ESTreeComment + * @private + */ +function convertComments(ast, code) { + const comments = []; + tsutils.forEachComment(ast, (_, comment) => { + const type = comment.kind === ts.SyntaxKind.SingleLineCommentTrivia + ? ts_estree_1.AST_TOKEN_TYPES.Line + : ts_estree_1.AST_TOKEN_TYPES.Block; + const range = [comment.pos, comment.end]; + const loc = (0, node_utils_1.getLocFor)(range, ast); + // both comments start with 2 characters - /* or // + const textStart = range[0] + 2; + const textEnd = comment.kind === ts.SyntaxKind.SingleLineCommentTrivia + ? // single line comments end at the end + range[1] - textStart + : // multiline comments end 2 characters early + range[1] - textStart - 2; + comments.push({ + type, + loc, + range, + value: code.slice(textStart, textStart + textEnd), + }); + }, ast); + return comments; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts new file mode 100644 index 0000000..945d49c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts @@ -0,0 +1,144 @@ +import * as ts from 'typescript'; +import type { TSError } from './node-utils'; +import type { ParserWeakMap, ParserWeakMapESTreeToTSNode } from './parser-options'; +import type { SemanticOrSyntacticError } from './semantic-or-syntactic-errors'; +import type { TSESTree, TSNode } from './ts-estree'; +export interface ConverterOptions { + allowInvalidAST?: boolean; + errorOnUnknownASTType?: boolean; + shouldPreserveNodeMaps?: boolean; + suppressDeprecatedPropertyWarnings?: boolean; +} +/** + * Extends and formats a given error object + * @param error the error object + * @returns converted error object + */ +export declare function convertError(error: SemanticOrSyntacticError | ts.DiagnosticWithLocation): TSError; +export interface ASTMaps { + esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode; + tsNodeToESTreeNodeMap: ParserWeakMap; +} +export declare class Converter { + #private; + private allowPattern; + private readonly ast; + private readonly esTreeNodeToTSNodeMap; + private readonly options; + private readonly tsNodeToESTreeNodeMap; + /** + * Converts a TypeScript node into an ESTree node + * @param ast the full TypeScript AST + * @param options additional options for the conversion + * @returns the converted ESTreeNode + */ + constructor(ast: ts.SourceFile, options?: ConverterOptions); + private assertModuleSpecifier; + private convertBindingNameWithTypeAnnotation; + /** + * Coverts body Nodes and add a directive field to StringLiterals + * @param nodes of ts.Node + * @param parent parentNode + * @returns Array of body statements + */ + private convertBodyExpressions; + private convertChainExpression; + /** + * Converts a TypeScript node into an ESTree node. + * @param child the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + private convertChild; + /** + * Converts TypeScript node array into an ESTree node list. + * @param children the child `ts.NodeArray` or `ts.Node[]` + * @param parent parentNode + * @returns the converted ESTree node list + */ + private convertChildren; + /** + * Converts a TypeScript node into an ESTree node. + * @param child the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + private convertPattern; + /** + * Converts a child into a type annotation. This creates an intermediary + * TypeAnnotation node to match what Flow does. + * @param child The TypeScript AST node to convert. + * @param parent parentNode + * @returns The type annotation node. + */ + private convertTypeAnnotation; + /** + * Converts a ts.Node's typeArguments to TSTypeParameterInstantiation node + * @param typeArguments ts.NodeArray typeArguments + * @param node parent used to create this node + * @returns TypeParameterInstantiation node + */ + private convertTypeArgumentsToTypeParameterInstantiation; + /** + * Converts a ts.Node's typeParameters to TSTypeParameterDeclaration node + * @param typeParameters ts.Node typeParameters + * @returns TypeParameterDeclaration node + */ + private convertTSTypeParametersToTypeParametersDeclaration; + /** + * Converts an array of ts.Node parameters into an array of ESTreeNode params + * @param parameters An array of ts.Node params to be converted + * @returns an array of converted ESTreeNode params + */ + private convertParameters; + /** + * Converts a TypeScript node into an ESTree node. + * @param node the child ts.Node + * @param parent parentNode + * @param allowPattern flag to determine if patterns are allowed + * @returns the converted ESTree node + */ + private converter; + private convertImportAttributes; + private convertJSXIdentifier; + private convertJSXNamespaceOrIdentifier; + /** + * Converts a TypeScript JSX node.tagName into an ESTree node.name + * @param node the tagName object from a JSX ts.Node + * @returns the converted ESTree name object + */ + private convertJSXTagName; + private convertMethodSignature; + /** + * Uses the provided range location to adjust the location data of the given Node + * @param result The node that will have its location data mutated + * @param childRange The child node range used to expand location + */ + private fixParentLocation; + /** + * Converts a TypeScript node into an ESTree node. + * The core of the conversion logic: + * Identify and convert each relevant TypeScript SyntaxKind + * @returns the converted ESTree node + */ + private convertNode; + private createNode; + convertProgram(): TSESTree.Program; + /** + * For nodes that are copied directly from the TypeScript AST into + * ESTree mostly as-is. The only difference is the addition of a type + * property instead of a kind property. Recursively copies all children. + */ + private deeplyCopy; + /** + * Fixes the exports of the given ts.Node + * @returns the ESTreeNode with fixed exports + */ + private fixExports; + getASTMaps(): ASTMaps; + /** + * Register specific TypeScript node into map with first ESTree node provided + */ + private registerTSNodeInNodeMap; +} +//# sourceMappingURL=convert.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map new file mode 100644 index 0000000..d92f0b1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../src/convert.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EACV,aAAa,EACb,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAoB,MAAM,EAAE,MAAM,aAAa,CAAC;AAmCtE,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,kCAAkC,CAAC,E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B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAczB;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IAwlFnB,OAAO,CAAC,UAAU;IAclB,cAAc,IAAI,QAAQ,CAAC,OAAO;IAIlC;;;;OAIG;IACH,OAAO,CAAC,UAAU;IA0FlB;;;OAGG;IACH,OAAO,CAAC,UAAU;IAgFlB,UAAU,IAAI,OAAO;IAOrB;;OAEG;IACH,OAAO,CAAC,uBAAuB;CAYhC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert.js new file mode 100644 index 0000000..9cb5ca1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/convert.js @@ -0,0 +1,2791 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Converter = void 0; +exports.convertError = convertError; +// There's lots of funny stuff due to the typing of ts.Node +/* eslint-disable @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-unnecessary-condition, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access */ +const ts = __importStar(require("typescript")); +const getModifiers_1 = require("./getModifiers"); +const node_utils_1 = require("./node-utils"); +const ts_estree_1 = require("./ts-estree"); +const SyntaxKind = ts.SyntaxKind; +/** + * Extends and formats a given error object + * @param error the error object + * @returns converted error object + */ +function convertError(error) { + return (0, node_utils_1.createError)(('message' in error && error.message) || error.messageText, error.file, error.start); +} +function isPropertyAccessEntityNameExpression(node) { + return (ts.isPropertyAccessExpression(node) && + ts.isIdentifier(node.name) && + isEntityNameExpression(node.expression)); +} +function isEntityNameExpression(node) { + return (node.kind === SyntaxKind.Identifier || + isPropertyAccessEntityNameExpression(node)); +} +class Converter { + allowPattern = false; + ast; + esTreeNodeToTSNodeMap = new WeakMap(); + options; + tsNodeToESTreeNodeMap = new WeakMap(); + /** + * Converts a TypeScript node into an ESTree node + * @param ast the full TypeScript AST + * @param options additional options for the conversion + * @returns the converted ESTreeNode + */ + constructor(ast, options) { + this.ast = ast; + this.options = { ...options }; + } + #checkForStatementDeclaration(initializer, kind) { + const loop = kind === ts.SyntaxKind.ForInStatement ? 'for...in' : 'for...of'; + if (ts.isVariableDeclarationList(initializer)) { + if (initializer.declarations.length !== 1) { + this.#throwError(initializer, `Only a single variable declaration is allowed in a '${loop}' statement.`); + } + const declaration = initializer.declarations[0]; + if (declaration.initializer) { + this.#throwError(declaration, `The variable declaration of a '${loop}' statement cannot have an initializer.`); + } + else if (declaration.type) { + this.#throwError(declaration, `The variable declaration of a '${loop}' statement cannot have a type annotation.`); + } + if (kind === ts.SyntaxKind.ForInStatement && + initializer.flags & ts.NodeFlags.Using) { + this.#throwError(initializer, "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."); + } + } + else if (!(0, node_utils_1.isValidAssignmentTarget)(initializer) && + initializer.kind !== ts.SyntaxKind.ObjectLiteralExpression && + initializer.kind !== ts.SyntaxKind.ArrayLiteralExpression) { + this.#throwError(initializer, `The left-hand side of a '${loop}' statement must be a variable or a property access.`); + } + } + #checkModifiers(node) { + if (this.options.allowInvalidAST) { + return; + } + // typescript<5.0.0 + if ((0, node_utils_1.nodeHasIllegalDecorators)(node)) { + this.#throwError(node.illegalDecorators[0], 'Decorators are not valid here.'); + } + for (const decorator of (0, getModifiers_1.getDecorators)(node, + /* includeIllegalDecorators */ true) ?? []) { + // `checkGrammarModifiers` function in typescript + if (!(0, node_utils_1.nodeCanBeDecorated)(node)) { + if (ts.isMethodDeclaration(node) && !(0, node_utils_1.nodeIsPresent)(node.body)) { + this.#throwError(decorator, 'A decorator can only decorate a method implementation, not an overload.'); + } + else { + this.#throwError(decorator, 'Decorators are not valid here.'); + } + } + } + for (const modifier of (0, getModifiers_1.getModifiers)(node, + /* includeIllegalModifiers */ true) ?? []) { + if (modifier.kind !== SyntaxKind.ReadonlyKeyword) { + if (node.kind === SyntaxKind.PropertySignature || + node.kind === SyntaxKind.MethodSignature) { + this.#throwError(modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on a type member`); + } + if (node.kind === SyntaxKind.IndexSignature && + (modifier.kind !== SyntaxKind.StaticKeyword || + !ts.isClassLike(node.parent))) { + this.#throwError(modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on an index signature`); + } + } + if (modifier.kind !== SyntaxKind.InKeyword && + modifier.kind !== SyntaxKind.OutKeyword && + modifier.kind !== SyntaxKind.ConstKeyword && + node.kind === SyntaxKind.TypeParameter) { + this.#throwError(modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on a type parameter`); + } + if ((modifier.kind === SyntaxKind.InKeyword || + modifier.kind === SyntaxKind.OutKeyword) && + (node.kind !== SyntaxKind.TypeParameter || + !(ts.isInterfaceDeclaration(node.parent) || + ts.isClassLike(node.parent) || + ts.isTypeAliasDeclaration(node.parent)))) { + this.#throwError(modifier, `'${ts.tokenToString(modifier.kind)}' modifier can only appear on a type parameter of a class, interface or type alias`); + } + if (modifier.kind === SyntaxKind.ReadonlyKeyword && + node.kind !== SyntaxKind.PropertyDeclaration && + node.kind !== SyntaxKind.PropertySignature && + node.kind !== SyntaxKind.IndexSignature && + node.kind !== SyntaxKind.Parameter) { + this.#throwError(modifier, "'readonly' modifier can only appear on a property declaration or index signature."); + } + if (modifier.kind === SyntaxKind.DeclareKeyword && + ts.isClassLike(node.parent) && + !ts.isPropertyDeclaration(node)) { + this.#throwError(modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on class elements of this kind.`); + } + if (modifier.kind === SyntaxKind.DeclareKeyword && + ts.isVariableStatement(node)) { + const declarationKind = (0, node_utils_1.getDeclarationKind)(node.declarationList); + if (declarationKind === 'using' || declarationKind === 'await using') { + this.#throwError(modifier, `'declare' modifier cannot appear on a '${declarationKind}' declaration.`); + } + } + if (modifier.kind === SyntaxKind.AbstractKeyword && + node.kind !== SyntaxKind.ClassDeclaration && + node.kind !== SyntaxKind.ConstructorType && + node.kind !== SyntaxKind.MethodDeclaration && + node.kind !== SyntaxKind.PropertyDeclaration && + node.kind !== SyntaxKind.GetAccessor && + node.kind !== SyntaxKind.SetAccessor) { + this.#throwError(modifier, `'${ts.tokenToString(modifier.kind)}' modifier can only appear on a class, method, or property declaration.`); + } + if ((modifier.kind === SyntaxKind.StaticKeyword || + modifier.kind === SyntaxKind.PublicKeyword || + modifier.kind === SyntaxKind.ProtectedKeyword || + modifier.kind === SyntaxKind.PrivateKeyword) && + (node.parent.kind === SyntaxKind.ModuleBlock || + node.parent.kind === SyntaxKind.SourceFile)) { + this.#throwError(modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on a module or namespace element.`); + } + if (modifier.kind === SyntaxKind.AccessorKeyword && + node.kind !== SyntaxKind.PropertyDeclaration) { + this.#throwError(modifier, "'accessor' modifier can only appear on a property declaration."); + } + // `checkGrammarAsyncModifier` function in `typescript` + if (modifier.kind === SyntaxKind.AsyncKeyword && + node.kind !== SyntaxKind.MethodDeclaration && + node.kind !== SyntaxKind.FunctionDeclaration && + node.kind !== SyntaxKind.FunctionExpression && + node.kind !== SyntaxKind.ArrowFunction) { + this.#throwError(modifier, "'async' modifier cannot be used here."); + } + // `checkGrammarModifiers` function in `typescript` + if (node.kind === SyntaxKind.Parameter && + (modifier.kind === SyntaxKind.StaticKeyword || + modifier.kind === SyntaxKind.ExportKeyword || + modifier.kind === SyntaxKind.DeclareKeyword || + modifier.kind === SyntaxKind.AsyncKeyword)) { + this.#throwError(modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on a parameter.`); + } + // `checkGrammarModifiers` function in `typescript` + if (modifier.kind === SyntaxKind.PublicKeyword || + modifier.kind === SyntaxKind.ProtectedKeyword || + modifier.kind === SyntaxKind.PrivateKeyword) { + for (const anotherModifier of (0, getModifiers_1.getModifiers)(node) ?? []) { + if (anotherModifier !== modifier && + (anotherModifier.kind === SyntaxKind.PublicKeyword || + anotherModifier.kind === SyntaxKind.ProtectedKeyword || + anotherModifier.kind === SyntaxKind.PrivateKeyword)) { + this.#throwError(anotherModifier, `Accessibility modifier already seen.`); + } + } + } + // `checkParameter` function in `typescript` + if (node.kind === SyntaxKind.Parameter && + // In `typescript` package, it's `ts.hasSyntacticModifier(node, ts.ModifierFlags.ParameterPropertyModifier)` + // https://github.com/typescript-eslint/typescript-eslint/pull/6615#discussion_r1136489935 + (modifier.kind === SyntaxKind.PublicKeyword || + modifier.kind === SyntaxKind.PrivateKeyword || + modifier.kind === SyntaxKind.ProtectedKeyword || + modifier.kind === SyntaxKind.ReadonlyKeyword || + modifier.kind === SyntaxKind.OverrideKeyword)) { + const func = (0, node_utils_1.getContainingFunction)(node); + if (!(func.kind === SyntaxKind.Constructor && (0, node_utils_1.nodeIsPresent)(func.body))) { + this.#throwError(modifier, 'A parameter property is only allowed in a constructor implementation.'); + } + } + } + } + #throwError(node, message) { + let start; + let end; + if (Array.isArray(node)) { + [start, end] = node; + } + else if (typeof node === 'number') { + start = end = node; + } + else { + start = node.getStart(this.ast); + end = node.getEnd(); + } + throw (0, node_utils_1.createError)(message, this.ast, start, end); + } + #throwUnlessAllowInvalidAST(node, message) { + if (!this.options.allowInvalidAST) { + this.#throwError(node, message); + } + } + /** + * Creates a getter for a property under aliasKey that returns the value under + * valueKey. If suppressDeprecatedPropertyWarnings is not enabled, the + * getter also console warns about the deprecation. + * + * @see https://github.com/typescript-eslint/typescript-eslint/issues/6469 + */ + #withDeprecatedAliasGetter(node, aliasKey, valueKey, suppressWarnings = false) { + let warned = suppressWarnings; + Object.defineProperty(node, aliasKey, { + configurable: true, + get: this.options.suppressDeprecatedPropertyWarnings + ? () => node[valueKey] + : () => { + if (!warned) { + process.emitWarning(`The '${aliasKey}' property is deprecated on ${node.type} nodes. Use '${valueKey}' instead. See https://typescript-eslint.io/troubleshooting/faqs/general#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.`, 'DeprecationWarning'); + warned = true; + } + return node[valueKey]; + }, + set(value) { + Object.defineProperty(node, aliasKey, { + enumerable: true, + value, + writable: true, + }); + }, + }); + return node; + } + #withDeprecatedGetter(node, deprecatedKey, preferredKey, value) { + let warned = false; + Object.defineProperty(node, deprecatedKey, { + configurable: true, + get: this.options.suppressDeprecatedPropertyWarnings + ? () => value + : () => { + if (!warned) { + let message = `The '${deprecatedKey}' property is deprecated on ${node.type} nodes.`; + if (preferredKey) { + message += ` Use ${preferredKey} instead.`; + } + message += + ' See https://typescript-eslint.io/troubleshooting/faqs/general#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.'; + process.emitWarning(message, 'DeprecationWarning'); + warned = true; + } + return value; + }, + set(value) { + Object.defineProperty(node, deprecatedKey, { + enumerable: true, + value, + writable: true, + }); + }, + }); + return node; + } + assertModuleSpecifier(node, allowNull) { + if (!allowNull && node.moduleSpecifier == null) { + this.#throwUnlessAllowInvalidAST(node, 'Module specifier must be a string literal.'); + } + if (node.moduleSpecifier && + node.moduleSpecifier?.kind !== SyntaxKind.StringLiteral) { + this.#throwUnlessAllowInvalidAST(node.moduleSpecifier, 'Module specifier must be a string literal.'); + } + } + convertBindingNameWithTypeAnnotation(name, tsType, parent) { + const id = this.convertPattern(name); + if (tsType) { + id.typeAnnotation = this.convertTypeAnnotation(tsType, parent); + this.fixParentLocation(id, id.typeAnnotation.range); + } + return id; + } + /** + * Coverts body Nodes and add a directive field to StringLiterals + * @param nodes of ts.Node + * @param parent parentNode + * @returns Array of body statements + */ + convertBodyExpressions(nodes, parent) { + let allowDirectives = (0, node_utils_1.canContainDirective)(parent); + return (nodes + .map(statement => { + const child = this.convertChild(statement); + if (allowDirectives) { + if (child?.expression && + ts.isExpressionStatement(statement) && + ts.isStringLiteral(statement.expression)) { + const raw = child.expression.raw; + child.directive = raw.slice(1, -1); + return child; // child can be null, but it's filtered below + } + allowDirectives = false; + } + return child; // child can be null, but it's filtered below + }) + // filter out unknown nodes for now + .filter(statement => statement)); + } + convertChainExpression(node, tsNode) { + const { child, isOptional } = (() => { + if (node.type === ts_estree_1.AST_NODE_TYPES.MemberExpression) { + return { child: node.object, isOptional: node.optional }; + } + if (node.type === ts_estree_1.AST_NODE_TYPES.CallExpression) { + return { child: node.callee, isOptional: node.optional }; + } + return { child: node.expression, isOptional: false }; + })(); + const isChildUnwrappable = (0, node_utils_1.isChildUnwrappableOptionalChain)(tsNode, child); + if (!isChildUnwrappable && !isOptional) { + return node; + } + if (isChildUnwrappable && (0, node_utils_1.isChainExpression)(child)) { + // unwrap the chain expression child + const newChild = child.expression; + if (node.type === ts_estree_1.AST_NODE_TYPES.MemberExpression) { + node.object = newChild; + } + else if (node.type === ts_estree_1.AST_NODE_TYPES.CallExpression) { + node.callee = newChild; + } + else { + node.expression = newChild; + } + } + return this.createNode(tsNode, { + type: ts_estree_1.AST_NODE_TYPES.ChainExpression, + expression: node, + }); + } + /** + * Converts a TypeScript node into an ESTree node. + * @param child the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + convertChild(child, parent) { + return this.converter(child, parent, false); + } + /** + * Converts TypeScript node array into an ESTree node list. + * @param children the child `ts.NodeArray` or `ts.Node[]` + * @param parent parentNode + * @returns the converted ESTree node list + */ + convertChildren(children, parent) { + return children.map(child => this.converter(child, parent, false)); + } + /** + * Converts a TypeScript node into an ESTree node. + * @param child the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + convertPattern(child, parent) { + return this.converter(child, parent, true); + } + /** + * Converts a child into a type annotation. This creates an intermediary + * TypeAnnotation node to match what Flow does. + * @param child The TypeScript AST node to convert. + * @param parent parentNode + * @returns The type annotation node. + */ + convertTypeAnnotation(child, parent) { + // in FunctionType and ConstructorType typeAnnotation has 2 characters `=>` and in other places is just colon + const offset = parent?.kind === SyntaxKind.FunctionType || + parent?.kind === SyntaxKind.ConstructorType + ? 2 + : 1; + const annotationStartCol = child.getFullStart() - offset; + const range = [annotationStartCol, child.end]; + const loc = (0, node_utils_1.getLocFor)(range, this.ast); + return { + type: ts_estree_1.AST_NODE_TYPES.TSTypeAnnotation, + loc, + range, + typeAnnotation: this.convertChild(child), + }; + } + /** + * Converts a ts.Node's typeArguments to TSTypeParameterInstantiation node + * @param typeArguments ts.NodeArray typeArguments + * @param node parent used to create this node + * @returns TypeParameterInstantiation node + */ + convertTypeArgumentsToTypeParameterInstantiation(typeArguments, node) { + const greaterThanToken = (0, node_utils_1.findNextToken)(typeArguments, this.ast, this.ast); + const range = [typeArguments.pos - 1, greaterThanToken.end]; + if (typeArguments.length === 0) { + this.#throwError(range, 'Type argument list cannot be empty.'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeParameterInstantiation, + range, + params: this.convertChildren(typeArguments), + }); + } + /** + * Converts a ts.Node's typeParameters to TSTypeParameterDeclaration node + * @param typeParameters ts.Node typeParameters + * @returns TypeParameterDeclaration node + */ + convertTSTypeParametersToTypeParametersDeclaration(typeParameters) { + const greaterThanToken = (0, node_utils_1.findNextToken)(typeParameters, this.ast, this.ast); + const range = [ + typeParameters.pos - 1, + greaterThanToken.end, + ]; + if (typeParameters.length === 0) { + this.#throwError(range, 'Type parameter list cannot be empty.'); + } + return { + type: ts_estree_1.AST_NODE_TYPES.TSTypeParameterDeclaration, + loc: (0, node_utils_1.getLocFor)(range, this.ast), + range, + params: this.convertChildren(typeParameters), + }; + } + /** + * Converts an array of ts.Node parameters into an array of ESTreeNode params + * @param parameters An array of ts.Node params to be converted + * @returns an array of converted ESTreeNode params + */ + convertParameters(parameters) { + if (!parameters?.length) { + return []; + } + return parameters.map(param => { + const convertedParam = this.convertChild(param); + convertedParam.decorators = this.convertChildren((0, getModifiers_1.getDecorators)(param) ?? []); + return convertedParam; + }); + } + /** + * Converts a TypeScript node into an ESTree node. + * @param node the child ts.Node + * @param parent parentNode + * @param allowPattern flag to determine if patterns are allowed + * @returns the converted ESTree node + */ + converter(node, parent, allowPattern) { + /** + * Exit early for null and undefined + */ + if (!node) { + return null; + } + this.#checkModifiers(node); + const pattern = this.allowPattern; + if (allowPattern != null) { + this.allowPattern = allowPattern; + } + const result = this.convertNode(node, (parent ?? node.parent)); + this.registerTSNodeInNodeMap(node, result); + this.allowPattern = pattern; + return result; + } + convertImportAttributes(node) { + // eslint-disable-next-line @typescript-eslint/no-deprecated + const attributes = node.attributes ?? node.assertClause; + return this.convertChildren(attributes?.elements ?? []); + } + convertJSXIdentifier(node) { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXIdentifier, + name: node.getText(), + }); + this.registerTSNodeInNodeMap(node, result); + return result; + } + convertJSXNamespaceOrIdentifier(node) { + // TypeScript@5.1 added in ts.JsxNamespacedName directly + // We prefer using that if it's relevant for this node type + if (node.kind === ts.SyntaxKind.JsxNamespacedName) { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXNamespacedName, + name: this.createNode(node.name, { + type: ts_estree_1.AST_NODE_TYPES.JSXIdentifier, + name: node.name.text, + }), + namespace: this.createNode(node.namespace, { + type: ts_estree_1.AST_NODE_TYPES.JSXIdentifier, + name: node.namespace.text, + }), + }); + this.registerTSNodeInNodeMap(node, result); + return result; + } + // TypeScript@<5.1 has to manually parse the JSX attributes + const text = node.getText(); + const colonIndex = text.indexOf(':'); + // this is intentional we can ignore conversion if `:` is in first character + if (colonIndex > 0) { + const range = (0, node_utils_1.getRange)(node, this.ast); + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXNamespacedName, + range, + name: this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXIdentifier, + range: [range[0] + colonIndex + 1, range[1]], + name: text.slice(colonIndex + 1), + }), + namespace: this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXIdentifier, + range: [range[0], range[0] + colonIndex], + name: text.slice(0, colonIndex), + }), + }); + this.registerTSNodeInNodeMap(node, result); + return result; + } + return this.convertJSXIdentifier(node); + } + /** + * Converts a TypeScript JSX node.tagName into an ESTree node.name + * @param node the tagName object from a JSX ts.Node + * @returns the converted ESTree name object + */ + convertJSXTagName(node, parent) { + let result; + switch (node.kind) { + case SyntaxKind.PropertyAccessExpression: + if (node.name.kind === SyntaxKind.PrivateIdentifier) { + // This is one of the few times where TS explicitly errors, and doesn't even gracefully handle the syntax. + // So we shouldn't ever get into this state to begin with. + this.#throwError(node.name, 'Non-private identifier expected.'); + } + result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXMemberExpression, + object: this.convertJSXTagName(node.expression, parent), + property: this.convertJSXIdentifier(node.name), + }); + break; + case SyntaxKind.ThisKeyword: + case SyntaxKind.Identifier: + default: + return this.convertJSXNamespaceOrIdentifier(node); + } + this.registerTSNodeInNodeMap(node, result); + return result; + } + convertMethodSignature(node) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSMethodSignature, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + computed: (0, node_utils_1.isComputedProperty)(node.name), + key: this.convertChild(node.name), + kind: (() => { + switch (node.kind) { + case SyntaxKind.GetAccessor: + return 'get'; + case SyntaxKind.SetAccessor: + return 'set'; + case SyntaxKind.MethodSignature: + return 'method'; + } + })(), + optional: (0, node_utils_1.isOptional)(node), + params: this.convertParameters(node.parameters), + readonly: (0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node), + returnType: node.type && this.convertTypeAnnotation(node.type, node), + static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + } + /** + * Uses the provided range location to adjust the location data of the given Node + * @param result The node that will have its location data mutated + * @param childRange The child node range used to expand location + */ + fixParentLocation(result, childRange) { + if (childRange[0] < result.range[0]) { + result.range[0] = childRange[0]; + result.loc.start = (0, node_utils_1.getLineAndCharacterFor)(result.range[0], this.ast); + } + if (childRange[1] > result.range[1]) { + result.range[1] = childRange[1]; + result.loc.end = (0, node_utils_1.getLineAndCharacterFor)(result.range[1], this.ast); + } + } + /** + * Converts a TypeScript node into an ESTree node. + * The core of the conversion logic: + * Identify and convert each relevant TypeScript SyntaxKind + * @returns the converted ESTree node + */ + convertNode(node, parent) { + switch (node.kind) { + case SyntaxKind.SourceFile: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Program, + range: [node.getStart(this.ast), node.endOfFileToken.end], + body: this.convertBodyExpressions(node.statements, node), + comments: undefined, + sourceType: node.externalModuleIndicator ? 'module' : 'script', + tokens: undefined, + }); + } + case SyntaxKind.Block: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.BlockStatement, + body: this.convertBodyExpressions(node.statements, node), + }); + } + case SyntaxKind.Identifier: { + if ((0, node_utils_1.isThisInTypeQuery)(node)) { + // special case for `typeof this.foo` - TS emits an Identifier for `this` + // but we want to treat it as a ThisExpression for consistency + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ThisExpression, + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Identifier, + decorators: [], + name: node.text, + optional: false, + typeAnnotation: undefined, + }); + } + case SyntaxKind.PrivateIdentifier: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.PrivateIdentifier, + // typescript includes the `#` in the text + name: node.text.slice(1), + }); + } + case SyntaxKind.WithStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.WithStatement, + body: this.convertChild(node.statement), + object: this.convertChild(node.expression), + }); + // Control Flow + case SyntaxKind.ReturnStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ReturnStatement, + argument: this.convertChild(node.expression), + }); + case SyntaxKind.LabeledStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.LabeledStatement, + body: this.convertChild(node.statement), + label: this.convertChild(node.label), + }); + case SyntaxKind.ContinueStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ContinueStatement, + label: this.convertChild(node.label), + }); + case SyntaxKind.BreakStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.BreakStatement, + label: this.convertChild(node.label), + }); + // Choice + case SyntaxKind.IfStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.IfStatement, + alternate: this.convertChild(node.elseStatement), + consequent: this.convertChild(node.thenStatement), + test: this.convertChild(node.expression), + }); + case SyntaxKind.SwitchStatement: + if (node.caseBlock.clauses.filter(switchCase => switchCase.kind === SyntaxKind.DefaultClause).length > 1) { + this.#throwError(node, "A 'default' clause cannot appear more than once in a 'switch' statement."); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.SwitchStatement, + cases: this.convertChildren(node.caseBlock.clauses), + discriminant: this.convertChild(node.expression), + }); + case SyntaxKind.CaseClause: + case SyntaxKind.DefaultClause: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.SwitchCase, + // expression is present in case only + consequent: this.convertChildren(node.statements), + test: node.kind === SyntaxKind.CaseClause + ? this.convertChild(node.expression) + : null, + }); + // Exceptions + case SyntaxKind.ThrowStatement: + if (node.expression.end === node.expression.pos) { + this.#throwUnlessAllowInvalidAST(node, 'A throw statement must throw an expression.'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ThrowStatement, + argument: this.convertChild(node.expression), + }); + case SyntaxKind.TryStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TryStatement, + block: this.convertChild(node.tryBlock), + finalizer: this.convertChild(node.finallyBlock), + handler: this.convertChild(node.catchClause), + }); + case SyntaxKind.CatchClause: + if (node.variableDeclaration?.initializer) { + this.#throwError(node.variableDeclaration.initializer, 'Catch clause variable cannot have an initializer.'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.CatchClause, + body: this.convertChild(node.block), + param: node.variableDeclaration + ? this.convertBindingNameWithTypeAnnotation(node.variableDeclaration.name, node.variableDeclaration.type) + : null, + }); + // Loops + case SyntaxKind.WhileStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.WhileStatement, + body: this.convertChild(node.statement), + test: this.convertChild(node.expression), + }); + /** + * Unlike other parsers, TypeScript calls a "DoWhileStatement" + * a "DoStatement" + */ + case SyntaxKind.DoStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.DoWhileStatement, + body: this.convertChild(node.statement), + test: this.convertChild(node.expression), + }); + case SyntaxKind.ForStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ForStatement, + body: this.convertChild(node.statement), + init: this.convertChild(node.initializer), + test: this.convertChild(node.condition), + update: this.convertChild(node.incrementor), + }); + case SyntaxKind.ForInStatement: + this.#checkForStatementDeclaration(node.initializer, node.kind); + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ForInStatement, + body: this.convertChild(node.statement), + left: this.convertPattern(node.initializer), + right: this.convertChild(node.expression), + }); + case SyntaxKind.ForOfStatement: { + this.#checkForStatementDeclaration(node.initializer, node.kind); + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ForOfStatement, + await: Boolean(node.awaitModifier && + node.awaitModifier.kind === SyntaxKind.AwaitKeyword), + body: this.convertChild(node.statement), + left: this.convertPattern(node.initializer), + right: this.convertChild(node.expression), + }); + } + // Declarations + case SyntaxKind.FunctionDeclaration: { + const isDeclare = (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node); + const isAsync = (0, node_utils_1.hasModifier)(SyntaxKind.AsyncKeyword, node); + const isGenerator = !!node.asteriskToken; + if (isDeclare) { + if (node.body) { + this.#throwError(node, 'An implementation cannot be declared in ambient contexts.'); + } + else if (isAsync) { + this.#throwError(node, "'async' modifier cannot be used in an ambient context."); + } + else if (isGenerator) { + this.#throwError(node, 'Generators are not allowed in an ambient context.'); + } + } + else if (!node.body && isGenerator) { + this.#throwError(node, 'A function signature cannot be declared as a generator.'); + } + const result = this.createNode(node, { + // declare implies no body due to the invariant above + type: !node.body + ? ts_estree_1.AST_NODE_TYPES.TSDeclareFunction + : ts_estree_1.AST_NODE_TYPES.FunctionDeclaration, + async: isAsync, + body: this.convertChild(node.body) || undefined, + declare: isDeclare, + expression: false, + generator: isGenerator, + id: this.convertChild(node.name), + params: this.convertParameters(node.parameters), + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + return this.fixExports(node, result); + } + case SyntaxKind.VariableDeclaration: { + const definite = !!node.exclamationToken; + const init = this.convertChild(node.initializer); + const id = this.convertBindingNameWithTypeAnnotation(node.name, node.type, node); + if (definite) { + if (init) { + this.#throwError(node, 'Declarations with initializers cannot also have definite assignment assertions.'); + } + else if (id.type !== ts_estree_1.AST_NODE_TYPES.Identifier || + !id.typeAnnotation) { + this.#throwError(node, 'Declarations with definite assignment assertions must also have type annotations.'); + } + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.VariableDeclarator, + definite, + id, + init, + }); + } + case SyntaxKind.VariableStatement: { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.VariableDeclaration, + declarations: this.convertChildren(node.declarationList.declarations), + declare: (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node), + kind: (0, node_utils_1.getDeclarationKind)(node.declarationList), + }); + if (!result.declarations.length) { + this.#throwUnlessAllowInvalidAST(node, 'A variable declaration list must have at least one variable declarator.'); + } + if (result.kind === 'using' || result.kind === 'await using') { + node.declarationList.declarations.forEach((declaration, i) => { + if (result.declarations[i].init == null) { + this.#throwError(declaration, `'${result.kind}' declarations must be initialized.`); + } + if (result.declarations[i].id.type !== ts_estree_1.AST_NODE_TYPES.Identifier) { + this.#throwError(declaration.name, `'${result.kind}' declarations may not have binding patterns.`); + } + }); + } + // Definite assignment only allowed for non-declare let and var + if (result.declare || + ['await using', 'const', 'using'].includes(result.kind)) { + node.declarationList.declarations.forEach((declaration, i) => { + if (result.declarations[i].definite) { + this.#throwError(declaration, `A definite assignment assertion '!' is not permitted in this context.`); + } + }); + } + if (result.declare) { + node.declarationList.declarations.forEach((declaration, i) => { + if (result.declarations[i].init && + (['let', 'var'].includes(result.kind) || + result.declarations[i].id.typeAnnotation)) { + this.#throwError(declaration, `Initializers are not permitted in ambient contexts.`); + } + }); + // Theoretically, only certain initializers are allowed for declare const, + // (TS1254: A 'const' initializer in an ambient context must be a string + // or numeric literal or literal enum reference.) but we just allow + // all expressions + } + // Note! No-declare does not mean the variable is not ambient, because + // it can be further nested in other declare contexts. Therefore we cannot + // check for const initializers. + /** + * Semantically, decorators are not allowed on variable declarations, + * Pre 4.8 TS would include them in the AST, so we did as well. + * However as of 4.8 TS no longer includes it (as it is, well, invalid). + * + * So for consistency across versions, we no longer include it either. + */ + return this.fixExports(node, result); + } + // mostly for for-of, for-in + case SyntaxKind.VariableDeclarationList: { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.VariableDeclaration, + declarations: this.convertChildren(node.declarations), + declare: false, + kind: (0, node_utils_1.getDeclarationKind)(node), + }); + if (result.kind === 'using' || result.kind === 'await using') { + node.declarations.forEach((declaration, i) => { + if (result.declarations[i].init != null) { + this.#throwError(declaration, `'${result.kind}' declarations may not be initialized in for statement.`); + } + if (result.declarations[i].id.type !== ts_estree_1.AST_NODE_TYPES.Identifier) { + this.#throwError(declaration.name, `'${result.kind}' declarations may not have binding patterns.`); + } + }); + } + return result; + } + // Expressions + case SyntaxKind.ExpressionStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ExpressionStatement, + directive: undefined, + expression: this.convertChild(node.expression), + }); + case SyntaxKind.ThisKeyword: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ThisExpression, + }); + case SyntaxKind.ArrayLiteralExpression: { + // TypeScript uses ArrayLiteralExpression in destructuring assignment, too + if (this.allowPattern) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ArrayPattern, + decorators: [], + elements: node.elements.map(el => this.convertPattern(el)), + optional: false, + typeAnnotation: undefined, + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ArrayExpression, + elements: this.convertChildren(node.elements), + }); + } + case SyntaxKind.ObjectLiteralExpression: { + // TypeScript uses ObjectLiteralExpression in destructuring assignment, too + if (this.allowPattern) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ObjectPattern, + decorators: [], + optional: false, + properties: node.properties.map(el => this.convertPattern(el)), + typeAnnotation: undefined, + }); + } + const properties = []; + for (const property of node.properties) { + if ((property.kind === SyntaxKind.GetAccessor || + property.kind === SyntaxKind.SetAccessor || + property.kind === SyntaxKind.MethodDeclaration) && + !property.body) { + this.#throwUnlessAllowInvalidAST(property.end - 1, "'{' expected."); + } + properties.push(this.convertChild(property)); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ObjectExpression, + properties, + }); + } + case SyntaxKind.PropertyAssignment: { + // eslint-disable-next-line @typescript-eslint/no-deprecated + const { exclamationToken, questionToken } = node; + if (questionToken) { + this.#throwError(questionToken, 'A property assignment cannot have a question token.'); + } + if (exclamationToken) { + this.#throwError(exclamationToken, 'A property assignment cannot have an exclamation token.'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Property, + computed: (0, node_utils_1.isComputedProperty)(node.name), + key: this.convertChild(node.name), + kind: 'init', + method: false, + optional: false, + shorthand: false, + value: this.converter(node.initializer, node, this.allowPattern), + }); + } + case SyntaxKind.ShorthandPropertyAssignment: { + // eslint-disable-next-line @typescript-eslint/no-deprecated + const { exclamationToken, modifiers, questionToken } = node; + if (modifiers) { + this.#throwError(modifiers[0], 'A shorthand property assignment cannot have modifiers.'); + } + if (questionToken) { + this.#throwError(questionToken, 'A shorthand property assignment cannot have a question token.'); + } + if (exclamationToken) { + this.#throwError(exclamationToken, 'A shorthand property assignment cannot have an exclamation token.'); + } + if (node.objectAssignmentInitializer) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Property, + computed: false, + key: this.convertChild(node.name), + kind: 'init', + method: false, + optional: false, + shorthand: true, + value: this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern, + decorators: [], + left: this.convertPattern(node.name), + optional: false, + right: this.convertChild(node.objectAssignmentInitializer), + typeAnnotation: undefined, + }), + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Property, + computed: false, + key: this.convertChild(node.name), + kind: 'init', + method: false, + optional: false, + shorthand: true, + value: this.convertChild(node.name), + }); + } + case SyntaxKind.ComputedPropertyName: + return this.convertChild(node.expression); + case SyntaxKind.PropertyDeclaration: { + const isAbstract = (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node); + if (isAbstract && node.initializer) { + this.#throwError(node.initializer, `Abstract property cannot have an initializer.`); + } + if (node.name.kind === SyntaxKind.StringLiteral && + node.name.text === 'constructor') { + this.#throwError(node.name, "Classes may not have a field named 'constructor'."); + } + const isAccessor = (0, node_utils_1.hasModifier)(SyntaxKind.AccessorKeyword, node); + const type = (() => { + if (isAccessor) { + if (isAbstract) { + return ts_estree_1.AST_NODE_TYPES.TSAbstractAccessorProperty; + } + return ts_estree_1.AST_NODE_TYPES.AccessorProperty; + } + if (isAbstract) { + return ts_estree_1.AST_NODE_TYPES.TSAbstractPropertyDefinition; + } + return ts_estree_1.AST_NODE_TYPES.PropertyDefinition; + })(); + const key = this.convertChild(node.name); + return this.createNode(node, { + type, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + computed: (0, node_utils_1.isComputedProperty)(node.name), + declare: (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node), + decorators: this.convertChildren((0, getModifiers_1.getDecorators)(node) ?? []), + definite: !!node.exclamationToken, + key, + optional: (key.type === ts_estree_1.AST_NODE_TYPES.Literal || + node.name.kind === SyntaxKind.Identifier || + node.name.kind === SyntaxKind.ComputedPropertyName || + node.name.kind === SyntaxKind.PrivateIdentifier) && + !!node.questionToken, + override: (0, node_utils_1.hasModifier)(SyntaxKind.OverrideKeyword, node), + readonly: (0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node), + static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node), + typeAnnotation: node.type && this.convertTypeAnnotation(node.type, node), + value: isAbstract ? null : this.convertChild(node.initializer), + }); + } + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: { + if (node.parent.kind === SyntaxKind.InterfaceDeclaration || + node.parent.kind === SyntaxKind.TypeLiteral) { + return this.convertMethodSignature(node); + } + } + // otherwise, it is a non-type accessor - intentional fallthrough + case SyntaxKind.MethodDeclaration: { + const method = this.createNode(node, { + type: !node.body + ? ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression + : ts_estree_1.AST_NODE_TYPES.FunctionExpression, + range: [node.parameters.pos - 1, node.end], + async: (0, node_utils_1.hasModifier)(SyntaxKind.AsyncKeyword, node), + body: this.convertChild(node.body), + declare: false, + expression: false, // ESTreeNode as ESTreeNode here + generator: !!node.asteriskToken, + id: null, + params: [], + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + if (method.typeParameters) { + this.fixParentLocation(method, method.typeParameters.range); + } + let result; + if (parent.kind === SyntaxKind.ObjectLiteralExpression) { + method.params = this.convertChildren(node.parameters); + result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Property, + computed: (0, node_utils_1.isComputedProperty)(node.name), + key: this.convertChild(node.name), + kind: 'init', + method: node.kind === SyntaxKind.MethodDeclaration, + optional: !!node.questionToken, + shorthand: false, + value: method, + }); + } + else { + // class + /** + * Unlike in object literal methods, class method params can have decorators + */ + method.params = this.convertParameters(node.parameters); + /** + * TypeScript class methods can be defined as "abstract" + */ + const methodDefinitionType = (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node) + ? ts_estree_1.AST_NODE_TYPES.TSAbstractMethodDefinition + : ts_estree_1.AST_NODE_TYPES.MethodDefinition; + result = this.createNode(node, { + type: methodDefinitionType, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + computed: (0, node_utils_1.isComputedProperty)(node.name), + decorators: this.convertChildren((0, getModifiers_1.getDecorators)(node) ?? []), + key: this.convertChild(node.name), + kind: 'method', + optional: !!node.questionToken, + override: (0, node_utils_1.hasModifier)(SyntaxKind.OverrideKeyword, node), + static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node), + value: method, + }); + } + if (node.kind === SyntaxKind.GetAccessor) { + result.kind = 'get'; + } + else if (node.kind === SyntaxKind.SetAccessor) { + result.kind = 'set'; + } + else if (!result.static && + node.name.kind === SyntaxKind.StringLiteral && + node.name.text === 'constructor' && + result.type !== ts_estree_1.AST_NODE_TYPES.Property) { + result.kind = 'constructor'; + } + return result; + } + // TypeScript uses this even for static methods named "constructor" + case SyntaxKind.Constructor: { + const lastModifier = (0, node_utils_1.getLastModifier)(node); + const constructorToken = (lastModifier && (0, node_utils_1.findNextToken)(lastModifier, node, this.ast)) ?? + node.getFirstToken(); + const constructor = this.createNode(node, { + type: !node.body + ? ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression + : ts_estree_1.AST_NODE_TYPES.FunctionExpression, + range: [node.parameters.pos - 1, node.end], + async: false, + body: this.convertChild(node.body), + declare: false, + expression: false, // is not present in ESTreeNode + generator: false, + id: null, + params: this.convertParameters(node.parameters), + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + if (constructor.typeParameters) { + this.fixParentLocation(constructor, constructor.typeParameters.range); + } + const constructorKey = constructorToken.kind === SyntaxKind.StringLiteral + ? this.createNode(constructorToken, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + raw: constructorToken.getText(), + value: 'constructor', + }) + : this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Identifier, + range: [ + constructorToken.getStart(this.ast), + constructorToken.end, + ], + decorators: [], + name: 'constructor', + optional: false, + typeAnnotation: undefined, + }); + const isStatic = (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node); + return this.createNode(node, { + type: (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node) + ? ts_estree_1.AST_NODE_TYPES.TSAbstractMethodDefinition + : ts_estree_1.AST_NODE_TYPES.MethodDefinition, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + computed: false, + decorators: [], + key: constructorKey, + kind: isStatic ? 'method' : 'constructor', + optional: false, + override: false, + static: isStatic, + value: constructor, + }); + } + case SyntaxKind.FunctionExpression: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.FunctionExpression, + async: (0, node_utils_1.hasModifier)(SyntaxKind.AsyncKeyword, node), + body: this.convertChild(node.body), + declare: false, + expression: false, + generator: !!node.asteriskToken, + id: this.convertChild(node.name), + params: this.convertParameters(node.parameters), + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + } + case SyntaxKind.SuperKeyword: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Super, + }); + case SyntaxKind.ArrayBindingPattern: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ArrayPattern, + decorators: [], + elements: node.elements.map(el => this.convertPattern(el)), + optional: false, + typeAnnotation: undefined, + }); + // occurs with missing array elements like [,] + case SyntaxKind.OmittedExpression: + return null; + case SyntaxKind.ObjectBindingPattern: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ObjectPattern, + decorators: [], + optional: false, + properties: node.elements.map(el => this.convertPattern(el)), + typeAnnotation: undefined, + }); + case SyntaxKind.BindingElement: { + if (parent.kind === SyntaxKind.ArrayBindingPattern) { + const arrayItem = this.convertChild(node.name, parent); + if (node.initializer) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern, + decorators: [], + left: arrayItem, + optional: false, + right: this.convertChild(node.initializer), + typeAnnotation: undefined, + }); + } + if (node.dotDotDotToken) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.RestElement, + argument: arrayItem, + decorators: [], + optional: false, + typeAnnotation: undefined, + value: undefined, + }); + } + return arrayItem; + } + let result; + if (node.dotDotDotToken) { + result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.RestElement, + argument: this.convertChild(node.propertyName ?? node.name), + decorators: [], + optional: false, + typeAnnotation: undefined, + value: undefined, + }); + } + else { + result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Property, + computed: Boolean(node.propertyName && + node.propertyName.kind === SyntaxKind.ComputedPropertyName), + key: this.convertChild(node.propertyName ?? node.name), + kind: 'init', + method: false, + optional: false, + shorthand: !node.propertyName, + value: this.convertChild(node.name), + }); + } + if (node.initializer) { + result.value = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern, + range: [node.name.getStart(this.ast), node.initializer.end], + decorators: [], + left: this.convertChild(node.name), + optional: false, + right: this.convertChild(node.initializer), + typeAnnotation: undefined, + }); + } + return result; + } + case SyntaxKind.ArrowFunction: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ArrowFunctionExpression, + async: (0, node_utils_1.hasModifier)(SyntaxKind.AsyncKeyword, node), + body: this.convertChild(node.body), + expression: node.body.kind !== SyntaxKind.Block, + generator: false, + id: null, + params: this.convertParameters(node.parameters), + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + } + case SyntaxKind.YieldExpression: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.YieldExpression, + argument: this.convertChild(node.expression), + delegate: !!node.asteriskToken, + }); + case SyntaxKind.AwaitExpression: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.AwaitExpression, + argument: this.convertChild(node.expression), + }); + // Template Literals + case SyntaxKind.NoSubstitutionTemplateLiteral: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TemplateLiteral, + expressions: [], + quasis: [ + this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TemplateElement, + tail: true, + value: { + cooked: node.text, + raw: this.ast.text.slice(node.getStart(this.ast) + 1, node.end - 1), + }, + }), + ], + }); + case SyntaxKind.TemplateExpression: { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TemplateLiteral, + expressions: [], + quasis: [this.convertChild(node.head)], + }); + node.templateSpans.forEach(templateSpan => { + result.expressions.push(this.convertChild(templateSpan.expression)); + result.quasis.push(this.convertChild(templateSpan.literal)); + }); + return result; + } + case SyntaxKind.TaggedTemplateExpression: { + if (node.tag.flags & ts.NodeFlags.OptionalChain) { + this.#throwError(node, 'Tagged template expressions are not permitted in an optional chain.'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TaggedTemplateExpression, + quasi: this.convertChild(node.template), + tag: this.convertChild(node.tag), + typeArguments: node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node), + }); + } + case SyntaxKind.TemplateHead: + case SyntaxKind.TemplateMiddle: + case SyntaxKind.TemplateTail: { + const tail = node.kind === SyntaxKind.TemplateTail; + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TemplateElement, + tail, + value: { + cooked: node.text, + raw: this.ast.text.slice(node.getStart(this.ast) + 1, node.end - (tail ? 1 : 2)), + }, + }); + } + // Patterns + case SyntaxKind.SpreadAssignment: + case SyntaxKind.SpreadElement: { + if (this.allowPattern) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.RestElement, + argument: this.convertPattern(node.expression), + decorators: [], + optional: false, + typeAnnotation: undefined, + value: undefined, + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.SpreadElement, + argument: this.convertChild(node.expression), + }); + } + case SyntaxKind.Parameter: { + let parameter; + let result; + if (node.dotDotDotToken) { + parameter = result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.RestElement, + argument: this.convertChild(node.name), + decorators: [], + optional: false, + typeAnnotation: undefined, + value: undefined, + }); + } + else if (node.initializer) { + parameter = this.convertChild(node.name); + result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern, + range: [node.name.getStart(this.ast), node.initializer.end], + decorators: [], + left: parameter, + optional: false, + right: this.convertChild(node.initializer), + typeAnnotation: undefined, + }); + const modifiers = (0, getModifiers_1.getModifiers)(node); + if (modifiers) { + // AssignmentPattern should not contain modifiers in range + result.range[0] = parameter.range[0]; + result.loc = (0, node_utils_1.getLocFor)(result.range, this.ast); + } + } + else { + parameter = result = this.convertChild(node.name, parent); + } + if (node.type) { + parameter.typeAnnotation = this.convertTypeAnnotation(node.type, node); + this.fixParentLocation(parameter, parameter.typeAnnotation.range); + } + if (node.questionToken) { + if (node.questionToken.end > parameter.range[1]) { + parameter.range[1] = node.questionToken.end; + parameter.loc.end = (0, node_utils_1.getLineAndCharacterFor)(parameter.range[1], this.ast); + } + parameter.optional = true; + } + const modifiers = (0, getModifiers_1.getModifiers)(node); + if (modifiers) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSParameterProperty, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + decorators: [], + override: (0, node_utils_1.hasModifier)(SyntaxKind.OverrideKeyword, node), + parameter: result, + readonly: (0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node), + static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node), + }); + } + return result; + } + // Classes + case SyntaxKind.ClassDeclaration: + if (!node.name && + (!(0, node_utils_1.hasModifier)(ts.SyntaxKind.ExportKeyword, node) || + !(0, node_utils_1.hasModifier)(ts.SyntaxKind.DefaultKeyword, node))) { + this.#throwUnlessAllowInvalidAST(node, "A class declaration without the 'default' modifier must have a name."); + } + /* intentional fallthrough */ + case SyntaxKind.ClassExpression: { + const heritageClauses = node.heritageClauses ?? []; + const classNodeType = node.kind === SyntaxKind.ClassDeclaration + ? ts_estree_1.AST_NODE_TYPES.ClassDeclaration + : ts_estree_1.AST_NODE_TYPES.ClassExpression; + let extendsClause; + let implementsClause; + for (const heritageClause of heritageClauses) { + const { token, types } = heritageClause; + if (types.length === 0) { + this.#throwUnlessAllowInvalidAST(heritageClause, `'${ts.tokenToString(token)}' list cannot be empty.`); + } + if (token === SyntaxKind.ExtendsKeyword) { + if (extendsClause) { + this.#throwUnlessAllowInvalidAST(heritageClause, "'extends' clause already seen."); + } + if (implementsClause) { + this.#throwUnlessAllowInvalidAST(heritageClause, "'extends' clause must precede 'implements' clause."); + } + if (types.length > 1) { + this.#throwUnlessAllowInvalidAST(types[1], 'Classes can only extend a single class.'); + } + extendsClause ??= heritageClause; + } + else if (token === SyntaxKind.ImplementsKeyword) { + if (implementsClause) { + this.#throwUnlessAllowInvalidAST(heritageClause, "'implements' clause already seen."); + } + implementsClause ??= heritageClause; + } + } + const result = this.createNode(node, { + type: classNodeType, + abstract: (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node), + body: this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ClassBody, + range: [node.members.pos - 1, node.end], + body: this.convertChildren(node.members.filter(node_utils_1.isESTreeClassMember)), + }), + declare: (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node), + decorators: this.convertChildren((0, getModifiers_1.getDecorators)(node) ?? []), + id: this.convertChild(node.name), + implements: this.convertChildren(implementsClause?.types ?? []), + superClass: extendsClause?.types[0] + ? this.convertChild(extendsClause.types[0].expression) + : null, + superTypeArguments: undefined, + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + if (extendsClause?.types[0]?.typeArguments) { + result.superTypeArguments = + this.convertTypeArgumentsToTypeParameterInstantiation(extendsClause.types[0].typeArguments, extendsClause.types[0]); + } + return this.fixExports(node, result); + } + // Modules + case SyntaxKind.ModuleBlock: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSModuleBlock, + body: this.convertBodyExpressions(node.statements, node), + }); + case SyntaxKind.ImportDeclaration: { + this.assertModuleSpecifier(node, false); + const result = this.createNode(node, this.#withDeprecatedAliasGetter({ + type: ts_estree_1.AST_NODE_TYPES.ImportDeclaration, + attributes: this.convertImportAttributes(node), + importKind: 'value', + source: this.convertChild(node.moduleSpecifier), + specifiers: [], + }, 'assertions', 'attributes', true)); + if (node.importClause) { + // TODO(bradzacher) swap to `phaseModifier` once we add support for `import defer` + // https://github.com/estree/estree/issues/328 + // eslint-disable-next-line @typescript-eslint/no-deprecated + if (node.importClause.isTypeOnly) { + result.importKind = 'type'; + } + if (node.importClause.name) { + result.specifiers.push(this.convertChild(node.importClause)); + } + if (node.importClause.namedBindings) { + switch (node.importClause.namedBindings.kind) { + case SyntaxKind.NamespaceImport: + result.specifiers.push(this.convertChild(node.importClause.namedBindings)); + break; + case SyntaxKind.NamedImports: + result.specifiers.push(...this.convertChildren(node.importClause.namedBindings.elements)); + break; + } + } + } + return result; + } + case SyntaxKind.NamespaceImport: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ImportNamespaceSpecifier, + local: this.convertChild(node.name), + }); + case SyntaxKind.ImportSpecifier: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ImportSpecifier, + imported: this.convertChild(node.propertyName ?? node.name), + importKind: node.isTypeOnly ? 'type' : 'value', + local: this.convertChild(node.name), + }); + case SyntaxKind.ImportClause: { + const local = this.convertChild(node.name); + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ImportDefaultSpecifier, + range: local.range, + local, + }); + } + case SyntaxKind.ExportDeclaration: { + if (node.exportClause?.kind === SyntaxKind.NamedExports) { + this.assertModuleSpecifier(node, true); + return this.createNode(node, this.#withDeprecatedAliasGetter({ + type: ts_estree_1.AST_NODE_TYPES.ExportNamedDeclaration, + attributes: this.convertImportAttributes(node), + declaration: null, + exportKind: node.isTypeOnly ? 'type' : 'value', + source: this.convertChild(node.moduleSpecifier), + specifiers: this.convertChildren(node.exportClause.elements, node), + }, 'assertions', 'attributes', true)); + } + this.assertModuleSpecifier(node, false); + return this.createNode(node, this.#withDeprecatedAliasGetter({ + type: ts_estree_1.AST_NODE_TYPES.ExportAllDeclaration, + attributes: this.convertImportAttributes(node), + exported: node.exportClause?.kind === SyntaxKind.NamespaceExport + ? this.convertChild(node.exportClause.name) + : null, + exportKind: node.isTypeOnly ? 'type' : 'value', + source: this.convertChild(node.moduleSpecifier), + }, 'assertions', 'attributes', true)); + } + case SyntaxKind.ExportSpecifier: { + const local = node.propertyName ?? node.name; + if (local.kind === SyntaxKind.StringLiteral && + parent.kind === SyntaxKind.ExportDeclaration && + parent.moduleSpecifier?.kind !== SyntaxKind.StringLiteral) { + this.#throwError(local, 'A string literal cannot be used as a local exported binding without `from`.'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ExportSpecifier, + exported: this.convertChild(node.name), + exportKind: node.isTypeOnly ? 'type' : 'value', + local: this.convertChild(local), + }); + } + case SyntaxKind.ExportAssignment: + if (node.isExportEquals) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSExportAssignment, + expression: this.convertChild(node.expression), + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ExportDefaultDeclaration, + declaration: this.convertChild(node.expression), + exportKind: 'value', + }); + // Unary Operations + case SyntaxKind.PrefixUnaryExpression: + case SyntaxKind.PostfixUnaryExpression: { + const operator = (0, node_utils_1.getTextForTokenKind)(node.operator); + /** + * ESTree uses UpdateExpression for ++/-- + */ + if (operator === '++' || operator === '--') { + if (!(0, node_utils_1.isValidAssignmentTarget)(node.operand)) { + this.#throwUnlessAllowInvalidAST(node.operand, 'Invalid left-hand side expression in unary operation'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.UpdateExpression, + argument: this.convertChild(node.operand), + operator, + prefix: node.kind === SyntaxKind.PrefixUnaryExpression, + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.UnaryExpression, + argument: this.convertChild(node.operand), + operator, + prefix: node.kind === SyntaxKind.PrefixUnaryExpression, + }); + } + case SyntaxKind.DeleteExpression: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.UnaryExpression, + argument: this.convertChild(node.expression), + operator: 'delete', + prefix: true, + }); + case SyntaxKind.VoidExpression: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.UnaryExpression, + argument: this.convertChild(node.expression), + operator: 'void', + prefix: true, + }); + case SyntaxKind.TypeOfExpression: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.UnaryExpression, + argument: this.convertChild(node.expression), + operator: 'typeof', + prefix: true, + }); + case SyntaxKind.TypeOperator: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeOperator, + operator: (0, node_utils_1.getTextForTokenKind)(node.operator), + typeAnnotation: this.convertChild(node.type), + }); + // Binary Operations + case SyntaxKind.BinaryExpression: { + // TypeScript uses BinaryExpression for sequences as well + if ((0, node_utils_1.isComma)(node.operatorToken)) { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.SequenceExpression, + expressions: [], + }); + const left = this.convertChild(node.left); + if (left.type === ts_estree_1.AST_NODE_TYPES.SequenceExpression && + node.left.kind !== SyntaxKind.ParenthesizedExpression) { + result.expressions.push(...left.expressions); + } + else { + result.expressions.push(left); + } + result.expressions.push(this.convertChild(node.right)); + return result; + } + const expressionType = (0, node_utils_1.getBinaryExpressionType)(node.operatorToken); + if (this.allowPattern && + expressionType.type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern, + decorators: [], + left: this.convertPattern(node.left, node), + optional: false, + right: this.convertChild(node.right), + typeAnnotation: undefined, + }); + } + return this.createNode(node, { + ...expressionType, + left: this.converter(node.left, node, expressionType.type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression), + right: this.convertChild(node.right), + }); + } + case SyntaxKind.PropertyAccessExpression: { + const object = this.convertChild(node.expression); + const property = this.convertChild(node.name); + const computed = false; + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.MemberExpression, + computed, + object, + optional: node.questionDotToken != null, + property, + }); + return this.convertChainExpression(result, node); + } + case SyntaxKind.ElementAccessExpression: { + const object = this.convertChild(node.expression); + const property = this.convertChild(node.argumentExpression); + const computed = true; + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.MemberExpression, + computed, + object, + optional: node.questionDotToken != null, + property, + }); + return this.convertChainExpression(result, node); + } + case SyntaxKind.CallExpression: { + if (node.expression.kind === SyntaxKind.ImportKeyword) { + if (node.arguments.length !== 1 && node.arguments.length !== 2) { + this.#throwUnlessAllowInvalidAST(node.arguments[2] ?? node, 'Dynamic import requires exactly one or two arguments.'); + } + return this.createNode(node, this.#withDeprecatedAliasGetter({ + type: ts_estree_1.AST_NODE_TYPES.ImportExpression, + options: node.arguments[1] + ? this.convertChild(node.arguments[1]) + : null, + source: this.convertChild(node.arguments[0]), + }, 'attributes', 'options', true)); + } + const callee = this.convertChild(node.expression); + const args = this.convertChildren(node.arguments); + const typeArguments = node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node); + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.CallExpression, + arguments: args, + callee, + optional: node.questionDotToken != null, + typeArguments, + }); + return this.convertChainExpression(result, node); + } + case SyntaxKind.NewExpression: { + const typeArguments = node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node); + // NOTE - NewExpression cannot have an optional chain in it + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.NewExpression, + arguments: this.convertChildren(node.arguments ?? []), + callee: this.convertChild(node.expression), + typeArguments, + }); + } + case SyntaxKind.ConditionalExpression: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ConditionalExpression, + alternate: this.convertChild(node.whenFalse), + consequent: this.convertChild(node.whenTrue), + test: this.convertChild(node.condition), + }); + case SyntaxKind.MetaProperty: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.MetaProperty, + meta: this.createNode( + // TODO: do we really want to convert it to Token? + node.getFirstToken(), { + type: ts_estree_1.AST_NODE_TYPES.Identifier, + decorators: [], + name: (0, node_utils_1.getTextForTokenKind)(node.keywordToken), + optional: false, + typeAnnotation: undefined, + }), + property: this.convertChild(node.name), + }); + } + case SyntaxKind.Decorator: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Decorator, + expression: this.convertChild(node.expression), + }); + } + // Literals + case SyntaxKind.StringLiteral: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + raw: node.getText(), + value: parent.kind === SyntaxKind.JsxAttribute + ? (0, node_utils_1.unescapeStringLiteralText)(node.text) + : node.text, + }); + } + case SyntaxKind.NumericLiteral: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + raw: node.getText(), + value: Number(node.text), + }); + } + case SyntaxKind.BigIntLiteral: { + const range = (0, node_utils_1.getRange)(node, this.ast); + const rawValue = this.ast.text.slice(range[0], range[1]); + const bigint = rawValue + // remove suffix `n` + .slice(0, -1) + // `BigInt` doesn't accept numeric separator + // and `bigint` property should not include numeric separator + .replaceAll('_', ''); + const value = typeof BigInt !== 'undefined' ? BigInt(bigint) : null; + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + range, + bigint: value == null ? bigint : String(value), + raw: rawValue, + value, + }); + } + case SyntaxKind.RegularExpressionLiteral: { + const pattern = node.text.slice(1, node.text.lastIndexOf('/')); + const flags = node.text.slice(node.text.lastIndexOf('/') + 1); + let regex = null; + try { + regex = new RegExp(pattern, flags); + } + catch { + // Intentionally blank, so regex stays null + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + raw: node.text, + regex: { + flags, + pattern, + }, + value: regex, + }); + } + case SyntaxKind.TrueKeyword: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + raw: 'true', + value: true, + }); + case SyntaxKind.FalseKeyword: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + raw: 'false', + value: false, + }); + case SyntaxKind.NullKeyword: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + raw: 'null', + value: null, + }); + } + case SyntaxKind.EmptyStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.EmptyStatement, + }); + case SyntaxKind.DebuggerStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.DebuggerStatement, + }); + // JSX + case SyntaxKind.JsxElement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXElement, + children: this.convertChildren(node.children), + closingElement: this.convertChild(node.closingElement), + openingElement: this.convertChild(node.openingElement), + }); + case SyntaxKind.JsxFragment: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXFragment, + children: this.convertChildren(node.children), + closingFragment: this.convertChild(node.closingFragment), + openingFragment: this.convertChild(node.openingFragment), + }); + case SyntaxKind.JsxSelfClosingElement: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXElement, + /** + * Convert SyntaxKind.JsxSelfClosingElement to SyntaxKind.JsxOpeningElement, + * TypeScript does not seem to have the idea of openingElement when tag is self-closing + */ + children: [], + closingElement: null, + openingElement: this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXOpeningElement, + range: (0, node_utils_1.getRange)(node, this.ast), + attributes: this.convertChildren(node.attributes.properties), + name: this.convertJSXTagName(node.tagName, node), + selfClosing: true, + typeArguments: node.typeArguments + ? this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node) + : undefined, + }), + }); + } + case SyntaxKind.JsxOpeningElement: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXOpeningElement, + attributes: this.convertChildren(node.attributes.properties), + name: this.convertJSXTagName(node.tagName, node), + selfClosing: false, + typeArguments: node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node), + }); + } + case SyntaxKind.JsxClosingElement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXClosingElement, + name: this.convertJSXTagName(node.tagName, node), + }); + case SyntaxKind.JsxOpeningFragment: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXOpeningFragment, + }); + case SyntaxKind.JsxClosingFragment: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXClosingFragment, + }); + case SyntaxKind.JsxExpression: { + const expression = node.expression + ? this.convertChild(node.expression) + : this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXEmptyExpression, + range: [node.getStart(this.ast) + 1, node.getEnd() - 1], + }); + if (node.dotDotDotToken) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXSpreadChild, + expression, + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXExpressionContainer, + expression, + }); + } + case SyntaxKind.JsxAttribute: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXAttribute, + name: this.convertJSXNamespaceOrIdentifier(node.name), + value: this.convertChild(node.initializer), + }); + } + case SyntaxKind.JsxText: { + const start = node.getFullStart(); + const end = node.getEnd(); + const text = this.ast.text.slice(start, end); + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXText, + range: [start, end], + raw: text, + value: (0, node_utils_1.unescapeStringLiteralText)(text), + }); + } + case SyntaxKind.JsxSpreadAttribute: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXSpreadAttribute, + argument: this.convertChild(node.expression), + }); + case SyntaxKind.QualifiedName: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSQualifiedName, + left: this.convertChild(node.left), + right: this.convertChild(node.right), + }); + } + // TypeScript specific + case SyntaxKind.TypeReference: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeReference, + typeArguments: node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node), + typeName: this.convertChild(node.typeName), + }); + case SyntaxKind.TypeParameter: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeParameter, + const: (0, node_utils_1.hasModifier)(SyntaxKind.ConstKeyword, node), + constraint: node.constraint && this.convertChild(node.constraint), + default: node.default ? this.convertChild(node.default) : undefined, + in: (0, node_utils_1.hasModifier)(SyntaxKind.InKeyword, node), + name: this.convertChild(node.name), + out: (0, node_utils_1.hasModifier)(SyntaxKind.OutKeyword, node), + }); + } + case SyntaxKind.ThisType: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSThisType, + }); + case SyntaxKind.AnyKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.BooleanKeyword: + case SyntaxKind.NeverKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.ObjectKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.SymbolKeyword: + case SyntaxKind.UnknownKeyword: + case SyntaxKind.VoidKeyword: + case SyntaxKind.UndefinedKeyword: + case SyntaxKind.IntrinsicKeyword: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES[`TS${SyntaxKind[node.kind]}`], + }); + } + case SyntaxKind.NonNullExpression: { + const nnExpr = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSNonNullExpression, + expression: this.convertChild(node.expression), + }); + return this.convertChainExpression(nnExpr, node); + } + case SyntaxKind.TypeLiteral: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeLiteral, + members: this.convertChildren(node.members), + }); + } + case SyntaxKind.ArrayType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSArrayType, + elementType: this.convertChild(node.elementType), + }); + } + case SyntaxKind.IndexedAccessType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSIndexedAccessType, + indexType: this.convertChild(node.indexType), + objectType: this.convertChild(node.objectType), + }); + } + case SyntaxKind.ConditionalType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSConditionalType, + checkType: this.convertChild(node.checkType), + extendsType: this.convertChild(node.extendsType), + falseType: this.convertChild(node.falseType), + trueType: this.convertChild(node.trueType), + }); + } + case SyntaxKind.TypeQuery: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeQuery, + exprName: this.convertChild(node.exprName), + typeArguments: node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node), + }); + case SyntaxKind.MappedType: { + if (node.members && node.members.length > 0) { + this.#throwUnlessAllowInvalidAST(node.members[0], 'A mapped type may not declare properties or methods.'); + } + return this.createNode(node, this.#withDeprecatedGetter({ + type: ts_estree_1.AST_NODE_TYPES.TSMappedType, + constraint: this.convertChild(node.typeParameter.constraint), + key: this.convertChild(node.typeParameter.name), + nameType: this.convertChild(node.nameType) ?? null, + optional: node.questionToken + ? node.questionToken.kind === SyntaxKind.QuestionToken || + (0, node_utils_1.getTextForTokenKind)(node.questionToken.kind) + : false, + readonly: node.readonlyToken + ? node.readonlyToken.kind === SyntaxKind.ReadonlyKeyword || + (0, node_utils_1.getTextForTokenKind)(node.readonlyToken.kind) + : undefined, + typeAnnotation: node.type && this.convertChild(node.type), + }, 'typeParameter', "'constraint' and 'key'", this.convertChild(node.typeParameter))); + } + case SyntaxKind.ParenthesizedExpression: + return this.convertChild(node.expression, parent); + case SyntaxKind.TypeAliasDeclaration: { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeAliasDeclaration, + declare: (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node), + id: this.convertChild(node.name), + typeAnnotation: this.convertChild(node.type), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + return this.fixExports(node, result); + } + case SyntaxKind.MethodSignature: { + return this.convertMethodSignature(node); + } + case SyntaxKind.PropertySignature: { + // eslint-disable-next-line @typescript-eslint/no-deprecated + const { initializer } = node; + if (initializer) { + this.#throwError(initializer, 'A property signature cannot have an initializer.'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSPropertySignature, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + computed: (0, node_utils_1.isComputedProperty)(node.name), + key: this.convertChild(node.name), + optional: (0, node_utils_1.isOptional)(node), + readonly: (0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node), + static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node), + typeAnnotation: node.type && this.convertTypeAnnotation(node.type, node), + }); + } + case SyntaxKind.IndexSignature: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSIndexSignature, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + parameters: this.convertChildren(node.parameters), + readonly: (0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node), + static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node), + typeAnnotation: node.type && this.convertTypeAnnotation(node.type, node), + }); + } + case SyntaxKind.ConstructorType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSConstructorType, + abstract: (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node), + params: this.convertParameters(node.parameters), + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + } + case SyntaxKind.FunctionType: { + // eslint-disable-next-line @typescript-eslint/no-deprecated + const { modifiers } = node; + if (modifiers) { + this.#throwError(modifiers[0], 'A function type cannot have modifiers.'); + } + } + // intentional fallthrough + case SyntaxKind.ConstructSignature: + case SyntaxKind.CallSignature: { + const type = node.kind === SyntaxKind.ConstructSignature + ? ts_estree_1.AST_NODE_TYPES.TSConstructSignatureDeclaration + : node.kind === SyntaxKind.CallSignature + ? ts_estree_1.AST_NODE_TYPES.TSCallSignatureDeclaration + : ts_estree_1.AST_NODE_TYPES.TSFunctionType; + return this.createNode(node, { + type, + params: this.convertParameters(node.parameters), + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + } + case SyntaxKind.ExpressionWithTypeArguments: { + const parentKind = parent.kind; + const type = parentKind === SyntaxKind.InterfaceDeclaration + ? ts_estree_1.AST_NODE_TYPES.TSInterfaceHeritage + : parentKind === SyntaxKind.HeritageClause + ? ts_estree_1.AST_NODE_TYPES.TSClassImplements + : ts_estree_1.AST_NODE_TYPES.TSInstantiationExpression; + return this.createNode(node, { + type, + expression: this.convertChild(node.expression), + typeArguments: node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node), + }); + } + case SyntaxKind.InterfaceDeclaration: { + const interfaceHeritageClauses = node.heritageClauses ?? []; + const interfaceExtends = []; + let seenExtendsClause = false; + for (const heritageClause of interfaceHeritageClauses) { + if (heritageClause.token !== SyntaxKind.ExtendsKeyword) { + this.#throwError(heritageClause, heritageClause.token === SyntaxKind.ImplementsKeyword + ? "Interface declaration cannot have 'implements' clause." + : 'Unexpected token.'); + } + if (seenExtendsClause) { + this.#throwError(heritageClause, "'extends' clause already seen."); + } + seenExtendsClause = true; + for (const heritageType of heritageClause.types) { + if (!isEntityNameExpression(heritageType.expression) || + ts.isOptionalChain(heritageType.expression)) { + this.#throwError(heritageType, 'Interface declaration can only extend an identifier/qualified name with optional type arguments.'); + } + interfaceExtends.push(this.convertChild(heritageType, node)); + } + } + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSInterfaceDeclaration, + body: this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSInterfaceBody, + range: [node.members.pos - 1, node.end], + body: this.convertChildren(node.members), + }), + declare: (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node), + extends: interfaceExtends, + id: this.convertChild(node.name), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + return this.fixExports(node, result); + } + case SyntaxKind.TypePredicate: { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypePredicate, + asserts: node.assertsModifier != null, + parameterName: this.convertChild(node.parameterName), + typeAnnotation: null, + }); + /** + * Specific fix for type-guard location data + */ + if (node.type) { + result.typeAnnotation = this.convertTypeAnnotation(node.type, node); + result.typeAnnotation.loc = result.typeAnnotation.typeAnnotation.loc; + result.typeAnnotation.range = + result.typeAnnotation.typeAnnotation.range; + } + return result; + } + case SyntaxKind.ImportType: { + const range = (0, node_utils_1.getRange)(node, this.ast); + if (node.isTypeOf) { + const token = (0, node_utils_1.findNextToken)(node.getFirstToken(), node, this.ast); + range[0] = token.getStart(this.ast); + } + let options = null; + if (node.attributes) { + const value = this.createNode(node.attributes, { + type: ts_estree_1.AST_NODE_TYPES.ObjectExpression, + properties: node.attributes.elements.map(importAttribute => this.createNode(importAttribute, { + type: ts_estree_1.AST_NODE_TYPES.Property, + computed: false, + key: this.convertChild(importAttribute.name), + kind: 'init', + method: false, + optional: false, + shorthand: false, + value: this.convertChild(importAttribute.value), + })), + }); + const commaToken = (0, node_utils_1.findNextToken)(node.argument, node, this.ast); + const openBraceToken = (0, node_utils_1.findNextToken)(commaToken, node, this.ast); + const tokenAfterAttributes = (0, node_utils_1.findNextToken)(node.attributes, node, this.ast); + // Since TS 5.9, there could be a trailing comma, i.e. `{ with: { ... }, }` + const closeBraceToken = tokenAfterAttributes.kind === ts.SyntaxKind.CommaToken + ? (0, node_utils_1.findNextToken)(tokenAfterAttributes, node, this.ast) + : tokenAfterAttributes; + const withOrAssertToken = (0, node_utils_1.findNextToken)(openBraceToken, node, this.ast); + const withOrAssertTokenRange = (0, node_utils_1.getRange)(withOrAssertToken, this.ast); + const withOrAssertName = withOrAssertToken.kind === ts.SyntaxKind.AssertKeyword + ? 'assert' + : 'with'; + options = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ObjectExpression, + range: [openBraceToken.getStart(this.ast), closeBraceToken.end], + properties: [ + this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Property, + range: [withOrAssertTokenRange[0], node.attributes.end], + computed: false, + key: this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Identifier, + range: withOrAssertTokenRange, + decorators: [], + name: withOrAssertName, + optional: false, + typeAnnotation: undefined, + }), + kind: 'init', + method: false, + optional: false, + shorthand: false, + value, + }), + ], + }); + } + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSImportType, + range, + argument: this.convertChild(node.argument), + options, + qualifier: this.convertChild(node.qualifier), + typeArguments: node.typeArguments + ? this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node) + : null, + }); + if (node.isTypeOf) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeQuery, + exprName: result, + typeArguments: undefined, + }); + } + return result; + } + case SyntaxKind.EnumDeclaration: { + const members = this.convertChildren(node.members); + const result = this.createNode(node, this.#withDeprecatedGetter({ + type: ts_estree_1.AST_NODE_TYPES.TSEnumDeclaration, + body: this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSEnumBody, + range: [node.members.pos - 1, node.end], + members, + }), + const: (0, node_utils_1.hasModifier)(SyntaxKind.ConstKeyword, node), + declare: (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node), + id: this.convertChild(node.name), + }, 'members', `'body.members'`, this.convertChildren(node.members))); + return this.fixExports(node, result); + } + case SyntaxKind.EnumMember: { + const computed = node.name.kind === ts.SyntaxKind.ComputedPropertyName; + if (computed) { + this.#throwUnlessAllowInvalidAST(node.name, 'Computed property names are not allowed in enums.'); + } + if (node.name.kind === SyntaxKind.NumericLiteral || + node.name.kind === SyntaxKind.BigIntLiteral) { + this.#throwUnlessAllowInvalidAST(node.name, 'An enum member cannot have a numeric name.'); + } + return this.createNode(node, this.#withDeprecatedGetter({ + type: ts_estree_1.AST_NODE_TYPES.TSEnumMember, + id: this.convertChild(node.name), + initializer: node.initializer && this.convertChild(node.initializer), + }, 'computed', undefined, computed)); + } + case SyntaxKind.ModuleDeclaration: { + let isDeclare = (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node); + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSModuleDeclaration, + ...(() => { + // the constraints checked by this function are syntactically enforced by TS + // the checks mostly exist for type's sake + if (node.flags & ts.NodeFlags.GlobalAugmentation) { + const id = this.convertChild(node.name); + const body = this.convertChild(node.body); + if (body == null || + body.type === ts_estree_1.AST_NODE_TYPES.TSModuleDeclaration) { + this.#throwUnlessAllowInvalidAST(node.body ?? node, 'Expected a valid module body'); + } + if (id.type !== ts_estree_1.AST_NODE_TYPES.Identifier) { + this.#throwUnlessAllowInvalidAST(node.name, 'global module augmentation must have an Identifier id'); + } + return { + body: body, + declare: false, + global: false, + id, + kind: 'global', + }; + } + if (ts.isStringLiteral(node.name)) { + const body = this.convertChild(node.body); + return { + kind: 'module', + ...(body != null ? { body } : {}), + declare: false, + global: false, + id: this.convertChild(node.name), + }; + } + // Nested module declarations are stored in TypeScript as nested tree nodes. + // We "unravel" them here by making our own nested TSQualifiedName, + // with the innermost node's body as the actual node body. + if (node.body == null) { + this.#throwUnlessAllowInvalidAST(node, 'Expected a module body'); + } + if (node.name.kind !== ts.SyntaxKind.Identifier) { + this.#throwUnlessAllowInvalidAST(node.name, '`namespace`s must have an Identifier id'); + } + let name = this.createNode(node.name, { + type: ts_estree_1.AST_NODE_TYPES.Identifier, + range: [node.name.getStart(this.ast), node.name.getEnd()], + decorators: [], + name: node.name.text, + optional: false, + typeAnnotation: undefined, + }); + while (node.body && + ts.isModuleDeclaration(node.body) && + node.body.name) { + node = node.body; + isDeclare ||= (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node); + const nextName = node.name; + const right = this.createNode(nextName, { + type: ts_estree_1.AST_NODE_TYPES.Identifier, + range: [nextName.getStart(this.ast), nextName.getEnd()], + decorators: [], + name: nextName.text, + optional: false, + typeAnnotation: undefined, + }); + name = this.createNode(nextName, { + type: ts_estree_1.AST_NODE_TYPES.TSQualifiedName, + range: [name.range[0], right.range[1]], + left: name, + right, + }); + } + return { + body: this.convertChild(node.body), + declare: false, + global: false, + id: name, + kind: node.flags & ts.NodeFlags.Namespace ? 'namespace' : 'module', + }; + })(), + }); + result.declare = isDeclare; + if (node.flags & ts.NodeFlags.GlobalAugmentation) { + // eslint-disable-next-line @typescript-eslint/no-deprecated + result.global = true; + } + return this.fixExports(node, result); + } + // TypeScript specific types + case SyntaxKind.ParenthesizedType: { + return this.convertChild(node.type); + } + case SyntaxKind.UnionType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSUnionType, + types: this.convertChildren(node.types), + }); + } + case SyntaxKind.IntersectionType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSIntersectionType, + types: this.convertChildren(node.types), + }); + } + case SyntaxKind.AsExpression: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSAsExpression, + expression: this.convertChild(node.expression), + typeAnnotation: this.convertChild(node.type), + }); + } + case SyntaxKind.InferType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSInferType, + typeParameter: this.convertChild(node.typeParameter), + }); + } + case SyntaxKind.LiteralType: { + if (node.literal.kind === SyntaxKind.NullKeyword) { + // 4.0 started nesting null types inside a LiteralType node + // but our AST is designed around the old way of null being a keyword + return this.createNode(node.literal, { + type: ts_estree_1.AST_NODE_TYPES.TSNullKeyword, + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSLiteralType, + literal: this.convertChild(node.literal), + }); + } + case SyntaxKind.TypeAssertionExpression: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeAssertion, + expression: this.convertChild(node.expression), + typeAnnotation: this.convertChild(node.type), + }); + } + case SyntaxKind.ImportEqualsDeclaration: { + return this.fixExports(node, this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSImportEqualsDeclaration, + id: this.convertChild(node.name), + importKind: node.isTypeOnly ? 'type' : 'value', + moduleReference: this.convertChild(node.moduleReference), + })); + } + case SyntaxKind.ExternalModuleReference: { + if (node.expression.kind !== SyntaxKind.StringLiteral) { + this.#throwError(node.expression, 'String literal expected.'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSExternalModuleReference, + expression: this.convertChild(node.expression), + }); + } + case SyntaxKind.NamespaceExportDeclaration: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSNamespaceExportDeclaration, + id: this.convertChild(node.name), + }); + } + case SyntaxKind.AbstractKeyword: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSAbstractKeyword, + }); + } + // Tuple + case SyntaxKind.TupleType: { + const elementTypes = this.convertChildren(node.elements); + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTupleType, + elementTypes, + }); + } + case SyntaxKind.NamedTupleMember: { + const member = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSNamedTupleMember, + elementType: this.convertChild(node.type, node), + label: this.convertChild(node.name, node), + optional: node.questionToken != null, + }); + if (node.dotDotDotToken) { + // adjust the start to account for the "..." + member.range[0] = member.label.range[0]; + member.loc.start = member.label.loc.start; + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSRestType, + typeAnnotation: member, + }); + } + return member; + } + case SyntaxKind.OptionalType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSOptionalType, + typeAnnotation: this.convertChild(node.type), + }); + } + case SyntaxKind.RestType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSRestType, + typeAnnotation: this.convertChild(node.type), + }); + } + // Template Literal Types + case SyntaxKind.TemplateLiteralType: { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTemplateLiteralType, + quasis: [this.convertChild(node.head)], + types: [], + }); + node.templateSpans.forEach(templateSpan => { + result.types.push(this.convertChild(templateSpan.type)); + result.quasis.push(this.convertChild(templateSpan.literal)); + }); + return result; + } + case SyntaxKind.ClassStaticBlockDeclaration: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.StaticBlock, + body: this.convertBodyExpressions(node.body.statements, node), + }); + } + // eslint-disable-next-line @typescript-eslint/no-deprecated + case SyntaxKind.AssertEntry: + case SyntaxKind.ImportAttribute: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ImportAttribute, + key: this.convertChild(node.name), + value: this.convertChild(node.value), + }); + } + case SyntaxKind.SatisfiesExpression: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSSatisfiesExpression, + expression: this.convertChild(node.expression), + typeAnnotation: this.convertChild(node.type), + }); + } + default: + return this.deeplyCopy(node); + } + } + createNode(node, data) { + const result = data; + result.range ??= (0, node_utils_1.getRange)(node, this.ast); + result.loc ??= (0, node_utils_1.getLocFor)(result.range, this.ast); + if (result && this.options.shouldPreserveNodeMaps) { + this.esTreeNodeToTSNodeMap.set(result, node); + } + return result; + } + convertProgram() { + return this.converter(this.ast); + } + /** + * For nodes that are copied directly from the TypeScript AST into + * ESTree mostly as-is. The only difference is the addition of a type + * property instead of a kind property. Recursively copies all children. + */ + deeplyCopy(node) { + if (node.kind === ts.SyntaxKind.JSDocFunctionType) { + this.#throwError(node, 'JSDoc types can only be used inside documentation comments.'); + } + const customType = `TS${SyntaxKind[node.kind]}`; + /** + * If the "errorOnUnknownASTType" option is set to true, throw an error, + * otherwise fallback to just including the unknown type as-is. + */ + if (this.options.errorOnUnknownASTType && !ts_estree_1.AST_NODE_TYPES[customType]) { + throw new Error(`Unknown AST_NODE_TYPE: "${customType}"`); + } + const result = this.createNode(node, { + type: customType, + }); + if ('type' in node) { + result.typeAnnotation = + node.type && 'kind' in node.type && ts.isTypeNode(node.type) + ? this.convertTypeAnnotation(node.type, node) + : null; + } + if ('typeArguments' in node) { + result.typeArguments = + node.typeArguments && 'pos' in node.typeArguments + ? this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node) + : null; + } + if ('typeParameters' in node) { + result.typeParameters = + node.typeParameters && 'pos' in node.typeParameters + ? this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters) + : null; + } + const decorators = (0, getModifiers_1.getDecorators)(node); + if (decorators?.length) { + result.decorators = this.convertChildren(decorators); + } + // keys we never want to clone from the base typescript node as they + // introduce garbage into our AST + const KEYS_TO_NOT_COPY = new Set([ + '_children', + 'decorators', + 'end', + 'flags', + 'heritageClauses', + 'illegalDecorators', + 'jsDoc', + 'kind', + 'locals', + 'localSymbol', + 'modifierFlagsCache', + 'modifiers', + 'nextContainer', + 'parent', + 'pos', + 'symbol', + 'transformFlags', + 'type', + 'typeArguments', + 'typeParameters', + ]); + Object.entries(node) + .filter(([key]) => !KEYS_TO_NOT_COPY.has(key)) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + result[key] = this.convertChildren(value); + } + else if (value && typeof value === 'object' && value.kind) { + // need to check node[key].kind to ensure we don't try to convert a symbol + result[key] = this.convertChild(value); + } + else { + result[key] = value; + } + }); + return result; + } + /** + * Fixes the exports of the given ts.Node + * @returns the ESTreeNode with fixed exports + */ + fixExports(node, result) { + const isNamespaceNode = ts.isModuleDeclaration(node) && !ts.isStringLiteral(node.name); + const modifiers = isNamespaceNode + ? (0, node_utils_1.getNamespaceModifiers)(node) + : (0, getModifiers_1.getModifiers)(node); + if (modifiers?.[0].kind === SyntaxKind.ExportKeyword) { + /** + * Make sure that original node is registered instead of export + */ + this.registerTSNodeInNodeMap(node, result); + const exportKeyword = modifiers[0]; + const nextModifier = modifiers[1]; + const declarationIsDefault = nextModifier?.kind === SyntaxKind.DefaultKeyword; + const varToken = declarationIsDefault + ? (0, node_utils_1.findNextToken)(nextModifier, this.ast, this.ast) + : (0, node_utils_1.findNextToken)(exportKeyword, this.ast, this.ast); + result.range[0] = varToken.getStart(this.ast); + result.loc = (0, node_utils_1.getLocFor)(result.range, this.ast); + if (declarationIsDefault) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ExportDefaultDeclaration, + range: [exportKeyword.getStart(this.ast), result.range[1]], + declaration: result, + exportKind: 'value', + }); + } + const isType = result.type === ts_estree_1.AST_NODE_TYPES.TSInterfaceDeclaration || + result.type === ts_estree_1.AST_NODE_TYPES.TSTypeAliasDeclaration; + const isDeclare = 'declare' in result && result.declare; + return this.createNode(node, + // @ts-expect-error - TODO, narrow the types here + this.#withDeprecatedAliasGetter({ + type: ts_estree_1.AST_NODE_TYPES.ExportNamedDeclaration, + range: [exportKeyword.getStart(this.ast), result.range[1]], + attributes: [], + declaration: result, + exportKind: isType || isDeclare ? 'type' : 'value', + source: null, + specifiers: [], + }, 'assertions', 'attributes', true)); + } + return result; + } + getASTMaps() { + return { + esTreeNodeToTSNodeMap: this.esTreeNodeToTSNodeMap, + tsNodeToESTreeNodeMap: this.tsNodeToESTreeNodeMap, + }; + } + /** + * Register specific TypeScript node into map with first ESTree node provided + */ + registerTSNodeInNodeMap(node, result) { + if (result && + this.options.shouldPreserveNodeMaps && + !this.tsNodeToESTreeNodeMap.has(node)) { + this.tsNodeToESTreeNodeMap.set(node, result); + } + } +} +exports.Converter = Converter; diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts new file mode 100644 index 0000000..461cb9c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts @@ -0,0 +1,13 @@ +import type * as ts from 'typescript'; +interface DirectoryStructureHost { + readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; +} +interface CachedDirectoryStructureHost extends DirectoryStructureHost { + readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; +} +export interface WatchCompilerHostOfConfigFile extends ts.WatchCompilerHostOfConfigFile { + extraFileExtensions?: readonly ts.FileExtensionInfo[]; + onCachedDirectoryStructureHostCreate(host: CachedDirectoryStructureHost): void; +} +export {}; +//# sourceMappingURL=WatchCompilerHostOfConfigFile.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts.map new file mode 100644 index 0000000..74fc9ec --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"WatchCompilerHostOfConfigFile.d.ts","sourceRoot":"","sources":["../../src/create-program/WatchCompilerHostOfConfigFile.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAGtC,UAAU,sBAAsB;IAC9B,aAAa,CAAC,CACZ,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,EAC9B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,EAC3B,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,EAAE,CAAC;CACb;AAGD,UAAU,4BAA6B,SAAQ,sBAAsB;IACnE,aAAa,CACX,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,EAC9B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,EAC3B,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,EAAE,CAAC;CACb;AAGD,MAAM,WAAW,6BAA6B,CAAC,CAAC,SAAS,EAAE,CAAC,cAAc,CACxE,SAAQ,EAAE,CAAC,6BAA6B,CAAC,CAAC,CAAC;IAC3C,mBAAmB,CAAC,EAAE,SAAS,EAAE,CAAC,iBAAiB,EAAE,CAAC;IACtD,oCAAoC,CAClC,IAAI,EAAE,4BAA4B,GACjC,IAAI,CAAC;CACT"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.js new file mode 100644 index 0000000..3a76ed5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.js @@ -0,0 +1,5 @@ +"use strict"; +// These types are internal to TS. +// They have been trimmed down to only include the relevant bits +// We use some special internal TS apis to help us do our parsing flexibly +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts new file mode 100644 index 0000000..6dd5fbf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts @@ -0,0 +1,7 @@ +import type { ParseSettings } from '../parseSettings'; +import type { ASTAndDefiniteProgram } from './shared'; +/** + * @returns Returns a new source file and program corresponding to the linted code + */ +export declare function createIsolatedProgram(parseSettings: ParseSettings): ASTAndDefiniteProgram; +//# sourceMappingURL=createIsolatedProgram.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts.map new file mode 100644 index 0000000..2b77088 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createIsolatedProgram.d.ts","sourceRoot":"","sources":["../../src/create-program/createIsolatedProgram.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAStD;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,aAAa,GAC3B,qBAAqB,CAoEvB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js new file mode 100644 index 0000000..288f377 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js @@ -0,0 +1,96 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createIsolatedProgram = createIsolatedProgram; +const debug_1 = __importDefault(require("debug")); +const ts = __importStar(require("typescript")); +const getScriptKind_1 = require("./getScriptKind"); +const shared_1 = require("./shared"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:create-program:createIsolatedProgram'); +/** + * @returns Returns a new source file and program corresponding to the linted code + */ +function createIsolatedProgram(parseSettings) { + log('Getting isolated program in %s mode for: %s', parseSettings.jsx ? 'TSX' : 'TS', parseSettings.filePath); + const compilerHost = { + fileExists() { + return true; + }, + getCanonicalFileName() { + return parseSettings.filePath; + }, + getCurrentDirectory() { + return ''; + }, + getDefaultLibFileName() { + return 'lib.d.ts'; + }, + getDirectories() { + return []; + }, + // TODO: Support Windows CRLF + getNewLine() { + return '\n'; + }, + getSourceFile(filename) { + return ts.createSourceFile(filename, parseSettings.codeFullText, ts.ScriptTarget.Latest, + /* setParentNodes */ true, (0, getScriptKind_1.getScriptKind)(parseSettings.filePath, parseSettings.jsx)); + }, + readFile() { + return undefined; + }, + useCaseSensitiveFileNames() { + return true; + }, + writeFile() { + return null; + }, + }; + const program = ts.createProgram([parseSettings.filePath], { + jsDocParsingMode: parseSettings.jsDocParsingMode, + jsx: parseSettings.jsx ? ts.JsxEmit.Preserve : undefined, + noResolve: true, + target: ts.ScriptTarget.Latest, + ...(0, shared_1.createDefaultCompilerOptionsFromExtra)(parseSettings), + }, compilerHost); + const ast = program.getSourceFile(parseSettings.filePath); + if (!ast) { + throw new Error('Expected an ast to be returned for the single-file isolated program.'); + } + return { ast, program }; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts new file mode 100644 index 0000000..f426507 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts @@ -0,0 +1,9 @@ +import type * as ts from 'typescript'; +import type { ParseSettings } from '../parseSettings'; +import type { ASTAndDefiniteProgram } from './shared'; +/** + * @param parseSettings Internal settings for parsing the file + * @returns If found, the source file corresponding to the code and the containing program + */ +export declare function createProjectProgram(parseSettings: ParseSettings, programsForProjects: readonly ts.Program[]): ASTAndDefiniteProgram; +//# sourceMappingURL=createProjectProgram.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map new file mode 100644 index 0000000..5d64c3f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createProjectProgram.d.ts","sourceRoot":"","sources":["../../src/create-program/createProjectProgram.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAItC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAUtD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,GACzC,qBAAqB,CAcvB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js new file mode 100644 index 0000000..e041632 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js @@ -0,0 +1,23 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProjectProgram = createProjectProgram; +const debug_1 = __importDefault(require("debug")); +const node_utils_1 = require("../node-utils"); +const createProjectProgramError_1 = require("./createProjectProgramError"); +const shared_1 = require("./shared"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:create-program:createProjectProgram'); +/** + * @param parseSettings Internal settings for parsing the file + * @returns If found, the source file corresponding to the code and the containing program + */ +function createProjectProgram(parseSettings, programsForProjects) { + log('Creating project program for: %s', parseSettings.filePath); + const astAndProgram = (0, node_utils_1.firstDefined)(programsForProjects, currentProgram => (0, shared_1.getAstFromProgram)(currentProgram, parseSettings.filePath)); + if (!astAndProgram) { + throw new Error((0, createProjectProgramError_1.createProjectProgramError)(parseSettings, programsForProjects).join('\n')); + } + return astAndProgram; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgramError.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgramError.d.ts new file mode 100644 index 0000000..e818170 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgramError.d.ts @@ -0,0 +1,4 @@ +import type * as ts from 'typescript'; +import type { ParseSettings } from '../parseSettings'; +export declare function createProjectProgramError(parseSettings: ParseSettings, programsForProjects: readonly ts.Program[]): string[]; +//# sourceMappingURL=createProjectProgramError.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgramError.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgramError.d.ts.map new file mode 100644 index 0000000..db3f6c4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgramError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createProjectProgramError.d.ts","sourceRoot":"","sources":["../../src/create-program/createProjectProgramError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAItC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKtD,wBAAgB,yBAAyB,CACvC,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,GACzC,MAAM,EAAE,CAUV"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgramError.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgramError.js new file mode 100644 index 0000000..c7be9e0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgramError.js @@ -0,0 +1,74 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProjectProgramError = createProjectProgramError; +const node_path_1 = __importDefault(require("node:path")); +const describeFilePath_1 = require("./describeFilePath"); +const shared_1 = require("./shared"); +function createProjectProgramError(parseSettings, programsForProjects) { + const describedFilePath = (0, describeFilePath_1.describeFilePath)(parseSettings.filePath, parseSettings.tsconfigRootDir); + return [ + getErrorStart(describedFilePath, parseSettings), + ...getErrorDetails(describedFilePath, parseSettings, programsForProjects), + ]; +} +function getErrorStart(describedFilePath, parseSettings) { + const relativeProjects = [...parseSettings.projects.values()].map(projectFile => (0, describeFilePath_1.describeFilePath)(projectFile, parseSettings.tsconfigRootDir)); + const describedPrograms = relativeProjects.length === 1 + ? ` ${relativeProjects[0]}` + : `\n${relativeProjects.map(project => `- ${project}`).join('\n')}`; + return `ESLint was configured to run on \`${describedFilePath}\` using \`parserOptions.project\`:${describedPrograms}`; +} +function getErrorDetails(describedFilePath, parseSettings, programsForProjects) { + if (programsForProjects.length === 1 && + programsForProjects[0].getProjectReferences()?.length) { + return [ + `That TSConfig uses project "references" and doesn't include \`${describedFilePath}\` directly, which is not supported by \`parserOptions.project\`.`, + `Either:`, + `- Switch to \`parserOptions.projectService\``, + `- Use an ESLint-specific TSConfig`, + `See the typescript-eslint docs for more info: https://typescript-eslint.io/troubleshooting/typed-linting#are-typescript-project-references-supported`, + ]; + } + const { extraFileExtensions } = parseSettings; + const details = []; + for (const extraExtension of extraFileExtensions) { + if (!extraExtension.startsWith('.')) { + details.push(`Found unexpected extension \`${extraExtension}\` specified with the \`parserOptions.extraFileExtensions\` option. Did you mean \`.${extraExtension}\`?`); + } + if (shared_1.DEFAULT_EXTRA_FILE_EXTENSIONS.has(extraExtension)) { + details.push(`You unnecessarily included the extension \`${extraExtension}\` with the \`parserOptions.extraFileExtensions\` option. This extension is already handled by the parser by default.`); + } + } + const fileExtension = node_path_1.default.extname(parseSettings.filePath); + if (!shared_1.DEFAULT_EXTRA_FILE_EXTENSIONS.has(fileExtension)) { + const nonStandardExt = `The extension for the file (\`${fileExtension}\`) is non-standard`; + if (extraFileExtensions.length > 0) { + if (!extraFileExtensions.includes(fileExtension)) { + return [ + ...details, + `${nonStandardExt}. It should be added to your existing \`parserOptions.extraFileExtensions\`.`, + ]; + } + } + else { + return [ + ...details, + `${nonStandardExt}. You should add \`parserOptions.extraFileExtensions\` to your config.`, + ]; + } + } + const [describedInclusions, describedSpecifiers] = parseSettings.projects.size === 1 + ? ['that TSConfig does not', 'that TSConfig'] + : ['none of those TSConfigs', 'one of those TSConfigs']; + return [ + ...details, + `However, ${describedInclusions} include this file. Either:`, + `- Change ESLint's list of included files to not include this file`, + `- Change ${describedSpecifiers} to include this file`, + `- Create a new TSConfig that includes this file and include it in your parserOptions.project`, + `See the typescript-eslint docs for more info: https://typescript-eslint.io/troubleshooting/typed-linting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file`, + ]; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts new file mode 100644 index 0000000..8555211 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts @@ -0,0 +1,6 @@ +import * as ts from 'typescript'; +import type { ParseSettings } from '../parseSettings'; +import type { ASTAndNoProgram } from './shared'; +export declare function createSourceFile(parseSettings: ParseSettings): ts.SourceFile; +export declare function createNoProgram(parseSettings: ParseSettings): ASTAndNoProgram; +//# sourceMappingURL=createSourceFile.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts.map new file mode 100644 index 0000000..95b69be --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createSourceFile.d.ts","sourceRoot":"","sources":["../../src/create-program/createSourceFile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAShD,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,aAAa,GAAG,EAAE,CAAC,UAAU,CAoB5E;AAED,wBAAgB,eAAe,CAAC,aAAa,EAAE,aAAa,GAAG,eAAe,CAK7E"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js new file mode 100644 index 0000000..58fa4b5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js @@ -0,0 +1,62 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createSourceFile = createSourceFile; +exports.createNoProgram = createNoProgram; +const debug_1 = __importDefault(require("debug")); +const ts = __importStar(require("typescript")); +const source_files_1 = require("../source-files"); +const getScriptKind_1 = require("./getScriptKind"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:create-program:createSourceFile'); +function createSourceFile(parseSettings) { + log('Getting AST without type information in %s mode for: %s', parseSettings.jsx ? 'TSX' : 'TS', parseSettings.filePath); + return (0, source_files_1.isSourceFile)(parseSettings.code) + ? parseSettings.code + : ts.createSourceFile(parseSettings.filePath, parseSettings.codeFullText, { + jsDocParsingMode: parseSettings.jsDocParsingMode, + languageVersion: ts.ScriptTarget.Latest, + setExternalModuleIndicator: parseSettings.setExternalModuleIndicator, + }, + /* setParentNodes */ true, (0, getScriptKind_1.getScriptKind)(parseSettings.filePath, parseSettings.jsx)); +} +function createNoProgram(parseSettings) { + return { + ast: createSourceFile(parseSettings), + program: null, + }; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts new file mode 100644 index 0000000..e3afeae --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts @@ -0,0 +1,2 @@ +export declare function describeFilePath(filePath: string, tsconfigRootDir: string): string; +//# sourceMappingURL=describeFilePath.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts.map new file mode 100644 index 0000000..cda1203 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"describeFilePath.d.ts","sourceRoot":"","sources":["../../src/create-program/describeFilePath.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,MAAM,GACtB,MAAM,CAyBR"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js new file mode 100644 index 0000000..487e377 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js @@ -0,0 +1,30 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.describeFilePath = describeFilePath; +const node_path_1 = __importDefault(require("node:path")); +function describeFilePath(filePath, tsconfigRootDir) { + // If the TSConfig root dir is a parent of the filePath, use + // `` as a prefix for the path. + const relative = node_path_1.default.relative(tsconfigRootDir, filePath); + if (relative && !relative.startsWith('..') && !node_path_1.default.isAbsolute(relative)) { + return `/${relative}`; + } + // Root-like Mac/Linux (~/*, ~*) or Windows (C:/*, /) paths that aren't + // relative to the TSConfig root dir should be fully described. + // This avoids strings like /../../../../repo/file.ts. + // https://github.com/typescript-eslint/typescript-eslint/issues/6289 + if (/^[(\w+:)\\/~]/.test(filePath)) { + return filePath; + } + // Similarly, if the relative path would contain a lot of ../.., then + // ignore it and print the file path directly. + if (/\.\.[/\\]\.\./.test(relative)) { + return filePath; + } + // Lastly, since we've eliminated all special cases, we know the cleanest + // path to print is probably the prefixed relative one. + return `/${relative}`; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts new file mode 100644 index 0000000..20d52ec --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts @@ -0,0 +1,4 @@ +import * as ts from 'typescript'; +export declare function getScriptKind(filePath: string, jsx: boolean): ts.ScriptKind; +export declare function getLanguageVariant(scriptKind: ts.ScriptKind): ts.LanguageVariant; +//# sourceMappingURL=getScriptKind.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts.map new file mode 100644 index 0000000..a0b2909 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getScriptKind.d.ts","sourceRoot":"","sources":["../../src/create-program/getScriptKind.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,EAAE,CAAC,UAAU,CA8B3E;AAED,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,EAAE,CAAC,UAAU,GACxB,EAAE,CAAC,eAAe,CAYpB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js new file mode 100644 index 0000000..7bfa866 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js @@ -0,0 +1,80 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getScriptKind = getScriptKind; +exports.getLanguageVariant = getLanguageVariant; +const node_path_1 = __importDefault(require("node:path")); +const ts = __importStar(require("typescript")); +function getScriptKind(filePath, jsx) { + const extension = node_path_1.default.extname(filePath).toLowerCase(); + // note - we only respect the user's jsx setting for unknown extensions + // this is so that we always match TS's internal script kind logic, preventing + // weird errors due to a mismatch. + // https://github.com/microsoft/TypeScript/blob/da00ba67ed1182ad334f7c713b8254fba174aeba/src/compiler/utilities.ts#L6948-L6968 + switch (extension) { + case ts.Extension.Cjs: + case ts.Extension.Js: + case ts.Extension.Mjs: + return ts.ScriptKind.JS; + case ts.Extension.Cts: + case ts.Extension.Mts: + case ts.Extension.Ts: + return ts.ScriptKind.TS; + case ts.Extension.Json: + return ts.ScriptKind.JSON; + case ts.Extension.Jsx: + return ts.ScriptKind.JSX; + case ts.Extension.Tsx: + return ts.ScriptKind.TSX; + default: + // unknown extension, force typescript to ignore the file extension, and respect the user's setting + return jsx ? ts.ScriptKind.TSX : ts.ScriptKind.TS; + } +} +function getLanguageVariant(scriptKind) { + // https://github.com/microsoft/TypeScript/blob/d6e483b8dabd8fd37c00954c3f2184bb7f1eb90c/src/compiler/utilities.ts#L6281-L6285 + switch (scriptKind) { + case ts.ScriptKind.JS: + case ts.ScriptKind.JSON: + case ts.ScriptKind.JSX: + case ts.ScriptKind.TSX: + return ts.LanguageVariant.JSX; + default: + return ts.LanguageVariant.Standard; + } +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts new file mode 100644 index 0000000..e90b6f1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts @@ -0,0 +1,14 @@ +import * as ts from 'typescript'; +import type { ParseSettings } from '../parseSettings'; +/** + * Clear all of the parser caches. + * This should only be used in testing to ensure the parser is clean between tests. + */ +export declare function clearWatchCaches(): void; +/** + * Calculate project environments using options provided by consumer and paths from config + * @param parseSettings Internal settings for parsing the file + * @returns The programs corresponding to the supplied tsconfig paths + */ +export declare function getWatchProgramsForProjects(parseSettings: ParseSettings): ts.Program[]; +//# sourceMappingURL=getWatchProgramsForProjects.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts.map new file mode 100644 index 0000000..e7e0b8d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getWatchProgramsForProjects.d.ts","sourceRoot":"","sources":["../../src/create-program/getWatchProgramsForProjects.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAiDtD;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAOvC;AA4DD;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,aAAa,EAAE,aAAa,GAC3B,EAAE,CAAC,OAAO,EAAE,CA8Gd"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js new file mode 100644 index 0000000..5f88204 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js @@ -0,0 +1,380 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.clearWatchCaches = clearWatchCaches; +exports.getWatchProgramsForProjects = getWatchProgramsForProjects; +const debug_1 = __importDefault(require("debug")); +const node_fs_1 = __importDefault(require("node:fs")); +const ts = __importStar(require("typescript")); +const source_files_1 = require("../source-files"); +const shared_1 = require("./shared"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:create-program:getWatchProgramsForProjects'); +/** + * Maps tsconfig paths to their corresponding file contents and resulting watches + */ +const knownWatchProgramMap = new Map(); +/** + * Maps file/folder paths to their set of corresponding watch callbacks + * There may be more than one per file/folder if a file/folder is shared between projects + */ +const fileWatchCallbackTrackingMap = new Map(); +const folderWatchCallbackTrackingMap = new Map(); +/** + * Stores the list of known files for each program + */ +const programFileListCache = new Map(); +/** + * Caches the last modified time of the tsconfig files + */ +const tsconfigLastModifiedTimestampCache = new Map(); +const parsedFilesSeenHash = new Map(); +/** + * Clear all of the parser caches. + * This should only be used in testing to ensure the parser is clean between tests. + */ +function clearWatchCaches() { + knownWatchProgramMap.clear(); + fileWatchCallbackTrackingMap.clear(); + folderWatchCallbackTrackingMap.clear(); + parsedFilesSeenHash.clear(); + programFileListCache.clear(); + tsconfigLastModifiedTimestampCache.clear(); +} +function saveWatchCallback(trackingMap) { + return (fileName, callback) => { + const normalizedFileName = (0, shared_1.getCanonicalFileName)(fileName); + const watchers = (() => { + let watchers = trackingMap.get(normalizedFileName); + if (!watchers) { + watchers = new Set(); + trackingMap.set(normalizedFileName, watchers); + } + return watchers; + })(); + watchers.add(callback); + return { + close: () => { + watchers.delete(callback); + }, + }; + }; +} +/** + * Holds information about the file currently being linted + */ +const currentLintOperationState = { + code: '', + filePath: '', +}; +/** + * Appropriately report issues found when reading a config file + * @param diagnostic The diagnostic raised when creating a program + */ +function diagnosticReporter(diagnostic) { + throw new Error(ts.flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine)); +} +function updateCachedFileList(tsconfigPath, program) { + const fileList = new Set(program.getRootFileNames().map(f => (0, shared_1.getCanonicalFileName)(f))); + programFileListCache.set(tsconfigPath, fileList); + return fileList; +} +/** + * Calculate project environments using options provided by consumer and paths from config + * @param parseSettings Internal settings for parsing the file + * @returns The programs corresponding to the supplied tsconfig paths + */ +function getWatchProgramsForProjects(parseSettings) { + const filePath = (0, shared_1.getCanonicalFileName)(parseSettings.filePath); + const results = []; + // preserve reference to code and file being linted + currentLintOperationState.code = parseSettings.code; + currentLintOperationState.filePath = filePath; + // Update file version if necessary + const fileWatchCallbacks = fileWatchCallbackTrackingMap.get(filePath); + const codeHash = (0, shared_1.createHash)((0, source_files_1.getCodeText)(parseSettings.code)); + if (parsedFilesSeenHash.get(filePath) !== codeHash && + fileWatchCallbacks && + fileWatchCallbacks.size > 0) { + fileWatchCallbacks.forEach(cb => cb(filePath, ts.FileWatcherEventKind.Changed)); + } + const currentProjectsFromSettings = new Map(parseSettings.projects); + /* + * before we go into the process of attempting to find and update every program + * see if we know of a program that contains this file + */ + for (const [tsconfigPath, existingWatch] of knownWatchProgramMap.entries()) { + if (!currentProjectsFromSettings.has(tsconfigPath)) { + // the current parser run doesn't specify this tsconfig in parserOptions.project + // so we don't want to consider it for caching purposes. + // + // if we did consider it we might return a program for a project + // that wasn't specified in the current parser run (which is obv bad!). + continue; + } + let fileList = programFileListCache.get(tsconfigPath); + let updatedProgram = null; + if (!fileList) { + updatedProgram = existingWatch.getProgram().getProgram(); + fileList = updateCachedFileList(tsconfigPath, updatedProgram); + } + if (fileList.has(filePath)) { + log('Found existing program for file. %s', filePath); + updatedProgram ??= existingWatch.getProgram().getProgram(); + // sets parent pointers in source files + updatedProgram.getTypeChecker(); + return [updatedProgram]; + } + } + log('File did not belong to any existing programs, moving to create/update. %s', filePath); + /* + * We don't know of a program that contains the file, this means that either: + * - the required program hasn't been created yet, or + * - the file is new/renamed, and the program hasn't been updated. + */ + for (const tsconfigPath of parseSettings.projects) { + const existingWatch = knownWatchProgramMap.get(tsconfigPath[0]); + if (existingWatch) { + const updatedProgram = maybeInvalidateProgram(existingWatch, filePath, tsconfigPath[0]); + if (!updatedProgram) { + continue; + } + // sets parent pointers in source files + updatedProgram.getTypeChecker(); + // cache and check the file list + const fileList = updateCachedFileList(tsconfigPath[0], updatedProgram); + if (fileList.has(filePath)) { + log('Found updated program for file. %s', filePath); + // we can return early because we know this program contains the file + return [updatedProgram]; + } + results.push(updatedProgram); + continue; + } + const programWatch = createWatchProgram(tsconfigPath[1], parseSettings); + knownWatchProgramMap.set(tsconfigPath[0], programWatch); + const program = programWatch.getProgram().getProgram(); + // sets parent pointers in source files + program.getTypeChecker(); + // cache and check the file list + const fileList = updateCachedFileList(tsconfigPath[0], program); + if (fileList.has(filePath)) { + log('Found program for file. %s', filePath); + // we can return early because we know this program contains the file + return [program]; + } + results.push(program); + } + return results; +} +function createWatchProgram(tsconfigPath, parseSettings) { + log('Creating watch program for %s.', tsconfigPath); + // create compiler host + const watchCompilerHost = ts.createWatchCompilerHost(tsconfigPath, (0, shared_1.createDefaultCompilerOptionsFromExtra)(parseSettings), ts.sys, ts.createAbstractBuilder, diagnosticReporter, + // TODO: file issue on TypeScript to suggest making optional? + // eslint-disable-next-line @typescript-eslint/no-empty-function + /*reportWatchStatus*/ () => { }); + watchCompilerHost.jsDocParsingMode = parseSettings.jsDocParsingMode; + // ensure readFile reads the code being linted instead of the copy on disk + const oldReadFile = watchCompilerHost.readFile; + watchCompilerHost.readFile = (filePathIn, encoding) => { + const filePath = (0, shared_1.getCanonicalFileName)(filePathIn); + const fileContent = filePath === currentLintOperationState.filePath + ? (0, source_files_1.getCodeText)(currentLintOperationState.code) + : oldReadFile(filePath, encoding); + if (fileContent != null) { + parsedFilesSeenHash.set(filePath, (0, shared_1.createHash)(fileContent)); + } + return fileContent; + }; + // ensure process reports error on failure instead of exiting process immediately + watchCompilerHost.onUnRecoverableConfigFileDiagnostic = diagnosticReporter; + // ensure process doesn't emit programs + watchCompilerHost.afterProgramCreate = (program) => { + // report error if there are any errors in the config file + const configFileDiagnostics = program + .getConfigFileParsingDiagnostics() + .filter(diag => diag.category === ts.DiagnosticCategory.Error && diag.code !== 18003); + if (configFileDiagnostics.length > 0) { + diagnosticReporter(configFileDiagnostics[0]); + } + }; + /* + * From the CLI, the file watchers won't matter, as the files will be parsed once and then forgotten. + * When running from an IDE, these watchers will let us tell typescript about changes. + * + * ESLint IDE plugins will send us unfinished file content as the user types (before it's saved to disk). + * We use the file watchers to tell typescript about this latest file content. + * + * When files are created (or renamed), we won't know about them because we have no filesystem watchers attached. + * We use the folder watchers to tell typescript it needs to go and find new files in the project folders. + */ + watchCompilerHost.watchFile = saveWatchCallback(fileWatchCallbackTrackingMap); + watchCompilerHost.watchDirectory = saveWatchCallback(folderWatchCallbackTrackingMap); + // allow files with custom extensions to be included in program (uses internal ts api) + const oldOnDirectoryStructureHostCreate = watchCompilerHost.onCachedDirectoryStructureHostCreate; + watchCompilerHost.onCachedDirectoryStructureHostCreate = (host) => { + const oldReadDirectory = host.readDirectory; + host.readDirectory = (path, extensions, exclude, include, depth) => oldReadDirectory(path, !extensions + ? undefined + : [...extensions, ...parseSettings.extraFileExtensions], exclude, include, depth); + oldOnDirectoryStructureHostCreate(host); + }; + // This works only on 3.9 + watchCompilerHost.extraFileExtensions = parseSettings.extraFileExtensions.map(extension => ({ + extension, + isMixedContent: true, + scriptKind: ts.ScriptKind.Deferred, + })); + watchCompilerHost.trace = log; + // Since we don't want to asynchronously update program we want to disable timeout methods + // So any changes in the program will be delayed and updated when getProgram is called on watch + watchCompilerHost.setTimeout = undefined; + watchCompilerHost.clearTimeout = undefined; + return ts.createWatchProgram(watchCompilerHost); +} +function hasTSConfigChanged(tsconfigPath) { + const stat = node_fs_1.default.statSync(tsconfigPath); + const lastModifiedAt = stat.mtimeMs; + const cachedLastModifiedAt = tsconfigLastModifiedTimestampCache.get(tsconfigPath); + tsconfigLastModifiedTimestampCache.set(tsconfigPath, lastModifiedAt); + if (cachedLastModifiedAt == null) { + return false; + } + return Math.abs(cachedLastModifiedAt - lastModifiedAt) > Number.EPSILON; +} +function maybeInvalidateProgram(existingWatch, filePath, tsconfigPath) { + /* + * By calling watchProgram.getProgram(), it will trigger a resync of the program based on + * whatever new file content we've given it from our input. + */ + let updatedProgram = existingWatch.getProgram().getProgram(); + // In case this change causes problems in larger real world codebases + // Provide an escape hatch so people don't _have_ to revert to an older version + if (process.env.TSESTREE_NO_INVALIDATION === 'true') { + return updatedProgram; + } + if (hasTSConfigChanged(tsconfigPath)) { + /* + * If the stat of the tsconfig has changed, that could mean the include/exclude/files lists has changed + * We need to make sure typescript knows this so it can update appropriately + */ + log('tsconfig has changed - triggering program update. %s', tsconfigPath); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + fileWatchCallbackTrackingMap + .get(tsconfigPath) + .forEach(cb => cb(tsconfigPath, ts.FileWatcherEventKind.Changed)); + // tsconfig change means that the file list more than likely changed, so clear the cache + programFileListCache.delete(tsconfigPath); + } + let sourceFile = updatedProgram.getSourceFile(filePath); + if (sourceFile) { + return updatedProgram; + } + /* + * Missing source file means our program's folder structure might be out of date. + * So we need to tell typescript it needs to update the correct folder. + */ + log('File was not found in program - triggering folder update. %s', filePath); + // Find the correct directory callback by climbing the folder tree + const currentDir = (0, shared_1.canonicalDirname)(filePath); + let current = null; + let next = currentDir; + let hasCallback = false; + while (current !== next) { + current = next; + const folderWatchCallbacks = folderWatchCallbackTrackingMap.get(current); + if (folderWatchCallbacks) { + for (const cb of folderWatchCallbacks) { + if (currentDir !== current) { + cb(currentDir, ts.FileWatcherEventKind.Changed); + } + cb(current, ts.FileWatcherEventKind.Changed); + } + hasCallback = true; + } + next = (0, shared_1.canonicalDirname)(current); + } + if (!hasCallback) { + /* + * No callback means the paths don't matchup - so no point returning any program + * this will signal to the caller to skip this program + */ + log('No callback found for file, not part of this program. %s', filePath); + return null; + } + // directory update means that the file list more than likely changed, so clear the cache + programFileListCache.delete(tsconfigPath); + // force the immediate resync + updatedProgram = existingWatch.getProgram().getProgram(); + sourceFile = updatedProgram.getSourceFile(filePath); + if (sourceFile) { + return updatedProgram; + } + /* + * At this point we're in one of two states: + * - The file isn't supposed to be in this program due to exclusions + * - The file is new, and was renamed from an old, included filename + * + * For the latter case, we need to tell typescript that the old filename is now deleted + */ + log('File was still not found in program after directory update - checking file deletions. %s', filePath); + const rootFilenames = updatedProgram.getRootFileNames(); + // use find because we only need to "delete" one file to cause typescript to do a full resync + const deletedFile = rootFilenames.find(file => !node_fs_1.default.existsSync(file)); + if (!deletedFile) { + // There are no deleted files, so it must be the former case of the file not belonging to this program + return null; + } + const fileWatchCallbacks = fileWatchCallbackTrackingMap.get((0, shared_1.getCanonicalFileName)(deletedFile)); + if (!fileWatchCallbacks) { + // shouldn't happen, but just in case + log('Could not find watch callbacks for root file. %s', deletedFile); + return updatedProgram; + } + log('Marking file as deleted. %s', deletedFile); + fileWatchCallbacks.forEach(cb => cb(deletedFile, ts.FileWatcherEventKind.Deleted)); + // deleted files means that the file list _has_ changed, so clear the cache + programFileListCache.delete(tsconfigPath); + updatedProgram = existingWatch.getProgram().getProgram(); + sourceFile = updatedProgram.getSourceFile(filePath); + if (sourceFile) { + return updatedProgram; + } + log('File was still not found in program after deletion check, assuming it is not part of this program. %s', filePath); + return null; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts new file mode 100644 index 0000000..6306b65 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts @@ -0,0 +1,28 @@ +import type { Program } from 'typescript'; +import * as ts from 'typescript'; +import type { ParseSettings } from '../parseSettings'; +export interface ASTAndNoProgram { + ast: ts.SourceFile; + program: null; +} +export interface ASTAndDefiniteProgram { + ast: ts.SourceFile; + program: ts.Program; +} +export type ASTAndProgram = ASTAndDefiniteProgram | ASTAndNoProgram; +export declare const DEFAULT_EXTRA_FILE_EXTENSIONS: Set; +export declare function createDefaultCompilerOptionsFromExtra(parseSettings: ParseSettings): ts.CompilerOptions; +export type CanonicalPath = { + __brand: unknown; +} & string; +export declare function getCanonicalFileName(filePath: string): CanonicalPath; +export declare function ensureAbsolutePath(p: string, tsconfigRootDir: string): string; +export declare function canonicalDirname(p: CanonicalPath): CanonicalPath; +export declare function getAstFromProgram(currentProgram: Program, filePath: string): ASTAndDefiniteProgram | undefined; +/** + * Hash content for compare content. + * @param content hashed contend + * @returns hashed result + */ +export declare function createHash(content: string): string; +//# sourceMappingURL=shared.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map new file mode 100644 index 0000000..b6bec41 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/create-program/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAI1C,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC;IACnB,OAAO,EAAE,IAAI,CAAC;CACf;AACD,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC;IACnB,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC;CACrB;AACD,MAAM,MAAM,aAAa,GAAG,qBAAqB,GAAG,eAAe,CAAC;AAYpE,eAAO,MAAM,6BAA6B,aASxC,CAAC;AAEH,wBAAgB,qCAAqC,CACnD,aAAa,EAAE,aAAa,GAC3B,EAAE,CAAC,eAAe,CASpB;AAGD,MAAM,MAAM,aAAa,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAAC;AAU1D,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,CAMpE;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,aAAa,GAAG,aAAa,CAEhE;AAmBD,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,OAAO,EACvB,QAAQ,EAAE,MAAM,GACf,qBAAqB,GAAG,SAAS,CAWnC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOlD"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js new file mode 100644 index 0000000..f462924 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js @@ -0,0 +1,130 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DEFAULT_EXTRA_FILE_EXTENSIONS = void 0; +exports.createDefaultCompilerOptionsFromExtra = createDefaultCompilerOptionsFromExtra; +exports.getCanonicalFileName = getCanonicalFileName; +exports.ensureAbsolutePath = ensureAbsolutePath; +exports.canonicalDirname = canonicalDirname; +exports.getAstFromProgram = getAstFromProgram; +exports.createHash = createHash; +const tsconfig_utils_1 = require("@typescript-eslint/tsconfig-utils"); +const node_path_1 = __importDefault(require("node:path")); +const ts = __importStar(require("typescript")); +/** + * Default compiler options for program generation + */ +const DEFAULT_COMPILER_OPTIONS = { + ...tsconfig_utils_1.CORE_COMPILER_OPTIONS, + allowJs: true, + allowNonTsExtensions: true, + checkJs: true, +}; +exports.DEFAULT_EXTRA_FILE_EXTENSIONS = new Set([ + ts.Extension.Cjs, + ts.Extension.Cts, + ts.Extension.Js, + ts.Extension.Jsx, + ts.Extension.Mjs, + ts.Extension.Mts, + ts.Extension.Ts, + ts.Extension.Tsx, +]); +function createDefaultCompilerOptionsFromExtra(parseSettings) { + if (parseSettings.debugLevel.has('typescript')) { + return { + ...DEFAULT_COMPILER_OPTIONS, + extendedDiagnostics: true, + }; + } + return DEFAULT_COMPILER_OPTIONS; +} +// typescript doesn't provide a ts.sys implementation for browser environments +const useCaseSensitiveFileNames = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, @typescript-eslint/internal/eqeq-nullish +ts.sys !== undefined ? ts.sys.useCaseSensitiveFileNames : true; +const correctPathCasing = useCaseSensitiveFileNames + ? (filePath) => filePath + : (filePath) => filePath.toLowerCase(); +function getCanonicalFileName(filePath) { + let normalized = node_path_1.default.normalize(filePath); + if (normalized.endsWith(node_path_1.default.sep)) { + normalized = normalized.slice(0, -1); + } + return correctPathCasing(normalized); +} +function ensureAbsolutePath(p, tsconfigRootDir) { + return node_path_1.default.resolve(tsconfigRootDir, p); +} +function canonicalDirname(p) { + return node_path_1.default.dirname(p); +} +const DEFINITION_EXTENSIONS = [ + ts.Extension.Dts, + ts.Extension.Dcts, + ts.Extension.Dmts, +]; +function getExtension(fileName) { + if (!fileName) { + return null; + } + return (DEFINITION_EXTENSIONS.find(definitionExt => fileName.endsWith(definitionExt)) ?? node_path_1.default.extname(fileName)); +} +function getAstFromProgram(currentProgram, filePath) { + const ast = currentProgram.getSourceFile(filePath); + // working around https://github.com/typescript-eslint/typescript-eslint/issues/1573 + const expectedExt = getExtension(filePath); + const returnedExt = getExtension(ast?.fileName); + if (expectedExt !== returnedExt) { + return undefined; + } + return ast && { ast, program: currentProgram }; +} +/** + * Hash content for compare content. + * @param content hashed contend + * @returns hashed result + */ +function createHash(content) { + // No ts.sys in browser environments. + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (ts.sys?.createHash) { + return ts.sys.createHash(content); + } + return content; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts new file mode 100644 index 0000000..c060a02 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts @@ -0,0 +1,12 @@ +import * as ts from 'typescript'; +import type { ParseSettings } from '../parseSettings'; +import type { ASTAndDefiniteProgram } from './shared'; +export declare function useProvidedPrograms(programInstances: Iterable, parseSettings: ParseSettings): ASTAndDefiniteProgram; +/** + * Utility offered by parser to help consumers construct their own program instance. + * + * @param configFile the path to the tsconfig.json file, relative to `projectDirectory` + * @param projectDirectory the project directory to use as the CWD, defaults to `process.cwd()` + */ +export declare function createProgramFromConfigFile(configFile: string, projectDirectory?: string): ts.Program; +//# sourceMappingURL=useProvidedPrograms.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts.map new file mode 100644 index 0000000..9fffd33 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useProvidedPrograms.d.ts","sourceRoot":"","sources":["../../src/create-program/useProvidedPrograms.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAQtD,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,EACtC,aAAa,EAAE,aAAa,GAC3B,qBAAqB,CAoCvB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,EAClB,gBAAgB,CAAC,EAAE,MAAM,GACxB,EAAE,CAAC,OAAO,CAIZ"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js new file mode 100644 index 0000000..9ea1533 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js @@ -0,0 +1,81 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.useProvidedPrograms = useProvidedPrograms; +exports.createProgramFromConfigFile = createProgramFromConfigFile; +const tsconfig_utils_1 = require("@typescript-eslint/tsconfig-utils"); +const debug_1 = __importDefault(require("debug")); +const path = __importStar(require("node:path")); +const ts = __importStar(require("typescript")); +const shared_1 = require("./shared"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:create-program:useProvidedPrograms'); +function useProvidedPrograms(programInstances, parseSettings) { + log('Retrieving ast for %s from provided program instance(s)', parseSettings.filePath); + let astAndProgram; + for (const programInstance of programInstances) { + astAndProgram = (0, shared_1.getAstFromProgram)(programInstance, parseSettings.filePath); + // Stop at the first applicable program instance + if (astAndProgram) { + break; + } + } + if (astAndProgram) { + astAndProgram.program.getTypeChecker(); // ensure parent pointers are set in source files + return astAndProgram; + } + const relativeFilePath = path.relative(parseSettings.tsconfigRootDir, parseSettings.filePath); + const [typeSource, typeSources] = parseSettings.projects.size > 0 + ? ['project', 'project(s)'] + : ['programs', 'program instance(s)']; + const errorLines = [ + `"parserOptions.${typeSource}" has been provided for @typescript-eslint/parser.`, + `The file was not found in any of the provided ${typeSources}: ${relativeFilePath}`, + ]; + throw new Error(errorLines.join('\n')); +} +/** + * Utility offered by parser to help consumers construct their own program instance. + * + * @param configFile the path to the tsconfig.json file, relative to `projectDirectory` + * @param projectDirectory the project directory to use as the CWD, defaults to `process.cwd()` + */ +function createProgramFromConfigFile(configFile, projectDirectory) { + const parsed = (0, tsconfig_utils_1.getParsedConfigFile)(ts, configFile, projectDirectory); + const host = ts.createCompilerHost(parsed.options, true); + return ts.createProgram(parsed.fileNames, parsed.options, host); +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts new file mode 100644 index 0000000..f0fbb5d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts @@ -0,0 +1,3 @@ +export declare const DEFAULT_PROJECT_FILES_ERROR_EXPLANATION = "\n\nHaving many files run with the default project is known to cause performance issues and slow down linting.\n\nSee https://typescript-eslint.io/troubleshooting/typed-linting#allowdefaultproject-glob-too-wide\n"; +export declare function validateDefaultProjectForFilesGlob(allowDefaultProject: string[] | undefined): void; +//# sourceMappingURL=validateDefaultProjectForFilesGlob.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts.map new file mode 100644 index 0000000..f917275 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"validateDefaultProjectForFilesGlob.d.ts","sourceRoot":"","sources":["../../src/create-program/validateDefaultProjectForFilesGlob.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uCAAuC,yNAKnD,CAAC;AAEF,wBAAgB,kCAAkC,CAChD,mBAAmB,EAAE,MAAM,EAAE,GAAG,SAAS,GACxC,IAAI,CAiBN"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js new file mode 100644 index 0000000..2302a58 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION = void 0; +exports.validateDefaultProjectForFilesGlob = validateDefaultProjectForFilesGlob; +exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION = ` + +Having many files run with the default project is known to cause performance issues and slow down linting. + +See https://typescript-eslint.io/troubleshooting/typed-linting#allowdefaultproject-glob-too-wide +`; +function validateDefaultProjectForFilesGlob(allowDefaultProject) { + if (!allowDefaultProject?.length) { + return; + } + for (const glob of allowDefaultProject) { + if (glob === '*') { + throw new Error(`allowDefaultProject contains the overly wide '*'.${exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION}`); + } + if (glob.includes('**')) { + throw new Error(`allowDefaultProject glob '${glob}' contains a disallowed '**'.${exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION}`); + } + } +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.d.ts new file mode 100644 index 0000000..48aaea5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.d.ts @@ -0,0 +1,5 @@ +import type * as ts from 'typescript'; +import type { ASTMaps } from './convert'; +import type { ParserServices } from './parser-options'; +export declare function createParserServices(astMaps: ASTMaps, program: ts.Program | null): ParserServices; +//# sourceMappingURL=createParserServices.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.d.ts.map new file mode 100644 index 0000000..c19418f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createParserServices.d.ts","sourceRoot":"","sources":["../src/createParserServices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,EAAE,CAAC,OAAO,GAAG,IAAI,GACzB,cAAc,CA6BhB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.js new file mode 100644 index 0000000..7526d0a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createParserServices = createParserServices; +function createParserServices(astMaps, program) { + if (!program) { + return { + emitDecoratorMetadata: undefined, + experimentalDecorators: undefined, + isolatedDeclarations: undefined, + program, + // we always return the node maps because + // (a) they don't require type info and + // (b) they can be useful when using some of TS's internal non-type-aware AST utils + ...astMaps, + }; + } + const checker = program.getTypeChecker(); + const compilerOptions = program.getCompilerOptions(); + return { + program, + // not set in the config is the same as off + emitDecoratorMetadata: compilerOptions.emitDecoratorMetadata ?? false, + experimentalDecorators: compilerOptions.experimentalDecorators ?? false, + isolatedDeclarations: compilerOptions.isolatedDeclarations ?? false, + ...astMaps, + getSymbolAtLocation: node => checker.getSymbolAtLocation(astMaps.esTreeNodeToTSNodeMap.get(node)), + getTypeAtLocation: node => checker.getTypeAtLocation(astMaps.esTreeNodeToTSNodeMap.get(node)), + }; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts new file mode 100644 index 0000000..dc34867 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts @@ -0,0 +1,4 @@ +import * as ts from 'typescript'; +export declare function getModifiers(node: ts.Node | null | undefined, includeIllegalModifiers?: boolean): ts.Modifier[] | undefined; +export declare function getDecorators(node: ts.Node | null | undefined, includeIllegalDecorators?: boolean): ts.Decorator[] | undefined; +//# sourceMappingURL=getModifiers.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts.map new file mode 100644 index 0000000..4b597a5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getModifiers.d.ts","sourceRoot":"","sources":["../src/getModifiers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAMjC,wBAAgB,YAAY,CAC1B,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,EAChC,uBAAuB,UAAQ,GAC9B,EAAE,CAAC,QAAQ,EAAE,GAAG,SAAS,CAsB3B;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,EAChC,wBAAwB,UAAQ,GAC/B,EAAE,CAAC,SAAS,EAAE,GAAG,SAAS,CAoB5B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js new file mode 100644 index 0000000..9f7b5ef --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js @@ -0,0 +1,74 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getModifiers = getModifiers; +exports.getDecorators = getDecorators; +const ts = __importStar(require("typescript")); +const version_check_1 = require("./version-check"); +const isAtLeast48 = version_check_1.typescriptVersionIsAtLeast['4.8']; +function getModifiers(node, includeIllegalModifiers = false) { + if (node == null) { + return undefined; + } + if (isAtLeast48) { + // eslint-disable-next-line @typescript-eslint/no-deprecated -- this is safe as it's guarded + if (includeIllegalModifiers || ts.canHaveModifiers(node)) { + // eslint-disable-next-line @typescript-eslint/no-deprecated -- this is safe as it's guarded + const modifiers = ts.getModifiers(node); + return modifiers ? [...modifiers] : undefined; + } + return undefined; + } + return ( + // @ts-expect-error intentional fallback for older TS versions + node.modifiers?.filter((m) => !ts.isDecorator(m))); +} +function getDecorators(node, includeIllegalDecorators = false) { + if (node == null) { + return undefined; + } + if (isAtLeast48) { + // eslint-disable-next-line @typescript-eslint/no-deprecated -- this is safe as it's guarded + if (includeIllegalDecorators || ts.canHaveDecorators(node)) { + // eslint-disable-next-line @typescript-eslint/no-deprecated -- this is safe as it's guarded + const decorators = ts.getDecorators(node); + return decorators ? [...decorators] : undefined; + } + return undefined; + } + return ( + // @ts-expect-error intentional fallback for older TS versions + node.decorators?.filter(ts.isDecorator)); +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts new file mode 100644 index 0000000..c4e8da2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts @@ -0,0 +1,15 @@ +export * from './clear-caches'; +export * from './create-program/getScriptKind'; +export { getCanonicalFileName } from './create-program/shared'; +export { createProgramFromConfigFile as createProgram } from './create-program/useProvidedPrograms'; +export * from './getModifiers'; +export { TSError } from './node-utils'; +export { type AST, parse, parseAndGenerateServices, type ParseAndGenerateServicesResult, } from './parser'; +export type { ParserServices, ParserServicesWithoutTypeInformation, ParserServicesWithTypeInformation, TSESTreeOptions, } from './parser-options'; +export { addCandidateTSConfigRootDir, clearCandidateTSConfigRootDirs, } from './parseSettings/candidateTSConfigRootDirs'; +export { simpleTraverse } from './simple-traverse'; +export * from './ts-estree'; +export { typescriptVersionIsAtLeast } from './version-check'; +export { version } from './version'; +export { withoutProjectParserOptions } from './withoutProjectParserOptions'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map new file mode 100644 index 0000000..4bc6c6c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,2BAA2B,IAAI,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACpG,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EACL,KAAK,GAAG,EACR,KAAK,EACL,wBAAwB,EACxB,KAAK,8BAA8B,GACpC,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,cAAc,EACd,oCAAoC,EACpC,iCAAiC,EACjC,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/index.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/index.js new file mode 100644 index 0000000..e194cf8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/index.js @@ -0,0 +1,41 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.withoutProjectParserOptions = exports.version = exports.typescriptVersionIsAtLeast = exports.simpleTraverse = exports.clearCandidateTSConfigRootDirs = exports.addCandidateTSConfigRootDir = exports.parseAndGenerateServices = exports.parse = exports.TSError = exports.createProgram = exports.getCanonicalFileName = void 0; +__exportStar(require("./clear-caches"), exports); +__exportStar(require("./create-program/getScriptKind"), exports); +var shared_1 = require("./create-program/shared"); +Object.defineProperty(exports, "getCanonicalFileName", { enumerable: true, get: function () { return shared_1.getCanonicalFileName; } }); +var useProvidedPrograms_1 = require("./create-program/useProvidedPrograms"); +Object.defineProperty(exports, "createProgram", { enumerable: true, get: function () { return useProvidedPrograms_1.createProgramFromConfigFile; } }); +__exportStar(require("./getModifiers"), exports); +var node_utils_1 = require("./node-utils"); +Object.defineProperty(exports, "TSError", { enumerable: true, get: function () { return node_utils_1.TSError; } }); +var parser_1 = require("./parser"); +Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parser_1.parse; } }); +Object.defineProperty(exports, "parseAndGenerateServices", { enumerable: true, get: function () { return parser_1.parseAndGenerateServices; } }); +var candidateTSConfigRootDirs_1 = require("./parseSettings/candidateTSConfigRootDirs"); +Object.defineProperty(exports, "addCandidateTSConfigRootDir", { enumerable: true, get: function () { return candidateTSConfigRootDirs_1.addCandidateTSConfigRootDir; } }); +Object.defineProperty(exports, "clearCandidateTSConfigRootDirs", { enumerable: true, get: function () { return candidateTSConfigRootDirs_1.clearCandidateTSConfigRootDirs; } }); +var simple_traverse_1 = require("./simple-traverse"); +Object.defineProperty(exports, "simpleTraverse", { enumerable: true, get: function () { return simple_traverse_1.simpleTraverse; } }); +__exportStar(require("./ts-estree"), exports); +var version_check_1 = require("./version-check"); +Object.defineProperty(exports, "typescriptVersionIsAtLeast", { enumerable: true, get: function () { return version_check_1.typescriptVersionIsAtLeast; } }); +var version_1 = require("./version"); +Object.defineProperty(exports, "version", { enumerable: true, get: function () { return version_1.version; } }); +var withoutProjectParserOptions_1 = require("./withoutProjectParserOptions"); +Object.defineProperty(exports, "withoutProjectParserOptions", { enumerable: true, get: function () { return withoutProjectParserOptions_1.withoutProjectParserOptions; } }); diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts new file mode 100644 index 0000000..bb5468f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts @@ -0,0 +1,2 @@ +export declare const xhtmlEntities: Record; +//# sourceMappingURL=xhtml-entities.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts.map new file mode 100644 index 0000000..02bf1e5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"xhtml-entities.d.ts","sourceRoot":"","sources":["../../src/jsx/xhtml-entities.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA8PhD,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js new file mode 100644 index 0000000..a022fe1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js @@ -0,0 +1,258 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.xhtmlEntities = void 0; +exports.xhtmlEntities = { + Aacute: '\u00C1', + aacute: '\u00E1', + Acirc: '\u00C2', + acirc: '\u00E2', + acute: '\u00B4', + AElig: '\u00C6', + aelig: '\u00E6', + Agrave: '\u00C0', + agrave: '\u00E0', + alefsym: '\u2135', + Alpha: '\u0391', + alpha: '\u03B1', + amp: '&', + and: '\u2227', + ang: '\u2220', + apos: '\u0027', + Aring: '\u00C5', + aring: '\u00E5', + asymp: '\u2248', + Atilde: '\u00C3', + atilde: '\u00E3', + Auml: '\u00C4', + auml: '\u00E4', + bdquo: '\u201E', + Beta: '\u0392', + beta: '\u03B2', + brvbar: '\u00A6', + bull: '\u2022', + cap: '\u2229', + Ccedil: '\u00C7', + ccedil: '\u00E7', + cedil: '\u00B8', + cent: '\u00A2', + Chi: '\u03A7', + chi: '\u03C7', + circ: '\u02C6', + clubs: '\u2663', + cong: '\u2245', + copy: '\u00A9', + crarr: '\u21B5', + cup: '\u222A', + curren: '\u00A4', + dagger: '\u2020', + Dagger: '\u2021', + darr: '\u2193', + dArr: '\u21D3', + deg: '\u00B0', + Delta: '\u0394', + delta: '\u03B4', + diams: '\u2666', + divide: '\u00F7', + Eacute: '\u00C9', + eacute: '\u00E9', + Ecirc: '\u00CA', + ecirc: '\u00EA', + Egrave: '\u00C8', + egrave: '\u00E8', + empty: '\u2205', + emsp: '\u2003', + ensp: '\u2002', + Epsilon: '\u0395', + epsilon: '\u03B5', + equiv: '\u2261', + Eta: '\u0397', + eta: '\u03B7', + ETH: '\u00D0', + eth: '\u00F0', + Euml: '\u00CB', + euml: '\u00EB', + euro: '\u20AC', + exist: '\u2203', + fnof: '\u0192', + forall: '\u2200', + frac12: '\u00BD', + frac14: '\u00BC', + frac34: '\u00BE', + frasl: '\u2044', + Gamma: '\u0393', + gamma: '\u03B3', + ge: '\u2265', + gt: '>', + harr: '\u2194', + hArr: '\u21D4', + hearts: '\u2665', + hellip: '\u2026', + Iacute: '\u00CD', + iacute: '\u00ED', + Icirc: '\u00CE', + icirc: '\u00EE', + iexcl: '\u00A1', + Igrave: '\u00CC', + igrave: '\u00EC', + image: '\u2111', + infin: '\u221E', + int: '\u222B', + Iota: '\u0399', + iota: '\u03B9', + iquest: '\u00BF', + isin: '\u2208', + Iuml: '\u00CF', + iuml: '\u00EF', + Kappa: '\u039A', + kappa: '\u03BA', + Lambda: '\u039B', + lambda: '\u03BB', + lang: '\u2329', + laquo: '\u00AB', + larr: '\u2190', + lArr: '\u21D0', + lceil: '\u2308', + ldquo: '\u201C', + le: '\u2264', + lfloor: '\u230A', + lowast: '\u2217', + loz: '\u25CA', + lrm: '\u200E', + lsaquo: '\u2039', + lsquo: '\u2018', + lt: '<', + macr: '\u00AF', + mdash: '\u2014', + micro: '\u00B5', + middot: '\u00B7', + minus: '\u2212', + Mu: '\u039C', + mu: '\u03BC', + nabla: '\u2207', + nbsp: '\u00A0', + ndash: '\u2013', + ne: '\u2260', + ni: '\u220B', + not: '\u00AC', + notin: '\u2209', + nsub: '\u2284', + Ntilde: '\u00D1', + ntilde: '\u00F1', + Nu: '\u039D', + nu: '\u03BD', + Oacute: '\u00D3', + oacute: '\u00F3', + Ocirc: '\u00D4', + ocirc: '\u00F4', + OElig: '\u0152', + oelig: '\u0153', + Ograve: '\u00D2', + ograve: '\u00F2', + oline: '\u203E', + Omega: '\u03A9', + omega: '\u03C9', + Omicron: '\u039F', + omicron: '\u03BF', + oplus: '\u2295', + or: '\u2228', + ordf: '\u00AA', + ordm: '\u00BA', + Oslash: '\u00D8', + oslash: '\u00F8', + Otilde: '\u00D5', + otilde: '\u00F5', + otimes: '\u2297', + Ouml: '\u00D6', + ouml: '\u00F6', + para: '\u00B6', + part: '\u2202', + permil: '\u2030', + perp: '\u22A5', + Phi: '\u03A6', + phi: '\u03C6', + Pi: '\u03A0', + pi: '\u03C0', + piv: '\u03D6', + plusmn: '\u00B1', + pound: '\u00A3', + prime: '\u2032', + Prime: '\u2033', + prod: '\u220F', + prop: '\u221D', + Psi: '\u03A8', + psi: '\u03C8', + quot: '\u0022', + radic: '\u221A', + rang: '\u232A', + raquo: '\u00BB', + rarr: '\u2192', + rArr: '\u21D2', + rceil: '\u2309', + rdquo: '\u201D', + real: '\u211C', + reg: '\u00AE', + rfloor: '\u230B', + Rho: '\u03A1', + rho: '\u03C1', + rlm: '\u200F', + rsaquo: '\u203A', + rsquo: '\u2019', + sbquo: '\u201A', + Scaron: '\u0160', + scaron: '\u0161', + sdot: '\u22C5', + sect: '\u00A7', + shy: '\u00AD', + Sigma: '\u03A3', + sigma: '\u03C3', + sigmaf: '\u03C2', + sim: '\u223C', + spades: '\u2660', + sub: '\u2282', + sube: '\u2286', + sum: '\u2211', + sup: '\u2283', + sup1: '\u00B9', + sup2: '\u00B2', + sup3: '\u00B3', + supe: '\u2287', + szlig: '\u00DF', + Tau: '\u03A4', + tau: '\u03C4', + there4: '\u2234', + Theta: '\u0398', + theta: '\u03B8', + thetasym: '\u03D1', + thinsp: '\u2009', + THORN: '\u00DE', + thorn: '\u00FE', + tilde: '\u02DC', + times: '\u00D7', + trade: '\u2122', + Uacute: '\u00DA', + uacute: '\u00FA', + uarr: '\u2191', + uArr: '\u21D1', + Ucirc: '\u00DB', + ucirc: '\u00FB', + Ugrave: '\u00D9', + ugrave: '\u00F9', + uml: '\u00A8', + upsih: '\u03D2', + Upsilon: '\u03A5', + upsilon: '\u03C5', + Uuml: '\u00DC', + uuml: '\u00FC', + weierp: '\u2118', + Xi: '\u039E', + xi: '\u03BE', + Yacute: '\u00DD', + yacute: '\u00FD', + yen: '\u00A5', + yuml: '\u00FF', + Yuml: '\u0178', + Zeta: '\u0396', + zeta: '\u03B6', + zwj: '\u200D', + zwnj: '\u200C', +}; diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts new file mode 100644 index 0000000..eb5c020 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts @@ -0,0 +1,192 @@ +import * as ts from 'typescript'; +import type { TSESTree, TSNode } from './ts-estree'; +import { AST_NODE_TYPES, AST_TOKEN_TYPES } from './ts-estree'; +declare const SyntaxKind: typeof ts.SyntaxKind; +type LogicalOperatorKind = ts.SyntaxKind.AmpersandAmpersandToken | ts.SyntaxKind.BarBarToken | ts.SyntaxKind.QuestionQuestionToken; +interface TokenToText extends TSESTree.PunctuatorTokenToText, TSESTree.BinaryOperatorToText { + [SyntaxKind.ImportKeyword]: 'import'; + [SyntaxKind.KeyOfKeyword]: 'keyof'; + [SyntaxKind.NewKeyword]: 'new'; + [SyntaxKind.ReadonlyKeyword]: 'readonly'; + [SyntaxKind.UniqueKeyword]: 'unique'; +} +type AssignmentOperatorKind = keyof TSESTree.AssignmentOperatorToText; +type BinaryOperatorKind = keyof TSESTree.BinaryOperatorToText; +type DeclarationKind = TSESTree.VariableDeclaration['kind']; +/** + * Returns true if the given ts.Token is a logical operator + */ +export declare function isLogicalOperator(operator: ts.BinaryOperatorToken): operator is ts.Token; +export declare function isESTreeBinaryOperator(operator: ts.BinaryOperatorToken): operator is ts.Token; +type TokenForTokenKind = T extends keyof TokenToText ? TokenToText[T] : string | undefined; +/** + * Returns the string form of the given TSToken SyntaxKind + */ +export declare function getTextForTokenKind(kind: T): TokenForTokenKind; +/** + * Returns true if the given ts.Node is a valid ESTree class member + */ +export declare function isESTreeClassMember(node: ts.Node): boolean; +/** + * Checks if a ts.Node has a modifier + */ +export declare function hasModifier(modifierKind: ts.KeywordSyntaxKind, node: ts.Node): boolean; +/** + * Get last last modifier in ast + * @returns returns last modifier if present or null + */ +export declare function getLastModifier(node: ts.Node): ts.Modifier | null; +/** + * Returns true if the given ts.Token is a comma + */ +export declare function isComma(token: ts.Node): token is ts.Token; +/** + * Returns true if the given ts.Node is a comment + */ +export declare function isComment(node: ts.Node): boolean; +/** + * Returns the binary expression type of the given ts.Token + */ +export declare function getBinaryExpressionType(operator: ts.BinaryOperatorToken): { + operator: TokenForTokenKind; + type: AST_NODE_TYPES.AssignmentExpression; +} | { + operator: TokenForTokenKind; + type: AST_NODE_TYPES.BinaryExpression; +} | { + operator: TokenForTokenKind; + type: AST_NODE_TYPES.LogicalExpression; +}; +/** + * Returns line and column data for the given positions + */ +export declare function getLineAndCharacterFor(pos: number, ast: ts.SourceFile): TSESTree.Position; +/** + * Returns line and column data for the given start and end positions, + * for the given AST + */ +export declare function getLocFor(range: TSESTree.Range, ast: ts.SourceFile): TSESTree.SourceLocation; +/** + * Check whatever node can contain directive + */ +export declare function canContainDirective(node: ts.Block | ts.ClassStaticBlockDeclaration | ts.ModuleBlock | ts.SourceFile): boolean; +/** + * Returns range for the given ts.Node + */ +export declare function getRange(node: Pick, ast: ts.SourceFile): [number, number]; +/** + * Returns true if a given ts.Node is a JSX token + */ +export declare function isJSXToken(node: ts.Node): boolean; +/** + * Returns the declaration kind of the given ts.Node + */ +export declare function getDeclarationKind(node: ts.VariableDeclarationList): DeclarationKind; +/** + * Gets a ts.Node's accessibility level + */ +export declare function getTSNodeAccessibility(node: ts.Node): 'private' | 'protected' | 'public' | undefined; +/** + * Finds the next token based on the previous one and its parent + * Had to copy this from TS instead of using TS's version because theirs doesn't pass the ast to getChildren + */ +export declare function findNextToken(previousToken: ts.TextRange, parent: ts.Node, ast: ts.SourceFile): ts.Node | undefined; +/** + * Find the first matching ancestor based on the given predicate function. + * @param node The current ts.Node + * @param predicate The predicate function to apply to each checked ancestor + * @returns a matching parent ts.Node + */ +export declare function findFirstMatchingAncestor(node: ts.Node, predicate: (node: ts.Node) => boolean): ts.Node | undefined; +/** + * Returns true if a given ts.Node has a JSX token within its hierarchy + */ +export declare function hasJSXAncestor(node: ts.Node): boolean; +/** + * Unescape the text content of string literals, e.g. & -> & + * @param text The escaped string literal text. + * @returns The unescaped string literal text. + */ +export declare function unescapeStringLiteralText(text: string): string; +/** + * Returns true if a given ts.Node is a computed property + */ +export declare function isComputedProperty(node: ts.Node): node is ts.ComputedPropertyName; +/** + * Returns true if a given ts.Node is optional (has QuestionToken) + * @param node ts.Node to be checked + */ +export declare function isOptional(node: { + questionToken?: ts.QuestionToken; +}): boolean; +/** + * Returns true if the node is an optional chain node + */ +export declare function isChainExpression(node: TSESTree.Node): node is TSESTree.ChainExpression; +/** + * Returns true of the child of property access expression is an optional chain + */ +export declare function isChildUnwrappableOptionalChain(node: ts.CallExpression | ts.ElementAccessExpression | ts.NonNullExpression | ts.PropertyAccessExpression, child: TSESTree.Node): boolean; +/** + * Returns the type of a given ts.Token + */ +export declare function getTokenType(token: ts.Identifier | ts.Token): Exclude; +/** + * Extends and formats a given ts.Token, for a given AST + */ +export declare function convertToken(token: ts.Token, ast: ts.SourceFile): TSESTree.Token; +/** + * Converts all tokens for the given AST + * @param ast the AST object + * @returns the converted Tokens + */ +export declare function convertTokens(ast: ts.SourceFile): TSESTree.Token[]; +export declare class TSError extends Error { + readonly fileName: string; + readonly location: { + end: { + column: number; + line: number; + offset: number; + }; + start: { + column: number; + line: number; + offset: number; + }; + }; + constructor(message: string, fileName: string, location: { + end: { + column: number; + line: number; + offset: number; + }; + start: { + column: number; + line: number; + offset: number; + }; + }); + get index(): number; + get lineNumber(): number; + get column(): number; +} +export declare function createError(message: string, ast: ts.SourceFile, startIndex: number, endIndex?: number): TSError; +export declare function nodeHasIllegalDecorators(node: ts.Node): node is { + illegalDecorators: ts.Node[]; +} & ts.Node; +export declare function nodeHasTokens(n: ts.Node, ast: ts.SourceFile): boolean; +/** + * Like `forEach`, but suitable for use with numbers and strings (which may be falsy). + */ +export declare function firstDefined(array: readonly T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined; +export declare function identifierIsThisKeyword(id: ts.Identifier): boolean; +export declare function isThisIdentifier(node: ts.Node | undefined): node is ts.Identifier; +export declare function isThisInTypeQuery(node: ts.Node): boolean; +export declare function nodeIsPresent(node: ts.Node | undefined): node is ts.Node; +export declare function getContainingFunction(node: ts.Node): ts.SignatureDeclaration | undefined; +export declare function nodeCanBeDecorated(node: TSNode): boolean; +export declare function isValidAssignmentTarget(node: ts.Node): boolean; +export declare function getNamespaceModifiers(node: ts.ModuleDeclaration): ts.Modifier[] | undefined; +export {}; +//# sourceMappingURL=node-utils.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map new file mode 100644 index 0000000..93da828 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"node-utils.d.ts","sourceRoot":"","sources":["../src/node-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIpD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAK9D,QAAA,MAAM,UAAU,sBAAgB,CAAC;AAEjC,KAAK,mBAAmB,GACpB,EAAE,CAAC,UAAU,CAAC,uBAAuB,GACrC,EAAE,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IAAI,GAAG,SAAS,GACxB,IAAI,IAAI,EAAE,CAAC,UAAU,CAMvB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAUxD;AAeD,wBAAgB,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,IAAI,CAExE;AAGD,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,EAAE,CAAC,oBAAoB,GAAG,SAAS,CAErC;AA4BD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAuDxD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CA6B9D;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,EAAE,CAAC,iBAAiB,GACzB,EAAE,CAAC,QAAQ,EAAE,GAAG,SAAS,CAgB3B"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js new file mode 100644 index 0000000..5873480 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js @@ -0,0 +1,736 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSError = void 0; +exports.isLogicalOperator = isLogicalOperator; +exports.isESTreeBinaryOperator = isESTreeBinaryOperator; +exports.getTextForTokenKind = getTextForTokenKind; +exports.isESTreeClassMember = isESTreeClassMember; +exports.hasModifier = hasModifier; +exports.getLastModifier = getLastModifier; +exports.isComma = isComma; +exports.isComment = isComment; +exports.getBinaryExpressionType = getBinaryExpressionType; +exports.getLineAndCharacterFor = getLineAndCharacterFor; +exports.getLocFor = getLocFor; +exports.canContainDirective = canContainDirective; +exports.getRange = getRange; +exports.isJSXToken = isJSXToken; +exports.getDeclarationKind = getDeclarationKind; +exports.getTSNodeAccessibility = getTSNodeAccessibility; +exports.findNextToken = findNextToken; +exports.findFirstMatchingAncestor = findFirstMatchingAncestor; +exports.hasJSXAncestor = hasJSXAncestor; +exports.unescapeStringLiteralText = unescapeStringLiteralText; +exports.isComputedProperty = isComputedProperty; +exports.isOptional = isOptional; +exports.isChainExpression = isChainExpression; +exports.isChildUnwrappableOptionalChain = isChildUnwrappableOptionalChain; +exports.getTokenType = getTokenType; +exports.convertToken = convertToken; +exports.convertTokens = convertTokens; +exports.createError = createError; +exports.nodeHasIllegalDecorators = nodeHasIllegalDecorators; +exports.nodeHasTokens = nodeHasTokens; +exports.firstDefined = firstDefined; +exports.identifierIsThisKeyword = identifierIsThisKeyword; +exports.isThisIdentifier = isThisIdentifier; +exports.isThisInTypeQuery = isThisInTypeQuery; +exports.nodeIsPresent = nodeIsPresent; +exports.getContainingFunction = getContainingFunction; +exports.nodeCanBeDecorated = nodeCanBeDecorated; +exports.isValidAssignmentTarget = isValidAssignmentTarget; +exports.getNamespaceModifiers = getNamespaceModifiers; +const ts = __importStar(require("typescript")); +const getModifiers_1 = require("./getModifiers"); +const xhtml_entities_1 = require("./jsx/xhtml-entities"); +const ts_estree_1 = require("./ts-estree"); +const version_check_1 = require("./version-check"); +const isAtLeast50 = version_check_1.typescriptVersionIsAtLeast['5.0']; +const SyntaxKind = ts.SyntaxKind; +const LOGICAL_OPERATORS = new Set([ + SyntaxKind.AmpersandAmpersandToken, + SyntaxKind.BarBarToken, + SyntaxKind.QuestionQuestionToken, +]); +const ASSIGNMENT_OPERATORS = new Set([ + ts.SyntaxKind.AmpersandAmpersandEqualsToken, + ts.SyntaxKind.AmpersandEqualsToken, + ts.SyntaxKind.AsteriskAsteriskEqualsToken, + ts.SyntaxKind.AsteriskEqualsToken, + ts.SyntaxKind.BarBarEqualsToken, + ts.SyntaxKind.BarEqualsToken, + ts.SyntaxKind.CaretEqualsToken, + ts.SyntaxKind.EqualsToken, + ts.SyntaxKind.GreaterThanGreaterThanEqualsToken, + ts.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken, + ts.SyntaxKind.LessThanLessThanEqualsToken, + ts.SyntaxKind.MinusEqualsToken, + ts.SyntaxKind.PercentEqualsToken, + ts.SyntaxKind.PlusEqualsToken, + ts.SyntaxKind.QuestionQuestionEqualsToken, + ts.SyntaxKind.SlashEqualsToken, +]); +const BINARY_OPERATORS = new Set([ + SyntaxKind.AmpersandAmpersandToken, + SyntaxKind.AmpersandToken, + SyntaxKind.AsteriskAsteriskToken, + SyntaxKind.AsteriskToken, + SyntaxKind.BarBarToken, + SyntaxKind.BarToken, + SyntaxKind.CaretToken, + SyntaxKind.EqualsEqualsEqualsToken, + SyntaxKind.EqualsEqualsToken, + SyntaxKind.ExclamationEqualsEqualsToken, + SyntaxKind.ExclamationEqualsToken, + SyntaxKind.GreaterThanEqualsToken, + SyntaxKind.GreaterThanGreaterThanGreaterThanToken, + SyntaxKind.GreaterThanGreaterThanToken, + SyntaxKind.GreaterThanToken, + SyntaxKind.InKeyword, + SyntaxKind.InstanceOfKeyword, + SyntaxKind.LessThanEqualsToken, + SyntaxKind.LessThanLessThanToken, + SyntaxKind.LessThanToken, + SyntaxKind.MinusToken, + SyntaxKind.PercentToken, + SyntaxKind.PlusToken, + SyntaxKind.SlashToken, +]); +/** + * Returns true if the given ts.Token is the assignment operator + */ +function isAssignmentOperator(operator) { + return ASSIGNMENT_OPERATORS.has(operator.kind); +} +/** + * Returns true if the given ts.Token is a logical operator + */ +function isLogicalOperator(operator) { + return LOGICAL_OPERATORS.has(operator.kind); +} +function isESTreeBinaryOperator(operator) { + return BINARY_OPERATORS.has(operator.kind); +} +/** + * Returns the string form of the given TSToken SyntaxKind + */ +function getTextForTokenKind(kind) { + return ts.tokenToString(kind); +} +/** + * Returns true if the given ts.Node is a valid ESTree class member + */ +function isESTreeClassMember(node) { + return node.kind !== SyntaxKind.SemicolonClassElement; +} +/** + * Checks if a ts.Node has a modifier + */ +function hasModifier(modifierKind, node) { + const modifiers = (0, getModifiers_1.getModifiers)(node); + return modifiers?.some(modifier => modifier.kind === modifierKind) === true; +} +/** + * Get last last modifier in ast + * @returns returns last modifier if present or null + */ +function getLastModifier(node) { + const modifiers = (0, getModifiers_1.getModifiers)(node); + if (modifiers == null) { + return null; + } + return modifiers[modifiers.length - 1] ?? null; +} +/** + * Returns true if the given ts.Token is a comma + */ +function isComma(token) { + return token.kind === SyntaxKind.CommaToken; +} +/** + * Returns true if the given ts.Node is a comment + */ +function isComment(node) { + return (node.kind === SyntaxKind.SingleLineCommentTrivia || + node.kind === SyntaxKind.MultiLineCommentTrivia); +} +/** + * Returns true if the given ts.Node is a JSDoc comment + */ +function isJSDocComment(node) { + // eslint-disable-next-line @typescript-eslint/no-deprecated -- SyntaxKind.JSDoc was only added in TS4.7 so we can't use it yet + return node.kind === SyntaxKind.JSDocComment; +} +/** + * Returns the binary expression type of the given ts.Token + */ +function getBinaryExpressionType(operator) { + if (isAssignmentOperator(operator)) { + return { + type: ts_estree_1.AST_NODE_TYPES.AssignmentExpression, + operator: getTextForTokenKind(operator.kind), + }; + } + if (isLogicalOperator(operator)) { + return { + type: ts_estree_1.AST_NODE_TYPES.LogicalExpression, + operator: getTextForTokenKind(operator.kind), + }; + } + if (isESTreeBinaryOperator(operator)) { + return { + type: ts_estree_1.AST_NODE_TYPES.BinaryExpression, + operator: getTextForTokenKind(operator.kind), + }; + } + throw new Error(`Unexpected binary operator ${ts.tokenToString(operator.kind)}`); +} +/** + * Returns line and column data for the given positions + */ +function getLineAndCharacterFor(pos, ast) { + const loc = ast.getLineAndCharacterOfPosition(pos); + return { + column: loc.character, + line: loc.line + 1, + }; +} +/** + * Returns line and column data for the given start and end positions, + * for the given AST + */ +function getLocFor(range, ast) { + const [start, end] = range.map(pos => getLineAndCharacterFor(pos, ast)); + return { end, start }; +} +/** + * Check whatever node can contain directive + */ +function canContainDirective(node) { + if (node.kind === ts.SyntaxKind.Block) { + switch (node.parent.kind) { + case ts.SyntaxKind.Constructor: + case ts.SyntaxKind.GetAccessor: + case ts.SyntaxKind.SetAccessor: + case ts.SyntaxKind.ArrowFunction: + case ts.SyntaxKind.FunctionExpression: + case ts.SyntaxKind.FunctionDeclaration: + case ts.SyntaxKind.MethodDeclaration: + return true; + default: + return false; + } + } + return true; +} +/** + * Returns range for the given ts.Node + */ +function getRange(node, ast) { + return [node.getStart(ast), node.getEnd()]; +} +/** + * Returns true if a given ts.Node is a token + */ +function isToken(node) { + return (node.kind >= SyntaxKind.FirstToken && node.kind <= SyntaxKind.LastToken); +} +/** + * Returns true if a given ts.Node is a JSX token + */ +function isJSXToken(node) { + return (node.kind >= SyntaxKind.JsxElement && node.kind <= SyntaxKind.JsxAttribute); +} +/** + * Returns the declaration kind of the given ts.Node + */ +function getDeclarationKind(node) { + if (node.flags & ts.NodeFlags.Let) { + return 'let'; + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison + if ((node.flags & ts.NodeFlags.AwaitUsing) === ts.NodeFlags.AwaitUsing) { + return 'await using'; + } + if (node.flags & ts.NodeFlags.Const) { + return 'const'; + } + if (node.flags & ts.NodeFlags.Using) { + return 'using'; + } + return 'var'; +} +/** + * Gets a ts.Node's accessibility level + */ +function getTSNodeAccessibility(node) { + const modifiers = (0, getModifiers_1.getModifiers)(node); + if (modifiers == null) { + return undefined; + } + for (const modifier of modifiers) { + switch (modifier.kind) { + case SyntaxKind.PublicKeyword: + return 'public'; + case SyntaxKind.ProtectedKeyword: + return 'protected'; + case SyntaxKind.PrivateKeyword: + return 'private'; + default: + break; + } + } + return undefined; +} +/** + * Finds the next token based on the previous one and its parent + * Had to copy this from TS instead of using TS's version because theirs doesn't pass the ast to getChildren + */ +function findNextToken(previousToken, parent, ast) { + return find(parent); + function find(n) { + if (ts.isToken(n) && n.pos === previousToken.end) { + // this is token that starts at the end of previous token - return it + return n; + } + return firstDefined(n.getChildren(ast), (child) => { + const shouldDiveInChildNode = + // previous token is enclosed somewhere in the child + (child.pos <= previousToken.pos && child.end > previousToken.end) || + // previous token ends exactly at the beginning of child + child.pos === previousToken.end; + return shouldDiveInChildNode && nodeHasTokens(child, ast) + ? find(child) + : undefined; + }); + } +} +/** + * Find the first matching ancestor based on the given predicate function. + * @param node The current ts.Node + * @param predicate The predicate function to apply to each checked ancestor + * @returns a matching parent ts.Node + */ +function findFirstMatchingAncestor(node, predicate) { + let current = node; + while (current) { + if (predicate(current)) { + return current; + } + current = current.parent; + } + return undefined; +} +/** + * Returns true if a given ts.Node has a JSX token within its hierarchy + */ +function hasJSXAncestor(node) { + return !!findFirstMatchingAncestor(node, isJSXToken); +} +/** + * Unescape the text content of string literals, e.g. & -> & + * @param text The escaped string literal text. + * @returns The unescaped string literal text. + */ +function unescapeStringLiteralText(text) { + return text.replaceAll(/&(?:#\d+|#x[\da-fA-F]+|[0-9a-zA-Z]+);/g, entity => { + const item = entity.slice(1, -1); + if (item[0] === '#') { + const codePoint = item[1] === 'x' + ? parseInt(item.slice(2), 16) + : parseInt(item.slice(1), 10); + return codePoint > 0x10ffff // RangeError: Invalid code point + ? entity + : String.fromCodePoint(codePoint); + } + return xhtml_entities_1.xhtmlEntities[item] || entity; + }); +} +/** + * Returns true if a given ts.Node is a computed property + */ +function isComputedProperty(node) { + return node.kind === SyntaxKind.ComputedPropertyName; +} +/** + * Returns true if a given ts.Node is optional (has QuestionToken) + * @param node ts.Node to be checked + */ +function isOptional(node) { + return !!node.questionToken; +} +/** + * Returns true if the node is an optional chain node + */ +function isChainExpression(node) { + return node.type === ts_estree_1.AST_NODE_TYPES.ChainExpression; +} +/** + * Returns true of the child of property access expression is an optional chain + */ +function isChildUnwrappableOptionalChain(node, child) { + return (isChainExpression(child) && + // (x?.y).z is semantically different, and as such .z is no longer optional + node.expression.kind !== ts.SyntaxKind.ParenthesizedExpression); +} +/** + * Returns the type of a given ts.Token + */ +function getTokenType(token) { + if (token.kind === SyntaxKind.NullKeyword) { + return ts_estree_1.AST_TOKEN_TYPES.Null; + } + if (token.kind >= SyntaxKind.FirstKeyword && + token.kind <= SyntaxKind.LastFutureReservedWord) { + if (token.kind === SyntaxKind.FalseKeyword || + token.kind === SyntaxKind.TrueKeyword) { + return ts_estree_1.AST_TOKEN_TYPES.Boolean; + } + return ts_estree_1.AST_TOKEN_TYPES.Keyword; + } + if (token.kind >= SyntaxKind.FirstPunctuation && + token.kind <= SyntaxKind.LastPunctuation) { + return ts_estree_1.AST_TOKEN_TYPES.Punctuator; + } + if (token.kind >= SyntaxKind.NoSubstitutionTemplateLiteral && + token.kind <= SyntaxKind.TemplateTail) { + return ts_estree_1.AST_TOKEN_TYPES.Template; + } + switch (token.kind) { + case SyntaxKind.NumericLiteral: + case SyntaxKind.BigIntLiteral: + return ts_estree_1.AST_TOKEN_TYPES.Numeric; + case SyntaxKind.PrivateIdentifier: + return ts_estree_1.AST_TOKEN_TYPES.PrivateIdentifier; + case SyntaxKind.JsxText: + return ts_estree_1.AST_TOKEN_TYPES.JSXText; + case SyntaxKind.StringLiteral: + // A TypeScript-StringLiteral token with a TypeScript-JsxAttribute or TypeScript-JsxElement parent, + // must actually be an ESTree-JSXText token + if (token.parent.kind === SyntaxKind.JsxAttribute || + token.parent.kind === SyntaxKind.JsxElement) { + return ts_estree_1.AST_TOKEN_TYPES.JSXText; + } + return ts_estree_1.AST_TOKEN_TYPES.String; + case SyntaxKind.RegularExpressionLiteral: + return ts_estree_1.AST_TOKEN_TYPES.RegularExpression; + case SyntaxKind.Identifier: + case SyntaxKind.ConstructorKeyword: + case SyntaxKind.GetKeyword: + case SyntaxKind.SetKeyword: + // intentional fallthrough + default: + } + // Some JSX tokens have to be determined based on their parent + if (token.kind === SyntaxKind.Identifier) { + if (isJSXToken(token.parent)) { + return ts_estree_1.AST_TOKEN_TYPES.JSXIdentifier; + } + if (token.parent.kind === SyntaxKind.PropertyAccessExpression && + hasJSXAncestor(token)) { + return ts_estree_1.AST_TOKEN_TYPES.JSXIdentifier; + } + } + return ts_estree_1.AST_TOKEN_TYPES.Identifier; +} +/** + * Extends and formats a given ts.Token, for a given AST + */ +function convertToken(token, ast) { + const start = token.kind === SyntaxKind.JsxText + ? token.getFullStart() + : token.getStart(ast); + const end = token.getEnd(); + const value = ast.text.slice(start, end); + const tokenType = getTokenType(token); + const range = [start, end]; + const loc = getLocFor(range, ast); + if (tokenType === ts_estree_1.AST_TOKEN_TYPES.RegularExpression) { + return { + type: tokenType, + loc, + range, + regex: { + flags: value.slice(value.lastIndexOf('/') + 1), + pattern: value.slice(1, value.lastIndexOf('/')), + }, + value, + }; + } + if (tokenType === ts_estree_1.AST_TOKEN_TYPES.PrivateIdentifier) { + return { + type: tokenType, + loc, + range, + value: value.slice(1), + }; + } + // @ts-expect-error TS is complaining about `value` not being the correct + // type but it is + return { + type: tokenType, + loc, + range, + value, + }; +} +/** + * Converts all tokens for the given AST + * @param ast the AST object + * @returns the converted Tokens + */ +function convertTokens(ast) { + const result = []; + /** + * @param node the ts.Node + */ + function walk(node) { + // TypeScript generates tokens for types in JSDoc blocks. Comment tokens + // and their children should not be walked or added to the resulting tokens list. + if (isComment(node) || isJSDocComment(node)) { + return; + } + if (isToken(node) && node.kind !== SyntaxKind.EndOfFileToken) { + result.push(convertToken(node, ast)); + } + else { + node.getChildren(ast).forEach(walk); + } + } + walk(ast); + return result; +} +class TSError extends Error { + fileName; + location; + constructor(message, fileName, location) { + super(message); + this.fileName = fileName; + this.location = location; + Object.defineProperty(this, 'name', { + configurable: true, + enumerable: false, + value: new.target.name, + }); + } + // For old version of ESLint https://github.com/typescript-eslint/typescript-eslint/pull/6556#discussion_r1123237311 + get index() { + return this.location.start.offset; + } + // https://github.com/eslint/eslint/blob/b09a512107249a4eb19ef5a37b0bd672266eafdb/lib/linter/linter.js#L853 + get lineNumber() { + return this.location.start.line; + } + // https://github.com/eslint/eslint/blob/b09a512107249a4eb19ef5a37b0bd672266eafdb/lib/linter/linter.js#L854 + get column() { + return this.location.start.column; + } +} +exports.TSError = TSError; +function createError(message, ast, startIndex, endIndex = startIndex) { + const [start, end] = [startIndex, endIndex].map(offset => { + const { character: column, line } = ast.getLineAndCharacterOfPosition(offset); + return { column, line: line + 1, offset }; + }); + return new TSError(message, ast.fileName, { end, start }); +} +function nodeHasIllegalDecorators(node) { + return !!('illegalDecorators' in node && + node.illegalDecorators?.length); +} +function nodeHasTokens(n, ast) { + // If we have a token or node that has a non-zero width, it must have tokens. + // Note: getWidth() does not take trivia into account. + return n.kind === SyntaxKind.EndOfFileToken + ? !!n.jsDoc + : n.getWidth(ast) !== 0; +} +/** + * Like `forEach`, but suitable for use with numbers and strings (which may be falsy). + */ +function firstDefined(array, callback) { + // eslint-disable-next-line @typescript-eslint/internal/eqeq-nullish + if (array === undefined) { + return undefined; + } + for (let i = 0; i < array.length; i++) { + const result = callback(array[i], i); + // eslint-disable-next-line @typescript-eslint/internal/eqeq-nullish + if (result !== undefined) { + return result; + } + } + return undefined; +} +function identifierIsThisKeyword(id) { + return ((isAtLeast50 + ? ts.identifierToKeywordKind(id) + : // @ts-expect-error -- intentional fallback for older TS versions <=4.9 + id.originalKeywordKind) === SyntaxKind.ThisKeyword); +} +function isThisIdentifier(node) { + return (!!node && + node.kind === SyntaxKind.Identifier && + identifierIsThisKeyword(node)); +} +function isThisInTypeQuery(node) { + if (!isThisIdentifier(node)) { + return false; + } + while (ts.isQualifiedName(node.parent) && node.parent.left === node) { + node = node.parent; + } + return node.parent.kind === SyntaxKind.TypeQuery; +} +// `ts.nodeIsMissing` +function nodeIsMissing(node) { + if (node == null) { + return true; + } + return (node.pos === node.end && + node.pos >= 0 && + node.kind !== SyntaxKind.EndOfFileToken); +} +// `ts.nodeIsPresent` +function nodeIsPresent(node) { + return !nodeIsMissing(node); +} +// `ts.getContainingFunction` +function getContainingFunction(node) { + return ts.findAncestor(node.parent, ts.isFunctionLike); +} +// `ts.hasAbstractModifier` +function hasAbstractModifier(node) { + return hasModifier(SyntaxKind.AbstractKeyword, node); +} +// `ts.getThisParameter` +function getThisParameter(signature) { + if (signature.parameters.length && !ts.isJSDocSignature(signature)) { + const thisParameter = signature.parameters[0]; + if (parameterIsThisKeyword(thisParameter)) { + return thisParameter; + } + } + return null; +} +// `ts.parameterIsThisKeyword` +function parameterIsThisKeyword(parameter) { + return isThisIdentifier(parameter.name); +} +// Rewrite version of `ts.nodeCanBeDecorated` +// Returns `true` for both `useLegacyDecorators: true` and `useLegacyDecorators: false` +function nodeCanBeDecorated(node) { + switch (node.kind) { + case SyntaxKind.ClassDeclaration: + return true; + case SyntaxKind.ClassExpression: + // `ts.nodeCanBeDecorated` returns `false` if `useLegacyDecorators: true` + return true; + case SyntaxKind.PropertyDeclaration: { + const { parent } = node; + // `ts.nodeCanBeDecorated` uses this if `useLegacyDecorators: true` + if (ts.isClassDeclaration(parent)) { + return true; + } + // `ts.nodeCanBeDecorated` uses this if `useLegacyDecorators: false` + if (ts.isClassLike(parent) && !hasAbstractModifier(node)) { + return true; + } + return false; + } + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.MethodDeclaration: { + const { parent } = node; + // In `ts.nodeCanBeDecorated` + // when `useLegacyDecorators: true` uses `ts.isClassDeclaration` + // when `useLegacyDecorators: true` uses `ts.isClassLike` + return (Boolean(node.body) && + (ts.isClassDeclaration(parent) || ts.isClassLike(parent))); + } + case SyntaxKind.Parameter: { + // `ts.nodeCanBeDecorated` returns `false` if `useLegacyDecorators: false` + const { parent } = node; + const grandparent = parent.parent; + return (Boolean(parent) && + 'body' in parent && + Boolean(parent.body) && + (parent.kind === SyntaxKind.Constructor || + parent.kind === SyntaxKind.MethodDeclaration || + parent.kind === SyntaxKind.SetAccessor) && + getThisParameter(parent) !== node && + Boolean(grandparent) && + grandparent.kind === SyntaxKind.ClassDeclaration); + } + } + return false; +} +function isValidAssignmentTarget(node) { + switch (node.kind) { + case SyntaxKind.Identifier: + return true; + case SyntaxKind.PropertyAccessExpression: + case SyntaxKind.ElementAccessExpression: + if (node.flags & ts.NodeFlags.OptionalChain) { + return false; + } + return true; + case SyntaxKind.ParenthesizedExpression: + case SyntaxKind.TypeAssertionExpression: + case SyntaxKind.AsExpression: + case SyntaxKind.SatisfiesExpression: + case SyntaxKind.ExpressionWithTypeArguments: + case SyntaxKind.NonNullExpression: + return isValidAssignmentTarget(node.expression); + default: + return false; + } +} +function getNamespaceModifiers(node) { + // For following nested namespaces, use modifiers given to the topmost namespace + // export declare namespace foo.bar.baz {} + let modifiers = (0, getModifiers_1.getModifiers)(node); + let moduleDeclaration = node; + while ((!modifiers || modifiers.length === 0) && + ts.isModuleDeclaration(moduleDeclaration.parent)) { + const parentModifiers = (0, getModifiers_1.getModifiers)(moduleDeclaration.parent); + if (parentModifiers?.length) { + modifiers = parentModifiers; + } + moduleDeclaration = moduleDeclaration.parent; + } + return modifiers; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts new file mode 100644 index 0000000..59f94b4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts @@ -0,0 +1,17 @@ +import type { CacheDurationSeconds } from '@typescript-eslint/types'; +export declare const DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS = 30; +export interface CacheLike { + get(key: Key): Value | undefined; + set(key: Key, value: Value): this; +} +/** + * A map with key-level expiration. + */ +export declare class ExpiringCache implements CacheLike { + #private; + constructor(cacheDurationSeconds: CacheDurationSeconds); + clear(): void; + get(key: Key): Value | undefined; + set(key: Key, value: Value): this; +} +//# sourceMappingURL=ExpiringCache.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts.map new file mode 100644 index 0000000..00fcbd7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ExpiringCache.d.ts","sourceRoot":"","sources":["../../src/parseSettings/ExpiringCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,uCAAuC,KAAK,CAAC;AAG1D,MAAM,WAAW,SAAS,CAAC,GAAG,EAAE,KAAK;IACnC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,KAAK,GAAG,SAAS,CAAC;IACjC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,qBAAa,aAAa,CAAC,GAAG,EAAE,KAAK,CAAE,YAAW,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC;;gBAWzD,oBAAoB,EAAE,oBAAoB;IAItD,KAAK,IAAI,IAAI;IAIb,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,KAAK,GAAG,SAAS;IAmBhC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;CAWlC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js new file mode 100644 index 0000000..8a7920d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExpiringCache = exports.DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS = void 0; +exports.DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS = 30; +const ZERO_HR_TIME = [0, 0]; +/** + * A map with key-level expiration. + */ +class ExpiringCache { + #cacheDurationSeconds; + #map = new Map(); + constructor(cacheDurationSeconds) { + this.#cacheDurationSeconds = cacheDurationSeconds; + } + clear() { + this.#map.clear(); + } + get(key) { + const entry = this.#map.get(key); + if (entry?.value != null) { + if (this.#cacheDurationSeconds === 'Infinity') { + return entry.value; + } + const ageSeconds = process.hrtime(entry.lastSeen)[0]; + if (ageSeconds < this.#cacheDurationSeconds) { + // cache hit woo! + return entry.value; + } + // key has expired - clean it up to free up memory + this.#map.delete(key); + } + // no hit :'( + return undefined; + } + set(key, value) { + this.#map.set(key, { + lastSeen: this.#cacheDurationSeconds === 'Infinity' + ? // no need to waste time calculating the hrtime in infinity mode as there's no expiry + ZERO_HR_TIME + : process.hrtime(), + value, + }); + return this; + } +} +exports.ExpiringCache = ExpiringCache; diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/candidateTSConfigRootDirs.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/candidateTSConfigRootDirs.d.ts new file mode 100644 index 0000000..fb2bb8e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/candidateTSConfigRootDirs.d.ts @@ -0,0 +1,4 @@ +export declare function addCandidateTSConfigRootDir(candidate: string): void; +export declare function clearCandidateTSConfigRootDirs(): void; +export declare function getInferredTSConfigRootDir(): string; +//# sourceMappingURL=candidateTSConfigRootDirs.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/candidateTSConfigRootDirs.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/candidateTSConfigRootDirs.d.ts.map new file mode 100644 index 0000000..a1239c9 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/candidateTSConfigRootDirs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"candidateTSConfigRootDirs.d.ts","sourceRoot":"","sources":["../../src/parseSettings/candidateTSConfigRootDirs.ts"],"names":[],"mappings":"AAEA,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAEnE;AAED,wBAAgB,8BAA8B,IAAI,IAAI,CAErD;AAED,wBAAgB,0BAA0B,IAAI,MAAM,CAoBnD"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/candidateTSConfigRootDirs.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/candidateTSConfigRootDirs.js new file mode 100644 index 0000000..4b9a72e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/candidateTSConfigRootDirs.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.addCandidateTSConfigRootDir = addCandidateTSConfigRootDir; +exports.clearCandidateTSConfigRootDirs = clearCandidateTSConfigRootDirs; +exports.getInferredTSConfigRootDir = getInferredTSConfigRootDir; +const candidateTSConfigRootDirs = new Set(); +function addCandidateTSConfigRootDir(candidate) { + candidateTSConfigRootDirs.add(candidate); +} +function clearCandidateTSConfigRootDirs() { + candidateTSConfigRootDirs.clear(); +} +function getInferredTSConfigRootDir() { + const entries = [...candidateTSConfigRootDirs]; + switch (entries.length) { + case 0: + return process.cwd(); + case 1: + return entries[0]; + default: + throw new Error([ + 'No tsconfigRootDir was set, and multiple candidate TSConfigRootDirs are present:', + ...entries.map(candidate => ` - ${candidate}`), + "You'll need to explicitly set tsconfigRootDir in your parser options.", + 'See: https://typescript-eslint.io/packages/parser/#tsconfigrootdir', + ].join('\n')); + } +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts new file mode 100644 index 0000000..c16d7b6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts @@ -0,0 +1,7 @@ +import * as ts from 'typescript'; +import type { TSESTreeOptions } from '../parser-options'; +import type { MutableParseSettings } from './index'; +export declare function createParseSettings(code: string | ts.SourceFile, tsestreeOptions?: Partial): MutableParseSettings; +export declare function clearTSConfigMatchCache(): void; +export declare function clearTSServerProjectService(): void; +//# sourceMappingURL=createParseSettings.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts.map new file mode 100644 index 0000000..1f4033f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createParseSettings.d.ts","sourceRoot":"","sources":["../../src/parseSettings/createParseSettings.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAkCpD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,GAAG,EAAE,CAAC,UAAU,EAC5B,eAAe,GAAE,OAAO,CAAC,eAAe,CAAM,GAC7C,oBAAoB,CA0LtB;AAED,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C;AAED,wBAAgB,2BAA2B,IAAI,IAAI,CAElD"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js new file mode 100644 index 0000000..e3971fa --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js @@ -0,0 +1,244 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createParseSettings = createParseSettings; +exports.clearTSConfigMatchCache = clearTSConfigMatchCache; +exports.clearTSServerProjectService = clearTSServerProjectService; +const project_service_1 = require("@typescript-eslint/project-service"); +const debug_1 = __importDefault(require("debug")); +const node_path_1 = __importDefault(require("node:path")); +const ts = __importStar(require("typescript")); +const shared_1 = require("../create-program/shared"); +const validateDefaultProjectForFilesGlob_1 = require("../create-program/validateDefaultProjectForFilesGlob"); +const source_files_1 = require("../source-files"); +const candidateTSConfigRootDirs_1 = require("./candidateTSConfigRootDirs"); +const ExpiringCache_1 = require("./ExpiringCache"); +const getProjectConfigFiles_1 = require("./getProjectConfigFiles"); +const inferSingleRun_1 = require("./inferSingleRun"); +const resolveProjectList_1 = require("./resolveProjectList"); +const warnAboutTSVersion_1 = require("./warnAboutTSVersion"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:parseSettings:createParseSettings'); +let TSCONFIG_MATCH_CACHE; +let TSSERVER_PROJECT_SERVICE = null; +// NOTE - we intentionally use "unnecessary" `?.` here because in TS<5.3 this enum doesn't exist +// This object exists so we can centralize these for tracking and so we don't proliferate these across the file +// https://github.com/microsoft/TypeScript/issues/56579 +/* eslint-disable @typescript-eslint/no-unnecessary-condition */ +const JSDocParsingMode = { + ParseAll: ts.JSDocParsingMode?.ParseAll, + ParseForTypeErrors: ts.JSDocParsingMode?.ParseForTypeErrors, + ParseForTypeInfo: ts.JSDocParsingMode?.ParseForTypeInfo, + ParseNone: ts.JSDocParsingMode?.ParseNone, +}; +/* eslint-enable @typescript-eslint/no-unnecessary-condition */ +function createParseSettings(code, tsestreeOptions = {}) { + const codeFullText = enforceCodeString(code); + const singleRun = (0, inferSingleRun_1.inferSingleRun)(tsestreeOptions); + const tsconfigRootDir = (() => { + if (tsestreeOptions.tsconfigRootDir == null) { + const inferredTsconfigRootDir = (0, candidateTSConfigRootDirs_1.getInferredTSConfigRootDir)(); + if (node_path_1.default.resolve(inferredTsconfigRootDir) !== inferredTsconfigRootDir) { + throw new Error(`inferred tsconfigRootDir should be a resolved absolute path, but received: ${JSON.stringify(inferredTsconfigRootDir)}. This is a bug in typescript-eslint! Please report it to us at https://github.com/typescript-eslint/typescript-eslint/issues/new/choose.`); + } + return inferredTsconfigRootDir; + } + if (typeof tsestreeOptions.tsconfigRootDir === 'string') { + const userProvidedTsconfigRootDir = tsestreeOptions.tsconfigRootDir; + if (!node_path_1.default.isAbsolute(userProvidedTsconfigRootDir) || + // Ensure it's fully absolute with a drive letter if windows + (process.platform === 'win32' && + !/^[a-zA-Z]:/.test(userProvidedTsconfigRootDir))) { + throw new Error(`parserOptions.tsconfigRootDir must be an absolute path, but received: ${JSON.stringify(userProvidedTsconfigRootDir)}. This is a bug in your configuration; please supply an absolute path.`); + } + // Deal with any funny business around trailing path separators (a/b/) or relative path segments (/a/b/../c) + // Since we already know it's absolute, we can safely use path.resolve here. + return node_path_1.default.resolve(userProvidedTsconfigRootDir); + } + throw new Error(`If provided, parserOptions.tsconfigRootDir must be a string, but received a value of type "${typeof tsestreeOptions.tsconfigRootDir}"`); + })(); + const passedLoggerFn = typeof tsestreeOptions.loggerFn === 'function'; + const filePath = (0, shared_1.ensureAbsolutePath)(typeof tsestreeOptions.filePath === 'string' && + tsestreeOptions.filePath !== '' + ? tsestreeOptions.filePath + : getFileName(tsestreeOptions.jsx), tsconfigRootDir); + const extension = node_path_1.default.extname(filePath).toLowerCase(); + const jsDocParsingMode = (() => { + switch (tsestreeOptions.jsDocParsingMode) { + case 'all': + return JSDocParsingMode.ParseAll; + case 'none': + return JSDocParsingMode.ParseNone; + case 'type-info': + return JSDocParsingMode.ParseForTypeInfo; + default: + return JSDocParsingMode.ParseAll; + } + })(); + const parseSettings = { + loc: tsestreeOptions.loc === true, + range: tsestreeOptions.range === true, + allowInvalidAST: tsestreeOptions.allowInvalidAST === true, + code, + codeFullText, + comment: tsestreeOptions.comment === true, + comments: [], + debugLevel: tsestreeOptions.debugLevel === true + ? new Set(['typescript-eslint']) + : Array.isArray(tsestreeOptions.debugLevel) + ? new Set(tsestreeOptions.debugLevel) + : new Set(), + errorOnTypeScriptSyntacticAndSemanticIssues: false, + errorOnUnknownASTType: tsestreeOptions.errorOnUnknownASTType === true, + extraFileExtensions: Array.isArray(tsestreeOptions.extraFileExtensions) && + tsestreeOptions.extraFileExtensions.every(ext => typeof ext === 'string') + ? tsestreeOptions.extraFileExtensions + : [], + filePath, + jsDocParsingMode, + jsx: tsestreeOptions.jsx === true, + log: typeof tsestreeOptions.loggerFn === 'function' + ? tsestreeOptions.loggerFn + : tsestreeOptions.loggerFn === false + ? () => { } // eslint-disable-line @typescript-eslint/no-empty-function + : console.log, // eslint-disable-line no-console + preserveNodeMaps: tsestreeOptions.preserveNodeMaps !== false, + programs: Array.isArray(tsestreeOptions.programs) + ? tsestreeOptions.programs + : null, + projects: new Map(), + projectService: tsestreeOptions.projectService || + (tsestreeOptions.project && + tsestreeOptions.projectService !== false && + process.env.TYPESCRIPT_ESLINT_PROJECT_SERVICE === 'true') + ? populateProjectService(tsestreeOptions.projectService, { + jsDocParsingMode, + tsconfigRootDir, + }) + : undefined, + setExternalModuleIndicator: tsestreeOptions.sourceType === 'module' || + (tsestreeOptions.sourceType == null && extension === ts.Extension.Mjs) || + (tsestreeOptions.sourceType == null && extension === ts.Extension.Mts) + ? (file) => { + file.externalModuleIndicator = true; + } + : undefined, + singleRun, + suppressDeprecatedPropertyWarnings: tsestreeOptions.suppressDeprecatedPropertyWarnings ?? + process.env.NODE_ENV !== 'test', + tokens: tsestreeOptions.tokens === true ? [] : null, + tsconfigMatchCache: (TSCONFIG_MATCH_CACHE ??= new ExpiringCache_1.ExpiringCache(singleRun + ? 'Infinity' + : (tsestreeOptions.cacheLifetime?.glob ?? + ExpiringCache_1.DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS))), + tsconfigRootDir, + }; + // debug doesn't support multiple `enable` calls, so have to do it all at once + if (parseSettings.debugLevel.size > 0) { + const namespaces = []; + if (parseSettings.debugLevel.has('typescript-eslint')) { + namespaces.push('typescript-eslint:*'); + } + if (parseSettings.debugLevel.has('eslint') || + // make sure we don't turn off the eslint debug if it was enabled via --debug + debug_1.default.enabled('eslint:*,-eslint:code-path')) { + // https://github.com/eslint/eslint/blob/9dfc8501fb1956c90dc11e6377b4cb38a6bea65d/bin/eslint.js#L25 + namespaces.push('eslint:*,-eslint:code-path'); + } + debug_1.default.enable(namespaces.join(',')); + } + if (Array.isArray(tsestreeOptions.programs)) { + if (!tsestreeOptions.programs.length) { + throw new Error(`You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.`); + } + log('parserOptions.programs was provided, so parserOptions.project will be ignored.'); + } + // Providing a program or project service overrides project resolution + if (!parseSettings.programs && !parseSettings.projectService) { + parseSettings.projects = (0, resolveProjectList_1.resolveProjectList)({ + cacheLifetime: tsestreeOptions.cacheLifetime, + project: (0, getProjectConfigFiles_1.getProjectConfigFiles)(parseSettings, tsestreeOptions.project), + projectFolderIgnoreList: tsestreeOptions.projectFolderIgnoreList, + singleRun: parseSettings.singleRun, + tsconfigRootDir, + }); + } + // No type-aware linting which means that cross-file (or even same-file) JSDoc is useless + // So in this specific case we default to 'none' if no value was provided + if (tsestreeOptions.jsDocParsingMode == null && + parseSettings.projects.size === 0 && + parseSettings.programs == null && + parseSettings.projectService == null) { + parseSettings.jsDocParsingMode = JSDocParsingMode.ParseNone; + } + (0, warnAboutTSVersion_1.warnAboutTSVersion)(parseSettings, passedLoggerFn); + return parseSettings; +} +function clearTSConfigMatchCache() { + TSCONFIG_MATCH_CACHE?.clear(); +} +function clearTSServerProjectService() { + TSSERVER_PROJECT_SERVICE = null; +} +/** + * Ensures source code is a string. + */ +function enforceCodeString(code) { + return (0, source_files_1.isSourceFile)(code) + ? code.getFullText(code) + : typeof code === 'string' + ? code + : String(code); +} +/** + * Compute the filename based on the parser options. + * + * Even if jsx option is set in typescript compiler, filename still has to + * contain .tsx file extension. + */ +function getFileName(jsx) { + return jsx ? 'estree.tsx' : 'estree.ts'; +} +function populateProjectService(optionsRaw, settings) { + const options = typeof optionsRaw === 'object' ? optionsRaw : {}; + (0, validateDefaultProjectForFilesGlob_1.validateDefaultProjectForFilesGlob)(options.allowDefaultProject); + TSSERVER_PROJECT_SERVICE ??= (0, project_service_1.createProjectService)({ + options, + ...settings, + }); + return TSSERVER_PROJECT_SERVICE; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts new file mode 100644 index 0000000..9e39a29 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts @@ -0,0 +1,13 @@ +import type { TSESTreeOptions } from '../parser-options'; +import type { ParseSettings } from './index'; +/** + * Checks for a matching TSConfig to a file including its parent directories, + * permanently caching results under each directory it checks. + * + * @remarks + * We don't (yet!) have a way to attach file watchers on disk, but still need to + * cache file checks for rapid subsequent calls to fs.existsSync. See discussion + * in https://github.com/typescript-eslint/typescript-eslint/issues/101. + */ +export declare function getProjectConfigFiles(parseSettings: Pick, project: TSESTreeOptions['project']): string[] | null; +//# sourceMappingURL=getProjectConfigFiles.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts.map new file mode 100644 index 0000000..f23b3b4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getProjectConfigFiles.d.ts","sourceRoot":"","sources":["../../src/parseSettings/getProjectConfigFiles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAM7C;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,IAAI,CACjB,aAAa,EACb,UAAU,GAAG,oBAAoB,GAAG,iBAAiB,CACtD,EACD,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,GAClC,MAAM,EAAE,GAAG,IAAI,CAuCjB"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js new file mode 100644 index 0000000..bc9c689 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js @@ -0,0 +1,82 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getProjectConfigFiles = getProjectConfigFiles; +const debug_1 = __importDefault(require("debug")); +const fs = __importStar(require("node:fs")); +const path = __importStar(require("node:path")); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:parseSettings:getProjectConfigFiles'); +/** + * Checks for a matching TSConfig to a file including its parent directories, + * permanently caching results under each directory it checks. + * + * @remarks + * We don't (yet!) have a way to attach file watchers on disk, but still need to + * cache file checks for rapid subsequent calls to fs.existsSync. See discussion + * in https://github.com/typescript-eslint/typescript-eslint/issues/101. + */ +function getProjectConfigFiles(parseSettings, project) { + if (project !== true) { + if (project == null || project === false) { + return null; + } + if (Array.isArray(project)) { + return project; + } + return [project]; + } + log('Looking for tsconfig.json at or above file: %s', parseSettings.filePath); + let directory = path.dirname(parseSettings.filePath); + const checkedDirectories = [directory]; + do { + log('Checking tsconfig.json path: %s', directory); + const tsconfigPath = path.join(directory, 'tsconfig.json'); + const cached = parseSettings.tsconfigMatchCache.get(directory) ?? + (fs.existsSync(tsconfigPath) && tsconfigPath); + if (cached) { + for (const directory of checkedDirectories) { + parseSettings.tsconfigMatchCache.set(directory, cached); + } + return [cached]; + } + directory = path.dirname(directory); + checkedDirectories.push(directory); + } while (directory.length > 1 && + directory.length >= parseSettings.tsconfigRootDir.length); + throw new Error(`project was set to \`true\` but couldn't find any tsconfig.json relative to '${parseSettings.filePath}' within '${parseSettings.tsconfigRootDir}'.`); +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts new file mode 100644 index 0000000..b238545 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts @@ -0,0 +1,127 @@ +import type { ProjectServiceAndMetadata } from '@typescript-eslint/project-service'; +import type * as ts from 'typescript'; +import type { CanonicalPath } from '../create-program/shared'; +import type { TSESTree } from '../ts-estree'; +import type { CacheLike } from './ExpiringCache'; +type DebugModule = 'eslint' | 'typescript' | 'typescript-eslint'; +declare module 'typescript' { + enum JSDocParsingMode { + } +} +declare module 'typescript/lib/tsserverlibrary' { + enum JSDocParsingMode { + } +} +/** + * Internal settings used by the parser to run on a file. + */ +export interface MutableParseSettings { + /** + * Prevents the parser from throwing an error if it receives an invalid AST from TypeScript. + */ + allowInvalidAST: boolean; + /** + * Code of the file being parsed, or raw source file containing it. + */ + code: string | ts.SourceFile; + /** + * Full text of the file being parsed. + */ + codeFullText: string; + /** + * Whether the `comment` parse option is enabled. + */ + comment: boolean; + /** + * If the `comment` parse option is enabled, retrieved comments. + */ + comments: TSESTree.Comment[]; + /** + * Which debug areas should be logged. + */ + debugLevel: Set; + /** + * Whether to error if TypeScript reports a semantic or syntactic error diagnostic. + */ + errorOnTypeScriptSyntacticAndSemanticIssues: boolean; + /** + * Whether to error if an unknown AST node type is encountered. + */ + errorOnUnknownASTType: boolean; + /** + * Any non-standard file extensions which will be parsed. + */ + extraFileExtensions: string[]; + /** + * Path of the file being parsed. + */ + filePath: string; + /** + * Sets the external module indicator on the source file. + * Used by Typescript to determine if a sourceFile is an external module. + * + * needed to always parsing `mjs`/`mts` files as ESM + */ + setExternalModuleIndicator?: (file: ts.SourceFile) => void; + /** + * JSDoc parsing style to pass through to TypeScript + */ + jsDocParsingMode: ts.JSDocParsingMode; + /** + * Whether parsing of JSX is enabled. + * + * @remarks The applicable file extension is still required. + */ + jsx: boolean; + /** + * Whether to add `loc` information to each node. + */ + loc: boolean; + /** + * Log function, if not `console.log`. + */ + log: (message: string) => void; + /** + * Whether two-way AST node maps are preserved during the AST conversion process. + */ + preserveNodeMaps?: boolean; + /** + * One or more instances of TypeScript Program objects to be used for type information. + */ + programs: Iterable | null; + /** + * Normalized paths to provided project paths. + */ + projects: ReadonlyMap; + /** + * TypeScript server to power program creation. + */ + projectService: ProjectServiceAndMetadata | undefined; + /** + * Whether to add the `range` property to AST nodes. + */ + range: boolean; + /** + * Whether this is part of a single run, rather than a long-running process. + */ + singleRun: boolean; + /** + * Whether deprecated AST properties should skip calling console.warn on accesses. + */ + suppressDeprecatedPropertyWarnings: boolean; + /** + * If the `tokens` parse option is enabled, retrieved tokens. + */ + tokens: TSESTree.Token[] | null; + /** + * Caches searches for TSConfigs from project directories. + */ + tsconfigMatchCache: CacheLike; + /** + * The absolute path to the root directory for all provided `project`s. + */ + tsconfigRootDir: string; +} +export type ParseSettings = Readonly; +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts.map new file mode 100644 index 0000000..ceebef4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parseSettings/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,KAAK,WAAW,GAAG,QAAQ,GAAG,YAAY,GAAG,mBAAmB,CAAC;AAGjE,OAAO,QAAQ,YAAY,CAAC;IAE1B,KAAK,gBAAgB;KAAG;CACzB;AAED,OAAO,QAAQ,gCAAgC,CAAC;IAE9C,KAAK,gBAAgB;KAAG;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC;IAE7B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;I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Ae,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,oBAAoB,CAAC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js new file mode 100644 index 0000000..fabb051 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts new file mode 100644 index 0000000..4c7e8aa --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts @@ -0,0 +1,15 @@ +import type { TSESTreeOptions } from '../parser-options'; +/** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. We therefore use the following logic to figure out which + * of these contexts applies to the current execution. + * + * @returns Whether this is part of a single run, rather than a long-running process. + */ +export declare function inferSingleRun(options: TSESTreeOptions | undefined): boolean; +//# sourceMappingURL=inferSingleRun.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts.map new file mode 100644 index 0000000..bcdf964 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"inferSingleRun.d.ts","sourceRoot":"","sources":["../../src/parseSettings/inferSingleRun.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,GAAG,OAAO,CAsD5E"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js new file mode 100644 index 0000000..ef6adf1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js @@ -0,0 +1,65 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.inferSingleRun = inferSingleRun; +const node_path_1 = __importDefault(require("node:path")); +/** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. We therefore use the following logic to figure out which + * of these contexts applies to the current execution. + * + * @returns Whether this is part of a single run, rather than a long-running process. + */ +function inferSingleRun(options) { + // https://github.com/typescript-eslint/typescript-eslint/issues/9504 + // There's no support (yet?) for extraFileExtensions in single-run hosts. + // Only watch program hosts and project service can support that. + if (options?.extraFileExtensions?.length) { + return false; + } + if ( + // single-run implies type-aware linting - no projects means we can't be in single-run mode + options?.project == null || + // programs passed via options means the user should be managing the programs, so we shouldn't + // be creating our own single-run programs accidentally + options.programs != null) { + return false; + } + // Allow users to explicitly inform us of their intent to perform a single run (or not) with TSESTREE_SINGLE_RUN + if (process.env.TSESTREE_SINGLE_RUN === 'false') { + return false; + } + if (process.env.TSESTREE_SINGLE_RUN === 'true') { + return true; + } + // Ideally, we'd like to try to auto-detect CI or CLI usage that lets us infer a single CLI run. + if (!options.disallowAutomaticSingleRunInference) { + const possibleEslintBinPaths = [ + 'node_modules/.bin/eslint', // npm or yarn repo + 'node_modules/eslint/bin/eslint.js', // pnpm repo + ]; + if ( + // Default to single runs for CI processes. CI=true is set by most CI providers by default. + process.env.CI === 'true' || + // This will be true for invocations such as `npx eslint ...` and `./node_modules/.bin/eslint ...` + possibleEslintBinPaths.some(binPath => process.argv.length > 1 && + process.argv[1].endsWith(node_path_1.default.normalize(binPath)))) { + return !process.argv.includes('--fix'); + } + } + /** + * We default to assuming that this run could be part of a long-running session (e.g. in an IDE) + * and watch programs will therefore be required. + * + * Unless we can reliably infer otherwise, we default to assuming that this run could be part + * of a long-running session (e.g. in an IDE) and watch programs will therefore be required + */ + return false; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts new file mode 100644 index 0000000..7efdcec --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts @@ -0,0 +1,19 @@ +import type { CanonicalPath } from '../create-program/shared'; +import type { TSESTreeOptions } from '../parser-options'; +export declare function clearGlobCache(): void; +/** + * Normalizes, sanitizes, resolves and filters the provided project paths + */ +export declare function resolveProjectList(options: Readonly<{ + cacheLifetime?: TSESTreeOptions['cacheLifetime']; + project: string[] | null; + projectFolderIgnoreList: TSESTreeOptions['projectFolderIgnoreList']; + singleRun: boolean; + tsconfigRootDir: string; +}>): ReadonlyMap; +/** + * Exported for testing purposes only + * @internal + */ +export declare function clearGlobResolutionCache(): void; +//# sourceMappingURL=resolveProjectList.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts.map new file mode 100644 index 0000000..9a247ec --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"resolveProjectList.d.ts","sourceRoot":"","sources":["../../src/parseSettings/resolveProjectList.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAqBzD,wBAAgB,cAAc,IAAI,IAAI,CAErC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,QAAQ,CAAC;IAChB,aAAa,CAAC,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;IACjD,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACzB,uBAAuB,EAAE,eAAe,CAAC,yBAAyB,CAAC,CAAC;IACpE,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC,GACD,WAAW,CAAC,aAAa,EAAE,MAAM,CAAC,CAgFpC;AAuBD;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js new file mode 100644 index 0000000..738e65a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js @@ -0,0 +1,99 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.clearGlobCache = clearGlobCache; +exports.resolveProjectList = resolveProjectList; +exports.clearGlobResolutionCache = clearGlobResolutionCache; +const debug_1 = __importDefault(require("debug")); +const fast_glob_1 = require("fast-glob"); +const is_glob_1 = __importDefault(require("is-glob")); +const shared_1 = require("../create-program/shared"); +const ExpiringCache_1 = require("./ExpiringCache"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:parseSettings:resolveProjectList'); +let RESOLUTION_CACHE = null; +function clearGlobCache() { + RESOLUTION_CACHE?.clear(); +} +/** + * Normalizes, sanitizes, resolves and filters the provided project paths + */ +function resolveProjectList(options) { + const sanitizedProjects = []; + // Normalize and sanitize the project paths + if (options.project != null) { + for (const project of options.project) { + if (typeof project === 'string') { + sanitizedProjects.push(project); + } + } + } + if (sanitizedProjects.length === 0) { + return new Map(); + } + const projectFolderIgnoreList = (options.projectFolderIgnoreList ?? ['**/node_modules/**']) + .filter(folder => typeof folder === 'string') + // prefix with a ! for not match glob + .map(folder => (folder.startsWith('!') ? folder : `!${folder}`)); + const cacheKey = getHash({ + project: sanitizedProjects, + projectFolderIgnoreList, + tsconfigRootDir: options.tsconfigRootDir, + }); + if (RESOLUTION_CACHE == null) { + // note - we initialize the global cache based on the first config we encounter. + // this does mean that you can't have multiple lifetimes set per folder + // I doubt that anyone will really bother reconfiguring this, let alone + // try to do complicated setups, so we'll deal with this later if ever. + RESOLUTION_CACHE = new ExpiringCache_1.ExpiringCache(options.singleRun + ? 'Infinity' + : (options.cacheLifetime?.glob ?? + ExpiringCache_1.DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS)); + } + else { + const cached = RESOLUTION_CACHE.get(cacheKey); + if (cached) { + return cached; + } + } + // Transform glob patterns into paths + const nonGlobProjects = sanitizedProjects.filter(project => !(0, is_glob_1.default)(project)); + const globProjects = sanitizedProjects.filter(project => (0, is_glob_1.default)(project)); + let globProjectPaths = []; + if (globProjects.length > 0) { + // Although fast-glob supports multiple patterns, fast-glob returns arbitrary order of results + // to improve performance. To ensure the order is correct, we need to call fast-glob for each pattern + // separately and then concatenate the results in patterns' order. + globProjectPaths = globProjects.flatMap(pattern => (0, fast_glob_1.sync)(pattern, { + cwd: options.tsconfigRootDir, + ignore: projectFolderIgnoreList, + })); + } + const uniqueCanonicalProjectPaths = new Map([...nonGlobProjects, ...globProjectPaths].map(project => [ + (0, shared_1.getCanonicalFileName)((0, shared_1.ensureAbsolutePath)(project, options.tsconfigRootDir)), + (0, shared_1.ensureAbsolutePath)(project, options.tsconfigRootDir), + ])); + log('parserOptions.project (excluding ignored) matched projects: %s', uniqueCanonicalProjectPaths); + RESOLUTION_CACHE.set(cacheKey, uniqueCanonicalProjectPaths); + return uniqueCanonicalProjectPaths; +} +function getHash({ project, projectFolderIgnoreList, tsconfigRootDir, }) { + // create a stable representation of the config + const hashObject = { + tsconfigRootDir, + // the project order does matter and can impact the resolved globs + project, + // the ignore order won't doesn't ever matter + projectFolderIgnoreList: [...projectFolderIgnoreList].sort(), + }; + return (0, shared_1.createHash)(JSON.stringify(hashObject)); +} +/** + * Exported for testing purposes only + * @internal + */ +function clearGlobResolutionCache() { + RESOLUTION_CACHE?.clear(); + RESOLUTION_CACHE = null; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts new file mode 100644 index 0000000..8e1f9d5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts @@ -0,0 +1,7 @@ +import type { ParseSettings } from './index'; +/** + * This needs to be kept in sync with package.json in the typescript-eslint monorepo + */ +export declare const SUPPORTED_TYPESCRIPT_VERSIONS = ">=4.8.4 <6.0.0"; +export declare function warnAboutTSVersion(parseSettings: ParseSettings, passedLoggerFn: boolean): void; +//# sourceMappingURL=warnAboutTSVersion.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts.map new file mode 100644 index 0000000..3265b7e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"warnAboutTSVersion.d.ts","sourceRoot":"","sources":["../../src/parseSettings/warnAboutTSVersion.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAI7C;;GAEG;AACH,eAAO,MAAM,6BAA6B,mBAAmB,CAAC;AAe9D,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,OAAO,GACtB,IAAI,CA8BN"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js new file mode 100644 index 0000000..4a4c99e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js @@ -0,0 +1,81 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SUPPORTED_TYPESCRIPT_VERSIONS = void 0; +exports.warnAboutTSVersion = warnAboutTSVersion; +const semver_1 = __importDefault(require("semver")); +const ts = __importStar(require("typescript")); +const version_1 = require("../version"); +/** + * This needs to be kept in sync with package.json in the typescript-eslint monorepo + */ +exports.SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.8.4 <6.0.0'; +/* + * The semver package will ignore prerelease ranges, and we don't want to explicitly document every one + * List them all separately here, so we can automatically create the full string + */ +const SUPPORTED_PRERELEASE_RANGES = []; +const ACTIVE_TYPESCRIPT_VERSION = ts.version; +const isRunningSupportedTypeScriptVersion = semver_1.default.satisfies(ACTIVE_TYPESCRIPT_VERSION, [exports.SUPPORTED_TYPESCRIPT_VERSIONS, ...SUPPORTED_PRERELEASE_RANGES].join(' || ')); +let warnedAboutTSVersion = false; +function warnAboutTSVersion(parseSettings, passedLoggerFn) { + if (isRunningSupportedTypeScriptVersion || warnedAboutTSVersion) { + return; + } + if (passedLoggerFn || + // See https://github.com/typescript-eslint/typescript-eslint/issues/7896 + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + (typeof process === 'undefined' ? false : process.stdout?.isTTY)) { + const border = '============='; + const versionWarning = [ + border, + '\n', + 'WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.', + '\n', + `* @typescript-eslint/typescript-estree version: ${version_1.version}`, + `* Supported TypeScript versions: ${exports.SUPPORTED_TYPESCRIPT_VERSIONS}`, + `* Your TypeScript version: ${ACTIVE_TYPESCRIPT_VERSION}`, + '\n', + 'Please only submit bug reports when using the officially supported version.', + '\n', + border, + ].join('\n'); + parseSettings.log(versionWarning); + } + warnedAboutTSVersion = true; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts new file mode 100644 index 0000000..3d15aa5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts @@ -0,0 +1,207 @@ +import type { CacheDurationSeconds, DebugLevel, JSDocParsingMode, ProjectServiceOptions, SourceType } from '@typescript-eslint/types'; +import type * as ts from 'typescript'; +import type { TSESTree, TSESTreeToTSNode, TSNode, TSToken } from './ts-estree'; +interface ParseOptions { + /** + * Specify the `sourceType`. + * For more details, see https://github.com/typescript-eslint/typescript-eslint/pull/9121 + */ + sourceType?: SourceType; + /** + * Prevents the parser from throwing an error if it receives an invalid AST from TypeScript. + * This case only usually occurs when attempting to lint invalid code. + */ + allowInvalidAST?: boolean; + /** + * create a top-level comments array containing all comments + */ + comment?: boolean; + /** + * An array of modules to turn explicit debugging on for. + * - 'typescript-eslint' is the same as setting the env var `DEBUG=typescript-eslint:*` + * - 'eslint' is the same as setting the env var `DEBUG=eslint:*` + * - 'typescript' is the same as setting `extendedDiagnostics: true` in your tsconfig compilerOptions + * + * For convenience, also supports a boolean: + * - true === ['typescript-eslint'] + * - false === [] + */ + debugLevel?: DebugLevel; + /** + * Cause the parser to error if it encounters an unknown AST node type (useful for testing). + * This case only usually occurs when TypeScript releases new features. + */ + errorOnUnknownASTType?: boolean; + /** + * Absolute (or relative to `cwd`) path to the file being parsed. + */ + filePath?: string; + /** + * If you are using TypeScript version >=5.3 then this option can be used as a performance optimization. + * + * The valid values for this rule are: + * - `'all'` - parse all JSDoc comments, always. + * - `'none'` - parse no JSDoc comments, ever. + * - `'type-info'` - parse just JSDoc comments that are required to provide correct type-info. TS will always parse JSDoc in non-TS files, but never in TS files. + * + * If you do not rely on JSDoc tags from the TypeScript AST, then you can safely set this to `'none'` to improve performance. + */ + jsDocParsingMode?: JSDocParsingMode; + /** + * Enable parsing of JSX. + * For more details, see https://www.typescriptlang.org/docs/handbook/jsx.html + * + * NOTE: this setting does not effect known file types (.js, .cjs, .mjs, .jsx, .ts, .mts, .cts, .tsx, .json) because the + * TypeScript compiler has its own internal handling for known file extensions. + * + * For the exact behavior, see https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser#parseroptionsecmafeaturesjsx + */ + jsx?: boolean; + /** + * Controls whether the `loc` information to each node. + * The `loc` property is an object which contains the exact line/column the node starts/ends on. + * This is similar to the `range` property, except it is line/column relative. + */ + loc?: boolean; + loggerFn?: ((message: string) => void) | false; + /** + * Controls whether the `range` property is included on AST nodes. + * The `range` property is a [number, number] which indicates the start/end index of the node in the file contents. + * This is similar to the `loc` property, except this is the absolute index. + */ + range?: boolean; + /** + * Set to true to create a top-level array containing all tokens from the file. + */ + tokens?: boolean; + /** + * Whether deprecated AST properties should skip calling console.warn on accesses. + */ + suppressDeprecatedPropertyWarnings?: boolean; +} +interface ParseAndGenerateServicesOptions extends ParseOptions { + /** + * Granular control of the expiry lifetime of our internal caches. + * You can specify the number of seconds as an integer number, or the string + * 'Infinity' if you never want the cache to expire. + * + * By default cache entries will be evicted after 30 seconds, or will persist + * indefinitely if `disallowAutomaticSingleRunInference = false` AND the parser + * infers that it is a single run. + */ + cacheLifetime?: { + /** + * Glob resolution for `parserOptions.project` values. + */ + glob?: CacheDurationSeconds; + }; + /** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. + * + * By default, we will use common heuristics to infer whether ESLint is being + * used as part of a single run. This option disables those heuristics, and + * therefore the performance optimizations gained by them. + * + * In other words, typescript-eslint is faster by default, and this option + * disables an automatic performance optimization. + * + * This setting's default value can be specified by setting a `TSESTREE_SINGLE_RUN` + * environment variable to `"false"` or `"true"`. + * Otherwise, the default value is `false`. + */ + disallowAutomaticSingleRunInference?: boolean; + /** + * Causes the parser to error if the TypeScript compiler returns any unexpected syntax/semantic errors. + */ + errorOnTypeScriptSyntacticAndSemanticIssues?: boolean; + /** + * When `project` is provided, this controls the non-standard file extensions which will be parsed. + * It accepts an array of file extensions, each preceded by a `.`. + * + * NOTE: When used with {@link projectService}, full project reloads may occur. + */ + extraFileExtensions?: string[]; + /** + * Absolute (or relative to `tsconfigRootDir`) path to the file being parsed. + * When `project` is provided, this is required, as it is used to fetch the file from the TypeScript compiler's cache. + */ + filePath?: string; + /** + * Allows the user to control whether or not two-way AST node maps are preserved + * during the AST conversion process. + * + * By default: the AST node maps are NOT preserved, unless `project` has been specified, + * in which case the maps are made available on the returned `parserServices`. + * + * NOTE: If `preserveNodeMaps` is explicitly set by the user, it will be respected, + * regardless of whether or not `project` is in use. + */ + preserveNodeMaps?: boolean; + /** + * Absolute (or relative to `tsconfigRootDir`) paths to the tsconfig(s), + * or `true` to find the nearest tsconfig.json to the file. + * If this is provided, type information will be returned. + * + * If set to `false`, `null` or `undefined` type information will not be returned. + * + * Note that {@link projectService} is now preferred. + */ + project?: boolean | string | string[] | null; + /** + * If you provide a glob (or globs) to the project option, you can use this option to ignore certain folders from + * being matched by the globs. + * This accepts an array of globs to ignore. + * + * By default, this is set to ["**\/node_modules/**"] + */ + projectFolderIgnoreList?: string[]; + /** + * Whether to create a shared TypeScript project service to power program creation. + */ + projectService?: boolean | ProjectServiceOptions; + /** + * The absolute path to the root directory for all provided `project`s. + */ + tsconfigRootDir?: string; + /** + * An array of one or more instances of TypeScript Program objects to be used for type information. + * This overrides any program or programs that would have been computed from the `project` option. + * All linted files must be part of the provided program(s). + */ + programs?: ts.Program[] | null; +} +export type TSESTreeOptions = ParseAndGenerateServicesOptions; +export interface ParserWeakMap { + get(key: Key): Value; + has(key: unknown): boolean; +} +export interface ParserWeakMapESTreeToTSNode { + get(key: KeyBase): TSESTreeToTSNode; + has(key: unknown): boolean; +} +export interface ParserServicesBase { + emitDecoratorMetadata: boolean | undefined; + experimentalDecorators: boolean | undefined; + isolatedDeclarations: boolean | undefined; +} +export interface ParserServicesNodeMaps { + esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode; + tsNodeToESTreeNodeMap: ParserWeakMap; +} +export interface ParserServicesWithTypeInformation extends ParserServicesNodeMaps, ParserServicesBase { + getSymbolAtLocation: (node: TSESTree.Node) => ts.Symbol | undefined; + getTypeAtLocation: (node: TSESTree.Node) => ts.Type; + program: ts.Program; +} +export interface ParserServicesWithoutTypeInformation extends ParserServicesNodeMaps, ParserServicesBase { + program: null; +} +export type ParserServices = ParserServicesWithoutTypeInformation | ParserServicesWithTypeInformation; +export {}; +//# sourceMappingURL=parser-options.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map new file mode 100644 index 0000000..255d17f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parser-options.d.ts","sourceRoot":"","sources":["../src/parser-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,UAAU,EACX,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAM/E,UAAU,YAAY;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;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file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.js new file mode 100644 index 0000000..fabb051 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts new file mode 100644 index 0000000..77939b6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts @@ -0,0 +1,18 @@ +import type * as ts from 'typescript'; +import type { ParserServices, TSESTreeOptions } from './parser-options'; +import type { TSESTree } from './ts-estree'; +export declare function clearProgramCache(): void; +export declare function clearDefaultProjectMatchedFiles(): void; +export type AST = (T['comment'] extends true ? { + comments: TSESTree.Comment[]; +} : {}) & (T['tokens'] extends true ? { + tokens: TSESTree.Token[]; +} : {}) & TSESTree.Program; +export interface ParseAndGenerateServicesResult { + ast: AST; + services: ParserServices; +} +export declare function parse(code: string, options?: T): AST; +export declare function clearParseAndGenerateServicesCalls(): void; +export declare function parseAndGenerateServices(code: string | ts.SourceFile, tsestreeOptions: T): ParseAndGenerateServicesResult; +//# sourceMappingURL=parser.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map new file mode 100644 index 0000000..4b59df5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAKtC,OAAO,KAAK,EACV,cAAc,EAEd,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AA4B5C,wBAAgB,iBAAiB,IAAI,IAAI,CAExC;AAGD,wBAAgB,+BAA+B,IAAI,IAAI,CAEtD;AAwCD,MAAM,MAAM,GAAG,CAAC,CAAC,SAAS,eAAe,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,IAAI,GACnE;IAAE,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAA;CAAE,GAChC,EAAE,CAAC,GACL,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,IAAI,GAAG;IAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAA;CAAE,GAAG,EAAE,CAAC,GAC9D,QAAQ,CAAC,OAAO,CAAC;AAGnB,MAAM,WAAW,8BAA8B,CAAC,CAAC,SAAS,eAAe;IACvE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACZ,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAMD,wBAAgB,KAAK,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,EAC/D,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,CAAC,GACV,GAAG,CAAC,CAAC,CAAC,CAGR;AA4CD,wBAAgB,kCAAkC,IAAI,IAAI,CAEzD;AAED,wBAAgB,wBAAwB,CACtC,CAAC,SAAS,eAAe,GAAG,eAAe,EAE3C,IAAI,EAAE,MAAM,GAAG,EAAE,CAAC,UAAU,EAC5B,eAAe,EAAE,CAAC,GACjB,8BAA8B,CAAC,CAAC,CAAC,CA+GnC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser.js new file mode 100644 index 0000000..dfddd55 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/parser.js @@ -0,0 +1,177 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.clearProgramCache = clearProgramCache; +exports.clearDefaultProjectMatchedFiles = clearDefaultProjectMatchedFiles; +exports.parse = parse; +exports.clearParseAndGenerateServicesCalls = clearParseAndGenerateServicesCalls; +exports.parseAndGenerateServices = parseAndGenerateServices; +const debug_1 = __importDefault(require("debug")); +const ast_converter_1 = require("./ast-converter"); +const convert_1 = require("./convert"); +const createIsolatedProgram_1 = require("./create-program/createIsolatedProgram"); +const createProjectProgram_1 = require("./create-program/createProjectProgram"); +const createSourceFile_1 = require("./create-program/createSourceFile"); +const getWatchProgramsForProjects_1 = require("./create-program/getWatchProgramsForProjects"); +const useProvidedPrograms_1 = require("./create-program/useProvidedPrograms"); +const createParserServices_1 = require("./createParserServices"); +const createParseSettings_1 = require("./parseSettings/createParseSettings"); +const semantic_or_syntactic_errors_1 = require("./semantic-or-syntactic-errors"); +const useProgramFromProjectService_1 = require("./useProgramFromProjectService"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:parser'); +/** + * Cache existing programs for the single run use-case. + * + * clearProgramCache() is only intended to be used in testing to ensure the parser is clean between tests. + */ +const existingPrograms = new Map(); +function clearProgramCache() { + existingPrograms.clear(); +} +const defaultProjectMatchedFiles = new Set(); +function clearDefaultProjectMatchedFiles() { + defaultProjectMatchedFiles.clear(); +} +/** + * @param parseSettings Internal settings for parsing the file + * @param hasFullTypeInformation True if the program should be attempted to be calculated from provided tsconfig files + * @returns Returns a source file and program corresponding to the linted code + */ +function getProgramAndAST(parseSettings, hasFullTypeInformation) { + if (parseSettings.projectService) { + const fromProjectService = (0, useProgramFromProjectService_1.useProgramFromProjectService)(parseSettings.projectService, parseSettings, hasFullTypeInformation, defaultProjectMatchedFiles); + if (fromProjectService) { + return fromProjectService; + } + } + if (parseSettings.programs) { + return (0, useProvidedPrograms_1.useProvidedPrograms)(parseSettings.programs, parseSettings); + } + // no need to waste time creating a program as the caller didn't want parser services + // so we can save time and just create a lonesome source file + if (!hasFullTypeInformation) { + return (0, createSourceFile_1.createNoProgram)(parseSettings); + } + return (0, createProjectProgram_1.createProjectProgram)(parseSettings, (0, getWatchProgramsForProjects_1.getWatchProgramsForProjects)(parseSettings)); +} +function parse(code, options) { + const { ast } = parseWithNodeMapsInternal(code, options, false); + return ast; +} +function parseWithNodeMapsInternal(code, options, shouldPreserveNodeMaps) { + /** + * Reset the parse configuration + */ + const parseSettings = (0, createParseSettings_1.createParseSettings)(code, options); + /** + * Ensure users do not attempt to use parse() when they need parseAndGenerateServices() + */ + if (options?.errorOnTypeScriptSyntacticAndSemanticIssues) { + throw new Error(`"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()`); + } + /** + * Create a ts.SourceFile directly, no ts.Program is needed for a simple parse + */ + const ast = (0, createSourceFile_1.createSourceFile)(parseSettings); + /** + * Convert the TypeScript AST to an ESTree-compatible one + */ + const { astMaps, estree } = (0, ast_converter_1.astConverter)(ast, parseSettings, shouldPreserveNodeMaps); + return { + ast: estree, + esTreeNodeToTSNodeMap: astMaps.esTreeNodeToTSNodeMap, + tsNodeToESTreeNodeMap: astMaps.tsNodeToESTreeNodeMap, + }; +} +let parseAndGenerateServicesCalls = {}; +// Privately exported utility intended for use in typescript-eslint unit tests only +function clearParseAndGenerateServicesCalls() { + parseAndGenerateServicesCalls = {}; +} +function parseAndGenerateServices(code, tsestreeOptions) { + /** + * Reset the parse configuration + */ + const parseSettings = (0, createParseSettings_1.createParseSettings)(code, tsestreeOptions); + /** + * If this is a single run in which the user has not provided any existing programs but there + * are programs which need to be created from the provided "project" option, + * create an Iterable which will lazily create the programs as needed by the iteration logic + */ + if (parseSettings.singleRun && + !parseSettings.programs && + parseSettings.projects.size > 0) { + parseSettings.programs = { + *[Symbol.iterator]() { + for (const configFile of parseSettings.projects) { + const existingProgram = existingPrograms.get(configFile[0]); + if (existingProgram) { + yield existingProgram; + } + else { + log('Detected single-run/CLI usage, creating Program once ahead of time for project: %s', configFile); + const newProgram = (0, useProvidedPrograms_1.createProgramFromConfigFile)(configFile[1]); + existingPrograms.set(configFile[0], newProgram); + yield newProgram; + } + } + }, + }; + } + const hasFullTypeInformation = parseSettings.programs != null || + parseSettings.projects.size > 0 || + !!parseSettings.projectService; + if (typeof tsestreeOptions.errorOnTypeScriptSyntacticAndSemanticIssues === + 'boolean' && + tsestreeOptions.errorOnTypeScriptSyntacticAndSemanticIssues) { + parseSettings.errorOnTypeScriptSyntacticAndSemanticIssues = true; + } + if (parseSettings.errorOnTypeScriptSyntacticAndSemanticIssues && + !hasFullTypeInformation) { + throw new Error('Cannot calculate TypeScript semantic issues without a valid project.'); + } + /** + * If we are in singleRun mode but the parseAndGenerateServices() function has been called more than once for the current file, + * it must mean that we are in the middle of an ESLint automated fix cycle (in which parsing can be performed up to an additional + * 10 times in order to apply all possible fixes for the file). + * + * In this scenario we cannot rely upon the singleRun AOT compiled programs because the SourceFiles will not contain the source + * with the latest fixes applied. Therefore we fallback to creating the quickest possible isolated program from the updated source. + */ + if (parseSettings.singleRun && tsestreeOptions.filePath) { + parseAndGenerateServicesCalls[tsestreeOptions.filePath] = + (parseAndGenerateServicesCalls[tsestreeOptions.filePath] || 0) + 1; + } + const { ast, program } = parseSettings.singleRun && + tsestreeOptions.filePath && + parseAndGenerateServicesCalls[tsestreeOptions.filePath] > 1 + ? (0, createIsolatedProgram_1.createIsolatedProgram)(parseSettings) + : getProgramAndAST(parseSettings, hasFullTypeInformation); + /** + * Convert the TypeScript AST to an ESTree-compatible one, and optionally preserve + * mappings between converted and original AST nodes + */ + const shouldPreserveNodeMaps = typeof parseSettings.preserveNodeMaps === 'boolean' + ? parseSettings.preserveNodeMaps + : true; + const { astMaps, estree } = (0, ast_converter_1.astConverter)(ast, parseSettings, shouldPreserveNodeMaps); + /** + * Even if TypeScript parsed the source code ok, and we had no problems converting the AST, + * there may be other syntactic or semantic issues in the code that we can optionally report on. + */ + if (program && parseSettings.errorOnTypeScriptSyntacticAndSemanticIssues) { + const error = (0, semantic_or_syntactic_errors_1.getFirstSemanticOrSyntacticError)(program, ast); + if (error) { + throw (0, convert_1.convertError)(error); + } + } + /** + * Return the converted AST and additional parser services + */ + return { + ast: estree, + services: (0, createParserServices_1.createParserServices)(astMaps, program), + }; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts new file mode 100644 index 0000000..ec94b0a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts @@ -0,0 +1,13 @@ +import type { Diagnostic, Program, SourceFile } from 'typescript'; +export interface SemanticOrSyntacticError extends Diagnostic { + message: string; +} +/** + * By default, diagnostics from the TypeScript compiler contain all errors - regardless of whether + * they are related to generic ECMAScript standards, or TypeScript-specific constructs. + * + * Therefore, we filter out all diagnostics, except for the ones we explicitly want to consider when + * the user opts in to throwing errors on semantic issues. + */ +export declare function getFirstSemanticOrSyntacticError(program: Program, ast: SourceFile): SemanticOrSyntacticError | undefined; +//# sourceMappingURL=semantic-or-syntactic-errors.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts.map new file mode 100644 index 0000000..ce8b75c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"semantic-or-syntactic-errors.d.ts","sourceRoot":"","sources":["../src/semantic-or-syntactic-errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAEV,OAAO,EACP,UAAU,EACX,MAAM,YAAY,CAAC;AAIpB,MAAM,WAAW,wBAAyB,SAAQ,UAAU;IAC1D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,UAAU,GACd,wBAAwB,GAAG,SAAS,CAmCtC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js new file mode 100644 index 0000000..1da71e2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js @@ -0,0 +1,94 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getFirstSemanticOrSyntacticError = getFirstSemanticOrSyntacticError; +const typescript_1 = require("typescript"); +/** + * By default, diagnostics from the TypeScript compiler contain all errors - regardless of whether + * they are related to generic ECMAScript standards, or TypeScript-specific constructs. + * + * Therefore, we filter out all diagnostics, except for the ones we explicitly want to consider when + * the user opts in to throwing errors on semantic issues. + */ +function getFirstSemanticOrSyntacticError(program, ast) { + try { + const supportedSyntacticDiagnostics = allowlistSupportedDiagnostics(program.getSyntacticDiagnostics(ast)); + if (supportedSyntacticDiagnostics.length > 0) { + return convertDiagnosticToSemanticOrSyntacticError(supportedSyntacticDiagnostics[0]); + } + const supportedSemanticDiagnostics = allowlistSupportedDiagnostics(program.getSemanticDiagnostics(ast)); + if (supportedSemanticDiagnostics.length > 0) { + return convertDiagnosticToSemanticOrSyntacticError(supportedSemanticDiagnostics[0]); + } + return undefined; + } + catch (e) { + /** + * TypeScript compiler has certain Debug.fail() statements in, which will cause the diagnostics + * retrieval above to throw. + * + * E.g. from ast-alignment-tests + * "Debug Failure. Shouldn't ever directly check a JsxOpeningElement" + * + * For our current use-cases this is undesired behavior, so we just suppress it + * and log a warning. + */ + /* istanbul ignore next */ + console.warn(`Warning From TSC: "${e.message}`); // eslint-disable-line no-console + /* istanbul ignore next */ + return undefined; + } +} +function allowlistSupportedDiagnostics(diagnostics) { + return diagnostics.filter(diagnostic => { + switch (diagnostic.code) { + case 1013: // "A rest parameter or binding pattern may not have a trailing comma." + case 1014: // "A rest parameter must be last in a parameter list." + case 1044: // "'{0}' modifier cannot appear on a module or namespace element." + case 1045: // "A '{0}' modifier cannot be used with an interface declaration." + case 1048: // "A rest parameter cannot have an initializer." + case 1049: // "A 'set' accessor must have exactly one parameter." + case 1070: // "'{0}' modifier cannot appear on a type member." + case 1071: // "'{0}' modifier cannot appear on an index signature." + case 1085: // "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'." + case 1090: // "'{0}' modifier cannot appear on a parameter." + case 1096: // "An index signature must have exactly one parameter." + case 1097: // "'{0}' list cannot be empty." + case 1098: // "Type parameter list cannot be empty." + case 1099: // "Type argument list cannot be empty." + case 1117: // "An object literal cannot have multiple properties with the same name in strict mode." + case 1121: // "Octal literals are not allowed in strict mode." + case 1123: // "Variable declaration list cannot be empty." + case 1141: // "String literal expected." + case 1162: // "An object member cannot be declared optional." + case 1164: // "Computed property names are not allowed in enums." + case 1172: // "'extends' clause already seen." + case 1173: // "'extends' clause must precede 'implements' clause." + case 1175: // "'implements' clause already seen." + case 1176: // "Interface declaration cannot have 'implements' clause." + case 1190: // "The variable declaration of a 'for...of' statement cannot have an initializer." + case 1196: // "Catch clause variable type annotation must be 'any' or 'unknown' if specified." + case 1200: // "Line terminator not permitted before arrow." + case 1206: // "Decorators are not valid here." + case 1211: // "A class declaration without the 'default' modifier must have a name." + case 1242: // "'abstract' modifier can only appear on a class, method, or property declaration." + case 1246: // "An interface property cannot have an initializer." + case 1255: // "A definite assignment assertion '!' is not permitted in this context." + case 1308: // "'await' expression is only allowed within an async function." + case 2364: // "The left-hand side of an assignment expression must be a variable or a property access." + case 2369: // "A parameter property is only allowed in a constructor implementation." + case 2452: // "An enum member cannot have a numeric name." + case 2462: // "A rest element must be last in a destructuring pattern." + case 8017: // "Octal literal types must use ES2015 syntax. Use the syntax '{0}'." + case 17012: // "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?" + case 17013: // "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor." + return true; + } + return false; + }); +} +function convertDiagnosticToSemanticOrSyntacticError(diagnostic) { + return { + ...diagnostic, + message: (0, typescript_1.flattenDiagnosticMessageText)(diagnostic.messageText, typescript_1.sys.newLine), + }; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts new file mode 100644 index 0000000..6dc1d5c --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts @@ -0,0 +1,12 @@ +import type { VisitorKeys } from '@typescript-eslint/visitor-keys'; +import type { TSESTree } from './ts-estree'; +type SimpleTraverseOptions = Readonly<{ + enter: (node: TSESTree.Node, parent: TSESTree.Node | undefined) => void; + visitorKeys?: Readonly; +} | { + visitorKeys?: Readonly; + visitors: Record void>; +}>; +export declare function simpleTraverse(startingNode: TSESTree.Node, options: SimpleTraverseOptions, setParentPointers?: boolean): void; +export {}; +//# sourceMappingURL=simple-traverse.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts.map new file mode 100644 index 0000000..c1d2893 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"simple-traverse.d.ts","sourceRoot":"","sources":["../src/simple-traverse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAInE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAmB5C,KAAK,qBAAqB,GAAG,QAAQ,CACjC;IACE,KAAK,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IACxE,WAAW,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;CACrC,GACD;IACE,WAAW,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IACpC,QAAQ,EAAE,MAAM,CACd,MAAM,EACN,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,KAAK,IAAI,CACjE,CAAC;CACH,CACJ,CAAC;AAiDF,wBAAgB,cAAc,CAC5B,YAAY,EAAE,QAAQ,CAAC,IAAI,EAC3B,OAAO,EAAE,qBAAqB,EAC9B,iBAAiB,UAAQ,GACxB,IAAI,CAKN"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js new file mode 100644 index 0000000..f7a66d5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.simpleTraverse = simpleTraverse; +const visitor_keys_1 = require("@typescript-eslint/visitor-keys"); +function isValidNode(x) { + return (typeof x === 'object' && + x != null && + 'type' in x && + typeof x.type === 'string'); +} +function getVisitorKeysForNode(allVisitorKeys, node) { + const keys = allVisitorKeys[node.type]; + return (keys ?? []); +} +class SimpleTraverser { + allVisitorKeys = visitor_keys_1.visitorKeys; + selectors; + setParentPointers; + constructor(selectors, setParentPointers = false) { + this.selectors = selectors; + this.setParentPointers = setParentPointers; + if (selectors.visitorKeys) { + this.allVisitorKeys = selectors.visitorKeys; + } + } + traverse(node, parent) { + if (!isValidNode(node)) { + return; + } + if (this.setParentPointers) { + node.parent = parent; + } + if ('enter' in this.selectors) { + this.selectors.enter(node, parent); + } + else if (node.type in this.selectors.visitors) { + this.selectors.visitors[node.type](node, parent); + } + const keys = getVisitorKeysForNode(this.allVisitorKeys, node); + if (keys.length < 1) { + return; + } + for (const key of keys) { + const childOrChildren = node[key]; + if (Array.isArray(childOrChildren)) { + for (const child of childOrChildren) { + this.traverse(child, node); + } + } + else { + this.traverse(childOrChildren, node); + } + } + } +} +function simpleTraverse(startingNode, options, setParentPointers = false) { + new SimpleTraverser(options, setParentPointers).traverse(startingNode, undefined); +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/source-files.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/source-files.d.ts new file mode 100644 index 0000000..39b80fd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/source-files.d.ts @@ -0,0 +1,4 @@ +import * as ts from 'typescript'; +export declare function isSourceFile(code: unknown): code is ts.SourceFile; +export declare function getCodeText(code: string | ts.SourceFile): string; +//# sourceMappingURL=source-files.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/source-files.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/source-files.d.ts.map new file mode 100644 index 0000000..b3fa1d3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/source-files.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"source-files.d.ts","sourceRoot":"","sources":["../src/source-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC,UAAU,CAUjE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,EAAE,CAAC,UAAU,GAAG,MAAM,CAEhE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/source-files.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/source-files.js new file mode 100644 index 0000000..ec0e16a --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/source-files.js @@ -0,0 +1,49 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isSourceFile = isSourceFile; +exports.getCodeText = getCodeText; +const ts = __importStar(require("typescript")); +function isSourceFile(code) { + if (typeof code !== 'object' || code == null) { + return false; + } + const maybeSourceFile = code; + return (maybeSourceFile.kind === ts.SyntaxKind.SourceFile && + typeof maybeSourceFile.getFullText === 'function'); +} +function getCodeText(code) { + return isSourceFile(code) ? code.getFullText(code) : code; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts new file mode 100644 index 0000000..bdaec1f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts @@ -0,0 +1,179 @@ +import type { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/types'; +import type * as ts from 'typescript'; +import type { TSNode } from './ts-nodes'; +export interface EstreeToTsNodeTypes { + [AST_NODE_TYPES.AccessorProperty]: ts.PropertyDeclaration; + [AST_NODE_TYPES.ArrayExpression]: ts.ArrayLiteralExpression; + [AST_NODE_TYPES.ArrayPattern]: ts.ArrayBindingPattern | ts.ArrayLiteralExpression; + [AST_NODE_TYPES.ArrowFunctionExpression]: ts.ArrowFunction; + [AST_NODE_TYPES.AssignmentExpression]: ts.BinaryExpression; + [AST_NODE_TYPES.AssignmentPattern]: ts.BinaryExpression | ts.BindingElement | ts.ParameterDeclaration | ts.ShorthandPropertyAssignment; + [AST_NODE_TYPES.AwaitExpression]: ts.AwaitExpression; + [AST_NODE_TYPES.BinaryExpression]: ts.BinaryExpression; + [AST_NODE_TYPES.BlockStatement]: ts.Block; + [AST_NODE_TYPES.BreakStatement]: ts.BreakStatement; + [AST_NODE_TYPES.CallExpression]: ts.CallExpression; + [AST_NODE_TYPES.CatchClause]: ts.CatchClause; + [AST_NODE_TYPES.ChainExpression]: ts.CallExpression | ts.ElementAccessExpression | ts.NonNullExpression | ts.PropertyAccessExpression; + [AST_NODE_TYPES.ClassBody]: ts.ClassDeclaration | ts.ClassExpression; + [AST_NODE_TYPES.ClassDeclaration]: ts.ClassDeclaration; + [AST_NODE_TYPES.ClassExpression]: ts.ClassExpression; + [AST_NODE_TYPES.ConditionalExpression]: ts.ConditionalExpression; + [AST_NODE_TYPES.ContinueStatement]: ts.ContinueStatement; + [AST_NODE_TYPES.DebuggerStatement]: ts.DebuggerStatement; + [AST_NODE_TYPES.Decorator]: ts.Decorator; + [AST_NODE_TYPES.DoWhileStatement]: ts.DoStatement; + [AST_NODE_TYPES.EmptyStatement]: ts.EmptyStatement; + [AST_NODE_TYPES.ExportAllDeclaration]: ts.ExportDeclaration; + [AST_NODE_TYPES.ExportDefaultDeclaration]: ts.ClassDeclaration | ts.ClassExpression | ts.EnumDeclaration | ts.ExportAssignment | ts.FunctionDeclaration | ts.InterfaceDeclaration | ts.ModuleDeclaration | ts.TypeAliasDeclaration | ts.VariableStatement; + [AST_NODE_TYPES.ExportNamedDeclaration]: ts.ClassDeclaration | ts.ClassExpression | ts.EnumDeclaration | ts.ExportDeclaration | ts.FunctionDeclaration | ts.ImportEqualsDeclaration | ts.InterfaceDeclaration | ts.ModuleDeclaration | ts.TypeAliasDeclaration | ts.VariableStatement; + [AST_NODE_TYPES.ExportSpecifier]: ts.ExportSpecifier; + [AST_NODE_TYPES.ExpressionStatement]: ts.ExpressionStatement; + [AST_NODE_TYPES.ForInStatement]: ts.ForInStatement; + [AST_NODE_TYPES.ForOfStatement]: ts.ForOfStatement; + [AST_NODE_TYPES.ForStatement]: ts.ForStatement; + [AST_NODE_TYPES.FunctionDeclaration]: ts.FunctionDeclaration; + [AST_NODE_TYPES.FunctionExpression]: ts.ConstructorDeclaration | ts.FunctionExpression | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.SetAccessorDeclaration; + [AST_NODE_TYPES.Identifier]: ts.ConstructorDeclaration | ts.Identifier | ts.Token; + [AST_NODE_TYPES.IfStatement]: ts.IfStatement; + [AST_NODE_TYPES.PrivateIdentifier]: ts.PrivateIdentifier; + [AST_NODE_TYPES.PropertyDefinition]: ts.PropertyDeclaration; + [AST_NODE_TYPES.ImportAttribute]: 'ImportAttribute' extends keyof typeof ts ? ts.ImportAttribute : ts.AssertEntry; + [AST_NODE_TYPES.ImportDeclaration]: ts.ImportDeclaration; + [AST_NODE_TYPES.ImportDefaultSpecifier]: ts.ImportClause; + [AST_NODE_TYPES.ImportExpression]: ts.CallExpression; + [AST_NODE_TYPES.ImportNamespaceSpecifier]: ts.NamespaceImport; + [AST_NODE_TYPES.ImportSpecifier]: ts.ImportSpecifier; + [AST_NODE_TYPES.JSXAttribute]: ts.JsxAttribute; + [AST_NODE_TYPES.JSXClosingElement]: ts.JsxClosingElement; + [AST_NODE_TYPES.JSXClosingFragment]: ts.JsxClosingFragment; + [AST_NODE_TYPES.JSXElement]: ts.JsxElement | ts.JsxSelfClosingElement; + [AST_NODE_TYPES.JSXEmptyExpression]: ts.JsxExpression; + [AST_NODE_TYPES.JSXExpressionContainer]: ts.JsxExpression; + [AST_NODE_TYPES.JSXFragment]: ts.JsxFragment; + [AST_NODE_TYPES.JSXIdentifier]: ts.Identifier | ts.ThisExpression; + [AST_NODE_TYPES.JSXMemberExpression]: ts.PropertyAccessExpression; + [AST_NODE_TYPES.JSXNamespacedName]: ts.JsxNamespacedName; + [AST_NODE_TYPES.JSXOpeningElement]: ts.JsxOpeningElement | ts.JsxSelfClosingElement; + [AST_NODE_TYPES.JSXOpeningFragment]: ts.JsxOpeningFragment; + [AST_NODE_TYPES.JSXSpreadAttribute]: ts.JsxSpreadAttribute; + [AST_NODE_TYPES.JSXSpreadChild]: ts.JsxExpression; + [AST_NODE_TYPES.JSXText]: ts.JsxText; + [AST_NODE_TYPES.LabeledStatement]: ts.LabeledStatement; + [AST_NODE_TYPES.Literal]: ts.BigIntLiteral | ts.BooleanLiteral | ts.NullLiteral | ts.NumericLiteral | ts.RegularExpressionLiteral | ts.StringLiteral; + [AST_NODE_TYPES.LogicalExpression]: ts.BinaryExpression; + [AST_NODE_TYPES.MemberExpression]: ts.ElementAccessExpression | ts.PropertyAccessExpression; + [AST_NODE_TYPES.MetaProperty]: ts.MetaProperty; + [AST_NODE_TYPES.MethodDefinition]: ts.ConstructorDeclaration | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.SetAccessorDeclaration; + [AST_NODE_TYPES.NewExpression]: ts.NewExpression; + [AST_NODE_TYPES.ObjectExpression]: ts.ObjectLiteralExpression; + [AST_NODE_TYPES.ObjectPattern]: ts.ObjectBindingPattern | ts.ObjectLiteralExpression; + [AST_NODE_TYPES.Program]: ts.SourceFile; + [AST_NODE_TYPES.Property]: ts.BindingElement | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.PropertyAssignment | ts.SetAccessorDeclaration | ts.ShorthandPropertyAssignment; + [AST_NODE_TYPES.RestElement]: ts.BindingElement | ts.ParameterDeclaration | ts.SpreadAssignment | ts.SpreadElement; + [AST_NODE_TYPES.ReturnStatement]: ts.ReturnStatement; + [AST_NODE_TYPES.SequenceExpression]: ts.BinaryExpression; + [AST_NODE_TYPES.SpreadElement]: ts.SpreadAssignment | ts.SpreadElement; + [AST_NODE_TYPES.StaticBlock]: ts.ClassStaticBlockDeclaration; + [AST_NODE_TYPES.Super]: ts.SuperExpression; + [AST_NODE_TYPES.SwitchCase]: ts.CaseClause | ts.DefaultClause; + [AST_NODE_TYPES.SwitchStatement]: ts.SwitchStatement; + [AST_NODE_TYPES.TaggedTemplateExpression]: ts.TaggedTemplateExpression; + [AST_NODE_TYPES.TemplateElement]: ts.NoSubstitutionTemplateLiteral | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateTail; + [AST_NODE_TYPES.TemplateLiteral]: ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression; + [AST_NODE_TYPES.ThisExpression]: ts.Identifier | ts.KeywordTypeNode | ts.ThisExpression; + [AST_NODE_TYPES.ThrowStatement]: ts.ThrowStatement; + [AST_NODE_TYPES.TryStatement]: ts.TryStatement; + [AST_NODE_TYPES.TSAbstractAccessorProperty]: ts.PropertyDeclaration; + [AST_NODE_TYPES.TSAbstractMethodDefinition]: ts.ConstructorDeclaration | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.SetAccessorDeclaration; + [AST_NODE_TYPES.TSAbstractPropertyDefinition]: ts.PropertyDeclaration; + [AST_NODE_TYPES.TSArrayType]: ts.ArrayTypeNode; + [AST_NODE_TYPES.TSAsExpression]: ts.AsExpression; + [AST_NODE_TYPES.TSCallSignatureDeclaration]: ts.CallSignatureDeclaration; + [AST_NODE_TYPES.TSClassImplements]: ts.ExpressionWithTypeArguments; + [AST_NODE_TYPES.TSConditionalType]: ts.ConditionalTypeNode; + [AST_NODE_TYPES.TSConstructorType]: ts.ConstructorTypeNode; + [AST_NODE_TYPES.TSConstructSignatureDeclaration]: ts.ConstructSignatureDeclaration; + [AST_NODE_TYPES.TSDeclareFunction]: ts.FunctionDeclaration; + [AST_NODE_TYPES.TSEnumBody]: ts.EnumDeclaration; + [AST_NODE_TYPES.TSEnumDeclaration]: ts.EnumDeclaration; + [AST_NODE_TYPES.TSEnumMember]: ts.EnumMember; + [AST_NODE_TYPES.TSExportAssignment]: ts.ExportAssignment; + [AST_NODE_TYPES.TSExternalModuleReference]: ts.ExternalModuleReference; + [AST_NODE_TYPES.TSFunctionType]: ts.FunctionTypeNode; + [AST_NODE_TYPES.TSImportEqualsDeclaration]: ts.ImportEqualsDeclaration; + [AST_NODE_TYPES.TSImportType]: ts.ImportTypeNode; + [AST_NODE_TYPES.TSIndexedAccessType]: ts.IndexedAccessTypeNode; + [AST_NODE_TYPES.TSIndexSignature]: ts.IndexSignatureDeclaration; + [AST_NODE_TYPES.TSInferType]: ts.InferTypeNode; + [AST_NODE_TYPES.TSInstantiationExpression]: ts.ExpressionWithTypeArguments; + [AST_NODE_TYPES.TSInterfaceBody]: ts.InterfaceDeclaration; + [AST_NODE_TYPES.TSInterfaceDeclaration]: ts.InterfaceDeclaration; + [AST_NODE_TYPES.TSInterfaceHeritage]: ts.ExpressionWithTypeArguments; + [AST_NODE_TYPES.TSIntersectionType]: ts.IntersectionTypeNode; + [AST_NODE_TYPES.TSLiteralType]: ts.LiteralTypeNode; + [AST_NODE_TYPES.TSMappedType]: ts.MappedTypeNode; + [AST_NODE_TYPES.TSMethodSignature]: ts.GetAccessorDeclaration | ts.MethodSignature | ts.SetAccessorDeclaration; + [AST_NODE_TYPES.TSModuleBlock]: ts.ModuleBlock; + [AST_NODE_TYPES.TSModuleDeclaration]: ts.ModuleDeclaration; + [AST_NODE_TYPES.TSNamedTupleMember]: ts.NamedTupleMember; + [AST_NODE_TYPES.TSNamespaceExportDeclaration]: ts.NamespaceExportDeclaration; + [AST_NODE_TYPES.TSNonNullExpression]: ts.NonNullExpression; + [AST_NODE_TYPES.TSOptionalType]: ts.OptionalTypeNode; + [AST_NODE_TYPES.TSParameterProperty]: ts.ParameterDeclaration; + [AST_NODE_TYPES.TSPropertySignature]: ts.PropertySignature; + [AST_NODE_TYPES.TSQualifiedName]: ts.Identifier | ts.QualifiedName; + [AST_NODE_TYPES.TSRestType]: ts.NamedTupleMember | ts.RestTypeNode; + [AST_NODE_TYPES.TSSatisfiesExpression]: ts.SatisfiesExpression; + [AST_NODE_TYPES.TSTemplateLiteralType]: ts.TemplateLiteralTypeNode; + [AST_NODE_TYPES.TSThisType]: ts.ThisTypeNode; + [AST_NODE_TYPES.TSTupleType]: ts.TupleTypeNode; + [AST_NODE_TYPES.TSTypeAliasDeclaration]: ts.TypeAliasDeclaration; + [AST_NODE_TYPES.TSTypeAnnotation]: undefined; + [AST_NODE_TYPES.TSTypeAssertion]: ts.TypeAssertion; + [AST_NODE_TYPES.TSTypeLiteral]: ts.TypeLiteralNode; + [AST_NODE_TYPES.TSTypeOperator]: ts.TypeOperatorNode; + [AST_NODE_TYPES.TSTypeParameter]: ts.TypeParameterDeclaration; + [AST_NODE_TYPES.TSTypeParameterDeclaration]: undefined; + [AST_NODE_TYPES.TSTypeParameterInstantiation]: ts.CallExpression | ts.ExpressionWithTypeArguments | ts.ImportTypeNode | ts.JsxOpeningElement | ts.JsxSelfClosingElement | ts.NewExpression | ts.TaggedTemplateExpression | ts.TypeQueryNode | ts.TypeReferenceNode; + [AST_NODE_TYPES.TSTypePredicate]: ts.TypePredicateNode; + [AST_NODE_TYPES.TSTypeQuery]: ts.ImportTypeNode | ts.TypeQueryNode; + [AST_NODE_TYPES.TSTypeReference]: ts.TypeReferenceNode; + [AST_NODE_TYPES.TSUnionType]: ts.UnionTypeNode; + [AST_NODE_TYPES.UnaryExpression]: ts.DeleteExpression | ts.PostfixUnaryExpression | ts.PrefixUnaryExpression | ts.TypeOfExpression | ts.VoidExpression; + [AST_NODE_TYPES.UpdateExpression]: ts.PostfixUnaryExpression | ts.PrefixUnaryExpression; + [AST_NODE_TYPES.VariableDeclaration]: ts.VariableDeclarationList | ts.VariableStatement; + [AST_NODE_TYPES.VariableDeclarator]: ts.VariableDeclaration; + [AST_NODE_TYPES.WhileStatement]: ts.WhileStatement; + [AST_NODE_TYPES.WithStatement]: ts.WithStatement; + [AST_NODE_TYPES.YieldExpression]: ts.YieldExpression; + [AST_NODE_TYPES.TSEmptyBodyFunctionExpression]: ts.ConstructorDeclaration | ts.FunctionExpression | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.SetAccessorDeclaration; + [AST_NODE_TYPES.TSAbstractKeyword]: ts.Token; + [AST_NODE_TYPES.TSAnyKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSBigIntKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSBooleanKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSIntrinsicKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSNeverKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSNullKeyword]: ts.KeywordTypeNode | ts.NullLiteral; + [AST_NODE_TYPES.TSNumberKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSObjectKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSStringKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSSymbolKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSUndefinedKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSUnknownKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSVoidKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSAsyncKeyword]: ts.Token; + [AST_NODE_TYPES.TSDeclareKeyword]: ts.Token; + [AST_NODE_TYPES.TSExportKeyword]: ts.Token; + [AST_NODE_TYPES.TSPrivateKeyword]: ts.Token; + [AST_NODE_TYPES.TSProtectedKeyword]: ts.Token; + [AST_NODE_TYPES.TSPublicKeyword]: ts.Token; + [AST_NODE_TYPES.TSReadonlyKeyword]: ts.Token; + [AST_NODE_TYPES.TSStaticKeyword]: ts.Token; +} +/** + * Maps TSESTree AST Node type to the expected TypeScript AST Node type(s). + * This mapping is based on the internal logic of the parser. + */ +export type TSESTreeToTSNode = Extract | TSNode, EstreeToTsNodeTypes[T['type']]>; +//# sourceMappingURL=estree-to-ts-node-types.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map new file mode 100644 index 0000000..deee4d2 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"estree-to-ts-node-types.d.ts","sourceRoot":"","sources":["../../src/ts-estree/estree-to-ts-node-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,WAAW,mBAAmB;IAClC,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC;IAC1D,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,sBAAsB,CAAC;IAC5D,CAAC,cAAc,CAAC,YAAY,CAAC,EACzB,EAAE,CAAC,mBAAmB,GACtB,EAAE,CAAC,sBAAsB,CAAC;IAC9B,CAAC,cAAc,CAAC,uBAAuB,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC;IAC3D,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC;IAC3D,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAC9B,EAAE,CAAC,gBAAgB,GACnB,EAAE,CAAC,cAAc,GACjB,EAAE,CAAC,oBAAoB,GACvB,EAAE,CAAC,2BAA2B,CAAC;IAC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CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACxE,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAC5E,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;CACzE;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,OAAO,CAC7E,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,GAAG,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,MAAM,EAEzE,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAC/B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js new file mode 100644 index 0000000..fabb051 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts new file mode 100644 index 0000000..6af6938 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts @@ -0,0 +1,4 @@ +export * from './estree-to-ts-node-types'; +export * from './ts-nodes'; +export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/types'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts.map new file mode 100644 index 0000000..3428ae5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ts-estree/index.ts"],"names":[],"mappings":"AACA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,cAAc,EACd,eAAe,EACf,QAAQ,GACT,MAAM,0BAA0B,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js new file mode 100644 index 0000000..3e409f5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js @@ -0,0 +1,24 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSESTree = exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0; +// for simplicity and backwards-compatibility +__exportStar(require("./estree-to-ts-node-types"), exports); +__exportStar(require("./ts-nodes"), exports); +var types_1 = require("@typescript-eslint/types"); +Object.defineProperty(exports, "AST_NODE_TYPES", { enumerable: true, get: function () { return types_1.AST_NODE_TYPES; } }); +Object.defineProperty(exports, "AST_TOKEN_TYPES", { enumerable: true, get: function () { return types_1.AST_TOKEN_TYPES; } }); +Object.defineProperty(exports, "TSESTree", { enumerable: true, get: function () { return types_1.TSESTree; } }); diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts new file mode 100644 index 0000000..81a1809 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts @@ -0,0 +1,18 @@ +import type * as ts from 'typescript'; +declare module 'typescript' { + interface AssertClause extends ts.ImportAttributes { + } + interface AssertEntry extends ts.ImportAttribute { + } + interface SatisfiesExpression extends ts.Node { + } + interface JsxNamespacedName extends ts.Node { + } + interface ImportAttribute extends ts.Node { + } + interface ImportAttributes extends ts.Node { + } +} +export type TSToken = ts.Token; +export type TSNode = ts.ArrayBindingPattern | ts.ArrayLiteralExpression | ts.ArrayTypeNode | ts.ArrowFunction | ts.AsExpression | ts.AssertClause | ts.AssertEntry | ts.AwaitExpression | ts.BigIntLiteral | ts.BinaryExpression | ts.BindingElement | ts.Block | ts.BooleanLiteral | ts.BreakStatement | ts.Bundle | ts.CallExpression | ts.CallSignatureDeclaration | ts.CaseBlock | ts.CaseClause | ts.CatchClause | ts.ClassDeclaration | ts.ClassExpression | ts.ClassStaticBlockDeclaration | ts.CommaListExpression | ts.ComputedPropertyName | ts.ConditionalExpression | ts.ConditionalTypeNode | ts.ConstructorDeclaration | ts.ConstructorTypeNode | ts.ConstructSignatureDeclaration | ts.ContinueStatement | ts.DebuggerStatement | ts.Decorator | ts.DefaultClause | ts.DeleteExpression | ts.DoStatement | ts.ElementAccessExpression | ts.EmptyStatement | ts.EnumDeclaration | ts.EnumMember | ts.ExportAssignment | ts.ExportDeclaration | ts.ExportSpecifier | ts.ExpressionStatement | ts.ExpressionWithTypeArguments | ts.ExternalModuleReference | ts.ForInStatement | ts.ForOfStatement | ts.ForStatement | ts.FunctionDeclaration | ts.FunctionExpression | ts.FunctionTypeNode | ts.GetAccessorDeclaration | ts.HeritageClause | ts.Identifier | ts.IfStatement | ts.ImportAttribute | ts.ImportAttributes | ts.ImportClause | ts.ImportDeclaration | ts.ImportEqualsDeclaration | ts.ImportExpression | ts.ImportSpecifier | ts.ImportTypeNode | ts.IndexedAccessTypeNode | ts.IndexSignatureDeclaration | ts.InferTypeNode | ts.InterfaceDeclaration | ts.IntersectionTypeNode | ts.JSDoc | ts.JSDocAllType | ts.JSDocAugmentsTag | ts.JSDocAuthorTag | ts.JSDocCallbackTag | ts.JSDocClassTag | ts.JSDocEnumTag | ts.JSDocFunctionType | ts.JSDocNonNullableType | ts.JSDocNullableType | ts.JSDocOptionalType | ts.JSDocParameterTag | ts.JSDocPropertyTag | ts.JSDocReturnTag | ts.JSDocSignature | ts.JSDocTemplateTag | ts.JSDocThisTag | ts.JSDocTypedefTag | ts.JSDocTypeExpression | ts.JSDocTypeLiteral | ts.JSDocTypeTag | ts.JSDocUnknownTag | ts.JSDocUnknownType | ts.JSDocVariadicType | ts.JsonMinusNumericLiteral | ts.JsxAttribute | ts.JsxClosingElement | ts.JsxClosingFragment | ts.JsxElement | ts.JsxExpression | ts.JsxFragment | ts.JsxNamespacedName | ts.JsxOpeningElement | ts.JsxOpeningFragment | ts.JsxSelfClosingElement | ts.JsxSpreadAttribute | ts.JsxText | ts.KeywordTypeNode | ts.LabeledStatement | ts.LiteralTypeNode | ts.MappedTypeNode | ts.MetaProperty | ts.MethodDeclaration | ts.MethodSignature | ts.MissingDeclaration | ts.Modifier | ts.ModuleBlock | ts.ModuleDeclaration | ts.NamedExports | ts.NamedImports | ts.NamedTupleMember | ts.NamespaceExportDeclaration | ts.NamespaceImport | ts.NewExpression | ts.NonNullExpression | ts.NoSubstitutionTemplateLiteral | ts.NotEmittedStatement | ts.NullLiteral | ts.NumericLiteral | ts.ObjectBindingPattern | ts.ObjectLiteralExpression | ts.OmittedExpression | ts.OptionalTypeNode | ts.ParameterDeclaration | ts.ParenthesizedExpression | ts.ParenthesizedTypeNode | ts.PartiallyEmittedExpression | ts.PostfixUnaryExpression | ts.PrefixUnaryExpression | ts.PrivateIdentifier | ts.PropertyAccessExpression | ts.PropertyAssignment | ts.PropertyDeclaration | ts.PropertySignature | ts.QualifiedName | ts.RegularExpressionLiteral | ts.RestTypeNode | ts.ReturnStatement | ts.SatisfiesExpression | ts.SemicolonClassElement | ts.SetAccessorDeclaration | ts.ShorthandPropertyAssignment | ts.SourceFile | ts.SpreadAssignment | ts.SpreadElement | ts.StringLiteral | ts.SuperExpression | ts.SwitchStatement | ts.SyntheticExpression | ts.TaggedTemplateExpression | ts.TemplateExpression | ts.TemplateHead | ts.TemplateLiteralTypeNode | ts.TemplateMiddle | ts.TemplateSpan | ts.TemplateTail | ts.ThisExpression | ts.ThisTypeNode | ts.ThrowStatement | ts.TryStatement | ts.TupleTypeNode | ts.TypeAliasDeclaration | ts.TypeAssertion | ts.TypeLiteralNode | ts.TypeOfExpression | ts.TypeOperatorNode | ts.TypeParameterDeclaration | ts.TypePredicateNode | ts.TypeQueryNode | ts.TypeReferenceNode | ts.UnionTypeNode | ts.VariableDeclaration | ts.VariableDeclarationList | ts.VariableStatement | ts.VoidExpression | ts.WhileStatement | ts.WithStatement | ts.YieldExpression; +//# sourceMappingURL=ts-nodes.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts.map new file mode 100644 index 0000000..f062e05 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ts-nodes.d.ts","sourceRoot":"","sources":["../../src/ts-estree/ts-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAKtC,OAAO,QAAQ,YAAY,CAAC;IAE1B,UAAiB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AAC,iBAAiB,GACpB,EAAE,CAAC,aAAa,GAChB,EAAE,CAAC,mBAAmB,GACtB,EAAE,CAAC,uBAAuB,GAC1B,EAAE,CAAC,iBAAiB,GACpB,EAAE,CAAC,cAAc,GACjB,EAAE,CAAC,cAAc,GACjB,EAAE,CAAC,aAAa,GAChB,EAAE,CAAC,eAAe,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js new file mode 100644 index 0000000..fabb051 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.d.ts new file mode 100644 index 0000000..5e7b505 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.d.ts @@ -0,0 +1,7 @@ +export * from './ast-converter'; +export * from './create-program/getScriptKind'; +export type { ParseSettings } from './parseSettings'; +export * from './getModifiers'; +export { typescriptVersionIsAtLeast } from './version-check'; +export { getCanonicalFileName } from './create-program/shared'; +//# sourceMappingURL=use-at-your-own-risk.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.d.ts.map new file mode 100644 index 0000000..5014f3f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"use-at-your-own-risk.d.ts","sourceRoot":"","sources":["../src/use-at-your-own-risk.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAG7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.js new file mode 100644 index 0000000..b42e831 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.js @@ -0,0 +1,27 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCanonicalFileName = exports.typescriptVersionIsAtLeast = void 0; +// required by website +__exportStar(require("./ast-converter"), exports); +__exportStar(require("./create-program/getScriptKind"), exports); +// required by packages/utils/src/ts-estree.ts +__exportStar(require("./getModifiers"), exports); +var version_check_1 = require("./version-check"); +Object.defineProperty(exports, "typescriptVersionIsAtLeast", { enumerable: true, get: function () { return version_check_1.typescriptVersionIsAtLeast; } }); +// required by packages/type-utils +var shared_1 = require("./create-program/shared"); +Object.defineProperty(exports, "getCanonicalFileName", { enumerable: true, get: function () { return shared_1.getCanonicalFileName; } }); diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts new file mode 100644 index 0000000..69a25d7 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts @@ -0,0 +1,7 @@ +import type { ProjectServiceAndMetadata } from '@typescript-eslint/project-service'; +import type { ASTAndDefiniteProgram, ASTAndNoProgram, ASTAndProgram } from './create-program/shared'; +import type { MutableParseSettings } from './parseSettings'; +export declare function useProgramFromProjectService(serviceAndSettings: ProjectServiceAndMetadata, parseSettings: Readonly, hasFullTypeInformation: boolean, defaultProjectMatchedFiles: Set): ASTAndProgram | undefined; +export declare function useProgramFromProjectService(serviceAndSettings: ProjectServiceAndMetadata, parseSettings: Readonly, hasFullTypeInformation: true, defaultProjectMatchedFiles: Set): ASTAndDefiniteProgram | undefined; +export declare function useProgramFromProjectService(serviceAndSettings: ProjectServiceAndMetadata, parseSettings: Readonly, hasFullTypeInformation: false, defaultProjectMatchedFiles: Set): ASTAndNoProgram | undefined; +//# sourceMappingURL=useProgramFromProjectService.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts.map new file mode 100644 index 0000000..5f3aeb3 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useProgramFromProjectService.d.ts","sourceRoot":"","sources":["../src/useProgramFromProjectService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAQpF,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EACf,aAAa,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AA4M5D,wBAAgB,4BAA4B,CAC1C,kBAAkB,EAAE,yBAAyB,EAC7C,aAAa,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAC7C,sBAAsB,EAAE,OAAO,EAC/B,0BAA0B,EAAE,GAAG,CAAC,MAAM,CAAC,GACtC,aAAa,GAAG,SAAS,CAAC;AAC7B,wBAAgB,4BAA4B,CAC1C,kBAAkB,EAAE,yBAAyB,EAC7C,aAAa,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAC7C,sBAAsB,EAAE,IAAI,EAC5B,0BAA0B,EAAE,GAAG,CAAC,MAAM,CAAC,GACtC,qBAAqB,GAAG,SAAS,CAAC;AACrC,wBAAgB,4BAA4B,CAC1C,kBAAkB,EAAE,yBAAyB,EAC7C,aAAa,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAC7C,sBAAsB,EAAE,KAAK,EAC7B,0BAA0B,EAAE,GAAG,CAAC,MAAM,CAAC,GACtC,eAAe,GAAG,SAAS,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js new file mode 100644 index 0000000..a227c19 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js @@ -0,0 +1,196 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.useProgramFromProjectService = useProgramFromProjectService; +const debug_1 = __importDefault(require("debug")); +const minimatch_1 = require("minimatch"); +const node_path_1 = __importDefault(require("node:path")); +const node_util_1 = __importDefault(require("node:util")); +const ts = __importStar(require("typescript")); +const createProjectProgram_1 = require("./create-program/createProjectProgram"); +const createSourceFile_1 = require("./create-program/createSourceFile"); +const shared_1 = require("./create-program/shared"); +const validateDefaultProjectForFilesGlob_1 = require("./create-program/validateDefaultProjectForFilesGlob"); +const RELOAD_THROTTLE_MS = 250; +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:useProgramFromProjectService'); +const serviceFileExtensions = new WeakMap(); +const updateExtraFileExtensions = (service, extraFileExtensions) => { + const currentServiceFileExtensions = serviceFileExtensions.get(service) ?? []; + if (!node_util_1.default.isDeepStrictEqual(currentServiceFileExtensions, extraFileExtensions)) { + log('Updating extra file extensions: before=%s: after=%s', currentServiceFileExtensions, extraFileExtensions); + service.setHostConfiguration({ + extraFileExtensions: extraFileExtensions.map(extension => ({ + extension, + isMixedContent: false, + scriptKind: ts.ScriptKind.Deferred, + })), + }); + serviceFileExtensions.set(service, extraFileExtensions); + log('Extra file extensions updated: %o', extraFileExtensions); + } +}; +function openClientFileFromProjectService(defaultProjectMatchedFiles, isDefaultProjectAllowed, filePathAbsolute, parseSettings, serviceAndSettings) { + const opened = openClientFileAndMaybeReload(); + log('Result from attempting to open client file: %o', opened); + log('Default project allowed path: %s, based on config file: %s', isDefaultProjectAllowed, opened.configFileName); + if (opened.configFileName) { + if (isDefaultProjectAllowed) { + throw new Error(`${parseSettings.filePath} was included by allowDefaultProject but also was found in the project service. Consider removing it from allowDefaultProject.`); + } + } + else { + const wasNotFound = `${parseSettings.filePath} was not found by the project service`; + const fileExtension = node_path_1.default.extname(parseSettings.filePath); + const extraFileExtensions = parseSettings.extraFileExtensions; + if (!shared_1.DEFAULT_EXTRA_FILE_EXTENSIONS.has(fileExtension) && + !extraFileExtensions.includes(fileExtension)) { + const nonStandardExt = `${wasNotFound} because the extension for the file (\`${fileExtension}\`) is non-standard`; + if (extraFileExtensions.length > 0) { + throw new Error(`${nonStandardExt}. It should be added to your existing \`parserOptions.extraFileExtensions\`.`); + } + else { + throw new Error(`${nonStandardExt}. You should add \`parserOptions.extraFileExtensions\` to your config.`); + } + } + if (!isDefaultProjectAllowed) { + throw new Error(`${wasNotFound}. Consider either including it in the tsconfig.json or including it in allowDefaultProject.`); + } + } + // No a configFileName indicates this file wasn't included in a TSConfig. + // That means it must get its type information from the default project. + if (!opened.configFileName) { + defaultProjectMatchedFiles.add(filePathAbsolute); + if (defaultProjectMatchedFiles.size > + serviceAndSettings.maximumDefaultProjectFileMatchCount) { + const filePrintLimit = 20; + const filesToPrint = [...defaultProjectMatchedFiles].slice(0, filePrintLimit); + const truncatedFileCount = defaultProjectMatchedFiles.size - filesToPrint.length; + throw new Error(`Too many files (>${serviceAndSettings.maximumDefaultProjectFileMatchCount}) have matched the default project.${validateDefaultProjectForFilesGlob_1.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION} +Matching files: +${filesToPrint.map(file => `- ${file}`).join('\n')} +${truncatedFileCount ? `...and ${truncatedFileCount} more files\n` : ''} +If you absolutely need more files included, set parserOptions.projectService.maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING to a larger value. +`); + } + } + return opened; + function openClientFile() { + return serviceAndSettings.service.openClientFile(filePathAbsolute, parseSettings.codeFullText, + /* scriptKind */ undefined, parseSettings.tsconfigRootDir); + } + function openClientFileAndMaybeReload() { + log('Opening project service client file at path: %s', filePathAbsolute); + let opened = openClientFile(); + // If no project included the file and we're not in single-run mode, + // we might be running in an editor with outdated file info. + // We can try refreshing the project service - debounced for performance. + if (!opened.configFileErrors && + !opened.configFileName && + !parseSettings.singleRun && + !isDefaultProjectAllowed && + performance.now() - serviceAndSettings.lastReloadTimestamp > + RELOAD_THROTTLE_MS) { + log('No config file found; reloading project service and retrying.'); + serviceAndSettings.service.reloadProjects(); + opened = openClientFile(); + serviceAndSettings.lastReloadTimestamp = performance.now(); + } + return opened; + } +} +function createNoProgramWithProjectService(filePathAbsolute, parseSettings, service) { + log('No project service information available. Creating no program.'); + // If the project service knows about this file, this informs if of changes. + // Doing so ensures that: + // - if the file is not part of a project, we don't waste time creating a program (fast non-type-aware linting) + // - otherwise, we refresh the file in the project service (moderately fast, since the project is already loaded) + if (service.getScriptInfo(filePathAbsolute)) { + log('Script info available. Opening client file in project service.'); + service.openClientFile(filePathAbsolute, parseSettings.codeFullText, + /* scriptKind */ undefined, parseSettings.tsconfigRootDir); + } + return (0, createSourceFile_1.createNoProgram)(parseSettings); +} +function retrieveASTAndProgramFor(filePathAbsolute, parseSettings, serviceAndSettings) { + log('Retrieving script info and then program for: %s', filePathAbsolute); + const scriptInfo = serviceAndSettings.service.getScriptInfo(filePathAbsolute); + /* eslint-disable @typescript-eslint/no-non-null-assertion */ + const program = serviceAndSettings.service + .getDefaultProjectForFile(scriptInfo.fileName, true) + .getLanguageService(/*ensureSynchronized*/ true) + .getProgram(); + /* eslint-enable @typescript-eslint/no-non-null-assertion */ + if (!program) { + log('Could not find project service program for: %s', filePathAbsolute); + return undefined; + } + log('Found project service program for: %s', filePathAbsolute); + return (0, createProjectProgram_1.createProjectProgram)(parseSettings, [program]); +} +function useProgramFromProjectService(serviceAndSettings, parseSettings, hasFullTypeInformation, defaultProjectMatchedFiles) { + // NOTE: triggers a full project reload when changes are detected + updateExtraFileExtensions(serviceAndSettings.service, parseSettings.extraFileExtensions); + // We don't canonicalize the filename because it caused a performance regression. + // See https://github.com/typescript-eslint/typescript-eslint/issues/8519 + const filePathAbsolute = absolutify(parseSettings.filePath, serviceAndSettings); + log('Opening project service file for: %s at absolute path %s', parseSettings.filePath, filePathAbsolute); + const filePathRelative = node_path_1.default.relative(parseSettings.tsconfigRootDir, filePathAbsolute); + const isDefaultProjectAllowed = filePathMatchedBy(filePathRelative, serviceAndSettings.allowDefaultProject); + // Type-aware linting is disabled for this file. + // However, type-aware lint rules might still rely on its contents. + if (!hasFullTypeInformation && !isDefaultProjectAllowed) { + return createNoProgramWithProjectService(filePathAbsolute, parseSettings, serviceAndSettings.service); + } + // If type info was requested, we attempt to open it in the project service. + // By now, the file is known to be one of: + // - in the project service (valid configuration) + // - allowlisted in the default project (valid configuration) + // - neither, which openClientFileFromProjectService will throw an error for + const opened = hasFullTypeInformation && + openClientFileFromProjectService(defaultProjectMatchedFiles, isDefaultProjectAllowed, filePathAbsolute, parseSettings, serviceAndSettings); + log('Opened project service file: %o', opened); + return retrieveASTAndProgramFor(filePathAbsolute, parseSettings, serviceAndSettings); +} +function absolutify(filePath, serviceAndSettings) { + return node_path_1.default.isAbsolute(filePath) + ? filePath + : node_path_1.default.join(serviceAndSettings.service.host.getCurrentDirectory(), filePath); +} +function filePathMatchedBy(filePath, allowDefaultProject) { + return !!allowDefaultProject?.some(pattern => (0, minimatch_1.minimatch)(filePath, pattern, { dot: true })); +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts new file mode 100644 index 0000000..84f550d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts @@ -0,0 +1,5 @@ +declare const versions: readonly ["4.7", "4.8", "4.9", "5.0", "5.1", "5.2", "5.3", "5.4"]; +type Versions = typeof versions extends ArrayLike ? U : never; +export declare const typescriptVersionIsAtLeast: Record; +export {}; +//# sourceMappingURL=version-check.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts.map new file mode 100644 index 0000000..d472531 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"version-check.d.ts","sourceRoot":"","sources":["../src/version-check.ts"],"names":[],"mappings":"AAaA,QAAA,MAAM,QAAQ,mEASJ,CAAC;AACX,KAAK,QAAQ,GAAG,OAAO,QAAQ,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEvE,eAAO,MAAM,0BAA0B,EAAS,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js new file mode 100644 index 0000000..1b8d3ff --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js @@ -0,0 +1,57 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.typescriptVersionIsAtLeast = void 0; +const semver = __importStar(require("semver")); +const ts = __importStar(require("typescript")); +function semverCheck(version) { + return semver.satisfies(ts.version, `>= ${version}.0 || >= ${version}.1-rc || >= ${version}.0-beta`, { + includePrerelease: true, + }); +} +const versions = [ + '4.7', + '4.8', + '4.9', + '5.0', + '5.1', + '5.2', + '5.3', + '5.4', +]; +exports.typescriptVersionIsAtLeast = {}; +for (const version of versions) { + exports.typescriptVersionIsAtLeast[version] = semverCheck(version); +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/version.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/version.d.ts new file mode 100644 index 0000000..ba4d4d1 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/version.d.ts @@ -0,0 +1,2 @@ +export declare const version: string; +//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/version.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/version.d.ts.map new file mode 100644 index 0000000..5341d62 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,EAAE,MAA2C,CAAC"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/version.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/version.js new file mode 100644 index 0000000..b8a3a1b --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/version.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access +exports.version = require('../package.json').version; diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/withoutProjectParserOptions.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/dist/withoutProjectParserOptions.d.ts new file mode 100644 index 0000000..44028e5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/withoutProjectParserOptions.d.ts @@ -0,0 +1,10 @@ +/** + * Removes options that prompt the parser to parse the project with type + * information. In other words, you can use this if you are invoking the parser + * directly, to ensure that one file will be parsed in isolation, which is much, + * much faster. + * + * @see https://github.com/typescript-eslint/typescript-eslint/issues/8428 + */ +export declare function withoutProjectParserOptions(opts: Options): Omit; +//# sourceMappingURL=withoutProjectParserOptions.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/withoutProjectParserOptions.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/dist/withoutProjectParserOptions.d.ts.map new file mode 100644 index 0000000..fbfbccd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/withoutProjectParserOptions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"withoutProjectParserOptions.d.ts","sourceRoot":"","sources":["../src/withoutProjectParserOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,SAAS,MAAM,EAChE,IAAI,EAAE,OAAO,GACZ,IAAI,CACL,OAAO,EACP,gCAAgC,GAAG,SAAS,GAAG,gBAAgB,CAChE,CAMA"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/dist/withoutProjectParserOptions.js b/slider/node_modules/@typescript-eslint/typescript-estree/dist/withoutProjectParserOptions.js new file mode 100644 index 0000000..bb295f0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/dist/withoutProjectParserOptions.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.withoutProjectParserOptions = withoutProjectParserOptions; +/** + * Removes options that prompt the parser to parse the project with type + * information. In other words, you can use this if you are invoking the parser + * directly, to ensure that one file will be parsed in isolation, which is much, + * much faster. + * + * @see https://github.com/typescript-eslint/typescript-eslint/issues/8428 + */ +function withoutProjectParserOptions(opts) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars -- The variables are meant to be omitted + const { EXPERIMENTAL_useProjectService, project, projectService, ...rest } = opts; + return rest; +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/.github/FUNDING.yml b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/.github/FUNDING.yml new file mode 100644 index 0000000..9140606 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/.github/FUNDING.yml @@ -0,0 +1,2 @@ +tidelift: "npm/brace-expansion" +patreon: juliangruber diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/LICENSE b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/LICENSE new file mode 100644 index 0000000..821b49d --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/README.md b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/README.md new file mode 100644 index 0000000..e63cd4e --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/README.md @@ -0,0 +1,135 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) +[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## Sponsors + +This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! + +Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! + +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/index.js b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/index.js new file mode 100644 index 0000000..8e95256 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/index.js @@ -0,0 +1,203 @@ +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m) return [str]; + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + if (/\$$/.test(m.pre)) { + for (var k = 0; k < post.length; k++) { + var expansion = pre+ '{' + m.body + '}' + post[k]; + expansions.push(expansion); + } + } else { + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = []; + + for (var j = 0; j < n.length; j++) { + N.push.apply(N, expand(n[j], false)); + } + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + } + + return expansions; +} + diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/package.json b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/package.json new file mode 100644 index 0000000..2860ebf --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion/package.json @@ -0,0 +1,49 @@ +{ + "name": "brace-expansion", + "description": "Brace expansion as known from sh/bash", + "version": "2.0.2", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "main": "index.js", + "scripts": { + "test": "tape test/*.js", + "gentest": "bash test/generate.sh", + "bench": "matcha test/perf/bench.js" + }, + "dependencies": { + "balanced-match": "^1.0.0" + }, + "devDependencies": { + "@c4312/matcha": "^1.3.1", + "tape": "^4.6.0" + }, + "keywords": [], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "publishConfig": { + "tag": "2.x" + } +} diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/LICENSE b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/LICENSE new file mode 100644 index 0000000..2a04092 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/README.md b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/README.md new file mode 100644 index 0000000..63f1e3f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/README.md @@ -0,0 +1,454 @@ +# minimatch + +A minimal matching utility. + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```js +// hybrid module, load with require() or import +import { minimatch } from 'minimatch' +// or: +const { minimatch } = require('minimatch') + +minimatch('bar.foo', '*.foo') // true! +minimatch('bar.foo', '*.bar') // false! +minimatch('bar.foo', '*.+(bar|foo)', { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +- Brace Expansion +- Extended glob matching +- "Globstar" `**` matching +- [Posix character + classes](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html), + like `[[:alpha:]]`, supporting the full range of Unicode + characters. For example, `[[:alpha:]]` will match against + `'é'`, though `[a-zA-Z]` will not. Collating symbol and set + matching is not supported, so `[[=e=]]` will _not_ match `'é'` + and `[[.ch.]]` will not match `'ch'` in locales where `ch` is + considered a single character. + +See: + +- `man sh` +- `man bash` [Pattern + Matching](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) +- `man 3 fnmatch` +- `man 5 gitignore` + +## Windows + +**Please only use forward-slashes in glob expressions.** + +Though windows uses either `/` or `\` as its path separator, only `/` +characters are used by this glob implementation. You must use +forward-slashes **only** in glob expressions. Back-slashes in patterns +will always be interpreted as escape characters, not path separators. + +Note that `\` or `/` _will_ be interpreted as path separators in paths on +Windows, and will match against `/` in glob expressions. + +So just always use `/` in patterns. + +### UNC Paths + +On Windows, UNC paths like `//?/c:/...` or +`//ComputerName/Share/...` are handled specially. + +- Patterns starting with a double-slash followed by some + non-slash characters will preserve their double-slash. As a + result, a pattern like `//*` will match `//x`, but not `/x`. +- Patterns staring with `//?/:` will _not_ treat + the `?` as a wildcard character. Instead, it will be treated + as a normal string. +- Patterns starting with `//?/:/...` will match + file paths starting with `:/...`, and vice versa, + as if the `//?/` was not present. This behavior only is + present when the drive letters are a case-insensitive match to + one another. The remaining portions of the path/pattern are + compared case sensitively, unless `nocase:true` is set. + +Note that specifying a UNC path using `\` characters as path +separators is always allowed in the file path argument, but only +allowed in the pattern argument when `windowsPathsNoEscape: true` +is set in the options. + +## Minimatch Class + +Create a minimatch object by instantiating the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require('minimatch').Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +- `pattern` The original pattern the minimatch object represents. +- `options` The options supplied to the constructor. +- `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +- `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +- `negate` True if the pattern is negated. +- `comment` True if the pattern is a comment. +- `empty` True if the pattern is `""`. + +### Methods + +- `makeRe()` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +- `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +- `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. +- `hasMagic()` Returns true if the parsed pattern contains any + magic characters. Returns false if all comparator parts are + string literals. If the `magicalBraces` option is set on the + constructor, then it will consider brace expansions which are + not otherwise magical to be magic. If not set, then a pattern + like `a{b,c}d` will return `false`, because neither `abd` nor + `acd` contain any special glob characters. + + This does **not** mean that the pattern string can be used as a + literal filename, as it may contain magic glob characters that + are escaped. For example, the pattern `\\*` or `[*]` would not + be considered to have magic, as the matching portion parses to + the literal string `'*'` and would match a path named `'*'`, + not `'\\*'` or `'[*]'`. The `minimatch.unescape()` method may + be used to remove escape characters. + +All other methods are internal, and will be called as necessary. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, '*.js', { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter('*.js', { matchBase: true })) +``` + +### minimatch.escape(pattern, options = {}) + +Escape all magic characters in a glob pattern, so that it will +only ever match literal strings + +If the `windowsPathsNoEscape` option is used, then characters are +escaped by wrapping in `[]`, because a magic character wrapped in +a character class can only be satisfied by that exact character. + +Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot +be escaped or unescaped. + +### minimatch.unescape(pattern, options = {}) + +Un-escape a glob string that may contain some escaped characters. + +If the `windowsPathsNoEscape` option is used, then square-brace +escapes are removed, but not backslash escapes. For example, it +will turn the string `'[*]'` into `*`, but it will not turn +`'\\*'` into `'*'`, because `\` is a path separator in +`windowsPathsNoEscape` mode. + +When `windowsPathsNoEscape` is not set, then both brace escapes +and backslash escapes are removed. + +Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot +be escaped or unescaped. + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, '*.js', { matchBase: true }) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nocaseMagicOnly + +When used with `{nocase: true}`, create regular expressions that +are case-insensitive, but leave string match portions untouched. +Has no effect when used without `{nocase: true}` + +Useful when some other form of case-insensitive matching is used, +or if the original string representation is useful in some other +way. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### magicalBraces + +This only affects the results of the `Minimatch.hasMagic` method. + +If the pattern contains brace expansions, such as `a{b,c}d`, but +no other magic characters, then the `Minimatch.hasMagic()` method +will return `false` by default. When this option set, it will +return `true` for brace expansion as well as other magic glob +characters. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + +### partial + +Compare a partial path to a pattern. As long as the parts of the path that +are present are not contradicted by the pattern, it will be treated as a +match. This is useful in applications where you're walking through a +folder structure, and don't yet have the full path, but want to ensure that +you do not walk down paths that can never be a match. + +For example, + +```js +minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d +minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d +minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a +``` + +### windowsPathsNoEscape + +Use `\\` as a path separator _only_, and _never_ as an escape +character. If set, all `\\` characters are replaced with `/` in +the pattern. Note that this makes it **impossible** to match +against paths containing literal glob pattern characters, but +allows matching with patterns constructed using `path.join()` and +`path.resolve()` on Windows platforms, mimicking the (buggy!) +behavior of earlier versions on Windows. Please use with +caution, and be mindful of [the caveat about Windows +paths](#windows). + +For legacy reasons, this is also set if +`options.allowWindowsEscape` is set to the exact value `false`. + +### windowsNoMagicRoot + +When a pattern starts with a UNC path or drive letter, and in +`nocase:true` mode, do not convert the root portions of the +pattern into a case-insensitive regular expression, and instead +leave them as strings. + +This is the default when the platform is `win32` and +`nocase:true` is set. + +### preserveMultipleSlashes + +By default, multiple `/` characters (other than the leading `//` +in a UNC path, see "UNC Paths" above) are treated as a single +`/`. + +That is, a pattern like `a///b` will match the file path `a/b`. + +Set `preserveMultipleSlashes: true` to suppress this behavior. + +### optimizationLevel + +A number indicating the level of optimization that should be done +to the pattern prior to parsing and using it for matches. + +Globstar parts `**` are always converted to `*` when `noglobstar` +is set, and multiple adjacent `**` parts are converted into a +single `**` (ie, `a/**/**/b` will be treated as `a/**/b`, as this +is equivalent in all cases). + +- `0` - Make no further changes. In this mode, `.` and `..` are + maintained in the pattern, meaning that they must also appear + in the same position in the test path string. Eg, a pattern + like `a/*/../c` will match the string `a/b/../c` but not the + string `a/c`. +- `1` - (default) Remove cases where a double-dot `..` follows a + pattern portion that is not `**`, `.`, `..`, or empty `''`. For + example, the pattern `./a/b/../*` is converted to `./a/*`, and + so it will match the path string `./a/c`, but not the path + string `./a/b/../c`. Dots and empty path portions in the + pattern are preserved. +- `2` (or higher) - Much more aggressive optimizations, suitable + for use with file-walking cases: + + - Remove cases where a double-dot `..` follows a pattern + portion that is not `**`, `.`, or empty `''`. Remove empty + and `.` portions of the pattern, where safe to do so (ie, + anywhere other than the last position, the first position, or + the second position in a pattern starting with `/`, as this + may indicate a UNC path on Windows). + - Convert patterns containing `
/**/../

/` into the + equivalent `

/{..,**}/

/`, where `

` is a + a pattern portion other than `.`, `..`, `**`, or empty + `''`. + - Dedupe patterns where a `**` portion is present in one and + omitted in another, and it is not the final path portion, and + they are otherwise equivalent. So `{a/**/b,a/b}` becomes + `a/**/b`, because `**` matches against an empty path portion. + - Dedupe patterns where a `*` portion is present in one, and a + non-dot pattern other than `**`, `.`, `..`, or `''` is in the + same position in the other. So `a/{*,x}/b` becomes `a/*/b`, + because `*` can match against `x`. + + While these optimizations improve the performance of + file-walking use cases such as [glob](http://npm.im/glob) (ie, + the reason this module exists), there are cases where it will + fail to match a literal string that would have been matched in + optimization level 1 or 0. + + Specifically, while the `Minimatch.match()` method will + optimize the file path string in the same ways, resulting in + the same matches, it will fail when tested with the regular + expression provided by `Minimatch.makeRe()`, unless the path + string is first processed with + `minimatch.levelTwoFileOptimize()` or similar. + +### platform + +When set to `win32`, this will trigger all windows-specific +behaviors (special handling for UNC paths, and treating `\` as +separators in file paths for comparison.) + +Defaults to the value of `process.platform`. + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a +worthwhile goal, some discrepancies exist between minimatch and +other implementations. Some are intentional, and some are +unavoidable. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. + +Negated extglob patterns are handled as closely as possible to +Bash semantics, but there are some cases with negative extglobs +which are exceedingly difficult to express in a JavaScript +regular expression. In particular the negated pattern +`!(*|)*` will in bash match anything that does +not start with ``. However, +`!(*)*` _will_ match paths starting with +``, because the empty string can match against +the negated portion. In this library, `!(*|)*` +will _not_ match any pattern starting with ``, due to a +difference in precisely which patterns are considered "greedy" in +Regular Expressions vs bash path expansion. This may be fixable, +but not without incurring some complexity and performance costs, +and the trade-off seems to not be worth pursuing. + +Note that `fnmatch(3)` in libc is an extremely naive string comparison +matcher, which does not do anything special for slashes. This library is +designed to be used in glob searching and file walkers, and so it does do +special things with `/`. Thus, `foo*` will not match `foo/bar` in this +library, even though it would in `fnmatch(3)`. diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts new file mode 100644 index 0000000..fbb33fd --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts @@ -0,0 +1,2 @@ +export declare const assertValidPattern: (pattern: any) => void; +//# sourceMappingURL=assert-valid-pattern.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map new file mode 100644 index 0000000..ac11eb0 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAUlD,CAAA"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js new file mode 100644 index 0000000..367018f --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.assertValidPattern = void 0; +const MAX_PATTERN_LENGTH = 1024 * 64; +const assertValidPattern = (pattern) => { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern'); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long'); + } +}; +exports.assertValidPattern = assertValidPattern; +//# sourceMappingURL=assert-valid-pattern.js.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map new file mode 100644 index 0000000..78fbaaa --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map @@ -0,0 +1 @@ +{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AAC7B,MAAM,kBAAkB,GAA2B,CACxD,OAAY,EACe,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;KACvC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE;QACvC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;KAC3C;AACH,CAAC,CAAA;AAVY,QAAA,kBAAkB,sBAU9B","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n pattern: any\n): asserts pattern is string => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n"]} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.d.ts new file mode 100644 index 0000000..babdc02 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.d.ts @@ -0,0 +1,20 @@ +import { MinimatchOptions, MMRegExp } from './index.js'; +export type ExtglobType = '!' | '?' | '+' | '*' | '@'; +export declare class AST { + #private; + type: ExtglobType | null; + constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions); + get hasMagic(): boolean | undefined; + toString(): string; + push(...parts: (string | AST)[]): void; + toJSON(): any[]; + isStart(): boolean; + isEnd(): boolean; + copyIn(part: AST | string): void; + clone(parent: AST): AST; + static fromGlob(pattern: string, options?: MinimatchOptions): AST; + toMMPattern(): MMRegExp | string; + get options(): MinimatchOptions; + toRegExpSource(allowDot?: boolean): [re: string, body: string, hasMagic: boolean, uflag: boolean]; +} +//# sourceMappingURL=ast.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.d.ts.map new file mode 100644 index 0000000..65283e4 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAwCvD,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAkCrD,qBAAa,GAAG;;IACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;gBAiBtB,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,MAAM,CAAC,EAAE,GAAG,EACZ,OAAO,GAAE,gBAAqB;IAahC,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAUlC;IAGD,QAAQ,IAAI,MAAM;IA+ClB,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;IAY/B,MAAM;IAgBN,OAAO,IAAI,OAAO;IAgBlB,KAAK,IAAI,OAAO;IAYhB,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IAKzB,KAAK,CAAC,MAAM,EAAE,GAAG;IAsIjB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAQ/D,WAAW,IAAI,QAAQ,GAAG,MAAM;IA2BhC,IAAI,OAAO,qBAEV;IAuED,cAAc,CACZ,QAAQ,CAAC,EAAE,OAAO,GACjB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;CAiMjE"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.js b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.js new file mode 100644 index 0000000..1e88b31 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.js @@ -0,0 +1,592 @@ +"use strict"; +// parse a single path portion +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AST = void 0; +const brace_expressions_js_1 = require("./brace-expressions.js"); +const unescape_js_1 = require("./unescape.js"); +const types = new Set(['!', '?', '+', '*', '@']); +const isExtglobType = (c) => types.has(c); +// Patterns that get prepended to bind to the start of either the +// entire string, or just a single path portion, to prevent dots +// and/or traversal patterns, when needed. +// Exts don't need the ^ or / bit, because the root binds that already. +const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))'; +const startNoDot = '(?!\\.)'; +// characters that indicate a start of pattern needs the "no dots" bit, +// because a dot *might* be matched. ( is not in the list, because in +// the case of a child extglob, it will handle the prevention itself. +const addPatternStart = new Set(['[', '.']); +// cases where traversal is A-OK, no dot prevention needed +const justDots = new Set(['..', '.']); +const reSpecials = new Set('().*{}+?[]^$\\!'); +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// any single thing other than / +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// use + when we need to ensure that *something* matches, because the * is +// the only thing in the path portion. +const starNoEmpty = qmark + '+?'; +// remove the \ chars that we added if we end up doing a nonmagic compare +// const deslash = (s: string) => s.replace(/\\(.)/g, '$1') +class AST { + type; + #root; + #hasMagic; + #uflag = false; + #parts = []; + #parent; + #parentIndex; + #negs; + #filledNegs = false; + #options; + #toString; + // set to true if it's an extglob with no children + // (which really means one child of '') + #emptyExt = false; + constructor(type, parent, options = {}) { + this.type = type; + // extglobs are inherently magical + if (type) + this.#hasMagic = true; + this.#parent = parent; + this.#root = this.#parent ? this.#parent.#root : this; + this.#options = this.#root === this ? options : this.#root.#options; + this.#negs = this.#root === this ? [] : this.#root.#negs; + if (type === '!' && !this.#root.#filledNegs) + this.#negs.push(this); + this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; + } + get hasMagic() { + /* c8 ignore start */ + if (this.#hasMagic !== undefined) + return this.#hasMagic; + /* c8 ignore stop */ + for (const p of this.#parts) { + if (typeof p === 'string') + continue; + if (p.type || p.hasMagic) + return (this.#hasMagic = true); + } + // note: will be undefined until we generate the regexp src and find out + return this.#hasMagic; + } + // reconstructs the pattern + toString() { + if (this.#toString !== undefined) + return this.#toString; + if (!this.type) { + return (this.#toString = this.#parts.map(p => String(p)).join('')); + } + else { + return (this.#toString = + this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')'); + } + } + #fillNegs() { + /* c8 ignore start */ + if (this !== this.#root) + throw new Error('should only call on root'); + if (this.#filledNegs) + return this; + /* c8 ignore stop */ + // call toString() once to fill this out + this.toString(); + this.#filledNegs = true; + let n; + while ((n = this.#negs.pop())) { + if (n.type !== '!') + continue; + // walk up the tree, appending everthing that comes AFTER parentIndex + let p = n; + let pp = p.#parent; + while (pp) { + for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { + for (const part of n.#parts) { + /* c8 ignore start */ + if (typeof part === 'string') { + throw new Error('string part in extglob AST??'); + } + /* c8 ignore stop */ + part.copyIn(pp.#parts[i]); + } + } + p = pp; + pp = p.#parent; + } + } + return this; + } + push(...parts) { + for (const p of parts) { + if (p === '') + continue; + /* c8 ignore start */ + if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { + throw new Error('invalid part: ' + p); + } + /* c8 ignore stop */ + this.#parts.push(p); + } + } + toJSON() { + const ret = this.type === null + ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) + : [this.type, ...this.#parts.map(p => p.toJSON())]; + if (this.isStart() && !this.type) + ret.unshift([]); + if (this.isEnd() && + (this === this.#root || + (this.#root.#filledNegs && this.#parent?.type === '!'))) { + ret.push({}); + } + return ret; + } + isStart() { + if (this.#root === this) + return true; + // if (this.type) return !!this.#parent?.isStart() + if (!this.#parent?.isStart()) + return false; + if (this.#parentIndex === 0) + return true; + // if everything AHEAD of this is a negation, then it's still the "start" + const p = this.#parent; + for (let i = 0; i < this.#parentIndex; i++) { + const pp = p.#parts[i]; + if (!(pp instanceof AST && pp.type === '!')) { + return false; + } + } + return true; + } + isEnd() { + if (this.#root === this) + return true; + if (this.#parent?.type === '!') + return true; + if (!this.#parent?.isEnd()) + return false; + if (!this.type) + return this.#parent?.isEnd(); + // if not root, it'll always have a parent + /* c8 ignore start */ + const pl = this.#parent ? this.#parent.#parts.length : 0; + /* c8 ignore stop */ + return this.#parentIndex === pl - 1; + } + copyIn(part) { + if (typeof part === 'string') + this.push(part); + else + this.push(part.clone(this)); + } + clone(parent) { + const c = new AST(this.type, parent); + for (const p of this.#parts) { + c.copyIn(p); + } + return c; + } + static #parseAST(str, ast, pos, opt) { + let escaping = false; + let inBrace = false; + let braceStart = -1; + let braceNeg = false; + if (ast.type === null) { + // outside of a extglob, append until we find a start + let i = pos; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { + ast.push(acc); + acc = ''; + const ext = new AST(c, ast); + i = AST.#parseAST(str, ext, i, opt); + ast.push(ext); + continue; + } + acc += c; + } + ast.push(acc); + return i; + } + // some kind of extglob, pos is at the ( + // find the next | or ) + let i = pos + 1; + let part = new AST(null, ast); + const parts = []; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (isExtglobType(c) && str.charAt(i) === '(') { + part.push(acc); + acc = ''; + const ext = new AST(c, part); + part.push(ext); + i = AST.#parseAST(str, ext, i, opt); + continue; + } + if (c === '|') { + part.push(acc); + acc = ''; + parts.push(part); + part = new AST(null, ast); + continue; + } + if (c === ')') { + if (acc === '' && ast.#parts.length === 0) { + ast.#emptyExt = true; + } + part.push(acc); + acc = ''; + ast.push(...parts, part); + return i; + } + acc += c; + } + // unfinished extglob + // if we got here, it was a malformed extglob! not an extglob, but + // maybe something else in there. + ast.type = null; + ast.#hasMagic = undefined; + ast.#parts = [str.substring(pos - 1)]; + return i; + } + static fromGlob(pattern, options = {}) { + const ast = new AST(null, undefined, options); + AST.#parseAST(pattern, ast, 0, options); + return ast; + } + // returns the regular expression if there's magic, or the unescaped + // string if not. + toMMPattern() { + // should only be called on root + /* c8 ignore start */ + if (this !== this.#root) + return this.#root.toMMPattern(); + /* c8 ignore stop */ + const glob = this.toString(); + const [re, body, hasMagic, uflag] = this.toRegExpSource(); + // if we're in nocase mode, and not nocaseMagicOnly, then we do + // still need a regular expression if we have to case-insensitively + // match capital/lowercase characters. + const anyMagic = hasMagic || + this.#hasMagic || + (this.#options.nocase && + !this.#options.nocaseMagicOnly && + glob.toUpperCase() !== glob.toLowerCase()); + if (!anyMagic) { + return body; + } + const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : ''); + return Object.assign(new RegExp(`^${re}$`, flags), { + _src: re, + _glob: glob, + }); + } + get options() { + return this.#options; + } + // returns the string match, the regexp source, whether there's magic + // in the regexp (so a regular expression is required) and whether or + // not the uflag is needed for the regular expression (for posix classes) + // TODO: instead of injecting the start/end at this point, just return + // the BODY of the regexp, along with the start/end portions suitable + // for binding the start/end in either a joined full-path makeRe context + // (where we bind to (^|/), or a standalone matchPart context (where + // we bind to ^, and not /). Otherwise slashes get duped! + // + // In part-matching mode, the start is: + // - if not isStart: nothing + // - if traversal possible, but not allowed: ^(?!\.\.?$) + // - if dots allowed or not possible: ^ + // - if dots possible and not allowed: ^(?!\.) + // end is: + // - if not isEnd(): nothing + // - else: $ + // + // In full-path matching mode, we put the slash at the START of the + // pattern, so start is: + // - if first pattern: same as part-matching mode + // - if not isStart(): nothing + // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) + // - if dots allowed or not possible: / + // - if dots possible and not allowed: /(?!\.) + // end is: + // - if last pattern, same as part-matching mode + // - else nothing + // + // Always put the (?:$|/) on negated tails, though, because that has to be + // there to bind the end of the negated pattern portion, and it's easier to + // just stick it in now rather than try to inject it later in the middle of + // the pattern. + // + // We can just always return the same end, and leave it up to the caller + // to know whether it's going to be used joined or in parts. + // And, if the start is adjusted slightly, can do the same there: + // - if not isStart: nothing + // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) + // - if dots allowed or not possible: (?:/|^) + // - if dots possible and not allowed: (?:/|^)(?!\.) + // + // But it's better to have a simpler binding without a conditional, for + // performance, so probably better to return both start options. + // + // Then the caller just ignores the end if it's not the first pattern, + // and the start always gets applied. + // + // But that's always going to be $ if it's the ending pattern, or nothing, + // so the caller can just attach $ at the end of the pattern when building. + // + // So the todo is: + // - better detect what kind of start is needed + // - return both flavors of starting pattern + // - attach $ at the end of the pattern when creating the actual RegExp + // + // Ah, but wait, no, that all only applies to the root when the first pattern + // is not an extglob. If the first pattern IS an extglob, then we need all + // that dot prevention biz to live in the extglob portions, because eg + // +(*|.x*) can match .xy but not .yx. + // + // So, return the two flavors if it's #root and the first child is not an + // AST, otherwise leave it to the child AST to handle it, and there, + // use the (?:^|/) style of start binding. + // + // Even simplified further: + // - Since the start for a join is eg /(?!\.) and the start for a part + // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root + // or start or whatever) and prepend ^ or / at the Regexp construction. + toRegExpSource(allowDot) { + const dot = allowDot ?? !!this.#options.dot; + if (this.#root === this) + this.#fillNegs(); + if (!this.type) { + const noEmpty = this.isStart() && this.isEnd(); + const src = this.#parts + .map(p => { + const [re, _, hasMagic, uflag] = typeof p === 'string' + ? AST.#parseGlob(p, this.#hasMagic, noEmpty) + : p.toRegExpSource(allowDot); + this.#hasMagic = this.#hasMagic || hasMagic; + this.#uflag = this.#uflag || uflag; + return re; + }) + .join(''); + let start = ''; + if (this.isStart()) { + if (typeof this.#parts[0] === 'string') { + // this is the string that will match the start of the pattern, + // so we need to protect against dots and such. + // '.' and '..' cannot match unless the pattern is that exactly, + // even if it starts with . or dot:true is set. + const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); + if (!dotTravAllowed) { + const aps = addPatternStart; + // check if we have a possibility of matching . or .., + // and prevent that. + const needNoTrav = + // dots are allowed, and the pattern starts with [ or . + (dot && aps.has(src.charAt(0))) || + // the pattern starts with \., and then [ or . + (src.startsWith('\\.') && aps.has(src.charAt(2))) || + // the pattern starts with \.\., and then [ or . + (src.startsWith('\\.\\.') && aps.has(src.charAt(4))); + // no need to prevent dots if it can't match a dot, or if a + // sub-pattern will be preventing it anyway. + const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); + start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; + } + } + } + // append the "end of path portion" pattern to negation tails + let end = ''; + if (this.isEnd() && + this.#root.#filledNegs && + this.#parent?.type === '!') { + end = '(?:$|\\/)'; + } + const final = start + src + end; + return [ + final, + (0, unescape_js_1.unescape)(src), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; + } + // We need to calculate the body *twice* if it's a repeat pattern + // at the start, once in nodot mode, then again in dot mode, so a + // pattern like *(?) can match 'x.y' + const repeated = this.type === '*' || this.type === '+'; + // some kind of extglob + const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; + let body = this.#partsToRegExp(dot); + if (this.isStart() && this.isEnd() && !body && this.type !== '!') { + // invalid extglob, has to at least be *something* present, if it's + // the entire path portion. + const s = this.toString(); + this.#parts = [s]; + this.type = null; + this.#hasMagic = undefined; + return [s, (0, unescape_js_1.unescape)(this.toString()), false, false]; + } + // XXX abstract out this map method + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot + ? '' + : this.#partsToRegExp(true); + if (bodyDotAllowed === body) { + bodyDotAllowed = ''; + } + if (bodyDotAllowed) { + body = `(?:${body})(?:${bodyDotAllowed})*?`; + } + // an empty !() is exactly equivalent to a starNoEmpty + let final = ''; + if (this.type === '!' && this.#emptyExt) { + final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; + } + else { + const close = this.type === '!' + ? // !() must match something,but !(x) can match '' + '))' + + (this.isStart() && !dot && !allowDot ? startNoDot : '') + + star + + ')' + : this.type === '@' + ? ')' + : this.type === '?' + ? ')?' + : this.type === '+' && bodyDotAllowed + ? ')' + : this.type === '*' && bodyDotAllowed + ? `)?` + : `)${this.type}`; + final = start + body + close; + } + return [ + final, + (0, unescape_js_1.unescape)(body), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; + } + #partsToRegExp(dot) { + return this.#parts + .map(p => { + // extglob ASTs should only contain parent ASTs + /* c8 ignore start */ + if (typeof p === 'string') { + throw new Error('string type in extglob ast??'); + } + /* c8 ignore stop */ + // can ignore hasMagic, because extglobs are already always magic + const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot); + this.#uflag = this.#uflag || uflag; + return re; + }) + .filter(p => !(this.isStart() && this.isEnd()) || !!p) + .join('|'); + } + static #parseGlob(glob, hasMagic, noEmpty = false) { + let escaping = false; + let re = ''; + let uflag = false; + for (let i = 0; i < glob.length; i++) { + const c = glob.charAt(i); + if (escaping) { + escaping = false; + re += (reSpecials.has(c) ? '\\' : '') + c; + continue; + } + if (c === '\\') { + if (i === glob.length - 1) { + re += '\\\\'; + } + else { + escaping = true; + } + continue; + } + if (c === '[') { + const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + continue; + } + } + if (c === '*') { + if (noEmpty && glob === '*') + re += starNoEmpty; + else + re += star; + hasMagic = true; + continue; + } + if (c === '?') { + re += qmark; + hasMagic = true; + continue; + } + re += regExpEscape(c); + } + return [re, (0, unescape_js_1.unescape)(glob), !!hasMagic, uflag]; + } +} +exports.AST = AST; +//# sourceMappingURL=ast.js.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.js.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.js.map new file mode 100644 index 0000000..eb363fc --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.js.map @@ -0,0 +1 @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AE,CAAC,GAAG,CAAC,CAAA;gBACzC,SAAQ;aACT;YACD,IAAI,CAAC,KAAK,IAAI,EAAE;gBACd,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;oBACzB,EAAE,IAAI,MAAM,CAAA;iBACb;qBAAM;oBACL,QAAQ,GAAG,IAAI,CAAA;iBAChB;gBACD,SAAQ;aACT;YACD,IAAI,CAAC,KAAK,GAAG,EAAE;gBACb,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,GAAG,IAAA,iCAAU,EAAC,IAAI,EAAE,CAAC,CAAC,CAAA;gBAC7D,IAAI,QAAQ,EAAE;oBACZ,EAAE,IAAI,GAAG,CAAA;oBACT,KAAK,GAAG,KAAK,IAAI,SAAS,CAAA;oBAC1B,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAA;oBACjB,QAAQ,GAAG,QAAQ,IAAI,KAAK,CAAA;oBAC5B,SAAQ;iBACT;aACF;YACD,IAAI,CAAC,KAAK,GAAG,EAAE;gBACb,IAAI,OAAO,IAAI,IAAI,KAAK,GAAG;oBAAE,EAAE,IAAI,WAAW,CAAA;;oBACzC,EAAE,IAAI,IAAI,CAAA;gBACf,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;aACT;YACD,IAAI,CAAC,KAAK,GAAG,EAAE;gBACb,EAAE,IAAI,KAAK,CAAA;gBACX,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;aACT;YACD,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA;SACtB;QACD,OAAO,CAAC,EAAE,EAAE,IAAA,sBAAQ,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;CACF;AA/kBD,kBA+kBC","sourcesContent":["// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n// 1 2 3 4 5 6 1 2 3 46 5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n// v----- .* because there's more following,\n// v v otherwise, .+ because it must be\n// v v *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n// copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string): c is ExtglobType =>\n types.has(c as ExtglobType)\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nexport class AST {\n type: ExtglobType | null\n readonly #root: AST\n\n #hasMagic?: boolean\n #uflag: boolean = false\n #parts: (string | AST)[] = []\n readonly #parent?: AST\n readonly #parentIndex: number\n #negs: AST[]\n #filledNegs: boolean = false\n #options: MinimatchOptions\n #toString?: string\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt: boolean = false\n\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {}\n ) {\n this.type = type\n // extglobs are inherently magical\n if (type) this.#hasMagic = true\n this.#parent = parent\n this.#root = this.#parent ? this.#parent.#root : this\n this.#options = this.#root === this ? options : this.#root.#options\n this.#negs = this.#root === this ? [] : this.#root.#negs\n if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n }\n\n get hasMagic(): boolean | undefined {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined) return this.#hasMagic\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string') continue\n if (p.type || p.hasMagic) return (this.#hasMagic = true)\n }\n // note: will be undefined until we generate the regexp src and find out\n return this.#hasMagic\n }\n\n // reconstructs the pattern\n toString(): string {\n if (this.#toString !== undefined) return this.#toString\n if (!this.type) {\n return (this.#toString = this.#parts.map(p => String(p)).join(''))\n } else {\n return (this.#toString =\n this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')')\n }\n }\n\n #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root) throw new Error('should only call on root')\n if (this.#filledNegs) return this\n /* c8 ignore stop */\n\n // call toString() once to fill this out\n this.toString()\n this.#filledNegs = true\n let n: AST | undefined\n while ((n = this.#negs.pop())) {\n if (n.type !== '!') continue\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p: AST | undefined = n\n let pp = p.#parent\n while (pp) {\n for (\n let i = p.#parentIndex + 1;\n !pp.type && i < pp.#parts.length;\n i++\n ) {\n for (const part of n.#parts) {\n /* c8 ignore start */\n if (typeof part === 'string') {\n throw new Error('string part in extglob AST??')\n }\n /* c8 ignore stop */\n part.copyIn(pp.#parts[i])\n }\n }\n p = pp\n pp = p.#parent\n }\n }\n return this\n }\n\n push(...parts: (string | AST)[]) {\n for (const p of parts) {\n if (p === '') continue\n /* c8 ignore start */\n if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {\n throw new Error('invalid part: ' + p)\n }\n /* c8 ignore stop */\n this.#parts.push(p)\n }\n }\n\n toJSON() {\n const ret: any[] =\n this.type === null\n ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))\n : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n if (this.isStart() && !this.type) ret.unshift([])\n if (\n this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))\n ) {\n ret.push({})\n }\n return ret\n }\n\n isStart(): boolean {\n if (this.#root === this) return true\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart()) return false\n if (this.#parentIndex === 0) return true\n // if everything AHEAD of this is a negation, then it's still the \"start\"\n const p = this.#parent\n for (let i = 0; i < this.#parentIndex; i++) {\n const pp = p.#parts[i]\n if (!(pp instanceof AST && pp.type === '!')) {\n return false\n }\n }\n return true\n }\n\n isEnd(): boolean {\n if (this.#root === this) return true\n if (this.#parent?.type === '!') return true\n if (!this.#parent?.isEnd()) return false\n if (!this.type) return this.#parent?.isEnd()\n // if not root, it'll always have a parent\n /* c8 ignore start */\n const pl = this.#parent ? this.#parent.#parts.length : 0\n /* c8 ignore stop */\n return this.#parentIndex === pl - 1\n }\n\n copyIn(part: AST | string) {\n if (typeof part === 'string') this.push(part)\n else this.push(part.clone(this))\n }\n\n clone(parent: AST) {\n const c = new AST(this.type, parent)\n for (const p of this.#parts) {\n c.copyIn(p)\n }\n return c\n }\n\n static #parseAST(\n str: string,\n ast: AST,\n pos: number,\n opt: MinimatchOptions\n ): number {\n let escaping = false\n let inBrace = false\n let braceStart = -1\n let braceNeg = false\n if (ast.type === null) {\n // outside of a extglob, append until we find a start\n let i = pos\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {\n ast.push(acc)\n acc = ''\n const ext = new AST(c, ast)\n i = AST.#parseAST(str, ext, i, opt)\n ast.push(ext)\n continue\n }\n acc += c\n }\n ast.push(acc)\n return i\n }\n\n // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1\n let part = new AST(null, ast)\n const parts: AST[] = []\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n if (isExtglobType(c) && str.charAt(i) === '(') {\n part.push(acc)\n acc = ''\n const ext = new AST(c, part)\n part.push(ext)\n i = AST.#parseAST(str, ext, i, opt)\n continue\n }\n if (c === '|') {\n part.push(acc)\n acc = ''\n parts.push(part)\n part = new AST(null, ast)\n continue\n }\n if (c === ')') {\n if (acc === '' && ast.#parts.length === 0) {\n ast.#emptyExt = true\n }\n part.push(acc)\n acc = ''\n ast.push(...parts, part)\n return i\n }\n acc += c\n }\n\n // unfinished extglob\n // if we got here, it was a malformed extglob! not an extglob, but\n // maybe something else in there.\n ast.type = null\n ast.#hasMagic = undefined\n ast.#parts = [str.substring(pos - 1)]\n return i\n }\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n const ast = new AST(null, undefined, options)\n AST.#parseAST(pattern, ast, 0, options)\n return ast\n }\n\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern(): MMRegExp | string {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root) return this.#root.toMMPattern()\n /* c8 ignore stop */\n const glob = this.toString()\n const [re, body, hasMagic, uflag] = this.toRegExpSource()\n // if we're in nocase mode, and not nocaseMagicOnly, then we do\n // still need a regular expression if we have to case-insensitively\n // match capital/lowercase characters.\n const anyMagic =\n hasMagic ||\n this.#hasMagic ||\n (this.#options.nocase &&\n !this.#options.nocaseMagicOnly &&\n glob.toUpperCase() !== glob.toLowerCase())\n if (!anyMagic) {\n return body\n }\n\n const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n return Object.assign(new RegExp(`^${re}$`, flags), {\n _src: re,\n _glob: glob,\n })\n }\n\n get options() {\n return this.#options\n }\n\n // returns the string match, the regexp source, whether there's magic\n // in the regexp (so a regular expression is required) and whether or\n // not the uflag is needed for the regular expression (for posix classes)\n // TODO: instead of injecting the start/end at this point, just return\n // the BODY of the regexp, along with the start/end portions suitable\n // for binding the start/end in either a joined full-path makeRe context\n // (where we bind to (^|/), or a standalone matchPart context (where\n // we bind to ^, and not /). Otherwise slashes get duped!\n //\n // In part-matching mode, the start is:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n // - if dots allowed or not possible: ^\n // - if dots possible and not allowed: ^(?!\\.)\n // end is:\n // - if not isEnd(): nothing\n // - else: $\n //\n // In full-path matching mode, we put the slash at the START of the\n // pattern, so start is:\n // - if first pattern: same as part-matching mode\n // - if not isStart(): nothing\n // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n // - if dots allowed or not possible: /\n // - if dots possible and not allowed: /(?!\\.)\n // end is:\n // - if last pattern, same as part-matching mode\n // - else nothing\n //\n // Always put the (?:$|/) on negated tails, though, because that has to be\n // there to bind the end of the negated pattern portion, and it's easier to\n // just stick it in now rather than try to inject it later in the middle of\n // the pattern.\n //\n // We can just always return the same end, and leave it up to the caller\n // to know whether it's going to be used joined or in parts.\n // And, if the start is adjusted slightly, can do the same there:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n // - if dots allowed or not possible: (?:/|^)\n // - if dots possible and not allowed: (?:/|^)(?!\\.)\n //\n // But it's better to have a simpler binding without a conditional, for\n // performance, so probably better to return both start options.\n //\n // Then the caller just ignores the end if it's not the first pattern,\n // and the start always gets applied.\n //\n // But that's always going to be $ if it's the ending pattern, or nothing,\n // so the caller can just attach $ at the end of the pattern when building.\n //\n // So the todo is:\n // - better detect what kind of start is needed\n // - return both flavors of starting pattern\n // - attach $ at the end of the pattern when creating the actual RegExp\n //\n // Ah, but wait, no, that all only applies to the root when the first pattern\n // is not an extglob. If the first pattern IS an extglob, then we need all\n // that dot prevention biz to live in the extglob portions, because eg\n // +(*|.x*) can match .xy but not .yx.\n //\n // So, return the two flavors if it's #root and the first child is not an\n // AST, otherwise leave it to the child AST to handle it, and there,\n // use the (?:^|/) style of start binding.\n //\n // Even simplified further:\n // - Since the start for a join is eg /(?!\\.) and the start for a part\n // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n // or start or whatever) and prepend ^ or / at the Regexp construction.\n toRegExpSource(\n allowDot?: boolean\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n const dot = allowDot ?? !!this.#options.dot\n if (this.#root === this) this.#fillNegs()\n if (!this.type) {\n const noEmpty = this.isStart() && this.isEnd()\n const src = this.#parts\n .map(p => {\n const [re, _, hasMagic, uflag] =\n typeof p === 'string'\n ? AST.#parseGlob(p, this.#hasMagic, noEmpty)\n : p.toRegExpSource(allowDot)\n this.#hasMagic = this.#hasMagic || hasMagic\n this.#uflag = this.#uflag || uflag\n return re\n })\n .join('')\n\n let start = ''\n if (this.isStart()) {\n if (typeof this.#parts[0] === 'string') {\n // this is the string that will match the start of the pattern,\n // so we need to protect against dots and such.\n\n // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed =\n this.#parts.length === 1 && justDots.has(this.#parts[0])\n if (!dotTravAllowed) {\n const aps = addPatternStart\n // check if we have a possibility of matching . or ..,\n // and prevent that.\n const needNoTrav =\n // dots are allowed, and the pattern starts with [ or .\n (dot && aps.has(src.charAt(0))) ||\n // the pattern starts with \\., and then [ or .\n (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n // the pattern starts with \\.\\., and then [ or .\n (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n // no need to prevent dots if it can't match a dot, or if a\n // sub-pattern will be preventing it anyway.\n const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''\n }\n }\n }\n\n // append the \"end of path portion\" pattern to negation tails\n let end = ''\n if (\n this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!'\n ) {\n end = '(?:$|\\\\/)'\n }\n const final = start + src + end\n return [\n final,\n unescape(src),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n // We need to calculate the body *twice* if it's a repeat pattern\n // at the start, once in nodot mode, then again in dot mode, so a\n // pattern like *(?) can match 'x.y'\n\n const repeated = this.type === '*' || this.type === '+'\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n let body = this.#partsToRegExp(dot)\n\n if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n // invalid extglob, has to at least be *something* present, if it's\n // the entire path portion.\n const s = this.toString()\n this.#parts = [s]\n this.type = null\n this.#hasMagic = undefined\n return [s, unescape(this.toString()), false, false]\n }\n\n // XXX abstract out this map method\n let bodyDotAllowed =\n !repeated || allowDot || dot || !startNoDot\n ? ''\n : this.#partsToRegExp(true)\n if (bodyDotAllowed === body) {\n bodyDotAllowed = ''\n }\n if (bodyDotAllowed) {\n body = `(?:${body})(?:${bodyDotAllowed})*?`\n }\n\n // an empty !() is exactly equivalent to a starNoEmpty\n let final = ''\n if (this.type === '!' && this.#emptyExt) {\n final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n } else {\n const close =\n this.type === '!'\n ? // !() must match something,but !(x) can match ''\n '))' +\n (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n star +\n ')'\n : this.type === '@'\n ? ')'\n : this.type === '?'\n ? ')?'\n : this.type === '+' && bodyDotAllowed\n ? ')'\n : this.type === '*' && bodyDotAllowed\n ? `)?`\n : `)${this.type}`\n final = start + body + close\n }\n return [\n final,\n unescape(body),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n #partsToRegExp(dot: boolean) {\n return this.#parts\n .map(p => {\n // extglob ASTs should only contain parent ASTs\n /* c8 ignore start */\n if (typeof p === 'string') {\n throw new Error('string type in extglob ast??')\n }\n /* c8 ignore stop */\n // can ignore hasMagic, because extglobs are already always magic\n const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n this.#uflag = this.#uflag || uflag\n return re\n })\n .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n .join('|')\n }\n\n static #parseGlob(\n glob: string,\n hasMagic: boolean | undefined,\n noEmpty: boolean = false\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n let escaping = false\n let re = ''\n let uflag = false\n for (let i = 0; i < glob.length; i++) {\n const c = glob.charAt(i)\n if (escaping) {\n escaping = false\n re += (reSpecials.has(c) ? '\\\\' : '') + c\n continue\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\'\n } else {\n escaping = true\n }\n continue\n }\n if (c === '[') {\n const [src, needUflag, consumed, magic] = parseClass(glob, i)\n if (consumed) {\n re += src\n uflag = uflag || needUflag\n i += consumed - 1\n hasMagic = hasMagic || magic\n continue\n }\n }\n if (c === '*') {\n if (noEmpty && glob === '*') re += starNoEmpty\n else re += star\n hasMagic = true\n continue\n }\n if (c === '?') {\n re += qmark\n hasMagic = true\n continue\n }\n re += regExpEscape(c)\n }\n return [re, unescape(glob), !!hasMagic, uflag]\n }\n}\n"]} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts new file mode 100644 index 0000000..4d52b29 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts @@ -0,0 +1,8 @@ +export type ParseClassResult = [ + src: string, + uFlag: boolean, + consumed: number, + hasMagic: boolean +]; +export declare const parseClass: (glob: string, position: number) => ParseClassResult; +//# sourceMappingURL=brace-expressions.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map new file mode 100644 index 0000000..19d8792 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,SACf,MAAM,YACF,MAAM,qBA8HjB,CAAA"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.js b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.js new file mode 100644 index 0000000..3d70119 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.js @@ -0,0 +1,152 @@ +"use strict"; +// translate the various posix character classes into unicode properties +// this works across all unicode locales +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseClass = void 0; +// { : [, /u flag required, negated] +const posixClasses = { + '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true], + '[:alpha:]': ['\\p{L}\\p{Nl}', true], + '[:ascii:]': ['\\x' + '00-\\x' + '7f', false], + '[:blank:]': ['\\p{Zs}\\t', true], + '[:cntrl:]': ['\\p{Cc}', true], + '[:digit:]': ['\\p{Nd}', true], + '[:graph:]': ['\\p{Z}\\p{C}', true, true], + '[:lower:]': ['\\p{Ll}', true], + '[:print:]': ['\\p{C}', true], + '[:punct:]': ['\\p{P}', true], + '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true], + '[:upper:]': ['\\p{Lu}', true], + '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true], + '[:xdigit:]': ['A-Fa-f0-9', false], +}; +// only need to escape a few things inside of brace expressions +// escapes: [ \ ] - +const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&'); +// escape all regexp magic characters +const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// everything has already been escaped, we just have to join +const rangesToString = (ranges) => ranges.join(''); +// takes a glob string at a posix brace expression, and returns +// an equivalent regular expression source, and boolean indicating +// whether the /u flag needs to be applied, and the number of chars +// consumed to parse the character class. +// This also removes out of order ranges, and returns ($.) if the +// entire class just no good. +const parseClass = (glob, position) => { + const pos = position; + /* c8 ignore start */ + if (glob.charAt(pos) !== '[') { + throw new Error('not in a brace expression'); + } + /* c8 ignore stop */ + const ranges = []; + const negs = []; + let i = pos + 1; + let sawStart = false; + let uflag = false; + let escaping = false; + let negate = false; + let endPos = pos; + let rangeStart = ''; + WHILE: while (i < glob.length) { + const c = glob.charAt(i); + if ((c === '!' || c === '^') && i === pos + 1) { + negate = true; + i++; + continue; + } + if (c === ']' && sawStart && !escaping) { + endPos = i + 1; + break; + } + sawStart = true; + if (c === '\\') { + if (!escaping) { + escaping = true; + i++; + continue; + } + // escaped \ char, fall through and treat like normal char + } + if (c === '[' && !escaping) { + // either a posix class, a collation equivalent, or just a [ + for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { + if (glob.startsWith(cls, i)) { + // invalid, [a-[] is fine, but not [a-[:alpha]] + if (rangeStart) { + return ['$.', false, glob.length - pos, true]; + } + i += cls.length; + if (neg) + negs.push(unip); + else + ranges.push(unip); + uflag = uflag || u; + continue WHILE; + } + } + } + // now it's just a normal character, effectively + escaping = false; + if (rangeStart) { + // throw this range away if it's not valid, but others + // can still match. + if (c > rangeStart) { + ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c)); + } + else if (c === rangeStart) { + ranges.push(braceEscape(c)); + } + rangeStart = ''; + i++; + continue; + } + // now might be the start of a range. + // can be either c-d or c-] or c] or c] at this point + if (glob.startsWith('-]', i + 1)) { + ranges.push(braceEscape(c + '-')); + i += 2; + continue; + } + if (glob.startsWith('-', i + 1)) { + rangeStart = c; + i += 2; + continue; + } + // not the start of a range, just a single character + ranges.push(braceEscape(c)); + i++; + } + if (endPos < i) { + // didn't see the end of the class, not a valid class, + // but might still be valid as a literal match. + return ['', false, 0, false]; + } + // if we got no ranges and no negates, then we have a range that + // cannot possibly match anything, and that poisons the whole glob + if (!ranges.length && !negs.length) { + return ['$.', false, glob.length - pos, true]; + } + // if we got one positive range, and it's a single character, then that's + // not actually a magic pattern, it's just that one literal character. + // we should not treat that as "magic", we should just return the literal + // character. [_] is a perfectly valid way to escape glob magic chars. + if (negs.length === 0 && + ranges.length === 1 && + /^\\?.$/.test(ranges[0]) && + !negate) { + const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; + return [regexpEscape(r), false, endPos - pos, false]; + } + const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; + const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; + const comb = ranges.length && negs.length + ? '(' + sranges + '|' + snegs + ')' + : ranges.length + ? sranges + : snegs; + return [comb, uflag, endPos - pos, true]; +}; +exports.parseClass = parseClass; +//# sourceMappingURL=brace-expressions.js.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.js.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.js.map new file mode 100644 index 0000000..03ab029 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":";AAAA,wEAAwE;AACxE,wCAAwC;;;AAExC,8DAA8D;AAC9D,MAAM,YAAY,GAA0D;IAC1E,WAAW,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,KAAK,GAAG,QAAQ,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MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACpE,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QAC1B,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG;QACnC,CAAC,CAAC,MAAM,CAAC,MAAM;YACf,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK,CAAA;IAEX,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA;AAhIY,QAAA,UAAU,cAgItB","sourcesContent":["// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { : [, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } = {\n '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n '[:cntrl:]': ['\\\\p{Cc}', true],\n '[:digit:]': ['\\\\p{Nd}', true],\n '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n '[:lower:]': ['\\\\p{Ll}', true],\n '[:print:]': ['\\\\p{C}', true],\n '[:punct:]': ['\\\\p{P}', true],\n '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n '[:upper:]': ['\\\\p{Lu}', true],\n '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n '[:xdigit:]': ['A-Fa-f0-9', false],\n}\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n src: string,\n uFlag: boolean,\n consumed: number,\n hasMagic: boolean\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n glob: string,\n position: number\n): ParseClassResult => {\n const pos = position\n /* c8 ignore start */\n if (glob.charAt(pos) !== '[') {\n throw new Error('not in a brace expression')\n }\n /* c8 ignore stop */\n const ranges: string[] = []\n const negs: string[] = []\n\n let i = pos + 1\n let sawStart = false\n let uflag = false\n let escaping = false\n let negate = false\n let endPos = pos\n let rangeStart = ''\n WHILE: while (i < glob.length) {\n const c = glob.charAt(i)\n if ((c === '!' || c === '^') && i === pos + 1) {\n negate = true\n i++\n continue\n }\n\n if (c === ']' && sawStart && !escaping) {\n endPos = i + 1\n break\n }\n\n sawStart = true\n if (c === '\\\\') {\n if (!escaping) {\n escaping = true\n i++\n continue\n }\n // escaped \\ char, fall through and treat like normal char\n }\n if (c === '[' && !escaping) {\n // either a posix class, a collation equivalent, or just a [\n for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n if (glob.startsWith(cls, i)) {\n // invalid, [a-[] is fine, but not [a-[:alpha]]\n if (rangeStart) {\n return ['$.', false, glob.length - pos, true]\n }\n i += cls.length\n if (neg) negs.push(unip)\n else ranges.push(unip)\n uflag = uflag || u\n continue WHILE\n }\n }\n }\n\n // now it's just a normal character, effectively\n escaping = false\n if (rangeStart) {\n // throw this range away if it's not valid, but others\n // can still match.\n if (c > rangeStart) {\n ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n } else if (c === rangeStart) {\n ranges.push(braceEscape(c))\n }\n rangeStart = ''\n i++\n continue\n }\n\n // now might be the start of a range.\n // can be either c-d or c-] or c] or c] at this point\n if (glob.startsWith('-]', i + 1)) {\n ranges.push(braceEscape(c + '-'))\n i += 2\n continue\n }\n if (glob.startsWith('-', i + 1)) {\n rangeStart = c\n i += 2\n continue\n }\n\n // not the start of a range, just a single character\n ranges.push(braceEscape(c))\n i++\n }\n\n if (endPos < i) {\n // didn't see the end of the class, not a valid class,\n // but might still be valid as a literal match.\n return ['', false, 0, false]\n }\n\n // if we got no ranges and no negates, then we have a range that\n // cannot possibly match anything, and that poisons the whole glob\n if (!ranges.length && !negs.length) {\n return ['$.', false, glob.length - pos, true]\n }\n\n // if we got one positive range, and it's a single character, then that's\n // not actually a magic pattern, it's just that one literal character.\n // we should not treat that as \"magic\", we should just return the literal\n // character. [_] is a perfectly valid way to escape glob magic chars.\n if (\n negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate\n ) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n return [regexpEscape(r), false, endPos - pos, false]\n }\n\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n const comb =\n ranges.length && negs.length\n ? '(' + sranges + '|' + snegs + ')'\n : ranges.length\n ? sranges\n : snegs\n\n return [comb, uflag, endPos - pos, true]\n}\n"]} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.d.ts new file mode 100644 index 0000000..353ef23 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.d.ts @@ -0,0 +1,12 @@ +import { MinimatchOptions } from './index.js'; +/** + * Escape all magic characters in a glob pattern. + * + * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} + * option is used, then characters are escaped by wrapping in `[]`, because + * a magic character wrapped in a character class can only be satisfied by + * that exact character. In this mode, `\` is _not_ escaped, because it is + * not interpreted as a magic character, but instead as a path separator. + */ +export declare const escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; +//# sourceMappingURL=escape.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.d.ts.map new file mode 100644 index 0000000..1f1c1f5 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,MACd,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAQlD,CAAA"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.js b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.js new file mode 100644 index 0000000..f98dff6 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.escape = void 0; +/** + * Escape all magic characters in a glob pattern. + * + * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} + * option is used, then characters are escaped by wrapping in `[]`, because + * a magic character wrapped in a character class can only be satisfied by + * that exact character. In this mode, `\` is _not_ escaped, because it is + * not interpreted as a magic character, but instead as a path separator. + */ +const escape = (s, { windowsPathsNoEscape = false, } = {}) => { + // don't need to escape +@! because we escape the parens + // that make those magic, and escaping ! as [!] isn't valid, + // because [!]] is a valid glob class meaning not ']'. + return windowsPathsNoEscape + ? s.replace(/[?*()[\]]/g, '[$&]') + : s.replace(/[?*()[\]\\]/g, '\\$&'); +}; +exports.escape = escape; +//# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.js.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.js.map new file mode 100644 index 0000000..4cb0427 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.js.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":";;;AACA;;;;;;;;GAQG;AACI,MAAM,MAAM,GAAG,CACpB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,wDAAwD;IACxD,4DAA4D;IAC5D,sDAAsD;IACtD,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC,CAAA;AAZY,QAAA,MAAM,UAYlB","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character. In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n */\nexport const escape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n }: Pick = {}\n) => {\n // don't need to escape +@! because we escape the parens\n // that make those magic, and escaping ! as [!] isn't valid,\n // because [!]] is a valid glob class meaning not ']'.\n return windowsPathsNoEscape\n ? s.replace(/[?*()[\\]]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n"]} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.d.ts new file mode 100644 index 0000000..0b70c96 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.d.ts @@ -0,0 +1,94 @@ +import { AST } from './ast.js'; +type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd'; +export interface MinimatchOptions { + nobrace?: boolean; + nocomment?: boolean; + nonegate?: boolean; + debug?: boolean; + noglobstar?: boolean; + noext?: boolean; + nonull?: boolean; + windowsPathsNoEscape?: boolean; + allowWindowsEscape?: boolean; + partial?: boolean; + dot?: boolean; + nocase?: boolean; + nocaseMagicOnly?: boolean; + magicalBraces?: boolean; + matchBase?: boolean; + flipNegate?: boolean; + preserveMultipleSlashes?: boolean; + optimizationLevel?: number; + platform?: Platform; + windowsNoMagicRoot?: boolean; +} +export declare const minimatch: { + (p: string, pattern: string, options?: MinimatchOptions): boolean; + sep: Sep; + GLOBSTAR: typeof GLOBSTAR; + filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean; + defaults: (def: MinimatchOptions) => typeof minimatch; + braceExpand: (pattern: string, options?: MinimatchOptions) => string[]; + makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp; + match: (list: string[], pattern: string, options?: MinimatchOptions) => string[]; + AST: typeof AST; + Minimatch: typeof Minimatch; + escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; + unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; +}; +type Sep = '\\' | '/'; +export declare const sep: Sep; +export declare const GLOBSTAR: unique symbol; +export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean; +export declare const defaults: (def: MinimatchOptions) => typeof minimatch; +export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[]; +export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp; +export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[]; +export type MMRegExp = RegExp & { + _src?: string; + _glob?: string; +}; +export type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR; +export type ParseReturn = ParseReturnFiltered | false; +export declare class Minimatch { + options: MinimatchOptions; + set: ParseReturnFiltered[][]; + pattern: string; + windowsPathsNoEscape: boolean; + nonegate: boolean; + negate: boolean; + comment: boolean; + empty: boolean; + preserveMultipleSlashes: boolean; + partial: boolean; + globSet: string[]; + globParts: string[][]; + nocase: boolean; + isWindows: boolean; + platform: Platform; + windowsNoMagicRoot: boolean; + regexp: false | null | MMRegExp; + constructor(pattern: string, options?: MinimatchOptions); + hasMagic(): boolean; + debug(..._: any[]): void; + make(): void; + preprocess(globParts: string[][]): string[][]; + adjascentGlobstarOptimize(globParts: string[][]): string[][]; + levelOneOptimize(globParts: string[][]): string[][]; + levelTwoFileOptimize(parts: string | string[]): string[]; + firstPhasePreProcess(globParts: string[][]): string[][]; + secondPhasePreProcess(globParts: string[][]): string[][]; + partsMatch(a: string[], b: string[], emptyGSMatch?: boolean): false | string[]; + parseNegate(): void; + matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean; + braceExpand(): string[]; + parse(pattern: string): ParseReturn; + makeRe(): false | MMRegExp; + slashSplit(p: string): string[]; + match(f: string, partial?: boolean): boolean; + static defaults(def: MinimatchOptions): typeof Minimatch; +} +export { AST } from './ast.js'; +export { escape } from './escape.js'; +export { unescape } from './unescape.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.d.ts.map new file mode 100644 index 0000000..9a892c8 --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAI3C,KAAK,QAAQ,GACT,KAAK,GACL,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,CAAA;AAEZ,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,eAAO,MAAM,SAAS;QACjB,MAAM,WACA,MAAM,YACN,gBAAgB;;;sBAuGf,MAAM,YAAW,gBAAgB,SACvC,MAAM;o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AAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA"} \ No newline at end of file diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.js b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.js new file mode 100644 index 0000000..f775fca --- /dev/null +++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.js @@ -0,0 +1,1017 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; +const brace_expansion_1 = __importDefault(require("brace-expansion")); +const assert_valid_pattern_js_1 = require("./assert-valid-pattern.js"); +const ast_js_1 = require("./ast.js"); +const escape_js_1 = require("./escape.js"); +const unescape_js_1 = require("./unescape.js"); +const minimatch = (p, pattern, options = {}) => { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false; + } + return new Minimatch(pattern, options).match(p); +}; +exports.minimatch = minimatch; +// Optimized checking for the most common glob patterns. +const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; +const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); +const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); +const starDotExtTestNocase = (ext) => { + ext = ext.toLowerCase(); + return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext); +}; +const starDotExtTestNocaseDot = (ext) => { + ext = ext.toLowerCase(); + return (f) => f.toLowerCase().endsWith(ext); +}; +const starDotStarRE = /^\*+\.\*+$/; +const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.'); +const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.'); +const dotStarRE = /^\.\*+$/; +const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); +const starRE = /^\*+$/; +const starTest = (f) => f.length !== 0 && !f.startsWith('.'); +const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; +const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; +const qmarksTestNocase = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestNocaseDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTest = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTestNoExt = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && !f.startsWith('.'); +}; +const qmarksTestNoExtDot = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && f !== '.' && f !== '..'; +}; +/* c8 ignore start */ +const defaultPlatform = (typeof process === 'object' && process + ? (typeof process.env === 'object' && + process.env && + process.env.__MINIMATCH_TESTING_PLATFORM__) || + process.platform + : 'posix'); +const path = { + win32: { sep: '\\' }, + posix: { sep: '/' }, +}; +/* c8 ignore stop */ +exports.sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep; +exports.minimatch.sep = exports.sep; +exports.GLOBSTAR = Symbol('globstar **'); +exports.minimatch.GLOBSTAR = exports.GLOBSTAR; +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; +const filter = (pattern, options = {}) => (p) => (0, exports.minimatch)(p, pattern, options); +exports.filter = filter; +exports.minimatch.filter = exports.filter; +const ext = (a, b = {}) => Object.assign({}, a, b); +const defaults = (def) => { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return exports.minimatch; + } + const orig = exports.minimatch; + const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); + return Object.assign(m, { + Minimatch: class Minimatch extends orig.Minimatch { + constructor(pattern, options = {}) { + super(pattern, ext(def, options)); + } + static defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + } + }, + AST: class AST extends orig.AST { + /* c8 ignore start */ + constructor(type, parent, options = {}) { + super(type, parent, ext(def, options)); + } + /* c8 ignore stop */ + static fromGlob(pattern, options = {}) { + return orig.AST.fromGlob(pattern, ext(def, options)); + } + }, + unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), + escape: (s, options = {}) => orig.escape(s, ext(def, options)), + filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), + defaults: (options) => orig.defaults(ext(def, options)), + makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), + braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), + match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), + sep: orig.sep, + GLOBSTAR: exports.GLOBSTAR, + }); +}; +exports.defaults = defaults; +exports.minimatch.defaults = exports.defaults; +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +const braceExpand = (pattern, options = {}) => { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern]; + } + return (0, brace_expansion_1.default)(pattern); +}; +exports.braceExpand = braceExpand; +exports.minimatch.braceExpand = exports.braceExpand; +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); +exports.makeRe = makeRe; +exports.minimatch.makeRe = exports.makeRe; +const match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options); + list = list.filter(f => mm.match(f)); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; +}; +exports.match = match; +exports.minimatch.match = exports.match; +// replace stuff like \* with * +const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +class Minimatch { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + nocase; + isWindows; + platform; + windowsNoMagicRoot; + regexp; + constructor(pattern, options = {}) { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + options = options || {}; + this.options = options; + this.pattern = pattern; + this.platform = options.platform || defaultPlatform; + this.isWindows = this.platform === 'win32'; + this.windowsPathsNoEscape = + !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + if (this.windowsPathsNoEscape) { + this.pattern = this.pattern.replace(/\\/g, '/'); + } + this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; + this.regexp = null; + this.negate = false; + this.nonegate = !!options.nonegate; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.nocase = !!this.options.nocase; + this.windowsNoMagicRoot = + options.windowsNoMagicRoot !== undefined + ? options.windowsNoMagicRoot + : !!(this.isWindows && this.nocase); + this.globSet = []; + this.globParts = []; + this.set = []; + // make the set of regexps etc. + this.make(); + } + hasMagic() { + if (this.options.magicalBraces && this.set.length > 1) { + return true; + } + for (const pattern of this.set) { + for (const part of pattern) { + if (typeof part !== 'string') + return true; + } + } + return false; + } + debug(..._) { } + make() { + const pattern = this.pattern; + const options = this.options; + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + // step 1: figure out negation, etc. + this.parseNegate(); + // step 2: expand braces + this.globSet = [...new Set(this.braceExpand())]; + if (options.debug) { + this.debug = (...args) => console.error(...args); + } + this.debug(this.pattern, this.globSet); + // step 3: now we have a set, so turn each one into a series of + // path-portion matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + // + // First, we preprocess to make the glob pattern sets a bit simpler + // and deduped. There are some perf-killing patterns that can cause + // problems with a glob walk, but we can simplify them down a bit. + const rawGlobParts = this.globSet.map(s => this.slashSplit(s)); + this.globParts = this.preprocess(rawGlobParts); + this.debug(this.pattern, this.globParts); + // glob --> regexps + let set = this.globParts.map((s, _, __) => { + if (this.isWindows && this.windowsNoMagicRoot) { + // check if it's a drive or unc path. + const isUNC = s[0] === '' && + s[1] === '' && + (s[2] === '?' || !globMagic.test(s[2])) && + !globMagic.test(s[3]); + const isDrive = /^[a-z]:/i.test(s[0]); + if (isUNC) { + return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; + } + else if (isDrive) { + return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; + } + } + return s.map(ss => this.parse(ss)); + }); + this.debug(this.pattern, set); + // filter out everything that didn't compile properly. + this.set = set.filter(s => s.indexOf(false) === -1); + // do not treat the ? in UNC paths as magic + if (this.isWindows) { + for (let i = 0; i < this.set.length; i++) { + const p = this.set[i]; + if (p[0] === '' && + p[1] === '' && + this.globParts[i][2] === '?' && + typeof p[3] === 'string' && + /^[a-z]:$/i.test(p[3])) { + p[2] = '?'; + } + } + } + this.debug(this.pattern, this.set); + } + // various transforms to equivalent pattern sets that are + // faster to process in a filesystem walk. The goal is to + // eliminate what we can, and push all ** patterns as far + // to the right as possible, even if it increases the number + // of patterns that we have to process. + preprocess(globParts) { + // if we're not in globstar mode, then turn all ** into * + if (this.options.noglobstar) { + for (let i = 0; i < globParts.length; i++) { + for (let j = 0; j < globParts[i].length; j++) { + if (globParts[i][j] === '**') { + globParts[i][j] = '*'; + } + } + } + } + const { optimizationLevel = 1 } = this.options; + if (optimizationLevel >= 2) { + // aggressive optimization for the purpose of fs walking + globParts = this.firstPhasePreProcess(globParts); + globParts = this.secondPhasePreProcess(globParts); + } + else if (optimizationLevel >= 1) { + // just basic optimizations to remove some .. parts + globParts = this.levelOneOptimize(globParts); + } + else { + // just collapse multiple ** portions into one + globParts = this.adjascentGlobstarOptimize(globParts); + } + return globParts; + } + // just get rid of adjascent ** portions + adjascentGlobstarOptimize(globParts) { + return globParts.map(parts => { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let i = gs; + while (parts[i + 1] === '**') { + i++; + } + if (i !== gs) { + parts.splice(gs, i - gs); + } + } + return parts; + }); + } + // get rid of adjascent ** and resolve .. portions + levelOneOptimize(globParts) { + return globParts.map(parts => { + parts = parts.reduce((set, part) => { + const prev = set[set.length - 1]; + if (part === '**' && prev === '**') { + return set; + } + if (part === '..') { + if (prev && prev !== '..' && prev !== '.' && prev !== '**') { + set.pop(); + return set; + } + } + set.push(part); + return set; + }, []); + return parts.length === 0 ? [''] : parts; + }); + } + levelTwoFileOptimize(parts) { + if (!Array.isArray(parts)) { + parts = this.slashSplit(parts); + } + let didSomething = false; + do { + didSomething = false; + //

// -> 
/
+            if (!this.preserveMultipleSlashes) {
+                for (let i = 1; i < parts.length - 1; i++) {
+                    const p = parts[i];
+                    // don't squeeze out UNC patterns
+                    if (i === 1 && p === '' && parts[0] === '')
+                        continue;
+                    if (p === '.' || p === '') {
+                        didSomething = true;
+                        parts.splice(i, 1);
+                        i--;
+                    }
+                }
+                if (parts[0] === '.' &&
+                    parts.length === 2 &&
+                    (parts[1] === '.' || parts[1] === '')) {
+                    didSomething = true;
+                    parts.pop();
+                }
+            }
+            // 
/

/../ ->

/
+            let dd = 0;
+            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                const p = parts[dd - 1];
+                if (p && p !== '.' && p !== '..' && p !== '**') {
+                    didSomething = true;
+                    parts.splice(dd - 1, 2);
+                    dd -= 2;
+                }
+            }
+        } while (didSomething);
+        return parts.length === 0 ? [''] : parts;
+    }
+    // First phase: single-pattern processing
+    // 
 is 1 or more portions
+    //  is 1 or more portions
+    // 

is any portion other than ., .., '', or ** + // is . or '' + // + // **/.. is *brutal* for filesystem walking performance, because + // it effectively resets the recursive walk each time it occurs, + // and ** cannot be reduced out by a .. pattern part like a regexp + // or most strings (other than .., ., and '') can be. + // + //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + //

// -> 
/
+    // 
/

/../ ->

/
+    // **/**/ -> **/
+    //
+    // **/*/ -> */**/ <== not valid because ** doesn't follow
+    // this WOULD be allowed if ** did follow symlinks, or * didn't
+    firstPhasePreProcess(globParts) {
+        let didSomething = false;
+        do {
+            didSomething = false;
+            // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + for (let parts of globParts) { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let gss = gs; + while (parts[gss + 1] === '**') { + //

/**/**/ -> 
/**/
+                        gss++;
+                    }
+                    // eg, if gs is 2 and gss is 4, that means we have 3 **
+                    // parts, and can remove 2 of them.
+                    if (gss > gs) {
+                        parts.splice(gs + 1, gss - gs);
+                    }
+                    let next = parts[gs + 1];
+                    const p = parts[gs + 2];
+                    const p2 = parts[gs + 3];
+                    if (next !== '..')
+                        continue;
+                    if (!p ||
+                        p === '.' ||
+                        p === '..' ||
+                        !p2 ||
+                        p2 === '.' ||
+                        p2 === '..') {
+                        continue;
+                    }
+                    didSomething = true;
+                    // edit parts in place, and push the new one
+                    parts.splice(gs, 1);
+                    const other = parts.slice(0);
+                    other[gs] = '**';
+                    globParts.push(other);
+                    gs--;
+                }
+                // 
// -> 
/
+                if (!this.preserveMultipleSlashes) {
+                    for (let i = 1; i < parts.length - 1; i++) {
+                        const p = parts[i];
+                        // don't squeeze out UNC patterns
+                        if (i === 1 && p === '' && parts[0] === '')
+                            continue;
+                        if (p === '.' || p === '') {
+                            didSomething = true;
+                            parts.splice(i, 1);
+                            i--;
+                        }
+                    }
+                    if (parts[0] === '.' &&
+                        parts.length === 2 &&
+                        (parts[1] === '.' || parts[1] === '')) {
+                        didSomething = true;
+                        parts.pop();
+                    }
+                }
+                // 
/

/../ ->

/
+                let dd = 0;
+                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                    const p = parts[dd - 1];
+                    if (p && p !== '.' && p !== '..' && p !== '**') {
+                        didSomething = true;
+                        const needDot = dd === 1 && parts[dd + 1] === '**';
+                        const splin = needDot ? ['.'] : [];
+                        parts.splice(dd - 1, 2, ...splin);
+                        if (parts.length === 0)
+                            parts.push('');
+                        dd -= 2;
+                    }
+                }
+            }
+        } while (didSomething);
+        return globParts;
+    }
+    // second phase: multi-pattern dedupes
+    // {
/*/,
/

/} ->

/*/
+    // {
/,
/} -> 
/
+    // {
/**/,
/} -> 
/**/
+    //
+    // {
/**/,
/**/

/} ->

/**/
+    // ^-- not valid because ** doens't follow symlinks
+    secondPhasePreProcess(globParts) {
+        for (let i = 0; i < globParts.length - 1; i++) {
+            for (let j = i + 1; j < globParts.length; j++) {
+                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
+                if (matched) {
+                    globParts[i] = [];
+                    globParts[j] = matched;
+                    break;
+                }
+            }
+        }
+        return globParts.filter(gs => gs.length);
+    }
+    partsMatch(a, b, emptyGSMatch = false) {
+        let ai = 0;
+        let bi = 0;
+        let result = [];
+        let which = '';
+        while (ai < a.length && bi < b.length) {
+            if (a[ai] === b[bi]) {
+                result.push(which === 'b' ? b[bi] : a[ai]);
+                ai++;
+                bi++;
+            }
+            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
+                result.push(a[ai]);
+                ai++;
+            }
+            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
+                result.push(b[bi]);
+                bi++;
+            }
+            else if (a[ai] === '*' &&
+                b[bi] &&
+                (this.options.dot || !b[bi].startsWith('.')) &&
+                b[bi] !== '**') {
+                if (which === 'b')
+                    return false;
+                which = 'a';
+                result.push(a[ai]);
+                ai++;
+                bi++;
+            }
+            else if (b[bi] === '*' &&
+                a[ai] &&
+                (this.options.dot || !a[ai].startsWith('.')) &&
+                a[ai] !== '**') {
+                if (which === 'a')
+                    return false;
+                which = 'b';
+                result.push(b[bi]);
+                ai++;
+                bi++;
+            }
+            else {
+                return false;
+            }
+        }
+        // if we fall out of the loop, it means they two are identical
+        // as long as their lengths match
+        return a.length === b.length && result;
+    }
+    parseNegate() {
+        if (this.nonegate)
+            return;
+        const pattern = this.pattern;
+        let negate = false;
+        let negateOffset = 0;
+        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
+            negate = !negate;
+            negateOffset++;
+        }
+        if (negateOffset)
+            this.pattern = pattern.slice(negateOffset);
+        this.negate = negate;
+    }
+    // set partial to true to test if, for example,
+    // "/a/b" matches the start of "/*/b/*/d"
+    // Partial means, if you run out of file before you run
+    // out of pattern, then that's fine, as long as all
+    // the parts match.
+    matchOne(file, pattern, partial = false) {
+        const options = this.options;
+        // UNC paths like //?/X:/... can match X:/... and vice versa
+        // Drive letters in absolute drive or unc paths are always compared
+        // case-insensitively.
+        if (this.isWindows) {
+            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
+            const fileUNC = !fileDrive &&
+                file[0] === '' &&
+                file[1] === '' &&
+                file[2] === '?' &&
+                /^[a-z]:$/i.test(file[3]);
+            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
+            const patternUNC = !patternDrive &&
+                pattern[0] === '' &&
+                pattern[1] === '' &&
+                pattern[2] === '?' &&
+                typeof pattern[3] === 'string' &&
+                /^[a-z]:$/i.test(pattern[3]);
+            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
+            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
+            if (typeof fdi === 'number' && typeof pdi === 'number') {
+                const [fd, pd] = [file[fdi], pattern[pdi]];
+                if (fd.toLowerCase() === pd.toLowerCase()) {
+                    pattern[pdi] = fd;
+                    if (pdi > fdi) {
+                        pattern = pattern.slice(pdi);
+                    }
+                    else if (fdi > pdi) {
+                        file = file.slice(fdi);
+                    }
+                }
+            }
+        }
+        // resolve and reduce . and .. portions in the file as well.
+        // dont' need to do the second phase, because it's only one string[]
+        const { optimizationLevel = 1 } = this.options;
+        if (optimizationLevel >= 2) {
+            file = this.levelTwoFileOptimize(file);
+        }
+        this.debug('matchOne', this, { file, pattern });
+        this.debug('matchOne', file.length, pattern.length);
+        for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
+            this.debug('matchOne loop');
+            var p = pattern[pi];
+            var f = file[fi];
+            this.debug(pattern, p, f);
+            // should be impossible.
+            // some invalid regexp stuff in the set.
+            /* c8 ignore start */
+            if (p === false) {
+                return false;
+            }
+            /* c8 ignore stop */
+            if (p === exports.GLOBSTAR) {
+                this.debug('GLOBSTAR', [pattern, p, f]);
+                // "**"
+                // a/**/b/**/c would match the following:
+                // a/b/x/y/z/c
+                // a/x/y/z/b/c
+                // a/b/x/b/x/c
+                // a/b/c
+                // To do this, take the rest of the pattern after
+                // the **, and see if it would match the file remainder.
+                // If so, return success.
+                // If not, the ** "swallows" a segment, and try again.
+                // This is recursively awful.
+                //
+                // a/**/b/**/c matching a/b/x/y/z/c
+                // - a matches a
+                // - doublestar
+                //   - matchOne(b/x/y/z/c, b/**/c)
+                //     - b matches b
+                //     - doublestar
+                //       - matchOne(x/y/z/c, c) -> no
+                //       - matchOne(y/z/c, c) -> no
+                //       - matchOne(z/c, c) -> no
+                //       - matchOne(c, c) yes, hit
+                var fr = fi;
+                var pr = pi + 1;
+                if (pr === pl) {
+                    this.debug('** at the end');
+                    // a ** at the end will just swallow the rest.
+                    // We have found a match.
+                    // however, it will not swallow /.x, unless
+                    // options.dot is set.
+                    // . and .. are *never* matched by **, for explosively
+                    // exponential reasons.
+                    for (; fi < fl; fi++) {
+                        if (file[fi] === '.' ||
+                            file[fi] === '..' ||
+                            (!options.dot && file[fi].charAt(0) === '.'))
+                            return false;
+                    }
+                    return true;
+                }
+                // ok, let's see if we can swallow whatever we can.
+                while (fr < fl) {
+                    var swallowee = file[fr];
+                    this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
+                    // XXX remove this slice.  Just pass the start index.
+                    if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+                        this.debug('globstar found match!', fr, fl, swallowee);
+                        // found a match.
+                        return true;
+                    }
+                    else {
+                        // can't swallow "." or ".." ever.
+                        // can only swallow ".foo" when explicitly asked.
+                        if (swallowee === '.' ||
+                            swallowee === '..' ||
+                            (!options.dot && swallowee.charAt(0) === '.')) {
+                            this.debug('dot detected!', file, fr, pattern, pr);
+                            break;
+                        }
+                        // ** swallows a segment, and continue.
+                        this.debug('globstar swallow a segment, and continue');
+                        fr++;
+                    }
+                }
+                // no match was found.
+                // However, in partial mode, we can't say this is necessarily over.
+                /* c8 ignore start */
+                if (partial) {
+                    // ran out of file
+                    this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
+                    if (fr === fl) {
+                        return true;
+                    }
+                }
+                /* c8 ignore stop */
+                return false;
+            }
+            // something other than **
+            // non-magic patterns just have to match exactly
+            // patterns with magic have been turned into regexps.
+            let hit;
+            if (typeof p === 'string') {
+                hit = f === p;
+                this.debug('string match', p, f, hit);
+            }
+            else {
+                hit = p.test(f);
+                this.debug('pattern match', p, f, hit);
+            }
+            if (!hit)
+                return false;
+        }
+        // Note: ending in / means that we'll get a final ""
+        // at the end of the pattern.  This can only match a
+        // corresponding "" at the end of the file.
+        // If the file ends in /, then it can only match a
+        // a pattern that ends in /, unless the pattern just
+        // doesn't have any more for it. But, a/b/ should *not*
+        // match "a/b/*", even though "" matches against the
+        // [^/]*? pattern, except in partial mode, where it might
+        // simply not be reached yet.
+        // However, a/b/ should still satisfy a/*
+        // now either we fell off the end of the pattern, or we're done.
+        if (fi === fl && pi === pl) {
+            // ran out of pattern and filename at the same time.
+            // an exact hit!
+            return true;
+        }
+        else if (fi === fl) {
+            // ran out of file, but still had pattern left.
+            // this is ok if we're doing the match as part of
+            // a glob fs traversal.
+            return partial;
+        }
+        else if (pi === pl) {
+            // ran out of pattern, still have file left.
+            // this is only acceptable if we're on the very last
+            // empty segment of a file with a trailing slash.
+            // a/* should match a/b/
+            return fi === fl - 1 && file[fi] === '';
+            /* c8 ignore start */
+        }
+        else {
+            // should be unreachable.
+            throw new Error('wtf?');
+        }
+        /* c8 ignore stop */
+    }
+    braceExpand() {
+        return (0, exports.braceExpand)(this.pattern, this.options);
+    }
+    parse(pattern) {
+        (0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
+        const options = this.options;
+        // shortcuts
+        if (pattern === '**')
+            return exports.GLOBSTAR;
+        if (pattern === '')
+            return '';
+        // far and away, the most common glob pattern parts are
+        // *, *.*, and *.  Add a fast check method for those.
+        let m;
+        let fastTest = null;
+        if ((m = pattern.match(starRE))) {
+            fastTest = options.dot ? starTestDot : starTest;
+        }
+        else if ((m = pattern.match(starDotExtRE))) {
+            fastTest = (options.nocase
+                ? options.dot
+                    ? starDotExtTestNocaseDot
+                    : starDotExtTestNocase
+                : options.dot
+                    ? starDotExtTestDot
+                    : starDotExtTest)(m[1]);
+        }
+        else if ((m = pattern.match(qmarksRE))) {
+            fastTest = (options.nocase
+                ? options.dot
+                    ? qmarksTestNocaseDot
+                    : qmarksTestNocase
+                : options.dot
+                    ? qmarksTestDot
+                    : qmarksTest)(m);
+        }
+        else if ((m = pattern.match(starDotStarRE))) {
+            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
+        }
+        else if ((m = pattern.match(dotStarRE))) {
+            fastTest = dotStarTest;
+        }
+        const re = ast_js_1.AST.fromGlob(pattern, this.options).toMMPattern();
+        if (fastTest && typeof re === 'object') {
+            // Avoids overriding in frozen environments
+            Reflect.defineProperty(re, 'test', { value: fastTest });
+        }
+        return re;
+    }
+    makeRe() {
+        if (this.regexp || this.regexp === false)
+            return this.regexp;
+        // at this point, this.set is a 2d array of partial
+        // pattern strings, or "**".
+        //
+        // It's better to use .match().  This function shouldn't
+        // be used, really, but it's pretty convenient sometimes,
+        // when you just want to work with a regex.
+        const set = this.set;
+        if (!set.length) {
+            this.regexp = false;
+            return this.regexp;
+        }
+        const options = this.options;
+        const twoStar = options.noglobstar
+            ? star
+            : options.dot
+                ? twoStarDot
+                : twoStarNoDot;
+        const flags = new Set(options.nocase ? ['i'] : []);
+        // regexpify non-globstar patterns
+        // if ** is only item, then we just do one twoStar
+        // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
+        // if ** is last, append (\/twoStar|) to previous
+        // if ** is in the middle, append (\/|\/twoStar\/) to previous
+        // then filter out GLOBSTAR symbols
+        let re = set
+            .map(pattern => {
+            const pp = pattern.map(p => {
+                if (p instanceof RegExp) {
+                    for (const f of p.flags.split(''))
+                        flags.add(f);
+                }
+                return typeof p === 'string'
+                    ? regExpEscape(p)
+                    : p === exports.GLOBSTAR
+                        ? exports.GLOBSTAR
+                        : p._src;
+            });
+            pp.forEach((p, i) => {
+                const next = pp[i + 1];
+                const prev = pp[i - 1];
+                if (p !== exports.GLOBSTAR || prev === exports.GLOBSTAR) {
+                    return;
+                }
+                if (prev === undefined) {
+                    if (next !== undefined && next !== exports.GLOBSTAR) {
+                        pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
+                    }
+                    else {
+                        pp[i] = twoStar;
+                    }
+                }
+                else if (next === undefined) {
+                    pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
+                }
+                else if (next !== exports.GLOBSTAR) {
+                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
+                    pp[i + 1] = exports.GLOBSTAR;
+                }
+            });
+            return pp.filter(p => p !== exports.GLOBSTAR).join('/');
+        })
+            .join('|');
+        // need to wrap in parens if we had more than one thing with |,
+        // otherwise only the first will be anchored to ^ and the last to $
+        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
+        // must match entire pattern
+        // ending in a * or ** will make it less strict.
+        re = '^' + open + re + close + '$';
+        // can match anything, as long as it's not this.
+        if (this.negate)
+            re = '^(?!' + re + ').+$';
+        try {
+            this.regexp = new RegExp(re, [...flags].join(''));
+            /* c8 ignore start */
+        }
+        catch (ex) {
+            // should be impossible
+            this.regexp = false;
+        }
+        /* c8 ignore stop */
+        return this.regexp;
+    }
+    slashSplit(p) {
+        // if p starts with // on windows, we preserve that
+        // so that UNC paths aren't broken.  Otherwise, any number of
+        // / characters are coalesced into one, unless
+        // preserveMultipleSlashes is set to true.
+        if (this.preserveMultipleSlashes) {
+            return p.split('/');
+        }
+        else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
+            // add an extra '' for the one we lose
+            return ['', ...p.split(/\/+/)];
+        }
+        else {
+            return p.split(/\/+/);
+        }
+    }
+    match(f, partial = this.partial) {
+        this.debug('match', f, this.pattern);
+        // short-circuit in the case of busted things.
+        // comments, etc.
+        if (this.comment) {
+            return false;
+        }
+        if (this.empty) {
+            return f === '';
+        }
+        if (f === '/' && partial) {
+            return true;
+        }
+        const options = this.options;
+        // windows: need to use /, not \
+        if (this.isWindows) {
+            f = f.split('\\').join('/');
+        }
+        // treat the test path as a set of pathparts.
+        const ff = this.slashSplit(f);
+        this.debug(this.pattern, 'split', ff);
+        // just ONE of the pattern sets in this.set needs to match
+        // in order for it to be valid.  If negating, then just one
+        // match means that we have failed.
+        // Either way, return on the first hit.
+        const set = this.set;
+        this.debug(this.pattern, 'set', set);
+        // Find the basename of the path by looking for the last non-empty segment
+        let filename = ff[ff.length - 1];
+        if (!filename) {
+            for (let i = ff.length - 2; !filename && i >= 0; i--) {
+                filename = ff[i];
+            }
+        }
+        for (let i = 0; i < set.length; i++) {
+            const pattern = set[i];
+            let file = ff;
+            if (options.matchBase && pattern.length === 1) {
+                file = [filename];
+            }
+            const hit = this.matchOne(file, pattern, partial);
+            if (hit) {
+                if (options.flipNegate) {
+                    return true;
+                }
+                return !this.negate;
+            }
+        }
+        // didn't get any hits.  this is success if it's a negative
+        // pattern, failure otherwise.
+        if (options.flipNegate) {
+            return false;
+        }
+        return this.negate;
+    }
+    static defaults(def) {
+        return exports.minimatch.defaults(def).Minimatch;
+    }
+}
+exports.Minimatch = Minimatch;
+/* c8 ignore start */
+var ast_js_2 = require("./ast.js");
+Object.defineProperty(exports, "AST", { enumerable: true, get: function () { return ast_js_2.AST; } });
+var escape_js_2 = require("./escape.js");
+Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } });
+var unescape_js_2 = require("./unescape.js");
+Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return unescape_js_2.unescape; } });
+/* c8 ignore stop */
+exports.minimatch.AST = ast_js_1.AST;
+exports.minimatch.Minimatch = Minimatch;
+exports.minimatch.escape = escape_js_1.escape;
+exports.minimatch.unescape = unescape_js_1.unescape;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.js.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.js.map
new file mode 100644
index 0000000..84461db
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAoC;AACpC,uEAA8D;AAC9D,qCAA2C;AAC3C,2CAAoC;AACpC,+CAAwC;AAsCjC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,IAAA,4CAAkB,EAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;QACnD,OAAO,KAAK,CAAA;KACb;IAED,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC,CAAA;AAbY,QAAA,SAAS,aAarB;AAED,wDAAwD;AACxD,MAAM,YAAY,GAAG,uBAAuB,CAAA;AAC5C,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,EAAE,EAAE,CACpD,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACvC,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACzE,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAE,EAAE;IAC3C,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE,CAAA;IACvB,OAAO,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,C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CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;YACjD,IAAI,GAAG,EAAE;gBACP,IAAI,OAAO,CAAC,UAAU,EAAE;oBACtB,OAAO,IAAI,CAAA;iBACZ;gBACD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAA;aACpB;SACF;QAED,2DAA2D;QAC3D,8BAA8B;QAC9B,IAAI,OAAO,CAAC,UAAU,EAAE;YACtB,OAAO,KAAK,CAAA;SACb;QACD,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,GAAqB;QACnC,OAAO,iBAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,CAAA;IAC1C,CAAC;CACF;AAl4BD,8BAk4BC;AACD,qBAAqB;AACrB,mCAA8B;AAArB,6FAAA,GAAG,OAAA;AACZ,yCAAoC;AAA3B,mGAAA,MAAM,OAAA;AACf,6CAAwC;AAA/B,uGAAA,QAAQ,OAAA;AACjB,oBAAoB;AACpB,iBAAS,CAAC,GAAG,GAAG,YAAG,CAAA;AACnB,iBAAS,CAAC,SAAS,GAAG,SAAS,CAAA;AAC/B,iBAAS,CAAC,MAAM,GAAG,kBAAM,CAAA;AACzB,iBAAS,CAAC,QAAQ,GAAG,sBAAQ,CAAA","sourcesContent":["import expand from 'brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\ntype Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  nobrace?: boolean\n  nocomment?: boolean\n  nonegate?: boolean\n  debug?: boolean\n  noglobstar?: boolean\n  noext?: boolean\n  nonull?: boolean\n  windowsPathsNoEscape?: boolean\n  allowWindowsEscape?: boolean\n  partial?: boolean\n  dot?: boolean\n  nocase?: boolean\n  nocaseMagicOnly?: boolean\n  magicalBraces?: boolean\n  matchBase?: boolean\n  flipNegate?: boolean\n  preserveMultipleSlashes?: boolean\n  optimizationLevel?: number\n  platform?: Platform\n  windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process\n    ? (typeof process.env === 'object' &&\n        process.env &&\n        process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n      process.platform\n    : 'posix'\n) as Platform\ntype Sep = '\\\\' | '/'\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {}\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n      orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined\n        ? options.windowsNoMagicRoot\n        : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: any[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      this.debug = (...args: any[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn all ** into *\n    if (this.options.noglobstar) {\n      for (let i = 0; i < globParts.length; i++) {\n        for (let j = 0; j < globParts[i].length; j++) {\n          if (globParts[i][j] === '**') {\n            globParts[i][j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n    do {\n      didSomething = false\n      // 
// -> 
/\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
/

/../ ->

/\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
 is 1 or more portions\n  //  is 1 or more portions\n  // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n  // 
/

/../ ->

/\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
// -> 
/\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
/

/../ ->

/\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
/*/,
/

/} ->

/*/\n  // {
/,
/} -> 
/\n  // {
/**/,
/} -> 
/**/\n  //\n  // {
/**/,
/**/

/} ->

/**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice(pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // dont' need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n          ? starDotExtTestDot\n          : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n          ? qmarksTestDot\n          : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n      ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n            ? GLOBSTAR\n            : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        return pp.filter(p => p !== GLOBSTAR).join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/package.json b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/package.json
new file mode 100644
index 0000000..ce04ec5
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/package.json
@@ -0,0 +1,3 @@
+{
+  "type": "commonjs"
+}
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.d.ts
new file mode 100644
index 0000000..1548702
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.d.ts
@@ -0,0 +1,17 @@
+import { MinimatchOptions } from './index.js';
+/**
+ * Un-escape a string that has been escaped with {@link escape}.
+ *
+ * If the {@link windowsPathsNoEscape} option is used, then square-brace
+ * escapes are removed, but not backslash escapes.  For example, it will turn
+ * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
+ * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
+ *
+ * When `windowsPathsNoEscape` is not set, then both brace escapes and
+ * backslash escapes are removed.
+ *
+ * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
+ * or unescaped.
+ */
+export declare const unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
+//# sourceMappingURL=unescape.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.d.ts.map
new file mode 100644
index 0000000..a89a54b
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,MAChB,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAKlD,CAAA"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.js b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.js
new file mode 100644
index 0000000..395f19f
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.js
@@ -0,0 +1,24 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.unescape = void 0;
+/**
+ * Un-escape a string that has been escaped with {@link escape}.
+ *
+ * If the {@link windowsPathsNoEscape} option is used, then square-brace
+ * escapes are removed, but not backslash escapes.  For example, it will turn
+ * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
+ * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
+ *
+ * When `windowsPathsNoEscape` is not set, then both brace escapes and
+ * backslash escapes are removed.
+ *
+ * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
+ * or unescaped.
+ */
+const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
+    return windowsPathsNoEscape
+        ? s.replace(/\[([^\/\\])\]/g, '$1')
+        : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1');
+};
+exports.unescape = unescape;
+//# sourceMappingURL=unescape.js.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.js.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.js.map
new file mode 100644
index 0000000..0d7c989
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":";;;AACA;;;;;;;;;;;;;GAaG;AACI,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;QACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAChF,CAAC,CAAA;AATY,QAAA,QAAQ,YASpB","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link windowsPathsNoEscape} option is used, then square-brace\n * escapes are removed, but not backslash escapes.  For example, it will turn\n * the string `'[*]'` into `*`, but it will not turn `'\\\\*'` into `'*'`,\n * becuase `\\` is a path separator in `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both brace escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n */\nexport const unescape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n  }: Pick = {}\n) => {\n  return windowsPathsNoEscape\n    ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n    : s.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2').replace(/\\\\([^\\/])/g, '$1')\n}\n"]}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts
new file mode 100644
index 0000000..fbb33fd
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts
@@ -0,0 +1,2 @@
+export declare const assertValidPattern: (pattern: any) => void;
+//# sourceMappingURL=assert-valid-pattern.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map
new file mode 100644
index 0000000..ac11eb0
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAUlD,CAAA"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/assert-valid-pattern.js b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/assert-valid-pattern.js
new file mode 100644
index 0000000..61c00b8
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/assert-valid-pattern.js
@@ -0,0 +1,10 @@
+const MAX_PATTERN_LENGTH = 1024 * 64;
+export const assertValidPattern = (pattern) => {
+    if (typeof pattern !== 'string') {
+        throw new TypeError('invalid pattern');
+    }
+    if (pattern.length > MAX_PATTERN_LENGTH) {
+        throw new TypeError('pattern is too long');
+    }
+};
+//# sourceMappingURL=assert-valid-pattern.js.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map
new file mode 100644
index 0000000..bbca5f2
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AACpC,MAAM,CAAC,MAAM,kBAAkB,GAA2B,CACxD,OAAY,EACe,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;KACvC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE;QACvC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;KAC3C;AACH,CAAC,CAAA","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n  pattern: any\n): asserts pattern is string => {\n  if (typeof pattern !== 'string') {\n    throw new TypeError('invalid pattern')\n  }\n\n  if (pattern.length > MAX_PATTERN_LENGTH) {\n    throw new TypeError('pattern is too long')\n  }\n}\n"]}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/ast.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/ast.d.ts
new file mode 100644
index 0000000..babdc02
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/ast.d.ts
@@ -0,0 +1,20 @@
+import { MinimatchOptions, MMRegExp } from './index.js';
+export type ExtglobType = '!' | '?' | '+' | '*' | '@';
+export declare class AST {
+    #private;
+    type: ExtglobType | null;
+    constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions);
+    get hasMagic(): boolean | undefined;
+    toString(): string;
+    push(...parts: (string | AST)[]): void;
+    toJSON(): any[];
+    isStart(): boolean;
+    isEnd(): boolean;
+    copyIn(part: AST | string): void;
+    clone(parent: AST): AST;
+    static fromGlob(pattern: string, options?: MinimatchOptions): AST;
+    toMMPattern(): MMRegExp | string;
+    get options(): MinimatchOptions;
+    toRegExpSource(allowDot?: boolean): [re: string, body: string, hasMagic: boolean, uflag: boolean];
+}
+//# sourceMappingURL=ast.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/ast.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/ast.d.ts.map
new file mode 100644
index 0000000..65283e4
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/ast.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAwCvD,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAkCrD,qBAAa,GAAG;;IACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;gBAiBtB,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,MAAM,CAAC,EAAE,GAAG,EACZ,OAAO,GAAE,gBAAqB;IAahC,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAUlC;IAGD,QAAQ,IAAI,MAAM;IA+ClB,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;IAY/B,MAAM;IAgBN,OAAO,IAAI,OAAO;IAgBlB,KAAK,IAAI,OAAO;IAYhB,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IAKzB,KAAK,CAAC,MAAM,EAAE,GAAG;IAsIjB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAQ/D,WAAW,IAAI,QAAQ,GAAG,MAAM;IA2BhC,IAAI,OAAO,qBAEV;IAuED,cAAc,CACZ,QAAQ,CAAC,EAAE,OAAO,GACjB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;CAiMjE"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/ast.js b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/ast.js
new file mode 100644
index 0000000..24abc7a
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/ast.js
@@ -0,0 +1,588 @@
+// parse a single path portion
+import { parseClass } from './brace-expressions.js';
+import { unescape } from './unescape.js';
+const types = new Set(['!', '?', '+', '*', '@']);
+const isExtglobType = (c) => types.has(c);
+// Patterns that get prepended to bind to the start of either the
+// entire string, or just a single path portion, to prevent dots
+// and/or traversal patterns, when needed.
+// Exts don't need the ^ or / bit, because the root binds that already.
+const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
+const startNoDot = '(?!\\.)';
+// characters that indicate a start of pattern needs the "no dots" bit,
+// because a dot *might* be matched. ( is not in the list, because in
+// the case of a child extglob, it will handle the prevention itself.
+const addPatternStart = new Set(['[', '.']);
+// cases where traversal is A-OK, no dot prevention needed
+const justDots = new Set(['..', '.']);
+const reSpecials = new Set('().*{}+?[]^$\\!');
+const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
+// any single thing other than /
+const qmark = '[^/]';
+// * => any number of characters
+const star = qmark + '*?';
+// use + when we need to ensure that *something* matches, because the * is
+// the only thing in the path portion.
+const starNoEmpty = qmark + '+?';
+// remove the \ chars that we added if we end up doing a nonmagic compare
+// const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
+export class AST {
+    type;
+    #root;
+    #hasMagic;
+    #uflag = false;
+    #parts = [];
+    #parent;
+    #parentIndex;
+    #negs;
+    #filledNegs = false;
+    #options;
+    #toString;
+    // set to true if it's an extglob with no children
+    // (which really means one child of '')
+    #emptyExt = false;
+    constructor(type, parent, options = {}) {
+        this.type = type;
+        // extglobs are inherently magical
+        if (type)
+            this.#hasMagic = true;
+        this.#parent = parent;
+        this.#root = this.#parent ? this.#parent.#root : this;
+        this.#options = this.#root === this ? options : this.#root.#options;
+        this.#negs = this.#root === this ? [] : this.#root.#negs;
+        if (type === '!' && !this.#root.#filledNegs)
+            this.#negs.push(this);
+        this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
+    }
+    get hasMagic() {
+        /* c8 ignore start */
+        if (this.#hasMagic !== undefined)
+            return this.#hasMagic;
+        /* c8 ignore stop */
+        for (const p of this.#parts) {
+            if (typeof p === 'string')
+                continue;
+            if (p.type || p.hasMagic)
+                return (this.#hasMagic = true);
+        }
+        // note: will be undefined until we generate the regexp src and find out
+        return this.#hasMagic;
+    }
+    // reconstructs the pattern
+    toString() {
+        if (this.#toString !== undefined)
+            return this.#toString;
+        if (!this.type) {
+            return (this.#toString = this.#parts.map(p => String(p)).join(''));
+        }
+        else {
+            return (this.#toString =
+                this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
+        }
+    }
+    #fillNegs() {
+        /* c8 ignore start */
+        if (this !== this.#root)
+            throw new Error('should only call on root');
+        if (this.#filledNegs)
+            return this;
+        /* c8 ignore stop */
+        // call toString() once to fill this out
+        this.toString();
+        this.#filledNegs = true;
+        let n;
+        while ((n = this.#negs.pop())) {
+            if (n.type !== '!')
+                continue;
+            // walk up the tree, appending everthing that comes AFTER parentIndex
+            let p = n;
+            let pp = p.#parent;
+            while (pp) {
+                for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
+                    for (const part of n.#parts) {
+                        /* c8 ignore start */
+                        if (typeof part === 'string') {
+                            throw new Error('string part in extglob AST??');
+                        }
+                        /* c8 ignore stop */
+                        part.copyIn(pp.#parts[i]);
+                    }
+                }
+                p = pp;
+                pp = p.#parent;
+            }
+        }
+        return this;
+    }
+    push(...parts) {
+        for (const p of parts) {
+            if (p === '')
+                continue;
+            /* c8 ignore start */
+            if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {
+                throw new Error('invalid part: ' + p);
+            }
+            /* c8 ignore stop */
+            this.#parts.push(p);
+        }
+    }
+    toJSON() {
+        const ret = this.type === null
+            ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))
+            : [this.type, ...this.#parts.map(p => p.toJSON())];
+        if (this.isStart() && !this.type)
+            ret.unshift([]);
+        if (this.isEnd() &&
+            (this === this.#root ||
+                (this.#root.#filledNegs && this.#parent?.type === '!'))) {
+            ret.push({});
+        }
+        return ret;
+    }
+    isStart() {
+        if (this.#root === this)
+            return true;
+        // if (this.type) return !!this.#parent?.isStart()
+        if (!this.#parent?.isStart())
+            return false;
+        if (this.#parentIndex === 0)
+            return true;
+        // if everything AHEAD of this is a negation, then it's still the "start"
+        const p = this.#parent;
+        for (let i = 0; i < this.#parentIndex; i++) {
+            const pp = p.#parts[i];
+            if (!(pp instanceof AST && pp.type === '!')) {
+                return false;
+            }
+        }
+        return true;
+    }
+    isEnd() {
+        if (this.#root === this)
+            return true;
+        if (this.#parent?.type === '!')
+            return true;
+        if (!this.#parent?.isEnd())
+            return false;
+        if (!this.type)
+            return this.#parent?.isEnd();
+        // if not root, it'll always have a parent
+        /* c8 ignore start */
+        const pl = this.#parent ? this.#parent.#parts.length : 0;
+        /* c8 ignore stop */
+        return this.#parentIndex === pl - 1;
+    }
+    copyIn(part) {
+        if (typeof part === 'string')
+            this.push(part);
+        else
+            this.push(part.clone(this));
+    }
+    clone(parent) {
+        const c = new AST(this.type, parent);
+        for (const p of this.#parts) {
+            c.copyIn(p);
+        }
+        return c;
+    }
+    static #parseAST(str, ast, pos, opt) {
+        let escaping = false;
+        let inBrace = false;
+        let braceStart = -1;
+        let braceNeg = false;
+        if (ast.type === null) {
+            // outside of a extglob, append until we find a start
+            let i = pos;
+            let acc = '';
+            while (i < str.length) {
+                const c = str.charAt(i++);
+                // still accumulate escapes at this point, but we do ignore
+                // starts that are escaped
+                if (escaping || c === '\\') {
+                    escaping = !escaping;
+                    acc += c;
+                    continue;
+                }
+                if (inBrace) {
+                    if (i === braceStart + 1) {
+                        if (c === '^' || c === '!') {
+                            braceNeg = true;
+                        }
+                    }
+                    else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
+                        inBrace = false;
+                    }
+                    acc += c;
+                    continue;
+                }
+                else if (c === '[') {
+                    inBrace = true;
+                    braceStart = i;
+                    braceNeg = false;
+                    acc += c;
+                    continue;
+                }
+                if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {
+                    ast.push(acc);
+                    acc = '';
+                    const ext = new AST(c, ast);
+                    i = AST.#parseAST(str, ext, i, opt);
+                    ast.push(ext);
+                    continue;
+                }
+                acc += c;
+            }
+            ast.push(acc);
+            return i;
+        }
+        // some kind of extglob, pos is at the (
+        // find the next | or )
+        let i = pos + 1;
+        let part = new AST(null, ast);
+        const parts = [];
+        let acc = '';
+        while (i < str.length) {
+            const c = str.charAt(i++);
+            // still accumulate escapes at this point, but we do ignore
+            // starts that are escaped
+            if (escaping || c === '\\') {
+                escaping = !escaping;
+                acc += c;
+                continue;
+            }
+            if (inBrace) {
+                if (i === braceStart + 1) {
+                    if (c === '^' || c === '!') {
+                        braceNeg = true;
+                    }
+                }
+                else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
+                    inBrace = false;
+                }
+                acc += c;
+                continue;
+            }
+            else if (c === '[') {
+                inBrace = true;
+                braceStart = i;
+                braceNeg = false;
+                acc += c;
+                continue;
+            }
+            if (isExtglobType(c) && str.charAt(i) === '(') {
+                part.push(acc);
+                acc = '';
+                const ext = new AST(c, part);
+                part.push(ext);
+                i = AST.#parseAST(str, ext, i, opt);
+                continue;
+            }
+            if (c === '|') {
+                part.push(acc);
+                acc = '';
+                parts.push(part);
+                part = new AST(null, ast);
+                continue;
+            }
+            if (c === ')') {
+                if (acc === '' && ast.#parts.length === 0) {
+                    ast.#emptyExt = true;
+                }
+                part.push(acc);
+                acc = '';
+                ast.push(...parts, part);
+                return i;
+            }
+            acc += c;
+        }
+        // unfinished extglob
+        // if we got here, it was a malformed extglob! not an extglob, but
+        // maybe something else in there.
+        ast.type = null;
+        ast.#hasMagic = undefined;
+        ast.#parts = [str.substring(pos - 1)];
+        return i;
+    }
+    static fromGlob(pattern, options = {}) {
+        const ast = new AST(null, undefined, options);
+        AST.#parseAST(pattern, ast, 0, options);
+        return ast;
+    }
+    // returns the regular expression if there's magic, or the unescaped
+    // string if not.
+    toMMPattern() {
+        // should only be called on root
+        /* c8 ignore start */
+        if (this !== this.#root)
+            return this.#root.toMMPattern();
+        /* c8 ignore stop */
+        const glob = this.toString();
+        const [re, body, hasMagic, uflag] = this.toRegExpSource();
+        // if we're in nocase mode, and not nocaseMagicOnly, then we do
+        // still need a regular expression if we have to case-insensitively
+        // match capital/lowercase characters.
+        const anyMagic = hasMagic ||
+            this.#hasMagic ||
+            (this.#options.nocase &&
+                !this.#options.nocaseMagicOnly &&
+                glob.toUpperCase() !== glob.toLowerCase());
+        if (!anyMagic) {
+            return body;
+        }
+        const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');
+        return Object.assign(new RegExp(`^${re}$`, flags), {
+            _src: re,
+            _glob: glob,
+        });
+    }
+    get options() {
+        return this.#options;
+    }
+    // returns the string match, the regexp source, whether there's magic
+    // in the regexp (so a regular expression is required) and whether or
+    // not the uflag is needed for the regular expression (for posix classes)
+    // TODO: instead of injecting the start/end at this point, just return
+    // the BODY of the regexp, along with the start/end portions suitable
+    // for binding the start/end in either a joined full-path makeRe context
+    // (where we bind to (^|/), or a standalone matchPart context (where
+    // we bind to ^, and not /).  Otherwise slashes get duped!
+    //
+    // In part-matching mode, the start is:
+    // - if not isStart: nothing
+    // - if traversal possible, but not allowed: ^(?!\.\.?$)
+    // - if dots allowed or not possible: ^
+    // - if dots possible and not allowed: ^(?!\.)
+    // end is:
+    // - if not isEnd(): nothing
+    // - else: $
+    //
+    // In full-path matching mode, we put the slash at the START of the
+    // pattern, so start is:
+    // - if first pattern: same as part-matching mode
+    // - if not isStart(): nothing
+    // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
+    // - if dots allowed or not possible: /
+    // - if dots possible and not allowed: /(?!\.)
+    // end is:
+    // - if last pattern, same as part-matching mode
+    // - else nothing
+    //
+    // Always put the (?:$|/) on negated tails, though, because that has to be
+    // there to bind the end of the negated pattern portion, and it's easier to
+    // just stick it in now rather than try to inject it later in the middle of
+    // the pattern.
+    //
+    // We can just always return the same end, and leave it up to the caller
+    // to know whether it's going to be used joined or in parts.
+    // And, if the start is adjusted slightly, can do the same there:
+    // - if not isStart: nothing
+    // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
+    // - if dots allowed or not possible: (?:/|^)
+    // - if dots possible and not allowed: (?:/|^)(?!\.)
+    //
+    // But it's better to have a simpler binding without a conditional, for
+    // performance, so probably better to return both start options.
+    //
+    // Then the caller just ignores the end if it's not the first pattern,
+    // and the start always gets applied.
+    //
+    // But that's always going to be $ if it's the ending pattern, or nothing,
+    // so the caller can just attach $ at the end of the pattern when building.
+    //
+    // So the todo is:
+    // - better detect what kind of start is needed
+    // - return both flavors of starting pattern
+    // - attach $ at the end of the pattern when creating the actual RegExp
+    //
+    // Ah, but wait, no, that all only applies to the root when the first pattern
+    // is not an extglob. If the first pattern IS an extglob, then we need all
+    // that dot prevention biz to live in the extglob portions, because eg
+    // +(*|.x*) can match .xy but not .yx.
+    //
+    // So, return the two flavors if it's #root and the first child is not an
+    // AST, otherwise leave it to the child AST to handle it, and there,
+    // use the (?:^|/) style of start binding.
+    //
+    // Even simplified further:
+    // - Since the start for a join is eg /(?!\.) and the start for a part
+    // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
+    // or start or whatever) and prepend ^ or / at the Regexp construction.
+    toRegExpSource(allowDot) {
+        const dot = allowDot ?? !!this.#options.dot;
+        if (this.#root === this)
+            this.#fillNegs();
+        if (!this.type) {
+            const noEmpty = this.isStart() && this.isEnd();
+            const src = this.#parts
+                .map(p => {
+                const [re, _, hasMagic, uflag] = typeof p === 'string'
+                    ? AST.#parseGlob(p, this.#hasMagic, noEmpty)
+                    : p.toRegExpSource(allowDot);
+                this.#hasMagic = this.#hasMagic || hasMagic;
+                this.#uflag = this.#uflag || uflag;
+                return re;
+            })
+                .join('');
+            let start = '';
+            if (this.isStart()) {
+                if (typeof this.#parts[0] === 'string') {
+                    // this is the string that will match the start of the pattern,
+                    // so we need to protect against dots and such.
+                    // '.' and '..' cannot match unless the pattern is that exactly,
+                    // even if it starts with . or dot:true is set.
+                    const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
+                    if (!dotTravAllowed) {
+                        const aps = addPatternStart;
+                        // check if we have a possibility of matching . or ..,
+                        // and prevent that.
+                        const needNoTrav = 
+                        // dots are allowed, and the pattern starts with [ or .
+                        (dot && aps.has(src.charAt(0))) ||
+                            // the pattern starts with \., and then [ or .
+                            (src.startsWith('\\.') && aps.has(src.charAt(2))) ||
+                            // the pattern starts with \.\., and then [ or .
+                            (src.startsWith('\\.\\.') && aps.has(src.charAt(4)));
+                        // no need to prevent dots if it can't match a dot, or if a
+                        // sub-pattern will be preventing it anyway.
+                        const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
+                        start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';
+                    }
+                }
+            }
+            // append the "end of path portion" pattern to negation tails
+            let end = '';
+            if (this.isEnd() &&
+                this.#root.#filledNegs &&
+                this.#parent?.type === '!') {
+                end = '(?:$|\\/)';
+            }
+            const final = start + src + end;
+            return [
+                final,
+                unescape(src),
+                (this.#hasMagic = !!this.#hasMagic),
+                this.#uflag,
+            ];
+        }
+        // We need to calculate the body *twice* if it's a repeat pattern
+        // at the start, once in nodot mode, then again in dot mode, so a
+        // pattern like *(?) can match 'x.y'
+        const repeated = this.type === '*' || this.type === '+';
+        // some kind of extglob
+        const start = this.type === '!' ? '(?:(?!(?:' : '(?:';
+        let body = this.#partsToRegExp(dot);
+        if (this.isStart() && this.isEnd() && !body && this.type !== '!') {
+            // invalid extglob, has to at least be *something* present, if it's
+            // the entire path portion.
+            const s = this.toString();
+            this.#parts = [s];
+            this.type = null;
+            this.#hasMagic = undefined;
+            return [s, unescape(this.toString()), false, false];
+        }
+        // XXX abstract out this map method
+        let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot
+            ? ''
+            : this.#partsToRegExp(true);
+        if (bodyDotAllowed === body) {
+            bodyDotAllowed = '';
+        }
+        if (bodyDotAllowed) {
+            body = `(?:${body})(?:${bodyDotAllowed})*?`;
+        }
+        // an empty !() is exactly equivalent to a starNoEmpty
+        let final = '';
+        if (this.type === '!' && this.#emptyExt) {
+            final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;
+        }
+        else {
+            const close = this.type === '!'
+                ? // !() must match something,but !(x) can match ''
+                    '))' +
+                        (this.isStart() && !dot && !allowDot ? startNoDot : '') +
+                        star +
+                        ')'
+                : this.type === '@'
+                    ? ')'
+                    : this.type === '?'
+                        ? ')?'
+                        : this.type === '+' && bodyDotAllowed
+                            ? ')'
+                            : this.type === '*' && bodyDotAllowed
+                                ? `)?`
+                                : `)${this.type}`;
+            final = start + body + close;
+        }
+        return [
+            final,
+            unescape(body),
+            (this.#hasMagic = !!this.#hasMagic),
+            this.#uflag,
+        ];
+    }
+    #partsToRegExp(dot) {
+        return this.#parts
+            .map(p => {
+            // extglob ASTs should only contain parent ASTs
+            /* c8 ignore start */
+            if (typeof p === 'string') {
+                throw new Error('string type in extglob ast??');
+            }
+            /* c8 ignore stop */
+            // can ignore hasMagic, because extglobs are already always magic
+            const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
+            this.#uflag = this.#uflag || uflag;
+            return re;
+        })
+            .filter(p => !(this.isStart() && this.isEnd()) || !!p)
+            .join('|');
+    }
+    static #parseGlob(glob, hasMagic, noEmpty = false) {
+        let escaping = false;
+        let re = '';
+        let uflag = false;
+        for (let i = 0; i < glob.length; i++) {
+            const c = glob.charAt(i);
+            if (escaping) {
+                escaping = false;
+                re += (reSpecials.has(c) ? '\\' : '') + c;
+                continue;
+            }
+            if (c === '\\') {
+                if (i === glob.length - 1) {
+                    re += '\\\\';
+                }
+                else {
+                    escaping = true;
+                }
+                continue;
+            }
+            if (c === '[') {
+                const [src, needUflag, consumed, magic] = parseClass(glob, i);
+                if (consumed) {
+                    re += src;
+                    uflag = uflag || needUflag;
+                    i += consumed - 1;
+                    hasMagic = hasMagic || magic;
+                    continue;
+                }
+            }
+            if (c === '*') {
+                if (noEmpty && glob === '*')
+                    re += starNoEmpty;
+                else
+                    re += star;
+                hasMagic = true;
+                continue;
+            }
+            if (c === '?') {
+                re += qmark;
+                hasMagic = true;
+                continue;
+            }
+            re += regExpEscape(c);
+        }
+        return [re, unescape(glob), !!hasMagic, uflag];
+    }
+}
+//# sourceMappingURL=ast.js.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/ast.js.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/ast.js.map
new file mode 100644
index 0000000..550d729
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/ast.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAwCxC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAC7D,MAAM,aAAa,GAAG,CAAC,CAAS,EAAoB,EAAE,CACpD,KAAK,CAAC,GAAG,CAAC,CAAgB,CAAC,CAAA;AAE7B,iEAAiE;AACjE,gEAAgE;AAChE,0CAA0C;AAC1C,uEAAuE;AACvE,MAAM,gBAAgB,GAAG,2BAA2B,CAAA;AACpD,MAAM,UAAU,GAAG,SAAS,CAAA;AAE5B,uEAAuE;AACvE,qEAAqE;AACrE,qEAAqE;AACrE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAC3C,0DAA0D;AAC1D,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;AACrC,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,iBAAiB,CAAC,CAAA;AAC7C,MAAM,YAAY,GAAG,CAAC,CAA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AC,KAAK,GAAG,EAAE;gBACb,EAAE,IAAI,KAAK,CAAA;gBACX,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;aACT;YACD,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA;SACtB;QACD,OAAO,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;CACF","sourcesContent":["// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n//   1   2 3   4 5 6      1   2    3   46      5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n//                                 v----- .* because there's more following,\n//                                 v    v  otherwise, .+ because it must be\n//                                 v    v  *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n//   copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string): c is ExtglobType =>\n  types.has(c as ExtglobType)\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nexport class AST {\n  type: ExtglobType | null\n  readonly #root: AST\n\n  #hasMagic?: boolean\n  #uflag: boolean = false\n  #parts: (string | AST)[] = []\n  readonly #parent?: AST\n  readonly #parentIndex: number\n  #negs: AST[]\n  #filledNegs: boolean = false\n  #options: MinimatchOptions\n  #toString?: string\n  // set to true if it's an extglob with no children\n  // (which really means one child of '')\n  #emptyExt: boolean = false\n\n  constructor(\n    type: ExtglobType | null,\n    parent?: AST,\n    options: MinimatchOptions = {}\n  ) {\n    this.type = type\n    // extglobs are inherently magical\n    if (type) this.#hasMagic = true\n    this.#parent = parent\n    this.#root = this.#parent ? this.#parent.#root : this\n    this.#options = this.#root === this ? options : this.#root.#options\n    this.#negs = this.#root === this ? [] : this.#root.#negs\n    if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n    this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n  }\n\n  get hasMagic(): boolean | undefined {\n    /* c8 ignore start */\n    if (this.#hasMagic !== undefined) return this.#hasMagic\n    /* c8 ignore stop */\n    for (const p of this.#parts) {\n      if (typeof p === 'string') continue\n      if (p.type || p.hasMagic) return (this.#hasMagic = true)\n    }\n    // note: will be undefined until we generate the regexp src and find out\n    return this.#hasMagic\n  }\n\n  // reconstructs the pattern\n  toString(): string {\n    if (this.#toString !== undefined) return this.#toString\n    if (!this.type) {\n      return (this.#toString = this.#parts.map(p => String(p)).join(''))\n    } else {\n      return (this.#toString =\n        this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')')\n    }\n  }\n\n  #fillNegs() {\n    /* c8 ignore start */\n    if (this !== this.#root) throw new Error('should only call on root')\n    if (this.#filledNegs) return this\n    /* c8 ignore stop */\n\n    // call toString() once to fill this out\n    this.toString()\n    this.#filledNegs = true\n    let n: AST | undefined\n    while ((n = this.#negs.pop())) {\n      if (n.type !== '!') continue\n      // walk up the tree, appending everthing that comes AFTER parentIndex\n      let p: AST | undefined = n\n      let pp = p.#parent\n      while (pp) {\n        for (\n          let i = p.#parentIndex + 1;\n          !pp.type && i < pp.#parts.length;\n          i++\n        ) {\n          for (const part of n.#parts) {\n            /* c8 ignore start */\n            if (typeof part === 'string') {\n              throw new Error('string part in extglob AST??')\n            }\n            /* c8 ignore stop */\n            part.copyIn(pp.#parts[i])\n          }\n        }\n        p = pp\n        pp = p.#parent\n      }\n    }\n    return this\n  }\n\n  push(...parts: (string | AST)[]) {\n    for (const p of parts) {\n      if (p === '') continue\n      /* c8 ignore start */\n      if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {\n        throw new Error('invalid part: ' + p)\n      }\n      /* c8 ignore stop */\n      this.#parts.push(p)\n    }\n  }\n\n  toJSON() {\n    const ret: any[] =\n      this.type === null\n        ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))\n        : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n    if (this.isStart() && !this.type) ret.unshift([])\n    if (\n      this.isEnd() &&\n      (this === this.#root ||\n        (this.#root.#filledNegs && this.#parent?.type === '!'))\n    ) {\n      ret.push({})\n    }\n    return ret\n  }\n\n  isStart(): boolean {\n    if (this.#root === this) return true\n    // if (this.type) return !!this.#parent?.isStart()\n    if (!this.#parent?.isStart()) return false\n    if (this.#parentIndex === 0) return true\n    // if everything AHEAD of this is a negation, then it's still the \"start\"\n    const p = this.#parent\n    for (let i = 0; i < this.#parentIndex; i++) {\n      const pp = p.#parts[i]\n      if (!(pp instanceof AST && pp.type === '!')) {\n        return false\n      }\n    }\n    return true\n  }\n\n  isEnd(): boolean {\n    if (this.#root === this) return true\n    if (this.#parent?.type === '!') return true\n    if (!this.#parent?.isEnd()) return false\n    if (!this.type) return this.#parent?.isEnd()\n    // if not root, it'll always have a parent\n    /* c8 ignore start */\n    const pl = this.#parent ? this.#parent.#parts.length : 0\n    /* c8 ignore stop */\n    return this.#parentIndex === pl - 1\n  }\n\n  copyIn(part: AST | string) {\n    if (typeof part === 'string') this.push(part)\n    else this.push(part.clone(this))\n  }\n\n  clone(parent: AST) {\n    const c = new AST(this.type, parent)\n    for (const p of this.#parts) {\n      c.copyIn(p)\n    }\n    return c\n  }\n\n  static #parseAST(\n    str: string,\n    ast: AST,\n    pos: number,\n    opt: MinimatchOptions\n  ): number {\n    let escaping = false\n    let inBrace = false\n    let braceStart = -1\n    let braceNeg = false\n    if (ast.type === null) {\n      // outside of a extglob, append until we find a start\n      let i = pos\n      let acc = ''\n      while (i < str.length) {\n        const c = str.charAt(i++)\n        // still accumulate escapes at this point, but we do ignore\n        // starts that are escaped\n        if (escaping || c === '\\\\') {\n          escaping = !escaping\n          acc += c\n          continue\n        }\n\n        if (inBrace) {\n          if (i === braceStart + 1) {\n            if (c === '^' || c === '!') {\n              braceNeg = true\n            }\n          } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n            inBrace = false\n          }\n          acc += c\n          continue\n        } else if (c === '[') {\n          inBrace = true\n          braceStart = i\n          braceNeg = false\n          acc += c\n          continue\n        }\n\n        if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {\n          ast.push(acc)\n          acc = ''\n          const ext = new AST(c, ast)\n          i = AST.#parseAST(str, ext, i, opt)\n          ast.push(ext)\n          continue\n        }\n        acc += c\n      }\n      ast.push(acc)\n      return i\n    }\n\n    // some kind of extglob, pos is at the (\n    // find the next | or )\n    let i = pos + 1\n    let part = new AST(null, ast)\n    const parts: AST[] = []\n    let acc = ''\n    while (i < str.length) {\n      const c = str.charAt(i++)\n      // still accumulate escapes at this point, but we do ignore\n      // starts that are escaped\n      if (escaping || c === '\\\\') {\n        escaping = !escaping\n        acc += c\n        continue\n      }\n\n      if (inBrace) {\n        if (i === braceStart + 1) {\n          if (c === '^' || c === '!') {\n            braceNeg = true\n          }\n        } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n          inBrace = false\n        }\n        acc += c\n        continue\n      } else if (c === '[') {\n        inBrace = true\n        braceStart = i\n        braceNeg = false\n        acc += c\n        continue\n      }\n\n      if (isExtglobType(c) && str.charAt(i) === '(') {\n        part.push(acc)\n        acc = ''\n        const ext = new AST(c, part)\n        part.push(ext)\n        i = AST.#parseAST(str, ext, i, opt)\n        continue\n      }\n      if (c === '|') {\n        part.push(acc)\n        acc = ''\n        parts.push(part)\n        part = new AST(null, ast)\n        continue\n      }\n      if (c === ')') {\n        if (acc === '' && ast.#parts.length === 0) {\n          ast.#emptyExt = true\n        }\n        part.push(acc)\n        acc = ''\n        ast.push(...parts, part)\n        return i\n      }\n      acc += c\n    }\n\n    // unfinished extglob\n    // if we got here, it was a malformed extglob! not an extglob, but\n    // maybe something else in there.\n    ast.type = null\n    ast.#hasMagic = undefined\n    ast.#parts = [str.substring(pos - 1)]\n    return i\n  }\n\n  static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n    const ast = new AST(null, undefined, options)\n    AST.#parseAST(pattern, ast, 0, options)\n    return ast\n  }\n\n  // returns the regular expression if there's magic, or the unescaped\n  // string if not.\n  toMMPattern(): MMRegExp | string {\n    // should only be called on root\n    /* c8 ignore start */\n    if (this !== this.#root) return this.#root.toMMPattern()\n    /* c8 ignore stop */\n    const glob = this.toString()\n    const [re, body, hasMagic, uflag] = this.toRegExpSource()\n    // if we're in nocase mode, and not nocaseMagicOnly, then we do\n    // still need a regular expression if we have to case-insensitively\n    // match capital/lowercase characters.\n    const anyMagic =\n      hasMagic ||\n      this.#hasMagic ||\n      (this.#options.nocase &&\n        !this.#options.nocaseMagicOnly &&\n        glob.toUpperCase() !== glob.toLowerCase())\n    if (!anyMagic) {\n      return body\n    }\n\n    const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n    return Object.assign(new RegExp(`^${re}$`, flags), {\n      _src: re,\n      _glob: glob,\n    })\n  }\n\n  get options() {\n    return this.#options\n  }\n\n  // returns the string match, the regexp source, whether there's magic\n  // in the regexp (so a regular expression is required) and whether or\n  // not the uflag is needed for the regular expression (for posix classes)\n  // TODO: instead of injecting the start/end at this point, just return\n  // the BODY of the regexp, along with the start/end portions suitable\n  // for binding the start/end in either a joined full-path makeRe context\n  // (where we bind to (^|/), or a standalone matchPart context (where\n  // we bind to ^, and not /).  Otherwise slashes get duped!\n  //\n  // In part-matching mode, the start is:\n  // - if not isStart: nothing\n  // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n  // - if dots allowed or not possible: ^\n  // - if dots possible and not allowed: ^(?!\\.)\n  // end is:\n  // - if not isEnd(): nothing\n  // - else: $\n  //\n  // In full-path matching mode, we put the slash at the START of the\n  // pattern, so start is:\n  // - if first pattern: same as part-matching mode\n  // - if not isStart(): nothing\n  // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n  // - if dots allowed or not possible: /\n  // - if dots possible and not allowed: /(?!\\.)\n  // end is:\n  // - if last pattern, same as part-matching mode\n  // - else nothing\n  //\n  // Always put the (?:$|/) on negated tails, though, because that has to be\n  // there to bind the end of the negated pattern portion, and it's easier to\n  // just stick it in now rather than try to inject it later in the middle of\n  // the pattern.\n  //\n  // We can just always return the same end, and leave it up to the caller\n  // to know whether it's going to be used joined or in parts.\n  // And, if the start is adjusted slightly, can do the same there:\n  // - if not isStart: nothing\n  // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n  // - if dots allowed or not possible: (?:/|^)\n  // - if dots possible and not allowed: (?:/|^)(?!\\.)\n  //\n  // But it's better to have a simpler binding without a conditional, for\n  // performance, so probably better to return both start options.\n  //\n  // Then the caller just ignores the end if it's not the first pattern,\n  // and the start always gets applied.\n  //\n  // But that's always going to be $ if it's the ending pattern, or nothing,\n  // so the caller can just attach $ at the end of the pattern when building.\n  //\n  // So the todo is:\n  // - better detect what kind of start is needed\n  // - return both flavors of starting pattern\n  // - attach $ at the end of the pattern when creating the actual RegExp\n  //\n  // Ah, but wait, no, that all only applies to the root when the first pattern\n  // is not an extglob. If the first pattern IS an extglob, then we need all\n  // that dot prevention biz to live in the extglob portions, because eg\n  // +(*|.x*) can match .xy but not .yx.\n  //\n  // So, return the two flavors if it's #root and the first child is not an\n  // AST, otherwise leave it to the child AST to handle it, and there,\n  // use the (?:^|/) style of start binding.\n  //\n  // Even simplified further:\n  // - Since the start for a join is eg /(?!\\.) and the start for a part\n  // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n  // or start or whatever) and prepend ^ or / at the Regexp construction.\n  toRegExpSource(\n    allowDot?: boolean\n  ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n    const dot = allowDot ?? !!this.#options.dot\n    if (this.#root === this) this.#fillNegs()\n    if (!this.type) {\n      const noEmpty = this.isStart() && this.isEnd()\n      const src = this.#parts\n        .map(p => {\n          const [re, _, hasMagic, uflag] =\n            typeof p === 'string'\n              ? AST.#parseGlob(p, this.#hasMagic, noEmpty)\n              : p.toRegExpSource(allowDot)\n          this.#hasMagic = this.#hasMagic || hasMagic\n          this.#uflag = this.#uflag || uflag\n          return re\n        })\n        .join('')\n\n      let start = ''\n      if (this.isStart()) {\n        if (typeof this.#parts[0] === 'string') {\n          // this is the string that will match the start of the pattern,\n          // so we need to protect against dots and such.\n\n          // '.' and '..' cannot match unless the pattern is that exactly,\n          // even if it starts with . or dot:true is set.\n          const dotTravAllowed =\n            this.#parts.length === 1 && justDots.has(this.#parts[0])\n          if (!dotTravAllowed) {\n            const aps = addPatternStart\n            // check if we have a possibility of matching . or ..,\n            // and prevent that.\n            const needNoTrav =\n              // dots are allowed, and the pattern starts with [ or .\n              (dot && aps.has(src.charAt(0))) ||\n              // the pattern starts with \\., and then [ or .\n              (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n              // the pattern starts with \\.\\., and then [ or .\n              (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n            // no need to prevent dots if it can't match a dot, or if a\n            // sub-pattern will be preventing it anyway.\n            const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n            start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''\n          }\n        }\n      }\n\n      // append the \"end of path portion\" pattern to negation tails\n      let end = ''\n      if (\n        this.isEnd() &&\n        this.#root.#filledNegs &&\n        this.#parent?.type === '!'\n      ) {\n        end = '(?:$|\\\\/)'\n      }\n      const final = start + src + end\n      return [\n        final,\n        unescape(src),\n        (this.#hasMagic = !!this.#hasMagic),\n        this.#uflag,\n      ]\n    }\n\n    // We need to calculate the body *twice* if it's a repeat pattern\n    // at the start, once in nodot mode, then again in dot mode, so a\n    // pattern like *(?) can match 'x.y'\n\n    const repeated = this.type === '*' || this.type === '+'\n    // some kind of extglob\n    const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n    let body = this.#partsToRegExp(dot)\n\n    if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n      // invalid extglob, has to at least be *something* present, if it's\n      // the entire path portion.\n      const s = this.toString()\n      this.#parts = [s]\n      this.type = null\n      this.#hasMagic = undefined\n      return [s, unescape(this.toString()), false, false]\n    }\n\n    // XXX abstract out this map method\n    let bodyDotAllowed =\n      !repeated || allowDot || dot || !startNoDot\n        ? ''\n        : this.#partsToRegExp(true)\n    if (bodyDotAllowed === body) {\n      bodyDotAllowed = ''\n    }\n    if (bodyDotAllowed) {\n      body = `(?:${body})(?:${bodyDotAllowed})*?`\n    }\n\n    // an empty !() is exactly equivalent to a starNoEmpty\n    let final = ''\n    if (this.type === '!' && this.#emptyExt) {\n      final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n    } else {\n      const close =\n        this.type === '!'\n          ? // !() must match something,but !(x) can match ''\n            '))' +\n            (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n            star +\n            ')'\n          : this.type === '@'\n          ? ')'\n          : this.type === '?'\n          ? ')?'\n          : this.type === '+' && bodyDotAllowed\n          ? ')'\n          : this.type === '*' && bodyDotAllowed\n          ? `)?`\n          : `)${this.type}`\n      final = start + body + close\n    }\n    return [\n      final,\n      unescape(body),\n      (this.#hasMagic = !!this.#hasMagic),\n      this.#uflag,\n    ]\n  }\n\n  #partsToRegExp(dot: boolean) {\n    return this.#parts\n      .map(p => {\n        // extglob ASTs should only contain parent ASTs\n        /* c8 ignore start */\n        if (typeof p === 'string') {\n          throw new Error('string type in extglob ast??')\n        }\n        /* c8 ignore stop */\n        // can ignore hasMagic, because extglobs are already always magic\n        const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n        this.#uflag = this.#uflag || uflag\n        return re\n      })\n      .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n      .join('|')\n  }\n\n  static #parseGlob(\n    glob: string,\n    hasMagic: boolean | undefined,\n    noEmpty: boolean = false\n  ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n    let escaping = false\n    let re = ''\n    let uflag = false\n    for (let i = 0; i < glob.length; i++) {\n      const c = glob.charAt(i)\n      if (escaping) {\n        escaping = false\n        re += (reSpecials.has(c) ? '\\\\' : '') + c\n        continue\n      }\n      if (c === '\\\\') {\n        if (i === glob.length - 1) {\n          re += '\\\\\\\\'\n        } else {\n          escaping = true\n        }\n        continue\n      }\n      if (c === '[') {\n        const [src, needUflag, consumed, magic] = parseClass(glob, i)\n        if (consumed) {\n          re += src\n          uflag = uflag || needUflag\n          i += consumed - 1\n          hasMagic = hasMagic || magic\n          continue\n        }\n      }\n      if (c === '*') {\n        if (noEmpty && glob === '*') re += starNoEmpty\n        else re += star\n        hasMagic = true\n        continue\n      }\n      if (c === '?') {\n        re += qmark\n        hasMagic = true\n        continue\n      }\n      re += regExpEscape(c)\n    }\n    return [re, unescape(glob), !!hasMagic, uflag]\n  }\n}\n"]}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/brace-expressions.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/brace-expressions.d.ts
new file mode 100644
index 0000000..4d52b29
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/brace-expressions.d.ts
@@ -0,0 +1,8 @@
+export type ParseClassResult = [
+    src: string,
+    uFlag: boolean,
+    consumed: number,
+    hasMagic: boolean
+];
+export declare const parseClass: (glob: string, position: number) => ParseClassResult;
+//# sourceMappingURL=brace-expressions.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map
new file mode 100644
index 0000000..19d8792
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,SACf,MAAM,YACF,MAAM,qBA8HjB,CAAA"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/brace-expressions.js b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/brace-expressions.js
new file mode 100644
index 0000000..c15cc51
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/brace-expressions.js
@@ -0,0 +1,148 @@
+// translate the various posix character classes into unicode properties
+// this works across all unicode locales
+// { : [, /u flag required, negated]
+const posixClasses = {
+    '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true],
+    '[:alpha:]': ['\\p{L}\\p{Nl}', true],
+    '[:ascii:]': ['\\x' + '00-\\x' + '7f', false],
+    '[:blank:]': ['\\p{Zs}\\t', true],
+    '[:cntrl:]': ['\\p{Cc}', true],
+    '[:digit:]': ['\\p{Nd}', true],
+    '[:graph:]': ['\\p{Z}\\p{C}', true, true],
+    '[:lower:]': ['\\p{Ll}', true],
+    '[:print:]': ['\\p{C}', true],
+    '[:punct:]': ['\\p{P}', true],
+    '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true],
+    '[:upper:]': ['\\p{Lu}', true],
+    '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true],
+    '[:xdigit:]': ['A-Fa-f0-9', false],
+};
+// only need to escape a few things inside of brace expressions
+// escapes: [ \ ] -
+const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&');
+// escape all regexp magic characters
+const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
+// everything has already been escaped, we just have to join
+const rangesToString = (ranges) => ranges.join('');
+// takes a glob string at a posix brace expression, and returns
+// an equivalent regular expression source, and boolean indicating
+// whether the /u flag needs to be applied, and the number of chars
+// consumed to parse the character class.
+// This also removes out of order ranges, and returns ($.) if the
+// entire class just no good.
+export const parseClass = (glob, position) => {
+    const pos = position;
+    /* c8 ignore start */
+    if (glob.charAt(pos) !== '[') {
+        throw new Error('not in a brace expression');
+    }
+    /* c8 ignore stop */
+    const ranges = [];
+    const negs = [];
+    let i = pos + 1;
+    let sawStart = false;
+    let uflag = false;
+    let escaping = false;
+    let negate = false;
+    let endPos = pos;
+    let rangeStart = '';
+    WHILE: while (i < glob.length) {
+        const c = glob.charAt(i);
+        if ((c === '!' || c === '^') && i === pos + 1) {
+            negate = true;
+            i++;
+            continue;
+        }
+        if (c === ']' && sawStart && !escaping) {
+            endPos = i + 1;
+            break;
+        }
+        sawStart = true;
+        if (c === '\\') {
+            if (!escaping) {
+                escaping = true;
+                i++;
+                continue;
+            }
+            // escaped \ char, fall through and treat like normal char
+        }
+        if (c === '[' && !escaping) {
+            // either a posix class, a collation equivalent, or just a [
+            for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
+                if (glob.startsWith(cls, i)) {
+                    // invalid, [a-[] is fine, but not [a-[:alpha]]
+                    if (rangeStart) {
+                        return ['$.', false, glob.length - pos, true];
+                    }
+                    i += cls.length;
+                    if (neg)
+                        negs.push(unip);
+                    else
+                        ranges.push(unip);
+                    uflag = uflag || u;
+                    continue WHILE;
+                }
+            }
+        }
+        // now it's just a normal character, effectively
+        escaping = false;
+        if (rangeStart) {
+            // throw this range away if it's not valid, but others
+            // can still match.
+            if (c > rangeStart) {
+                ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c));
+            }
+            else if (c === rangeStart) {
+                ranges.push(braceEscape(c));
+            }
+            rangeStart = '';
+            i++;
+            continue;
+        }
+        // now might be the start of a range.
+        // can be either c-d or c-] or c] or c] at this point
+        if (glob.startsWith('-]', i + 1)) {
+            ranges.push(braceEscape(c + '-'));
+            i += 2;
+            continue;
+        }
+        if (glob.startsWith('-', i + 1)) {
+            rangeStart = c;
+            i += 2;
+            continue;
+        }
+        // not the start of a range, just a single character
+        ranges.push(braceEscape(c));
+        i++;
+    }
+    if (endPos < i) {
+        // didn't see the end of the class, not a valid class,
+        // but might still be valid as a literal match.
+        return ['', false, 0, false];
+    }
+    // if we got no ranges and no negates, then we have a range that
+    // cannot possibly match anything, and that poisons the whole glob
+    if (!ranges.length && !negs.length) {
+        return ['$.', false, glob.length - pos, true];
+    }
+    // if we got one positive range, and it's a single character, then that's
+    // not actually a magic pattern, it's just that one literal character.
+    // we should not treat that as "magic", we should just return the literal
+    // character. [_] is a perfectly valid way to escape glob magic chars.
+    if (negs.length === 0 &&
+        ranges.length === 1 &&
+        /^\\?.$/.test(ranges[0]) &&
+        !negate) {
+        const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
+        return [regexpEscape(r), false, endPos - pos, false];
+    }
+    const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';
+    const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';
+    const comb = ranges.length && negs.length
+        ? '(' + sranges + '|' + snegs + ')'
+        : ranges.length
+            ? sranges
+            : snegs;
+    return [comb, uflag, endPos - pos, true];
+};
+//# sourceMappingURL=brace-expressions.js.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/brace-expressions.js.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/brace-expressions.js.map
new file mode 100644
index 0000000..d8e4167
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/brace-expressions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,wCAAwC;AAExC,8DAA8D;AAC9D,MAAM,YAAY,GAA0D;IAC1E,WAAW,EAAE,CAAC,sBAAsB,EAAE,IAAI,CA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,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;IACxE,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACpE,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QAC1B,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG;QACnC,CAAC,CAAC,MAAM,CAAC,MAAM;YACf,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK,CAAA;IAEX,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA","sourcesContent":["// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { : [, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } = {\n  '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n  '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n  '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n  '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n  '[:cntrl:]': ['\\\\p{Cc}', true],\n  '[:digit:]': ['\\\\p{Nd}', true],\n  '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n  '[:lower:]': ['\\\\p{Ll}', true],\n  '[:print:]': ['\\\\p{C}', true],\n  '[:punct:]': ['\\\\p{P}', true],\n  '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n  '[:upper:]': ['\\\\p{Lu}', true],\n  '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n  '[:xdigit:]': ['A-Fa-f0-9', false],\n}\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n  src: string,\n  uFlag: boolean,\n  consumed: number,\n  hasMagic: boolean\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n  glob: string,\n  position: number\n): ParseClassResult => {\n  const pos = position\n  /* c8 ignore start */\n  if (glob.charAt(pos) !== '[') {\n    throw new Error('not in a brace expression')\n  }\n  /* c8 ignore stop */\n  const ranges: string[] = []\n  const negs: string[] = []\n\n  let i = pos + 1\n  let sawStart = false\n  let uflag = false\n  let escaping = false\n  let negate = false\n  let endPos = pos\n  let rangeStart = ''\n  WHILE: while (i < glob.length) {\n    const c = glob.charAt(i)\n    if ((c === '!' || c === '^') && i === pos + 1) {\n      negate = true\n      i++\n      continue\n    }\n\n    if (c === ']' && sawStart && !escaping) {\n      endPos = i + 1\n      break\n    }\n\n    sawStart = true\n    if (c === '\\\\') {\n      if (!escaping) {\n        escaping = true\n        i++\n        continue\n      }\n      // escaped \\ char, fall through and treat like normal char\n    }\n    if (c === '[' && !escaping) {\n      // either a posix class, a collation equivalent, or just a [\n      for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n        if (glob.startsWith(cls, i)) {\n          // invalid, [a-[] is fine, but not [a-[:alpha]]\n          if (rangeStart) {\n            return ['$.', false, glob.length - pos, true]\n          }\n          i += cls.length\n          if (neg) negs.push(unip)\n          else ranges.push(unip)\n          uflag = uflag || u\n          continue WHILE\n        }\n      }\n    }\n\n    // now it's just a normal character, effectively\n    escaping = false\n    if (rangeStart) {\n      // throw this range away if it's not valid, but others\n      // can still match.\n      if (c > rangeStart) {\n        ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n      } else if (c === rangeStart) {\n        ranges.push(braceEscape(c))\n      }\n      rangeStart = ''\n      i++\n      continue\n    }\n\n    // now might be the start of a range.\n    // can be either c-d or c-] or c] or c] at this point\n    if (glob.startsWith('-]', i + 1)) {\n      ranges.push(braceEscape(c + '-'))\n      i += 2\n      continue\n    }\n    if (glob.startsWith('-', i + 1)) {\n      rangeStart = c\n      i += 2\n      continue\n    }\n\n    // not the start of a range, just a single character\n    ranges.push(braceEscape(c))\n    i++\n  }\n\n  if (endPos < i) {\n    // didn't see the end of the class, not a valid class,\n    // but might still be valid as a literal match.\n    return ['', false, 0, false]\n  }\n\n  // if we got no ranges and no negates, then we have a range that\n  // cannot possibly match anything, and that poisons the whole glob\n  if (!ranges.length && !negs.length) {\n    return ['$.', false, glob.length - pos, true]\n  }\n\n  // if we got one positive range, and it's a single character, then that's\n  // not actually a magic pattern, it's just that one literal character.\n  // we should not treat that as \"magic\", we should just return the literal\n  // character. [_] is a perfectly valid way to escape glob magic chars.\n  if (\n    negs.length === 0 &&\n    ranges.length === 1 &&\n    /^\\\\?.$/.test(ranges[0]) &&\n    !negate\n  ) {\n    const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n    return [regexpEscape(r), false, endPos - pos, false]\n  }\n\n  const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n  const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n  const comb =\n    ranges.length && negs.length\n      ? '(' + sranges + '|' + snegs + ')'\n      : ranges.length\n      ? sranges\n      : snegs\n\n  return [comb, uflag, endPos - pos, true]\n}\n"]}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/escape.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/escape.d.ts
new file mode 100644
index 0000000..353ef23
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/escape.d.ts
@@ -0,0 +1,12 @@
+import { MinimatchOptions } from './index.js';
+/**
+ * Escape all magic characters in a glob pattern.
+ *
+ * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
+ * option is used, then characters are escaped by wrapping in `[]`, because
+ * a magic character wrapped in a character class can only be satisfied by
+ * that exact character.  In this mode, `\` is _not_ escaped, because it is
+ * not interpreted as a magic character, but instead as a path separator.
+ */
+export declare const escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
+//# sourceMappingURL=escape.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/escape.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/escape.d.ts.map
new file mode 100644
index 0000000..1f1c1f5
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/escape.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,MACd,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAQlD,CAAA"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/escape.js b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/escape.js
new file mode 100644
index 0000000..838e925
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/escape.js
@@ -0,0 +1,18 @@
+/**
+ * Escape all magic characters in a glob pattern.
+ *
+ * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
+ * option is used, then characters are escaped by wrapping in `[]`, because
+ * a magic character wrapped in a character class can only be satisfied by
+ * that exact character.  In this mode, `\` is _not_ escaped, because it is
+ * not interpreted as a magic character, but instead as a path separator.
+ */
+export const escape = (s, { windowsPathsNoEscape = false, } = {}) => {
+    // don't need to escape +@! because we escape the parens
+    // that make those magic, and escaping ! as [!] isn't valid,
+    // because [!]] is a valid glob class meaning not ']'.
+    return windowsPathsNoEscape
+        ? s.replace(/[?*()[\]]/g, '[$&]')
+        : s.replace(/[?*()[\]\\]/g, '\\$&');
+};
+//# sourceMappingURL=escape.js.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/escape.js.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/escape.js.map
new file mode 100644
index 0000000..fc15db8
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/escape.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,wDAAwD;IACxD,4DAA4D;IAC5D,sDAAsD;IACtD,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC,CAAA","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character.  In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n */\nexport const escape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n  }: Pick = {}\n) => {\n  // don't need to escape +@! because we escape the parens\n  // that make those magic, and escaping ! as [!] isn't valid,\n  // because [!]] is a valid glob class meaning not ']'.\n  return windowsPathsNoEscape\n    ? s.replace(/[?*()[\\]]/g, '[$&]')\n    : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n"]}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/index.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/index.d.ts
new file mode 100644
index 0000000..0b70c96
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/index.d.ts
@@ -0,0 +1,94 @@
+import { AST } from './ast.js';
+type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
+export interface MinimatchOptions {
+    nobrace?: boolean;
+    nocomment?: boolean;
+    nonegate?: boolean;
+    debug?: boolean;
+    noglobstar?: boolean;
+    noext?: boolean;
+    nonull?: boolean;
+    windowsPathsNoEscape?: boolean;
+    allowWindowsEscape?: boolean;
+    partial?: boolean;
+    dot?: boolean;
+    nocase?: boolean;
+    nocaseMagicOnly?: boolean;
+    magicalBraces?: boolean;
+    matchBase?: boolean;
+    flipNegate?: boolean;
+    preserveMultipleSlashes?: boolean;
+    optimizationLevel?: number;
+    platform?: Platform;
+    windowsNoMagicRoot?: boolean;
+}
+export declare const minimatch: {
+    (p: string, pattern: string, options?: MinimatchOptions): boolean;
+    sep: Sep;
+    GLOBSTAR: typeof GLOBSTAR;
+    filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
+    defaults: (def: MinimatchOptions) => typeof minimatch;
+    braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
+    makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
+    match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
+    AST: typeof AST;
+    Minimatch: typeof Minimatch;
+    escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
+    unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
+};
+type Sep = '\\' | '/';
+export declare const sep: Sep;
+export declare const GLOBSTAR: unique symbol;
+export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
+export declare const defaults: (def: MinimatchOptions) => typeof minimatch;
+export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
+export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
+export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
+export type MMRegExp = RegExp & {
+    _src?: string;
+    _glob?: string;
+};
+export type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR;
+export type ParseReturn = ParseReturnFiltered | false;
+export declare class Minimatch {
+    options: MinimatchOptions;
+    set: ParseReturnFiltered[][];
+    pattern: string;
+    windowsPathsNoEscape: boolean;
+    nonegate: boolean;
+    negate: boolean;
+    comment: boolean;
+    empty: boolean;
+    preserveMultipleSlashes: boolean;
+    partial: boolean;
+    globSet: string[];
+    globParts: string[][];
+    nocase: boolean;
+    isWindows: boolean;
+    platform: Platform;
+    windowsNoMagicRoot: boolean;
+    regexp: false | null | MMRegExp;
+    constructor(pattern: string, options?: MinimatchOptions);
+    hasMagic(): boolean;
+    debug(..._: any[]): void;
+    make(): void;
+    preprocess(globParts: string[][]): string[][];
+    adjascentGlobstarOptimize(globParts: string[][]): string[][];
+    levelOneOptimize(globParts: string[][]): string[][];
+    levelTwoFileOptimize(parts: string | string[]): string[];
+    firstPhasePreProcess(globParts: string[][]): string[][];
+    secondPhasePreProcess(globParts: string[][]): string[][];
+    partsMatch(a: string[], b: string[], emptyGSMatch?: boolean): false | string[];
+    parseNegate(): void;
+    matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean;
+    braceExpand(): string[];
+    parse(pattern: string): ParseReturn;
+    makeRe(): false | MMRegExp;
+    slashSplit(p: string): string[];
+    match(f: string, partial?: boolean): boolean;
+    static defaults(def: MinimatchOptions): typeof Minimatch;
+}
+export { AST } from './ast.js';
+export { escape } from './escape.js';
+export { unescape } from './unescape.js';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/index.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/index.d.ts.map
new file mode 100644
index 0000000..9a892c8
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAI3C,KAAK,QAAQ,GACT,KAAK,GACL,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,CAAA;AAEZ,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC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B,KAAK,GAAG,MAAM,EAAE;IA+CnB,WAAW;IAqBX,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,OAAO,GAAE,OAAe;IAiNzE,WAAW;IAIX,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW;IAiDnC,MAAM;IAsFN,UAAU,CAAC,CAAC,EAAE,MAAM;IAepB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,UAAe;IAiEvC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,gBAAgB;CAGtC;AAED,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/index.js b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/index.js
new file mode 100644
index 0000000..a11d579
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/index.js
@@ -0,0 +1,1001 @@
+import expand from 'brace-expansion';
+import { assertValidPattern } from './assert-valid-pattern.js';
+import { AST } from './ast.js';
+import { escape } from './escape.js';
+import { unescape } from './unescape.js';
+export const minimatch = (p, pattern, options = {}) => {
+    assertValidPattern(pattern);
+    // shortcut: comments match nothing.
+    if (!options.nocomment && pattern.charAt(0) === '#') {
+        return false;
+    }
+    return new Minimatch(pattern, options).match(p);
+};
+// Optimized checking for the most common glob patterns.
+const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
+const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);
+const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
+const starDotExtTestNocase = (ext) => {
+    ext = ext.toLowerCase();
+    return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext);
+};
+const starDotExtTestNocaseDot = (ext) => {
+    ext = ext.toLowerCase();
+    return (f) => f.toLowerCase().endsWith(ext);
+};
+const starDotStarRE = /^\*+\.\*+$/;
+const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.');
+const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.');
+const dotStarRE = /^\.\*+$/;
+const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');
+const starRE = /^\*+$/;
+const starTest = (f) => f.length !== 0 && !f.startsWith('.');
+const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';
+const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
+const qmarksTestNocase = ([$0, ext = '']) => {
+    const noext = qmarksTestNoExt([$0]);
+    if (!ext)
+        return noext;
+    ext = ext.toLowerCase();
+    return (f) => noext(f) && f.toLowerCase().endsWith(ext);
+};
+const qmarksTestNocaseDot = ([$0, ext = '']) => {
+    const noext = qmarksTestNoExtDot([$0]);
+    if (!ext)
+        return noext;
+    ext = ext.toLowerCase();
+    return (f) => noext(f) && f.toLowerCase().endsWith(ext);
+};
+const qmarksTestDot = ([$0, ext = '']) => {
+    const noext = qmarksTestNoExtDot([$0]);
+    return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
+};
+const qmarksTest = ([$0, ext = '']) => {
+    const noext = qmarksTestNoExt([$0]);
+    return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
+};
+const qmarksTestNoExt = ([$0]) => {
+    const len = $0.length;
+    return (f) => f.length === len && !f.startsWith('.');
+};
+const qmarksTestNoExtDot = ([$0]) => {
+    const len = $0.length;
+    return (f) => f.length === len && f !== '.' && f !== '..';
+};
+/* c8 ignore start */
+const defaultPlatform = (typeof process === 'object' && process
+    ? (typeof process.env === 'object' &&
+        process.env &&
+        process.env.__MINIMATCH_TESTING_PLATFORM__) ||
+        process.platform
+    : 'posix');
+const path = {
+    win32: { sep: '\\' },
+    posix: { sep: '/' },
+};
+/* c8 ignore stop */
+export const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;
+minimatch.sep = sep;
+export const GLOBSTAR = Symbol('globstar **');
+minimatch.GLOBSTAR = GLOBSTAR;
+// any single thing other than /
+// don't need to escape / when using new RegExp()
+const qmark = '[^/]';
+// * => any number of characters
+const star = qmark + '*?';
+// ** when dots are allowed.  Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?';
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?';
+export const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
+minimatch.filter = filter;
+const ext = (a, b = {}) => Object.assign({}, a, b);
+export const defaults = (def) => {
+    if (!def || typeof def !== 'object' || !Object.keys(def).length) {
+        return minimatch;
+    }
+    const orig = minimatch;
+    const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
+    return Object.assign(m, {
+        Minimatch: class Minimatch extends orig.Minimatch {
+            constructor(pattern, options = {}) {
+                super(pattern, ext(def, options));
+            }
+            static defaults(options) {
+                return orig.defaults(ext(def, options)).Minimatch;
+            }
+        },
+        AST: class AST extends orig.AST {
+            /* c8 ignore start */
+            constructor(type, parent, options = {}) {
+                super(type, parent, ext(def, options));
+            }
+            /* c8 ignore stop */
+            static fromGlob(pattern, options = {}) {
+                return orig.AST.fromGlob(pattern, ext(def, options));
+            }
+        },
+        unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
+        escape: (s, options = {}) => orig.escape(s, ext(def, options)),
+        filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
+        defaults: (options) => orig.defaults(ext(def, options)),
+        makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
+        braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
+        match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
+        sep: orig.sep,
+        GLOBSTAR: GLOBSTAR,
+    });
+};
+minimatch.defaults = defaults;
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+export const braceExpand = (pattern, options = {}) => {
+    assertValidPattern(pattern);
+    // Thanks to Yeting Li  for
+    // improving this regexp to avoid a ReDOS vulnerability.
+    if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
+        // shortcut. no need to expand.
+        return [pattern];
+    }
+    return expand(pattern);
+};
+minimatch.braceExpand = braceExpand;
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion.  Otherwise, any series
+// of * is equivalent to a single *.  Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+export const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
+minimatch.makeRe = makeRe;
+export const match = (list, pattern, options = {}) => {
+    const mm = new Minimatch(pattern, options);
+    list = list.filter(f => mm.match(f));
+    if (mm.options.nonull && !list.length) {
+        list.push(pattern);
+    }
+    return list;
+};
+minimatch.match = match;
+// replace stuff like \* with *
+const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
+const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
+export class Minimatch {
+    options;
+    set;
+    pattern;
+    windowsPathsNoEscape;
+    nonegate;
+    negate;
+    comment;
+    empty;
+    preserveMultipleSlashes;
+    partial;
+    globSet;
+    globParts;
+    nocase;
+    isWindows;
+    platform;
+    windowsNoMagicRoot;
+    regexp;
+    constructor(pattern, options = {}) {
+        assertValidPattern(pattern);
+        options = options || {};
+        this.options = options;
+        this.pattern = pattern;
+        this.platform = options.platform || defaultPlatform;
+        this.isWindows = this.platform === 'win32';
+        this.windowsPathsNoEscape =
+            !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
+        if (this.windowsPathsNoEscape) {
+            this.pattern = this.pattern.replace(/\\/g, '/');
+        }
+        this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
+        this.regexp = null;
+        this.negate = false;
+        this.nonegate = !!options.nonegate;
+        this.comment = false;
+        this.empty = false;
+        this.partial = !!options.partial;
+        this.nocase = !!this.options.nocase;
+        this.windowsNoMagicRoot =
+            options.windowsNoMagicRoot !== undefined
+                ? options.windowsNoMagicRoot
+                : !!(this.isWindows && this.nocase);
+        this.globSet = [];
+        this.globParts = [];
+        this.set = [];
+        // make the set of regexps etc.
+        this.make();
+    }
+    hasMagic() {
+        if (this.options.magicalBraces && this.set.length > 1) {
+            return true;
+        }
+        for (const pattern of this.set) {
+            for (const part of pattern) {
+                if (typeof part !== 'string')
+                    return true;
+            }
+        }
+        return false;
+    }
+    debug(..._) { }
+    make() {
+        const pattern = this.pattern;
+        const options = this.options;
+        // empty patterns and comments match nothing.
+        if (!options.nocomment && pattern.charAt(0) === '#') {
+            this.comment = true;
+            return;
+        }
+        if (!pattern) {
+            this.empty = true;
+            return;
+        }
+        // step 1: figure out negation, etc.
+        this.parseNegate();
+        // step 2: expand braces
+        this.globSet = [...new Set(this.braceExpand())];
+        if (options.debug) {
+            this.debug = (...args) => console.error(...args);
+        }
+        this.debug(this.pattern, this.globSet);
+        // step 3: now we have a set, so turn each one into a series of
+        // path-portion matching patterns.
+        // These will be regexps, except in the case of "**", which is
+        // set to the GLOBSTAR object for globstar behavior,
+        // and will not contain any / characters
+        //
+        // First, we preprocess to make the glob pattern sets a bit simpler
+        // and deduped.  There are some perf-killing patterns that can cause
+        // problems with a glob walk, but we can simplify them down a bit.
+        const rawGlobParts = this.globSet.map(s => this.slashSplit(s));
+        this.globParts = this.preprocess(rawGlobParts);
+        this.debug(this.pattern, this.globParts);
+        // glob --> regexps
+        let set = this.globParts.map((s, _, __) => {
+            if (this.isWindows && this.windowsNoMagicRoot) {
+                // check if it's a drive or unc path.
+                const isUNC = s[0] === '' &&
+                    s[1] === '' &&
+                    (s[2] === '?' || !globMagic.test(s[2])) &&
+                    !globMagic.test(s[3]);
+                const isDrive = /^[a-z]:/i.test(s[0]);
+                if (isUNC) {
+                    return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))];
+                }
+                else if (isDrive) {
+                    return [s[0], ...s.slice(1).map(ss => this.parse(ss))];
+                }
+            }
+            return s.map(ss => this.parse(ss));
+        });
+        this.debug(this.pattern, set);
+        // filter out everything that didn't compile properly.
+        this.set = set.filter(s => s.indexOf(false) === -1);
+        // do not treat the ? in UNC paths as magic
+        if (this.isWindows) {
+            for (let i = 0; i < this.set.length; i++) {
+                const p = this.set[i];
+                if (p[0] === '' &&
+                    p[1] === '' &&
+                    this.globParts[i][2] === '?' &&
+                    typeof p[3] === 'string' &&
+                    /^[a-z]:$/i.test(p[3])) {
+                    p[2] = '?';
+                }
+            }
+        }
+        this.debug(this.pattern, this.set);
+    }
+    // various transforms to equivalent pattern sets that are
+    // faster to process in a filesystem walk.  The goal is to
+    // eliminate what we can, and push all ** patterns as far
+    // to the right as possible, even if it increases the number
+    // of patterns that we have to process.
+    preprocess(globParts) {
+        // if we're not in globstar mode, then turn all ** into *
+        if (this.options.noglobstar) {
+            for (let i = 0; i < globParts.length; i++) {
+                for (let j = 0; j < globParts[i].length; j++) {
+                    if (globParts[i][j] === '**') {
+                        globParts[i][j] = '*';
+                    }
+                }
+            }
+        }
+        const { optimizationLevel = 1 } = this.options;
+        if (optimizationLevel >= 2) {
+            // aggressive optimization for the purpose of fs walking
+            globParts = this.firstPhasePreProcess(globParts);
+            globParts = this.secondPhasePreProcess(globParts);
+        }
+        else if (optimizationLevel >= 1) {
+            // just basic optimizations to remove some .. parts
+            globParts = this.levelOneOptimize(globParts);
+        }
+        else {
+            // just collapse multiple ** portions into one
+            globParts = this.adjascentGlobstarOptimize(globParts);
+        }
+        return globParts;
+    }
+    // just get rid of adjascent ** portions
+    adjascentGlobstarOptimize(globParts) {
+        return globParts.map(parts => {
+            let gs = -1;
+            while (-1 !== (gs = parts.indexOf('**', gs + 1))) {
+                let i = gs;
+                while (parts[i + 1] === '**') {
+                    i++;
+                }
+                if (i !== gs) {
+                    parts.splice(gs, i - gs);
+                }
+            }
+            return parts;
+        });
+    }
+    // get rid of adjascent ** and resolve .. portions
+    levelOneOptimize(globParts) {
+        return globParts.map(parts => {
+            parts = parts.reduce((set, part) => {
+                const prev = set[set.length - 1];
+                if (part === '**' && prev === '**') {
+                    return set;
+                }
+                if (part === '..') {
+                    if (prev && prev !== '..' && prev !== '.' && prev !== '**') {
+                        set.pop();
+                        return set;
+                    }
+                }
+                set.push(part);
+                return set;
+            }, []);
+            return parts.length === 0 ? [''] : parts;
+        });
+    }
+    levelTwoFileOptimize(parts) {
+        if (!Array.isArray(parts)) {
+            parts = this.slashSplit(parts);
+        }
+        let didSomething = false;
+        do {
+            didSomething = false;
+            // 
// -> 
/
+            if (!this.preserveMultipleSlashes) {
+                for (let i = 1; i < parts.length - 1; i++) {
+                    const p = parts[i];
+                    // don't squeeze out UNC patterns
+                    if (i === 1 && p === '' && parts[0] === '')
+                        continue;
+                    if (p === '.' || p === '') {
+                        didSomething = true;
+                        parts.splice(i, 1);
+                        i--;
+                    }
+                }
+                if (parts[0] === '.' &&
+                    parts.length === 2 &&
+                    (parts[1] === '.' || parts[1] === '')) {
+                    didSomething = true;
+                    parts.pop();
+                }
+            }
+            // 
/

/../ ->

/
+            let dd = 0;
+            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                const p = parts[dd - 1];
+                if (p && p !== '.' && p !== '..' && p !== '**') {
+                    didSomething = true;
+                    parts.splice(dd - 1, 2);
+                    dd -= 2;
+                }
+            }
+        } while (didSomething);
+        return parts.length === 0 ? [''] : parts;
+    }
+    // First phase: single-pattern processing
+    // 
 is 1 or more portions
+    //  is 1 or more portions
+    // 

is any portion other than ., .., '', or ** + // is . or '' + // + // **/.. is *brutal* for filesystem walking performance, because + // it effectively resets the recursive walk each time it occurs, + // and ** cannot be reduced out by a .. pattern part like a regexp + // or most strings (other than .., ., and '') can be. + // + //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + //

// -> 
/
+    // 
/

/../ ->

/
+    // **/**/ -> **/
+    //
+    // **/*/ -> */**/ <== not valid because ** doesn't follow
+    // this WOULD be allowed if ** did follow symlinks, or * didn't
+    firstPhasePreProcess(globParts) {
+        let didSomething = false;
+        do {
+            didSomething = false;
+            // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + for (let parts of globParts) { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let gss = gs; + while (parts[gss + 1] === '**') { + //

/**/**/ -> 
/**/
+                        gss++;
+                    }
+                    // eg, if gs is 2 and gss is 4, that means we have 3 **
+                    // parts, and can remove 2 of them.
+                    if (gss > gs) {
+                        parts.splice(gs + 1, gss - gs);
+                    }
+                    let next = parts[gs + 1];
+                    const p = parts[gs + 2];
+                    const p2 = parts[gs + 3];
+                    if (next !== '..')
+                        continue;
+                    if (!p ||
+                        p === '.' ||
+                        p === '..' ||
+                        !p2 ||
+                        p2 === '.' ||
+                        p2 === '..') {
+                        continue;
+                    }
+                    didSomething = true;
+                    // edit parts in place, and push the new one
+                    parts.splice(gs, 1);
+                    const other = parts.slice(0);
+                    other[gs] = '**';
+                    globParts.push(other);
+                    gs--;
+                }
+                // 
// -> 
/
+                if (!this.preserveMultipleSlashes) {
+                    for (let i = 1; i < parts.length - 1; i++) {
+                        const p = parts[i];
+                        // don't squeeze out UNC patterns
+                        if (i === 1 && p === '' && parts[0] === '')
+                            continue;
+                        if (p === '.' || p === '') {
+                            didSomething = true;
+                            parts.splice(i, 1);
+                            i--;
+                        }
+                    }
+                    if (parts[0] === '.' &&
+                        parts.length === 2 &&
+                        (parts[1] === '.' || parts[1] === '')) {
+                        didSomething = true;
+                        parts.pop();
+                    }
+                }
+                // 
/

/../ ->

/
+                let dd = 0;
+                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                    const p = parts[dd - 1];
+                    if (p && p !== '.' && p !== '..' && p !== '**') {
+                        didSomething = true;
+                        const needDot = dd === 1 && parts[dd + 1] === '**';
+                        const splin = needDot ? ['.'] : [];
+                        parts.splice(dd - 1, 2, ...splin);
+                        if (parts.length === 0)
+                            parts.push('');
+                        dd -= 2;
+                    }
+                }
+            }
+        } while (didSomething);
+        return globParts;
+    }
+    // second phase: multi-pattern dedupes
+    // {
/*/,
/

/} ->

/*/
+    // {
/,
/} -> 
/
+    // {
/**/,
/} -> 
/**/
+    //
+    // {
/**/,
/**/

/} ->

/**/
+    // ^-- not valid because ** doens't follow symlinks
+    secondPhasePreProcess(globParts) {
+        for (let i = 0; i < globParts.length - 1; i++) {
+            for (let j = i + 1; j < globParts.length; j++) {
+                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
+                if (matched) {
+                    globParts[i] = [];
+                    globParts[j] = matched;
+                    break;
+                }
+            }
+        }
+        return globParts.filter(gs => gs.length);
+    }
+    partsMatch(a, b, emptyGSMatch = false) {
+        let ai = 0;
+        let bi = 0;
+        let result = [];
+        let which = '';
+        while (ai < a.length && bi < b.length) {
+            if (a[ai] === b[bi]) {
+                result.push(which === 'b' ? b[bi] : a[ai]);
+                ai++;
+                bi++;
+            }
+            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
+                result.push(a[ai]);
+                ai++;
+            }
+            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
+                result.push(b[bi]);
+                bi++;
+            }
+            else if (a[ai] === '*' &&
+                b[bi] &&
+                (this.options.dot || !b[bi].startsWith('.')) &&
+                b[bi] !== '**') {
+                if (which === 'b')
+                    return false;
+                which = 'a';
+                result.push(a[ai]);
+                ai++;
+                bi++;
+            }
+            else if (b[bi] === '*' &&
+                a[ai] &&
+                (this.options.dot || !a[ai].startsWith('.')) &&
+                a[ai] !== '**') {
+                if (which === 'a')
+                    return false;
+                which = 'b';
+                result.push(b[bi]);
+                ai++;
+                bi++;
+            }
+            else {
+                return false;
+            }
+        }
+        // if we fall out of the loop, it means they two are identical
+        // as long as their lengths match
+        return a.length === b.length && result;
+    }
+    parseNegate() {
+        if (this.nonegate)
+            return;
+        const pattern = this.pattern;
+        let negate = false;
+        let negateOffset = 0;
+        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
+            negate = !negate;
+            negateOffset++;
+        }
+        if (negateOffset)
+            this.pattern = pattern.slice(negateOffset);
+        this.negate = negate;
+    }
+    // set partial to true to test if, for example,
+    // "/a/b" matches the start of "/*/b/*/d"
+    // Partial means, if you run out of file before you run
+    // out of pattern, then that's fine, as long as all
+    // the parts match.
+    matchOne(file, pattern, partial = false) {
+        const options = this.options;
+        // UNC paths like //?/X:/... can match X:/... and vice versa
+        // Drive letters in absolute drive or unc paths are always compared
+        // case-insensitively.
+        if (this.isWindows) {
+            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
+            const fileUNC = !fileDrive &&
+                file[0] === '' &&
+                file[1] === '' &&
+                file[2] === '?' &&
+                /^[a-z]:$/i.test(file[3]);
+            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
+            const patternUNC = !patternDrive &&
+                pattern[0] === '' &&
+                pattern[1] === '' &&
+                pattern[2] === '?' &&
+                typeof pattern[3] === 'string' &&
+                /^[a-z]:$/i.test(pattern[3]);
+            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
+            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
+            if (typeof fdi === 'number' && typeof pdi === 'number') {
+                const [fd, pd] = [file[fdi], pattern[pdi]];
+                if (fd.toLowerCase() === pd.toLowerCase()) {
+                    pattern[pdi] = fd;
+                    if (pdi > fdi) {
+                        pattern = pattern.slice(pdi);
+                    }
+                    else if (fdi > pdi) {
+                        file = file.slice(fdi);
+                    }
+                }
+            }
+        }
+        // resolve and reduce . and .. portions in the file as well.
+        // dont' need to do the second phase, because it's only one string[]
+        const { optimizationLevel = 1 } = this.options;
+        if (optimizationLevel >= 2) {
+            file = this.levelTwoFileOptimize(file);
+        }
+        this.debug('matchOne', this, { file, pattern });
+        this.debug('matchOne', file.length, pattern.length);
+        for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
+            this.debug('matchOne loop');
+            var p = pattern[pi];
+            var f = file[fi];
+            this.debug(pattern, p, f);
+            // should be impossible.
+            // some invalid regexp stuff in the set.
+            /* c8 ignore start */
+            if (p === false) {
+                return false;
+            }
+            /* c8 ignore stop */
+            if (p === GLOBSTAR) {
+                this.debug('GLOBSTAR', [pattern, p, f]);
+                // "**"
+                // a/**/b/**/c would match the following:
+                // a/b/x/y/z/c
+                // a/x/y/z/b/c
+                // a/b/x/b/x/c
+                // a/b/c
+                // To do this, take the rest of the pattern after
+                // the **, and see if it would match the file remainder.
+                // If so, return success.
+                // If not, the ** "swallows" a segment, and try again.
+                // This is recursively awful.
+                //
+                // a/**/b/**/c matching a/b/x/y/z/c
+                // - a matches a
+                // - doublestar
+                //   - matchOne(b/x/y/z/c, b/**/c)
+                //     - b matches b
+                //     - doublestar
+                //       - matchOne(x/y/z/c, c) -> no
+                //       - matchOne(y/z/c, c) -> no
+                //       - matchOne(z/c, c) -> no
+                //       - matchOne(c, c) yes, hit
+                var fr = fi;
+                var pr = pi + 1;
+                if (pr === pl) {
+                    this.debug('** at the end');
+                    // a ** at the end will just swallow the rest.
+                    // We have found a match.
+                    // however, it will not swallow /.x, unless
+                    // options.dot is set.
+                    // . and .. are *never* matched by **, for explosively
+                    // exponential reasons.
+                    for (; fi < fl; fi++) {
+                        if (file[fi] === '.' ||
+                            file[fi] === '..' ||
+                            (!options.dot && file[fi].charAt(0) === '.'))
+                            return false;
+                    }
+                    return true;
+                }
+                // ok, let's see if we can swallow whatever we can.
+                while (fr < fl) {
+                    var swallowee = file[fr];
+                    this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
+                    // XXX remove this slice.  Just pass the start index.
+                    if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+                        this.debug('globstar found match!', fr, fl, swallowee);
+                        // found a match.
+                        return true;
+                    }
+                    else {
+                        // can't swallow "." or ".." ever.
+                        // can only swallow ".foo" when explicitly asked.
+                        if (swallowee === '.' ||
+                            swallowee === '..' ||
+                            (!options.dot && swallowee.charAt(0) === '.')) {
+                            this.debug('dot detected!', file, fr, pattern, pr);
+                            break;
+                        }
+                        // ** swallows a segment, and continue.
+                        this.debug('globstar swallow a segment, and continue');
+                        fr++;
+                    }
+                }
+                // no match was found.
+                // However, in partial mode, we can't say this is necessarily over.
+                /* c8 ignore start */
+                if (partial) {
+                    // ran out of file
+                    this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
+                    if (fr === fl) {
+                        return true;
+                    }
+                }
+                /* c8 ignore stop */
+                return false;
+            }
+            // something other than **
+            // non-magic patterns just have to match exactly
+            // patterns with magic have been turned into regexps.
+            let hit;
+            if (typeof p === 'string') {
+                hit = f === p;
+                this.debug('string match', p, f, hit);
+            }
+            else {
+                hit = p.test(f);
+                this.debug('pattern match', p, f, hit);
+            }
+            if (!hit)
+                return false;
+        }
+        // Note: ending in / means that we'll get a final ""
+        // at the end of the pattern.  This can only match a
+        // corresponding "" at the end of the file.
+        // If the file ends in /, then it can only match a
+        // a pattern that ends in /, unless the pattern just
+        // doesn't have any more for it. But, a/b/ should *not*
+        // match "a/b/*", even though "" matches against the
+        // [^/]*? pattern, except in partial mode, where it might
+        // simply not be reached yet.
+        // However, a/b/ should still satisfy a/*
+        // now either we fell off the end of the pattern, or we're done.
+        if (fi === fl && pi === pl) {
+            // ran out of pattern and filename at the same time.
+            // an exact hit!
+            return true;
+        }
+        else if (fi === fl) {
+            // ran out of file, but still had pattern left.
+            // this is ok if we're doing the match as part of
+            // a glob fs traversal.
+            return partial;
+        }
+        else if (pi === pl) {
+            // ran out of pattern, still have file left.
+            // this is only acceptable if we're on the very last
+            // empty segment of a file with a trailing slash.
+            // a/* should match a/b/
+            return fi === fl - 1 && file[fi] === '';
+            /* c8 ignore start */
+        }
+        else {
+            // should be unreachable.
+            throw new Error('wtf?');
+        }
+        /* c8 ignore stop */
+    }
+    braceExpand() {
+        return braceExpand(this.pattern, this.options);
+    }
+    parse(pattern) {
+        assertValidPattern(pattern);
+        const options = this.options;
+        // shortcuts
+        if (pattern === '**')
+            return GLOBSTAR;
+        if (pattern === '')
+            return '';
+        // far and away, the most common glob pattern parts are
+        // *, *.*, and *.  Add a fast check method for those.
+        let m;
+        let fastTest = null;
+        if ((m = pattern.match(starRE))) {
+            fastTest = options.dot ? starTestDot : starTest;
+        }
+        else if ((m = pattern.match(starDotExtRE))) {
+            fastTest = (options.nocase
+                ? options.dot
+                    ? starDotExtTestNocaseDot
+                    : starDotExtTestNocase
+                : options.dot
+                    ? starDotExtTestDot
+                    : starDotExtTest)(m[1]);
+        }
+        else if ((m = pattern.match(qmarksRE))) {
+            fastTest = (options.nocase
+                ? options.dot
+                    ? qmarksTestNocaseDot
+                    : qmarksTestNocase
+                : options.dot
+                    ? qmarksTestDot
+                    : qmarksTest)(m);
+        }
+        else if ((m = pattern.match(starDotStarRE))) {
+            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
+        }
+        else if ((m = pattern.match(dotStarRE))) {
+            fastTest = dotStarTest;
+        }
+        const re = AST.fromGlob(pattern, this.options).toMMPattern();
+        if (fastTest && typeof re === 'object') {
+            // Avoids overriding in frozen environments
+            Reflect.defineProperty(re, 'test', { value: fastTest });
+        }
+        return re;
+    }
+    makeRe() {
+        if (this.regexp || this.regexp === false)
+            return this.regexp;
+        // at this point, this.set is a 2d array of partial
+        // pattern strings, or "**".
+        //
+        // It's better to use .match().  This function shouldn't
+        // be used, really, but it's pretty convenient sometimes,
+        // when you just want to work with a regex.
+        const set = this.set;
+        if (!set.length) {
+            this.regexp = false;
+            return this.regexp;
+        }
+        const options = this.options;
+        const twoStar = options.noglobstar
+            ? star
+            : options.dot
+                ? twoStarDot
+                : twoStarNoDot;
+        const flags = new Set(options.nocase ? ['i'] : []);
+        // regexpify non-globstar patterns
+        // if ** is only item, then we just do one twoStar
+        // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
+        // if ** is last, append (\/twoStar|) to previous
+        // if ** is in the middle, append (\/|\/twoStar\/) to previous
+        // then filter out GLOBSTAR symbols
+        let re = set
+            .map(pattern => {
+            const pp = pattern.map(p => {
+                if (p instanceof RegExp) {
+                    for (const f of p.flags.split(''))
+                        flags.add(f);
+                }
+                return typeof p === 'string'
+                    ? regExpEscape(p)
+                    : p === GLOBSTAR
+                        ? GLOBSTAR
+                        : p._src;
+            });
+            pp.forEach((p, i) => {
+                const next = pp[i + 1];
+                const prev = pp[i - 1];
+                if (p !== GLOBSTAR || prev === GLOBSTAR) {
+                    return;
+                }
+                if (prev === undefined) {
+                    if (next !== undefined && next !== GLOBSTAR) {
+                        pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
+                    }
+                    else {
+                        pp[i] = twoStar;
+                    }
+                }
+                else if (next === undefined) {
+                    pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
+                }
+                else if (next !== GLOBSTAR) {
+                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
+                    pp[i + 1] = GLOBSTAR;
+                }
+            });
+            return pp.filter(p => p !== GLOBSTAR).join('/');
+        })
+            .join('|');
+        // need to wrap in parens if we had more than one thing with |,
+        // otherwise only the first will be anchored to ^ and the last to $
+        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
+        // must match entire pattern
+        // ending in a * or ** will make it less strict.
+        re = '^' + open + re + close + '$';
+        // can match anything, as long as it's not this.
+        if (this.negate)
+            re = '^(?!' + re + ').+$';
+        try {
+            this.regexp = new RegExp(re, [...flags].join(''));
+            /* c8 ignore start */
+        }
+        catch (ex) {
+            // should be impossible
+            this.regexp = false;
+        }
+        /* c8 ignore stop */
+        return this.regexp;
+    }
+    slashSplit(p) {
+        // if p starts with // on windows, we preserve that
+        // so that UNC paths aren't broken.  Otherwise, any number of
+        // / characters are coalesced into one, unless
+        // preserveMultipleSlashes is set to true.
+        if (this.preserveMultipleSlashes) {
+            return p.split('/');
+        }
+        else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
+            // add an extra '' for the one we lose
+            return ['', ...p.split(/\/+/)];
+        }
+        else {
+            return p.split(/\/+/);
+        }
+    }
+    match(f, partial = this.partial) {
+        this.debug('match', f, this.pattern);
+        // short-circuit in the case of busted things.
+        // comments, etc.
+        if (this.comment) {
+            return false;
+        }
+        if (this.empty) {
+            return f === '';
+        }
+        if (f === '/' && partial) {
+            return true;
+        }
+        const options = this.options;
+        // windows: need to use /, not \
+        if (this.isWindows) {
+            f = f.split('\\').join('/');
+        }
+        // treat the test path as a set of pathparts.
+        const ff = this.slashSplit(f);
+        this.debug(this.pattern, 'split', ff);
+        // just ONE of the pattern sets in this.set needs to match
+        // in order for it to be valid.  If negating, then just one
+        // match means that we have failed.
+        // Either way, return on the first hit.
+        const set = this.set;
+        this.debug(this.pattern, 'set', set);
+        // Find the basename of the path by looking for the last non-empty segment
+        let filename = ff[ff.length - 1];
+        if (!filename) {
+            for (let i = ff.length - 2; !filename && i >= 0; i--) {
+                filename = ff[i];
+            }
+        }
+        for (let i = 0; i < set.length; i++) {
+            const pattern = set[i];
+            let file = ff;
+            if (options.matchBase && pattern.length === 1) {
+                file = [filename];
+            }
+            const hit = this.matchOne(file, pattern, partial);
+            if (hit) {
+                if (options.flipNegate) {
+                    return true;
+                }
+                return !this.negate;
+            }
+        }
+        // didn't get any hits.  this is success if it's a negative
+        // pattern, failure otherwise.
+        if (options.flipNegate) {
+            return false;
+        }
+        return this.negate;
+    }
+    static defaults(def) {
+        return minimatch.defaults(def).Minimatch;
+    }
+}
+/* c8 ignore start */
+export { AST } from './ast.js';
+export { escape } from './escape.js';
+export { unescape } from './unescape.js';
+/* c8 ignore stop */
+minimatch.AST = AST;
+minimatch.Minimatch = Minimatch;
+minimatch.escape = escape;
+minimatch.unescape = unescape;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/index.js.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/index.js.map
new file mode 100644
index 0000000..ff471c7
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAsCxC,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;QACnD,OAAO,KAAK,CAAA;KACb;IAED,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC,CAAA;AAED,wDAAwD;AACxD,MAAM,YAAY,GAAG,uBAAuB,CAAA;AAC5C,MAAM,cA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-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\ntype Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  nobrace?: boolean\n  nocomment?: boolean\n  nonegate?: boolean\n  debug?: boolean\n  noglobstar?: boolean\n  noext?: boolean\n  nonull?: boolean\n  windowsPathsNoEscape?: boolean\n  allowWindowsEscape?: boolean\n  partial?: boolean\n  dot?: boolean\n  nocase?: boolean\n  nocaseMagicOnly?: boolean\n  magicalBraces?: boolean\n  matchBase?: boolean\n  flipNegate?: boolean\n  preserveMultipleSlashes?: boolean\n  optimizationLevel?: number\n  platform?: Platform\n  windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process\n    ? (typeof process.env === 'object' &&\n        process.env &&\n        process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n      process.platform\n    : 'posix'\n) as Platform\ntype Sep = '\\\\' | '/'\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {}\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n      orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined\n        ? options.windowsNoMagicRoot\n        : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: any[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      this.debug = (...args: any[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn all ** into *\n    if (this.options.noglobstar) {\n      for (let i = 0; i < globParts.length; i++) {\n        for (let j = 0; j < globParts[i].length; j++) {\n          if (globParts[i][j] === '**') {\n            globParts[i][j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n    do {\n      didSomething = false\n      // 
// -> 
/\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
/

/../ ->

/\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
 is 1 or more portions\n  //  is 1 or more portions\n  // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n  // 
/

/../ ->

/\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
// -> 
/\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
/

/../ ->

/\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
/*/,
/

/} ->

/*/\n  // {
/,
/} -> 
/\n  // {
/**/,
/} -> 
/**/\n  //\n  // {
/**/,
/**/

/} ->

/**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice(pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // dont' need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n          ? starDotExtTestDot\n          : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n          ? qmarksTestDot\n          : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n      ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n            ? GLOBSTAR\n            : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        return pp.filter(p => p !== GLOBSTAR).join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/package.json b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/package.json
new file mode 100644
index 0000000..0fee73a
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/package.json
@@ -0,0 +1,3 @@
+{
+  "type": "module"
+}
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/unescape.d.ts b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/unescape.d.ts
new file mode 100644
index 0000000..1548702
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/unescape.d.ts
@@ -0,0 +1,17 @@
+import { MinimatchOptions } from './index.js';
+/**
+ * Un-escape a string that has been escaped with {@link escape}.
+ *
+ * If the {@link windowsPathsNoEscape} option is used, then square-brace
+ * escapes are removed, but not backslash escapes.  For example, it will turn
+ * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
+ * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
+ *
+ * When `windowsPathsNoEscape` is not set, then both brace escapes and
+ * backslash escapes are removed.
+ *
+ * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
+ * or unescaped.
+ */
+export declare const unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
+//# sourceMappingURL=unescape.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/unescape.d.ts.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/unescape.d.ts.map
new file mode 100644
index 0000000..a89a54b
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/unescape.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,MAChB,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAKlD,CAAA"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/unescape.js b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/unescape.js
new file mode 100644
index 0000000..4f347d2
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/unescape.js
@@ -0,0 +1,20 @@
+/**
+ * Un-escape a string that has been escaped with {@link escape}.
+ *
+ * If the {@link windowsPathsNoEscape} option is used, then square-brace
+ * escapes are removed, but not backslash escapes.  For example, it will turn
+ * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
+ * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
+ *
+ * When `windowsPathsNoEscape` is not set, then both brace escapes and
+ * backslash escapes are removed.
+ *
+ * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
+ * or unescaped.
+ */
+export const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
+    return windowsPathsNoEscape
+        ? s.replace(/\[([^\/\\])\]/g, '$1')
+        : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1');
+};
+//# sourceMappingURL=unescape.js.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/unescape.js.map b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/unescape.js.map
new file mode 100644
index 0000000..1bd8ca3
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/esm/unescape.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;QACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAChF,CAAC,CAAA","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link windowsPathsNoEscape} option is used, then square-brace\n * escapes are removed, but not backslash escapes.  For example, it will turn\n * the string `'[*]'` into `*`, but it will not turn `'\\\\*'` into `'*'`,\n * becuase `\\` is a path separator in `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both brace escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n */\nexport const unescape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n  }: Pick = {}\n) => {\n  return windowsPathsNoEscape\n    ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n    : s.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2').replace(/\\\\([^\\/])/g, '$1')\n}\n"]}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/package.json b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/package.json
new file mode 100644
index 0000000..323ecee
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/package.json
@@ -0,0 +1,82 @@
+{
+  "author": "Isaac Z. Schlueter  (http://blog.izs.me)",
+  "name": "minimatch",
+  "description": "a glob matcher in javascript",
+  "version": "9.0.5",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/minimatch.git"
+  },
+  "main": "./dist/commonjs/index.js",
+  "types": "./dist/commonjs/index.d.ts",
+  "exports": {
+    "./package.json": "./package.json",
+    ".": {
+      "import": {
+        "types": "./dist/esm/index.d.ts",
+        "default": "./dist/esm/index.js"
+      },
+      "require": {
+        "types": "./dist/commonjs/index.d.ts",
+        "default": "./dist/commonjs/index.js"
+      }
+    }
+  },
+  "files": [
+    "dist"
+  ],
+  "scripts": {
+    "preversion": "npm test",
+    "postversion": "npm publish",
+    "prepublishOnly": "git push origin --follow-tags",
+    "prepare": "tshy",
+    "pretest": "npm run prepare",
+    "presnap": "npm run prepare",
+    "test": "tap",
+    "snap": "tap",
+    "format": "prettier --write . --loglevel warn",
+    "benchmark": "node benchmark/index.js",
+    "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts"
+  },
+  "prettier": {
+    "semi": false,
+    "printWidth": 80,
+    "tabWidth": 2,
+    "useTabs": false,
+    "singleQuote": true,
+    "jsxSingleQuote": false,
+    "bracketSameLine": true,
+    "arrowParens": "avoid",
+    "endOfLine": "lf"
+  },
+  "engines": {
+    "node": ">=16 || 14 >=14.17"
+  },
+  "dependencies": {
+    "brace-expansion": "^2.0.1"
+  },
+  "devDependencies": {
+    "@types/brace-expansion": "^1.1.0",
+    "@types/node": "^18.15.11",
+    "@types/tap": "^15.0.8",
+    "eslint-config-prettier": "^8.6.0",
+    "mkdirp": "1",
+    "prettier": "^2.8.2",
+    "tap": "^18.7.2",
+    "ts-node": "^10.9.1",
+    "tshy": "^1.12.0",
+    "typedoc": "^0.23.21",
+    "typescript": "^4.9.3"
+  },
+  "funding": {
+    "url": "https://github.com/sponsors/isaacs"
+  },
+  "license": "ISC",
+  "tshy": {
+    "exports": {
+      "./package.json": "./package.json",
+      ".": "./src/index.ts"
+    }
+  },
+  "type": "module"
+}
diff --git a/slider/node_modules/@typescript-eslint/typescript-estree/package.json b/slider/node_modules/@typescript-eslint/typescript-estree/package.json
new file mode 100644
index 0000000..80fc3ad
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/typescript-estree/package.json
@@ -0,0 +1,93 @@
+{
+  "name": "@typescript-eslint/typescript-estree",
+  "version": "8.44.1",
+  "description": "A parser that converts TypeScript source code into an ESTree compatible form",
+  "files": [
+    "dist",
+    "!*.tsbuildinfo",
+    "README.md",
+    "LICENSE"
+  ],
+  "type": "commonjs",
+  "exports": {
+    ".": {
+      "types": "./dist/index.d.ts",
+      "default": "./dist/index.js"
+    },
+    "./package.json": "./package.json",
+    "./use-at-your-own-risk": {
+      "types": "./dist/use-at-your-own-risk.d.ts",
+      "default": "./dist/use-at-your-own-risk.js"
+    }
+  },
+  "types": "./dist/index.d.ts",
+  "engines": {
+    "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/typescript-eslint/typescript-eslint.git",
+    "directory": "packages/typescript-estree"
+  },
+  "bugs": {
+    "url": "https://github.com/typescript-eslint/typescript-eslint/issues"
+  },
+  "homepage": "https://typescript-eslint.io/packages/typescript-estree",
+  "license": "MIT",
+  "keywords": [
+    "ast",
+    "estree",
+    "ecmascript",
+    "javascript",
+    "typescript",
+    "parser",
+    "syntax"
+  ],
+  "scripts": {
+    "build": "yarn run -BT nx build",
+    "clean": "rimraf dist/ coverage/",
+    "format": "yarn run -T format",
+    "lint": "yarn run -BT nx lint",
+    "test": "yarn run -BT nx test",
+    "typecheck": "yarn run -BT nx typecheck"
+  },
+  "dependencies": {
+    "@typescript-eslint/project-service": "8.44.1",
+    "@typescript-eslint/tsconfig-utils": "8.44.1",
+    "@typescript-eslint/types": "8.44.1",
+    "@typescript-eslint/visitor-keys": "8.44.1",
+    "debug": "^4.3.4",
+    "fast-glob": "^3.3.2",
+    "is-glob": "^4.0.3",
+    "minimatch": "^9.0.4",
+    "semver": "^7.6.0",
+    "ts-api-utils": "^2.1.0"
+  },
+  "devDependencies": {
+    "@types/is-glob": "^4.0.4",
+    "@vitest/coverage-v8": "^3.1.3",
+    "eslint": "*",
+    "glob": "*",
+    "rimraf": "*",
+    "typescript": "*",
+    "vitest": "^3.1.3"
+  },
+  "peerDependencies": {
+    "typescript": ">=4.8.4 <6.0.0"
+  },
+  "funding": {
+    "type": "opencollective",
+    "url": "https://opencollective.com/typescript-eslint"
+  },
+  "nx": {
+    "name": "typescript-estree",
+    "includedScripts": [
+      "clean"
+    ],
+    "targets": {
+      "lint": {
+        "command": "eslint"
+      }
+    }
+  }
+}
diff --git a/slider/node_modules/@typescript-eslint/utils/LICENSE b/slider/node_modules/@typescript-eslint/utils/LICENSE
new file mode 100644
index 0000000..5de6cb6
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 typescript-eslint and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/slider/node_modules/@typescript-eslint/utils/README.md b/slider/node_modules/@typescript-eslint/utils/README.md
new file mode 100644
index 0000000..9aed73d
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/README.md
@@ -0,0 +1,12 @@
+# `@typescript-eslint/utils`
+
+> Utilities for working with TypeScript + ESLint together.
+
+[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/utils.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/utils)
+[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/utils.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/utils)
+
+👉 See **https://typescript-eslint.io/packages/utils** for documentation on this package.
+
+> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
+
+
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts
new file mode 100644
index 0000000..cd1fec3
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts
@@ -0,0 +1,48 @@
+interface PatternMatcher {
+    /**
+     * Replace all matched parts by a given replacer.
+     *
+     * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#matcher-symbol-replace}
+     * @example
+     * const { PatternMatcher } = require("eslint-utils")
+     * const matcher = new PatternMatcher(/\\p{Script=Greek}/g)
+     *
+     * module.exports = {
+     *     meta: {},
+     *     create(context) {
+     *         return {
+     *             "Literal[regex]"(node) {
+     *                 const replacedPattern = node.regex.pattern.replace(
+     *                     matcher,
+     *                     "[\\u0370-\\u0373\\u0375-\\u0377\\u037A-\\u037D\\u037F\\u0384\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03E1\\u03F0-\\u03FF\\u1D26-\\u1D2A\\u1D5D-\\u1D61\\u1D66-\\u1D6A\\u1DBF\\u1F00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FC4\\u1FC6-\\u1FD3\\u1FD6-\\u1FDB\\u1FDD-\\u1FEF\\u1FF2-\\u1FF4\\u1FF6-\\u1FFE\\u2126\\uAB65]|\\uD800[\\uDD40-\\uDD8E\\uDDA0]|\\uD834[\\uDE00-\\uDE45]"
+     *                 )
+     *             },
+     *         }
+     *     },
+     * }
+     */
+    [Symbol.replace](str: string, replacer: string | ((...strs: string[]) => string)): string;
+    /**
+     * Iterate all matched parts in a given string.
+     *
+     * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#matcher-execall}
+     */
+    execAll(str: string): IterableIterator;
+    /**
+     * Check whether this pattern matches a given string or not.
+     *
+     * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#matcher-test}
+     */
+    test(str: string): boolean;
+}
+/**
+ * The class to find a pattern in strings as handling escape sequences.
+ * It ignores the found pattern if it's escaped with `\`.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#patternmatcher-class}
+ */
+export declare const PatternMatcher: new (pattern: RegExp, options?: {
+    escaped?: boolean;
+}) => PatternMatcher;
+export {};
+//# sourceMappingURL=PatternMatcher.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts.map
new file mode 100644
index 0000000..cea0509
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"PatternMatcher.d.ts","sourceRoot":"","sources":["../../../src/ast-utils/eslint-utils/PatternMatcher.ts"],"names":[],"mappings":"AAEA,UAAU,cAAc;IACtB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,CAAC,MAAM,CAAC,OAAO,CAAC,CACd,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC,GACjD,MAAM,CAAC;IAEV;;;;OAIG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAExD;;;;OAIG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAiC,KAC1D,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,KAC5B,cAAc,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js
new file mode 100644
index 0000000..4bf0311
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js
@@ -0,0 +1,44 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+    Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+    o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PatternMatcher = void 0;
+const eslintUtils = __importStar(require("@eslint-community/eslint-utils"));
+/**
+ * The class to find a pattern in strings as handling escape sequences.
+ * It ignores the found pattern if it's escaped with `\`.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#patternmatcher-class}
+ */
+exports.PatternMatcher = eslintUtils.PatternMatcher;
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts
new file mode 100644
index 0000000..5cc1bcd
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts
@@ -0,0 +1,76 @@
+import type * as TSESLint from '../../ts-eslint';
+import type { TSESTree } from '../../ts-estree';
+declare const ReferenceTrackerREAD: unique symbol;
+declare const ReferenceTrackerCALL: unique symbol;
+declare const ReferenceTrackerCONSTRUCT: unique symbol;
+declare const ReferenceTrackerESM: unique symbol;
+interface ReferenceTracker {
+    /**
+     * Iterate the references that the given `traceMap` determined.
+     * This method starts to search from `require()` expression.
+     *
+     * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#tracker-iteratecjsreferences}
+     */
+    iterateCjsReferences(traceMap: ReferenceTracker.TraceMap): IterableIterator>;
+    /**
+     * Iterate the references that the given `traceMap` determined.
+     * This method starts to search from `import`/`export` declarations.
+     *
+     * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#tracker-iterateesmreferences}
+     */
+    iterateEsmReferences(traceMap: ReferenceTracker.TraceMap): IterableIterator>;
+    /**
+     * Iterate the references that the given `traceMap` determined.
+     * This method starts to search from global variables.
+     *
+     * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#tracker-iterateglobalreferences}
+     */
+    iterateGlobalReferences(traceMap: ReferenceTracker.TraceMap): IterableIterator>;
+}
+interface ReferenceTrackerStatic {
+    readonly CALL: typeof ReferenceTrackerCALL;
+    readonly CONSTRUCT: typeof ReferenceTrackerCONSTRUCT;
+    readonly ESM: typeof ReferenceTrackerESM;
+    new (globalScope: TSESLint.Scope.Scope, options?: {
+        /**
+         * The name list of Global Object. Optional. Default is `["global", "globalThis", "self", "window"]`.
+         */
+        globalObjectNames?: readonly string[];
+        /**
+         * The mode which determines how the `tracker.iterateEsmReferences()` method scans CommonJS modules.
+         * If this is `"strict"`, the method binds CommonJS modules to the default export. Otherwise, the method binds
+         * CommonJS modules to both the default export and named exports. Optional. Default is `"strict"`.
+         */
+        mode?: 'legacy' | 'strict';
+    }): ReferenceTracker;
+    readonly READ: typeof ReferenceTrackerREAD;
+}
+declare namespace ReferenceTracker {
+    type READ = ReferenceTrackerStatic['READ'];
+    type CALL = ReferenceTrackerStatic['CALL'];
+    type CONSTRUCT = ReferenceTrackerStatic['CONSTRUCT'];
+    type ESM = ReferenceTrackerStatic['ESM'];
+    type ReferenceType = CALL | CONSTRUCT | READ;
+    type TraceMap = Record>;
+    interface TraceMapElement {
+        [key: string]: TraceMapElement;
+        [ReferenceTrackerCALL]?: T;
+        [ReferenceTrackerCONSTRUCT]?: T;
+        [ReferenceTrackerESM]?: true;
+        [ReferenceTrackerREAD]?: T;
+    }
+    interface FoundReference {
+        info: T;
+        node: TSESTree.Node;
+        path: readonly string[];
+        type: ReferenceType;
+    }
+}
+/**
+ * The tracker for references. This provides reference tracking for global variables, CommonJS modules, and ES modules.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#referencetracker-class}
+ */
+export declare const ReferenceTracker: ReferenceTrackerStatic;
+export {};
+//# sourceMappingURL=ReferenceTracker.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts.map
new file mode 100644
index 0000000..28acd99
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ReferenceTracker.d.ts","sourceRoot":"","sources":["../../../src/ast-utils/eslint-utils/ReferenceTracker.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,QAAA,MAAM,oBAAoB,EAAE,OAAO,MAA0C,CAAC;AAC9E,QAAA,MAAM,oBAAoB,EAAE,OAAO,MAA0C,CAAC;AAC9E,QAAA,MAAM,yBAAyB,EAAE,OAAO,MACA,CAAC;AACzC,QAAA,MAAM,mBAAmB,EAAE,OAAO,MAAyC,CAAC;AAE5E,UAAU,gBAAgB;IACxB;;;;;OAKG;IACH,oBAAoB,CAAC,CAAC,EACpB,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,GACrC,gBAAgB,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAExD;;;;;OAKG;IACH,oBAAoB,CAAC,CAAC,EACpB,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,GACrC,gBAAgB,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAExD;;;;;OAKG;IACH,uBAAuB,CAAC,CAAC,EACvB,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,GACrC,gBAAgB,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;CACzD;AACD,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,IAAI,EAAE,OAAO,oBAAoB,CAAC;IAC3C,QAAQ,CAAC,SAAS,EAAE,OAAO,yBAAyB,CAAC;IACrD,QAA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AAI,EAAE,aAAa,CAAC;KACrB;CACF;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EACK,sBAAsB,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js
new file mode 100644
index 0000000..508c0ef
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js
@@ -0,0 +1,48 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+    Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+    o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ReferenceTracker = void 0;
+/* eslint-disable @typescript-eslint/no-namespace */
+const eslintUtils = __importStar(require("@eslint-community/eslint-utils"));
+const ReferenceTrackerREAD = eslintUtils.ReferenceTracker.READ;
+const ReferenceTrackerCALL = eslintUtils.ReferenceTracker.CALL;
+const ReferenceTrackerCONSTRUCT = eslintUtils.ReferenceTracker.CONSTRUCT;
+const ReferenceTrackerESM = eslintUtils.ReferenceTracker.ESM;
+/**
+ * The tracker for references. This provides reference tracking for global variables, CommonJS modules, and ES modules.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#referencetracker-class}
+ */
+exports.ReferenceTracker = eslintUtils.ReferenceTracker;
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts
new file mode 100644
index 0000000..866f0d6
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts
@@ -0,0 +1,84 @@
+import type * as TSESLint from '../../ts-eslint';
+import type { TSESTree } from '../../ts-estree';
+/**
+ * Get the proper location of a given function node to report.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getfunctionheadlocation}
+ */
+export declare const getFunctionHeadLocation: (node: TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression, sourceCode: TSESLint.SourceCode) => TSESTree.SourceLocation;
+/**
+ * Get the name and kind of a given function node.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getfunctionnamewithkind}
+ */
+export declare const getFunctionNameWithKind: (node: TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression, sourceCode?: TSESLint.SourceCode) => string;
+/**
+ * Get the property name of a given property node.
+ * If the node is a computed property, this tries to compute the property name by the getStringIfConstant function.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getpropertyname}
+ * @returns The property name of the node. If the property name is not constant then it returns `null`.
+ */
+export declare const getPropertyName: (node: TSESTree.MemberExpression | TSESTree.MethodDefinition | TSESTree.Property | TSESTree.PropertyDefinition, initialScope?: TSESLint.Scope.Scope) => string | null;
+/**
+ * Get the value of a given node if it can decide the value statically.
+ * If the 2nd parameter `initialScope` was given, this function tries to resolve identifier references which are in the
+ * given node as much as possible. In the resolving way, it does on the assumption that built-in global objects have
+ * not been modified.
+ * For example, it considers `Symbol.iterator`, `Symbol.for('k')`, ` String.raw``hello`` `, and `Object.freeze({a: 1}).a` as static, but `Symbol('k')` is not static.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstaticvalue}
+ * @returns The `{ value: any }` shaped object. The `value` property is the static value. If it couldn't compute the
+ * static value of the node, it returns `null`.
+ */
+export declare const getStaticValue: (node: TSESTree.Node, initialScope?: TSESLint.Scope.Scope) => {
+    value: unknown;
+} | null;
+/**
+ * Get the string value of a given node.
+ * This function is a tiny wrapper of the getStaticValue function.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstringifconstant}
+ */
+export declare const getStringIfConstant: (node: TSESTree.Node, initialScope?: TSESLint.Scope.Scope) => string | null;
+/**
+ * Check whether a given node has any side effect or not.
+ * The side effect means that it may modify a certain variable or object member. This function considers the node which
+ * contains the following types as the node which has side effects:
+ * - `AssignmentExpression`
+ * - `AwaitExpression`
+ * - `CallExpression`
+ * - `ImportExpression`
+ * - `NewExpression`
+ * - `UnaryExpression([operator = "delete"])`
+ * - `UpdateExpression`
+ * - `YieldExpression`
+ * - When `options.considerGetters` is `true`:
+ *   - `MemberExpression`
+ * - When `options.considerImplicitTypeConversion` is `true`:
+ *   - `BinaryExpression([operator = "==" | "!=" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in"])`
+ *   - `MemberExpression([computed = true])`
+ *   - `MethodDefinition([computed = true])`
+ *   - `Property([computed = true])`
+ *   - `UnaryExpression([operator = "-" | "+" | "!" | "~"])`
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#hassideeffect}
+ */
+export declare const hasSideEffect: (node: TSESTree.Node, sourceCode: TSESLint.SourceCode, options?: {
+    considerGetters?: boolean;
+    considerImplicitTypeConversion?: boolean;
+}) => boolean;
+export declare const isParenthesized: {
+    (times: number, node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean;
+    /**
+     * Check whether a given node is parenthesized or not.
+     * This function detects it correctly even if it's parenthesized by specific syntax.
+     *
+     * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#isparenthesized}
+     * @returns `true` if the node is parenthesized.
+     * If `times` was given, it returns `true` only if the node is parenthesized the `times` times.
+     * For example, `isParenthesized(2, node, sourceCode)` returns true for `((foo))`, but not for `(foo)`.
+     */
+    (node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean;
+};
+//# sourceMappingURL=astUtilities.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts.map
new file mode 100644
index 0000000..5bdd974
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"astUtilities.d.ts","sourceRoot":"","sources":["../../../src/ast-utils/eslint-utils/astUtilities.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAA0C,CAC5E,IAAI,EACA,QAAQ,CAAC,uBAAuB,GAChC,QAAQ,CAAC,mBAAmB,GAC5B,QAAQ,CAAC,kBAAkB,EAC/B,UAAU,EAAE,QAAQ,CAAC,UAAU,KAC5B,QAAQ,CAAC,cAAc,CAAC;AAE7B;;;;GAIG;AACH,eA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B,OAAO,CAAC;IAEX;;;;;;;;OAQG;IACH,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,UAAU,GAAG,OAAO,CAAC;CACjE,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js
new file mode 100644
index 0000000..ab8732b
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js
@@ -0,0 +1,101 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+    Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+    o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isParenthesized = exports.hasSideEffect = exports.getStringIfConstant = exports.getStaticValue = exports.getPropertyName = exports.getFunctionNameWithKind = exports.getFunctionHeadLocation = void 0;
+const eslintUtils = __importStar(require("@eslint-community/eslint-utils"));
+/**
+ * Get the proper location of a given function node to report.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getfunctionheadlocation}
+ */
+exports.getFunctionHeadLocation = eslintUtils.getFunctionHeadLocation;
+/**
+ * Get the name and kind of a given function node.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getfunctionnamewithkind}
+ */
+exports.getFunctionNameWithKind = eslintUtils.getFunctionNameWithKind;
+/**
+ * Get the property name of a given property node.
+ * If the node is a computed property, this tries to compute the property name by the getStringIfConstant function.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getpropertyname}
+ * @returns The property name of the node. If the property name is not constant then it returns `null`.
+ */
+exports.getPropertyName = eslintUtils.getPropertyName;
+/**
+ * Get the value of a given node if it can decide the value statically.
+ * If the 2nd parameter `initialScope` was given, this function tries to resolve identifier references which are in the
+ * given node as much as possible. In the resolving way, it does on the assumption that built-in global objects have
+ * not been modified.
+ * For example, it considers `Symbol.iterator`, `Symbol.for('k')`, ` String.raw``hello`` `, and `Object.freeze({a: 1}).a` as static, but `Symbol('k')` is not static.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstaticvalue}
+ * @returns The `{ value: any }` shaped object. The `value` property is the static value. If it couldn't compute the
+ * static value of the node, it returns `null`.
+ */
+exports.getStaticValue = eslintUtils.getStaticValue;
+/**
+ * Get the string value of a given node.
+ * This function is a tiny wrapper of the getStaticValue function.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstringifconstant}
+ */
+exports.getStringIfConstant = eslintUtils.getStringIfConstant;
+/**
+ * Check whether a given node has any side effect or not.
+ * The side effect means that it may modify a certain variable or object member. This function considers the node which
+ * contains the following types as the node which has side effects:
+ * - `AssignmentExpression`
+ * - `AwaitExpression`
+ * - `CallExpression`
+ * - `ImportExpression`
+ * - `NewExpression`
+ * - `UnaryExpression([operator = "delete"])`
+ * - `UpdateExpression`
+ * - `YieldExpression`
+ * - When `options.considerGetters` is `true`:
+ *   - `MemberExpression`
+ * - When `options.considerImplicitTypeConversion` is `true`:
+ *   - `BinaryExpression([operator = "==" | "!=" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in"])`
+ *   - `MemberExpression([computed = true])`
+ *   - `MethodDefinition([computed = true])`
+ *   - `Property([computed = true])`
+ *   - `UnaryExpression([operator = "-" | "+" | "!" | "~"])`
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#hassideeffect}
+ */
+exports.hasSideEffect = eslintUtils.hasSideEffect;
+exports.isParenthesized = eslintUtils.isParenthesized;
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.d.ts
new file mode 100644
index 0000000..045d06c
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.d.ts
@@ -0,0 +1,6 @@
+export * from './astUtilities';
+export * from './PatternMatcher';
+export * from './predicates';
+export * from './ReferenceTracker';
+export * from './scopeAnalysis';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.d.ts.map
new file mode 100644
index 0000000..3d38680
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ast-utils/eslint-utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.js b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.js
new file mode 100644
index 0000000..3e8af1c
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.js
@@ -0,0 +1,21 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./astUtilities"), exports);
+__exportStar(require("./PatternMatcher"), exports);
+__exportStar(require("./predicates"), exports);
+__exportStar(require("./ReferenceTracker"), exports);
+__exportStar(require("./scopeAnalysis"), exports);
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts
new file mode 100644
index 0000000..b42460c
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts
@@ -0,0 +1,32 @@
+import type { TSESTree } from '../../ts-estree';
+type IsSpecificTokenFunction = (token: TSESTree.Token) => token is SpecificToken;
+type IsNotSpecificTokenFunction = (token: TSESTree.Token) => token is Exclude;
+type PunctuatorTokenWithValue = {
+    value: Value;
+} & TSESTree.PunctuatorToken;
+type IsPunctuatorTokenWithValueFunction = IsSpecificTokenFunction>;
+type IsNotPunctuatorTokenWithValueFunction = IsNotSpecificTokenFunction>;
+export declare const isArrowToken: IsPunctuatorTokenWithValueFunction<"=>">;
+export declare const isNotArrowToken: IsNotPunctuatorTokenWithValueFunction<"=>">;
+export declare const isClosingBraceToken: IsPunctuatorTokenWithValueFunction<"}">;
+export declare const isNotClosingBraceToken: IsNotPunctuatorTokenWithValueFunction<"}">;
+export declare const isClosingBracketToken: IsPunctuatorTokenWithValueFunction<"]">;
+export declare const isNotClosingBracketToken: IsNotPunctuatorTokenWithValueFunction<"]">;
+export declare const isClosingParenToken: IsPunctuatorTokenWithValueFunction<")">;
+export declare const isNotClosingParenToken: IsNotPunctuatorTokenWithValueFunction<")">;
+export declare const isColonToken: IsPunctuatorTokenWithValueFunction<":">;
+export declare const isNotColonToken: IsNotPunctuatorTokenWithValueFunction<":">;
+export declare const isCommaToken: IsPunctuatorTokenWithValueFunction<",">;
+export declare const isNotCommaToken: IsNotPunctuatorTokenWithValueFunction<",">;
+export declare const isCommentToken: IsSpecificTokenFunction;
+export declare const isNotCommentToken: IsNotSpecificTokenFunction;
+export declare const isOpeningBraceToken: IsPunctuatorTokenWithValueFunction<"{">;
+export declare const isNotOpeningBraceToken: IsNotPunctuatorTokenWithValueFunction<"{">;
+export declare const isOpeningBracketToken: IsPunctuatorTokenWithValueFunction<"[">;
+export declare const isNotOpeningBracketToken: IsNotPunctuatorTokenWithValueFunction<"[">;
+export declare const isOpeningParenToken: IsPunctuatorTokenWithValueFunction<"(">;
+export declare const isNotOpeningParenToken: IsNotPunctuatorTokenWithValueFunction<"(">;
+export declare const isSemicolonToken: IsPunctuatorTokenWithValueFunction<";">;
+export declare const isNotSemicolonToken: IsNotPunctuatorTokenWithValueFunction<";">;
+export {};
+//# sourceMappingURL=predicates.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts.map
new file mode 100644
index 0000000..2dfc829
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../../src/ast-utils/eslint-utils/predicates.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,KAAK,uBAAuB,CAAC,aAAa,SAAS,QAAQ,CAAC,KAAK,IAAI,CACnE,KAAK,EAAE,QAAQ,CAAC,KAAK,KAClB,KAAK,IAAI,aAAa,CAAC;AAE5B,KAAK,0BAA0B,CAAC,aAAa,SAAS,QAAQ,CAAC,KAAK,IAAI,CACtE,KAAK,EAAE,QAAQ,CAAC,KAAK,KAClB,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AAErD,KAAK,wBAAwB,CAAC,KAAK,SAAS,MAAM,IAAI;IACpD,KAAK,EAAE,KAAK,CAAC;CACd,GAAG,QAAQ,CAAC,eAAe,CAAC;AAC7B,KAAK,kCAAkC,CAAC,KAAK,SAAS,MAAM,IAC1D,uBAAuB,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;AAC3D,KAAK,qCAAqC,CAAC,KAAK,SAAS,MAAM,IAC7D,0BAA0B,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;AAE9D,eAAO,MAAM,YAAY,EACK,kCAAkC,CAAC,IAAI,CAAC,CAAC;AACvE,eAAO,MAAM,eAAe,EACK,qCAAqC,CAAC,IAAI,CAAC,CAAC;AAE7E,eAAO,MAAM,mBAAmB,EACK,kCAAkC,CAAC,GAAG,CAAC,CAAC;AAC7E,eAAO,MAAM,sBAAsB,EACK,qCAAqC,CAAC,GAAG,CAAC,CAAC;AAEnF,eAAO,MAAM,qBAAq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_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js
new file mode 100644
index 0000000..75a6261
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js
@@ -0,0 +1,59 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+    Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+    o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isNotSemicolonToken = exports.isSemicolonToken = exports.isNotOpeningParenToken = exports.isOpeningParenToken = exports.isNotOpeningBracketToken = exports.isOpeningBracketToken = exports.isNotOpeningBraceToken = exports.isOpeningBraceToken = exports.isNotCommentToken = exports.isCommentToken = exports.isNotCommaToken = exports.isCommaToken = exports.isNotColonToken = exports.isColonToken = exports.isNotClosingParenToken = exports.isClosingParenToken = exports.isNotClosingBracketToken = exports.isClosingBracketToken = exports.isNotClosingBraceToken = exports.isClosingBraceToken = exports.isNotArrowToken = exports.isArrowToken = void 0;
+const eslintUtils = __importStar(require("@eslint-community/eslint-utils"));
+exports.isArrowToken = eslintUtils.isArrowToken;
+exports.isNotArrowToken = eslintUtils.isNotArrowToken;
+exports.isClosingBraceToken = eslintUtils.isClosingBraceToken;
+exports.isNotClosingBraceToken = eslintUtils.isNotClosingBraceToken;
+exports.isClosingBracketToken = eslintUtils.isClosingBracketToken;
+exports.isNotClosingBracketToken = eslintUtils.isNotClosingBracketToken;
+exports.isClosingParenToken = eslintUtils.isClosingParenToken;
+exports.isNotClosingParenToken = eslintUtils.isNotClosingParenToken;
+exports.isColonToken = eslintUtils.isColonToken;
+exports.isNotColonToken = eslintUtils.isNotColonToken;
+exports.isCommaToken = eslintUtils.isCommaToken;
+exports.isNotCommaToken = eslintUtils.isNotCommaToken;
+exports.isCommentToken = eslintUtils.isCommentToken;
+exports.isNotCommentToken = eslintUtils.isNotCommentToken;
+exports.isOpeningBraceToken = eslintUtils.isOpeningBraceToken;
+exports.isNotOpeningBraceToken = eslintUtils.isNotOpeningBraceToken;
+exports.isOpeningBracketToken = eslintUtils.isOpeningBracketToken;
+exports.isNotOpeningBracketToken = eslintUtils.isNotOpeningBracketToken;
+exports.isOpeningParenToken = eslintUtils.isOpeningParenToken;
+exports.isNotOpeningParenToken = eslintUtils.isNotOpeningParenToken;
+exports.isSemicolonToken = eslintUtils.isSemicolonToken;
+exports.isNotSemicolonToken = eslintUtils.isNotSemicolonToken;
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts
new file mode 100644
index 0000000..f5d3207
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts
@@ -0,0 +1,17 @@
+import type * as TSESLint from '../../ts-eslint';
+import type { TSESTree } from '../../ts-estree';
+/**
+ * Get the variable of a given name.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#findvariable}
+ */
+export declare const findVariable: (initialScope: TSESLint.Scope.Scope, nameOrNode: string | TSESTree.Identifier) => TSESLint.Scope.Variable | null;
+/**
+ * Get the innermost scope which contains a given node.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#getinnermostscope}
+ * @returns The innermost scope which contains the given node.
+ * If such scope doesn't exist then it returns the 1st argument `initialScope`.
+ */
+export declare const getInnermostScope: (initialScope: TSESLint.Scope.Scope, node: TSESTree.Node) => TSESLint.Scope.Scope;
+//# sourceMappingURL=scopeAnalysis.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts.map
new file mode 100644
index 0000000..f398880
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"scopeAnalysis.d.ts","sourceRoot":"","sources":["../../../src/ast-utils/eslint-utils/scopeAnalysis.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAA+B,CACtD,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,EAClC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC,UAAU,KACrC,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAoC,CAChE,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,EAClC,IAAI,EAAE,QAAQ,CAAC,IAAI,KAChB,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js
new file mode 100644
index 0000000..d6ccedf
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js
@@ -0,0 +1,51 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+    Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+    o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getInnermostScope = exports.findVariable = void 0;
+const eslintUtils = __importStar(require("@eslint-community/eslint-utils"));
+/**
+ * Get the variable of a given name.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#findvariable}
+ */
+exports.findVariable = eslintUtils.findVariable;
+/**
+ * Get the innermost scope which contains a given node.
+ *
+ * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#getinnermostscope}
+ * @returns The innermost scope which contains the given node.
+ * If such scope doesn't exist then it returns the 1st argument `initialScope`.
+ */
+exports.getInnermostScope = eslintUtils.getInnermostScope;
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts
new file mode 100644
index 0000000..e8de2ae
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts
@@ -0,0 +1,19 @@
+import type { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree } from '../ts-estree';
+export declare const isNodeOfType: (nodeType: NodeType) => (node: TSESTree.Node | null | undefined) => node is Extract;
+export declare const isNodeOfTypes: (nodeTypes: NodeTypes) => (node: TSESTree.Node | null | undefined) => node is Extract;
+export declare const isNodeOfTypeWithConditions: , Conditions extends Partial>(nodeType: NodeType, conditions: Conditions) => ((node: TSESTree.Node | null | undefined) => node is Conditions & ExtractedNode);
+export declare const isTokenOfTypeWithConditions: , Conditions extends Partial<{
+    type: TokenType;
+} & TSESTree.Token>>(tokenType: TokenType, conditions: Conditions) => ((token: TSESTree.Token | null | undefined) => token is Conditions & ExtractedToken);
+export declare const isNotTokenOfTypeWithConditions: , Conditions extends Partial>(tokenType: TokenType, conditions: Conditions) => ((token: TSESTree.Token | null | undefined) => token is Exclude);
+//# sourceMappingURL=helpers.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts.map
new file mode 100644
index 0000000..673b6f7
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/ast-utils/helpers.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AAC,CACF,KAAK,EAAE,QAAQ,CAAC,KAAK,GAAG,IAAI,GAAG,SAAS,KACrC,KAAK,IAAI,UAAU,GAAG,cAAc,CAUxC,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAEvC,SAAS,SAAS,eAAe,EACjC,cAAc,SAAS,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC,EACnE,UAAU,SAAS,OAAO,CAAC,cAAc,CAAC,EAE1C,WAAW,SAAS,EACpB,YAAY,UAAU,KACrB,CAAC,CACF,KAAK,EAAE,QAAQ,CAAC,KAAK,GAAG,IAAI,GAAG,SAAS,KACrC,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,cAAc,CAAC,CAEN,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.js b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.js
new file mode 100644
index 0000000..d74f8b6
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.js
@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isNotTokenOfTypeWithConditions = exports.isTokenOfTypeWithConditions = exports.isNodeOfTypeWithConditions = exports.isNodeOfTypes = exports.isNodeOfType = void 0;
+const isNodeOfType = (nodeType) => (node) => node?.type === nodeType;
+exports.isNodeOfType = isNodeOfType;
+const isNodeOfTypes = (nodeTypes) => (node) => !!node && nodeTypes.includes(node.type);
+exports.isNodeOfTypes = isNodeOfTypes;
+const isNodeOfTypeWithConditions = (nodeType, conditions) => {
+    const entries = Object.entries(conditions);
+    return (node) => node?.type === nodeType &&
+        entries.every(([key, value]) => node[key] === value);
+};
+exports.isNodeOfTypeWithConditions = isNodeOfTypeWithConditions;
+const isTokenOfTypeWithConditions = (tokenType, conditions) => {
+    const entries = Object.entries(conditions);
+    return (token) => token?.type === tokenType &&
+        entries.every(([key, value]) => token[key] === value);
+};
+exports.isTokenOfTypeWithConditions = isTokenOfTypeWithConditions;
+const isNotTokenOfTypeWithConditions = (tokenType, conditions) => (token) => !(0, exports.isTokenOfTypeWithConditions)(tokenType, conditions)(token);
+exports.isNotTokenOfTypeWithConditions = isNotTokenOfTypeWithConditions;
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/index.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/index.d.ts
new file mode 100644
index 0000000..6c813da
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/index.d.ts
@@ -0,0 +1,5 @@
+export * from './eslint-utils';
+export * from './helpers';
+export * from './misc';
+export * from './predicates';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/index.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/index.d.ts.map
new file mode 100644
index 0000000..3ab11fd
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ast-utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/index.js b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/index.js
new file mode 100644
index 0000000..aafcde0
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/index.js
@@ -0,0 +1,20 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./eslint-utils"), exports);
+__exportStar(require("./helpers"), exports);
+__exportStar(require("./misc"), exports);
+__exportStar(require("./predicates"), exports);
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.d.ts
new file mode 100644
index 0000000..a11940e
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.d.ts
@@ -0,0 +1,7 @@
+import type { TSESTree } from '../ts-estree';
+export declare const LINEBREAK_MATCHER: RegExp;
+/**
+ * Determines whether two adjacent tokens are on the same line
+ */
+export declare function isTokenOnSameLine(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token): boolean;
+//# sourceMappingURL=misc.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.d.ts.map
new file mode 100644
index 0000000..920bebb
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../src/ast-utils/misc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,eAAO,MAAM,iBAAiB,QAA4B,CAAC;AAE3D;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,KAAK,EACpC,KAAK,EAAE,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,KAAK,GACpC,OAAO,CAET"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.js b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.js
new file mode 100644
index 0000000..ff4df41
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.js
@@ -0,0 +1,11 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LINEBREAK_MATCHER = void 0;
+exports.isTokenOnSameLine = isTokenOnSameLine;
+exports.LINEBREAK_MATCHER = /\r\n|[\r\n\u2028\u2029]/;
+/**
+ * Determines whether two adjacent tokens are on the same line
+ */
+function isTokenOnSameLine(left, right) {
+    return left.loc.end.line === right.loc.start.line;
+}
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts
new file mode 100644
index 0000000..ee06919
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts
@@ -0,0 +1,69 @@
+import type { TSESTree } from '../ts-estree';
+export declare const isOptionalChainPunctuator: (token: TSESTree.Token | null | undefined) => token is {
+    value: "?.";
+} & TSESTree.PunctuatorToken;
+export declare const isNotOptionalChainPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.BooleanToken | TSESTree.BlockComment | TSESTree.LineComment | TSESTree.IdentifierToken | TSESTree.JSXIdentifierToken | TSESTree.JSXTextToken | TSESTree.KeywordToken | TSESTree.NullToken | TSESTree.NumericToken | TSESTree.PrivateIdentifierToken | TSESTree.PunctuatorToken | TSESTree.RegularExpressionToken | TSESTree.StringToken | TSESTree.TemplateToken;
+export declare const isNonNullAssertionPunctuator: (token: TSESTree.Token | null | undefined) => token is {
+    value: "!";
+} & TSESTree.PunctuatorToken;
+export declare const isNotNonNullAssertionPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.BooleanToken | TSESTree.BlockComment | TSESTree.LineComment | TSESTree.IdentifierToken | TSESTree.JSXIdentifierToken | TSESTree.JSXTextToken | TSESTree.KeywordToken | TSESTree.NullToken | TSESTree.NumericToken | TSESTree.PrivateIdentifierToken | TSESTree.PunctuatorToken | TSESTree.RegularExpressionToken | TSESTree.StringToken | TSESTree.TemplateToken;
+/**
+ * Returns true if and only if the node represents: foo?.() or foo.bar?.()
+ */
+export declare const isOptionalCallExpression: (node: TSESTree.Node | null | undefined) => node is {
+    optional: boolean;
+} & TSESTree.CallExpression;
+/**
+ * Returns true if and only if the node represents logical OR
+ */
+export declare const isLogicalOrOperator: (node: TSESTree.Node | null | undefined) => node is Partial & TSESTree.LogicalExpression;
+/**
+ * Checks if a node is a type assertion:
+ * ```
+ * x as foo
+ * x
+ * ```
+ */
+export declare const isTypeAssertion: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSAsExpression | TSESTree.TSTypeAssertion;
+export declare const isVariableDeclarator: (node: TSESTree.Node | null | undefined) => node is TSESTree.VariableDeclaratorDefiniteAssignment | TSESTree.VariableDeclaratorMaybeInit | TSESTree.VariableDeclaratorNoInit | TSESTree.UsingInForOfDeclarator | TSESTree.UsingInNormalContextDeclarator;
+export declare const isFunction: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression;
+export declare const isFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSDeclareFunctionNoDeclare | TSESTree.TSDeclareFunctionWithDeclare | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName;
+export declare const isFunctionOrFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSDeclareFunctionNoDeclare | TSESTree.TSDeclareFunctionWithDeclare | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName;
+export declare const isTSFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSFunctionType;
+export declare const isTSConstructorType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSConstructorType;
+export declare const isClassOrTypeElement: (node: TSESTree.Node | null | undefined) => node is TSESTree.FunctionExpression | TSESTree.MethodDefinitionComputedName | TSESTree.MethodDefinitionNonComputedName | TSESTree.PropertyDefinitionComputedName | TSESTree.PropertyDefinitionNonComputedName | TSESTree.TSAbstractMethodDefinitionComputedName | TSESTree.TSAbstractMethodDefinitionNonComputedName | TSESTree.TSAbstractPropertyDefinitionComputedName | TSESTree.TSAbstractPropertyDefinitionNonComputedName | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSIndexSignature | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName | TSESTree.TSPropertySignatureComputedName | TSESTree.TSPropertySignatureNonComputedName;
+/**
+ * Checks if a node is a constructor method.
+ */
+export declare const isConstructor: (node: TSESTree.Node | null | undefined) => node is Partial & (TSESTree.MethodDefinitionComputedName | TSESTree.MethodDefinitionNonComputedName);
+/**
+ * Checks if a node is a setter method.
+ */
+export declare function isSetter(node: TSESTree.Node | undefined): node is {
+    kind: 'set';
+} & (TSESTree.MethodDefinition | TSESTree.Property);
+export declare const isIdentifier: (node: TSESTree.Node | null | undefined) => node is TSESTree.Identifier;
+/**
+ * Checks if a node represents an `await …` expression.
+ */
+export declare const isAwaitExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.AwaitExpression;
+/**
+ * Checks if a possible token is the `await` keyword.
+ */
+export declare const isAwaitKeyword: (token: TSESTree.Token | null | undefined) => token is {
+    value: "await";
+} & TSESTree.IdentifierToken;
+/**
+ * Checks if a possible token is the `type` keyword.
+ */
+export declare const isTypeKeyword: (token: TSESTree.Token | null | undefined) => token is {
+    value: "type";
+} & TSESTree.IdentifierToken;
+/**
+ * Checks if a possible token is the `import` keyword.
+ */
+export declare const isImportKeyword: (token: TSESTree.Token | null | undefined) => token is {
+    value: "import";
+} & TSESTree.KeywordToken;
+export declare const isLoop: (node: TSESTree.Node | null | undefined) => node is TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.WhileStatement;
+//# sourceMappingURL=predicates.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map
new file mode 100644
index 0000000..cfc1dc8
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../src/ast-utils/predicates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAW7C,eAAO,MAAM,yBAAyB;;4BAGrC,CAAC;AAEF,eAAO,MAAM,4BAA4B,kaAGxC,CAAC;AAEF,eAAO,MAAM,4BAA4B;;4BAGxC,CAAC;AAEF,eAAO,MAAM,+BAA+B,kaAG3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;2BAKpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,sHAG/B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,wGAGjB,CAAC;AAEZ,eAAO,MAAM,oBAAoB,0PAEhC,CAAC;AAOF,eAAO,MAAM,UAAU,0MAA+B,CAAC;AAWvD,eAAO,MAAM,cAAc,uYAAmC,CAAC;AAE/D,eAAO,MAAM,wBAAwB,8hBAG1B,CAAC;AAEZ,eAAO,MAAM,gBAAgB,6EAA8C,CAAC;AAE5E,eAAO,MAAM,mBAAmB,gFAE/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,ixBAetB,CAAC;AAEZ;;GAEG;AACH,eAAO,MAAM,aAAa,oOAGzB,CAAC;AAEF;;GAEG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,GAC9B,IAAI,IAAI;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,GAAG,CAAC,QAAQ,CAAC,gBAAgB,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAO3E;AAED,eAAO,MAAM,YAAY,yEAA0C,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,iBAAiB,8EAA+C,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,cAAc;;4BAG1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;;4BAGzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;yBAG3B,CAAC;AAEF,eAAO,MAAM,MAAM,qLAMR,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js
new file mode 100644
index 0000000..9285f1e
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js
@@ -0,0 +1,108 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isLoop = exports.isImportKeyword = exports.isTypeKeyword = exports.isAwaitKeyword = exports.isAwaitExpression = exports.isIdentifier = exports.isConstructor = exports.isClassOrTypeElement = exports.isTSConstructorType = exports.isTSFunctionType = exports.isFunctionOrFunctionType = exports.isFunctionType = exports.isFunction = exports.isVariableDeclarator = exports.isTypeAssertion = exports.isLogicalOrOperator = exports.isOptionalCallExpression = exports.isNotNonNullAssertionPunctuator = exports.isNonNullAssertionPunctuator = exports.isNotOptionalChainPunctuator = exports.isOptionalChainPunctuator = void 0;
+exports.isSetter = isSetter;
+const ts_estree_1 = require("../ts-estree");
+const helpers_1 = require("./helpers");
+exports.isOptionalChainPunctuator = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: '?.' });
+exports.isNotOptionalChainPunctuator = (0, helpers_1.isNotTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: '?.' });
+exports.isNonNullAssertionPunctuator = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: '!' });
+exports.isNotNonNullAssertionPunctuator = (0, helpers_1.isNotTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: '!' });
+/**
+ * Returns true if and only if the node represents: foo?.() or foo.bar?.()
+ */
+exports.isOptionalCallExpression = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.CallExpression, 
+// this flag means the call expression itself is option
+// i.e. it is foo.bar?.() and not foo?.bar()
+{ optional: true });
+/**
+ * Returns true if and only if the node represents logical OR
+ */
+exports.isLogicalOrOperator = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.LogicalExpression, { operator: '||' });
+/**
+ * Checks if a node is a type assertion:
+ * ```
+ * x as foo
+ * x
+ * ```
+ */
+exports.isTypeAssertion = (0, helpers_1.isNodeOfTypes)([
+    ts_estree_1.AST_NODE_TYPES.TSAsExpression,
+    ts_estree_1.AST_NODE_TYPES.TSTypeAssertion,
+]);
+exports.isVariableDeclarator = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.VariableDeclarator);
+const functionTypes = [
+    ts_estree_1.AST_NODE_TYPES.ArrowFunctionExpression,
+    ts_estree_1.AST_NODE_TYPES.FunctionDeclaration,
+    ts_estree_1.AST_NODE_TYPES.FunctionExpression,
+];
+exports.isFunction = (0, helpers_1.isNodeOfTypes)(functionTypes);
+const functionTypeTypes = [
+    ts_estree_1.AST_NODE_TYPES.TSCallSignatureDeclaration,
+    ts_estree_1.AST_NODE_TYPES.TSConstructorType,
+    ts_estree_1.AST_NODE_TYPES.TSConstructSignatureDeclaration,
+    ts_estree_1.AST_NODE_TYPES.TSDeclareFunction,
+    ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,
+    ts_estree_1.AST_NODE_TYPES.TSFunctionType,
+    ts_estree_1.AST_NODE_TYPES.TSMethodSignature,
+];
+exports.isFunctionType = (0, helpers_1.isNodeOfTypes)(functionTypeTypes);
+exports.isFunctionOrFunctionType = (0, helpers_1.isNodeOfTypes)([
+    ...functionTypes,
+    ...functionTypeTypes,
+]);
+exports.isTSFunctionType = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.TSFunctionType);
+exports.isTSConstructorType = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.TSConstructorType);
+exports.isClassOrTypeElement = (0, helpers_1.isNodeOfTypes)([
+    // ClassElement
+    ts_estree_1.AST_NODE_TYPES.PropertyDefinition,
+    ts_estree_1.AST_NODE_TYPES.FunctionExpression,
+    ts_estree_1.AST_NODE_TYPES.MethodDefinition,
+    ts_estree_1.AST_NODE_TYPES.TSAbstractPropertyDefinition,
+    ts_estree_1.AST_NODE_TYPES.TSAbstractMethodDefinition,
+    ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,
+    ts_estree_1.AST_NODE_TYPES.TSIndexSignature,
+    // TypeElement
+    ts_estree_1.AST_NODE_TYPES.TSCallSignatureDeclaration,
+    ts_estree_1.AST_NODE_TYPES.TSConstructSignatureDeclaration,
+    // AST_NODE_TYPES.TSIndexSignature,
+    ts_estree_1.AST_NODE_TYPES.TSMethodSignature,
+    ts_estree_1.AST_NODE_TYPES.TSPropertySignature,
+]);
+/**
+ * Checks if a node is a constructor method.
+ */
+exports.isConstructor = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.MethodDefinition, { kind: 'constructor' });
+/**
+ * Checks if a node is a setter method.
+ */
+function isSetter(node) {
+    return (!!node &&
+        (node.type === ts_estree_1.AST_NODE_TYPES.MethodDefinition ||
+            node.type === ts_estree_1.AST_NODE_TYPES.Property) &&
+        node.kind === 'set');
+}
+exports.isIdentifier = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.Identifier);
+/**
+ * Checks if a node represents an `await …` expression.
+ */
+exports.isAwaitExpression = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.AwaitExpression);
+/**
+ * Checks if a possible token is the `await` keyword.
+ */
+exports.isAwaitKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Identifier, { value: 'await' });
+/**
+ * Checks if a possible token is the `type` keyword.
+ */
+exports.isTypeKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Identifier, { value: 'type' });
+/**
+ * Checks if a possible token is the `import` keyword.
+ */
+exports.isImportKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Keyword, { value: 'import' });
+exports.isLoop = (0, helpers_1.isNodeOfTypes)([
+    ts_estree_1.AST_NODE_TYPES.DoWhileStatement,
+    ts_estree_1.AST_NODE_TYPES.ForStatement,
+    ts_estree_1.AST_NODE_TYPES.ForInStatement,
+    ts_estree_1.AST_NODE_TYPES.ForOfStatement,
+    ts_estree_1.AST_NODE_TYPES.WhileStatement,
+]);
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts
new file mode 100644
index 0000000..e589219
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts
@@ -0,0 +1,10 @@
+import type { RuleCreateFunction, RuleModule } from '../ts-eslint';
+/**
+ * Uses type inference to fetch the Options type from the given RuleModule
+ */
+export type InferOptionsTypeFromRule = T extends RuleModule ? Options : T extends RuleCreateFunction ? Options : unknown;
+/**
+ * Uses type inference to fetch the MessageIds type from the given RuleModule
+ */
+export type InferMessageIdsTypeFromRule = T extends RuleModule ? MessageIds : T extends RuleCreateFunction ? MessageIds : unknown;
+//# sourceMappingURL=InferTypesFromRule.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts.map
new file mode 100644
index 0000000..5985161
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"InferTypesFromRule.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/InferTypesFromRule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,wBAAwB,CAAC,CAAC,IACpC,CAAC,SAAS,UAAU,CAAC,MAAM,WAAW,EAAE,MAAM,OAAO,CAAC,GAClD,OAAO,GACP,CAAC,SAAS,kBAAkB,CAAC,MAAM,WAAW,EAAE,MAAM,OAAO,CAAC,GAC5D,OAAO,GACP,OAAO,CAAC;AAEhB;;GAEG;AACH,MAAM,MAAM,2BAA2B,CAAC,CAAC,IACvC,CAAC,SAAS,UAAU,CAAC,MAAM,UAAU,EAAE,MAAM,SAAS,CAAC,GACnD,UAAU,GACV,CAAC,SAAS,kBAAkB,CAAC,MAAM,UAAU,EAAE,MAAM,SAAS,CAAC,GAC7D,UAAU,GACV,OAAO,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js
new file mode 100644
index 0000000..fabb051
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts
new file mode 100644
index 0000000..c43ff64
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts
@@ -0,0 +1,28 @@
+import type { RuleContext, RuleListener, RuleMetaData, RuleMetaDataDocs, RuleModule } from '../ts-eslint/Rule';
+export type NamedCreateRuleMetaDocs = Omit;
+export type NamedCreateRuleMeta = {
+    docs: PluginDocs & RuleMetaDataDocs;
+} & Omit, 'docs'>;
+export interface RuleCreateAndOptions {
+    create: (context: Readonly>, optionsWithDefault: Readonly) => RuleListener;
+    defaultOptions: Readonly;
+}
+export interface RuleWithMeta extends RuleCreateAndOptions {
+    meta: RuleMetaData;
+}
+export interface RuleWithMetaAndName extends RuleCreateAndOptions {
+    meta: NamedCreateRuleMeta;
+    name: string;
+}
+/**
+ * Creates reusable function to create rules with default options and docs URLs.
+ *
+ * @param urlCreator Creates a documentation URL for a given rule name.
+ * @returns Function to create a rule with the docs URL format.
+ */
+export declare function RuleCreator(urlCreator: (ruleName: string) => string): ({ meta, name, ...rule }: Readonly>) => RuleModule;
+export declare namespace RuleCreator {
+    var withoutDocs: (args: Readonly>) => RuleModule;
+}
+export { type RuleListener, type RuleModule } from '../ts-eslint/Rule';
+//# sourceMappingURL=RuleCreator.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts.map
new file mode 100644
index 0000000..5a41469
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"RuleCreator.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/RuleCreator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACX,MAAM,mBAAmB,CAAC;AAK3B,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAEpE,MAAM,MAAM,mBAAmB,CAC7B,UAAU,SAAS,MAAM,EACzB,UAAU,GAAG,OAAO,EACpB,OAAO,SAAS,SAAS,OAAO,EAAE,GAAG,EAAE,IACrC;IACF,IAAI,EAAE,UAAU,GAAG,gBAAgB,CAAC;CACrC,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AAEhE,MAAM,WAAW,oBAAoB,CACnC,OAAO,SAAS,SAAS,OAAO,EAAE,EAClC,UAAU,SAAS,MAAM;IAEzB,MAAM,EAAE,CACN,OAAO,EAAE,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,EACnD,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,KAClC,YAAY,CAAC;IAClB,cAAc,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,YAAY,CAC3B,OAAO,SAAS,SAAS,OAAO,EAAE,EAClC,UAAU,SAAS,MAAM,EACzB,IAAI,GAAG,OAAO,CACd,SAAQ,oBAAoB,CAAC,OAAO,EAAE,UAAU,CAAC;IACjD,IAAI,EAAE,YAAY,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,mBAAmB,CAClC,OAAO,SAAS,SAAS,OAAO,EAAE,EAClC,UAAU,SAAS,MAAM,EACzB,IAAI,GAAG,OAAO,CACd,SAAQ,oBAAoB,CAAC,OAAO,EAAE,UAAU,CAAC;IACjD,IAAI,EAAE,mBAAmB,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACrD,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,UAAU,GAAG,OAAO,EAC9C,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,IAKtC,OAAO,SAAS,SAAS,OAAO,EAAE,EAClC,UAAU,SAAS,MAAM,EACzB,yBAIC,QAAQ,CACT,mBAAmB,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CACrD,KAAG,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAYhD;yBA1Be,WAAW;sBA0DzB,OAAO,SAAS,SAAS,OAAO,EAAE,EAClC,UAAU,SAAS,MAAM,QAEnB,QAAQ,CAAC,YAAY,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,KAChD,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC;;AAIlC,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js
new file mode 100644
index 0000000..66af32b
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js
@@ -0,0 +1,45 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.RuleCreator = RuleCreator;
+const applyDefault_1 = require("./applyDefault");
+/**
+ * Creates reusable function to create rules with default options and docs URLs.
+ *
+ * @param urlCreator Creates a documentation URL for a given rule name.
+ * @returns Function to create a rule with the docs URL format.
+ */
+function RuleCreator(urlCreator) {
+    // This function will get much easier to call when this is merged https://github.com/Microsoft/TypeScript/pull/26349
+    // TODO - when the above PR lands; add type checking for the context.report `data` property
+    return function createNamedRule({ meta, name, ...rule }) {
+        return createRule({
+            meta: {
+                ...meta,
+                docs: {
+                    ...meta.docs,
+                    url: urlCreator(name),
+                },
+            },
+            ...rule,
+        });
+    };
+}
+function createRule({ create, defaultOptions, meta, }) {
+    return {
+        create(context) {
+            const optionsWithDefault = (0, applyDefault_1.applyDefault)(defaultOptions, context.options);
+            return create(context, optionsWithDefault);
+        },
+        defaultOptions,
+        meta,
+    };
+}
+/**
+ * Creates a well-typed TSESLint custom ESLint rule without a docs URL.
+ *
+ * @returns Well-typed TSESLint custom ESLint rule.
+ * @remarks It is generally better to provide a docs URL function to RuleCreator.
+ */
+RuleCreator.withoutDocs = function withoutDocs(args) {
+    return createRule(args);
+};
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.d.ts
new file mode 100644
index 0000000..a300ed4
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.d.ts
@@ -0,0 +1,9 @@
+/**
+ * Pure function - doesn't mutate either parameter!
+ * Uses the default options and overrides with the options provided by the user
+ * @param defaultOptions the defaults
+ * @param userOptions the user opts
+ * @returns the options with defaults
+ */
+export declare function applyDefault(defaultOptions: Readonly, userOptions: Readonly | null): Default;
+//# sourceMappingURL=applyDefault.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.d.ts.map
new file mode 100644
index 0000000..1b9e151
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"applyDefault.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/applyDefault.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,IAAI,SAAS,SAAS,OAAO,EAAE,EAC/B,OAAO,SAAS,IAAI,EAEpB,cAAc,EAAE,QAAQ,CAAC,OAAO,CAAC,EACjC,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,GACjC,OAAO,CAwBT"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js
new file mode 100644
index 0000000..8a6af36
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js
@@ -0,0 +1,33 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.applyDefault = applyDefault;
+const deepMerge_1 = require("./deepMerge");
+/**
+ * Pure function - doesn't mutate either parameter!
+ * Uses the default options and overrides with the options provided by the user
+ * @param defaultOptions the defaults
+ * @param userOptions the user opts
+ * @returns the options with defaults
+ */
+function applyDefault(defaultOptions, userOptions) {
+    // clone defaults
+    const options = structuredClone(defaultOptions);
+    if (userOptions == null) {
+        return options;
+    }
+    // For avoiding the type error
+    //   `This expression is not callable. Type 'unknown' has no call signatures.ts(2349)`
+    options.forEach((opt, i) => {
+        // eslint-disable-next-line @typescript-eslint/internal/eqeq-nullish
+        if (userOptions[i] !== undefined) {
+            const userOpt = userOptions[i];
+            if ((0, deepMerge_1.isObjectNotArray)(userOpt) && (0, deepMerge_1.isObjectNotArray)(opt)) {
+                options[i] = (0, deepMerge_1.deepMerge)(opt, userOpt);
+            }
+            else {
+                options[i] = userOpt;
+            }
+        }
+    });
+    return options;
+}
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts
new file mode 100644
index 0000000..d90a806
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts
@@ -0,0 +1,15 @@
+export type ObjectLike = Record;
+/**
+ * Check if the variable contains an object strictly rejecting arrays
+ * @returns `true` if obj is an object
+ */
+export declare function isObjectNotArray(obj: unknown): obj is ObjectLike;
+/**
+ * Pure function - doesn't mutate either parameter!
+ * Merges two objects together deeply, overwriting the properties in first with the properties in second
+ * @param first The first object
+ * @param second The second object
+ * @returns a new object
+ */
+export declare function deepMerge(first?: ObjectLike, second?: ObjectLike): Record;
+//# sourceMappingURL=deepMerge.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts.map
new file mode 100644
index 0000000..d4eee9a
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"deepMerge.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/deepMerge.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAExD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,UAAU,CAEhE;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,KAAK,GAAE,UAAe,EACtB,MAAM,GAAE,UAAe,GACtB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA4BzB"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js
new file mode 100644
index 0000000..fbf47ff
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js
@@ -0,0 +1,46 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isObjectNotArray = isObjectNotArray;
+exports.deepMerge = deepMerge;
+/**
+ * Check if the variable contains an object strictly rejecting arrays
+ * @returns `true` if obj is an object
+ */
+function isObjectNotArray(obj) {
+    return typeof obj === 'object' && obj != null && !Array.isArray(obj);
+}
+/**
+ * Pure function - doesn't mutate either parameter!
+ * Merges two objects together deeply, overwriting the properties in first with the properties in second
+ * @param first The first object
+ * @param second The second object
+ * @returns a new object
+ */
+function deepMerge(first = {}, second = {}) {
+    // get the unique set of keys across both objects
+    const keys = new Set([...Object.keys(first), ...Object.keys(second)]);
+    return Object.fromEntries([...keys].map(key => {
+        const firstHasKey = key in first;
+        const secondHasKey = key in second;
+        const firstValue = first[key];
+        const secondValue = second[key];
+        let value;
+        if (firstHasKey && secondHasKey) {
+            if (isObjectNotArray(firstValue) && isObjectNotArray(secondValue)) {
+                // object type
+                value = deepMerge(firstValue, secondValue);
+            }
+            else {
+                // value type
+                value = secondValue;
+            }
+        }
+        else if (firstHasKey) {
+            value = firstValue;
+        }
+        else {
+            value = secondValue;
+        }
+        return [key, value];
+    }));
+}
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.d.ts
new file mode 100644
index 0000000..ab9ca0d
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.d.ts
@@ -0,0 +1,23 @@
+import type * as TSESLint from '../ts-eslint';
+import type { ParserServices, ParserServicesWithTypeInformation } from '../ts-estree';
+/**
+ * Try to retrieve type-aware parser service from context.
+ * This **_will_** throw if it is not available.
+ */
+export declare function getParserServices(context: Readonly>): ParserServicesWithTypeInformation;
+/**
+ * Try to retrieve type-aware parser service from context.
+ * This **_will_** throw if it is not available.
+ */
+export declare function getParserServices(context: Readonly>, allowWithoutFullTypeInformation: false): ParserServicesWithTypeInformation;
+/**
+ * Try to retrieve type-aware parser service from context.
+ * This **_will not_** throw if it is not available.
+ */
+export declare function getParserServices(context: Readonly>, allowWithoutFullTypeInformation: true): ParserServices;
+/**
+ * Try to retrieve type-aware parser service from context.
+ * This may or may not throw if it is not available, depending on if `allowWithoutFullTypeInformation` is `true`
+ */
+export declare function getParserServices(context: Readonly>, allowWithoutFullTypeInformation: boolean): ParserServices;
+//# sourceMappingURL=getParserServices.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.d.ts.map
new file mode 100644
index 0000000..701157b
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"getParserServices.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/getParserServices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,QAAQ,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,cAAc,EACd,iCAAiC,EAClC,MAAM,cAAc,CAAC;AAWtB;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,SAAS,MAAM,EACzB,OAAO,SAAS,SAAS,OAAO,EAAE,EAElC,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,GAC3D,iCAAiC,CAAC;AACrC;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,SAAS,MAAM,EACzB,OAAO,SAAS,SAAS,OAAO,EAAE,EAElC,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,EAC5D,+BAA+B,EAAE,KAAK,GACrC,iCAAiC,CAAC;AACrC;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,SAAS,MAAM,EACzB,OAAO,SAAS,SAAS,OAAO,EAAE,EAElC,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,EAC5D,+BAA+B,EAAE,IAAI,GACpC,cAAc,CAAC;AAClB;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,SAAS,MAAM,EACzB,OAAO,SAAS,SAAS,OAAO,EAAE,EAElC,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,EAC5D,+BAA+B,EAAE,OAAO,GACvC,cAAc,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js
new file mode 100644
index 0000000..f915540
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js
@@ -0,0 +1,39 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getParserServices = getParserServices;
+const parserSeemsToBeTSESLint_1 = require("./parserSeemsToBeTSESLint");
+const ERROR_MESSAGE_REQUIRES_PARSER_SERVICES = "You have used a rule which requires type information, but don't have parserOptions set to generate type information for this file. See https://typescript-eslint.io/getting-started/typed-linting for enabling linting with type information.";
+const ERROR_MESSAGE_UNKNOWN_PARSER = 'Note: detected a parser other than @typescript-eslint/parser. Make sure the parser is configured to forward "parserOptions.project" to @typescript-eslint/parser.';
+function getParserServices(context, allowWithoutFullTypeInformation = false) {
+    const parser = context.parserPath || context.languageOptions.parser?.meta?.name;
+    // This check is unnecessary if the user is using the latest version of our parser.
+    //
+    // However the world isn't perfect:
+    // - Users often use old parser versions.
+    //   Old versions of the parser would not return any parserServices unless parserOptions.project was set.
+    // - Users sometimes use parsers that aren't @typescript-eslint/parser
+    //   Other parsers won't return the parser services we expect (if they return any at all).
+    //
+    // This check allows us to handle bad user setups whilst providing a nice user-facing
+    // error message explaining the problem.
+    if (context.sourceCode.parserServices?.esTreeNodeToTSNodeMap == null ||
+        context.sourceCode.parserServices.tsNodeToESTreeNodeMap == null) {
+        throwError(parser);
+    }
+    // if a rule requires full type information, then hard fail if it doesn't exist
+    // this forces the user to supply parserOptions.project
+    if (context.sourceCode.parserServices.program == null &&
+        !allowWithoutFullTypeInformation) {
+        throwError(parser);
+    }
+    return context.sourceCode.parserServices;
+}
+/* eslint-enable @typescript-eslint/unified-signatures */
+function throwError(parser) {
+    const messages = [
+        ERROR_MESSAGE_REQUIRES_PARSER_SERVICES,
+        `Parser: ${parser || '(unknown)'}`,
+        !(0, parserSeemsToBeTSESLint_1.parserSeemsToBeTSESLint)(parser) && ERROR_MESSAGE_UNKNOWN_PARSER,
+    ].filter(Boolean);
+    throw new Error(messages.join('\n'));
+}
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.d.ts
new file mode 100644
index 0000000..7705859
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.d.ts
@@ -0,0 +1,7 @@
+export * from './applyDefault';
+export * from './deepMerge';
+export * from './getParserServices';
+export * from './InferTypesFromRule';
+export * from './nullThrows';
+export * from './RuleCreator';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.d.ts.map
new file mode 100644
index 0000000..e0ecd5d
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js
new file mode 100644
index 0000000..fc05116
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js
@@ -0,0 +1,22 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./applyDefault"), exports);
+__exportStar(require("./deepMerge"), exports);
+__exportStar(require("./getParserServices"), exports);
+__exportStar(require("./InferTypesFromRule"), exports);
+__exportStar(require("./nullThrows"), exports);
+__exportStar(require("./RuleCreator"), exports);
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.d.ts
new file mode 100644
index 0000000..dfc3916
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.d.ts
@@ -0,0 +1,13 @@
+/**
+ * A set of common reasons for calling nullThrows
+ */
+export declare const NullThrowsReasons: {
+    readonly MissingParent: "Expected node to have a parent.";
+    readonly MissingToken: (token: string, thing: string) => string;
+};
+/**
+ * Assert that a value must not be null or undefined.
+ * This is a nice explicit alternative to the non-null assertion operator.
+ */
+export declare function nullThrows(value: T, message: string): NonNullable;
+//# sourceMappingURL=nullThrows.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.d.ts.map
new file mode 100644
index 0000000..f31939c
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"nullThrows.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/nullThrows.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,iBAAiB;;mCAEN,MAAM,SAAS,MAAM;CAEnC,CAAC;AAEX;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAMvE"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js
new file mode 100644
index 0000000..be7eadf
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js
@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.NullThrowsReasons = void 0;
+exports.nullThrows = nullThrows;
+/**
+ * A set of common reasons for calling nullThrows
+ */
+exports.NullThrowsReasons = {
+    MissingParent: 'Expected node to have a parent.',
+    MissingToken: (token, thing) => `Expected to find a ${token} for the ${thing}.`,
+};
+/**
+ * Assert that a value must not be null or undefined.
+ * This is a nice explicit alternative to the non-null assertion operator.
+ */
+function nullThrows(value, message) {
+    if (value == null) {
+        throw new Error(`Non-null Assertion Failed: ${message}`);
+    }
+    return value;
+}
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.d.ts
new file mode 100644
index 0000000..5ec5cd2
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.d.ts
@@ -0,0 +1,2 @@
+export declare function parserSeemsToBeTSESLint(parser: string | undefined): boolean;
+//# sourceMappingURL=parserSeemsToBeTSESLint.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.d.ts.map
new file mode 100644
index 0000000..b82088a
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"parserSeemsToBeTSESLint.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/parserSeemsToBeTSESLint.ts"],"names":[],"mappings":"AAAA,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE3E"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js
new file mode 100644
index 0000000..b1f568e
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js
@@ -0,0 +1,6 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.parserSeemsToBeTSESLint = parserSeemsToBeTSESLint;
+function parserSeemsToBeTSESLint(parser) {
+    return !!parser && /(?:typescript-eslint|\.\.)[\w/\\]*parser/.test(parser);
+}
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/index.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/index.d.ts
new file mode 100644
index 0000000..3d315c8
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/index.d.ts
@@ -0,0 +1,7 @@
+export * as ASTUtils from './ast-utils';
+export * as ESLintUtils from './eslint-utils';
+export * as JSONSchema from './json-schema';
+export * as TSESLint from './ts-eslint';
+export * from './ts-estree';
+export * as TSUtils from './ts-utils';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/index.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/index.d.ts.map
new file mode 100644
index 0000000..6e219b5
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AAExC,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/index.js b/slider/node_modules/@typescript-eslint/utils/dist/index.js
new file mode 100644
index 0000000..586916f
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/index.js
@@ -0,0 +1,45 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+    Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+    o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TSUtils = exports.TSESLint = exports.JSONSchema = exports.ESLintUtils = exports.ASTUtils = void 0;
+exports.ASTUtils = __importStar(require("./ast-utils"));
+exports.ESLintUtils = __importStar(require("./eslint-utils"));
+exports.JSONSchema = __importStar(require("./json-schema"));
+exports.TSESLint = __importStar(require("./ts-eslint"));
+__exportStar(require("./ts-estree"), exports);
+exports.TSUtils = __importStar(require("./ts-utils"));
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/json-schema.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/json-schema.d.ts
new file mode 100644
index 0000000..f952b1d
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/json-schema.d.ts
@@ -0,0 +1,388 @@
+/**
+ * This is a fork of https://github.com/DefinitelyTyped/DefinitelyTyped/blob/13f63c2eb8d7479caf01ab8d72f9e3683368a8f5/types/json-schema/index.d.ts
+ * We intentionally fork this because:
+ * - ESLint ***ONLY*** supports JSONSchema v4
+ * - We want to provide stricter types
+ */
+/**
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
+ */
+export type JSONSchema4TypeName = 'any' | 'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string';
+/**
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
+ */
+export type JSONSchema4Type = boolean | number | string | null;
+export type JSONSchema4TypeExtended = JSONSchema4Array | JSONSchema4Object | JSONSchema4Type;
+export interface JSONSchema4Object {
+    [key: string]: JSONSchema4TypeExtended;
+}
+export interface JSONSchema4Array extends Array {
+}
+/**
+ * Meta schema
+ *
+ * Recommended values:
+ * - 'http://json-schema.org/schema#'
+ * - 'http://json-schema.org/hyper-schema#'
+ * - 'http://json-schema.org/draft-04/schema#'
+ * - 'http://json-schema.org/draft-04/hyper-schema#'
+ * - 'http://json-schema.org/draft-03/schema#'
+ * - 'http://json-schema.org/draft-03/hyper-schema#'
+ *
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
+ */
+export type JSONSchema4Version = string;
+/**
+ * JSON Schema V4
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04
+ */
+export type JSONSchema4 = JSONSchema4AllOfSchema | JSONSchema4AnyOfSchema | JSONSchema4AnySchema | JSONSchema4ArraySchema | JSONSchema4BooleanSchema | JSONSchema4MultiSchema | JSONSchema4NullSchema | JSONSchema4NumberSchema | JSONSchema4ObjectSchema | JSONSchema4OneOfSchema | JSONSchema4RefSchema | JSONSchema4StringSchema;
+interface JSONSchema4Base {
+    /**
+     * Reusable definitions that can be referenced via `$ref`
+     */
+    $defs?: Record | undefined;
+    /**
+     * Path to a schema defined in `definitions`/`$defs` that will form the base
+     * for this schema.
+     *
+     * If you are defining an "array" schema (`schema: [ ... ]`) for your rule
+     * then you should prefix this with `items/0` so that the validator can find
+     * your definitions.
+     *
+     * eg: `'#/items/0/definitions/myDef'`
+     *
+     * Otherwise if you are defining an "object" schema (`schema: { ... }`) for
+     * your rule you can directly reference your definitions
+     *
+     * eg: `'#/definitions/myDef'`
+     */
+    $ref?: string | undefined;
+    $schema?: JSONSchema4Version | undefined;
+    /**
+     * (AND) Must be valid against all of the sub-schemas
+     */
+    allOf?: JSONSchema4[] | undefined;
+    /**
+     * (OR) Must be valid against any of the sub-schemas
+     */
+    anyOf?: JSONSchema4[] | undefined;
+    /**
+     * The default value for the item if not present
+     */
+    default?: JSONSchema4TypeExtended | undefined;
+    /**
+     * Reusable definitions that can be referenced via `$ref`
+     */
+    definitions?: Record | undefined;
+    /**
+     * This attribute is a string that provides a full description of the of
+     * purpose the instance property.
+     *
+     * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
+     */
+    description?: string | undefined;
+    /**
+     * The value of this property MUST be another schema which will provide
+     * a base schema which the current schema will inherit from.  The
+     * inheritance rules are such that any instance that is valid according
+     * to the current schema MUST be valid according to the referenced
+     * schema.  This MAY also be an array, in which case, the instance MUST
+     * be valid for all the schemas in the array.  A schema that extends
+     * another schema MAY define additional attributes, constrain existing
+     * attributes, or add other constraints.
+     *
+     * Conceptually, the behavior of extends can be seen as validating an
+     * instance against all constraints in the extending schema as well as
+     * the extended schema(s).
+     *
+     * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
+     */
+    extends?: string | string[] | undefined;
+    id?: string | undefined;
+    /**
+     * (NOT) Must not be valid against the given schema
+     */
+    not?: JSONSchema4 | undefined;
+    /**
+     * (XOR) Must be valid against exactly one of the sub-schemas
+     */
+    oneOf?: JSONSchema4[] | undefined;
+    /**
+     * This attribute indicates if the instance must have a value, and not
+     * be undefined. This is false by default, making the instance
+     * optional.
+     *
+     * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
+     */
+    required?: boolean | string[] | undefined;
+    /**
+     * This attribute is a string that provides a short description of the
+     * instance property.
+     *
+     * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
+     */
+    title?: string | undefined;
+    /**
+     * A single type, or a union of simple types
+     */
+    type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
+}
+export interface JSONSchema4RefSchema extends JSONSchema4Base {
+    $ref: string;
+    type?: undefined;
+}
+export interface JSONSchema4AllOfSchema extends JSONSchema4Base {
+    allOf: JSONSchema4[];
+    type?: undefined;
+}
+export interface JSONSchema4AnyOfSchema extends JSONSchema4Base {
+    anyOf: JSONSchema4[];
+    type?: undefined;
+}
+export interface JSONSchema4OneOfSchema extends JSONSchema4Base {
+    oneOf: JSONSchema4[];
+    type?: undefined;
+}
+export interface JSONSchema4MultiSchema extends Omit, Omit, Omit, Omit, Omit, Omit, Omit {
+    /**
+     * This provides an enumeration of all possible values that are valid
+     * for the instance property. This MUST be an array, and each item in
+     * the array represents a possible value for the instance value. If
+     * this attribute is defined, the instance value MUST be one of the
+     * values in the array in order for the schema to be valid.
+     *
+     * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
+     */
+    enum?: JSONSchema4Type[];
+    type: JSONSchema4TypeName[];
+}
+/**
+ * @see https://json-schema.org/understanding-json-schema/reference/object.html
+ */
+export interface JSONSchema4ObjectSchema extends JSONSchema4Base {
+    /**
+     * This attribute defines a schema for all properties that are not
+     * explicitly defined in an object type definition. If specified, the
+     * value MUST be a schema or a boolean. If false is provided, no
+     * additional properties are allowed beyond the properties defined in
+     * the schema. The default value is an empty schema which allows any
+     * value for additional properties.
+     *
+     * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
+     */
+    additionalProperties?: boolean | JSONSchema4 | undefined;
+    /**
+     * The `dependencies` keyword conditionally applies a sub-schema when a given
+     * property is present. This schema is applied in the same way `allOf` applies
+     * schemas. Nothing is merged or extended. Both schemas apply independently.
+     */
+    dependencies?: Record | undefined;
+    /**
+     * The maximum number of properties allowed for record-style schemas
+     */
+    maxProperties?: number | undefined;
+    /**
+     * The minimum number of properties required for record-style schemas
+     */
+    minProperties?: number | undefined;
+    /**
+     * This attribute is an object that defines the schema for a set of
+     * property names of an object instance. The name of each property of
+     * this attribute's object is a regular expression pattern in the ECMA
+     * 262/Perl 5 format, while the value is a schema. If the pattern
+     * matches the name of a property on the instance object, the value of
+     * the instance's property MUST be valid against the pattern name's
+     * schema value.
+     *
+     * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
+     */
+    patternProperties?: Record | undefined;
+    /**
+     * This attribute is an object with property definitions that define the
+     * valid values of instance object property values. When the instance
+     * value is an object, the property values of the instance object MUST
+     * conform to the property definitions in this object. In this object,
+     * each property definition's value MUST be a schema, and the property's
+     * name MUST be the name of the instance property that it defines.  The
+     * instance property value MUST be valid according to the schema from
+     * the property definition. Properties are considered unordered, the
+     * order of the instance properties MAY be in any order.
+     *
+     * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
+     */
+    properties?: Record | undefined;
+    type: 'object';
+}
+/**
+ * @see https://json-schema.org/understanding-json-schema/reference/array.html
+ */
+export interface JSONSchema4ArraySchema extends JSONSchema4Base {
+    /**
+     * May only be defined when "items" is defined, and is a tuple of JSONSchemas.
+     *
+     * This provides a definition for additional items in an array instance
+     * when tuple definitions of the items is provided.  This can be false
+     * to indicate additional items in the array are not allowed, or it can
+     * be a schema that defines the schema of the additional items.
+     *
+     * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
+     */
+    additionalItems?: boolean | JSONSchema4 | undefined;
+    /**
+     * This attribute defines the allowed items in an instance array, and
+     * MUST be a schema or an array of schemas.  The default value is an
+     * empty schema which allows any value for items in the instance array.
+     *
+     * When this attribute value is a schema and the instance value is an
+     * array, then all the items in the array MUST be valid according to the
+     * schema.
+     *
+     * When this attribute value is an array of schemas and the instance
+     * value is an array, each position in the instance array MUST conform
+     * to the schema in the corresponding position for this array.  This
+     * called tuple typing.  When tuple typing is used, additional items are
+     * allowed, disallowed, or constrained by the "additionalItems"
+     * (Section 5.6) attribute using the same rules as
+     * "additionalProperties" (Section 5.4) for objects.
+     *
+     * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
+     */
+    items?: JSONSchema4 | JSONSchema4[] | undefined;
+    /**
+     * Defines the maximum length of an array
+     */
+    maxItems?: number | undefined;
+    /**
+     * Defines the minimum length of an array
+     */
+    minItems?: number | undefined;
+    type: 'array';
+    /**
+     * Enforces that all items in the array are unique
+     */
+    uniqueItems?: boolean | undefined;
+}
+/**
+ * @see https://json-schema.org/understanding-json-schema/reference/string.html
+ */
+export interface JSONSchema4StringSchema extends JSONSchema4Base {
+    enum?: string[] | undefined;
+    /**
+     * The `format` keyword allows for basic semantic identification of certain
+     * kinds of string values that are commonly used.
+     *
+     * For example, because JSON doesn’t have a “DateTime” type, dates need to be
+     * encoded as strings. `format` allows the schema author to indicate that the
+     * string value should be interpreted as a date.
+     *
+     * ajv v6 provides a few built-in formats - all other strings will cause AJV
+     * to throw during schema compilation
+     */
+    format?: 'date' | 'date-time' | 'email' | 'hostname' | 'ipv4' | 'ipv6' | 'json-pointer' | 'json-pointer-uri-fragment' | 'regex' | 'relative-json-pointer' | 'time' | 'uri' | 'uri-reference' | 'uri-template' | 'url' | 'uuid' | undefined;
+    /**
+     * The maximum allowed length for the string
+     */
+    maxLength?: number | undefined;
+    /**
+     * The minimum allowed length for the string
+     */
+    minLength?: number | undefined;
+    /**
+     * The `pattern` keyword is used to restrict a string to a particular regular
+     * expression. The regular expression syntax is the one defined in JavaScript
+     * (ECMA 262 specifically) with Unicode support.
+     *
+     * When defining the regular expressions, it’s important to note that the
+     * string is considered valid if the expression matches anywhere within the
+     * string. For example, the regular expression "p" will match any string with
+     * a p in it, such as "apple" not just a string that is simply "p". Therefore,
+     * it is usually less confusing, as a matter of course, to surround the
+     * regular expression in ^...$, for example, "^p$", unless there is a good
+     * reason not to do so.
+     */
+    pattern?: string | undefined;
+    type: 'string';
+}
+/**
+ * @see https://json-schema.org/understanding-json-schema/reference/numeric.html
+ */
+export interface JSONSchema4NumberSchema extends JSONSchema4Base {
+    /**
+     * This provides an enumeration of all possible values that are valid
+     * for the instance property. This MUST be an array, and each item in
+     * the array represents a possible value for the instance value. If
+     * this attribute is defined, the instance value MUST be one of the
+     * values in the array in order for the schema to be valid.
+     *
+     * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
+     */
+    enum?: number[] | undefined;
+    /**
+     * The exclusive minimum allowed value for the number
+     * - `true` = `x < maximum`
+     * - `false` = `x <= maximum`
+     *
+     * Default is `false`
+     */
+    exclusiveMaximum?: boolean | undefined;
+    /**
+     * Indicates whether or not `minimum` is the inclusive or exclusive minimum
+     * - `true` = `x > minimum`
+     * - `false` = `x ≥ minimum`
+     *
+     * Default is `false`
+     */
+    exclusiveMinimum?: boolean | undefined;
+    /**
+     * The maximum allowed value for the number
+     */
+    maximum?: number | undefined;
+    /**
+     * The minimum allowed value for the number
+     */
+    minimum?: number | undefined;
+    /**
+     * Numbers can be restricted to a multiple of a given number, using the
+     * `multipleOf` keyword. It may be set to any positive number.
+     */
+    multipleOf?: number | undefined;
+    type: 'integer' | 'number';
+}
+/**
+ * @see https://json-schema.org/understanding-json-schema/reference/boolean.html
+ */
+export interface JSONSchema4BooleanSchema extends JSONSchema4Base {
+    /**
+     * This provides an enumeration of all possible values that are valid
+     * for the instance property. This MUST be an array, and each item in
+     * the array represents a possible value for the instance value. If
+     * this attribute is defined, the instance value MUST be one of the
+     * values in the array in order for the schema to be valid.
+     *
+     * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
+     */
+    enum?: boolean[] | undefined;
+    type: 'boolean';
+}
+/**
+ * @see https://json-schema.org/understanding-json-schema/reference/null.html
+ */
+export interface JSONSchema4NullSchema extends JSONSchema4Base {
+    /**
+     * This provides an enumeration of all possible values that are valid
+     * for the instance property. This MUST be an array, and each item in
+     * the array represents a possible value for the instance value. If
+     * this attribute is defined, the instance value MUST be one of the
+     * values in the array in order for the schema to be valid.
+     *
+     * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
+     */
+    enum?: null[] | undefined;
+    type: 'null';
+}
+export interface JSONSchema4AnySchema extends JSONSchema4Base {
+    type: 'any';
+}
+export {};
+//# sourceMappingURL=json-schema.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/json-schema.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/json-schema.d.ts.map
new file mode 100644
index 0000000..db9e539
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/json-schema.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../src/json-schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,KAAK,GACL,OAAO,GACP,SAAS,GACT,SAAS,GACT,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAE/D,MAAM,MAAM,uBAAuB,GAC/B,gBAAgB,GAChB,iBAAiB,GACjB,eAAe,CAAC;AAEpB,MAAM,WAAW,iBAAiB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,uBAAuB,CAAC;CACxC;AAKD,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,uBAAuB,CAAC;CAAG;AAE3E;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC;;;GAGG;AACH,MAAM,MAAM,WAAW,GACnB,sBAAsB,GACtB,sBAAsB,GACtB,oBAAoB,GACpB,sBAAsB,GACtB,wBAAwB,GACxB,sBAAsB,GACtB,qBAAqB,GACrB,uBAAuB,GACvB,uBAAuB,GACvB,sBAAsB,GACtB,oBAAoB,GACpB,uBAAuB,CAAC;AAE5B,UAAU,eAAe;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,SAAS,CAAC;IAEhD;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B,OAAO,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAEzC;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW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AAE,OAAO,GAAG,SAAS,CAAC;IAEvC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE7B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE7B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEhC,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,eAAe;IAC/D;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;IAE7B,IAAI,EAAE,SAAS,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC;IAE1B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IAC3D,IAAI,EAAE,KAAK,CAAC;CACb"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/json-schema.js b/slider/node_modules/@typescript-eslint/utils/dist/json-schema.js
new file mode 100644
index 0000000..d1d3e42
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/json-schema.js
@@ -0,0 +1,8 @@
+"use strict";
+/**
+ * This is a fork of https://github.com/DefinitelyTyped/DefinitelyTyped/blob/13f63c2eb8d7479caf01ab8d72f9e3683368a8f5/types/json-schema/index.d.ts
+ * We intentionally fork this because:
+ * - ESLint ***ONLY*** supports JSONSchema v4
+ * - We want to provide stricter types
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.d.ts
new file mode 100644
index 0000000..c48bcf5
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.d.ts
@@ -0,0 +1,9 @@
+import type { AST_TOKEN_TYPES, TSESTree } from '../ts-estree';
+declare namespace AST {
+    type TokenType = AST_TOKEN_TYPES;
+    type Token = TSESTree.Token;
+    type SourceLocation = TSESTree.SourceLocation;
+    type Range = TSESTree.Range;
+}
+export type { AST };
+//# sourceMappingURL=AST.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.d.ts.map
new file mode 100644
index 0000000..a41bfae
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"AST.d.ts","sourceRoot":"","sources":["../../src/ts-eslint/AST.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE9D,kBAAU,GAAG,CAAC;IACZ,KAAY,SAAS,GAAG,eAAe,CAAC;IAExC,KAAY,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEnC,KAAY,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;IAErD,KAAY,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;CACpC;AAED,YAAY,EAAE,GAAG,EAAE,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.js
new file mode 100644
index 0000000..267455f
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.js
@@ -0,0 +1,3 @@
+"use strict";
+/* eslint-disable @typescript-eslint/no-namespace, no-restricted-syntax */
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.d.ts
new file mode 100644
index 0000000..9bc2ba4
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.d.ts
@@ -0,0 +1,285 @@
+import type { Parser as ParserType } from './Parser';
+import type * as ParserOptionsTypes from './ParserOptions';
+import type { Processor as ProcessorType } from './Processor';
+import type { LooseRuleDefinition, SharedConfigurationSettings } from './Rule';
+/** @internal */
+export declare namespace SharedConfig {
+    type Severity = 0 | 1 | 2;
+    type SeverityString = 'error' | 'off' | 'warn';
+    type RuleLevel = Severity | SeverityString;
+    type RuleLevelAndOptions = [RuleLevel, ...unknown[]];
+    type RuleEntry = RuleLevel | RuleLevelAndOptions;
+    type RulesRecord = Partial>;
+    type GlobalVariableOptionBase = 'off' | /** @deprecated use `'readonly'` */ 'readable' | 'readonly' | 'writable' | /** @deprecated use `'writable'` */ 'writeable';
+    type GlobalVariableOptionBoolean = /** @deprecated use `'readonly'` */ false | /** @deprecated use `'writable'` */ true;
+    type GlobalVariableOption = GlobalVariableOptionBase | GlobalVariableOptionBoolean;
+    interface GlobalsConfig {
+        [name: string]: GlobalVariableOption;
+    }
+    interface EnvironmentConfig {
+        [name: string]: boolean;
+    }
+    type ParserOptions = ParserOptionsTypes.ParserOptions;
+    interface PluginMeta {
+        /**
+         * The meta.name property should match the npm package name for your plugin.
+         */
+        name: string;
+        /**
+         * The meta.version property should match the npm package version for your plugin.
+         */
+        version: string;
+    }
+}
+export declare namespace ClassicConfig {
+    export type EnvironmentConfig = SharedConfig.EnvironmentConfig;
+    export type GlobalsConfig = SharedConfig.GlobalsConfig;
+    export type GlobalVariableOption = SharedConfig.GlobalVariableOption;
+    export type GlobalVariableOptionBase = SharedConfig.GlobalVariableOptionBase;
+    export type ParserOptions = SharedConfig.ParserOptions;
+    export type RuleEntry = SharedConfig.RuleEntry;
+    export type RuleLevel = SharedConfig.RuleLevel;
+    export type RuleLevelAndOptions = SharedConfig.RuleLevelAndOptions;
+    export type RulesRecord = SharedConfig.RulesRecord;
+    export type Severity = SharedConfig.Severity;
+    export type SeverityString = SharedConfig.SeverityString;
+    interface BaseConfig {
+        $schema?: string;
+        /**
+         * The environment settings.
+         */
+        env?: EnvironmentConfig;
+        /**
+         * The path to other config files or the package name of shareable configs.
+         */
+        extends?: string | string[];
+        /**
+         * The global variable settings.
+         */
+        globals?: GlobalsConfig;
+        /**
+         * The flag that disables comment directives.
+         */
+        noInlineConfig?: boolean;
+        /**
+         * The override settings per kind of files.
+         */
+        overrides?: ConfigOverride[];
+        /**
+         * The path to a parser or the package name of a parser.
+         */
+        parser?: string | null;
+        /**
+         * The parser options.
+         */
+        parserOptions?: ParserOptions;
+        /**
+         * The plugin specifiers.
+         */
+        plugins?: string[];
+        /**
+         * The processor specifier.
+         */
+        processor?: string;
+        /**
+         * The flag to report unused `eslint-disable` comments.
+         */
+        reportUnusedDisableDirectives?: boolean;
+        /**
+         * The rule settings.
+         */
+        rules?: RulesRecord;
+        /**
+         * The shared settings.
+         */
+        settings?: SharedConfigurationSettings;
+    }
+    export interface ConfigOverride extends BaseConfig {
+        excludedFiles?: string | string[];
+        files: string | string[];
+    }
+    export interface Config extends BaseConfig {
+        /**
+         * The glob patterns that ignore to lint.
+         */
+        ignorePatterns?: string | string[];
+        /**
+         * The root flag.
+         */
+        root?: boolean;
+    }
+    export {};
+}
+export declare namespace FlatConfig {
+    type EcmaVersion = ParserOptionsTypes.EcmaVersion;
+    type GlobalsConfig = SharedConfig.GlobalsConfig;
+    type Parser = ParserType.LooseParserModule;
+    type ParserOptions = SharedConfig.ParserOptions;
+    type PluginMeta = SharedConfig.PluginMeta;
+    type Processor = ProcessorType.LooseProcessorModule;
+    type RuleEntry = SharedConfig.RuleEntry;
+    type RuleLevel = SharedConfig.RuleLevel;
+    type RuleLevelAndOptions = SharedConfig.RuleLevelAndOptions;
+    type Rules = SharedConfig.RulesRecord;
+    type Settings = SharedConfigurationSettings;
+    type Severity = SharedConfig.Severity;
+    type SeverityString = SharedConfig.SeverityString;
+    type SourceType = 'commonjs' | ParserOptionsTypes.SourceType;
+    interface SharedConfigs {
+        [key: string]: Config | ConfigArray;
+    }
+    interface Plugin {
+        /**
+         * Shared configurations bundled with the plugin.
+         * Users will reference these directly in their config (i.e. `plugin.configs.recommended`).
+         */
+        configs?: SharedConfigs;
+        /**
+         * Metadata about your plugin for easier debugging and more effective caching of plugins.
+         */
+        meta?: {
+            [K in keyof PluginMeta]?: PluginMeta[K] | undefined;
+        };
+        /**
+         * The definition of plugin processors.
+         * Users can stringly reference the processor using the key in their config (i.e., `"pluginName/processorName"`).
+         */
+        processors?: Partial> | undefined;
+        /**
+         * The definition of plugin rules.
+         * The key must be the name of the rule that users will use
+         * Users can stringly reference the rule using the key they registered the plugin under combined with the rule name.
+         * i.e. for the user config `plugins: { foo: pluginReference }` - the reference would be `"foo/ruleName"`.
+         */
+        rules?: Record | undefined;
+    }
+    interface Plugins {
+        /**
+         * We intentionally omit the `configs` key from this object because it avoids
+         * type conflicts with old plugins that haven't updated their configs to flat configs yet.
+         * It's valid to reference these old plugins because ESLint won't access the
+         * `.config` property of a plugin when evaluating a flat config.
+         */
+        [pluginAlias: string]: Omit;
+    }
+    interface LinterOptions {
+        /**
+         * A Boolean value indicating if inline configuration is allowed.
+         */
+        noInlineConfig?: boolean;
+        /**
+         * A severity string indicating if and how unused disable and enable
+         * directives should be tracked and reported. For legacy compatibility, `true`
+         * is equivalent to `"warn"` and `false` is equivalent to `"off"`.
+         * @default "warn"
+         */
+        reportUnusedDisableDirectives?: boolean | SharedConfig.Severity | SharedConfig.SeverityString;
+        /**
+         * A severity string indicating if and how unused inline directives
+         * should be tracked and reported.
+         *
+         * since ESLint 9.19.0
+         * @default "off"
+         */
+        reportUnusedInlineConfigs?: SharedConfig.Severity | SharedConfig.SeverityString;
+    }
+    interface LanguageOptions {
+        /**
+         * The version of ECMAScript to support.
+         * May be any year (i.e., `2022`) or version (i.e., `5`).
+         * Set to `"latest"` for the most recent supported version.
+         * @default "latest"
+         */
+        ecmaVersion?: EcmaVersion | undefined;
+        /**
+         * An object specifying additional objects that should be added to the global scope during linting.
+         */
+        globals?: GlobalsConfig | undefined;
+        /**
+         * An object containing a `parse()` method or a `parseForESLint()` method.
+         * @default
+         * ```
+         * // https://github.com/eslint/espree
+         * require('espree')
+         * ```
+         */
+        parser?: Parser | undefined;
+        /**
+         * An object specifying additional options that are passed directly to the parser.
+         * The available options are parser-dependent.
+         */
+        parserOptions?: ParserOptions | undefined;
+        /**
+         * The type of JavaScript source code.
+         * Possible values are `"script"` for traditional script files, `"module"` for ECMAScript modules (ESM), and `"commonjs"` for CommonJS files.
+         * @default
+         * ```
+         * // for `.js` and `.mjs` files
+         * "module"
+         * // for `.cjs` files
+         * "commonjs"
+         * ```
+         */
+        sourceType?: SourceType | undefined;
+    }
+    interface Config {
+        /**
+         * The base path for files and ignores.
+         *
+         * Note that this is not permitted inside an `extends` array.
+         *
+         * Since ESLint 9.30.0
+         */
+        basePath?: string;
+        /**
+         * An array of glob patterns indicating the files that the configuration object should apply to.
+         * If not specified, the configuration object applies to all files matched by any other configuration object.
+         */
+        files?: (string | string[])[];
+        /**
+         * An array of glob patterns indicating the files that the configuration object should not apply to.
+         * If not specified, the configuration object applies to all files matched by files.
+         */
+        ignores?: string[];
+        /**
+         * Language specifier in the form `namespace/language-name` where `namespace` is a plugin name set in the `plugins` field.
+         */
+        language?: string;
+        /**
+         * An object containing settings related to how JavaScript is configured for linting.
+         */
+        languageOptions?: LanguageOptions;
+        /**
+         * An object containing settings related to the linting process.
+         */
+        linterOptions?: LinterOptions;
+        /**
+         * An string to identify the configuration object. Used in error messages and inspection tools.
+         */
+        name?: string;
+        /**
+         * An object containing a name-value mapping of plugin names to plugin objects.
+         * When `files` is specified, these plugins are only available to the matching files.
+         */
+        plugins?: Plugins;
+        /**
+         * Either an object containing `preprocess()` and `postprocess()` methods or
+         * a string indicating the name of a processor inside of a plugin
+         * (i.e., `"pluginName/processorName"`).
+         */
+        processor?: string | Processor;
+        /**
+         * An object containing the configured rules.
+         * When `files` or `ignores` are specified, these rule configurations are only available to the matching files.
+         */
+        rules?: Rules;
+        /**
+         * An object containing name-value pairs of information that should be available to all rules.
+         */
+        settings?: Settings;
+    }
+    type ConfigArray = Config[];
+    type ConfigPromise = Promise;
+    type ConfigFile = ConfigArray | ConfigPromise;
+}
+//# sourceMappingURL=Config.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.d.ts.map
new file mode 100644
index 0000000..0b98923
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/ts-eslint/Config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,KAAK,KAAK,kBAAkB,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAE/E,gBAAgB;AAChB,yBAAiB,YAAY,CAAC;IAC5B,KAAY,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC,KAAY,cAAc,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IACtD,KAAY,SAAS,GAAG,QAAQ,GAAG,cAAc,CAAC;IAElD,KAAY,mBAAmB,GAAG,CAAC,SAAS,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAE5D,KAAY,SAAS,GAAG,SAAS,GAAG,mBAAmB,CAAC;IACxD,KAAY,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;IAE7D,KAAY,wBAAwB,GAChC,KAAK,GACL,mC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diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.js
new file mode 100644
index 0000000..237089f
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.js
@@ -0,0 +1,3 @@
+"use strict";
+/* eslint-disable  @typescript-eslint/consistent-indexed-object-style,  @typescript-eslint/no-namespace */
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.d.ts
new file mode 100644
index 0000000..b186755
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.d.ts
@@ -0,0 +1,8 @@
+export { FlatESLint } from './eslint/FlatESLint';
+export { FlatESLint as ESLint } from './eslint/FlatESLint';
+export { 
+/**
+ * @deprecated - use ESLint instead
+ */
+LegacyESLint, } from './eslint/LegacyESLint';
+//# sourceMappingURL=ESLint.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.d.ts.map
new file mode 100644
index 0000000..df6c1f6
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ESLint.d.ts","sourceRoot":"","sources":["../../src/ts-eslint/ESLint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,UAAU,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO;AAEL;;GAEG;AACH,YAAY,GACb,MAAM,uBAAuB,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.js
new file mode 100644
index 0000000..3c8a8a8
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.js
@@ -0,0 +1,13 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyESLint = exports.ESLint = exports.FlatESLint = void 0;
+var FlatESLint_1 = require("./eslint/FlatESLint");
+Object.defineProperty(exports, "FlatESLint", { enumerable: true, get: function () { return FlatESLint_1.FlatESLint; } });
+var FlatESLint_2 = require("./eslint/FlatESLint");
+Object.defineProperty(exports, "ESLint", { enumerable: true, get: function () { return FlatESLint_2.FlatESLint; } });
+var LegacyESLint_1 = require("./eslint/LegacyESLint");
+// TODO(eslint@v10) - remove this in the next major
+/**
+ * @deprecated - use ESLint instead
+ */
+Object.defineProperty(exports, "LegacyESLint", { enumerable: true, get: function () { return LegacyESLint_1.LegacyESLint; } });
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.d.ts
new file mode 100644
index 0000000..cfa68e4
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.d.ts
@@ -0,0 +1,253 @@
+import type { ClassicConfig, FlatConfig, SharedConfig } from './Config';
+import type { Parser } from './Parser';
+import type { Processor as ProcessorType } from './Processor';
+import type { AnyRuleCreateFunction, AnyRuleModule, RuleCreateFunction, RuleFix, RuleModule } from './Rule';
+import type { SourceCode } from './SourceCode';
+export type MinimalRuleModule = Partial, 'create'>> & Pick, 'create'>;
+declare class LinterBase {
+    /**
+     * The version from package.json.
+     */
+    readonly version: string;
+    /**
+     * Initialize the Linter.
+     * @param config the config object
+     */
+    constructor(config?: Linter.LinterOptions);
+    /**
+     * Define a new parser module
+     * @param parserId Name of the parser
+     * @param parserModule The parser object
+     */
+    defineParser(parserId: string, parserModule: Parser.LooseParserModule): void;
+    /**
+     * Defines a new linting rule.
+     * @param ruleId A unique rule identifier
+     * @param ruleModule Function from context to object mapping AST node types to event handlers
+     */
+    defineRule(ruleId: string, ruleModule: MinimalRuleModule | RuleCreateFunction): void;
+    /**
+     * Defines many new linting rules.
+     * @param rulesToDefine map from unique rule identifier to rule
+     */
+    defineRules(rulesToDefine: Record | RuleCreateFunction>): void;
+    /**
+     * Gets an object with all loaded rules.
+     * @returns All loaded rules
+     */
+    getRules(): Map>;
+    /**
+     * Gets the `SourceCode` object representing the parsed source.
+     * @returns The `SourceCode` object.
+     */
+    getSourceCode(): SourceCode;
+    /**
+     * Verifies the text against the rules specified by the second argument.
+     * @param textOrSourceCode The text to parse or a SourceCode object.
+     * @param config An ESLintConfig instance to configure everything.
+     * @param filenameOrOptions The optional filename of the file being checked.
+     *        If this is not set, the filename will default to '' in the rule context.
+     *        If this is an object, then it has "filename", "allowInlineConfig", and some properties.
+     * @returns The results as an array of messages or an empty array if no messages.
+     */
+    verify(textOrSourceCode: string | SourceCode, config: Linter.ConfigType, filenameOrOptions?: string | Linter.VerifyOptions): Linter.LintMessage[];
+    /**
+     * The version from package.json.
+     */
+    static readonly version: string;
+    /**
+     * Performs multiple autofix passes over the text until as many fixes as possible have been applied.
+     * @param code The source text to apply fixes to.
+     * @param config The ESLint config object to use.
+     * @param options The ESLint options object to use.
+     * @returns The result of the fix operation as returned from the SourceCodeFixer.
+     */
+    verifyAndFix(code: string, config: Linter.ConfigType, options: Linter.FixOptions): Linter.FixReport;
+}
+declare namespace Linter {
+    interface LinterOptions {
+        /**
+         * Which config format to use.
+         * @default 'flat'
+         */
+        configType?: ConfigTypeSpecifier;
+        /**
+         * path to a directory that should be considered as the current working directory.
+         */
+        cwd?: string;
+    }
+    type ConfigTypeSpecifier = 'eslintrc' | 'flat';
+    type EnvironmentConfig = SharedConfig.EnvironmentConfig;
+    type GlobalsConfig = SharedConfig.GlobalsConfig;
+    type GlobalVariableOption = SharedConfig.GlobalVariableOption;
+    type GlobalVariableOptionBase = SharedConfig.GlobalVariableOptionBase;
+    type ParserOptions = SharedConfig.ParserOptions;
+    type PluginMeta = SharedConfig.PluginMeta;
+    type RuleEntry = SharedConfig.RuleEntry;
+    type RuleLevel = SharedConfig.RuleLevel;
+    type RuleLevelAndOptions = SharedConfig.RuleLevelAndOptions;
+    type RulesRecord = SharedConfig.RulesRecord;
+    type Severity = SharedConfig.Severity;
+    type SeverityString = SharedConfig.SeverityString;
+    /** @deprecated use {@link Linter.ConfigType} instead */
+    type Config = ClassicConfig.Config;
+    type ConfigType = ClassicConfig.Config | FlatConfig.Config | FlatConfig.ConfigArray;
+    /** @deprecated use {@link ClassicConfig.ConfigOverride} instead */
+    type ConfigOverride = ClassicConfig.ConfigOverride;
+    interface VerifyOptions {
+        /**
+         * Allow/disallow inline comments' ability to change config once it is set. Defaults to true if not supplied.
+         * Useful if you want to validate JS without comments overriding rules.
+         */
+        allowInlineConfig?: boolean;
+        /**
+         * if `true` then the linter doesn't make `fix` properties into the lint result.
+         */
+        disableFixes?: boolean;
+        /**
+         * the filename of the source code.
+         */
+        filename?: string;
+        /**
+         * the predicate function that selects adopt code blocks.
+         */
+        filterCodeBlock?: (filename: string, text: string) => boolean;
+        /**
+         * postprocessor for report messages.
+         * If provided, this should accept an array of the message lists
+         * for each code block returned from the preprocessor, apply a mapping to
+         * the messages as appropriate, and return a one-dimensional array of
+         * messages.
+         */
+        postprocess?: ProcessorType.PostProcess;
+        /**
+         * preprocessor for source text.
+         * If provided, this should accept a string of source text, and return an array of code blocks to lint.
+         */
+        preprocess?: ProcessorType.PreProcess;
+        /**
+         * Adds reported errors for unused `eslint-disable` directives.
+         */
+        reportUnusedDisableDirectives?: boolean | SeverityString;
+    }
+    interface FixOptions extends VerifyOptions {
+        /**
+         * Determines whether fixes should be applied.
+         */
+        fix?: boolean;
+    }
+    interface LintSuggestion {
+        desc: string;
+        fix: RuleFix;
+        messageId?: string;
+    }
+    interface LintMessage {
+        /**
+         * The 1-based column number.
+         */
+        column: number;
+        /**
+         * The 1-based column number of the end location.
+         */
+        endColumn?: number;
+        /**
+         * The 1-based line number of the end location.
+         */
+        endLine?: number;
+        /**
+         * If `true` then this is a fatal error.
+         */
+        fatal?: true;
+        /**
+         * Information for autofix.
+         */
+        fix?: RuleFix;
+        /**
+         * The 1-based line number.
+         */
+        line: number;
+        /**
+         * The error message.
+         */
+        message: string;
+        messageId?: string;
+        nodeType: string;
+        /**
+         * The ID of the rule which makes this message.
+         */
+        ruleId: string | null;
+        /**
+         * The severity of this message.
+         */
+        severity: Severity;
+        source: string | null;
+        /**
+         * Information for suggestions
+         */
+        suggestions?: LintSuggestion[];
+    }
+    interface FixReport {
+        /**
+         * True, if the code was fixed
+         */
+        fixed: boolean;
+        /**
+         * Collection of all messages for the given code
+         */
+        messages: LintMessage[];
+        /**
+         * Fixed code text (might be the same as input if no fixes were applied).
+         */
+        output: string;
+    }
+    /** @deprecated use {@link Parser.ParserModule} */
+    type ParserModule = Parser.LooseParserModule;
+    /** @deprecated use {@link Parser.ParseResult} */
+    type ESLintParseResult = Parser.ParseResult;
+    /** @deprecated use {@link ProcessorType.ProcessorModule} */
+    type Processor = ProcessorType.ProcessorModule;
+    interface Environment {
+        /**
+         * The definition of global variables.
+         */
+        globals?: GlobalsConfig;
+        /**
+         * The parser options that will be enabled under this environment.
+         */
+        parserOptions?: ParserOptions;
+    }
+    type LegacyPluginRules = Record;
+    type PluginRules = Record;
+    interface Plugin {
+        /**
+         * The definition of plugin configs.
+         */
+        configs?: Record;
+        /**
+         * The definition of plugin environments.
+         */
+        environments?: Record;
+        /**
+         * Metadata about your plugin for easier debugging and more effective caching of plugins.
+         */
+        meta?: PluginMeta;
+        /**
+         * The definition of plugin processors.
+         */
+        processors?: Record;
+        /**
+         * The definition of plugin rules.
+         */
+        rules?: LegacyPluginRules;
+    }
+}
+declare const Linter_base: typeof LinterBase;
+/**
+ * The Linter object does the actual evaluation of the JavaScript code. It doesn't do any filesystem operations, it
+ * simply parses and reports on the code. In particular, the Linter object does not process configuration objects
+ * or files.
+ */
+declare class Linter extends Linter_base {
+}
+export { Linter };
+//# sourceMappingURL=Linter.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.d.ts.map
new file mode 100644
index 0000000..49eacb2
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Linter.d.ts","sourceRoot":"","sources":["../../src/ts-eslint/Linter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EACV,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EAClB,OAAO,EACP,UAAU,EACX,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,MAAM,iBAAiB,CAC3B,UAAU,SAAS,MAAM,GAAG,MAAM,EAClC,OAAO,SAAS,SAAS,OAAO,EAAE,GAAG,EAAE,IACrC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,GAC1D,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC;AAGlD,OAAO,OAAO,UAAU;IACtB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;OAGG;gBACS,MAAM,CAAC,EAAE,MAAM,CAAC,aAAa;IAEzC;;;;OAIG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,iBAAiB,G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AAO,CAAC,EAAE,aAAa,CAAC;QACxB;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;KAC/B;IAGD,KAAY,iBAAiB,GAAG,MAAM,CACpC,MAAM,EACN,qBAAqB,GAAG,aAAa,CACtC,CAAC;IACF,KAAY,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAExD,UAAiB,MAAM;QACrB;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;QAC/C;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAC3C;;WAEG;QACH,IAAI,CAAC,EAAE,UAAU,CAAC;QAClB;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;QAC3D;;WAEG;QACH,KAAK,CAAC,EAAE,iBAAiB,CAAC;KAC3B;CACF;2BAOqC,OAAO,UAAU;AALvD;;;;GAIG;AACH,cAAM,MAAO,SAAQ,WAAmC;CAAG;AAE3D,OAAO,EAAE,MAAM,EAAE,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.js
new file mode 100644
index 0000000..6294e93
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.js
@@ -0,0 +1,13 @@
+"use strict";
+/* eslint-disable @typescript-eslint/no-namespace, no-restricted-syntax */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Linter = void 0;
+const eslint_1 = require("eslint");
+/**
+ * The Linter object does the actual evaluation of the JavaScript code. It doesn't do any filesystem operations, it
+ * simply parses and reports on the code. In particular, the Linter object does not process configuration objects
+ * or files.
+ */
+class Linter extends eslint_1.Linter {
+}
+exports.Linter = Linter;
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.d.ts
new file mode 100644
index 0000000..2d8757b
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.d.ts
@@ -0,0 +1,95 @@
+import type { ParserServices, TSESTree } from '../ts-estree';
+import type { ParserOptions } from './ParserOptions';
+import type { Scope } from './Scope';
+export declare namespace Parser {
+    interface ParserMeta {
+        /**
+         * The unique name of the parser.
+         */
+        name: string;
+        /**
+         * The a string identifying the version of the parser.
+         */
+        version?: string;
+    }
+    /**
+     * A loose definition of the ParserModule type for use with configs
+     * This type intended to relax validation of configs so that parsers that have
+     * different AST types or scope managers can still be passed to configs
+     *
+     * @see {@link LooseRuleDefinition}, {@link LooseProcessorModule}
+     */
+    type LooseParserModule = {
+        /**
+         * Information about the parser to uniquely identify it when serializing.
+         */
+        meta?: {
+            [K in keyof ParserMeta]?: ParserMeta[K] | undefined;
+        };
+        /**
+         * Parses the given text into an AST
+         */
+        parseForESLint(text: string, options?: unknown): {
+            [k in keyof ParseResult]: unknown;
+        };
+    } | {
+        /**
+         * Information about the parser to uniquely identify it when serializing.
+         */
+        meta?: {
+            [K in keyof ParserMeta]?: ParserMeta[K] | undefined;
+        };
+        /**
+         * Parses the given text into an ESTree AST
+         */
+        parse(text: string, options?: unknown): unknown;
+    };
+    type ParserModule = {
+        /**
+         * Information about the parser to uniquely identify it when serializing.
+         */
+        meta?: ParserMeta;
+        /**
+         * Parses the given text into an AST
+         */
+        parseForESLint(text: string, options?: ParserOptions): ParseResult;
+    } | {
+        /**
+         * Information about the parser to uniquely identify it when serializing.
+         */
+        meta?: ParserMeta;
+        /**
+         * Parses the given text into an ESTree AST
+         */
+        parse(text: string, options?: ParserOptions): TSESTree.Program;
+    };
+    interface ParseResult {
+        /**
+         * The ESTree AST
+         */
+        ast: TSESTree.Program;
+        /**
+         * A `ScopeManager` object.
+         * Custom parsers can use customized scope analysis for experimental/enhancement syntaxes.
+         * The default is the `ScopeManager` object which is created by `eslint-scope`.
+         */
+        scopeManager?: Scope.ScopeManager;
+        /**
+         * Any parser-dependent services (such as type checkers for nodes).
+         * The value of the services property is available to rules as `context.sourceCode.parserServices`.
+         * The default is an empty object.
+         */
+        services?: ParserServices;
+        /**
+         * An object to customize AST traversal.
+         * The keys of the object are the type of AST nodes.
+         * Each value is an array of the property names which should be traversed.
+         * The default is `KEYS` of `eslint-visitor-keys`.
+         */
+        visitorKeys?: VisitorKeys;
+    }
+    interface VisitorKeys {
+        [nodeType: string]: readonly string[];
+    }
+}
+//# sourceMappingURL=Parser.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.d.ts.map
new file mode 100644
index 0000000..5dbedee
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Parser.d.ts","sourceRoot":"","sources":["../../src/ts-eslint/Parser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,yBAAiB,MAAM,CAAC;IACtB,UAAiB,UAAU;QACzB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;IAED;;;;;;OAMG;IACH,KAAY,iBAAiB,GACzB;QACE;;WAEG;QACH,IAAI,CAAC,EAAE;aAAG,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS;SAAE,CAAC;QAC/D;;WAEG;QACH,cAAc,CACZ,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,OAAO,GAChB;aAEA,CAAC,IAAI,MAAM,WAAW,GAAG,OAAO;SAClC,CAAC;KACH,GACD;QACE;;WAEG;QACH,IAAI,CAAC,EAAE;aAAG,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS;SAAE,CAAC;QAC/D;;WAEG;QACH,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;KACjD,CAAC;IAEN,KAAY,YAAY,GACpB;QACE;;WAEG;QACH,IAAI,CAAC,EAAE,UAAU,CAAC;QAClB;;WAEG;QACH,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,WAAW,CAAC;KACpE,GACD;QACE;;WAEG;QACH,IAAI,CAAC,EAAE,UAAU,CAAC;QAClB;;WAEG;QACH,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,QAAQ,CAAC,OAAO,CAAC;KAChE,CAAC;IAEN,UAAiB,WAAW;QAC1B;;WAEG;QACH,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC;QACtB;;;;WAIG;QACH,YAAY,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;QAClC;;;;WAIG;QACH,QAAQ,CAAC,EAAE,cAAc,CAAC;QAC1B;;;;;WAKG;QACH,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B;IAGD,UAAiB,WAAW;QAC1B,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;KACvC;CACF"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.js
new file mode 100644
index 0000000..6769d6f
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.js
@@ -0,0 +1,3 @@
+"use strict";
+/* eslint-disable @typescript-eslint/no-namespace */
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.d.ts
new file mode 100644
index 0000000..3ebffc9
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.d.ts
@@ -0,0 +1,2 @@
+export type { DebugLevel, EcmaVersion, ParserOptions, SourceType, } from '@typescript-eslint/types';
+//# sourceMappingURL=ParserOptions.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.d.ts.map
new file mode 100644
index 0000000..7b1b589
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ParserOptions.d.ts","sourceRoot":"","sources":["../../src/ts-eslint/ParserOptions.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,0BAA0B,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.js
new file mode 100644
index 0000000..fabb051
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.d.ts
new file mode 100644
index 0000000..ef92625
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.d.ts
@@ -0,0 +1,64 @@
+import type { Linter } from './Linter';
+export declare namespace Processor {
+    interface ProcessorMeta {
+        /**
+         * The unique name of the processor.
+         */
+        name: string;
+        /**
+         * The a string identifying the version of the processor.
+         */
+        version?: string;
+    }
+    type PreProcess = (text: string, filename: string) => (string | {
+        filename: string;
+        text: string;
+    })[];
+    type PostProcess = (messagesList: Linter.LintMessage[][], filename: string) => Linter.LintMessage[];
+    interface ProcessorModule {
+        /**
+         * Information about the processor to uniquely identify it when serializing.
+         */
+        meta?: ProcessorMeta;
+        /**
+         * The function to merge messages.
+         */
+        postprocess?: PostProcess;
+        /**
+         * The function to extract code blocks.
+         */
+        preprocess?: PreProcess;
+        /**
+         * If `true` then it means the processor supports autofix.
+         */
+        supportsAutofix?: boolean;
+    }
+    /**
+     * A loose definition of the ParserModule type for use with configs
+     * This type intended to relax validation of configs so that parsers that have
+     * different AST types or scope managers can still be passed to configs
+     *
+     * @see {@link LooseRuleDefinition}, {@link LooseParserModule}
+     */
+    interface LooseProcessorModule {
+        /**
+         * Information about the processor to uniquely identify it when serializing.
+         */
+        meta?: {
+            [K in keyof ProcessorMeta]?: ProcessorMeta[K] | undefined;
+        };
+        /**
+         * The function to merge messages.
+         */
+        postprocess?: (messagesList: any, filename: string) => any;
+        /**
+         * The function to extract code blocks.
+         */
+        preprocess?: (text: string, filename: string) => any;
+        /**
+         * If `true` then it means the processor supports autofix.
+         */
+        supportsAutofix?: boolean | undefined;
+    }
+}
+//# sourceMappingURL=Processor.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.d.ts.map
new file mode 100644
index 0000000..1cb08cd
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Processor.d.ts","sourceRoot":"","sources":["../../src/ts-eslint/Processor.ts"],"names":[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int/utils/dist/ts-eslint/Processor.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.js
new file mode 100644
index 0000000..6769d6f
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.js
@@ -0,0 +1,3 @@
+"use strict";
+/* eslint-disable @typescript-eslint/no-namespace */
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts
new file mode 100644
index 0000000..ee2e2de
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts
@@ -0,0 +1,606 @@
+import type { JSONSchema4 } from '../json-schema';
+import type { ParserServices, TSESTree } from '../ts-estree';
+import type { AST } from './AST';
+import type { FlatConfig } from './Config';
+import type { Linter } from './Linter';
+import type { Scope } from './Scope';
+import type { SourceCode } from './SourceCode';
+export type RuleRecommendation = 'recommended' | 'strict' | 'stylistic';
+export interface RuleRecommendationAcrossConfigs {
+    recommended?: true;
+    strict: Partial;
+}
+export interface RuleMetaDataDocs {
+    /**
+     * Concise description of the rule.
+     */
+    description: string;
+    /**
+     * The URL of the rule's docs.
+     */
+    url?: string;
+    /**
+     * Mark this rule as feature-frozen.
+     */
+    frozen?: boolean;
+}
+export interface ExternalSpecifier {
+    /**
+     * Name of the referenced plugin / rule.
+     */
+    name?: string;
+    /**
+     * URL pointing to documentation for the plugin / rule.
+     */
+    url?: string;
+}
+export interface ReplacedByInfo {
+    /**
+     * General message presented to the user, e.g. how to replace the rule
+     */
+    message?: string;
+    /**
+     * URL to more information about this replacement in general
+     */
+    url?: string;
+    /**
+     * Name should be "eslint" if the replacement is an ESLint core rule. Omit
+     * the property if the replacement is in the same plugin.
+     */
+    plugin?: ExternalSpecifier;
+    /**
+     * Name and documentation of the replacement rule
+     */
+    rule?: ExternalSpecifier;
+}
+export interface DeprecatedInfo {
+    /**
+     * General message presented to the user, e.g. for the key rule why the rule
+     * is deprecated or for info how to replace the rule.
+     */
+    message?: string;
+    /**
+     * URL to more information about this deprecation in general.
+     */
+    url?: string;
+    /**
+     * An empty array explicitly states that there is no replacement.
+     */
+    replacedBy?: ReplacedByInfo[];
+    /**
+     * The package version since when the rule is deprecated (should use full
+     * semver without a leading "v").
+     */
+    deprecatedSince?: string;
+    /**
+     * The estimated version when the rule is removed (probably the next major
+     * version). null means the rule is "frozen" (will be available but will not
+     * be changed).
+     */
+    availableUntil?: string | null;
+}
+export interface RuleMetaData {
+    /**
+     * True if the rule is deprecated, false otherwise
+     */
+    deprecated?: boolean | DeprecatedInfo;
+    /**
+     * Documentation for the rule
+     */
+    docs?: PluginDocs & RuleMetaDataDocs;
+    /**
+     * The fixer category. Omit if there is no fixer
+     */
+    fixable?: 'code' | 'whitespace';
+    /**
+     * Specifies whether rules can return suggestions. Omit if there is no suggestions
+     */
+    hasSuggestions?: boolean;
+    /**
+     * A map of messages which the rule can report.
+     * The key is the messageId, and the string is the parameterised error string.
+     * See: https://eslint.org/docs/developer-guide/working-with-rules#messageids
+     */
+    messages: Record;
+    /**
+     * The name of the rule this rule was replaced by, if it was deprecated.
+     *
+     * @deprecated since eslint 9.21.0, in favor of `RuleMetaData#deprecated.replacedBy`
+     */
+    replacedBy?: readonly string[];
+    /**
+     * The options schema. Supply an empty array if there are no options.
+     */
+    schema: JSONSchema4 | readonly JSONSchema4[];
+    /**
+     * The type of rule.
+     * - `"problem"` means the rule is identifying code that either will cause an error or may cause a confusing behavior. Developers should consider this a high priority to resolve.
+     * - `"suggestion"` means the rule is identifying something that could be done in a better way but no errors will occur if the code isn’t changed.
+     * - `"layout"` means the rule cares primarily about whitespace, semicolons, commas, and parentheses, all the parts of the program that determine how the code looks rather than how it executes. These rules work on parts of the code that aren’t specified in the AST.
+     */
+    type: 'layout' | 'problem' | 'suggestion';
+    /**
+     * Specifies default options for the rule. If present, any user-provided options in their config will be merged on top of them recursively.
+     * This merging will be applied directly to `context.options`.
+     * If you want backwards-compatible support for earlier ESLint version, consider using the top-level `defaultOptions` instead.
+     *
+     * since ESLint 9.15.0
+     */
+    defaultOptions?: Options;
+}
+export interface RuleMetaDataWithDocs extends RuleMetaData {
+    /**
+     * Documentation for the rule
+     */
+    docs: PluginDocs & RuleMetaDataDocs;
+}
+export interface RuleFix {
+    range: Readonly;
+    text: string;
+}
+export interface RuleFixer {
+    insertTextAfter(nodeOrToken: TSESTree.Node | TSESTree.Token, text: string): RuleFix;
+    insertTextAfterRange(range: Readonly, text: string): RuleFix;
+    insertTextBefore(nodeOrToken: TSESTree.Node | TSESTree.Token, text: string): RuleFix;
+    insertTextBeforeRange(range: Readonly, text: string): RuleFix;
+    remove(nodeOrToken: TSESTree.Node | TSESTree.Token): RuleFix;
+    removeRange(range: Readonly): RuleFix;
+    replaceText(nodeOrToken: TSESTree.Node | TSESTree.Token, text: string): RuleFix;
+    replaceTextRange(range: Readonly, text: string): RuleFix;
+}
+export interface SuggestionReportDescriptor extends Omit, 'fix'> {
+    readonly fix: ReportFixFunction;
+}
+export type ReportFixFunction = (fixer: RuleFixer) => IterableIterator | readonly RuleFix[] | RuleFix | null;
+export type ReportSuggestionArray = SuggestionReportDescriptor[];
+export type ReportDescriptorMessageData = Readonly>;
+interface ReportDescriptorBase {
+    /**
+     * The parameters for the message string associated with `messageId`.
+     */
+    readonly data?: ReportDescriptorMessageData;
+    /**
+     * The fixer function.
+     */
+    readonly fix?: ReportFixFunction | null;
+    /**
+     * The messageId which is being reported.
+     */
+    readonly messageId: MessageIds;
+}
+interface ReportDescriptorWithSuggestion extends ReportDescriptorBase {
+    /**
+     * 6.7's Suggestions API
+     */
+    readonly suggest?: Readonly> | null;
+}
+interface ReportDescriptorNodeOptionalLoc {
+    /**
+     * An override of the location of the report
+     */
+    readonly loc?: Readonly | Readonly;
+    /**
+     * The Node or AST Token which the report is being attached to
+     */
+    readonly node: TSESTree.Node | TSESTree.Token;
+}
+interface ReportDescriptorLocOnly {
+    /**
+     * An override of the location of the report
+     */
+    loc: Readonly | Readonly;
+}
+export type ReportDescriptor = (ReportDescriptorLocOnly | ReportDescriptorNodeOptionalLoc) & ReportDescriptorWithSuggestion;
+/**
+ * Plugins can add their settings using declaration
+ * merging against this interface.
+ */
+export interface SharedConfigurationSettings {
+    [name: string]: unknown;
+}
+export interface RuleContext {
+    /**
+     * The rule ID.
+     */
+    id: string;
+    /**
+     * The language options configured for this run
+     */
+    languageOptions: FlatConfig.LanguageOptions;
+    /**
+     * An array of the configured options for this rule.
+     * This array does not include the rule severity.
+     */
+    options: Options;
+    /**
+     * The parser options configured for this run
+     */
+    parserOptions: Linter.ParserOptions;
+    /**
+     * The name of the parser from configuration, if in eslintrc (legacy) config.
+     */
+    parserPath: string | undefined;
+    /**
+     * An object containing parser-provided services for rules
+     *
+     * @deprecated in favor of `SourceCode#parserServices`
+     */
+    parserServices?: ParserServices;
+    /**
+     * The shared settings from configuration.
+     * We do not have any shared settings in this plugin.
+     */
+    settings: SharedConfigurationSettings;
+    /**
+     * Returns an array of the ancestors of the currently-traversed node, starting at
+     * the root of the AST and continuing through the direct parent of the current node.
+     * This array does not include the currently-traversed node itself.
+     *
+     * @deprecated in favor of `SourceCode#getAncestors`
+     */
+    getAncestors(): TSESTree.Node[];
+    /**
+     * Returns a list of variables declared by the given node.
+     * This information can be used to track references to variables.
+     *
+     * @deprecated in favor of `SourceCode#getDeclaredVariables`
+     */
+    getDeclaredVariables(node: TSESTree.Node): readonly Scope.Variable[];
+    /**
+     * Returns the current working directory passed to Linter.
+     * It is a path to a directory that should be considered as the current working directory.
+     * @deprecated in favor of `RuleContext#cwd`
+     */
+    getCwd(): string;
+    /**
+     * The current working directory passed to Linter.
+     * It is a path to a directory that should be considered as the current working directory.
+     */
+    cwd: string;
+    /**
+     * Returns the filename associated with the source.
+     *
+     * @deprecated in favor of `RuleContext#filename`
+     */
+    getFilename(): string;
+    /**
+     * The filename associated with the source.
+     */
+    filename: string;
+    /**
+     * Returns the full path of the file on disk without any code block information (unlike `getFilename()`).
+     * @deprecated in favor of `RuleContext#physicalFilename`
+     */
+    getPhysicalFilename(): string;
+    /**
+     * The full path of the file on disk without any code block information (unlike `filename`).
+     */
+    physicalFilename: string;
+    /**
+     * Returns the scope of the currently-traversed node.
+     * This information can be used track references to variables.
+     *
+     * @deprecated in favor of `SourceCode#getScope`
+     */
+    getScope(): Scope.Scope;
+    /**
+     * Returns a SourceCode object that you can use to work with the source that
+     * was passed to ESLint.
+     *
+     * @deprecated in favor of `RuleContext#sourceCode`
+     */
+    getSourceCode(): Readonly;
+    /**
+     * A SourceCode object that you can use to work with the source that
+     * was passed to ESLint.
+     */
+    sourceCode: Readonly;
+    /**
+     * Marks a variable with the given name in the current scope as used.
+     * This affects the no-unused-vars rule.
+     *
+     * @deprecated in favor of `SourceCode#markVariableAsUsed`
+     */
+    markVariableAsUsed(name: string): boolean;
+    /**
+     * Reports a problem in the code.
+     */
+    report(descriptor: ReportDescriptor): void;
+}
+/**
+ * Part of the code path analysis feature of ESLint:
+ * https://eslint.org/docs/latest/extend/code-path-analysis
+ *
+ * These are used in the `onCodePath*` methods. (Note that the `node` parameter
+ * of these methods is intentionally omitted.)
+ *
+ * @see https://github.com/typescript-eslint/typescript-eslint/issues/6993
+ */
+export interface CodePath {
+    /** Code paths of functions this code path contains. */
+    childCodePaths: CodePath[];
+    /**
+     * Segments of the current traversal position.
+     *
+     * @deprecated
+     */
+    currentSegments: CodePathSegment[];
+    /** The final segments which includes both returned and thrown. */
+    finalSegments: CodePathSegment[];
+    /**
+     * A unique string. Respective rules can use `id` to save additional
+     * information for each code path.
+     */
+    id: string;
+    initialSegment: CodePathSegment;
+    /** The final segments which includes only returned. */
+    returnedSegments: CodePathSegment[];
+    /** The final segments which includes only thrown. */
+    thrownSegments: CodePathSegment[];
+    /** The code path of the upper function/global scope. */
+    upper: CodePath | null;
+}
+/**
+ * Part of the code path analysis feature of ESLint:
+ * https://eslint.org/docs/latest/extend/code-path-analysis
+ *
+ * These are used in the `onCodePath*` methods. (Note that the `node` parameter
+ * of these methods is intentionally omitted.)
+ *
+ * @see https://github.com/typescript-eslint/typescript-eslint/issues/6993
+ */
+export interface CodePathSegment {
+    /**
+     * A unique string. Respective rules can use `id` to save additional
+     * information for each segment.
+     */
+    id: string;
+    /**
+     * The next segments. If forking, there are two or more. If final, there is
+     * nothing.
+     */
+    nextSegments: CodePathSegment[];
+    /**
+     * The previous segments. If merging, there are two or more. If initial, there
+     * is nothing.
+     */
+    prevSegments: CodePathSegment[];
+    /**
+     * A flag which shows whether it is reachable. This becomes `false` when
+     * preceded by `return`, `throw`, `break`, or `continue`.
+     */
+    reachable: boolean;
+}
+/**
+ * Part of the code path analysis feature of ESLint:
+ * https://eslint.org/docs/latest/extend/code-path-analysis
+ *
+ * This type is unused in the `typescript-eslint` codebase since putting it on
+ * the `nodeSelector` for `RuleListener` would break the existing definition.
+ * However, it is exported here for the purposes of manual type-assertion.
+ *
+ * @see https://github.com/typescript-eslint/typescript-eslint/issues/6993
+ */
+export type CodePathFunction = ((codePath: CodePath, node: TSESTree.Node) => void) | ((fromSegment: CodePathSegment, toSegment: CodePathSegment, node: TSESTree.Node) => void) | ((segment: CodePathSegment, node: TSESTree.Node) => void);
+export type RuleFunction = (node: T) => void;
+interface RuleListenerBaseSelectors {
+    AccessorProperty?: RuleFunction;
+    ArrayExpression?: RuleFunction;
+    ArrayPattern?: RuleFunction;
+    ArrowFunctionExpression?: RuleFunction;
+    AssignmentExpression?: RuleFunction;
+    AssignmentPattern?: RuleFunction;
+    AwaitExpression?: RuleFunction;
+    BinaryExpression?: RuleFunction;
+    BlockStatement?: RuleFunction;
+    BreakStatement?: RuleFunction;
+    CallExpression?: RuleFunction;
+    CatchClause?: RuleFunction;
+    ChainExpression?: RuleFunction;
+    ClassBody?: RuleFunction;
+    ClassDeclaration?: RuleFunction;
+    ClassExpression?: RuleFunction;
+    ConditionalExpression?: RuleFunction;
+    ContinueStatement?: RuleFunction;
+    DebuggerStatement?: RuleFunction;
+    Decorator?: RuleFunction;
+    DoWhileStatement?: RuleFunction;
+    EmptyStatement?: RuleFunction;
+    ExportAllDeclaration?: RuleFunction;
+    ExportDefaultDeclaration?: RuleFunction;
+    ExportNamedDeclaration?: RuleFunction;
+    ExportSpecifier?: RuleFunction;
+    ExpressionStatement?: RuleFunction;
+    ForInStatement?: RuleFunction;
+    ForOfStatement?: RuleFunction;
+    ForStatement?: RuleFunction;
+    FunctionDeclaration?: RuleFunction;
+    FunctionExpression?: RuleFunction;
+    Identifier?: RuleFunction;
+    IfStatement?: RuleFunction;
+    ImportAttribute?: RuleFunction;
+    ImportDeclaration?: RuleFunction;
+    ImportDefaultSpecifier?: RuleFunction;
+    ImportExpression?: RuleFunction;
+    ImportNamespaceSpecifier?: RuleFunction;
+    ImportSpecifier?: RuleFunction;
+    JSXAttribute?: RuleFunction;
+    JSXClosingElement?: RuleFunction;
+    JSXClosingFragment?: RuleFunction;
+    JSXElement?: RuleFunction;
+    JSXEmptyExpression?: RuleFunction;
+    JSXExpressionContainer?: RuleFunction;
+    JSXFragment?: RuleFunction;
+    JSXIdentifier?: RuleFunction;
+    JSXMemberExpression?: RuleFunction;
+    JSXNamespacedName?: RuleFunction;
+    JSXOpeningElement?: RuleFunction;
+    JSXOpeningFragment?: RuleFunction;
+    JSXSpreadAttribute?: RuleFunction;
+    JSXSpreadChild?: RuleFunction;
+    JSXText?: RuleFunction;
+    LabeledStatement?: RuleFunction;
+    Literal?: RuleFunction;
+    LogicalExpression?: RuleFunction;
+    MemberExpression?: RuleFunction;
+    MetaProperty?: RuleFunction;
+    MethodDefinition?: RuleFunction;
+    NewExpression?: RuleFunction;
+    ObjectExpression?: RuleFunction;
+    ObjectPattern?: RuleFunction;
+    PrivateIdentifier?: RuleFunction;
+    Program?: RuleFunction;
+    Property?: RuleFunction;
+    PropertyDefinition?: RuleFunction;
+    RestElement?: RuleFunction;
+    ReturnStatement?: RuleFunction;
+    SequenceExpression?: RuleFunction;
+    SpreadElement?: RuleFunction;
+    StaticBlock?: RuleFunction;
+    Super?: RuleFunction;
+    SwitchCase?: RuleFunction;
+    SwitchStatement?: RuleFunction;
+    TaggedTemplateExpression?: RuleFunction;
+    TemplateElement?: RuleFunction;
+    TemplateLiteral?: RuleFunction;
+    ThisExpression?: RuleFunction;
+    ThrowStatement?: RuleFunction;
+    TryStatement?: RuleFunction;
+    TSAbstractAccessorProperty?: RuleFunction;
+    TSAbstractKeyword?: RuleFunction;
+    TSAbstractMethodDefinition?: RuleFunction;
+    TSAbstractPropertyDefinition?: RuleFunction;
+    TSAnyKeyword?: RuleFunction;
+    TSArrayType?: RuleFunction;
+    TSAsExpression?: RuleFunction;
+    TSAsyncKeyword?: RuleFunction;
+    TSBigIntKeyword?: RuleFunction;
+    TSBooleanKeyword?: RuleFunction;
+    TSCallSignatureDeclaration?: RuleFunction;
+    TSClassImplements?: RuleFunction;
+    TSConditionalType?: RuleFunction;
+    TSConstructorType?: RuleFunction;
+    TSConstructSignatureDeclaration?: RuleFunction;
+    TSDeclareFunction?: RuleFunction;
+    TSDeclareKeyword?: RuleFunction;
+    TSEmptyBodyFunctionExpression?: RuleFunction;
+    TSEnumBody?: RuleFunction;
+    TSEnumDeclaration?: RuleFunction;
+    TSEnumMember?: RuleFunction;
+    TSExportAssignment?: RuleFunction;
+    TSExportKeyword?: RuleFunction;
+    TSExternalModuleReference?: RuleFunction;
+    TSFunctionType?: RuleFunction;
+    TSImportEqualsDeclaration?: RuleFunction;
+    TSImportType?: RuleFunction;
+    TSIndexedAccessType?: RuleFunction;
+    TSIndexSignature?: RuleFunction;
+    TSInferType?: RuleFunction;
+    TSInstantiationExpression?: RuleFunction;
+    TSInterfaceBody?: RuleFunction;
+    TSInterfaceDeclaration?: RuleFunction;
+    TSInterfaceHeritage?: RuleFunction;
+    TSIntersectionType?: RuleFunction;
+    TSIntrinsicKeyword?: RuleFunction;
+    TSLiteralType?: RuleFunction;
+    TSMappedType?: RuleFunction;
+    TSMethodSignature?: RuleFunction;
+    TSModuleBlock?: RuleFunction;
+    TSModuleDeclaration?: RuleFunction;
+    TSNamedTupleMember?: RuleFunction;
+    TSNamespaceExportDeclaration?: RuleFunction;
+    TSNeverKeyword?: RuleFunction;
+    TSNonNullExpression?: RuleFunction;
+    TSNullKeyword?: RuleFunction;
+    TSNumberKeyword?: RuleFunction;
+    TSObjectKeyword?: RuleFunction;
+    TSOptionalType?: RuleFunction;
+    TSParameterProperty?: RuleFunction;
+    TSPrivateKeyword?: RuleFunction;
+    TSPropertySignature?: RuleFunction;
+    TSProtectedKeyword?: RuleFunction;
+    TSPublicKeyword?: RuleFunction;
+    TSQualifiedName?: RuleFunction;
+    TSReadonlyKeyword?: RuleFunction;
+    TSRestType?: RuleFunction;
+    TSSatisfiesExpression?: RuleFunction;
+    TSStaticKeyword?: RuleFunction;
+    TSStringKeyword?: RuleFunction;
+    TSSymbolKeyword?: RuleFunction;
+    TSTemplateLiteralType?: RuleFunction;
+    TSThisType?: RuleFunction;
+    TSTupleType?: RuleFunction;
+    TSTypeAliasDeclaration?: RuleFunction;
+    TSTypeAnnotation?: RuleFunction;
+    TSTypeAssertion?: RuleFunction;
+    TSTypeLiteral?: RuleFunction;
+    TSTypeOperator?: RuleFunction;
+    TSTypeParameter?: RuleFunction;
+    TSTypeParameterDeclaration?: RuleFunction;
+    TSTypeParameterInstantiation?: RuleFunction;
+    TSTypePredicate?: RuleFunction;
+    TSTypeQuery?: RuleFunction;
+    TSTypeReference?: RuleFunction;
+    TSUndefinedKeyword?: RuleFunction;
+    TSUnionType?: RuleFunction;
+    TSUnknownKeyword?: RuleFunction;
+    TSVoidKeyword?: RuleFunction;
+    UnaryExpression?: RuleFunction;
+    UpdateExpression?: RuleFunction;
+    VariableDeclaration?: RuleFunction;
+    VariableDeclarator?: RuleFunction;
+    WhileStatement?: RuleFunction;
+    WithStatement?: RuleFunction;
+    YieldExpression?: RuleFunction;
+}
+type RuleListenerExitSelectors = {
+    [K in keyof RuleListenerBaseSelectors as `${K}:exit`]: RuleListenerBaseSelectors[K];
+};
+type RuleListenerCatchAllBaseCase = Record;
+export interface RuleListenerExtension {
+}
+export type RuleListener = RuleListenerBaseSelectors & RuleListenerCatchAllBaseCase & RuleListenerExitSelectors;
+export interface RuleModule {
+    /**
+     * Function which returns an object with methods that ESLint calls to “visit”
+     * nodes while traversing the abstract syntax tree.
+     */
+    create(context: Readonly>): ExtendedRuleListener;
+    /**
+     * Default options the rule will be run with
+     */
+    defaultOptions: Options;
+    /**
+     * Metadata about the rule
+     */
+    meta: RuleMetaData;
+}
+export type AnyRuleModule = RuleModule;
+export interface RuleModuleWithMetaDocs extends RuleModule {
+    /**
+     * Metadata about the rule
+     */
+    meta: RuleMetaDataWithDocs;
+}
+export type AnyRuleModuleWithMetaDocs = RuleModuleWithMetaDocs;
+/**
+ * A loose definition of the RuleModule type for use with configs. This type is
+ * intended to relax validation of types so that we can have basic validation
+ * without being overly strict about nitty gritty details matching.
+ *
+ * For example the plugin might be declared using an old version of our types or
+ * they might use the DefinitelyTyped eslint types. Ultimately we don't need
+ * super strict validation in a config - a loose shape match is "good enough" to
+ * help validate the config is correct.
+ *
+ * @see {@link LooseParserModule}, {@link LooseProcessorModule}
+ */
+export type LooseRuleDefinition = LooseRuleCreateFunction | {
+    create: LooseRuleCreateFunction;
+    meta?: object | undefined;
+};
+export type LooseRuleCreateFunction = (context: any) => Record;
+export type RuleCreateFunction = (context: Readonly>) => RuleListener;
+export type AnyRuleCreateFunction = RuleCreateFunction;
+export {};
+//# sourceMappingURL=Rule.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts.map
new file mode 100644
index 0000000..6da5afe
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../src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AAY,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CACpD,MAAM,EACN,SAAS,OAAO,EAAE,CACnB,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.js
new file mode 100644
index 0000000..fabb051
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts
new file mode 100644
index 0000000..53027b3
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts
@@ -0,0 +1,184 @@
+import type { AST_NODE_TYPES, AST_TOKEN_TYPES } from '../ts-estree';
+import type { ClassicConfig } from './Config';
+import type { Linter } from './Linter';
+import type { ParserOptions } from './ParserOptions';
+import type { ReportDescriptorMessageData, RuleCreateFunction, RuleModule, SharedConfigurationSettings } from './Rule';
+/**
+ * @deprecated Use `@typescript-eslint/rule-tester` instead.
+ */
+export interface ValidTestCase {
+    /**
+     * Code for the test case.
+     */
+    readonly code: string;
+    /**
+     * Environments for the test case.
+     */
+    readonly env?: Readonly;
+    /**
+     * The fake filename for the test case. Useful for rules that make assertion about filenames.
+     */
+    readonly filename?: string;
+    /**
+     * The additional global variables.
+     */
+    readonly globals?: Readonly;
+    /**
+     * Name for the test case.
+     */
+    readonly name?: string;
+    /**
+     * Run this case exclusively for debugging in supported test frameworks.
+     */
+    readonly only?: boolean;
+    /**
+     * Options for the test case.
+     */
+    readonly options?: Readonly;
+    /**
+     * The absolute path for the parser.
+     */
+    readonly parser?: string;
+    /**
+     * Options for the parser.
+     */
+    readonly parserOptions?: Readonly;
+    /**
+     * Settings for the test case.
+     */
+    readonly settings?: Readonly;
+}
+/**
+ * @deprecated Use `@typescript-eslint/rule-tester` instead.
+ */
+export interface SuggestionOutput {
+    /**
+     * The data used to fill the message template.
+     */
+    readonly data?: ReportDescriptorMessageData;
+    /**
+     * Reported message ID.
+     */
+    readonly messageId: MessageIds;
+    /**
+     * NOTE: Suggestions will be applied as a stand-alone change, without triggering multi-pass fixes.
+     * Each individual error has its own suggestion, so you have to show the correct, _isolated_ output for each suggestion.
+     */
+    readonly output: string;
+}
+/**
+ * @deprecated Use `@typescript-eslint/rule-tester` instead.
+ */
+export interface InvalidTestCase extends ValidTestCase {
+    /**
+     * Expected errors.
+     */
+    readonly errors: readonly TestCaseError[];
+    /**
+     * The expected code after autofixes are applied. If set to `null`, the test runner will assert that no autofix is suggested.
+     */
+    readonly output?: string | string[] | null;
+}
+/**
+ * @deprecated Use `@typescript-eslint/rule-tester` instead.
+ */
+export interface TestCaseError {
+    /**
+     * The 1-based column number of the reported start location.
+     */
+    readonly column?: number;
+    /**
+     * The data used to fill the message template.
+     */
+    readonly data?: ReportDescriptorMessageData;
+    /**
+     * The 1-based column number of the reported end location.
+     */
+    readonly endColumn?: number;
+    /**
+     * The 1-based line number of the reported end location.
+     */
+    readonly endLine?: number;
+    /**
+     * The 1-based line number of the reported start location.
+     */
+    readonly line?: number;
+    /**
+     * Reported message ID.
+     */
+    readonly messageId: MessageIds;
+    /**
+     * Reported suggestions.
+     */
+    readonly suggestions?: readonly SuggestionOutput[] | null;
+    /**
+     * The type of the reported AST node.
+     */
+    readonly type?: AST_NODE_TYPES | AST_TOKEN_TYPES;
+}
+/**
+ * @param text a string describing the rule
+ * @deprecated Use `@typescript-eslint/rule-tester` instead.
+ */
+export type RuleTesterTestFrameworkFunction = (text: string, callback: () => void) => void;
+/**
+ * @deprecated Use `@typescript-eslint/rule-tester` instead.
+ */
+export interface RunTests {
+    readonly invalid: readonly InvalidTestCase[];
+    readonly valid: readonly (string | ValidTestCase)[];
+}
+/**
+ * @deprecated Use `@typescript-eslint/rule-tester` instead.
+ */
+export interface RuleTesterConfig extends ClassicConfig.Config {
+    readonly parser: string;
+    readonly parserOptions?: Readonly;
+}
+/**
+ * @deprecated Use `@typescript-eslint/rule-tester` instead.
+ */
+declare class RuleTesterBase {
+    /**
+     * Creates a new instance of RuleTester.
+     * @param testerConfig extra configuration for the tester
+     */
+    constructor(testerConfig?: RuleTesterConfig);
+    /**
+     * Adds a new rule test to execute.
+     * @param ruleName The name of the rule to run.
+     * @param rule The rule to test.
+     * @param tests The collection of tests to run.
+     */
+    run(ruleName: string, rule: RuleModule, tests: RunTests): void;
+    /**
+     * If you supply a value to this property, the rule tester will call this instead of using the version defined on
+     * the global namespace.
+     */
+    static get describe(): RuleTesterTestFrameworkFunction;
+    static set describe(value: RuleTesterTestFrameworkFunction | undefined);
+    /**
+     * If you supply a value to this property, the rule tester will call this instead of using the version defined on
+     * the global namespace.
+     */
+    static get it(): RuleTesterTestFrameworkFunction;
+    static set it(value: RuleTesterTestFrameworkFunction | undefined);
+    /**
+     * If you supply a value to this property, the rule tester will call this instead of using the version defined on
+     * the global namespace.
+     */
+    static get itOnly(): RuleTesterTestFrameworkFunction;
+    static set itOnly(value: RuleTesterTestFrameworkFunction | undefined);
+    /**
+     * Define a rule for one particular run of tests.
+     */
+    defineRule(name: string, rule: RuleCreateFunction | RuleModule): void;
+}
+declare const RuleTester_base: typeof RuleTesterBase;
+/**
+ * @deprecated Use `@typescript-eslint/rule-tester` instead.
+ */
+export declare class RuleTester extends RuleTester_base {
+}
+export {};
+//# sourceMappingURL=RuleTester.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts.map
new file mode 100644
index 0000000..39cafe5
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"RuleTester.d.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,UAAU,CAAC,UAAU,SAAS,MAAM,EAAE,OAAO,SAAS,SAAS,OAAO,EAAE,EACtE,IAAI,EAAE,MAAM,EACZ,IAAI,EACA,kBAAkB,CAAC,UAAU,EAAE,OAAO,CAAC,GACvC,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC,GAClC,IAAI;CACR;+BAKoD,OAAO,cAAc;AAH1E;;GAEG;AACH,qBAAa,UAAW,SAAQ,eAA2C;CAAG"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.js
new file mode 100644
index 0000000..8b47740
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.js
@@ -0,0 +1,11 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.RuleTester = void 0;
+/* eslint-disable @typescript-eslint/no-deprecated */
+const eslint_1 = require("eslint");
+/**
+ * @deprecated Use `@typescript-eslint/rule-tester` instead.
+ */
+class RuleTester extends eslint_1.RuleTester {
+}
+exports.RuleTester = RuleTester;
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.d.ts
new file mode 100644
index 0000000..674ebd6
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.d.ts
@@ -0,0 +1,43 @@
+import * as scopeManager from '@typescript-eslint/scope-manager';
+export declare namespace Scope {
+    type ScopeManager = scopeManager.ScopeManager;
+    type Reference = scopeManager.Reference;
+    type Variable = scopeManager.ScopeVariable;
+    type Scope = scopeManager.Scope;
+    const ScopeType: typeof scopeManager.ScopeType;
+    type DefinitionType = scopeManager.Definition;
+    type Definition = scopeManager.Definition;
+    const DefinitionType: typeof scopeManager.DefinitionType;
+    namespace Definitions {
+        type CatchClauseDefinition = scopeManager.CatchClauseDefinition;
+        type ClassNameDefinition = scopeManager.ClassNameDefinition;
+        type FunctionNameDefinition = scopeManager.FunctionNameDefinition;
+        type ImplicitGlobalVariableDefinition = scopeManager.ImplicitGlobalVariableDefinition;
+        type ImportBindingDefinition = scopeManager.ImportBindingDefinition;
+        type ParameterDefinition = scopeManager.ParameterDefinition;
+        type TSEnumMemberDefinition = scopeManager.TSEnumMemberDefinition;
+        type TSEnumNameDefinition = scopeManager.TSEnumNameDefinition;
+        type TSModuleNameDefinition = scopeManager.TSModuleNameDefinition;
+        type TypeDefinition = scopeManager.TypeDefinition;
+        type VariableDefinition = scopeManager.VariableDefinition;
+    }
+    namespace Scopes {
+        type BlockScope = scopeManager.BlockScope;
+        type CatchScope = scopeManager.CatchScope;
+        type ClassScope = scopeManager.ClassScope;
+        type ConditionalTypeScope = scopeManager.ConditionalTypeScope;
+        type ForScope = scopeManager.ForScope;
+        type FunctionExpressionNameScope = scopeManager.FunctionExpressionNameScope;
+        type FunctionScope = scopeManager.FunctionScope;
+        type FunctionTypeScope = scopeManager.FunctionTypeScope;
+        type GlobalScope = scopeManager.GlobalScope;
+        type MappedTypeScope = scopeManager.MappedTypeScope;
+        type ModuleScope = scopeManager.ModuleScope;
+        type SwitchScope = scopeManager.SwitchScope;
+        type TSEnumScope = scopeManager.TSEnumScope;
+        type TSModuleScope = scopeManager.TSModuleScope;
+        type TypeScope = scopeManager.TypeScope;
+        type WithScope = scopeManager.WithScope;
+    }
+}
+//# sourceMappingURL=Scope.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.d.ts.map
new file mode 100644
index 0000000..2aace60
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Scope.d.ts","sourceRoot":"","sources":["../../src/ts-eslint/Scope.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,YAAY,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oB,CAAC;QACrE,KAAY,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAC;QAC7C,KAAY,2BAA2B,GACrC,YAAY,CAAC,2BAA2B,CAAC;QAC3C,KAAY,aAAa,GAAG,YAAY,CAAC,aAAa,CAAC;QACvD,KAAY,iBAAiB,GAAG,YAAY,CAAC,iBAAiB,CAAC;QAC/D,KAAY,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC;QACnD,KAAY,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC;QAC3D,KAAY,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC;QACnD,KAAY,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC;QACnD,KAAY,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC;QACnD,KAAY,aAAa,GAAG,YAAY,CAAC,aAAa,CAAC;QACvD,KAAY,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC;QAC/C,KAAY,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC;KAChD;CACF"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.js
new file mode 100644
index 0000000..64c90f7
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.js
@@ -0,0 +1,43 @@
+"use strict";
+/* eslint-disable @typescript-eslint/no-namespace */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+    Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+    o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Scope = void 0;
+const scopeManager = __importStar(require("@typescript-eslint/scope-manager"));
+var Scope;
+(function (Scope) {
+    Scope.ScopeType = scopeManager.ScopeType;
+    Scope.DefinitionType = scopeManager.DefinitionType;
+})(Scope || (exports.Scope = Scope = {}));
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts
new file mode 100644
index 0000000..f313ee3
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts
@@ -0,0 +1,355 @@
+import type { ParserServices, TSESTree } from '../ts-estree';
+import type { Parser } from './Parser';
+import type { Scope } from './Scope';
+declare class TokenStore {
+    /**
+     * Checks whether any comments exist or not between the given 2 nodes.
+     * @param left The node to check.
+     * @param right The node to check.
+     * @returns `true` if one or more comments exist.
+     */
+    commentsExistBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token): boolean;
+    /**
+     * Gets all comment tokens directly after the given node or token.
+     * @param nodeOrToken The AST node or token to check for adjacent comment tokens.
+     * @returns An array of comments in occurrence order.
+     */
+    getCommentsAfter(nodeOrToken: TSESTree.Node | TSESTree.Token): TSESTree.Comment[];
+    /**
+     * Gets all comment tokens directly before the given node or token.
+     * @param nodeOrToken The AST node or token to check for adjacent comment tokens.
+     * @returns An array of comments in occurrence order.
+     */
+    getCommentsBefore(nodeOrToken: TSESTree.Node | TSESTree.Token): TSESTree.Comment[];
+    /**
+     * Gets all comment tokens inside the given node.
+     * @param node The AST node to get the comments for.
+     * @returns An array of comments in occurrence order.
+     */
+    getCommentsInside(node: TSESTree.Node): TSESTree.Comment[];
+    /**
+     * Gets the first token of the given node.
+     * @param node The AST node.
+     * @param options The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
+     * @returns An object representing the token.
+     */
+    getFirstToken(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions | null;
+    /**
+     * Gets the first token between two non-overlapping nodes.
+     * @param left Node before the desired token range.
+     * @param right Node after the desired token range.
+     * @param options The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
+     * @returns An object representing the token.
+     */
+    getFirstTokenBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions | null;
+    /**
+     * Gets the first `count` tokens of the given node.
+     * @param node The AST node.
+     * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`.
+     */
+    getFirstTokens(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions[];
+    /**
+     * Gets the first `count` tokens between two non-overlapping nodes.
+     * @param left Node before the desired token range.
+     * @param right Node after the desired token range.
+     * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`.
+     * @returns Tokens between left and right.
+     */
+    getFirstTokensBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions[];
+    /**
+     * Gets the last token of the given node.
+     * @param node The AST node.
+     * @param options The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
+     * @returns An object representing the token.
+     */
+    getLastToken(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions | null;
+    /**
+     * Gets the last token between two non-overlapping nodes.
+     * @param left Node before the desired token range.
+     * @param right Node after the desired token range.
+     * @param options The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
+     * @returns An object representing the token.
+     */
+    getLastTokenBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions | null;
+    /**
+     * Gets the last `count` tokens of the given node.
+     * @param node The AST node.
+     * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`.
+     */
+    getLastTokens(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions[];
+    /**
+     * Gets the last `count` tokens between two non-overlapping nodes.
+     * @param left Node before the desired token range.
+     * @param right Node after the desired token range.
+     * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`.
+     * @returns Tokens between left and right.
+     */
+    getLastTokensBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions[];
+    /**
+     * Gets the token that follows a given node or token.
+     * @param node The AST node or token.
+     * @param options The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
+     * @returns An object representing the token.
+     */
+    getTokenAfter(node: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions | null;
+    /**
+     * Gets the token that precedes a given node or token.
+     * @param node The AST node or token.
+     * @param options The option object
+     * @returns An object representing the token.
+     */
+    getTokenBefore(node: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions | null;
+    /**
+     * Gets the token starting at the specified index.
+     * @param offset Index of the start of the token's range.
+     * @param options The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
+     * @returns The token starting at index, or null if no such token.
+     */
+    getTokenByRangeStart(offset: number, options?: T): SourceCode.ReturnTypeFromOptions | null;
+    /**
+     * Gets all tokens that are related to the given node.
+     * @param node The AST node.
+     * @param beforeCount The number of tokens before the node to retrieve.
+     * @param afterCount The number of tokens after the node to retrieve.
+     * @returns Array of objects representing tokens.
+     */
+    getTokens(node: TSESTree.Node, beforeCount?: number, afterCount?: number): TSESTree.Token[];
+    /**
+     * Gets all tokens that are related to the given node.
+     * @param node The AST node.
+     * @param options The option object. If this is a function then it's `options.filter`.
+     * @returns Array of objects representing tokens.
+     */
+    getTokens(node: TSESTree.Node, options: T): SourceCode.ReturnTypeFromOptions[];
+    /**
+     * Gets the `count` tokens that follows a given node or token.
+     * @param node The AST node.
+     * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`.
+     */
+    getTokensAfter(node: TSESTree.Node | TSESTree.Token, options?: number | T): SourceCode.ReturnTypeFromOptions[];
+    /**
+     * Gets the `count` tokens that precedes a given node or token.
+     * @param node The AST node.
+     * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`.
+     */
+    getTokensBefore(node: TSESTree.Node | TSESTree.Token, options?: number | T): SourceCode.ReturnTypeFromOptions[];
+    /**
+     * Gets all of the tokens between two non-overlapping nodes.
+     * @param left Node before the desired token range.
+     * @param right Node after the desired token range.
+     * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`.
+     * @returns Tokens between left and right.
+     */
+    getTokensBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: number | T): SourceCode.ReturnTypeFromOptions[];
+}
+declare class SourceCodeBase extends TokenStore {
+    /**
+     * Represents parsed source code.
+     * @param ast The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped.
+     */
+    constructor(text: string, ast: SourceCode.Program);
+    /**
+     * Represents parsed source code.
+     * @param config The config object.
+     */
+    constructor(config: SourceCode.SourceCodeConfig);
+    /**
+     * The parsed AST for the source code.
+     */
+    ast: SourceCode.Program;
+    applyInlineConfig(): void;
+    applyLanguageOptions(): void;
+    finalize(): void;
+    /**
+     * Retrieves an array containing all comments in the source code.
+     * @returns An array of comment nodes.
+     */
+    getAllComments(): TSESTree.Comment[];
+    /**
+     * Converts a (line, column) pair into a range index.
+     * @param location A line/column location
+     * @returns The range index of the location in the file.
+     */
+    getIndexFromLoc(location: TSESTree.Position): number;
+    /**
+     * Gets the entire source text split into an array of lines.
+     * @returns The source text as an array of lines.
+     */
+    getLines(): string[];
+    /**
+     * Converts a source text index into a (line, column) pair.
+     * @param index The index of a character in a file
+     * @returns A {line, column} location object with a 0-indexed column
+     */
+    getLocFromIndex(index: number): TSESTree.Position;
+    /**
+     * Gets the deepest node containing a range index.
+     * @param index Range index of the desired node.
+     * @returns The node if found or `null` if not found.
+     */
+    getNodeByRangeIndex(index: number): TSESTree.Node | null;
+    /**
+     * Gets the source code for the given node.
+     * @param node The AST node to get the text for.
+     * @param beforeCount The number of characters before the node to retrieve.
+     * @param afterCount The number of characters after the node to retrieve.
+     * @returns The text representing the AST node.
+     */
+    getText(node?: TSESTree.Node | TSESTree.Token, beforeCount?: number, afterCount?: number): string;
+    /**
+     * The flag to indicate that the source code has Unicode BOM.
+     */
+    hasBOM: boolean;
+    /**
+     * Determines if two nodes or tokens have at least one whitespace character
+     * between them. Order does not matter. Returns false if the given nodes or
+     * tokens overlap.
+     * @param first The first node or token to check between.
+     * @param second The second node or token to check between.
+     * @returns True if there is a whitespace character between any of the tokens found between the two given nodes or tokens.
+     */
+    isSpaceBetween(first: TSESTree.Node | TSESTree.Token, second: TSESTree.Node | TSESTree.Token): boolean;
+    /**
+     * Determines if two nodes or tokens have at least one whitespace character
+     * between them. Order does not matter. Returns false if the given nodes or
+     * tokens overlap.
+     * For backward compatibility, this method returns true if there are
+     * `JSXText` tokens that contain whitespace between the two.
+     * @param first The first node or token to check between.
+     * @param second The second node or token to check between.
+     * @returns {boolean} True if there is a whitespace character between
+     * any of the tokens found between the two given nodes or tokens.
+     * @deprecated in favor of isSpaceBetween
+     */
+    isSpaceBetweenTokens(first: TSESTree.Token, second: TSESTree.Token): boolean;
+    /**
+     * Returns the scope of the given node.
+     * This information can be used track references to variables.
+     */
+    getScope(node: TSESTree.Node): Scope.Scope;
+    /**
+     * Returns an array of the ancestors of the given node, starting at
+     * the root of the AST and continuing through the direct parent of the current node.
+     * This array does not include the currently-traversed node itself.
+     */
+    getAncestors(node: TSESTree.Node): TSESTree.Node[];
+    /**
+     * Returns a list of variables declared by the given node.
+     * This information can be used to track references to variables.
+     */
+    getDeclaredVariables(node: TSESTree.Node): readonly Scope.Variable[];
+    /**
+     * Marks a variable with the given name in the current scope as used.
+     * This affects the no-unused-vars rule.
+     */
+    markVariableAsUsed(name: string, node: TSESTree.Node): boolean;
+    /**
+     * The source code split into lines according to ECMA-262 specification.
+     * This is done to avoid each rule needing to do so separately.
+     */
+    lines: string[];
+    /**
+     * The indexes in `text` that each line starts
+     */
+    lineStartIndices: number[];
+    /**
+     * The parser services of this source code.
+     */
+    parserServices?: Partial;
+    /**
+     * The scope of this source code.
+     */
+    scopeManager: Scope.ScopeManager | null;
+    /**
+     * The original text source code. BOM was stripped from this text.
+     */
+    text: string;
+    /**
+     * All of the tokens and comments in the AST.
+     *
+     * TODO: rename to 'tokens'
+     */
+    tokensAndComments: TSESTree.Token[];
+    /**
+     * The visitor keys to traverse AST.
+     */
+    visitorKeys: SourceCode.VisitorKeys;
+    /**
+     * Split the source code into multiple lines based on the line delimiters.
+     * @param text Source code as a string.
+     * @returns Array of source code lines.
+     */
+    static splitLines(text: string): string[];
+}
+declare namespace SourceCode {
+    interface Program extends TSESTree.Program {
+        comments: TSESTree.Comment[];
+        tokens: TSESTree.Token[];
+    }
+    interface SourceCodeConfig {
+        /**
+         * The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped.
+         */
+        ast: Program;
+        /**
+         * The parser services.
+         */
+        parserServices: ParserServices | null;
+        /**
+         * The scope of this source code.
+         */
+        scopeManager: Scope.ScopeManager | null;
+        /**
+         * The source code text.
+         */
+        text: string;
+        /**
+         * The visitor keys to traverse AST.
+         */
+        visitorKeys: VisitorKeys | null;
+    }
+    type VisitorKeys = Parser.VisitorKeys;
+    type FilterPredicate = (token: TSESTree.Token) => boolean;
+    type GetFilterPredicate = Filter extends ((token: TSESTree.Token) => token is infer U extends TSESTree.Token) ? U : Default;
+    type GetFilterPredicateFromOptions = Options extends {
+        filter?: FilterPredicate;
+    } ? GetFilterPredicate : GetFilterPredicate;
+    type ReturnTypeFromOptions = T extends {
+        includeComments: true;
+    } ? GetFilterPredicateFromOptions : GetFilterPredicateFromOptions>;
+    type CursorWithSkipOptions = number | FilterPredicate | {
+        /**
+         * The predicate function to choose tokens.
+         */
+        filter?: FilterPredicate;
+        /**
+         * The flag to iterate comments as well.
+         */
+        includeComments?: boolean;
+        /**
+         * The count of tokens the cursor skips.
+         */
+        skip?: number;
+    };
+    type CursorWithCountOptions = number | FilterPredicate | {
+        /**
+         * The maximum count of tokens the cursor iterates.
+         */
+        count?: number;
+        /**
+         * The predicate function to choose tokens.
+         */
+        filter?: FilterPredicate;
+        /**
+         * The flag to iterate comments as well.
+         */
+        includeComments?: boolean;
+    };
+}
+declare const SourceCode_base: typeof SourceCodeBase;
+declare class SourceCode extends SourceCode_base {
+}
+export { SourceCode };
+//# sourceMappingURL=SourceCode.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts.map
new file mode 100644
index 0000000..40e3dfc
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"SourceCode.d.ts","sourceRoot":"","sources":["../../src/ts-eslint/SourceCode.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,OAAO,UAAU;IACtB;;;;;OAKG;IACH,oBAAoB,CAClB,IAAI,EAAE,QAAQ,CAAC,IAAI,GA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ACH,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEN,KAAY,sBAAsB,GAC9B,MAAM,GACN,eAAe,GACf;QACE;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QACf;;WAEG;QACH,MAAM,CAAC,EAAE,eAAe,CAAC;QACzB;;WAEG;QACH,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;CACP;+BAE6C,OAAO,cAAc;AAAnE,cAAM,UAAW,SAAQ,eAA2C;CAAG;AAEvE,OAAO,EAAE,UAAU,EAAE,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.js
new file mode 100644
index 0000000..838f071
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.js
@@ -0,0 +1,8 @@
+"use strict";
+/* eslint-disable @typescript-eslint/no-namespace, no-restricted-syntax */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SourceCode = void 0;
+const eslint_1 = require("eslint");
+class SourceCode extends eslint_1.SourceCode {
+}
+exports.SourceCode = SourceCode;
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.d.ts
new file mode 100644
index 0000000..6a23ca1
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.d.ts
@@ -0,0 +1,382 @@
+import type { Linter } from '../Linter';
+import type { RuleMetaData } from '../Rule';
+export declare class ESLintBase> {
+    /**
+     * Creates a new instance of the main ESLint API.
+     * @param options The options for this instance.
+     */
+    constructor(options?: Options);
+    /**
+     * This method calculates the configuration for a given file, which can be useful for debugging purposes.
+     * - It resolves and merges extends and overrides settings into the top level configuration.
+     * - It resolves the parser setting to absolute paths.
+     * - It normalizes the plugins setting to align short names. (e.g., eslint-plugin-foo → foo)
+     * - It adds the processor setting if a legacy file extension processor is matched.
+     * - It doesn't interpret the env setting to the globals and parserOptions settings, so the result object contains
+     *   the env setting as is.
+     * @param filePath The path to the file whose configuration you would like to calculate. Directory paths are forbidden
+     *                 because ESLint cannot handle the overrides setting.
+     * @returns The promise that will be fulfilled with a configuration object.
+     */
+    calculateConfigForFile(filePath: string): Promise;
+    getRulesMetaForResults(results: LintResult[]): Record>>;
+    /**
+     * This method checks if a given file is ignored by your configuration.
+     * @param filePath The path to the file you want to check.
+     * @returns The promise that will be fulfilled with whether the file is ignored or not. If the file is ignored, then
+     *          it will return true.
+     */
+    isPathIgnored(filePath: string): Promise;
+    /**
+     * This method lints the files that match the glob patterns and then returns the results.
+     * @param patterns The lint target files. This can contain any of file paths, directory paths, and glob patterns.
+     * @returns The promise that will be fulfilled with an array of LintResult objects.
+     */
+    lintFiles(patterns: string | string[]): Promise;
+    /**
+     * This method lints the given source code text and then returns the results.
+     *
+     * By default, this method uses the configuration that applies to files in the current working directory (the cwd
+     * constructor option). If you want to use a different configuration, pass options.filePath, and ESLint will load the
+     * same configuration that eslint.lintFiles() would use for a file at options.filePath.
+     *
+     * If the options.filePath value is configured to be ignored, this method returns an empty array. If the
+     * options.warnIgnored option is set along with the options.filePath option, this method returns a LintResult object.
+     * In that case, the result may contain a warning that indicates the file was ignored.
+     * @param code The source code text to check.
+     * @returns The promise that will be fulfilled with an array of LintResult objects. This is an array (despite there
+     *          being only one lint result) in order to keep the interfaces between this and the eslint.lintFiles()
+     *          method similar.
+     */
+    lintText(code: string, options?: LintTextOptions): Promise;
+    /**
+     * This method loads a formatter. Formatters convert lint results to a human- or machine-readable string.
+     * @param name TThe path to the file you want to check.
+     * The following values are allowed:
+     * - undefined. In this case, loads the "stylish" built-in formatter.
+     * - A name of built-in formatters.
+     * - A name of third-party formatters. For examples:
+     * -- `foo` will load eslint-formatter-foo.
+     * -- `@foo` will load `@foo/eslint-formatter`.
+     * -- `@foo/bar` will load `@foo/eslint-formatter-bar`.
+     * - A path to the file that defines a formatter. The path must contain one or more path separators (/) in order to distinguish if it's a path or not. For example, start with ./.
+     * @returns The promise that will be fulfilled with a Formatter object.
+     */
+    loadFormatter(name?: string): Promise;
+    /**
+     * This method copies the given results and removes warnings. The returned value contains only errors.
+     * @param results The LintResult objects to filter.
+     * @returns The filtered LintResult objects.
+     */
+    static getErrorResults(results: LintResult): LintResult;
+    /**
+     * This method writes code modified by ESLint's autofix feature into its respective file. If any of the modified
+     * files don't exist, this method does nothing.
+     * @param results The LintResult objects to write.
+     * @returns The promise that will be fulfilled after all files are written.
+     */
+    static outputFixes(results: LintResult[]): Promise;
+    /**
+     * The version text.
+     */
+    static readonly version: string;
+    /**
+     * The type of configuration used by this class.
+     */
+    static readonly configType: Linter.ConfigTypeSpecifier;
+}
+export interface ESLintOptions {
+    /**
+     * If false is present, ESLint suppresses comment directives in source code.
+     * If this option is false, it overrides the noInlineConfig setting in your configurations.
+     * @default true
+     */
+    allowInlineConfig?: boolean;
+    /**
+     * Configuration object, extended by all configurations used with this instance.
+     * You can use this option to define the default settings that will be used if your configuration files don't
+     * configure it.
+     * @default null
+     */
+    baseConfig?: Config | null;
+    /**
+     * If `true` is present, the `eslint.lintFiles()` method caches lint results and uses it if each target file is not
+     * changed. Please mind that ESLint doesn't clear the cache when you upgrade ESLint plugins. In that case, you have
+     * to remove the cache file manually. The `eslint.lintText()` method doesn't use caches even if you pass the
+     * options.filePath to the method.
+     * @default false
+     */
+    cache?: boolean;
+    /**
+     * The eslint.lintFiles() method writes caches into this file.
+     * @default '.eslintcache'
+     */
+    cacheLocation?: string;
+    /**
+     * Strategy for the cache to use for detecting changed files.
+     * @default 'metadata'
+     */
+    cacheStrategy?: 'content' | 'metadata';
+    /**
+     * The working directory. This must be an absolute path.
+     * @default process.cwd()
+     */
+    cwd?: string;
+    /**
+     * Unless set to false, the `eslint.lintFiles()` method will throw an error when no target files are found.
+     * @default true
+     */
+    errorOnUnmatchedPattern?: boolean;
+    /**
+     * If `true` is present, the `eslint.lintFiles()` and `eslint.lintText()` methods work in autofix mode.
+     * If a predicate function is present, the methods pass each lint message to the function, then use only the
+     * lint messages for which the function returned true.
+     * @default false
+     */
+    fix?: boolean | ((message: LintMessage) => boolean);
+    /**
+     * The types of the rules that the `eslint.lintFiles()` and `eslint.lintText()` methods use for autofix.
+     * @default null
+     */
+    fixTypes?: ('directive' | 'problem' | 'suggestion')[] | null;
+    /**
+     * If false is present, the `eslint.lintFiles()` method doesn't interpret glob patterns.
+     * @default true
+     */
+    globInputPaths?: boolean;
+    /**
+     * Configuration object, overrides all configurations used with this instance.
+     * You can use this option to define the settings that will be used even if your configuration files configure it.
+     * @default null
+     */
+    overrideConfig?: Config | null;
+    /**
+     * When set to true, missing patterns cause the linting operation to short circuit and not report any failures.
+     * @default false
+     */
+    passOnNoPatterns?: boolean;
+    /**
+     * The plugin implementations that ESLint uses for the plugins setting of your configuration.
+     * This is a map-like object. Those keys are plugin IDs and each value is implementation.
+     * @default null
+     */
+    plugins?: Record | null;
+}
+export interface DeprecatedRuleInfo {
+    /**
+     *  The rule IDs that replace this deprecated rule.
+     */
+    replacedBy: string[];
+    /**
+     *  The rule ID.
+     */
+    ruleId: string;
+}
+/**
+ * The LintResult value is the information of the linting result of each file.
+ */
+export interface LintResult {
+    /**
+     * The number of errors. This includes fixable errors.
+     */
+    errorCount: number;
+    /**
+     * The number of fatal errors.
+     */
+    fatalErrorCount: number;
+    /**
+     * The absolute path to the file of this result. This is the string "" if the file path is unknown (when you
+     * didn't pass the options.filePath option to the eslint.lintText() method).
+     */
+    filePath: string;
+    /**
+     * The number of errors that can be fixed automatically by the fix constructor option.
+     */
+    fixableErrorCount: number;
+    /**
+     * The number of warnings that can be fixed automatically by the fix constructor option.
+     */
+    fixableWarningCount: number;
+    /**
+     * The array of LintMessage objects.
+     */
+    messages: LintMessage[];
+    /**
+     * The source code of the file that was linted, with as many fixes applied as possible.
+     */
+    output?: string;
+    /**
+     * The original source code text. This property is undefined if any messages didn't exist or the output
+     * property exists.
+     */
+    source?: string;
+    /**
+     * Timing information of the lint run.
+     * This exists if and only if the `--stats` CLI flag was added or the `stats: true`
+     * option was passed to the ESLint class
+     * @since 9.0.0
+     */
+    stats?: LintStats;
+    /**
+     * The array of SuppressedLintMessage objects.
+     */
+    suppressedMessages: SuppressedLintMessage[];
+    /**
+     * The information about the deprecated rules that were used to check this file.
+     */
+    usedDeprecatedRules: DeprecatedRuleInfo[];
+    /**
+     * The number of warnings. This includes fixable warnings.
+     */
+    warningCount: number;
+}
+export interface LintStats {
+    /**
+     * The number of times ESLint has applied at least one fix after linting.
+     */
+    fixPasses: number;
+    /**
+     * The times spent on (parsing, fixing, linting) a file, where the linting refers to the timing information for each rule.
+     */
+    times: {
+        passes: LintStatsTimePass[];
+    };
+}
+export interface LintStatsTimePass {
+    /**
+     * The total time that is spent on applying fixes to the code.
+     */
+    fix: LintStatsFixTime;
+    /**
+     * The total time that is spent when parsing a file.
+     */
+    parse: LintStatsParseTime;
+    /**
+     * The total time that is spent on a rule.
+     */
+    rules?: Record;
+    /**
+     * The cumulative total
+     */
+    total: number;
+}
+export interface LintStatsParseTime {
+    total: number;
+}
+export interface LintStatsRuleTime {
+    total: number;
+}
+export interface LintStatsFixTime {
+    total: number;
+}
+export interface LintTextOptions {
+    /**
+     * The path to the file of the source code text. If omitted, the result.filePath becomes the string "".
+     */
+    filePath?: string;
+    /**
+     * If true is present and the options.filePath is a file ESLint should ignore, this method returns a lint result
+     * contains a warning message.
+     */
+    warnIgnored?: boolean;
+}
+/**
+ * The LintMessage value is the information of each linting error.
+ */
+export interface LintMessage {
+    /**
+     * The 1-based column number of the begin point of this message.
+     */
+    column: number | undefined;
+    /**
+     * The 1-based column number of the end point of this message. This property is undefined if this message
+     * is not a range.
+     */
+    endColumn: number | undefined;
+    /**
+     * The 1-based line number of the end point of this message. This property is undefined if this
+     * message is not a range.
+     */
+    endLine: number | undefined;
+    /**
+     * `true` if this is a fatal error unrelated to a rule, like a parsing error.
+     */
+    fatal?: boolean | undefined;
+    /**
+     * The EditInfo object of autofix. This property is undefined if this message is not fixable.
+     */
+    fix: EditInfo | undefined;
+    /**
+     * The 1-based line number of the begin point of this message.
+     */
+    line: number | undefined;
+    /**
+     * The error message
+     */
+    message: string;
+    /**
+     * The rule name that generates this lint message. If this message is generated by the ESLint core rather than
+     * rules, this is null.
+     */
+    ruleId: string | null;
+    /**
+     * The severity of this message. 1 means warning and 2 means error.
+     */
+    severity: 1 | 2;
+    /**
+     * The list of suggestions. Each suggestion is the pair of a description and an EditInfo object to fix code. API
+     * users such as editor integrations can choose one of them to fix the problem of this message. This property is
+     * undefined if this message doesn't have any suggestions.
+     */
+    suggestions: {
+        desc: string;
+        fix: EditInfo;
+    }[] | undefined;
+}
+/**
+ * The SuppressedLintMessage value is the information of each suppressed linting error.
+ */
+export interface SuppressedLintMessage extends LintMessage {
+    /**
+     * The list of suppressions.
+     */
+    suppressions?: {
+        /**
+         * The free text description added after the `--` in the comment
+         */
+        justification: string;
+        /**
+         * Right now, this is always `directive`
+         */
+        kind: string;
+    }[];
+}
+/**
+ * The EditInfo value is information to edit text.
+ *
+ * This edit information means replacing the range of the range property by the text property value. It's like
+ * sourceCodeText.slice(0, edit.range[0]) + edit.text + sourceCodeText.slice(edit.range[1]). Therefore, it's an add
+ * if the range[0] and range[1] property values are the same value, and it's removal if the text property value is
+ * empty string.
+ */
+export interface EditInfo {
+    /**
+     * The pair of 0-based indices in source code text to remove.
+     */
+    range: [number, number];
+    /**
+     * The text to add.
+     */
+    text: string;
+}
+/**
+ * The Formatter value is the object to convert the LintResult objects to text.
+ */
+export interface Formatter {
+    /**
+     * The method to convert the LintResult objects to text.
+     * Promise return supported since 8.4.0
+     */
+    format(results: LintResult[]): string | Promise;
+}
+//# sourceMappingURL=ESLintShared.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.d.ts.map
new file mode 100644
index 0000000..cb39f4d
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ESLintShared.d.ts","sourceRoot":"","sources":["../../../src/ts-eslint/eslint/ESLintShared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,CAAC,OAAO,OAAO,UAAU,CAC7B,MAAM,SAAS,MAAM,CAAC,UAAU,EAChC,OAAO,SAAS,aAAa,CAAC,MAAM,CAAC;IAErC;;;OAGG;gBACS,OAAO,CAAC,EAAE,OAAO;IAE7B;;;;;;;;;;;OAWG;IACH,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAEzD,sBAAsB,CACpB,OAAO,EAAE,UAAU,EAAE,GACpB,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAEhE;;;;;OAKG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAEjD;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAE7D;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAExE;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAMhD;;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AEG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACzD"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.js
new file mode 100644
index 0000000..fabb051
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.d.ts
new file mode 100644
index 0000000..947b894
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.d.ts
@@ -0,0 +1,88 @@
+import type { FlatConfig } from '../Config';
+import type * as Shared from './ESLintShared';
+declare class FlatESLintBase extends Shared.ESLintBase {
+    static readonly configType: 'flat';
+    /**
+     * Returns a configuration object for the given file based on the CLI options.
+     * This is the same logic used by the ESLint CLI executable to determine
+     * configuration for each file it processes.
+     * @param filePath The path of the file to retrieve a config object for.
+     * @returns A configuration object for the file or `undefined` if there is no configuration data for the object.
+     */
+    calculateConfigForFile(filePath: string): Promise;
+    /**
+     * Finds the config file being used by this instance based on the options
+     * passed to the constructor.
+     * @returns The path to the config file being used or `undefined` if no config file is being used.
+     */
+    findConfigFile(): Promise;
+}
+declare const FlatESLint_base: typeof FlatESLintBase;
+/**
+ * The ESLint class is the primary class to use in Node.js applications.
+ * This class depends on the Node.js fs module and the file system, so you cannot use it in browsers.
+ *
+ * If you want to lint code on browsers, use the Linter class instead.
+ */
+export declare class FlatESLint extends FlatESLint_base {
+}
+export declare namespace FlatESLint {
+    interface ESLintOptions extends Shared.ESLintOptions {
+        /**
+         * If false is present, the eslint.lintFiles() method doesn't respect `ignorePatterns` ignorePatterns in your configuration.
+         * @default true
+         */
+        ignore?: boolean;
+        /**
+         * Ignore file patterns to use in addition to config ignores. These patterns are relative to cwd.
+         * @default null
+         */
+        ignorePatterns?: string[] | null;
+        /**
+         * The path to a configuration file. Overrides all configurations used with this instance.
+         * The options.overrideConfig option is applied after this option is applied.
+         *
+         * - When falsy, searches for default config file.
+         * - When `true`, does not do any config file lookup.
+         * - When a string, considered to be a config file name.
+         *
+         * @default false
+         */
+        overrideConfigFile?: boolean | string;
+        /**
+         * A predicate function that filters rules to be run.
+         * This function is called with an object containing `ruleId` and `severity`, and returns `true` if the rule should be run.
+         * @default () => true
+         */
+        ruleFilter?: RuleFilter;
+        /**
+         * When set to true, additional statistics are added to the lint results.
+         * @see {@link https://eslint.org/docs/latest/extend/stats}
+         * @default false
+         */
+        stats?: boolean;
+        /**
+         * Show warnings when the file list includes ignored files.
+         * @default true
+         */
+        warnIgnored?: boolean;
+    }
+    type DeprecatedRuleInfo = Shared.DeprecatedRuleInfo;
+    type EditInfo = Shared.EditInfo;
+    type Formatter = Shared.Formatter;
+    type LintMessage = Shared.LintMessage;
+    type LintResult = Shared.LintResult;
+    type LintStats = Shared.LintStats;
+    type LintStatsFixTime = Shared.LintStatsFixTime;
+    type LintStatsParseTime = Shared.LintStatsParseTime;
+    type LintStatsRuleTime = Shared.LintStatsRuleTime;
+    type LintStatsTimePass = Shared.LintStatsTimePass;
+    type LintTextOptions = Shared.LintTextOptions;
+    type SuppressedLintMessage = Shared.SuppressedLintMessage;
+    type RuleFilter = (rule: {
+        ruleId: string;
+        severity: number;
+    }) => boolean;
+}
+export {};
+//# sourceMappingURL=FlatESLint.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.d.ts.map
new file mode 100644
index 0000000..17e2ab7
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"FlatESLint.d.ts","sourceRoot":"","sources":["../../../src/ts-eslint/eslint/FlatESLint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAG9C,OAAO,OAAO,cAAe,SAAQ,MAAM,CAAC,UAAU,CACpD,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC,WAAW,EAC1C,UAAU,CAAC,aAAa,CACzB;IACC,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAEnC;;;;;;OAMG;IACH,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;IAEpE;;;;OAIG;IACH,cAAc,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAC9C;+BAQoD,OAAO,cAAc;AAN1E;;;;;GAKG;AACH,qBAAa,UAAW,SAAQ,eAA2C;CAAG;AAC9E,yBAAiB,UAAU,CAAC;IAC1B,UAAiB,aACf,SAAQ,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC;QACpD;;;WAGG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;;WAGG;QACH,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QACjC;;;;;;;;;WASG;QACH,kBAAkB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACtC;;;;WAIG;QACH,UAAU,CAAC,EAAE,UAAU,CAAC;QACxB;;;;WAIG;QACH,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB;;;WAGG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB;IACD,KAAY,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;IAC3D,KAAY,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IACvC,KAAY,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACzC,KAAY,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAC7C,KAAY,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAC3C,KAAY,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACzC,KAAY,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACvD,KAAY,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;IAC3D,KAAY,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;IACzD,KAAY,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;IACzD,KAAY,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IACrD,KAAY,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;IACjE,KAAY,UAAU,GAAG,CAAC,IAAI,EAAE;QAC9B,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;KAClB,KAAK,OAAO,CAAC;CACf"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.js
new file mode 100644
index 0000000..ef83a97
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.js
@@ -0,0 +1,14 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.FlatESLint = void 0;
+/* eslint-disable @typescript-eslint/no-namespace */
+const use_at_your_own_risk_1 = require("eslint/use-at-your-own-risk");
+/**
+ * The ESLint class is the primary class to use in Node.js applications.
+ * This class depends on the Node.js fs module and the file system, so you cannot use it in browsers.
+ *
+ * If you want to lint code on browsers, use the Linter class instead.
+ */
+class FlatESLint extends use_at_your_own_risk_1.FlatESLint {
+}
+exports.FlatESLint = FlatESLint;
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.d.ts
new file mode 100644
index 0000000..c843bbe
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.d.ts
@@ -0,0 +1,73 @@
+import type { ClassicConfig } from '../Config';
+import type { Linter } from '../Linter';
+import type * as Shared from './ESLintShared';
+declare class LegacyESLintBase extends Shared.ESLintBase {
+    static readonly configType: 'eslintrc';
+}
+declare const LegacyESLint_base: typeof LegacyESLintBase;
+/**
+ * The ESLint class is the primary class to use in Node.js applications.
+ * This class depends on the Node.js fs module and the file system, so you cannot use it in browsers.
+ *
+ * If you want to lint code on browsers, use the Linter class instead.
+ */
+export declare class LegacyESLint extends LegacyESLint_base {
+}
+export declare namespace LegacyESLint {
+    interface ESLintOptions extends Shared.ESLintOptions {
+        /**
+         * If you pass directory paths to the eslint.lintFiles() method, ESLint checks the files in those directories that
+         * have the given extensions. For example, when passing the src/ directory and extensions is [".js", ".ts"], ESLint
+         * will lint *.js and *.ts files in src/. If extensions is null, ESLint checks *.js files and files that match
+         * overrides[].files patterns in your configuration.
+         * Note: This option only applies when you pass directory paths to the eslint.lintFiles() method.
+         * If you pass glob patterns, ESLint will lint all files matching the glob pattern regardless of extension.
+         */
+        extensions?: string[] | null;
+        /**
+         * If false is present, the eslint.lintFiles() method doesn't respect `.eslintignore` files in your configuration.
+         * @default true
+         */
+        ignore?: boolean;
+        /**
+         * The path to a file ESLint uses instead of `$CWD/.eslintignore`.
+         * If a path is present and the file doesn't exist, this constructor will throw an error.
+         */
+        ignorePath?: string;
+        /**
+         * The path to a configuration file, overrides all configurations used with this instance.
+         * The options.overrideConfig option is applied after this option is applied.
+         */
+        overrideConfigFile?: string | null;
+        /**
+         * The severity to report unused eslint-disable directives.
+         * If this option is a severity, it overrides the reportUnusedDisableDirectives setting in your configurations.
+         */
+        reportUnusedDisableDirectives?: Linter.SeverityString | null;
+        /**
+         * The path to a directory where plugins should be resolved from.
+         * If null is present, ESLint loads plugins from the location of the configuration file that contains the plugin
+         * setting.
+         * If a path is present, ESLint loads all plugins from there.
+         */
+        resolvePluginsRelativeTo?: string | null;
+        /**
+         * An array of paths to directories to load custom rules from.
+         */
+        rulePaths?: string[];
+        /**
+         * If false is present, ESLint doesn't load configuration files (.eslintrc.* files).
+         * Only the configuration of the constructor options is valid.
+         */
+        useEslintrc?: boolean;
+    }
+    type DeprecatedRuleInfo = Shared.DeprecatedRuleInfo;
+    type EditInfo = Shared.EditInfo;
+    type Formatter = Shared.Formatter;
+    type LintMessage = Shared.LintMessage;
+    type LintResult = Omit;
+    type LintTextOptions = Shared.LintTextOptions;
+    type SuppressedLintMessage = Shared.SuppressedLintMessage;
+}
+export {};
+//# sourceMappingURL=LegacyESLint.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.d.ts.map
new file mode 100644
index 0000000..466d1fc
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"LegacyESLint.d.ts","sourceRoot":"","sources":["../../../src/ts-eslint/eslint/LegacyESLint.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAG9C,OAAO,OAAO,gBAAiB,SAAQ,MAAM,CAAC,UAAU,CACtD,aAAa,CAAC,MAAM,EACpB,YAAY,CAAC,aAAa,CAC3B;IACC,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CACxC;iCAQwD,OAAO,gBAAgB;AANhF;;;;;GAKG;AACH,qBAAa,YAAa,SAAQ,iBAA+C;CAAG;AACpF,yBAAiB,YAAY,CAAC;IAC5B,UAAiB,aACf,SAAQ,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC;QAClD;;;;;;;WAOG;QACH,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAC7B;;;WAGG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;;WAGG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB;;;WAGG;QACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACnC;;;WAGG;QACH,6BAA6B,CAAC,EAAE,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;QAC7D;;;;;WAKG;QACH,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACzC;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB;;;WAGG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB;IACD,KAAY,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;IAC3D,KAAY,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IACvC,KAAY,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACzC,KAAY,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAC7C,KAAY,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC1D,KAAY,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IACrD,KAAY,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;CAClE"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.js
new file mode 100644
index 0000000..e4f6c7e
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.js
@@ -0,0 +1,14 @@
+"use strict";
+/* eslint-disable @typescript-eslint/no-namespace */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyESLint = void 0;
+const use_at_your_own_risk_1 = require("eslint/use-at-your-own-risk");
+/**
+ * The ESLint class is the primary class to use in Node.js applications.
+ * This class depends on the Node.js fs module and the file system, so you cannot use it in browsers.
+ *
+ * If you want to lint code on browsers, use the Linter class instead.
+ */
+class LegacyESLint extends use_at_your_own_risk_1.LegacyESLint {
+}
+exports.LegacyESLint = LegacyESLint;
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.d.ts
new file mode 100644
index 0000000..800b457
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.d.ts
@@ -0,0 +1,12 @@
+export * from './AST';
+export * from './Config';
+export * from './ESLint';
+export * from './Linter';
+export * from './Parser';
+export * from './ParserOptions';
+export * from './Processor';
+export * from './Rule';
+export * from './RuleTester';
+export * from './Scope';
+export * from './SourceCode';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.d.ts.map
new file mode 100644
index 0000000..40d760c
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ts-eslint/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.js
new file mode 100644
index 0000000..0e8e375
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.js
@@ -0,0 +1,27 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./AST"), exports);
+__exportStar(require("./Config"), exports);
+__exportStar(require("./ESLint"), exports);
+__exportStar(require("./Linter"), exports);
+__exportStar(require("./Parser"), exports);
+__exportStar(require("./ParserOptions"), exports);
+__exportStar(require("./Processor"), exports);
+__exportStar(require("./Rule"), exports);
+__exportStar(require("./RuleTester"), exports);
+__exportStar(require("./Scope"), exports);
+__exportStar(require("./SourceCode"), exports);
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-estree.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-estree.d.ts
new file mode 100644
index 0000000..de0fa46
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-estree.d.ts
@@ -0,0 +1,4 @@
+export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/types';
+export type { NodeWithParent } from '@typescript-eslint/types';
+export type { ParserServices, ParserServicesWithoutTypeInformation, ParserServicesWithTypeInformation, } from '@typescript-eslint/typescript-estree';
+//# sourceMappingURL=ts-estree.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-estree.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-estree.d.ts.map
new file mode 100644
index 0000000..fbc5648
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-estree.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ts-estree.d.ts","sourceRoot":"","sources":["../src/ts-estree.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EACd,eAAe,EACf,QAAQ,GACT,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,YAAY,EACV,cAAc,EACd,oCAAoC,EACpC,iCAAiC,GAClC,MAAM,sCAAsC,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-estree.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-estree.js
new file mode 100644
index 0000000..5b893d3
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-estree.js
@@ -0,0 +1,9 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TSESTree = exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
+// for convenience's sake - export the types directly from here so consumers
+// don't need to reference/install both packages in their code
+var types_1 = require("@typescript-eslint/types");
+Object.defineProperty(exports, "AST_NODE_TYPES", { enumerable: true, get: function () { return types_1.AST_NODE_TYPES; } });
+Object.defineProperty(exports, "AST_TOKEN_TYPES", { enumerable: true, get: function () { return types_1.AST_TOKEN_TYPES; } });
+Object.defineProperty(exports, "TSESTree", { enumerable: true, get: function () { return types_1.TSESTree; } });
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/NoInfer.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/NoInfer.d.ts
new file mode 100644
index 0000000..a03f931
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/NoInfer.d.ts
@@ -0,0 +1,10 @@
+/**
+ * We could use NoInfer typescript build-in utility
+ * introduced in typescript 5.4, however at the moment of creation
+ * the supported ts versions are >=4.8.4 <5.7.0
+ * so for the moment we have to stick to this polyfill.
+ *
+ * @see https://github.com/millsp/ts-toolbelt/blob/master/sources/Function/NoInfer.ts
+ */
+export type NoInfer = [A][A extends unknown ? 0 : never];
+//# sourceMappingURL=NoInfer.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/NoInfer.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/NoInfer.d.ts.map
new file mode 100644
index 0000000..99b255d
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/NoInfer.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"NoInfer.d.ts","sourceRoot":"","sources":["../../src/ts-utils/NoInfer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/NoInfer.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/NoInfer.js
new file mode 100644
index 0000000..fabb051
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/NoInfer.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/index.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/index.d.ts
new file mode 100644
index 0000000..5bc797d
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/index.d.ts
@@ -0,0 +1,3 @@
+export * from './isArray';
+export * from './NoInfer';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/index.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/index.d.ts.map
new file mode 100644
index 0000000..01877ca
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ts-utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/index.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/index.js
new file mode 100644
index 0000000..2f0a763
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/index.js
@@ -0,0 +1,18 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./isArray"), exports);
+__exportStar(require("./NoInfer"), exports);
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.d.ts b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.d.ts
new file mode 100644
index 0000000..3e3a0b9
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.d.ts
@@ -0,0 +1,2 @@
+export declare function isArray(arg: unknown): arg is readonly unknown[];
+//# sourceMappingURL=isArray.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.d.ts.map b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.d.ts.map
new file mode 100644
index 0000000..19a1441
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"isArray.d.ts","sourceRoot":"","sources":["../../src/ts-utils/isArray.ts"],"names":[],"mappings":"AACA,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,SAAS,OAAO,EAAE,CAE/D"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.js b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.js
new file mode 100644
index 0000000..a52bb94
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.js
@@ -0,0 +1,7 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isArray = isArray;
+// https://github.com/microsoft/TypeScript/issues/17002
+function isArray(arg) {
+    return Array.isArray(arg);
+}
diff --git a/slider/node_modules/@typescript-eslint/utils/package.json b/slider/node_modules/@typescript-eslint/utils/package.json
new file mode 100644
index 0000000..23d62c9
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/utils/package.json
@@ -0,0 +1,107 @@
+{
+  "name": "@typescript-eslint/utils",
+  "version": "8.44.1",
+  "description": "Utilities for working with TypeScript + ESLint together",
+  "files": [
+    "dist",
+    "!*.tsbuildinfo",
+    "package.json",
+    "README.md",
+    "LICENSE"
+  ],
+  "type": "commonjs",
+  "exports": {
+    ".": {
+      "types": "./dist/index.d.ts",
+      "default": "./dist/index.js"
+    },
+    "./ast-utils": {
+      "types": "./dist/ast-utils/index.d.ts",
+      "default": "./dist/ast-utils/index.js"
+    },
+    "./eslint-utils": {
+      "types": "./dist/eslint-utils/index.d.ts",
+      "default": "./dist/eslint-utils/index.js"
+    },
+    "./json-schema": {
+      "types": "./dist/json-schema.d.ts",
+      "default": "./dist/json-schema.js"
+    },
+    "./ts-eslint": {
+      "types": "./dist/ts-eslint/index.d.ts",
+      "default": "./dist/ts-eslint/index.js"
+    },
+    "./package.json": "./package.json"
+  },
+  "types": "./dist/index.d.ts",
+  "engines": {
+    "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/typescript-eslint/typescript-eslint.git",
+    "directory": "packages/utils"
+  },
+  "bugs": {
+    "url": "https://github.com/typescript-eslint/typescript-eslint/issues"
+  },
+  "homepage": "https://typescript-eslint.io/packages/utils",
+  "license": "MIT",
+  "keywords": [
+    "eslint",
+    "typescript",
+    "estree"
+  ],
+  "scripts": {
+    "build": "yarn run -BT nx build",
+    "clean": "rimraf dist/ coverage/",
+    "format": "yarn run -T format",
+    "lint": "yarn run -BT nx lint",
+    "test": "yarn run -BT nx test",
+    "typecheck": "yarn run -BT nx typecheck"
+  },
+  "dependencies": {
+    "@eslint-community/eslint-utils": "^4.7.0",
+    "@typescript-eslint/scope-manager": "8.44.1",
+    "@typescript-eslint/types": "8.44.1",
+    "@typescript-eslint/typescript-estree": "8.44.1"
+  },
+  "peerDependencies": {
+    "eslint": "^8.57.0 || ^9.0.0",
+    "typescript": ">=4.8.4 <6.0.0"
+  },
+  "devDependencies": {
+    "@vitest/coverage-v8": "^3.1.3",
+    "eslint": "*",
+    "rimraf": "*",
+    "typescript": "*",
+    "vitest": "^3.1.3"
+  },
+  "funding": {
+    "type": "opencollective",
+    "url": "https://opencollective.com/typescript-eslint"
+  },
+  "nx": {
+    "name": "utils",
+    "includedScripts": [
+      "clean"
+    ],
+    "targets": {
+      "lint": {
+        "command": "eslint"
+      },
+      "typecheck": {
+        "outputs": [
+          "{workspaceRoot}/dist",
+          "{projectRoot}/dist"
+        ]
+      },
+      "test": {
+        "dependsOn": [
+          "^build",
+          "typecheck"
+        ]
+      }
+    }
+  }
+}
diff --git a/slider/node_modules/@typescript-eslint/visitor-keys/LICENSE b/slider/node_modules/@typescript-eslint/visitor-keys/LICENSE
new file mode 100644
index 0000000..5de6cb6
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/visitor-keys/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 typescript-eslint and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/slider/node_modules/@typescript-eslint/visitor-keys/README.md b/slider/node_modules/@typescript-eslint/visitor-keys/README.md
new file mode 100644
index 0000000..8099c06
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/visitor-keys/README.md
@@ -0,0 +1,10 @@
+# `@typescript-eslint/visitor-keys`
+
+> Visitor keys used to help traverse the TypeScript-ESTree AST.
+
+## ✋ Internal Package
+
+This is an _internal package_ to the [typescript-eslint monorepo](https://github.com/typescript-eslint/typescript-eslint).
+You likely don't want to use it directly.
+
+👉 See **https://typescript-eslint.io** for docs on typescript-eslint.
diff --git a/slider/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts b/slider/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts
new file mode 100644
index 0000000..acfe164
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts
@@ -0,0 +1,3 @@
+import type { TSESTree } from '@typescript-eslint/types';
+export declare const getKeys: (node: TSESTree.Node) => readonly string[];
+//# sourceMappingURL=get-keys.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts.map b/slider/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts.map
new file mode 100644
index 0000000..537392b
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"get-keys.d.ts","sourceRoot":"","sources":["../src/get-keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,eAAO,MAAM,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,KAAK,SAAS,MAAM,EAC7C,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js b/slider/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js
new file mode 100644
index 0000000..1bca0c1
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js
@@ -0,0 +1,5 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getKeys = void 0;
+const eslint_visitor_keys_1 = require("eslint-visitor-keys");
+exports.getKeys = eslint_visitor_keys_1.getKeys;
diff --git a/slider/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts b/slider/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts
new file mode 100644
index 0000000..10c6fa7
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts
@@ -0,0 +1,3 @@
+export { getKeys } from './get-keys';
+export { visitorKeys, type VisitorKeys } from './visitor-keys';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts.map b/slider/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts.map
new file mode 100644
index 0000000..bbe3015
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/visitor-keys/dist/index.js b/slider/node_modules/@typescript-eslint/visitor-keys/dist/index.js
new file mode 100644
index 0000000..914a870
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/visitor-keys/dist/index.js
@@ -0,0 +1,7 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.visitorKeys = exports.getKeys = void 0;
+var get_keys_1 = require("./get-keys");
+Object.defineProperty(exports, "getKeys", { enumerable: true, get: function () { return get_keys_1.getKeys; } });
+var visitor_keys_1 = require("./visitor-keys");
+Object.defineProperty(exports, "visitorKeys", { enumerable: true, get: function () { return visitor_keys_1.visitorKeys; } });
diff --git a/slider/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts b/slider/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts
new file mode 100644
index 0000000..815a078
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts
@@ -0,0 +1,3 @@
+export type VisitorKeys = Record;
+export declare const visitorKeys: VisitorKeys;
+//# sourceMappingURL=visitor-keys.d.ts.map
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts.map b/slider/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts.map
new file mode 100644
index 0000000..d49a795
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"visitor-keys.d.ts","sourceRoot":"","sources":["../src/visitor-keys.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AA0QxE,eAAO,MAAM,WAAW,EAAE,WACmB,CAAC"}
\ No newline at end of file
diff --git a/slider/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js b/slider/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js
new file mode 100644
index 0000000..1377205
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js
@@ -0,0 +1,194 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+    Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+    o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.visitorKeys = void 0;
+const eslintVisitorKeys = __importStar(require("eslint-visitor-keys"));
+/*
+ ********************************** IMPORTANT NOTE ********************************
+ *                                                                                *
+ * The key arrays should be sorted in the order in which you would want to visit  *
+ * the child keys.                                                                *
+ *                                                                                *
+ *                        DO NOT SORT THEM ALPHABETICALLY!                        *
+ *                                                                                *
+ * They should be sorted in the order that they appear in the source code.        *
+ * For example:                                                                   *
+ *                                                                                *
+ * class Foo extends Bar { prop: 1 }                                              *
+ * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ClassDeclaration                             *
+ *       ^^^ id      ^^^ superClass                                               *
+ *                       ^^^^^^^^^^^ body                                         *
+ *                                                                                *
+ * It would be incorrect to provide the visitor keys ['body', 'id', 'superClass'] *
+ * because the body comes AFTER everything else in the source code.               *
+ * Instead the correct ordering would be ['id', 'superClass', 'body'].            *
+ *                                                                                *
+ **********************************************************************************
+ */
+const SharedVisitorKeys = (() => {
+    const FunctionType = ['typeParameters', 'params', 'returnType'];
+    const AnonymousFunction = [...FunctionType, 'body'];
+    const AbstractPropertyDefinition = [
+        'decorators',
+        'key',
+        'typeAnnotation',
+    ];
+    return {
+        AbstractPropertyDefinition: ['decorators', 'key', 'typeAnnotation'],
+        AnonymousFunction,
+        AsExpression: ['expression', 'typeAnnotation'],
+        ClassDeclaration: [
+            'decorators',
+            'id',
+            'typeParameters',
+            'superClass',
+            'superTypeArguments',
+            'implements',
+            'body',
+        ],
+        Function: ['id', ...AnonymousFunction],
+        FunctionType,
+        PropertyDefinition: [...AbstractPropertyDefinition, 'value'],
+    };
+})();
+const additionalKeys = {
+    AccessorProperty: SharedVisitorKeys.PropertyDefinition,
+    ArrayPattern: ['decorators', 'elements', 'typeAnnotation'],
+    ArrowFunctionExpression: SharedVisitorKeys.AnonymousFunction,
+    AssignmentPattern: ['decorators', 'left', 'right', 'typeAnnotation'],
+    CallExpression: ['callee', 'typeArguments', 'arguments'],
+    ClassDeclaration: SharedVisitorKeys.ClassDeclaration,
+    ClassExpression: SharedVisitorKeys.ClassDeclaration,
+    Decorator: ['expression'],
+    ExportAllDeclaration: ['exported', 'source', 'attributes'],
+    ExportNamedDeclaration: ['declaration', 'specifiers', 'source', 'attributes'],
+    FunctionDeclaration: SharedVisitorKeys.Function,
+    FunctionExpression: SharedVisitorKeys.Function,
+    Identifier: ['decorators', 'typeAnnotation'],
+    ImportAttribute: ['key', 'value'],
+    ImportDeclaration: ['specifiers', 'source', 'attributes'],
+    ImportExpression: ['source', 'options'],
+    JSXClosingFragment: [],
+    JSXOpeningElement: ['name', 'typeArguments', 'attributes'],
+    JSXOpeningFragment: [],
+    JSXSpreadChild: ['expression'],
+    MethodDefinition: ['decorators', 'key', 'value'],
+    NewExpression: ['callee', 'typeArguments', 'arguments'],
+    ObjectPattern: ['decorators', 'properties', 'typeAnnotation'],
+    PropertyDefinition: SharedVisitorKeys.PropertyDefinition,
+    RestElement: ['decorators', 'argument', 'typeAnnotation'],
+    StaticBlock: ['body'],
+    TaggedTemplateExpression: ['tag', 'typeArguments', 'quasi'],
+    TSAbstractAccessorProperty: SharedVisitorKeys.AbstractPropertyDefinition,
+    TSAbstractKeyword: [],
+    TSAbstractMethodDefinition: ['key', 'value'],
+    TSAbstractPropertyDefinition: SharedVisitorKeys.AbstractPropertyDefinition,
+    TSAnyKeyword: [],
+    TSArrayType: ['elementType'],
+    TSAsExpression: SharedVisitorKeys.AsExpression,
+    TSAsyncKeyword: [],
+    TSBigIntKeyword: [],
+    TSBooleanKeyword: [],
+    TSCallSignatureDeclaration: SharedVisitorKeys.FunctionType,
+    TSClassImplements: ['expression', 'typeArguments'],
+    TSConditionalType: ['checkType', 'extendsType', 'trueType', 'falseType'],
+    TSConstructorType: SharedVisitorKeys.FunctionType,
+    TSConstructSignatureDeclaration: SharedVisitorKeys.FunctionType,
+    TSDeclareFunction: SharedVisitorKeys.Function,
+    TSDeclareKeyword: [],
+    TSEmptyBodyFunctionExpression: ['id', ...SharedVisitorKeys.FunctionType],
+    TSEnumBody: ['members'],
+    TSEnumDeclaration: ['id', 'body'],
+    TSEnumMember: ['id', 'initializer'],
+    TSExportAssignment: ['expression'],
+    TSExportKeyword: [],
+    TSExternalModuleReference: ['expression'],
+    TSFunctionType: SharedVisitorKeys.FunctionType,
+    TSImportEqualsDeclaration: ['id', 'moduleReference'],
+    TSImportType: ['argument', 'options', 'qualifier', 'typeArguments'],
+    TSIndexedAccessType: ['objectType', 'indexType'],
+    TSIndexSignature: ['parameters', 'typeAnnotation'],
+    TSInferType: ['typeParameter'],
+    TSInstantiationExpression: ['expression', 'typeArguments'],
+    TSInterfaceBody: ['body'],
+    TSInterfaceDeclaration: ['id', 'typeParameters', 'extends', 'body'],
+    TSInterfaceHeritage: ['expression', 'typeArguments'],
+    TSIntersectionType: ['types'],
+    TSIntrinsicKeyword: [],
+    TSLiteralType: ['literal'],
+    TSMappedType: ['key', 'constraint', 'nameType', 'typeAnnotation'],
+    TSMethodSignature: ['key', 'typeParameters', 'params', 'returnType'],
+    TSModuleBlock: ['body'],
+    TSModuleDeclaration: ['id', 'body'],
+    TSNamedTupleMember: ['label', 'elementType'],
+    TSNamespaceExportDeclaration: ['id'],
+    TSNeverKeyword: [],
+    TSNonNullExpression: ['expression'],
+    TSNullKeyword: [],
+    TSNumberKeyword: [],
+    TSObjectKeyword: [],
+    TSOptionalType: ['typeAnnotation'],
+    TSParameterProperty: ['decorators', 'parameter'],
+    TSPrivateKeyword: [],
+    TSPropertySignature: ['key', 'typeAnnotation'],
+    TSProtectedKeyword: [],
+    TSPublicKeyword: [],
+    TSQualifiedName: ['left', 'right'],
+    TSReadonlyKeyword: [],
+    TSRestType: ['typeAnnotation'],
+    TSSatisfiesExpression: SharedVisitorKeys.AsExpression,
+    TSStaticKeyword: [],
+    TSStringKeyword: [],
+    TSSymbolKeyword: [],
+    TSTemplateLiteralType: ['quasis', 'types'],
+    TSThisType: [],
+    TSTupleType: ['elementTypes'],
+    TSTypeAliasDeclaration: ['id', 'typeParameters', 'typeAnnotation'],
+    TSTypeAnnotation: ['typeAnnotation'],
+    TSTypeAssertion: ['typeAnnotation', 'expression'],
+    TSTypeLiteral: ['members'],
+    TSTypeOperator: ['typeAnnotation'],
+    TSTypeParameter: ['name', 'constraint', 'default'],
+    TSTypeParameterDeclaration: ['params'],
+    TSTypeParameterInstantiation: ['params'],
+    TSTypePredicate: ['parameterName', 'typeAnnotation'],
+    TSTypeQuery: ['exprName', 'typeArguments'],
+    TSTypeReference: ['typeName', 'typeArguments'],
+    TSUndefinedKeyword: [],
+    TSUnionType: ['types'],
+    TSUnknownKeyword: [],
+    TSVoidKeyword: [],
+};
+exports.visitorKeys = eslintVisitorKeys.unionWith(additionalKeys);
diff --git a/slider/node_modules/@typescript-eslint/visitor-keys/package.json b/slider/node_modules/@typescript-eslint/visitor-keys/package.json
new file mode 100644
index 0000000..b963923
--- /dev/null
+++ b/slider/node_modules/@typescript-eslint/visitor-keys/package.json
@@ -0,0 +1,73 @@
+{
+  "name": "@typescript-eslint/visitor-keys",
+  "version": "8.44.1",
+  "description": "Visitor keys used to help traverse the TypeScript-ESTree AST",
+  "files": [
+    "dist",
+    "!*.tsbuildinfo",
+    "package.json",
+    "README.md",
+    "LICENSE"
+  ],
+  "type": "commonjs",
+  "exports": {
+    ".": {
+      "types": "./dist/index.d.ts",
+      "default": "./dist/index.js"
+    },
+    "./package.json": "./package.json"
+  },
+  "types": "./dist/index.d.ts",
+  "engines": {
+    "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/typescript-eslint/typescript-eslint.git",
+    "directory": "packages/visitor-keys"
+  },
+  "bugs": {
+    "url": "https://github.com/typescript-eslint/typescript-eslint/issues"
+  },
+  "homepage": "https://typescript-eslint.io",
+  "license": "MIT",
+  "keywords": [
+    "eslint",
+    "typescript",
+    "estree"
+  ],
+  "scripts": {
+    "build": "yarn run -BT nx build",
+    "clean": "rimraf dist/ coverage/",
+    "format": "yarn run -T format",
+    "lint": "yarn run -BT nx lint",
+    "test": "yarn run -BT nx test",
+    "typecheck": "yarn run -BT nx typecheck"
+  },
+  "dependencies": {
+    "@typescript-eslint/types": "8.44.1",
+    "eslint-visitor-keys": "^4.2.1"
+  },
+  "devDependencies": {
+    "@vitest/coverage-v8": "^3.1.3",
+    "eslint": "*",
+    "rimraf": "*",
+    "typescript": "*",
+    "vitest": "^3.1.3"
+  },
+  "funding": {
+    "type": "opencollective",
+    "url": "https://opencollective.com/typescript-eslint"
+  },
+  "nx": {
+    "name": "visitor-keys",
+    "includedScripts": [
+      "clean"
+    ],
+    "targets": {
+      "lint": {
+        "command": "eslint"
+      }
+    }
+  }
+}
diff --git a/slider/node_modules/acorn-jsx/LICENSE b/slider/node_modules/acorn-jsx/LICENSE
new file mode 100644
index 0000000..b30c3b0
--- /dev/null
+++ b/slider/node_modules/acorn-jsx/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2012-2017 by Ingvar Stepanyan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/slider/node_modules/acorn-jsx/README.md b/slider/node_modules/acorn-jsx/README.md
new file mode 100644
index 0000000..9d6f330
--- /dev/null
+++ b/slider/node_modules/acorn-jsx/README.md
@@ -0,0 +1,40 @@
+# Acorn-JSX
+
+[![Build Status](https://travis-ci.org/acornjs/acorn-jsx.svg?branch=master)](https://travis-ci.org/acornjs/acorn-jsx)
+[![NPM version](https://img.shields.io/npm/v/acorn-jsx.svg)](https://www.npmjs.org/package/acorn-jsx)
+
+This is plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript.
+
+It was created as an experimental alternative, faster [React.js JSX](http://facebook.github.io/react/docs/jsx-in-depth.html) parser. Later, it replaced the [official parser](https://github.com/facebookarchive/esprima) and these days is used by many prominent development tools.
+
+## Transpiler
+
+Please note that this tool only parses source code to JSX AST, which is useful for various language tools and services. If you want to transpile your code to regular ES5-compliant JavaScript with source map, check out [Babel](https://babeljs.io/) and [Buble](https://buble.surge.sh/) transpilers which use `acorn-jsx` under the hood.
+
+## Usage
+
+Requiring this module provides you with an Acorn plugin that you can use like this:
+
+```javascript
+var acorn = require("acorn");
+var jsx = require("acorn-jsx");
+acorn.Parser.extend(jsx()).parse("my(, 'code');");
+```
+
+Note that official spec doesn't support mix of XML namespaces and object-style access in tag names (#27) like in ``, so it was deprecated in `acorn-jsx@3.0`. If you still want to opt-in to support of such constructions, you can pass the following option:
+
+```javascript
+acorn.Parser.extend(jsx({ allowNamespacedObjects: true }))
+```
+
+Also, since most apps use pure React transformer, a new option was introduced that allows to prohibit namespaces completely:
+
+```javascript
+acorn.Parser.extend(jsx({ allowNamespaces: false }))
+```
+
+Note that by default `allowNamespaces` is enabled for spec compliancy.
+
+## License
+
+This plugin is issued under the [MIT license](./LICENSE).
diff --git a/slider/node_modules/acorn-jsx/index.d.ts b/slider/node_modules/acorn-jsx/index.d.ts
new file mode 100644
index 0000000..7bad2b5
--- /dev/null
+++ b/slider/node_modules/acorn-jsx/index.d.ts
@@ -0,0 +1,12 @@
+import { Parser } from 'acorn' 
+
+declare const jsx: (options?: jsx.Options) => (BaseParser: typeof Parser) => typeof Parser;
+
+declare namespace jsx {
+  interface Options {
+    allowNamespacedObjects?: boolean;
+    allowNamespaces?: boolean;
+  }
+}
+
+export = jsx;
diff --git a/slider/node_modules/acorn-jsx/index.js b/slider/node_modules/acorn-jsx/index.js
new file mode 100644
index 0000000..d122295
--- /dev/null
+++ b/slider/node_modules/acorn-jsx/index.js
@@ -0,0 +1,488 @@
+'use strict';
+
+const XHTMLEntities = require('./xhtml');
+
+const hexNumber = /^[\da-fA-F]+$/;
+const decimalNumber = /^\d+$/;
+
+// The map to `acorn-jsx` tokens from `acorn` namespace objects.
+const acornJsxMap = new WeakMap();
+
+// Get the original tokens for the given `acorn` namespace object.
+function getJsxTokens(acorn) {
+  acorn = acorn.Parser.acorn || acorn;
+  let acornJsx = acornJsxMap.get(acorn);
+  if (!acornJsx) {
+    const tt = acorn.tokTypes;
+    const TokContext = acorn.TokContext;
+    const TokenType = acorn.TokenType;
+    const tc_oTag = new TokContext('...', true, true);
+    const tokContexts = {
+      tc_oTag: tc_oTag,
+      tc_cTag: tc_cTag,
+      tc_expr: tc_expr
+    };
+    const tokTypes = {
+      jsxName: new TokenType('jsxName'),
+      jsxText: new TokenType('jsxText', {beforeExpr: true}),
+      jsxTagStart: new TokenType('jsxTagStart', {startsExpr: true}),
+      jsxTagEnd: new TokenType('jsxTagEnd')
+    };
+
+    tokTypes.jsxTagStart.updateContext = function() {
+      this.context.push(tc_expr); // treat as beginning of JSX expression
+      this.context.push(tc_oTag); // start opening tag context
+      this.exprAllowed = false;
+    };
+    tokTypes.jsxTagEnd.updateContext = function(prevType) {
+      let out = this.context.pop();
+      if (out === tc_oTag && prevType === tt.slash || out === tc_cTag) {
+        this.context.pop();
+        this.exprAllowed = this.curContext() === tc_expr;
+      } else {
+        this.exprAllowed = true;
+      }
+    };
+
+    acornJsx = { tokContexts: tokContexts, tokTypes: tokTypes };
+    acornJsxMap.set(acorn, acornJsx);
+  }
+
+  return acornJsx;
+}
+
+// Transforms JSX element name to string.
+
+function getQualifiedJSXName(object) {
+  if (!object)
+    return object;
+
+  if (object.type === 'JSXIdentifier')
+    return object.name;
+
+  if (object.type === 'JSXNamespacedName')
+    return object.namespace.name + ':' + object.name.name;
+
+  if (object.type === 'JSXMemberExpression')
+    return getQualifiedJSXName(object.object) + '.' +
+    getQualifiedJSXName(object.property);
+}
+
+module.exports = function(options) {
+  options = options || {};
+  return function(Parser) {
+    return plugin({
+      allowNamespaces: options.allowNamespaces !== false,
+      allowNamespacedObjects: !!options.allowNamespacedObjects
+    }, Parser);
+  };
+};
+
+// This is `tokTypes` of the peer dep.
+// This can be different instances from the actual `tokTypes` this plugin uses.
+Object.defineProperty(module.exports, "tokTypes", {
+  get: function get_tokTypes() {
+    return getJsxTokens(require("acorn")).tokTypes;
+  },
+  configurable: true,
+  enumerable: true
+});
+
+function plugin(options, Parser) {
+  const acorn = Parser.acorn || require("acorn");
+  const acornJsx = getJsxTokens(acorn);
+  const tt = acorn.tokTypes;
+  const tok = acornJsx.tokTypes;
+  const tokContexts = acorn.tokContexts;
+  const tc_oTag = acornJsx.tokContexts.tc_oTag;
+  const tc_cTag = acornJsx.tokContexts.tc_cTag;
+  const tc_expr = acornJsx.tokContexts.tc_expr;
+  const isNewLine = acorn.isNewLine;
+  const isIdentifierStart = acorn.isIdentifierStart;
+  const isIdentifierChar = acorn.isIdentifierChar;
+
+  return class extends Parser {
+    // Expose actual `tokTypes` and `tokContexts` to other plugins.
+    static get acornJsx() {
+      return acornJsx;
+    }
+
+    // Reads inline JSX contents token.
+    jsx_readToken() {
+      let out = '', chunkStart = this.pos;
+      for (;;) {
+        if (this.pos >= this.input.length)
+          this.raise(this.start, 'Unterminated JSX contents');
+        let ch = this.input.charCodeAt(this.pos);
+
+        switch (ch) {
+        case 60: // '<'
+        case 123: // '{'
+          if (this.pos === this.start) {
+            if (ch === 60 && this.exprAllowed) {
+              ++this.pos;
+              return this.finishToken(tok.jsxTagStart);
+            }
+            return this.getTokenFromCode(ch);
+          }
+          out += this.input.slice(chunkStart, this.pos);
+          return this.finishToken(tok.jsxText, out);
+
+        case 38: // '&'
+          out += this.input.slice(chunkStart, this.pos);
+          out += this.jsx_readEntity();
+          chunkStart = this.pos;
+          break;
+
+        case 62: // '>'
+        case 125: // '}'
+          this.raise(
+            this.pos,
+            "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" +
+              (ch === 62 ? ">" : "}") + "` or " + "`{\"" + this.input[this.pos] + "\"}" + "`?"
+          );
+
+        default:
+          if (isNewLine(ch)) {
+            out += this.input.slice(chunkStart, this.pos);
+            out += this.jsx_readNewLine(true);
+            chunkStart = this.pos;
+          } else {
+            ++this.pos;
+          }
+        }
+      }
+    }
+
+    jsx_readNewLine(normalizeCRLF) {
+      let ch = this.input.charCodeAt(this.pos);
+      let out;
+      ++this.pos;
+      if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
+        ++this.pos;
+        out = normalizeCRLF ? '\n' : '\r\n';
+      } else {
+        out = String.fromCharCode(ch);
+      }
+      if (this.options.locations) {
+        ++this.curLine;
+        this.lineStart = this.pos;
+      }
+
+      return out;
+    }
+
+    jsx_readString(quote) {
+      let out = '', chunkStart = ++this.pos;
+      for (;;) {
+        if (this.pos >= this.input.length)
+          this.raise(this.start, 'Unterminated string constant');
+        let ch = this.input.charCodeAt(this.pos);
+        if (ch === quote) break;
+        if (ch === 38) { // '&'
+          out += this.input.slice(chunkStart, this.pos);
+          out += this.jsx_readEntity();
+          chunkStart = this.pos;
+        } else if (isNewLine(ch)) {
+          out += this.input.slice(chunkStart, this.pos);
+          out += this.jsx_readNewLine(false);
+          chunkStart = this.pos;
+        } else {
+          ++this.pos;
+        }
+      }
+      out += this.input.slice(chunkStart, this.pos++);
+      return this.finishToken(tt.string, out);
+    }
+
+    jsx_readEntity() {
+      let str = '', count = 0, entity;
+      let ch = this.input[this.pos];
+      if (ch !== '&')
+        this.raise(this.pos, 'Entity must start with an ampersand');
+      let startPos = ++this.pos;
+      while (this.pos < this.input.length && count++ < 10) {
+        ch = this.input[this.pos++];
+        if (ch === ';') {
+          if (str[0] === '#') {
+            if (str[1] === 'x') {
+              str = str.substr(2);
+              if (hexNumber.test(str))
+                entity = String.fromCharCode(parseInt(str, 16));
+            } else {
+              str = str.substr(1);
+              if (decimalNumber.test(str))
+                entity = String.fromCharCode(parseInt(str, 10));
+            }
+          } else {
+            entity = XHTMLEntities[str];
+          }
+          break;
+        }
+        str += ch;
+      }
+      if (!entity) {
+        this.pos = startPos;
+        return '&';
+      }
+      return entity;
+    }
+
+    // Read a JSX identifier (valid tag or attribute name).
+    //
+    // Optimized version since JSX identifiers can't contain
+    // escape characters and so can be read as single slice.
+    // Also assumes that first character was already checked
+    // by isIdentifierStart in readToken.
+
+    jsx_readWord() {
+      let ch, start = this.pos;
+      do {
+        ch = this.input.charCodeAt(++this.pos);
+      } while (isIdentifierChar(ch) || ch === 45); // '-'
+      return this.finishToken(tok.jsxName, this.input.slice(start, this.pos));
+    }
+
+    // Parse next token as JSX identifier
+
+    jsx_parseIdentifier() {
+      let node = this.startNode();
+      if (this.type === tok.jsxName)
+        node.name = this.value;
+      else if (this.type.keyword)
+        node.name = this.type.keyword;
+      else
+        this.unexpected();
+      this.next();
+      return this.finishNode(node, 'JSXIdentifier');
+    }
+
+    // Parse namespaced identifier.
+
+    jsx_parseNamespacedName() {
+      let startPos = this.start, startLoc = this.startLoc;
+      let name = this.jsx_parseIdentifier();
+      if (!options.allowNamespaces || !this.eat(tt.colon)) return name;
+      var node = this.startNodeAt(startPos, startLoc);
+      node.namespace = name;
+      node.name = this.jsx_parseIdentifier();
+      return this.finishNode(node, 'JSXNamespacedName');
+    }
+
+    // Parses element name in any form - namespaced, member
+    // or single identifier.
+
+    jsx_parseElementName() {
+      if (this.type === tok.jsxTagEnd) return '';
+      let startPos = this.start, startLoc = this.startLoc;
+      let node = this.jsx_parseNamespacedName();
+      if (this.type === tt.dot && node.type === 'JSXNamespacedName' && !options.allowNamespacedObjects) {
+        this.unexpected();
+      }
+      while (this.eat(tt.dot)) {
+        let newNode = this.startNodeAt(startPos, startLoc);
+        newNode.object = node;
+        newNode.property = this.jsx_parseIdentifier();
+        node = this.finishNode(newNode, 'JSXMemberExpression');
+      }
+      return node;
+    }
+
+    // Parses any type of JSX attribute value.
+
+    jsx_parseAttributeValue() {
+      switch (this.type) {
+      case tt.braceL:
+        let node = this.jsx_parseExpressionContainer();
+        if (node.expression.type === 'JSXEmptyExpression')
+          this.raise(node.start, 'JSX attributes must only be assigned a non-empty expression');
+        return node;
+
+      case tok.jsxTagStart:
+      case tt.string:
+        return this.parseExprAtom();
+
+      default:
+        this.raise(this.start, 'JSX value should be either an expression or a quoted JSX text');
+      }
+    }
+
+    // JSXEmptyExpression is unique type since it doesn't actually parse anything,
+    // and so it should start at the end of last read token (left brace) and finish
+    // at the beginning of the next one (right brace).
+
+    jsx_parseEmptyExpression() {
+      let node = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc);
+      return this.finishNodeAt(node, 'JSXEmptyExpression', this.start, this.startLoc);
+    }
+
+    // Parses JSX expression enclosed into curly brackets.
+
+    jsx_parseExpressionContainer() {
+      let node = this.startNode();
+      this.next();
+      node.expression = this.type === tt.braceR
+        ? this.jsx_parseEmptyExpression()
+        : this.parseExpression();
+      this.expect(tt.braceR);
+      return this.finishNode(node, 'JSXExpressionContainer');
+    }
+
+    // Parses following JSX attribute name-value pair.
+
+    jsx_parseAttribute() {
+      let node = this.startNode();
+      if (this.eat(tt.braceL)) {
+        this.expect(tt.ellipsis);
+        node.argument = this.parseMaybeAssign();
+        this.expect(tt.braceR);
+        return this.finishNode(node, 'JSXSpreadAttribute');
+      }
+      node.name = this.jsx_parseNamespacedName();
+      node.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null;
+      return this.finishNode(node, 'JSXAttribute');
+    }
+
+    // Parses JSX opening tag starting after '<'.
+
+    jsx_parseOpeningElementAt(startPos, startLoc) {
+      let node = this.startNodeAt(startPos, startLoc);
+      node.attributes = [];
+      let nodeName = this.jsx_parseElementName();
+      if (nodeName) node.name = nodeName;
+      while (this.type !== tt.slash && this.type !== tok.jsxTagEnd)
+        node.attributes.push(this.jsx_parseAttribute());
+      node.selfClosing = this.eat(tt.slash);
+      this.expect(tok.jsxTagEnd);
+      return this.finishNode(node, nodeName ? 'JSXOpeningElement' : 'JSXOpeningFragment');
+    }
+
+    // Parses JSX closing tag starting after '');
+        }
+      }
+      let fragmentOrElement = openingElement.name ? 'Element' : 'Fragment';
+
+      node['opening' + fragmentOrElement] = openingElement;
+      node['closing' + fragmentOrElement] = closingElement;
+      node.children = children;
+      if (this.type === tt.relational && this.value === "<") {
+        this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag");
+      }
+      return this.finishNode(node, 'JSX' + fragmentOrElement);
+    }
+
+    // Parse JSX text
+
+    jsx_parseText() {
+      let node = this.parseLiteral(this.value);
+      node.type = "JSXText";
+      return node;
+    }
+
+    // Parses entire JSX element from current position.
+
+    jsx_parseElement() {
+      let startPos = this.start, startLoc = this.startLoc;
+      this.next();
+      return this.jsx_parseElementAt(startPos, startLoc);
+    }
+
+    parseExprAtom(refShortHandDefaultPos) {
+      if (this.type === tok.jsxText)
+        return this.jsx_parseText();
+      else if (this.type === tok.jsxTagStart)
+        return this.jsx_parseElement();
+      else
+        return super.parseExprAtom(refShortHandDefaultPos);
+    }
+
+    readToken(code) {
+      let context = this.curContext();
+
+      if (context === tc_expr) return this.jsx_readToken();
+
+      if (context === tc_oTag || context === tc_cTag) {
+        if (isIdentifierStart(code)) return this.jsx_readWord();
+
+        if (code == 62) {
+          ++this.pos;
+          return this.finishToken(tok.jsxTagEnd);
+        }
+
+        if ((code === 34 || code === 39) && context == tc_oTag)
+          return this.jsx_readString(code);
+      }
+
+      if (code === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) {
+        ++this.pos;
+        return this.finishToken(tok.jsxTagStart);
+      }
+      return super.readToken(code);
+    }
+
+    updateContext(prevType) {
+      if (this.type == tt.braceL) {
+        var curContext = this.curContext();
+        if (curContext == tc_oTag) this.context.push(tokContexts.b_expr);
+        else if (curContext == tc_expr) this.context.push(tokContexts.b_tmpl);
+        else super.updateContext(prevType);
+        this.exprAllowed = true;
+      } else if (this.type === tt.slash && prevType === tok.jsxTagStart) {
+        this.context.length -= 2; // do not consider JSX expr -> JSX open tag -> ... anymore
+        this.context.push(tc_cTag); // reconsider as closing tag context
+        this.exprAllowed = false;
+      } else {
+        return super.updateContext(prevType);
+      }
+    }
+  };
+}
diff --git a/slider/node_modules/acorn-jsx/package.json b/slider/node_modules/acorn-jsx/package.json
new file mode 100644
index 0000000..fead501
--- /dev/null
+++ b/slider/node_modules/acorn-jsx/package.json
@@ -0,0 +1,27 @@
+{
+  "name": "acorn-jsx",
+  "description": "Modern, fast React.js JSX parser",
+  "homepage": "https://github.com/acornjs/acorn-jsx",
+  "version": "5.3.2",
+  "maintainers": [
+    {
+      "name": "Ingvar Stepanyan",
+      "email": "me@rreverser.com",
+      "web": "http://rreverser.com/"
+    }
+  ],
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/acornjs/acorn-jsx"
+  },
+  "license": "MIT",
+  "scripts": {
+    "test": "node test/run.js"
+  },
+  "peerDependencies": {
+    "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+  },
+  "devDependencies": {
+    "acorn": "^8.0.1"
+  }
+}
diff --git a/slider/node_modules/acorn-jsx/xhtml.js b/slider/node_modules/acorn-jsx/xhtml.js
new file mode 100644
index 0000000..79ad3ea
--- /dev/null
+++ b/slider/node_modules/acorn-jsx/xhtml.js
@@ -0,0 +1,255 @@
+module.exports = {
+  quot: '\u0022',
+  amp: '&',
+  apos: '\u0027',
+  lt: '<',
+  gt: '>',
+  nbsp: '\u00A0',
+  iexcl: '\u00A1',
+  cent: '\u00A2',
+  pound: '\u00A3',
+  curren: '\u00A4',
+  yen: '\u00A5',
+  brvbar: '\u00A6',
+  sect: '\u00A7',
+  uml: '\u00A8',
+  copy: '\u00A9',
+  ordf: '\u00AA',
+  laquo: '\u00AB',
+  not: '\u00AC',
+  shy: '\u00AD',
+  reg: '\u00AE',
+  macr: '\u00AF',
+  deg: '\u00B0',
+  plusmn: '\u00B1',
+  sup2: '\u00B2',
+  sup3: '\u00B3',
+  acute: '\u00B4',
+  micro: '\u00B5',
+  para: '\u00B6',
+  middot: '\u00B7',
+  cedil: '\u00B8',
+  sup1: '\u00B9',
+  ordm: '\u00BA',
+  raquo: '\u00BB',
+  frac14: '\u00BC',
+  frac12: '\u00BD',
+  frac34: '\u00BE',
+  iquest: '\u00BF',
+  Agrave: '\u00C0',
+  Aacute: '\u00C1',
+  Acirc: '\u00C2',
+  Atilde: '\u00C3',
+  Auml: '\u00C4',
+  Aring: '\u00C5',
+  AElig: '\u00C6',
+  Ccedil: '\u00C7',
+  Egrave: '\u00C8',
+  Eacute: '\u00C9',
+  Ecirc: '\u00CA',
+  Euml: '\u00CB',
+  Igrave: '\u00CC',
+  Iacute: '\u00CD',
+  Icirc: '\u00CE',
+  Iuml: '\u00CF',
+  ETH: '\u00D0',
+  Ntilde: '\u00D1',
+  Ograve: '\u00D2',
+  Oacute: '\u00D3',
+  Ocirc: '\u00D4',
+  Otilde: '\u00D5',
+  Ouml: '\u00D6',
+  times: '\u00D7',
+  Oslash: '\u00D8',
+  Ugrave: '\u00D9',
+  Uacute: '\u00DA',
+  Ucirc: '\u00DB',
+  Uuml: '\u00DC',
+  Yacute: '\u00DD',
+  THORN: '\u00DE',
+  szlig: '\u00DF',
+  agrave: '\u00E0',
+  aacute: '\u00E1',
+  acirc: '\u00E2',
+  atilde: '\u00E3',
+  auml: '\u00E4',
+  aring: '\u00E5',
+  aelig: '\u00E6',
+  ccedil: '\u00E7',
+  egrave: '\u00E8',
+  eacute: '\u00E9',
+  ecirc: '\u00EA',
+  euml: '\u00EB',
+  igrave: '\u00EC',
+  iacute: '\u00ED',
+  icirc: '\u00EE',
+  iuml: '\u00EF',
+  eth: '\u00F0',
+  ntilde: '\u00F1',
+  ograve: '\u00F2',
+  oacute: '\u00F3',
+  ocirc: '\u00F4',
+  otilde: '\u00F5',
+  ouml: '\u00F6',
+  divide: '\u00F7',
+  oslash: '\u00F8',
+  ugrave: '\u00F9',
+  uacute: '\u00FA',
+  ucirc: '\u00FB',
+  uuml: '\u00FC',
+  yacute: '\u00FD',
+  thorn: '\u00FE',
+  yuml: '\u00FF',
+  OElig: '\u0152',
+  oelig: '\u0153',
+  Scaron: '\u0160',
+  scaron: '\u0161',
+  Yuml: '\u0178',
+  fnof: '\u0192',
+  circ: '\u02C6',
+  tilde: '\u02DC',
+  Alpha: '\u0391',
+  Beta: '\u0392',
+  Gamma: '\u0393',
+  Delta: '\u0394',
+  Epsilon: '\u0395',
+  Zeta: '\u0396',
+  Eta: '\u0397',
+  Theta: '\u0398',
+  Iota: '\u0399',
+  Kappa: '\u039A',
+  Lambda: '\u039B',
+  Mu: '\u039C',
+  Nu: '\u039D',
+  Xi: '\u039E',
+  Omicron: '\u039F',
+  Pi: '\u03A0',
+  Rho: '\u03A1',
+  Sigma: '\u03A3',
+  Tau: '\u03A4',
+  Upsilon: '\u03A5',
+  Phi: '\u03A6',
+  Chi: '\u03A7',
+  Psi: '\u03A8',
+  Omega: '\u03A9',
+  alpha: '\u03B1',
+  beta: '\u03B2',
+  gamma: '\u03B3',
+  delta: '\u03B4',
+  epsilon: '\u03B5',
+  zeta: '\u03B6',
+  eta: '\u03B7',
+  theta: '\u03B8',
+  iota: '\u03B9',
+  kappa: '\u03BA',
+  lambda: '\u03BB',
+  mu: '\u03BC',
+  nu: '\u03BD',
+  xi: '\u03BE',
+  omicron: '\u03BF',
+  pi: '\u03C0',
+  rho: '\u03C1',
+  sigmaf: '\u03C2',
+  sigma: '\u03C3',
+  tau: '\u03C4',
+  upsilon: '\u03C5',
+  phi: '\u03C6',
+  chi: '\u03C7',
+  psi: '\u03C8',
+  omega: '\u03C9',
+  thetasym: '\u03D1',
+  upsih: '\u03D2',
+  piv: '\u03D6',
+  ensp: '\u2002',
+  emsp: '\u2003',
+  thinsp: '\u2009',
+  zwnj: '\u200C',
+  zwj: '\u200D',
+  lrm: '\u200E',
+  rlm: '\u200F',
+  ndash: '\u2013',
+  mdash: '\u2014',
+  lsquo: '\u2018',
+  rsquo: '\u2019',
+  sbquo: '\u201A',
+  ldquo: '\u201C',
+  rdquo: '\u201D',
+  bdquo: '\u201E',
+  dagger: '\u2020',
+  Dagger: '\u2021',
+  bull: '\u2022',
+  hellip: '\u2026',
+  permil: '\u2030',
+  prime: '\u2032',
+  Prime: '\u2033',
+  lsaquo: '\u2039',
+  rsaquo: '\u203A',
+  oline: '\u203E',
+  frasl: '\u2044',
+  euro: '\u20AC',
+  image: '\u2111',
+  weierp: '\u2118',
+  real: '\u211C',
+  trade: '\u2122',
+  alefsym: '\u2135',
+  larr: '\u2190',
+  uarr: '\u2191',
+  rarr: '\u2192',
+  darr: '\u2193',
+  harr: '\u2194',
+  crarr: '\u21B5',
+  lArr: '\u21D0',
+  uArr: '\u21D1',
+  rArr: '\u21D2',
+  dArr: '\u21D3',
+  hArr: '\u21D4',
+  forall: '\u2200',
+  part: '\u2202',
+  exist: '\u2203',
+  empty: '\u2205',
+  nabla: '\u2207',
+  isin: '\u2208',
+  notin: '\u2209',
+  ni: '\u220B',
+  prod: '\u220F',
+  sum: '\u2211',
+  minus: '\u2212',
+  lowast: '\u2217',
+  radic: '\u221A',
+  prop: '\u221D',
+  infin: '\u221E',
+  ang: '\u2220',
+  and: '\u2227',
+  or: '\u2228',
+  cap: '\u2229',
+  cup: '\u222A',
+  'int': '\u222B',
+  there4: '\u2234',
+  sim: '\u223C',
+  cong: '\u2245',
+  asymp: '\u2248',
+  ne: '\u2260',
+  equiv: '\u2261',
+  le: '\u2264',
+  ge: '\u2265',
+  sub: '\u2282',
+  sup: '\u2283',
+  nsub: '\u2284',
+  sube: '\u2286',
+  supe: '\u2287',
+  oplus: '\u2295',
+  otimes: '\u2297',
+  perp: '\u22A5',
+  sdot: '\u22C5',
+  lceil: '\u2308',
+  rceil: '\u2309',
+  lfloor: '\u230A',
+  rfloor: '\u230B',
+  lang: '\u2329',
+  rang: '\u232A',
+  loz: '\u25CA',
+  spades: '\u2660',
+  clubs: '\u2663',
+  hearts: '\u2665',
+  diams: '\u2666'
+};
diff --git a/slider/node_modules/acorn/CHANGELOG.md b/slider/node_modules/acorn/CHANGELOG.md
new file mode 100644
index 0000000..58cca02
--- /dev/null
+++ b/slider/node_modules/acorn/CHANGELOG.md
@@ -0,0 +1,954 @@
+## 8.15.0 (2025-06-08)
+
+### New features
+
+Support `using` and `await using` syntax.
+
+The `AnyNode` type is now defined in such a way that plugins can extend it.
+
+### Bug fixes
+
+Fix an issue where the `bigint` property of literal nodes for non-decimal bigints had the wrong format.
+
+The `acorn` CLI tool no longer crashes when emitting a tree that contains a bigint.
+
+## 8.14.1 (2025-03-05)
+
+### Bug fixes
+
+Fix an issue where `await` expressions in class field initializers were inappropriately allowed.
+
+Properly allow await inside an async arrow function inside a class field initializer.
+
+Mention the source file name in syntax error messages when given.
+
+Properly add an empty `attributes` property to every form of `ExportNamedDeclaration`.
+
+## 8.14.0 (2024-10-27)
+
+### New features
+
+Support ES2025 import attributes.
+
+Support ES2025 RegExp modifiers.
+
+### Bug fixes
+
+Support some missing Unicode properties.
+
+## 8.13.0 (2024-10-16)
+
+### New features
+
+Upgrade to Unicode 16.0.
+
+## 8.12.1 (2024-07-03)
+
+### Bug fixes
+
+Fix a regression that caused Acorn to no longer run on Node versions <8.10.
+
+## 8.12.0 (2024-06-14)
+
+### New features
+
+Support ES2025 duplicate capture group names in regular expressions.
+
+### Bug fixes
+
+Include `VariableDeclarator` in the `AnyNode` type so that walker objects can refer to it without getting a type error.
+
+Properly raise a parse error for invalid `for`/`of` statements using `async` as binding name.
+
+Properly recognize \"use strict\" when preceded by a string with an escaped newline.
+
+Mark the `Parser` constructor as protected, not private, so plugins can extend it without type errors.
+
+Fix a bug where some invalid `delete` expressions were let through when the operand was parenthesized and `preserveParens` was enabled.
+
+Properly normalize line endings in raw strings of invalid template tokens.
+
+Properly track line numbers for escaped newlines in strings.
+
+Fix a bug that broke line number accounting after a template literal with invalid escape sequences.
+
+## 8.11.3 (2023-12-29)
+
+### Bug fixes
+
+Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error.
+
+Make sure `onToken` get an `import` keyword token when parsing `import.meta`.
+
+Fix a bug where `.loc.start` could be undefined for `new.target` `meta` nodes.
+
+## 8.11.2 (2023-10-27)
+
+### Bug fixes
+
+Fix a bug that caused regular expressions after colon tokens to not be properly tokenized in some circumstances.
+
+## 8.11.1 (2023-10-26)
+
+### Bug fixes
+
+Fix a regression where `onToken` would receive 'name' tokens for 'new' keyword tokens.
+
+## 8.11.0 (2023-10-26)
+
+### Bug fixes
+
+Fix an issue where tokenizing (without parsing) an object literal with a property named `class` or `function` could, in some circumstance, put the tokenizer into an invalid state.
+
+Fix an issue where a slash after a call to a propery named the same as some keywords would be tokenized as a regular expression.
+
+### New features
+
+Upgrade to Unicode 15.1.
+
+Use a set of new, much more precise, TypeScript types.
+
+## 8.10.0 (2023-07-05)
+
+### New features
+
+Add a `checkPrivateFields` option that disables strict checking of private property use.
+
+## 8.9.0 (2023-06-16)
+
+### Bug fixes
+
+Forbid dynamic import after `new`, even when part of a member expression.
+
+### New features
+
+Add Unicode properties for ES2023.
+
+Add support for the `v` flag to regular expressions.
+
+## 8.8.2 (2023-01-23)
+
+### Bug fixes
+
+Fix a bug that caused `allowHashBang` to be set to false when not provided, even with `ecmaVersion >= 14`.
+
+Fix an exception when passing no option object to `parse` or `new Parser`.
+
+Fix incorrect parse error on `if (0) let\n[astral identifier char]`.
+
+## 8.8.1 (2022-10-24)
+
+### Bug fixes
+
+Make type for `Comment` compatible with estree types.
+
+## 8.8.0 (2022-07-21)
+
+### Bug fixes
+
+Allow parentheses around spread args in destructuring object assignment.
+
+Fix an issue where the tree contained `directive` properties in when parsing with a language version that doesn't support them.
+
+### New features
+
+Support hashbang comments by default in ECMAScript 2023 and later.
+
+## 8.7.1 (2021-04-26)
+
+### Bug fixes
+
+Stop handling `"use strict"` directives in ECMAScript versions before 5.
+
+Fix an issue where duplicate quoted export names in `export *` syntax were incorrectly checked.
+
+Add missing type for `tokTypes`.
+
+## 8.7.0 (2021-12-27)
+
+### New features
+
+Support quoted export names.
+
+Upgrade to Unicode 14.
+
+Add support for Unicode 13 properties in regular expressions.
+
+### Bug fixes
+
+Use a loop to find line breaks, because the existing regexp search would overrun the end of the searched range and waste a lot of time in minified code.
+
+## 8.6.0 (2021-11-18)
+
+### Bug fixes
+
+Fix a bug where an object literal with multiple `__proto__` properties would incorrectly be accepted if a later property value held an assigment.
+
+### New features
+
+Support class private fields with the `in` operator.
+
+## 8.5.0 (2021-09-06)
+
+### Bug fixes
+
+Improve context-dependent tokenization in a number of corner cases.
+
+Fix location tracking after a 0x2028 or 0x2029 character in a string literal (which before did not increase the line number).
+
+Fix an issue where arrow function bodies in for loop context would inappropriately consume `in` operators.
+
+Fix wrong end locations stored on SequenceExpression nodes.
+
+Implement restriction that `for`/`of` loop LHS can't start with `let`.
+
+### New features
+
+Add support for ES2022 class static blocks.
+
+Allow multiple input files to be passed to the CLI tool.
+
+## 8.4.1 (2021-06-24)
+
+### Bug fixes
+
+Fix a bug where `allowAwaitOutsideFunction` would allow `await` in class field initializers, and setting `ecmaVersion` to 13 or higher would allow top-level await in non-module sources.
+
+## 8.4.0 (2021-06-11)
+
+### New features
+
+A new option, `allowSuperOutsideMethod`, can be used to suppress the error when `super` is used in the wrong context.
+
+## 8.3.0 (2021-05-31)
+
+### New features
+
+Default `allowAwaitOutsideFunction` to true for ECMAScript 2022 an higher.
+
+Add support for the `d` ([indices](https://github.com/tc39/proposal-regexp-match-indices)) regexp flag.
+
+## 8.2.4 (2021-05-04)
+
+### Bug fixes
+
+Fix spec conformity in corner case 'for await (async of ...)'.
+
+## 8.2.3 (2021-05-04)
+
+### Bug fixes
+
+Fix an issue where the library couldn't parse 'for (async of ...)'.
+
+Fix a bug in UTF-16 decoding that would read characters incorrectly in some circumstances.
+
+## 8.2.2 (2021-04-29)
+
+### Bug fixes
+
+Fix a bug where a class field initialized to an async arrow function wouldn't allow await inside it. Same issue existed for generator arrow functions with yield.
+
+## 8.2.1 (2021-04-24)
+
+### Bug fixes
+
+Fix a regression introduced in 8.2.0 where static or async class methods with keyword names fail to parse.
+
+## 8.2.0 (2021-04-24)
+
+### New features
+
+Add support for ES2022 class fields and private methods.
+
+## 8.1.1 (2021-04-12)
+
+### Various
+
+Stop shipping source maps in the NPM package.
+
+## 8.1.0 (2021-03-09)
+
+### Bug fixes
+
+Fix a spurious error in nested destructuring arrays.
+
+### New features
+
+Expose `allowAwaitOutsideFunction` in CLI interface.
+
+Make `allowImportExportAnywhere` also apply to `import.meta`.
+
+## 8.0.5 (2021-01-25)
+
+### Bug fixes
+
+Adjust package.json to work with Node 12.16.0 and 13.0-13.6.
+
+## 8.0.4 (2020-10-05)
+
+### Bug fixes
+
+Make `await x ** y` an error, following the spec.
+
+Fix potentially exponential regular expression.
+
+## 8.0.3 (2020-10-02)
+
+### Bug fixes
+
+Fix a wasteful loop during `Parser` creation when setting `ecmaVersion` to `"latest"`.
+
+## 8.0.2 (2020-09-30)
+
+### Bug fixes
+
+Make the TypeScript types reflect the current allowed values for `ecmaVersion`.
+
+Fix another regexp/division tokenizer issue.
+
+## 8.0.1 (2020-08-12)
+
+### Bug fixes
+
+Provide the correct value in the `version` export.
+
+## 8.0.0 (2020-08-12)
+
+### Bug fixes
+
+Disallow expressions like `(a = b) = c`.
+
+Make non-octal escape sequences a syntax error in strict mode.
+
+### New features
+
+The package can now be loaded directly as an ECMAScript module in node 13+.
+
+Update to the set of Unicode properties from ES2021.
+
+### Breaking changes
+
+The `ecmaVersion` option is now required. For the moment, omitting it will still work with a warning, but that will change in a future release.
+
+Some changes to method signatures that may be used by plugins.
+
+## 7.4.0 (2020-08-03)
+
+### New features
+
+Add support for logical assignment operators.
+
+Add support for numeric separators.
+
+## 7.3.1 (2020-06-11)
+
+### Bug fixes
+
+Make the string in the `version` export match the actual library version.
+
+## 7.3.0 (2020-06-11)
+
+### Bug fixes
+
+Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail.
+
+### New features
+
+Add support for optional chaining (`?.`).
+
+## 7.2.0 (2020-05-09)
+
+### Bug fixes
+
+Fix precedence issue in parsing of async arrow functions.
+
+### New features
+
+Add support for nullish coalescing.
+
+Add support for `import.meta`.
+
+Support `export * as ...` syntax.
+
+Upgrade to Unicode 13.
+
+## 6.4.1 (2020-03-09)
+
+### Bug fixes
+
+More carefully check for valid UTF16 surrogate pairs in regexp validator.
+
+## 7.1.1 (2020-03-01)
+
+### Bug fixes
+
+Treat `\8` and `\9` as invalid escapes in template strings.
+
+Allow unicode escapes in property names that are keywords.
+
+Don't error on an exponential operator expression as argument to `await`.
+
+More carefully check for valid UTF16 surrogate pairs in regexp validator.
+
+## 7.1.0 (2019-09-24)
+
+### Bug fixes
+
+Disallow trailing object literal commas when ecmaVersion is less than 5.
+
+### New features
+
+Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on.
+
+## 7.0.0 (2019-08-13)
+
+### Breaking changes
+
+Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression).
+
+Makes 10 (ES2019) the default value for the `ecmaVersion` option.
+
+## 6.3.0 (2019-08-12)
+
+### New features
+
+`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard.
+
+## 6.2.1 (2019-07-21)
+
+### Bug fixes
+
+Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such.
+
+Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances.
+
+## 6.2.0 (2019-07-04)
+
+### Bug fixes
+
+Improve valid assignment checking in `for`/`in` and `for`/`of` loops.
+
+Disallow binding `let` in patterns.
+
+### New features
+
+Support bigint syntax with `ecmaVersion` >= 11.
+
+Support dynamic `import` syntax with `ecmaVersion` >= 11.
+
+Upgrade to Unicode version 12.
+
+## 6.1.1 (2019-02-27)
+
+### Bug fixes
+
+Fix bug that caused parsing default exports of with names to fail.
+
+## 6.1.0 (2019-02-08)
+
+### Bug fixes
+
+Fix scope checking when redefining a `var` as a lexical binding.
+
+### New features
+
+Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins.
+
+## 6.0.7 (2019-02-04)
+
+### Bug fixes
+
+Check that exported bindings are defined.
+
+Don't treat `\u180e` as a whitespace character.
+
+Check for duplicate parameter names in methods.
+
+Don't allow shorthand properties when they are generators or async methods.
+
+Forbid binding `await` in async arrow function's parameter list.
+
+## 6.0.6 (2019-01-30)
+
+### Bug fixes
+
+The content of class declarations and expressions is now always parsed in strict mode.
+
+Don't allow `let` or `const` to bind the variable name `let`.
+
+Treat class declarations as lexical.
+
+Don't allow a generator function declaration as the sole body of an `if` or `else`.
+
+Ignore `"use strict"` when after an empty statement.
+
+Allow string line continuations with special line terminator characters.
+
+Treat `for` bodies as part of the `for` scope when checking for conflicting bindings.
+
+Fix bug with parsing `yield` in a `for` loop initializer.
+
+Implement special cases around scope checking for functions.
+
+## 6.0.5 (2019-01-02)
+
+### Bug fixes
+
+Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type.
+
+Don't treat `let` as a keyword when the next token is `{` on the next line.
+
+Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on.
+
+## 6.0.4 (2018-11-05)
+
+### Bug fixes
+
+Further improvements to tokenizing regular expressions in corner cases.
+
+## 6.0.3 (2018-11-04)
+
+### Bug fixes
+
+Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression.
+
+Remove stray symlink in the package tarball.
+
+## 6.0.2 (2018-09-26)
+
+### Bug fixes
+
+Fix bug where default expressions could fail to parse inside an object destructuring assignment expression.
+
+## 6.0.1 (2018-09-14)
+
+### Bug fixes
+
+Fix wrong value in `version` export.
+
+## 6.0.0 (2018-09-14)
+
+### Bug fixes
+
+Better handle variable-redefinition checks for catch bindings and functions directly under if statements.
+
+Forbid `new.target` in top-level arrow functions.
+
+Fix issue with parsing a regexp after `yield` in some contexts.
+
+### New features
+
+The package now comes with TypeScript definitions.
+
+### Breaking changes
+
+The default value of the `ecmaVersion` option is now 9 (2018).
+
+Plugins work differently, and will have to be rewritten to work with this version.
+
+The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`).
+
+## 5.7.3 (2018-09-10)
+
+### Bug fixes
+
+Fix failure to tokenize regexps after expressions like `x.of`.
+
+Better error message for unterminated template literals.
+
+## 5.7.2 (2018-08-24)
+
+### Bug fixes
+
+Properly handle `allowAwaitOutsideFunction` in for statements.
+
+Treat function declarations at the top level of modules like let bindings.
+
+Don't allow async function declarations as the only statement under a label.
+
+## 5.7.0 (2018-06-15)
+
+### New features
+
+Upgraded to Unicode 11.
+
+## 5.6.0 (2018-05-31)
+
+### New features
+
+Allow U+2028 and U+2029 in string when ECMAVersion >= 10.
+
+Allow binding-less catch statements when ECMAVersion >= 10.
+
+Add `allowAwaitOutsideFunction` option for parsing top-level `await`.
+
+## 5.5.3 (2018-03-08)
+
+### Bug fixes
+
+A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps.
+
+## 5.5.2 (2018-03-08)
+
+### Bug fixes
+
+A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0.
+
+## 5.5.1 (2018-03-06)
+
+### Bug fixes
+
+Fix misleading error message for octal escapes in template strings.
+
+## 5.5.0 (2018-02-27)
+
+### New features
+
+The identifier character categorization is now based on Unicode version 10.
+
+Acorn will now validate the content of regular expressions, including new ES9 features.
+
+## 5.4.0 (2018-02-01)
+
+### Bug fixes
+
+Disallow duplicate or escaped flags on regular expressions.
+
+Disallow octal escapes in strings in strict mode.
+
+### New features
+
+Add support for async iteration.
+
+Add support for object spread and rest.
+
+## 5.3.0 (2017-12-28)
+
+### Bug fixes
+
+Fix parsing of floating point literals with leading zeroes in loose mode.
+
+Allow duplicate property names in object patterns.
+
+Don't allow static class methods named `prototype`.
+
+Disallow async functions directly under `if` or `else`.
+
+Parse right-hand-side of `for`/`of` as an assignment expression.
+
+Stricter parsing of `for`/`in`.
+
+Don't allow unicode escapes in contextual keywords.
+
+### New features
+
+Parsing class members was factored into smaller methods to allow plugins to hook into it.
+
+## 5.2.1 (2017-10-30)
+
+### Bug fixes
+
+Fix a token context corruption bug.
+
+## 5.2.0 (2017-10-30)
+
+### Bug fixes
+
+Fix token context tracking for `class` and `function` in property-name position.
+
+Make sure `%*` isn't parsed as a valid operator.
+
+Allow shorthand properties `get` and `set` to be followed by default values.
+
+Disallow `super` when not in callee or object position.
+
+### New features
+
+Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements.
+
+## 5.1.2 (2017-09-04)
+
+### Bug fixes
+
+Disable parsing of legacy HTML-style comments in modules.
+
+Fix parsing of async methods whose names are keywords.
+
+## 5.1.1 (2017-07-06)
+
+### Bug fixes
+
+Fix problem with disambiguating regexp and division after a class.
+
+## 5.1.0 (2017-07-05)
+
+### Bug fixes
+
+Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`.
+
+Parse zero-prefixed numbers with non-octal digits as decimal.
+
+Allow object/array patterns in rest parameters.
+
+Don't error when `yield` is used as a property name.
+
+Allow `async` as a shorthand object property.
+
+### New features
+
+Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9.
+
+## 5.0.3 (2017-04-01)
+
+### Bug fixes
+
+Fix spurious duplicate variable definition errors for named functions.
+
+## 5.0.2 (2017-03-30)
+
+### Bug fixes
+
+A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error.
+
+## 5.0.0 (2017-03-28)
+
+### Bug fixes
+
+Raise an error for duplicated lexical bindings.
+
+Fix spurious error when an assignement expression occurred after a spread expression.
+
+Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions.
+
+Allow labels in front or `var` declarations, even in strict mode.
+
+### Breaking changes
+
+Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`.
+
+## 4.0.11 (2017-02-07)
+
+### Bug fixes
+
+Allow all forms of member expressions to be parenthesized as lvalue.
+
+## 4.0.10 (2017-02-07)
+
+### Bug fixes
+
+Don't expect semicolons after default-exported functions or classes, even when they are expressions.
+
+Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode.
+
+## 4.0.9 (2017-02-06)
+
+### Bug fixes
+
+Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again.
+
+## 4.0.8 (2017-02-03)
+
+### Bug fixes
+
+Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet.
+
+## 4.0.7 (2017-02-02)
+
+### Bug fixes
+
+Accept invalidly rejected code like `(x).y = 2` again.
+
+Don't raise an error when a function _inside_ strict code has a non-simple parameter list.
+
+## 4.0.6 (2017-02-02)
+
+### Bug fixes
+
+Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check.
+
+## 4.0.5 (2017-02-02)
+
+### Bug fixes
+
+Disallow parenthesized pattern expressions.
+
+Allow keywords as export names.
+
+Don't allow the `async` keyword to be parenthesized.
+
+Properly raise an error when a keyword contains a character escape.
+
+Allow `"use strict"` to appear after other string literal expressions.
+
+Disallow labeled declarations.
+
+## 4.0.4 (2016-12-19)
+
+### Bug fixes
+
+Fix crash when `export` was followed by a keyword that can't be
+exported.
+
+## 4.0.3 (2016-08-16)
+
+### Bug fixes
+
+Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode.
+
+Properly parse properties named `async` in ES2017 mode.
+
+Fix bug where reserved words were broken in ES2017 mode.
+
+## 4.0.2 (2016-08-11)
+
+### Bug fixes
+
+Don't ignore period or 'e' characters after octal numbers.
+
+Fix broken parsing for call expressions in default parameter values of arrow functions.
+
+## 4.0.1 (2016-08-08)
+
+### Bug fixes
+
+Fix false positives in duplicated export name errors.
+
+## 4.0.0 (2016-08-07)
+
+### Breaking changes
+
+The default `ecmaVersion` option value is now 7.
+
+A number of internal method signatures changed, so plugins might need to be updated.
+
+### Bug fixes
+
+The parser now raises errors on duplicated export names.
+
+`arguments` and `eval` can now be used in shorthand properties.
+
+Duplicate parameter names in non-simple argument lists now always produce an error.
+
+### New features
+
+The `ecmaVersion` option now also accepts year-style version numbers
+(2015, etc).
+
+Support for `async`/`await` syntax when `ecmaVersion` is >= 8.
+
+Support for trailing commas in call expressions when `ecmaVersion` is >= 8.
+
+## 3.3.0 (2016-07-25)
+
+### Bug fixes
+
+Fix bug in tokenizing of regexp operator after a function declaration.
+
+Fix parser crash when parsing an array pattern with a hole.
+
+### New features
+
+Implement check against complex argument lists in functions that enable strict mode in ES7.
+
+## 3.2.0 (2016-06-07)
+
+### Bug fixes
+
+Improve handling of lack of unicode regexp support in host
+environment.
+
+Properly reject shorthand properties whose name is a keyword.
+
+### New features
+
+Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object.
+
+## 3.1.0 (2016-04-18)
+
+### Bug fixes
+
+Properly tokenize the division operator directly after a function expression.
+
+Allow trailing comma in destructuring arrays.
+
+## 3.0.4 (2016-02-25)
+
+### Fixes
+
+Allow update expressions as left-hand-side of the ES7 exponential operator.
+
+## 3.0.2 (2016-02-10)
+
+### Fixes
+
+Fix bug that accidentally made `undefined` a reserved word when parsing ES7.
+
+## 3.0.0 (2016-02-10)
+
+### Breaking changes
+
+The default value of the `ecmaVersion` option is now 6 (used to be 5).
+
+Support for comprehension syntax (which was dropped from the draft spec) has been removed.
+
+### Fixes
+
+`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code.
+
+A parenthesized class or function expression after `export default` is now parsed correctly.
+
+### New features
+
+When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`).
+
+The identifier character ranges are now based on Unicode 8.0.0.
+
+Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled.
+
+## 2.7.0 (2016-01-04)
+
+### Fixes
+
+Stop allowing rest parameters in setters.
+
+Disallow `y` rexexp flag in ES5.
+
+Disallow `\00` and `\000` escapes in strict mode.
+
+Raise an error when an import name is a reserved word.
+
+## 2.6.2 (2015-11-10)
+
+### Fixes
+
+Don't crash when no options object is passed.
+
+## 2.6.0 (2015-11-09)
+
+### Fixes
+
+Add `await` as a reserved word in module sources.
+
+Disallow `yield` in a parameter default value for a generator.
+
+Forbid using a comma after a rest pattern in an array destructuring.
+
+### New features
+
+Support parsing stdin in command-line tool.
+
+## 2.5.0 (2015-10-27)
+
+### Fixes
+
+Fix tokenizer support in the command-line tool.
+
+Stop allowing `new.target` outside of functions.
+
+Remove legacy `guard` and `guardedHandler` properties from try nodes.
+
+Stop allowing multiple `__proto__` properties on an object literal in strict mode.
+
+Don't allow rest parameters to be non-identifier patterns.
+
+Check for duplicate paramter names in arrow functions.
diff --git a/slider/node_modules/acorn/LICENSE b/slider/node_modules/acorn/LICENSE
new file mode 100644
index 0000000..5d7f1ea
--- /dev/null
+++ b/slider/node_modules/acorn/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (C) 2012-2022 by various contributors (see AUTHORS)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/slider/node_modules/acorn/README.md b/slider/node_modules/acorn/README.md
new file mode 100644
index 0000000..98fbf5a
--- /dev/null
+++ b/slider/node_modules/acorn/README.md
@@ -0,0 +1,282 @@
+# Acorn
+
+A tiny, fast JavaScript parser written in JavaScript.
+
+## Community
+
+Acorn is open source software released under an
+[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE).
+
+You are welcome to
+[report bugs](https://github.com/acornjs/acorn/issues) or create pull
+requests on [github](https://github.com/acornjs/acorn).
+
+## Installation
+
+The easiest way to install acorn is from [`npm`](https://www.npmjs.com/):
+
+```sh
+npm install acorn
+```
+
+Alternately, you can download the source and build acorn yourself:
+
+```sh
+git clone https://github.com/acornjs/acorn.git
+cd acorn
+npm install
+```
+
+## Interface
+
+**parse**`(input, options)` is the main interface to the library. The
+`input` parameter is a string, `options` must be an object setting
+some of the options listed below. The return value will be an abstract
+syntax tree object as specified by the [ESTree
+spec](https://github.com/estree/estree).
+
+```javascript
+let acorn = require("acorn");
+console.log(acorn.parse("1 + 1", {ecmaVersion: 2020}));
+```
+
+When encountering a syntax error, the parser will raise a
+`SyntaxError` object with a meaningful message. The error object will
+have a `pos` property that indicates the string offset at which the
+error occurred, and a `loc` object that contains a `{line, column}`
+object referring to that same position.
+
+Options are provided by in a second argument, which should be an
+object containing any of these fields (only `ecmaVersion` is
+required):
+
+- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
+  number, either in year (`2022`) or plain version number (`6`) form,
+  or `"latest"` (the latest the library supports). This influences
+  support for strict mode, the set of reserved words, and support for
+  new syntax features.
+
+  **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
+  implemented by Acorn. Other proposed new features must be
+  implemented through plugins.
+
+- **sourceType**: Indicate the mode the code should be parsed in. Can be
+  either `"script"` or `"module"`. This influences global strict mode
+  and parsing of `import` and `export` declarations.
+
+  **NOTE**: If set to `"module"`, then static `import` / `export` syntax
+  will be valid, even if `ecmaVersion` is less than 6.
+
+- **onInsertedSemicolon**: If given a callback, that callback will be
+  called whenever a missing semicolon is inserted by the parser. The
+  callback will be given the character offset of the point where the
+  semicolon is inserted as argument, and if `locations` is on, also a
+  `{line, column}` object representing this position.
+
+- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing
+  commas.
+
+- **allowReserved**: If `false`, using a reserved word will generate
+  an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher
+  versions. When given the value `"never"`, reserved words and
+  keywords can also not be used as property names (as in Internet
+  Explorer's old parser).
+
+- **allowReturnOutsideFunction**: By default, a return statement at
+  the top level raises an error. Set this to `true` to accept such
+  code.
+
+- **allowImportExportEverywhere**: By default, `import` and `export`
+  declarations can only appear at a program's top level. Setting this
+  option to `true` allows them anywhere where a statement is allowed,
+  and also allows `import.meta` expressions to appear in scripts
+  (when `sourceType` is not `"module"`).
+
+- **allowAwaitOutsideFunction**: If `false`, `await` expressions can
+  only appear inside `async` functions. Defaults to `true` in modules
+  for `ecmaVersion` 2022 and later, `false` for lower versions.
+  Setting this option to `true` allows to have top-level `await`
+  expressions. They are still not allowed in non-`async` functions,
+  though.
+
+- **allowSuperOutsideMethod**: By default, `super` outside a method
+  raises an error. Set this to `true` to accept such code.
+
+- **allowHashBang**: When this is enabled, if the code starts with the
+  characters `#!` (as in a shellscript), the first line will be
+  treated as a comment. Defaults to true when `ecmaVersion` >= 2023.
+
+- **checkPrivateFields**: By default, the parser will verify that
+  private properties are only used in places where they are valid and
+  have been declared. Set this to false to turn such checks off.
+
+- **locations**: When `true`, each node has a `loc` object attached
+  with `start` and `end` subobjects, each of which contains the
+  one-based line and zero-based column numbers in `{line, column}`
+  form. Default is `false`.
+
+- **onToken**: If a function is passed for this option, each found
+  token will be passed in same format as tokens returned from
+  `tokenizer().getToken()`.
+
+  If array is passed, each found token is pushed to it.
+
+  Note that you are not allowed to call the parser from the
+  callback—that will corrupt its internal state.
+
+- **onComment**: If a function is passed for this option, whenever a
+  comment is encountered the function will be called with the
+  following parameters:
+
+  - `block`: `true` if the comment is a block comment, false if it
+    is a line comment.
+  - `text`: The content of the comment.
+  - `start`: Character offset of the start of the comment.
+  - `end`: Character offset of the end of the comment.
+
+  When the `locations` options is on, the `{line, column}` locations
+  of the comment’s start and end are passed as two additional
+  parameters.
+
+  If array is passed for this option, each found comment is pushed
+  to it as object in Esprima format:
+
+  ```javascript
+  {
+    "type": "Line" | "Block",
+    "value": "comment text",
+    "start": Number,
+    "end": Number,
+    // If `locations` option is on:
+    "loc": {
+      "start": {line: Number, column: Number}
+      "end": {line: Number, column: Number}
+    },
+    // If `ranges` option is on:
+    "range": [Number, Number]
+  }
+  ```
+
+  Note that you are not allowed to call the parser from the
+  callback—that will corrupt its internal state.
+
+- **ranges**: Nodes have their start and end characters offsets
+  recorded in `start` and `end` properties (directly on the node,
+  rather than the `loc` object, which holds line/column data. To also
+  add a
+  [semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678)
+  `range` property holding a `[start, end]` array with the same
+  numbers, set the `ranges` option to `true`.
+
+- **program**: It is possible to parse multiple files into a single
+  AST by passing the tree produced by parsing the first file as the
+  `program` option in subsequent parses. This will add the toplevel
+  forms of the parsed file to the "Program" (top) node of an existing
+  parse tree.
+
+- **sourceFile**: When the `locations` option is `true`, you can pass
+  this option to add a `source` attribute in every node’s `loc`
+  object. Note that the contents of this option are not examined or
+  processed in any way; you are free to use whatever format you
+  choose.
+
+- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property
+  will be added (regardless of the `location` option) directly to the
+  nodes, rather than the `loc` object.
+
+- **preserveParens**: If this option is `true`, parenthesized expressions
+  are represented by (non-standard) `ParenthesizedExpression` nodes
+  that have a single `expression` property containing the expression
+  inside parentheses.
+
+**parseExpressionAt**`(input, offset, options)` will parse a single
+expression in a string, and return its AST. It will not complain if
+there is more of the string left after the expression.
+
+**tokenizer**`(input, options)` returns an object with a `getToken`
+method that can be called repeatedly to get the next token, a `{start,
+end, type, value}` object (with added `loc` property when the
+`locations` option is enabled and `range` property when the `ranges`
+option is enabled). When the token's type is `tokTypes.eof`, you
+should stop calling the method, since it will keep returning that same
+token forever.
+
+Note that tokenizing JavaScript without parsing it is, in modern
+versions of the language, not really possible due to the way syntax is
+overloaded in ways that can only be disambiguated by the parse
+context. This package applies a bunch of heuristics to try and do a
+reasonable job, but you are advised to use `parse` with the `onToken`
+option instead of this.
+
+In ES6 environment, returned result can be used as any other
+protocol-compliant iterable:
+
+```javascript
+for (let token of acorn.tokenizer(str)) {
+  // iterate over the tokens
+}
+
+// transform code to array of tokens:
+var tokens = [...acorn.tokenizer(str)];
+```
+
+**tokTypes** holds an object mapping names to the token type objects
+that end up in the `type` properties of tokens.
+
+**getLineInfo**`(input, offset)` can be used to get a `{line,
+column}` object for a given program string and offset.
+
+### The `Parser` class
+
+Instances of the **`Parser`** class contain all the state and logic
+that drives a parse. It has static methods `parse`,
+`parseExpressionAt`, and `tokenizer` that match the top-level
+functions by the same name.
+
+When extending the parser with plugins, you need to call these methods
+on the extended version of the class. To extend a parser with plugins,
+you can use its static `extend` method.
+
+```javascript
+var acorn = require("acorn");
+var jsx = require("acorn-jsx");
+var JSXParser = acorn.Parser.extend(jsx());
+JSXParser.parse("foo()", {ecmaVersion: 2020});
+```
+
+The `extend` method takes any number of plugin values, and returns a
+new `Parser` class that includes the extra parser logic provided by
+the plugins.
+
+## Command line interface
+
+The `bin/acorn` utility can be used to parse a file from the command
+line. It accepts as arguments its input file and the following
+options:
+
+- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version
+  to parse. Default is version 9.
+
+- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise.
+
+- `--locations`: Attaches a "loc" object to each node with "start" and
+  "end" subobjects, each of which contains the one-based line and
+  zero-based column numbers in `{line, column}` form.
+
+- `--allow-hash-bang`: If the code starts with the characters #! (as
+  in a shellscript), the first line will be treated as a comment.
+
+- `--allow-await-outside-function`: Allows top-level `await` expressions.
+  See the `allowAwaitOutsideFunction` option for more information.
+
+- `--compact`: No whitespace is used in the AST output.
+
+- `--silent`: Do not output the AST, just return the exit status.
+
+- `--help`: Print the usage information and quit.
+
+The utility spits out the syntax tree as JSON data.
+
+## Existing plugins
+
+ - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)
diff --git a/slider/node_modules/acorn/bin/acorn b/slider/node_modules/acorn/bin/acorn
new file mode 100755
index 0000000..bdc3908
--- /dev/null
+++ b/slider/node_modules/acorn/bin/acorn
@@ -0,0 +1,4 @@
+#!/usr/bin/env node
+"use strict"
+
+require("../dist/bin.js")
diff --git a/slider/node_modules/acorn/dist/acorn.d.mts b/slider/node_modules/acorn/dist/acorn.d.mts
new file mode 100644
index 0000000..c74e8c1
--- /dev/null
+++ b/slider/node_modules/acorn/dist/acorn.d.mts
@@ -0,0 +1,883 @@
+export interface Node {
+  start: number
+  end: number
+  type: string
+  range?: [number, number]
+  loc?: SourceLocation | null
+}
+
+export interface SourceLocation {
+  source?: string | null
+  start: Position
+  end: Position
+}
+
+export interface Position {
+  /** 1-based */
+  line: number
+  /** 0-based */
+  column: number
+}
+
+export interface Identifier extends Node {
+  type: "Identifier"
+  name: string
+}
+
+export interface Literal extends Node {
+  type: "Literal"
+  value?: string | boolean | null | number | RegExp | bigint
+  raw?: string
+  regex?: {
+    pattern: string
+    flags: string
+  }
+  bigint?: string
+}
+
+export interface Program extends Node {
+  type: "Program"
+  body: Array
+  sourceType: "script" | "module"
+}
+
+export interface Function extends Node {
+  id?: Identifier | null
+  params: Array
+  body: BlockStatement | Expression
+  generator: boolean
+  expression: boolean
+  async: boolean
+}
+
+export interface ExpressionStatement extends Node {
+  type: "ExpressionStatement"
+  expression: Expression | Literal
+  directive?: string
+}
+
+export interface BlockStatement extends Node {
+  type: "BlockStatement"
+  body: Array
+}
+
+export interface EmptyStatement extends Node {
+  type: "EmptyStatement"
+}
+
+export interface DebuggerStatement extends Node {
+  type: "DebuggerStatement"
+}
+
+export interface WithStatement extends Node {
+  type: "WithStatement"
+  object: Expression
+  body: Statement
+}
+
+export interface ReturnStatement extends Node {
+  type: "ReturnStatement"
+  argument?: Expression | null
+}
+
+export interface LabeledStatement extends Node {
+  type: "LabeledStatement"
+  label: Identifier
+  body: Statement
+}
+
+export interface BreakStatement extends Node {
+  type: "BreakStatement"
+  label?: Identifier | null
+}
+
+export interface ContinueStatement extends Node {
+  type: "ContinueStatement"
+  label?: Identifier | null
+}
+
+export interface IfStatement extends Node {
+  type: "IfStatement"
+  test: Expression
+  consequent: Statement
+  alternate?: Statement | null
+}
+
+export interface SwitchStatement extends Node {
+  type: "SwitchStatement"
+  discriminant: Expression
+  cases: Array
+}
+
+export interface SwitchCase extends Node {
+  type: "SwitchCase"
+  test?: Expression | null
+  consequent: Array
+}
+
+export interface ThrowStatement extends Node {
+  type: "ThrowStatement"
+  argument: Expression
+}
+
+export interface TryStatement extends Node {
+  type: "TryStatement"
+  block: BlockStatement
+  handler?: CatchClause | null
+  finalizer?: BlockStatement | null
+}
+
+export interface CatchClause extends Node {
+  type: "CatchClause"
+  param?: Pattern | null
+  body: BlockStatement
+}
+
+export interface WhileStatement extends Node {
+  type: "WhileStatement"
+  test: Expression
+  body: Statement
+}
+
+export interface DoWhileStatement extends Node {
+  type: "DoWhileStatement"
+  body: Statement
+  test: Expression
+}
+
+export interface ForStatement extends Node {
+  type: "ForStatement"
+  init?: VariableDeclaration | Expression | null
+  test?: Expression | null
+  update?: Expression | null
+  body: Statement
+}
+
+export interface ForInStatement extends Node {
+  type: "ForInStatement"
+  left: VariableDeclaration | Pattern
+  right: Expression
+  body: Statement
+}
+
+export interface FunctionDeclaration extends Function {
+  type: "FunctionDeclaration"
+  id: Identifier
+  body: BlockStatement
+}
+
+export interface VariableDeclaration extends Node {
+  type: "VariableDeclaration"
+  declarations: Array
+  kind: "var" | "let" | "const" | "using" | "await using"
+}
+
+export interface VariableDeclarator extends Node {
+  type: "VariableDeclarator"
+  id: Pattern
+  init?: Expression | null
+}
+
+export interface ThisExpression extends Node {
+  type: "ThisExpression"
+}
+
+export interface ArrayExpression extends Node {
+  type: "ArrayExpression"
+  elements: Array
+}
+
+export interface ObjectExpression extends Node {
+  type: "ObjectExpression"
+  properties: Array
+}
+
+export interface Property extends Node {
+  type: "Property"
+  key: Expression
+  value: Expression
+  kind: "init" | "get" | "set"
+  method: boolean
+  shorthand: boolean
+  computed: boolean
+}
+
+export interface FunctionExpression extends Function {
+  type: "FunctionExpression"
+  body: BlockStatement
+}
+
+export interface UnaryExpression extends Node {
+  type: "UnaryExpression"
+  operator: UnaryOperator
+  prefix: boolean
+  argument: Expression
+}
+
+export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"
+
+export interface UpdateExpression extends Node {
+  type: "UpdateExpression"
+  operator: UpdateOperator
+  argument: Expression
+  prefix: boolean
+}
+
+export type UpdateOperator = "++" | "--"
+
+export interface BinaryExpression extends Node {
+  type: "BinaryExpression"
+  operator: BinaryOperator
+  left: Expression | PrivateIdentifier
+  right: Expression
+}
+
+export type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in" | "instanceof" | "**"
+
+export interface AssignmentExpression extends Node {
+  type: "AssignmentExpression"
+  operator: AssignmentOperator
+  left: Pattern
+  right: Expression
+}
+
+export type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=" | "||=" | "&&=" | "??="
+
+export interface LogicalExpression extends Node {
+  type: "LogicalExpression"
+  operator: LogicalOperator
+  left: Expression
+  right: Expression
+}
+
+export type LogicalOperator = "||" | "&&" | "??"
+
+export interface MemberExpression extends Node {
+  type: "MemberExpression"
+  object: Expression | Super
+  property: Expression | PrivateIdentifier
+  computed: boolean
+  optional: boolean
+}
+
+export interface ConditionalExpression extends Node {
+  type: "ConditionalExpression"
+  test: Expression
+  alternate: Expression
+  consequent: Expression
+}
+
+export interface CallExpression extends Node {
+  type: "CallExpression"
+  callee: Expression | Super
+  arguments: Array
+  optional: boolean
+}
+
+export interface NewExpression extends Node {
+  type: "NewExpression"
+  callee: Expression
+  arguments: Array
+}
+
+export interface SequenceExpression extends Node {
+  type: "SequenceExpression"
+  expressions: Array
+}
+
+export interface ForOfStatement extends Node {
+  type: "ForOfStatement"
+  left: VariableDeclaration | Pattern
+  right: Expression
+  body: Statement
+  await: boolean
+}
+
+export interface Super extends Node {
+  type: "Super"
+}
+
+export interface SpreadElement extends Node {
+  type: "SpreadElement"
+  argument: Expression
+}
+
+export interface ArrowFunctionExpression extends Function {
+  type: "ArrowFunctionExpression"
+}
+
+export interface YieldExpression extends Node {
+  type: "YieldExpression"
+  argument?: Expression | null
+  delegate: boolean
+}
+
+export interface TemplateLiteral extends Node {
+  type: "TemplateLiteral"
+  quasis: Array
+  expressions: Array
+}
+
+export interface TaggedTemplateExpression extends Node {
+  type: "TaggedTemplateExpression"
+  tag: Expression
+  quasi: TemplateLiteral
+}
+
+export interface TemplateElement extends Node {
+  type: "TemplateElement"
+  tail: boolean
+  value: {
+    cooked?: string | null
+    raw: string
+  }
+}
+
+export interface AssignmentProperty extends Node {
+  type: "Property"
+  key: Expression
+  value: Pattern
+  kind: "init"
+  method: false
+  shorthand: boolean
+  computed: boolean
+}
+
+export interface ObjectPattern extends Node {
+  type: "ObjectPattern"
+  properties: Array
+}
+
+export interface ArrayPattern extends Node {
+  type: "ArrayPattern"
+  elements: Array
+}
+
+export interface RestElement extends Node {
+  type: "RestElement"
+  argument: Pattern
+}
+
+export interface AssignmentPattern extends Node {
+  type: "AssignmentPattern"
+  left: Pattern
+  right: Expression
+}
+
+export interface Class extends Node {
+  id?: Identifier | null
+  superClass?: Expression | null
+  body: ClassBody
+}
+
+export interface ClassBody extends Node {
+  type: "ClassBody"
+  body: Array
+}
+
+export interface MethodDefinition extends Node {
+  type: "MethodDefinition"
+  key: Expression | PrivateIdentifier
+  value: FunctionExpression
+  kind: "constructor" | "method" | "get" | "set"
+  computed: boolean
+  static: boolean
+}
+
+export interface ClassDeclaration extends Class {
+  type: "ClassDeclaration"
+  id: Identifier
+}
+
+export interface ClassExpression extends Class {
+  type: "ClassExpression"
+}
+
+export interface MetaProperty extends Node {
+  type: "MetaProperty"
+  meta: Identifier
+  property: Identifier
+}
+
+export interface ImportDeclaration extends Node {
+  type: "ImportDeclaration"
+  specifiers: Array
+  source: Literal
+  attributes: Array
+}
+
+export interface ImportSpecifier extends Node {
+  type: "ImportSpecifier"
+  imported: Identifier | Literal
+  local: Identifier
+}
+
+export interface ImportDefaultSpecifier extends Node {
+  type: "ImportDefaultSpecifier"
+  local: Identifier
+}
+
+export interface ImportNamespaceSpecifier extends Node {
+  type: "ImportNamespaceSpecifier"
+  local: Identifier
+}
+
+export interface ImportAttribute extends Node {
+  type: "ImportAttribute"
+  key: Identifier | Literal
+  value: Literal
+}
+
+export interface ExportNamedDeclaration extends Node {
+  type: "ExportNamedDeclaration"
+  declaration?: Declaration | null
+  specifiers: Array
+  source?: Literal | null
+  attributes: Array
+}
+
+export interface ExportSpecifier extends Node {
+  type: "ExportSpecifier"
+  exported: Identifier | Literal
+  local: Identifier | Literal
+}
+
+export interface AnonymousFunctionDeclaration extends Function {
+  type: "FunctionDeclaration"
+  id: null
+  body: BlockStatement
+}
+
+export interface AnonymousClassDeclaration extends Class {
+  type: "ClassDeclaration"
+  id: null
+}
+
+export interface ExportDefaultDeclaration extends Node {
+  type: "ExportDefaultDeclaration"
+  declaration: AnonymousFunctionDeclaration | FunctionDeclaration | AnonymousClassDeclaration | ClassDeclaration | Expression
+}
+
+export interface ExportAllDeclaration extends Node {
+  type: "ExportAllDeclaration"
+  source: Literal
+  exported?: Identifier | Literal | null
+  attributes: Array
+}
+
+export interface AwaitExpression extends Node {
+  type: "AwaitExpression"
+  argument: Expression
+}
+
+export interface ChainExpression extends Node {
+  type: "ChainExpression"
+  expression: MemberExpression | CallExpression
+}
+
+export interface ImportExpression extends Node {
+  type: "ImportExpression"
+  source: Expression
+  options: Expression | null
+}
+
+export interface ParenthesizedExpression extends Node {
+  type: "ParenthesizedExpression"
+  expression: Expression
+}
+
+export interface PropertyDefinition extends Node {
+  type: "PropertyDefinition"
+  key: Expression | PrivateIdentifier
+  value?: Expression | null
+  computed: boolean
+  static: boolean
+}
+
+export interface PrivateIdentifier extends Node {
+  type: "PrivateIdentifier"
+  name: string
+}
+
+export interface StaticBlock extends Node {
+  type: "StaticBlock"
+  body: Array
+}
+
+export type Statement = 
+| ExpressionStatement
+| BlockStatement
+| EmptyStatement
+| DebuggerStatement
+| WithStatement
+| ReturnStatement
+| LabeledStatement
+| BreakStatement
+| ContinueStatement
+| IfStatement
+| SwitchStatement
+| ThrowStatement
+| TryStatement
+| WhileStatement
+| DoWhileStatement
+| ForStatement
+| ForInStatement
+| ForOfStatement
+| Declaration
+
+export type Declaration = 
+| FunctionDeclaration
+| VariableDeclaration
+| ClassDeclaration
+
+export type Expression = 
+| Identifier
+| Literal
+| ThisExpression
+| ArrayExpression
+| ObjectExpression
+| FunctionExpression
+| UnaryExpression
+| UpdateExpression
+| BinaryExpression
+| AssignmentExpression
+| LogicalExpression
+| MemberExpression
+| ConditionalExpression
+| CallExpression
+| NewExpression
+| SequenceExpression
+| ArrowFunctionExpression
+| YieldExpression
+| TemplateLiteral
+| TaggedTemplateExpression
+| ClassExpression
+| MetaProperty
+| AwaitExpression
+| ChainExpression
+| ImportExpression
+| ParenthesizedExpression
+
+export type Pattern = 
+| Identifier
+| MemberExpression
+| ObjectPattern
+| ArrayPattern
+| RestElement
+| AssignmentPattern
+
+export type ModuleDeclaration = 
+| ImportDeclaration
+| ExportNamedDeclaration
+| ExportDefaultDeclaration
+| ExportAllDeclaration
+
+/**
+  * This interface is only used for defining {@link AnyNode}.
+  * It exists so that it can be extended by plugins:
+  *
+  * @example
+  * ```typescript
+  * declare module 'acorn' {
+  *   interface NodeTypes {
+  *     pluginName: FirstNode | SecondNode | ThirdNode | ... | LastNode
+  *   }
+  * }
+  * ```
+  */
+interface NodeTypes {
+  core: Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportAttribute | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator
+}
+
+export type AnyNode = NodeTypes[keyof NodeTypes]
+
+export function parse(input: string, options: Options): Program
+
+export function parseExpressionAt(input: string, pos: number, options: Options): Expression
+
+export function tokenizer(input: string, options: Options): {
+  getToken(): Token
+  [Symbol.iterator](): Iterator
+}
+
+export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | "latest"
+
+export interface Options {
+  /**
+   * `ecmaVersion` indicates the ECMAScript version to parse. Can be a
+   * number, either in year (`2022`) or plain version number (`6`) form,
+   * or `"latest"` (the latest the library supports). This influences
+   * support for strict mode, the set of reserved words, and support for
+   * new syntax features.
+   */
+  ecmaVersion: ecmaVersion
+
+  /**
+   * `sourceType` indicates the mode the code should be parsed in.
+   * Can be either `"script"` or `"module"`. This influences global
+   * strict mode and parsing of `import` and `export` declarations.
+   */
+  sourceType?: "script" | "module"
+
+  /**
+   * a callback that will be called when a semicolon is automatically inserted.
+   * @param lastTokEnd the position of the comma as an offset
+   * @param lastTokEndLoc location if {@link locations} is enabled
+   */
+  onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
+
+  /**
+   * similar to `onInsertedSemicolon`, but for trailing commas
+   * @param lastTokEnd the position of the comma as an offset
+   * @param lastTokEndLoc location if `locations` is enabled
+   */
+  onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
+
+  /**
+   * By default, reserved words are only enforced if ecmaVersion >= 5.
+   * Set `allowReserved` to a boolean value to explicitly turn this on
+   * an off. When this option has the value "never", reserved words
+   * and keywords can also not be used as property names.
+   */
+  allowReserved?: boolean | "never"
+
+  /** 
+   * When enabled, a return at the top level is not considered an error.
+   */
+  allowReturnOutsideFunction?: boolean
+
+  /**
+   * When enabled, import/export statements are not constrained to
+   * appearing at the top of the program, and an import.meta expression
+   * in a script isn't considered an error.
+   */
+  allowImportExportEverywhere?: boolean
+
+  /**
+   * By default, `await` identifiers are allowed to appear at the top-level scope only if {@link ecmaVersion} >= 2022.
+   * When enabled, await identifiers are allowed to appear at the top-level scope,
+   * but they are still not allowed in non-async functions.
+   */
+  allowAwaitOutsideFunction?: boolean
+
+  /**
+   * When enabled, super identifiers are not constrained to
+   * appearing in methods and do not raise an error when they appear elsewhere.
+   */
+  allowSuperOutsideMethod?: boolean
+
+  /**
+   * When enabled, hashbang directive in the beginning of file is
+   * allowed and treated as a line comment. Enabled by default when
+   * {@link ecmaVersion} >= 2023.
+   */
+  allowHashBang?: boolean
+
+  /**
+   * By default, the parser will verify that private properties are
+   * only used in places where they are valid and have been declared.
+   * Set this to false to turn such checks off.
+   */
+  checkPrivateFields?: boolean
+
+  /**
+   * When `locations` is on, `loc` properties holding objects with
+   * `start` and `end` properties as {@link Position} objects will be attached to the
+   * nodes.
+   */
+  locations?: boolean
+
+  /**
+   * a callback that will cause Acorn to call that export function with object in the same
+   * format as tokens returned from `tokenizer().getToken()`. Note
+   * that you are not allowed to call the parser from the
+   * callback—that will corrupt its internal state.
+   */
+  onToken?: ((token: Token) => void) | Token[]
+
+
+  /**
+   * This takes a export function or an array.
+   * 
+   * When a export function is passed, Acorn will call that export function with `(block, text, start,
+   * end)` parameters whenever a comment is skipped. `block` is a
+   * boolean indicating whether this is a block (`/* *\/`) comment,
+   * `text` is the content of the comment, and `start` and `end` are
+   * character offsets that denote the start and end of the comment.
+   * When the {@link locations} option is on, two more parameters are
+   * passed, the full locations of {@link Position} export type of the start and
+   * end of the comments.
+   * 
+   * When a array is passed, each found comment of {@link Comment} export type is pushed to the array.
+   * 
+   * Note that you are not allowed to call the
+   * parser from the callback—that will corrupt its internal state.
+   */
+  onComment?: ((
+    isBlock: boolean, text: string, start: number, end: number, startLoc?: Position,
+    endLoc?: Position
+  ) => void) | Comment[]
+
+  /**
+   * Nodes have their start and end characters offsets recorded in
+   * `start` and `end` properties (directly on the node, rather than
+   * the `loc` object, which holds line/column data. To also add a
+   * [semi-standardized][range] `range` property holding a `[start,
+   * end]` array with the same numbers, set the `ranges` option to
+   * `true`.
+   */
+  ranges?: boolean
+
+  /**
+   * It is possible to parse multiple files into a single AST by
+   * passing the tree produced by parsing the first file as
+   * `program` option in subsequent parses. This will add the
+   * toplevel forms of the parsed file to the `Program` (top) node
+   * of an existing parse tree.
+   */
+  program?: Node
+
+  /**
+   * When {@link locations} is on, you can pass this to record the source
+   * file in every node's `loc` object.
+   */
+  sourceFile?: string
+
+  /**
+   * This value, if given, is stored in every node, whether {@link locations} is on or off.
+   */
+  directSourceFile?: string
+
+  /**
+   * When enabled, parenthesized expressions are represented by
+   * (non-standard) ParenthesizedExpression nodes
+   */
+  preserveParens?: boolean
+}
+  
+export class Parser {
+  options: Options
+  input: string
+  
+  protected constructor(options: Options, input: string, startPos?: number)
+  parse(): Program
+  
+  static parse(input: string, options: Options): Program
+  static parseExpressionAt(input: string, pos: number, options: Options): Expression
+  static tokenizer(input: string, options: Options): {
+    getToken(): Token
+    [Symbol.iterator](): Iterator
+  }
+  static extend(...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser
+}
+
+export const defaultOptions: Options
+
+export function getLineInfo(input: string, offset: number): Position
+
+export class TokenType {
+  label: string
+  keyword: string | undefined
+}
+
+export const tokTypes: {
+  num: TokenType
+  regexp: TokenType
+  string: TokenType
+  name: TokenType
+  privateId: TokenType
+  eof: TokenType
+
+  bracketL: TokenType
+  bracketR: TokenType
+  braceL: TokenType
+  braceR: TokenType
+  parenL: TokenType
+  parenR: TokenType
+  comma: TokenType
+  semi: TokenType
+  colon: TokenType
+  dot: TokenType
+  question: TokenType
+  questionDot: TokenType
+  arrow: TokenType
+  template: TokenType
+  invalidTemplate: TokenType
+  ellipsis: TokenType
+  backQuote: TokenType
+  dollarBraceL: TokenType
+
+  eq: TokenType
+  assign: TokenType
+  incDec: TokenType
+  prefix: TokenType
+  logicalOR: TokenType
+  logicalAND: TokenType
+  bitwiseOR: TokenType
+  bitwiseXOR: TokenType
+  bitwiseAND: TokenType
+  equality: TokenType
+  relational: TokenType
+  bitShift: TokenType
+  plusMin: TokenType
+  modulo: TokenType
+  star: TokenType
+  slash: TokenType
+  starstar: TokenType
+  coalesce: TokenType
+
+  _break: TokenType
+  _case: TokenType
+  _catch: TokenType
+  _continue: TokenType
+  _debugger: TokenType
+  _default: TokenType
+  _do: TokenType
+  _else: TokenType
+  _finally: TokenType
+  _for: TokenType
+  _function: TokenType
+  _if: TokenType
+  _return: TokenType
+  _switch: TokenType
+  _throw: TokenType
+  _try: TokenType
+  _var: TokenType
+  _const: TokenType
+  _while: TokenType
+  _with: TokenType
+  _new: TokenType
+  _this: TokenType
+  _super: TokenType
+  _class: TokenType
+  _extends: TokenType
+  _export: TokenType
+  _import: TokenType
+  _null: TokenType
+  _true: TokenType
+  _false: TokenType
+  _in: TokenType
+  _instanceof: TokenType
+  _typeof: TokenType
+  _void: TokenType
+  _delete: TokenType
+}
+
+export interface Comment {
+  type: "Line" | "Block"
+  value: string
+  start: number
+  end: number
+  loc?: SourceLocation
+  range?: [number, number]
+}
+
+export class Token {
+  type: TokenType
+  start: number
+  end: number
+  loc?: SourceLocation
+  range?: [number, number]
+}
+
+export const version: string
diff --git a/slider/node_modules/acorn/dist/acorn.d.ts b/slider/node_modules/acorn/dist/acorn.d.ts
new file mode 100644
index 0000000..c74e8c1
--- /dev/null
+++ b/slider/node_modules/acorn/dist/acorn.d.ts
@@ -0,0 +1,883 @@
+export interface Node {
+  start: number
+  end: number
+  type: string
+  range?: [number, number]
+  loc?: SourceLocation | null
+}
+
+export interface SourceLocation {
+  source?: string | null
+  start: Position
+  end: Position
+}
+
+export interface Position {
+  /** 1-based */
+  line: number
+  /** 0-based */
+  column: number
+}
+
+export interface Identifier extends Node {
+  type: "Identifier"
+  name: string
+}
+
+export interface Literal extends Node {
+  type: "Literal"
+  value?: string | boolean | null | number | RegExp | bigint
+  raw?: string
+  regex?: {
+    pattern: string
+    flags: string
+  }
+  bigint?: string
+}
+
+export interface Program extends Node {
+  type: "Program"
+  body: Array
+  sourceType: "script" | "module"
+}
+
+export interface Function extends Node {
+  id?: Identifier | null
+  params: Array
+  body: BlockStatement | Expression
+  generator: boolean
+  expression: boolean
+  async: boolean
+}
+
+export interface ExpressionStatement extends Node {
+  type: "ExpressionStatement"
+  expression: Expression | Literal
+  directive?: string
+}
+
+export interface BlockStatement extends Node {
+  type: "BlockStatement"
+  body: Array
+}
+
+export interface EmptyStatement extends Node {
+  type: "EmptyStatement"
+}
+
+export interface DebuggerStatement extends Node {
+  type: "DebuggerStatement"
+}
+
+export interface WithStatement extends Node {
+  type: "WithStatement"
+  object: Expression
+  body: Statement
+}
+
+export interface ReturnStatement extends Node {
+  type: "ReturnStatement"
+  argument?: Expression | null
+}
+
+export interface LabeledStatement extends Node {
+  type: "LabeledStatement"
+  label: Identifier
+  body: Statement
+}
+
+export interface BreakStatement extends Node {
+  type: "BreakStatement"
+  label?: Identifier | null
+}
+
+export interface ContinueStatement extends Node {
+  type: "ContinueStatement"
+  label?: Identifier | null
+}
+
+export interface IfStatement extends Node {
+  type: "IfStatement"
+  test: Expression
+  consequent: Statement
+  alternate?: Statement | null
+}
+
+export interface SwitchStatement extends Node {
+  type: "SwitchStatement"
+  discriminant: Expression
+  cases: Array
+}
+
+export interface SwitchCase extends Node {
+  type: "SwitchCase"
+  test?: Expression | null
+  consequent: Array
+}
+
+export interface ThrowStatement extends Node {
+  type: "ThrowStatement"
+  argument: Expression
+}
+
+export interface TryStatement extends Node {
+  type: "TryStatement"
+  block: BlockStatement
+  handler?: CatchClause | null
+  finalizer?: BlockStatement | null
+}
+
+export interface CatchClause extends Node {
+  type: "CatchClause"
+  param?: Pattern | null
+  body: BlockStatement
+}
+
+export interface WhileStatement extends Node {
+  type: "WhileStatement"
+  test: Expression
+  body: Statement
+}
+
+export interface DoWhileStatement extends Node {
+  type: "DoWhileStatement"
+  body: Statement
+  test: Expression
+}
+
+export interface ForStatement extends Node {
+  type: "ForStatement"
+  init?: VariableDeclaration | Expression | null
+  test?: Expression | null
+  update?: Expression | null
+  body: Statement
+}
+
+export interface ForInStatement extends Node {
+  type: "ForInStatement"
+  left: VariableDeclaration | Pattern
+  right: Expression
+  body: Statement
+}
+
+export interface FunctionDeclaration extends Function {
+  type: "FunctionDeclaration"
+  id: Identifier
+  body: BlockStatement
+}
+
+export interface VariableDeclaration extends Node {
+  type: "VariableDeclaration"
+  declarations: Array
+  kind: "var" | "let" | "const" | "using" | "await using"
+}
+
+export interface VariableDeclarator extends Node {
+  type: "VariableDeclarator"
+  id: Pattern
+  init?: Expression | null
+}
+
+export interface ThisExpression extends Node {
+  type: "ThisExpression"
+}
+
+export interface ArrayExpression extends Node {
+  type: "ArrayExpression"
+  elements: Array
+}
+
+export interface ObjectExpression extends Node {
+  type: "ObjectExpression"
+  properties: Array
+}
+
+export interface Property extends Node {
+  type: "Property"
+  key: Expression
+  value: Expression
+  kind: "init" | "get" | "set"
+  method: boolean
+  shorthand: boolean
+  computed: boolean
+}
+
+export interface FunctionExpression extends Function {
+  type: "FunctionExpression"
+  body: BlockStatement
+}
+
+export interface UnaryExpression extends Node {
+  type: "UnaryExpression"
+  operator: UnaryOperator
+  prefix: boolean
+  argument: Expression
+}
+
+export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"
+
+export interface UpdateExpression extends Node {
+  type: "UpdateExpression"
+  operator: UpdateOperator
+  argument: Expression
+  prefix: boolean
+}
+
+export type UpdateOperator = "++" | "--"
+
+export interface BinaryExpression extends Node {
+  type: "BinaryExpression"
+  operator: BinaryOperator
+  left: Expression | PrivateIdentifier
+  right: Expression
+}
+
+export type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in" | "instanceof" | "**"
+
+export interface AssignmentExpression extends Node {
+  type: "AssignmentExpression"
+  operator: AssignmentOperator
+  left: Pattern
+  right: Expression
+}
+
+export type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=" | "||=" | "&&=" | "??="
+
+export interface LogicalExpression extends Node {
+  type: "LogicalExpression"
+  operator: LogicalOperator
+  left: Expression
+  right: Expression
+}
+
+export type LogicalOperator = "||" | "&&" | "??"
+
+export interface MemberExpression extends Node {
+  type: "MemberExpression"
+  object: Expression | Super
+  property: Expression | PrivateIdentifier
+  computed: boolean
+  optional: boolean
+}
+
+export interface ConditionalExpression extends Node {
+  type: "ConditionalExpression"
+  test: Expression
+  alternate: Expression
+  consequent: Expression
+}
+
+export interface CallExpression extends Node {
+  type: "CallExpression"
+  callee: Expression | Super
+  arguments: Array
+  optional: boolean
+}
+
+export interface NewExpression extends Node {
+  type: "NewExpression"
+  callee: Expression
+  arguments: Array
+}
+
+export interface SequenceExpression extends Node {
+  type: "SequenceExpression"
+  expressions: Array
+}
+
+export interface ForOfStatement extends Node {
+  type: "ForOfStatement"
+  left: VariableDeclaration | Pattern
+  right: Expression
+  body: Statement
+  await: boolean
+}
+
+export interface Super extends Node {
+  type: "Super"
+}
+
+export interface SpreadElement extends Node {
+  type: "SpreadElement"
+  argument: Expression
+}
+
+export interface ArrowFunctionExpression extends Function {
+  type: "ArrowFunctionExpression"
+}
+
+export interface YieldExpression extends Node {
+  type: "YieldExpression"
+  argument?: Expression | null
+  delegate: boolean
+}
+
+export interface TemplateLiteral extends Node {
+  type: "TemplateLiteral"
+  quasis: Array
+  expressions: Array
+}
+
+export interface TaggedTemplateExpression extends Node {
+  type: "TaggedTemplateExpression"
+  tag: Expression
+  quasi: TemplateLiteral
+}
+
+export interface TemplateElement extends Node {
+  type: "TemplateElement"
+  tail: boolean
+  value: {
+    cooked?: string | null
+    raw: string
+  }
+}
+
+export interface AssignmentProperty extends Node {
+  type: "Property"
+  key: Expression
+  value: Pattern
+  kind: "init"
+  method: false
+  shorthand: boolean
+  computed: boolean
+}
+
+export interface ObjectPattern extends Node {
+  type: "ObjectPattern"
+  properties: Array
+}
+
+export interface ArrayPattern extends Node {
+  type: "ArrayPattern"
+  elements: Array
+}
+
+export interface RestElement extends Node {
+  type: "RestElement"
+  argument: Pattern
+}
+
+export interface AssignmentPattern extends Node {
+  type: "AssignmentPattern"
+  left: Pattern
+  right: Expression
+}
+
+export interface Class extends Node {
+  id?: Identifier | null
+  superClass?: Expression | null
+  body: ClassBody
+}
+
+export interface ClassBody extends Node {
+  type: "ClassBody"
+  body: Array
+}
+
+export interface MethodDefinition extends Node {
+  type: "MethodDefinition"
+  key: Expression | PrivateIdentifier
+  value: FunctionExpression
+  kind: "constructor" | "method" | "get" | "set"
+  computed: boolean
+  static: boolean
+}
+
+export interface ClassDeclaration extends Class {
+  type: "ClassDeclaration"
+  id: Identifier
+}
+
+export interface ClassExpression extends Class {
+  type: "ClassExpression"
+}
+
+export interface MetaProperty extends Node {
+  type: "MetaProperty"
+  meta: Identifier
+  property: Identifier
+}
+
+export interface ImportDeclaration extends Node {
+  type: "ImportDeclaration"
+  specifiers: Array
+  source: Literal
+  attributes: Array
+}
+
+export interface ImportSpecifier extends Node {
+  type: "ImportSpecifier"
+  imported: Identifier | Literal
+  local: Identifier
+}
+
+export interface ImportDefaultSpecifier extends Node {
+  type: "ImportDefaultSpecifier"
+  local: Identifier
+}
+
+export interface ImportNamespaceSpecifier extends Node {
+  type: "ImportNamespaceSpecifier"
+  local: Identifier
+}
+
+export interface ImportAttribute extends Node {
+  type: "ImportAttribute"
+  key: Identifier | Literal
+  value: Literal
+}
+
+export interface ExportNamedDeclaration extends Node {
+  type: "ExportNamedDeclaration"
+  declaration?: Declaration | null
+  specifiers: Array
+  source?: Literal | null
+  attributes: Array
+}
+
+export interface ExportSpecifier extends Node {
+  type: "ExportSpecifier"
+  exported: Identifier | Literal
+  local: Identifier | Literal
+}
+
+export interface AnonymousFunctionDeclaration extends Function {
+  type: "FunctionDeclaration"
+  id: null
+  body: BlockStatement
+}
+
+export interface AnonymousClassDeclaration extends Class {
+  type: "ClassDeclaration"
+  id: null
+}
+
+export interface ExportDefaultDeclaration extends Node {
+  type: "ExportDefaultDeclaration"
+  declaration: AnonymousFunctionDeclaration | FunctionDeclaration | AnonymousClassDeclaration | ClassDeclaration | Expression
+}
+
+export interface ExportAllDeclaration extends Node {
+  type: "ExportAllDeclaration"
+  source: Literal
+  exported?: Identifier | Literal | null
+  attributes: Array
+}
+
+export interface AwaitExpression extends Node {
+  type: "AwaitExpression"
+  argument: Expression
+}
+
+export interface ChainExpression extends Node {
+  type: "ChainExpression"
+  expression: MemberExpression | CallExpression
+}
+
+export interface ImportExpression extends Node {
+  type: "ImportExpression"
+  source: Expression
+  options: Expression | null
+}
+
+export interface ParenthesizedExpression extends Node {
+  type: "ParenthesizedExpression"
+  expression: Expression
+}
+
+export interface PropertyDefinition extends Node {
+  type: "PropertyDefinition"
+  key: Expression | PrivateIdentifier
+  value?: Expression | null
+  computed: boolean
+  static: boolean
+}
+
+export interface PrivateIdentifier extends Node {
+  type: "PrivateIdentifier"
+  name: string
+}
+
+export interface StaticBlock extends Node {
+  type: "StaticBlock"
+  body: Array
+}
+
+export type Statement = 
+| ExpressionStatement
+| BlockStatement
+| EmptyStatement
+| DebuggerStatement
+| WithStatement
+| ReturnStatement
+| LabeledStatement
+| BreakStatement
+| ContinueStatement
+| IfStatement
+| SwitchStatement
+| ThrowStatement
+| TryStatement
+| WhileStatement
+| DoWhileStatement
+| ForStatement
+| ForInStatement
+| ForOfStatement
+| Declaration
+
+export type Declaration = 
+| FunctionDeclaration
+| VariableDeclaration
+| ClassDeclaration
+
+export type Expression = 
+| Identifier
+| Literal
+| ThisExpression
+| ArrayExpression
+| ObjectExpression
+| FunctionExpression
+| UnaryExpression
+| UpdateExpression
+| BinaryExpression
+| AssignmentExpression
+| LogicalExpression
+| MemberExpression
+| ConditionalExpression
+| CallExpression
+| NewExpression
+| SequenceExpression
+| ArrowFunctionExpression
+| YieldExpression
+| TemplateLiteral
+| TaggedTemplateExpression
+| ClassExpression
+| MetaProperty
+| AwaitExpression
+| ChainExpression
+| ImportExpression
+| ParenthesizedExpression
+
+export type Pattern = 
+| Identifier
+| MemberExpression
+| ObjectPattern
+| ArrayPattern
+| RestElement
+| AssignmentPattern
+
+export type ModuleDeclaration = 
+| ImportDeclaration
+| ExportNamedDeclaration
+| ExportDefaultDeclaration
+| ExportAllDeclaration
+
+/**
+  * This interface is only used for defining {@link AnyNode}.
+  * It exists so that it can be extended by plugins:
+  *
+  * @example
+  * ```typescript
+  * declare module 'acorn' {
+  *   interface NodeTypes {
+  *     pluginName: FirstNode | SecondNode | ThirdNode | ... | LastNode
+  *   }
+  * }
+  * ```
+  */
+interface NodeTypes {
+  core: Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportAttribute | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator
+}
+
+export type AnyNode = NodeTypes[keyof NodeTypes]
+
+export function parse(input: string, options: Options): Program
+
+export function parseExpressionAt(input: string, pos: number, options: Options): Expression
+
+export function tokenizer(input: string, options: Options): {
+  getToken(): Token
+  [Symbol.iterator](): Iterator
+}
+
+export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | "latest"
+
+export interface Options {
+  /**
+   * `ecmaVersion` indicates the ECMAScript version to parse. Can be a
+   * number, either in year (`2022`) or plain version number (`6`) form,
+   * or `"latest"` (the latest the library supports). This influences
+   * support for strict mode, the set of reserved words, and support for
+   * new syntax features.
+   */
+  ecmaVersion: ecmaVersion
+
+  /**
+   * `sourceType` indicates the mode the code should be parsed in.
+   * Can be either `"script"` or `"module"`. This influences global
+   * strict mode and parsing of `import` and `export` declarations.
+   */
+  sourceType?: "script" | "module"
+
+  /**
+   * a callback that will be called when a semicolon is automatically inserted.
+   * @param lastTokEnd the position of the comma as an offset
+   * @param lastTokEndLoc location if {@link locations} is enabled
+   */
+  onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
+
+  /**
+   * similar to `onInsertedSemicolon`, but for trailing commas
+   * @param lastTokEnd the position of the comma as an offset
+   * @param lastTokEndLoc location if `locations` is enabled
+   */
+  onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
+
+  /**
+   * By default, reserved words are only enforced if ecmaVersion >= 5.
+   * Set `allowReserved` to a boolean value to explicitly turn this on
+   * an off. When this option has the value "never", reserved words
+   * and keywords can also not be used as property names.
+   */
+  allowReserved?: boolean | "never"
+
+  /** 
+   * When enabled, a return at the top level is not considered an error.
+   */
+  allowReturnOutsideFunction?: boolean
+
+  /**
+   * When enabled, import/export statements are not constrained to
+   * appearing at the top of the program, and an import.meta expression
+   * in a script isn't considered an error.
+   */
+  allowImportExportEverywhere?: boolean
+
+  /**
+   * By default, `await` identifiers are allowed to appear at the top-level scope only if {@link ecmaVersion} >= 2022.
+   * When enabled, await identifiers are allowed to appear at the top-level scope,
+   * but they are still not allowed in non-async functions.
+   */
+  allowAwaitOutsideFunction?: boolean
+
+  /**
+   * When enabled, super identifiers are not constrained to
+   * appearing in methods and do not raise an error when they appear elsewhere.
+   */
+  allowSuperOutsideMethod?: boolean
+
+  /**
+   * When enabled, hashbang directive in the beginning of file is
+   * allowed and treated as a line comment. Enabled by default when
+   * {@link ecmaVersion} >= 2023.
+   */
+  allowHashBang?: boolean
+
+  /**
+   * By default, the parser will verify that private properties are
+   * only used in places where they are valid and have been declared.
+   * Set this to false to turn such checks off.
+   */
+  checkPrivateFields?: boolean
+
+  /**
+   * When `locations` is on, `loc` properties holding objects with
+   * `start` and `end` properties as {@link Position} objects will be attached to the
+   * nodes.
+   */
+  locations?: boolean
+
+  /**
+   * a callback that will cause Acorn to call that export function with object in the same
+   * format as tokens returned from `tokenizer().getToken()`. Note
+   * that you are not allowed to call the parser from the
+   * callback—that will corrupt its internal state.
+   */
+  onToken?: ((token: Token) => void) | Token[]
+
+
+  /**
+   * This takes a export function or an array.
+   * 
+   * When a export function is passed, Acorn will call that export function with `(block, text, start,
+   * end)` parameters whenever a comment is skipped. `block` is a
+   * boolean indicating whether this is a block (`/* *\/`) comment,
+   * `text` is the content of the comment, and `start` and `end` are
+   * character offsets that denote the start and end of the comment.
+   * When the {@link locations} option is on, two more parameters are
+   * passed, the full locations of {@link Position} export type of the start and
+   * end of the comments.
+   * 
+   * When a array is passed, each found comment of {@link Comment} export type is pushed to the array.
+   * 
+   * Note that you are not allowed to call the
+   * parser from the callback—that will corrupt its internal state.
+   */
+  onComment?: ((
+    isBlock: boolean, text: string, start: number, end: number, startLoc?: Position,
+    endLoc?: Position
+  ) => void) | Comment[]
+
+  /**
+   * Nodes have their start and end characters offsets recorded in
+   * `start` and `end` properties (directly on the node, rather than
+   * the `loc` object, which holds line/column data. To also add a
+   * [semi-standardized][range] `range` property holding a `[start,
+   * end]` array with the same numbers, set the `ranges` option to
+   * `true`.
+   */
+  ranges?: boolean
+
+  /**
+   * It is possible to parse multiple files into a single AST by
+   * passing the tree produced by parsing the first file as
+   * `program` option in subsequent parses. This will add the
+   * toplevel forms of the parsed file to the `Program` (top) node
+   * of an existing parse tree.
+   */
+  program?: Node
+
+  /**
+   * When {@link locations} is on, you can pass this to record the source
+   * file in every node's `loc` object.
+   */
+  sourceFile?: string
+
+  /**
+   * This value, if given, is stored in every node, whether {@link locations} is on or off.
+   */
+  directSourceFile?: string
+
+  /**
+   * When enabled, parenthesized expressions are represented by
+   * (non-standard) ParenthesizedExpression nodes
+   */
+  preserveParens?: boolean
+}
+  
+export class Parser {
+  options: Options
+  input: string
+  
+  protected constructor(options: Options, input: string, startPos?: number)
+  parse(): Program
+  
+  static parse(input: string, options: Options): Program
+  static parseExpressionAt(input: string, pos: number, options: Options): Expression
+  static tokenizer(input: string, options: Options): {
+    getToken(): Token
+    [Symbol.iterator](): Iterator
+  }
+  static extend(...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser
+}
+
+export const defaultOptions: Options
+
+export function getLineInfo(input: string, offset: number): Position
+
+export class TokenType {
+  label: string
+  keyword: string | undefined
+}
+
+export const tokTypes: {
+  num: TokenType
+  regexp: TokenType
+  string: TokenType
+  name: TokenType
+  privateId: TokenType
+  eof: TokenType
+
+  bracketL: TokenType
+  bracketR: TokenType
+  braceL: TokenType
+  braceR: TokenType
+  parenL: TokenType
+  parenR: TokenType
+  comma: TokenType
+  semi: TokenType
+  colon: TokenType
+  dot: TokenType
+  question: TokenType
+  questionDot: TokenType
+  arrow: TokenType
+  template: TokenType
+  invalidTemplate: TokenType
+  ellipsis: TokenType
+  backQuote: TokenType
+  dollarBraceL: TokenType
+
+  eq: TokenType
+  assign: TokenType
+  incDec: TokenType
+  prefix: TokenType
+  logicalOR: TokenType
+  logicalAND: TokenType
+  bitwiseOR: TokenType
+  bitwiseXOR: TokenType
+  bitwiseAND: TokenType
+  equality: TokenType
+  relational: TokenType
+  bitShift: TokenType
+  plusMin: TokenType
+  modulo: TokenType
+  star: TokenType
+  slash: TokenType
+  starstar: TokenType
+  coalesce: TokenType
+
+  _break: TokenType
+  _case: TokenType
+  _catch: TokenType
+  _continue: TokenType
+  _debugger: TokenType
+  _default: TokenType
+  _do: TokenType
+  _else: TokenType
+  _finally: TokenType
+  _for: TokenType
+  _function: TokenType
+  _if: TokenType
+  _return: TokenType
+  _switch: TokenType
+  _throw: TokenType
+  _try: TokenType
+  _var: TokenType
+  _const: TokenType
+  _while: TokenType
+  _with: TokenType
+  _new: TokenType
+  _this: TokenType
+  _super: TokenType
+  _class: TokenType
+  _extends: TokenType
+  _export: TokenType
+  _import: TokenType
+  _null: TokenType
+  _true: TokenType
+  _false: TokenType
+  _in: TokenType
+  _instanceof: TokenType
+  _typeof: TokenType
+  _void: TokenType
+  _delete: TokenType
+}
+
+export interface Comment {
+  type: "Line" | "Block"
+  value: string
+  start: number
+  end: number
+  loc?: SourceLocation
+  range?: [number, number]
+}
+
+export class Token {
+  type: TokenType
+  start: number
+  end: number
+  loc?: SourceLocation
+  range?: [number, number]
+}
+
+export const version: string
diff --git a/slider/node_modules/acorn/dist/acorn.js b/slider/node_modules/acorn/dist/acorn.js
new file mode 100644
index 0000000..758c55c
--- /dev/null
+++ b/slider/node_modules/acorn/dist/acorn.js
@@ -0,0 +1,6262 @@
+(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+  typeof define === 'function' && define.amd ? define(['exports'], factory) :
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.acorn = {}));
+})(this, (function (exports) { 'use strict';
+
+  // This file was generated. Do not modify manually!
+  var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
+
+  // This file was generated. Do not modify manually!
+  var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
+
+  // This file was generated. Do not modify manually!
+  var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65";
+
+  // This file was generated. Do not modify manually!
+  var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7cd\ua7d0\ua7d1\ua7d3\ua7d5-\ua7dc\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
+
+  // These are a run-length and offset encoded representation of the
+  // >0xffff code points that are a valid part of identifiers. The
+  // offset starts at 0x10000, and each pair of numbers represents an
+  // offset to the next range, and then a size of the range.
+
+  // Reserved word lists for various dialects of the language
+
+  var reservedWords = {
+    3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
+    5: "class enum extends super const export import",
+    6: "enum",
+    strict: "implements interface let package private protected public static yield",
+    strictBind: "eval arguments"
+  };
+
+  // And the keywords
+
+  var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
+
+  var keywords$1 = {
+    5: ecma5AndLessKeywords,
+    "5module": ecma5AndLessKeywords + " export import",
+    6: ecma5AndLessKeywords + " const class extends export import super"
+  };
+
+  var keywordRelationalOperator = /^in(stanceof)?$/;
+
+  // ## Character categories
+
+  var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
+  var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
+
+  // This has a complexity linear to the value of the code. The
+  // assumption is that looking up astral identifier characters is
+  // rare.
+  function isInAstralSet(code, set) {
+    var pos = 0x10000;
+    for (var i = 0; i < set.length; i += 2) {
+      pos += set[i];
+      if (pos > code) { return false }
+      pos += set[i + 1];
+      if (pos >= code) { return true }
+    }
+    return false
+  }
+
+  // Test whether a given character code starts an identifier.
+
+  function isIdentifierStart(code, astral) {
+    if (code < 65) { return code === 36 }
+    if (code < 91) { return true }
+    if (code < 97) { return code === 95 }
+    if (code < 123) { return true }
+    if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) }
+    if (astral === false) { return false }
+    return isInAstralSet(code, astralIdentifierStartCodes)
+  }
+
+  // Test whether a given character is part of an identifier.
+
+  function isIdentifierChar(code, astral) {
+    if (code < 48) { return code === 36 }
+    if (code < 58) { return true }
+    if (code < 65) { return false }
+    if (code < 91) { return true }
+    if (code < 97) { return code === 95 }
+    if (code < 123) { return true }
+    if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) }
+    if (astral === false) { return false }
+    return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)
+  }
+
+  // ## Token types
+
+  // The assignment of fine-grained, information-carrying type objects
+  // allows the tokenizer to store the information it has about a
+  // token in a way that is very cheap for the parser to look up.
+
+  // All token type variables start with an underscore, to make them
+  // easy to recognize.
+
+  // The `beforeExpr` property is used to disambiguate between regular
+  // expressions and divisions. It is set on all token types that can
+  // be followed by an expression (thus, a slash after them would be a
+  // regular expression).
+  //
+  // The `startsExpr` property is used to check if the token ends a
+  // `yield` expression. It is set on all token types that either can
+  // directly start an expression (like a quotation mark) or can
+  // continue an expression (like the body of a string).
+  //
+  // `isLoop` marks a keyword as starting a loop, which is important
+  // to know when parsing a label, in order to allow or disallow
+  // continue jumps to that label.
+
+  var TokenType = function TokenType(label, conf) {
+    if ( conf === void 0 ) conf = {};
+
+    this.label = label;
+    this.keyword = conf.keyword;
+    this.beforeExpr = !!conf.beforeExpr;
+    this.startsExpr = !!conf.startsExpr;
+    this.isLoop = !!conf.isLoop;
+    this.isAssign = !!conf.isAssign;
+    this.prefix = !!conf.prefix;
+    this.postfix = !!conf.postfix;
+    this.binop = conf.binop || null;
+    this.updateContext = null;
+  };
+
+  function binop(name, prec) {
+    return new TokenType(name, {beforeExpr: true, binop: prec})
+  }
+  var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true};
+
+  // Map keyword names to token types.
+
+  var keywords = {};
+
+  // Succinct definitions of keyword token types
+  function kw(name, options) {
+    if ( options === void 0 ) options = {};
+
+    options.keyword = name;
+    return keywords[name] = new TokenType(name, options)
+  }
+
+  var types$1 = {
+    num: new TokenType("num", startsExpr),
+    regexp: new TokenType("regexp", startsExpr),
+    string: new TokenType("string", startsExpr),
+    name: new TokenType("name", startsExpr),
+    privateId: new TokenType("privateId", startsExpr),
+    eof: new TokenType("eof"),
+
+    // Punctuation token types.
+    bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
+    bracketR: new TokenType("]"),
+    braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
+    braceR: new TokenType("}"),
+    parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
+    parenR: new TokenType(")"),
+    comma: new TokenType(",", beforeExpr),
+    semi: new TokenType(";", beforeExpr),
+    colon: new TokenType(":", beforeExpr),
+    dot: new TokenType("."),
+    question: new TokenType("?", beforeExpr),
+    questionDot: new TokenType("?."),
+    arrow: new TokenType("=>", beforeExpr),
+    template: new TokenType("template"),
+    invalidTemplate: new TokenType("invalidTemplate"),
+    ellipsis: new TokenType("...", beforeExpr),
+    backQuote: new TokenType("`", startsExpr),
+    dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
+
+    // Operators. These carry several kinds of properties to help the
+    // parser use them properly (the presence of these properties is
+    // what categorizes them as operators).
+    //
+    // `binop`, when present, specifies that this operator is a binary
+    // operator, and will refer to its precedence.
+    //
+    // `prefix` and `postfix` mark the operator as a prefix or postfix
+    // unary operator.
+    //
+    // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
+    // binary operators with a very low precedence, that should result
+    // in AssignmentExpression nodes.
+
+    eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
+    assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
+    incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
+    prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}),
+    logicalOR: binop("||", 1),
+    logicalAND: binop("&&", 2),
+    bitwiseOR: binop("|", 3),
+    bitwiseXOR: binop("^", 4),
+    bitwiseAND: binop("&", 5),
+    equality: binop("==/!=/===/!==", 6),
+    relational: binop("/<=/>=", 7),
+    bitShift: binop("<>/>>>", 8),
+    plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
+    modulo: binop("%", 10),
+    star: binop("*", 10),
+    slash: binop("/", 10),
+    starstar: new TokenType("**", {beforeExpr: true}),
+    coalesce: binop("??", 1),
+
+    // Keyword token types.
+    _break: kw("break"),
+    _case: kw("case", beforeExpr),
+    _catch: kw("catch"),
+    _continue: kw("continue"),
+    _debugger: kw("debugger"),
+    _default: kw("default", beforeExpr),
+    _do: kw("do", {isLoop: true, beforeExpr: true}),
+    _else: kw("else", beforeExpr),
+    _finally: kw("finally"),
+    _for: kw("for", {isLoop: true}),
+    _function: kw("function", startsExpr),
+    _if: kw("if"),
+    _return: kw("return", beforeExpr),
+    _switch: kw("switch"),
+    _throw: kw("throw", beforeExpr),
+    _try: kw("try"),
+    _var: kw("var"),
+    _const: kw("const"),
+    _while: kw("while", {isLoop: true}),
+    _with: kw("with"),
+    _new: kw("new", {beforeExpr: true, startsExpr: true}),
+    _this: kw("this", startsExpr),
+    _super: kw("super", startsExpr),
+    _class: kw("class", startsExpr),
+    _extends: kw("extends", beforeExpr),
+    _export: kw("export"),
+    _import: kw("import", startsExpr),
+    _null: kw("null", startsExpr),
+    _true: kw("true", startsExpr),
+    _false: kw("false", startsExpr),
+    _in: kw("in", {beforeExpr: true, binop: 7}),
+    _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}),
+    _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}),
+    _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}),
+    _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true})
+  };
+
+  // Matches a whole line break (where CRLF is considered a single
+  // line break). Used to count lines.
+
+  var lineBreak = /\r\n?|\n|\u2028|\u2029/;
+  var lineBreakG = new RegExp(lineBreak.source, "g");
+
+  function isNewLine(code) {
+    return code === 10 || code === 13 || code === 0x2028 || code === 0x2029
+  }
+
+  function nextLineBreak(code, from, end) {
+    if ( end === void 0 ) end = code.length;
+
+    for (var i = from; i < end; i++) {
+      var next = code.charCodeAt(i);
+      if (isNewLine(next))
+        { return i < end - 1 && next === 13 && code.charCodeAt(i + 1) === 10 ? i + 2 : i + 1 }
+    }
+    return -1
+  }
+
+  var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
+
+  var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
+
+  var ref = Object.prototype;
+  var hasOwnProperty = ref.hasOwnProperty;
+  var toString = ref.toString;
+
+  var hasOwn = Object.hasOwn || (function (obj, propName) { return (
+    hasOwnProperty.call(obj, propName)
+  ); });
+
+  var isArray = Array.isArray || (function (obj) { return (
+    toString.call(obj) === "[object Array]"
+  ); });
+
+  var regexpCache = Object.create(null);
+
+  function wordsRegexp(words) {
+    return regexpCache[words] || (regexpCache[words] = new RegExp("^(?:" + words.replace(/ /g, "|") + ")$"))
+  }
+
+  function codePointToString(code) {
+    // UTF-16 Decoding
+    if (code <= 0xFFFF) { return String.fromCharCode(code) }
+    code -= 0x10000;
+    return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
+  }
+
+  var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
+
+  // These are used when `options.locations` is on, for the
+  // `startLoc` and `endLoc` properties.
+
+  var Position = function Position(line, col) {
+    this.line = line;
+    this.column = col;
+  };
+
+  Position.prototype.offset = function offset (n) {
+    return new Position(this.line, this.column + n)
+  };
+
+  var SourceLocation = function SourceLocation(p, start, end) {
+    this.start = start;
+    this.end = end;
+    if (p.sourceFile !== null) { this.source = p.sourceFile; }
+  };
+
+  // The `getLineInfo` function is mostly useful when the
+  // `locations` option is off (for performance reasons) and you
+  // want to find the line/column position for a given character
+  // offset. `input` should be the code string that the offset refers
+  // into.
+
+  function getLineInfo(input, offset) {
+    for (var line = 1, cur = 0;;) {
+      var nextBreak = nextLineBreak(input, cur, offset);
+      if (nextBreak < 0) { return new Position(line, offset - cur) }
+      ++line;
+      cur = nextBreak;
+    }
+  }
+
+  // A second argument must be given to configure the parser process.
+  // These options are recognized (only `ecmaVersion` is required):
+
+  var defaultOptions = {
+    // `ecmaVersion` indicates the ECMAScript version to parse. Must be
+    // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
+    // (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
+    // (the latest version the library supports). This influences
+    // support for strict mode, the set of reserved words, and support
+    // for new syntax features.
+    ecmaVersion: null,
+    // `sourceType` indicates the mode the code should be parsed in.
+    // Can be either `"script"` or `"module"`. This influences global
+    // strict mode and parsing of `import` and `export` declarations.
+    sourceType: "script",
+    // `onInsertedSemicolon` can be a callback that will be called when
+    // a semicolon is automatically inserted. It will be passed the
+    // position of the inserted semicolon as an offset, and if
+    // `locations` is enabled, it is given the location as a `{line,
+    // column}` object as second argument.
+    onInsertedSemicolon: null,
+    // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
+    // trailing commas.
+    onTrailingComma: null,
+    // By default, reserved words are only enforced if ecmaVersion >= 5.
+    // Set `allowReserved` to a boolean value to explicitly turn this on
+    // an off. When this option has the value "never", reserved words
+    // and keywords can also not be used as property names.
+    allowReserved: null,
+    // When enabled, a return at the top level is not considered an
+    // error.
+    allowReturnOutsideFunction: false,
+    // When enabled, import/export statements are not constrained to
+    // appearing at the top of the program, and an import.meta expression
+    // in a script isn't considered an error.
+    allowImportExportEverywhere: false,
+    // By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022.
+    // When enabled, await identifiers are allowed to appear at the top-level scope,
+    // but they are still not allowed in non-async functions.
+    allowAwaitOutsideFunction: null,
+    // When enabled, super identifiers are not constrained to
+    // appearing in methods and do not raise an error when they appear elsewhere.
+    allowSuperOutsideMethod: null,
+    // When enabled, hashbang directive in the beginning of file is
+    // allowed and treated as a line comment. Enabled by default when
+    // `ecmaVersion` >= 2023.
+    allowHashBang: false,
+    // By default, the parser will verify that private properties are
+    // only used in places where they are valid and have been declared.
+    // Set this to false to turn such checks off.
+    checkPrivateFields: true,
+    // When `locations` is on, `loc` properties holding objects with
+    // `start` and `end` properties in `{line, column}` form (with
+    // line being 1-based and column 0-based) will be attached to the
+    // nodes.
+    locations: false,
+    // A function can be passed as `onToken` option, which will
+    // cause Acorn to call that function with object in the same
+    // format as tokens returned from `tokenizer().getToken()`. Note
+    // that you are not allowed to call the parser from the
+    // callback—that will corrupt its internal state.
+    onToken: null,
+    // A function can be passed as `onComment` option, which will
+    // cause Acorn to call that function with `(block, text, start,
+    // end)` parameters whenever a comment is skipped. `block` is a
+    // boolean indicating whether this is a block (`/* */`) comment,
+    // `text` is the content of the comment, and `start` and `end` are
+    // character offsets that denote the start and end of the comment.
+    // When the `locations` option is on, two more parameters are
+    // passed, the full `{line, column}` locations of the start and
+    // end of the comments. Note that you are not allowed to call the
+    // parser from the callback—that will corrupt its internal state.
+    // When this option has an array as value, objects representing the
+    // comments are pushed to it.
+    onComment: null,
+    // Nodes have their start and end characters offsets recorded in
+    // `start` and `end` properties (directly on the node, rather than
+    // the `loc` object, which holds line/column data. To also add a
+    // [semi-standardized][range] `range` property holding a `[start,
+    // end]` array with the same numbers, set the `ranges` option to
+    // `true`.
+    //
+    // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
+    ranges: false,
+    // It is possible to parse multiple files into a single AST by
+    // passing the tree produced by parsing the first file as
+    // `program` option in subsequent parses. This will add the
+    // toplevel forms of the parsed file to the `Program` (top) node
+    // of an existing parse tree.
+    program: null,
+    // When `locations` is on, you can pass this to record the source
+    // file in every node's `loc` object.
+    sourceFile: null,
+    // This value, if given, is stored in every node, whether
+    // `locations` is on or off.
+    directSourceFile: null,
+    // When enabled, parenthesized expressions are represented by
+    // (non-standard) ParenthesizedExpression nodes
+    preserveParens: false
+  };
+
+  // Interpret and default an options object
+
+  var warnedAboutEcmaVersion = false;
+
+  function getOptions(opts) {
+    var options = {};
+
+    for (var opt in defaultOptions)
+      { options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt]; }
+
+    if (options.ecmaVersion === "latest") {
+      options.ecmaVersion = 1e8;
+    } else if (options.ecmaVersion == null) {
+      if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) {
+        warnedAboutEcmaVersion = true;
+        console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.");
+      }
+      options.ecmaVersion = 11;
+    } else if (options.ecmaVersion >= 2015) {
+      options.ecmaVersion -= 2009;
+    }
+
+    if (options.allowReserved == null)
+      { options.allowReserved = options.ecmaVersion < 5; }
+
+    if (!opts || opts.allowHashBang == null)
+      { options.allowHashBang = options.ecmaVersion >= 14; }
+
+    if (isArray(options.onToken)) {
+      var tokens = options.onToken;
+      options.onToken = function (token) { return tokens.push(token); };
+    }
+    if (isArray(options.onComment))
+      { options.onComment = pushComment(options, options.onComment); }
+
+    return options
+  }
+
+  function pushComment(options, array) {
+    return function(block, text, start, end, startLoc, endLoc) {
+      var comment = {
+        type: block ? "Block" : "Line",
+        value: text,
+        start: start,
+        end: end
+      };
+      if (options.locations)
+        { comment.loc = new SourceLocation(this, startLoc, endLoc); }
+      if (options.ranges)
+        { comment.range = [start, end]; }
+      array.push(comment);
+    }
+  }
+
+  // Each scope gets a bitset that may contain these flags
+  var
+      SCOPE_TOP = 1,
+      SCOPE_FUNCTION = 2,
+      SCOPE_ASYNC = 4,
+      SCOPE_GENERATOR = 8,
+      SCOPE_ARROW = 16,
+      SCOPE_SIMPLE_CATCH = 32,
+      SCOPE_SUPER = 64,
+      SCOPE_DIRECT_SUPER = 128,
+      SCOPE_CLASS_STATIC_BLOCK = 256,
+      SCOPE_CLASS_FIELD_INIT = 512,
+      SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
+
+  function functionFlags(async, generator) {
+    return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0)
+  }
+
+  // Used in checkLVal* and declareName to determine the type of a binding
+  var
+      BIND_NONE = 0, // Not a binding
+      BIND_VAR = 1, // Var-style binding
+      BIND_LEXICAL = 2, // Let- or const-style binding
+      BIND_FUNCTION = 3, // Function declaration
+      BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding
+      BIND_OUTSIDE = 5; // Special case for function names as bound inside the function
+
+  var Parser = function Parser(options, input, startPos) {
+    this.options = options = getOptions(options);
+    this.sourceFile = options.sourceFile;
+    this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
+    var reserved = "";
+    if (options.allowReserved !== true) {
+      reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3];
+      if (options.sourceType === "module") { reserved += " await"; }
+    }
+    this.reservedWords = wordsRegexp(reserved);
+    var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict;
+    this.reservedWordsStrict = wordsRegexp(reservedStrict);
+    this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind);
+    this.input = String(input);
+
+    // Used to signal to callers of `readWord1` whether the word
+    // contained any escape sequences. This is needed because words with
+    // escape sequences must not be interpreted as keywords.
+    this.containsEsc = false;
+
+    // Set up token state
+
+    // The current position of the tokenizer in the input.
+    if (startPos) {
+      this.pos = startPos;
+      this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
+      this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
+    } else {
+      this.pos = this.lineStart = 0;
+      this.curLine = 1;
+    }
+
+    // Properties of the current token:
+    // Its type
+    this.type = types$1.eof;
+    // For tokens that include more information than their type, the value
+    this.value = null;
+    // Its start and end offset
+    this.start = this.end = this.pos;
+    // And, if locations are used, the {line, column} object
+    // corresponding to those offsets
+    this.startLoc = this.endLoc = this.curPosition();
+
+    // Position information for the previous token
+    this.lastTokEndLoc = this.lastTokStartLoc = null;
+    this.lastTokStart = this.lastTokEnd = this.pos;
+
+    // The context stack is used to superficially track syntactic
+    // context to predict whether a regular expression is allowed in a
+    // given position.
+    this.context = this.initialContext();
+    this.exprAllowed = true;
+
+    // Figure out if it's a module code.
+    this.inModule = options.sourceType === "module";
+    this.strict = this.inModule || this.strictDirective(this.pos);
+
+    // Used to signify the start of a potential arrow function
+    this.potentialArrowAt = -1;
+    this.potentialArrowInForAwait = false;
+
+    // Positions to delayed-check that yield/await does not exist in default parameters.
+    this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
+    // Labels in scope.
+    this.labels = [];
+    // Thus-far undefined exports.
+    this.undefinedExports = Object.create(null);
+
+    // If enabled, skip leading hashbang line.
+    if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!")
+      { this.skipLineComment(2); }
+
+    // Scope tracking for duplicate variable names (see scope.js)
+    this.scopeStack = [];
+    this.enterScope(SCOPE_TOP);
+
+    // For RegExp validation
+    this.regexpState = null;
+
+    // The stack of private names.
+    // Each element has two properties: 'declared' and 'used'.
+    // When it exited from the outermost class definition, all used private names must be declared.
+    this.privateNameStack = [];
+  };
+
+  var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },canAwait: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true },allowNewDotTarget: { configurable: true },inClassStaticBlock: { configurable: true } };
+
+  Parser.prototype.parse = function parse () {
+    var node = this.options.program || this.startNode();
+    this.nextToken();
+    return this.parseTopLevel(node)
+  };
+
+  prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 };
+
+  prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 };
+
+  prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 };
+
+  prototypeAccessors.canAwait.get = function () {
+    for (var i = this.scopeStack.length - 1; i >= 0; i--) {
+      var ref = this.scopeStack[i];
+        var flags = ref.flags;
+      if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT)) { return false }
+      if (flags & SCOPE_FUNCTION) { return (flags & SCOPE_ASYNC) > 0 }
+    }
+    return (this.inModule && this.options.ecmaVersion >= 13) || this.options.allowAwaitOutsideFunction
+  };
+
+  prototypeAccessors.allowSuper.get = function () {
+    var ref = this.currentThisScope();
+      var flags = ref.flags;
+    return (flags & SCOPE_SUPER) > 0 || this.options.allowSuperOutsideMethod
+  };
+
+  prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 };
+
+  prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) };
+
+  prototypeAccessors.allowNewDotTarget.get = function () {
+    for (var i = this.scopeStack.length - 1; i >= 0; i--) {
+      var ref = this.scopeStack[i];
+        var flags = ref.flags;
+      if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT) ||
+          ((flags & SCOPE_FUNCTION) && !(flags & SCOPE_ARROW))) { return true }
+    }
+    return false
+  };
+
+  prototypeAccessors.inClassStaticBlock.get = function () {
+    return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0
+  };
+
+  Parser.extend = function extend () {
+      var plugins = [], len = arguments.length;
+      while ( len-- ) plugins[ len ] = arguments[ len ];
+
+    var cls = this;
+    for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); }
+    return cls
+  };
+
+  Parser.parse = function parse (input, options) {
+    return new this(options, input).parse()
+  };
+
+  Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) {
+    var parser = new this(options, input, pos);
+    parser.nextToken();
+    return parser.parseExpression()
+  };
+
+  Parser.tokenizer = function tokenizer (input, options) {
+    return new this(options, input)
+  };
+
+  Object.defineProperties( Parser.prototype, prototypeAccessors );
+
+  var pp$9 = Parser.prototype;
+
+  // ## Parser utilities
+
+  var literal = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
+  pp$9.strictDirective = function(start) {
+    if (this.options.ecmaVersion < 5) { return false }
+    for (;;) {
+      // Try to find string literal.
+      skipWhiteSpace.lastIndex = start;
+      start += skipWhiteSpace.exec(this.input)[0].length;
+      var match = literal.exec(this.input.slice(start));
+      if (!match) { return false }
+      if ((match[1] || match[2]) === "use strict") {
+        skipWhiteSpace.lastIndex = start + match[0].length;
+        var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;
+        var next = this.input.charAt(end);
+        return next === ";" || next === "}" ||
+          (lineBreak.test(spaceAfter[0]) &&
+           !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "="))
+      }
+      start += match[0].length;
+
+      // Skip semicolon, if any.
+      skipWhiteSpace.lastIndex = start;
+      start += skipWhiteSpace.exec(this.input)[0].length;
+      if (this.input[start] === ";")
+        { start++; }
+    }
+  };
+
+  // Predicate that tests whether the next token is of the given
+  // type, and if yes, consumes it as a side effect.
+
+  pp$9.eat = function(type) {
+    if (this.type === type) {
+      this.next();
+      return true
+    } else {
+      return false
+    }
+  };
+
+  // Tests whether parsed token is a contextual keyword.
+
+  pp$9.isContextual = function(name) {
+    return this.type === types$1.name && this.value === name && !this.containsEsc
+  };
+
+  // Consumes contextual keyword if possible.
+
+  pp$9.eatContextual = function(name) {
+    if (!this.isContextual(name)) { return false }
+    this.next();
+    return true
+  };
+
+  // Asserts that following token is given contextual keyword.
+
+  pp$9.expectContextual = function(name) {
+    if (!this.eatContextual(name)) { this.unexpected(); }
+  };
+
+  // Test whether a semicolon can be inserted at the current position.
+
+  pp$9.canInsertSemicolon = function() {
+    return this.type === types$1.eof ||
+      this.type === types$1.braceR ||
+      lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
+  };
+
+  pp$9.insertSemicolon = function() {
+    if (this.canInsertSemicolon()) {
+      if (this.options.onInsertedSemicolon)
+        { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); }
+      return true
+    }
+  };
+
+  // Consume a semicolon, or, failing that, see if we are allowed to
+  // pretend that there is a semicolon at this position.
+
+  pp$9.semicolon = function() {
+    if (!this.eat(types$1.semi) && !this.insertSemicolon()) { this.unexpected(); }
+  };
+
+  pp$9.afterTrailingComma = function(tokType, notNext) {
+    if (this.type === tokType) {
+      if (this.options.onTrailingComma)
+        { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); }
+      if (!notNext)
+        { this.next(); }
+      return true
+    }
+  };
+
+  // Expect a token of a given type. If found, consume it, otherwise,
+  // raise an unexpected token error.
+
+  pp$9.expect = function(type) {
+    this.eat(type) || this.unexpected();
+  };
+
+  // Raise an unexpected token error.
+
+  pp$9.unexpected = function(pos) {
+    this.raise(pos != null ? pos : this.start, "Unexpected token");
+  };
+
+  var DestructuringErrors = function DestructuringErrors() {
+    this.shorthandAssign =
+    this.trailingComma =
+    this.parenthesizedAssign =
+    this.parenthesizedBind =
+    this.doubleProto =
+      -1;
+  };
+
+  pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) {
+    if (!refDestructuringErrors) { return }
+    if (refDestructuringErrors.trailingComma > -1)
+      { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); }
+    var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
+    if (parens > -1) { this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern"); }
+  };
+
+  pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
+    if (!refDestructuringErrors) { return false }
+    var shorthandAssign = refDestructuringErrors.shorthandAssign;
+    var doubleProto = refDestructuringErrors.doubleProto;
+    if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 }
+    if (shorthandAssign >= 0)
+      { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); }
+    if (doubleProto >= 0)
+      { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); }
+  };
+
+  pp$9.checkYieldAwaitInDefaultParams = function() {
+    if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))
+      { this.raise(this.yieldPos, "Yield expression cannot be a default value"); }
+    if (this.awaitPos)
+      { this.raise(this.awaitPos, "Await expression cannot be a default value"); }
+  };
+
+  pp$9.isSimpleAssignTarget = function(expr) {
+    if (expr.type === "ParenthesizedExpression")
+      { return this.isSimpleAssignTarget(expr.expression) }
+    return expr.type === "Identifier" || expr.type === "MemberExpression"
+  };
+
+  var pp$8 = Parser.prototype;
+
+  // ### Statement parsing
+
+  // Parse a program. Initializes the parser, reads any number of
+  // statements, and wraps them in a Program node.  Optionally takes a
+  // `program` argument.  If present, the statements will be appended
+  // to its body instead of creating a new node.
+
+  pp$8.parseTopLevel = function(node) {
+    var exports = Object.create(null);
+    if (!node.body) { node.body = []; }
+    while (this.type !== types$1.eof) {
+      var stmt = this.parseStatement(null, true, exports);
+      node.body.push(stmt);
+    }
+    if (this.inModule)
+      { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1)
+        {
+          var name = list[i];
+
+          this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined"));
+        } }
+    this.adaptDirectivePrologue(node.body);
+    this.next();
+    node.sourceType = this.options.sourceType;
+    return this.finishNode(node, "Program")
+  };
+
+  var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"};
+
+  pp$8.isLet = function(context) {
+    if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false }
+    skipWhiteSpace.lastIndex = this.pos;
+    var skip = skipWhiteSpace.exec(this.input);
+    var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
+    // For ambiguous cases, determine if a LexicalDeclaration (or only a
+    // Statement) is allowed here. If context is not empty then only a Statement
+    // is allowed. However, `let [` is an explicit negative lookahead for
+    // ExpressionStatement, so special-case it first.
+    if (nextCh === 91 || nextCh === 92) { return true } // '[', '\'
+    if (context) { return false }
+
+    if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '{', astral
+    if (isIdentifierStart(nextCh, true)) {
+      var pos = next + 1;
+      while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { ++pos; }
+      if (nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true }
+      var ident = this.input.slice(next, pos);
+      if (!keywordRelationalOperator.test(ident)) { return true }
+    }
+    return false
+  };
+
+  // check 'async [no LineTerminator here] function'
+  // - 'async /*foo*/ function' is OK.
+  // - 'async /*\n*/ function' is invalid.
+  pp$8.isAsyncFunction = function() {
+    if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
+      { return false }
+
+    skipWhiteSpace.lastIndex = this.pos;
+    var skip = skipWhiteSpace.exec(this.input);
+    var next = this.pos + skip[0].length, after;
+    return !lineBreak.test(this.input.slice(this.pos, next)) &&
+      this.input.slice(next, next + 8) === "function" &&
+      (next + 8 === this.input.length ||
+       !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 0xd7ff && after < 0xdc00))
+  };
+
+  pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
+    if (this.options.ecmaVersion < 17 || !this.isContextual(isAwaitUsing ? "await" : "using"))
+      { return false }
+
+    skipWhiteSpace.lastIndex = this.pos;
+    var skip = skipWhiteSpace.exec(this.input);
+    var next = this.pos + skip[0].length;
+
+    if (lineBreak.test(this.input.slice(this.pos, next))) { return false }
+
+    if (isAwaitUsing) {
+      var awaitEndPos = next + 5 /* await */, after;
+      if (this.input.slice(next, awaitEndPos) !== "using" ||
+        awaitEndPos === this.input.length ||
+        isIdentifierChar(after = this.input.charCodeAt(awaitEndPos)) ||
+        (after > 0xd7ff && after < 0xdc00)
+      ) { return false }
+
+      skipWhiteSpace.lastIndex = awaitEndPos;
+      var skipAfterUsing = skipWhiteSpace.exec(this.input);
+      if (skipAfterUsing && lineBreak.test(this.input.slice(awaitEndPos, awaitEndPos + skipAfterUsing[0].length))) { return false }
+    }
+
+    if (isFor) {
+      var ofEndPos = next + 2 /* of */, after$1;
+      if (this.input.slice(next, ofEndPos) === "of") {
+        if (ofEndPos === this.input.length ||
+          (!isIdentifierChar(after$1 = this.input.charCodeAt(ofEndPos)) && !(after$1 > 0xd7ff && after$1 < 0xdc00))) { return false }
+      }
+    }
+
+    var ch = this.input.charCodeAt(next);
+    return isIdentifierStart(ch, true) || ch === 92 // '\'
+  };
+
+  pp$8.isAwaitUsing = function(isFor) {
+    return this.isUsingKeyword(true, isFor)
+  };
+
+  pp$8.isUsing = function(isFor) {
+    return this.isUsingKeyword(false, isFor)
+  };
+
+  // Parse a single statement.
+  //
+  // If expecting a statement and finding a slash operator, parse a
+  // regular expression literal. This is to handle cases like
+  // `if (foo) /blah/.exec(foo)`, where looking at the previous token
+  // does not help.
+
+  pp$8.parseStatement = function(context, topLevel, exports) {
+    var starttype = this.type, node = this.startNode(), kind;
+
+    if (this.isLet(context)) {
+      starttype = types$1._var;
+      kind = "let";
+    }
+
+    // Most types of statements are recognized by the keyword they
+    // start with. Many are trivial to parse, some require a bit of
+    // complexity.
+
+    switch (starttype) {
+    case types$1._break: case types$1._continue: return this.parseBreakContinueStatement(node, starttype.keyword)
+    case types$1._debugger: return this.parseDebuggerStatement(node)
+    case types$1._do: return this.parseDoStatement(node)
+    case types$1._for: return this.parseForStatement(node)
+    case types$1._function:
+      // Function as sole body of either an if statement or a labeled statement
+      // works, but not when it is part of a labeled statement that is the sole
+      // body of an if statement.
+      if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); }
+      return this.parseFunctionStatement(node, false, !context)
+    case types$1._class:
+      if (context) { this.unexpected(); }
+      return this.parseClass(node, true)
+    case types$1._if: return this.parseIfStatement(node)
+    case types$1._return: return this.parseReturnStatement(node)
+    case types$1._switch: return this.parseSwitchStatement(node)
+    case types$1._throw: return this.parseThrowStatement(node)
+    case types$1._try: return this.parseTryStatement(node)
+    case types$1._const: case types$1._var:
+      kind = kind || this.value;
+      if (context && kind !== "var") { this.unexpected(); }
+      return this.parseVarStatement(node, kind)
+    case types$1._while: return this.parseWhileStatement(node)
+    case types$1._with: return this.parseWithStatement(node)
+    case types$1.braceL: return this.parseBlock(true, node)
+    case types$1.semi: return this.parseEmptyStatement(node)
+    case types$1._export:
+    case types$1._import:
+      if (this.options.ecmaVersion > 10 && starttype === types$1._import) {
+        skipWhiteSpace.lastIndex = this.pos;
+        var skip = skipWhiteSpace.exec(this.input);
+        var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
+        if (nextCh === 40 || nextCh === 46) // '(' or '.'
+          { return this.parseExpressionStatement(node, this.parseExpression()) }
+      }
+
+      if (!this.options.allowImportExportEverywhere) {
+        if (!topLevel)
+          { this.raise(this.start, "'import' and 'export' may only appear at the top level"); }
+        if (!this.inModule)
+          { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); }
+      }
+      return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports)
+
+      // If the statement does not start with a statement keyword or a
+      // brace, it's an ExpressionStatement or LabeledStatement. We
+      // simply start parsing an expression, and afterwards, if the
+      // next token is a colon and the expression was a simple
+      // Identifier node, we switch to interpreting it as a label.
+    default:
+      if (this.isAsyncFunction()) {
+        if (context) { this.unexpected(); }
+        this.next();
+        return this.parseFunctionStatement(node, true, !context)
+      }
+
+      var usingKind = this.isAwaitUsing(false) ? "await using" : this.isUsing(false) ? "using" : null;
+      if (usingKind) {
+        if (topLevel && this.options.sourceType === "script") {
+          this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`");
+        }
+        if (usingKind === "await using") {
+          if (!this.canAwait) {
+            this.raise(this.start, "Await using cannot appear outside of async function");
+          }
+          this.next();
+        }
+        this.next();
+        this.parseVar(node, false, usingKind);
+        this.semicolon();
+        return this.finishNode(node, "VariableDeclaration")
+      }
+
+      var maybeName = this.value, expr = this.parseExpression();
+      if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon))
+        { return this.parseLabeledStatement(node, maybeName, expr, context) }
+      else { return this.parseExpressionStatement(node, expr) }
+    }
+  };
+
+  pp$8.parseBreakContinueStatement = function(node, keyword) {
+    var isBreak = keyword === "break";
+    this.next();
+    if (this.eat(types$1.semi) || this.insertSemicolon()) { node.label = null; }
+    else if (this.type !== types$1.name) { this.unexpected(); }
+    else {
+      node.label = this.parseIdent();
+      this.semicolon();
+    }
+
+    // Verify that there is an actual destination to break or
+    // continue to.
+    var i = 0;
+    for (; i < this.labels.length; ++i) {
+      var lab = this.labels[i];
+      if (node.label == null || lab.name === node.label.name) {
+        if (lab.kind != null && (isBreak || lab.kind === "loop")) { break }
+        if (node.label && isBreak) { break }
+      }
+    }
+    if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); }
+    return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
+  };
+
+  pp$8.parseDebuggerStatement = function(node) {
+    this.next();
+    this.semicolon();
+    return this.finishNode(node, "DebuggerStatement")
+  };
+
+  pp$8.parseDoStatement = function(node) {
+    this.next();
+    this.labels.push(loopLabel);
+    node.body = this.parseStatement("do");
+    this.labels.pop();
+    this.expect(types$1._while);
+    node.test = this.parseParenExpression();
+    if (this.options.ecmaVersion >= 6)
+      { this.eat(types$1.semi); }
+    else
+      { this.semicolon(); }
+    return this.finishNode(node, "DoWhileStatement")
+  };
+
+  // Disambiguating between a `for` and a `for`/`in` or `for`/`of`
+  // loop is non-trivial. Basically, we have to parse the init `var`
+  // statement or expression, disallowing the `in` operator (see
+  // the second parameter to `parseExpression`), and then check
+  // whether the next token is `in` or `of`. When there is no init
+  // part (semicolon immediately after the opening parenthesis), it
+  // is a regular `for` loop.
+
+  pp$8.parseForStatement = function(node) {
+    this.next();
+    var awaitAt = (this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await")) ? this.lastTokStart : -1;
+    this.labels.push(loopLabel);
+    this.enterScope(0);
+    this.expect(types$1.parenL);
+    if (this.type === types$1.semi) {
+      if (awaitAt > -1) { this.unexpected(awaitAt); }
+      return this.parseFor(node, null)
+    }
+    var isLet = this.isLet();
+    if (this.type === types$1._var || this.type === types$1._const || isLet) {
+      var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
+      this.next();
+      this.parseVar(init$1, true, kind);
+      this.finishNode(init$1, "VariableDeclaration");
+      return this.parseForAfterInit(node, init$1, awaitAt)
+    }
+    var startsWithLet = this.isContextual("let"), isForOf = false;
+
+    var usingKind = this.isUsing(true) ? "using" : this.isAwaitUsing(true) ? "await using" : null;
+    if (usingKind) {
+      var init$2 = this.startNode();
+      this.next();
+      if (usingKind === "await using") { this.next(); }
+      this.parseVar(init$2, true, usingKind);
+      this.finishNode(init$2, "VariableDeclaration");
+      return this.parseForAfterInit(node, init$2, awaitAt)
+    }
+    var containsEsc = this.containsEsc;
+    var refDestructuringErrors = new DestructuringErrors;
+    var initPos = this.start;
+    var init = awaitAt > -1
+      ? this.parseExprSubscripts(refDestructuringErrors, "await")
+      : this.parseExpression(true, refDestructuringErrors);
+    if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
+      if (awaitAt > -1) { // implies `ecmaVersion >= 9` (see declaration of awaitAt)
+        if (this.type === types$1._in) { this.unexpected(awaitAt); }
+        node.await = true;
+      } else if (isForOf && this.options.ecmaVersion >= 8) {
+        if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") { this.unexpected(); }
+        else if (this.options.ecmaVersion >= 9) { node.await = false; }
+      }
+      if (startsWithLet && isForOf) { this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); }
+      this.toAssignable(init, false, refDestructuringErrors);
+      this.checkLValPattern(init);
+      return this.parseForIn(node, init)
+    } else {
+      this.checkExpressionErrors(refDestructuringErrors, true);
+    }
+    if (awaitAt > -1) { this.unexpected(awaitAt); }
+    return this.parseFor(node, init)
+  };
+
+  // Helper method to parse for loop after variable initialization
+  pp$8.parseForAfterInit = function(node, init, awaitAt) {
+    if ((this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init.declarations.length === 1) {
+      if (this.options.ecmaVersion >= 9) {
+        if (this.type === types$1._in) {
+          if (awaitAt > -1) { this.unexpected(awaitAt); }
+        } else { node.await = awaitAt > -1; }
+      }
+      return this.parseForIn(node, init)
+    }
+    if (awaitAt > -1) { this.unexpected(awaitAt); }
+    return this.parseFor(node, init)
+  };
+
+  pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) {
+    this.next();
+    return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync)
+  };
+
+  pp$8.parseIfStatement = function(node) {
+    this.next();
+    node.test = this.parseParenExpression();
+    // allow function declarations in branches, but only in non-strict mode
+    node.consequent = this.parseStatement("if");
+    node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null;
+    return this.finishNode(node, "IfStatement")
+  };
+
+  pp$8.parseReturnStatement = function(node) {
+    if (!this.inFunction && !this.options.allowReturnOutsideFunction)
+      { this.raise(this.start, "'return' outside of function"); }
+    this.next();
+
+    // In `return` (and `break`/`continue`), the keywords with
+    // optional arguments, we eagerly look for a semicolon or the
+    // possibility to insert one.
+
+    if (this.eat(types$1.semi) || this.insertSemicolon()) { node.argument = null; }
+    else { node.argument = this.parseExpression(); this.semicolon(); }
+    return this.finishNode(node, "ReturnStatement")
+  };
+
+  pp$8.parseSwitchStatement = function(node) {
+    this.next();
+    node.discriminant = this.parseParenExpression();
+    node.cases = [];
+    this.expect(types$1.braceL);
+    this.labels.push(switchLabel);
+    this.enterScope(0);
+
+    // Statements under must be grouped (by label) in SwitchCase
+    // nodes. `cur` is used to keep the node that we are currently
+    // adding statements to.
+
+    var cur;
+    for (var sawDefault = false; this.type !== types$1.braceR;) {
+      if (this.type === types$1._case || this.type === types$1._default) {
+        var isCase = this.type === types$1._case;
+        if (cur) { this.finishNode(cur, "SwitchCase"); }
+        node.cases.push(cur = this.startNode());
+        cur.consequent = [];
+        this.next();
+        if (isCase) {
+          cur.test = this.parseExpression();
+        } else {
+          if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); }
+          sawDefault = true;
+          cur.test = null;
+        }
+        this.expect(types$1.colon);
+      } else {
+        if (!cur) { this.unexpected(); }
+        cur.consequent.push(this.parseStatement(null));
+      }
+    }
+    this.exitScope();
+    if (cur) { this.finishNode(cur, "SwitchCase"); }
+    this.next(); // Closing brace
+    this.labels.pop();
+    return this.finishNode(node, "SwitchStatement")
+  };
+
+  pp$8.parseThrowStatement = function(node) {
+    this.next();
+    if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start)))
+      { this.raise(this.lastTokEnd, "Illegal newline after throw"); }
+    node.argument = this.parseExpression();
+    this.semicolon();
+    return this.finishNode(node, "ThrowStatement")
+  };
+
+  // Reused empty array added for node fields that are always empty.
+
+  var empty$1 = [];
+
+  pp$8.parseCatchClauseParam = function() {
+    var param = this.parseBindingAtom();
+    var simple = param.type === "Identifier";
+    this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0);
+    this.checkLValPattern(param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL);
+    this.expect(types$1.parenR);
+
+    return param
+  };
+
+  pp$8.parseTryStatement = function(node) {
+    this.next();
+    node.block = this.parseBlock();
+    node.handler = null;
+    if (this.type === types$1._catch) {
+      var clause = this.startNode();
+      this.next();
+      if (this.eat(types$1.parenL)) {
+        clause.param = this.parseCatchClauseParam();
+      } else {
+        if (this.options.ecmaVersion < 10) { this.unexpected(); }
+        clause.param = null;
+        this.enterScope(0);
+      }
+      clause.body = this.parseBlock(false);
+      this.exitScope();
+      node.handler = this.finishNode(clause, "CatchClause");
+    }
+    node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null;
+    if (!node.handler && !node.finalizer)
+      { this.raise(node.start, "Missing catch or finally clause"); }
+    return this.finishNode(node, "TryStatement")
+  };
+
+  pp$8.parseVarStatement = function(node, kind, allowMissingInitializer) {
+    this.next();
+    this.parseVar(node, false, kind, allowMissingInitializer);
+    this.semicolon();
+    return this.finishNode(node, "VariableDeclaration")
+  };
+
+  pp$8.parseWhileStatement = function(node) {
+    this.next();
+    node.test = this.parseParenExpression();
+    this.labels.push(loopLabel);
+    node.body = this.parseStatement("while");
+    this.labels.pop();
+    return this.finishNode(node, "WhileStatement")
+  };
+
+  pp$8.parseWithStatement = function(node) {
+    if (this.strict) { this.raise(this.start, "'with' in strict mode"); }
+    this.next();
+    node.object = this.parseParenExpression();
+    node.body = this.parseStatement("with");
+    return this.finishNode(node, "WithStatement")
+  };
+
+  pp$8.parseEmptyStatement = function(node) {
+    this.next();
+    return this.finishNode(node, "EmptyStatement")
+  };
+
+  pp$8.parseLabeledStatement = function(node, maybeName, expr, context) {
+    for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1)
+      {
+      var label = list[i$1];
+
+      if (label.name === maybeName)
+        { this.raise(expr.start, "Label '" + maybeName + "' is already declared");
+    } }
+    var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null;
+    for (var i = this.labels.length - 1; i >= 0; i--) {
+      var label$1 = this.labels[i];
+      if (label$1.statementStart === node.start) {
+        // Update information about previous labels on this node
+        label$1.statementStart = this.start;
+        label$1.kind = kind;
+      } else { break }
+    }
+    this.labels.push({name: maybeName, kind: kind, statementStart: this.start});
+    node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
+    this.labels.pop();
+    node.label = expr;
+    return this.finishNode(node, "LabeledStatement")
+  };
+
+  pp$8.parseExpressionStatement = function(node, expr) {
+    node.expression = expr;
+    this.semicolon();
+    return this.finishNode(node, "ExpressionStatement")
+  };
+
+  // Parse a semicolon-enclosed block of statements, handling `"use
+  // strict"` declarations when `allowStrict` is true (used for
+  // function bodies).
+
+  pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) {
+    if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true;
+    if ( node === void 0 ) node = this.startNode();
+
+    node.body = [];
+    this.expect(types$1.braceL);
+    if (createNewLexicalScope) { this.enterScope(0); }
+    while (this.type !== types$1.braceR) {
+      var stmt = this.parseStatement(null);
+      node.body.push(stmt);
+    }
+    if (exitStrict) { this.strict = false; }
+    this.next();
+    if (createNewLexicalScope) { this.exitScope(); }
+    return this.finishNode(node, "BlockStatement")
+  };
+
+  // Parse a regular `for` loop. The disambiguation code in
+  // `parseStatement` will already have parsed the init statement or
+  // expression.
+
+  pp$8.parseFor = function(node, init) {
+    node.init = init;
+    this.expect(types$1.semi);
+    node.test = this.type === types$1.semi ? null : this.parseExpression();
+    this.expect(types$1.semi);
+    node.update = this.type === types$1.parenR ? null : this.parseExpression();
+    this.expect(types$1.parenR);
+    node.body = this.parseStatement("for");
+    this.exitScope();
+    this.labels.pop();
+    return this.finishNode(node, "ForStatement")
+  };
+
+  // Parse a `for`/`in` and `for`/`of` loop, which are almost
+  // same from parser's perspective.
+
+  pp$8.parseForIn = function(node, init) {
+    var isForIn = this.type === types$1._in;
+    this.next();
+
+    if (
+      init.type === "VariableDeclaration" &&
+      init.declarations[0].init != null &&
+      (
+        !isForIn ||
+        this.options.ecmaVersion < 8 ||
+        this.strict ||
+        init.kind !== "var" ||
+        init.declarations[0].id.type !== "Identifier"
+      )
+    ) {
+      this.raise(
+        init.start,
+        ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer")
+      );
+    }
+    node.left = init;
+    node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
+    this.expect(types$1.parenR);
+    node.body = this.parseStatement("for");
+    this.exitScope();
+    this.labels.pop();
+    return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement")
+  };
+
+  // Parse a list of variable declarations.
+
+  pp$8.parseVar = function(node, isFor, kind, allowMissingInitializer) {
+    node.declarations = [];
+    node.kind = kind;
+    for (;;) {
+      var decl = this.startNode();
+      this.parseVarId(decl, kind);
+      if (this.eat(types$1.eq)) {
+        decl.init = this.parseMaybeAssign(isFor);
+      } else if (!allowMissingInitializer && kind === "const" && !(this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) {
+        this.unexpected();
+      } else if (!allowMissingInitializer && (kind === "using" || kind === "await using") && this.options.ecmaVersion >= 17 && this.type !== types$1._in && !this.isContextual("of")) {
+        this.raise(this.lastTokEnd, ("Missing initializer in " + kind + " declaration"));
+      } else if (!allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) {
+        this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
+      } else {
+        decl.init = null;
+      }
+      node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
+      if (!this.eat(types$1.comma)) { break }
+    }
+    return node
+  };
+
+  pp$8.parseVarId = function(decl, kind) {
+    decl.id = kind === "using" || kind === "await using"
+      ? this.parseIdent()
+      : this.parseBindingAtom();
+
+    this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
+  };
+
+  var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4;
+
+  // Parse a function declaration or literal (depending on the
+  // `statement & FUNC_STATEMENT`).
+
+  // Remove `allowExpressionBody` for 7.0.0, as it is only called with false
+  pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
+    this.initFunction(node);
+    if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
+      if (this.type === types$1.star && (statement & FUNC_HANGING_STATEMENT))
+        { this.unexpected(); }
+      node.generator = this.eat(types$1.star);
+    }
+    if (this.options.ecmaVersion >= 8)
+      { node.async = !!isAsync; }
+
+    if (statement & FUNC_STATEMENT) {
+      node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types$1.name ? null : this.parseIdent();
+      if (node.id && !(statement & FUNC_HANGING_STATEMENT))
+        // If it is a regular function declaration in sloppy mode, then it is
+        // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding
+        // mode depends on properties of the current scope (see
+        // treatFunctionsAsVar).
+        { this.checkLValSimple(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); }
+    }
+
+    var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
+    this.yieldPos = 0;
+    this.awaitPos = 0;
+    this.awaitIdentPos = 0;
+    this.enterScope(functionFlags(node.async, node.generator));
+
+    if (!(statement & FUNC_STATEMENT))
+      { node.id = this.type === types$1.name ? this.parseIdent() : null; }
+
+    this.parseFunctionParams(node);
+    this.parseFunctionBody(node, allowExpressionBody, false, forInit);
+
+    this.yieldPos = oldYieldPos;
+    this.awaitPos = oldAwaitPos;
+    this.awaitIdentPos = oldAwaitIdentPos;
+    return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression")
+  };
+
+  pp$8.parseFunctionParams = function(node) {
+    this.expect(types$1.parenL);
+    node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
+    this.checkYieldAwaitInDefaultParams();
+  };
+
+  // Parse a class declaration or literal (depending on the
+  // `isStatement` parameter).
+
+  pp$8.parseClass = function(node, isStatement) {
+    this.next();
+
+    // ecma-262 14.6 Class Definitions
+    // A class definition is always strict mode code.
+    var oldStrict = this.strict;
+    this.strict = true;
+
+    this.parseClassId(node, isStatement);
+    this.parseClassSuper(node);
+    var privateNameMap = this.enterClassBody();
+    var classBody = this.startNode();
+    var hadConstructor = false;
+    classBody.body = [];
+    this.expect(types$1.braceL);
+    while (this.type !== types$1.braceR) {
+      var element = this.parseClassElement(node.superClass !== null);
+      if (element) {
+        classBody.body.push(element);
+        if (element.type === "MethodDefinition" && element.kind === "constructor") {
+          if (hadConstructor) { this.raiseRecoverable(element.start, "Duplicate constructor in the same class"); }
+          hadConstructor = true;
+        } else if (element.key && element.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element)) {
+          this.raiseRecoverable(element.key.start, ("Identifier '#" + (element.key.name) + "' has already been declared"));
+        }
+      }
+    }
+    this.strict = oldStrict;
+    this.next();
+    node.body = this.finishNode(classBody, "ClassBody");
+    this.exitClassBody();
+    return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
+  };
+
+  pp$8.parseClassElement = function(constructorAllowsSuper) {
+    if (this.eat(types$1.semi)) { return null }
+
+    var ecmaVersion = this.options.ecmaVersion;
+    var node = this.startNode();
+    var keyName = "";
+    var isGenerator = false;
+    var isAsync = false;
+    var kind = "method";
+    var isStatic = false;
+
+    if (this.eatContextual("static")) {
+      // Parse static init block
+      if (ecmaVersion >= 13 && this.eat(types$1.braceL)) {
+        this.parseClassStaticBlock(node);
+        return node
+      }
+      if (this.isClassElementNameStart() || this.type === types$1.star) {
+        isStatic = true;
+      } else {
+        keyName = "static";
+      }
+    }
+    node.static = isStatic;
+    if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) {
+      if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) {
+        isAsync = true;
+      } else {
+        keyName = "async";
+      }
+    }
+    if (!keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types$1.star)) {
+      isGenerator = true;
+    }
+    if (!keyName && !isAsync && !isGenerator) {
+      var lastValue = this.value;
+      if (this.eatContextual("get") || this.eatContextual("set")) {
+        if (this.isClassElementNameStart()) {
+          kind = lastValue;
+        } else {
+          keyName = lastValue;
+        }
+      }
+    }
+
+    // Parse element name
+    if (keyName) {
+      // 'async', 'get', 'set', or 'static' were not a keyword contextually.
+      // The last token is any of those. Make it the element name.
+      node.computed = false;
+      node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc);
+      node.key.name = keyName;
+      this.finishNode(node.key, "Identifier");
+    } else {
+      this.parseClassElementName(node);
+    }
+
+    // Parse element value
+    if (ecmaVersion < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) {
+      var isConstructor = !node.static && checkKeyName(node, "constructor");
+      var allowsDirectSuper = isConstructor && constructorAllowsSuper;
+      // Couldn't move this check into the 'parseClassMethod' method for backward compatibility.
+      if (isConstructor && kind !== "method") { this.raise(node.key.start, "Constructor can't have get/set modifier"); }
+      node.kind = isConstructor ? "constructor" : kind;
+      this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper);
+    } else {
+      this.parseClassField(node);
+    }
+
+    return node
+  };
+
+  pp$8.isClassElementNameStart = function() {
+    return (
+      this.type === types$1.name ||
+      this.type === types$1.privateId ||
+      this.type === types$1.num ||
+      this.type === types$1.string ||
+      this.type === types$1.bracketL ||
+      this.type.keyword
+    )
+  };
+
+  pp$8.parseClassElementName = function(element) {
+    if (this.type === types$1.privateId) {
+      if (this.value === "constructor") {
+        this.raise(this.start, "Classes can't have an element named '#constructor'");
+      }
+      element.computed = false;
+      element.key = this.parsePrivateIdent();
+    } else {
+      this.parsePropertyName(element);
+    }
+  };
+
+  pp$8.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {
+    // Check key and flags
+    var key = method.key;
+    if (method.kind === "constructor") {
+      if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); }
+      if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); }
+    } else if (method.static && checkKeyName(method, "prototype")) {
+      this.raise(key.start, "Classes may not have a static property named prototype");
+    }
+
+    // Parse value
+    var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
+
+    // Check value
+    if (method.kind === "get" && value.params.length !== 0)
+      { this.raiseRecoverable(value.start, "getter should have no params"); }
+    if (method.kind === "set" && value.params.length !== 1)
+      { this.raiseRecoverable(value.start, "setter should have exactly one param"); }
+    if (method.kind === "set" && value.params[0].type === "RestElement")
+      { this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params"); }
+
+    return this.finishNode(method, "MethodDefinition")
+  };
+
+  pp$8.parseClassField = function(field) {
+    if (checkKeyName(field, "constructor")) {
+      this.raise(field.key.start, "Classes can't have a field named 'constructor'");
+    } else if (field.static && checkKeyName(field, "prototype")) {
+      this.raise(field.key.start, "Classes can't have a static field named 'prototype'");
+    }
+
+    if (this.eat(types$1.eq)) {
+      // To raise SyntaxError if 'arguments' exists in the initializer.
+      this.enterScope(SCOPE_CLASS_FIELD_INIT | SCOPE_SUPER);
+      field.value = this.parseMaybeAssign();
+      this.exitScope();
+    } else {
+      field.value = null;
+    }
+    this.semicolon();
+
+    return this.finishNode(field, "PropertyDefinition")
+  };
+
+  pp$8.parseClassStaticBlock = function(node) {
+    node.body = [];
+
+    var oldLabels = this.labels;
+    this.labels = [];
+    this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER);
+    while (this.type !== types$1.braceR) {
+      var stmt = this.parseStatement(null);
+      node.body.push(stmt);
+    }
+    this.next();
+    this.exitScope();
+    this.labels = oldLabels;
+
+    return this.finishNode(node, "StaticBlock")
+  };
+
+  pp$8.parseClassId = function(node, isStatement) {
+    if (this.type === types$1.name) {
+      node.id = this.parseIdent();
+      if (isStatement)
+        { this.checkLValSimple(node.id, BIND_LEXICAL, false); }
+    } else {
+      if (isStatement === true)
+        { this.unexpected(); }
+      node.id = null;
+    }
+  };
+
+  pp$8.parseClassSuper = function(node) {
+    node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null;
+  };
+
+  pp$8.enterClassBody = function() {
+    var element = {declared: Object.create(null), used: []};
+    this.privateNameStack.push(element);
+    return element.declared
+  };
+
+  pp$8.exitClassBody = function() {
+    var ref = this.privateNameStack.pop();
+    var declared = ref.declared;
+    var used = ref.used;
+    if (!this.options.checkPrivateFields) { return }
+    var len = this.privateNameStack.length;
+    var parent = len === 0 ? null : this.privateNameStack[len - 1];
+    for (var i = 0; i < used.length; ++i) {
+      var id = used[i];
+      if (!hasOwn(declared, id.name)) {
+        if (parent) {
+          parent.used.push(id);
+        } else {
+          this.raiseRecoverable(id.start, ("Private field '#" + (id.name) + "' must be declared in an enclosing class"));
+        }
+      }
+    }
+  };
+
+  function isPrivateNameConflicted(privateNameMap, element) {
+    var name = element.key.name;
+    var curr = privateNameMap[name];
+
+    var next = "true";
+    if (element.type === "MethodDefinition" && (element.kind === "get" || element.kind === "set")) {
+      next = (element.static ? "s" : "i") + element.kind;
+    }
+
+    // `class { get #a(){}; static set #a(_){} }` is also conflict.
+    if (
+      curr === "iget" && next === "iset" ||
+      curr === "iset" && next === "iget" ||
+      curr === "sget" && next === "sset" ||
+      curr === "sset" && next === "sget"
+    ) {
+      privateNameMap[name] = "true";
+      return false
+    } else if (!curr) {
+      privateNameMap[name] = next;
+      return false
+    } else {
+      return true
+    }
+  }
+
+  function checkKeyName(node, name) {
+    var computed = node.computed;
+    var key = node.key;
+    return !computed && (
+      key.type === "Identifier" && key.name === name ||
+      key.type === "Literal" && key.value === name
+    )
+  }
+
+  // Parses module export declaration.
+
+  pp$8.parseExportAllDeclaration = function(node, exports) {
+    if (this.options.ecmaVersion >= 11) {
+      if (this.eatContextual("as")) {
+        node.exported = this.parseModuleExportName();
+        this.checkExport(exports, node.exported, this.lastTokStart);
+      } else {
+        node.exported = null;
+      }
+    }
+    this.expectContextual("from");
+    if (this.type !== types$1.string) { this.unexpected(); }
+    node.source = this.parseExprAtom();
+    if (this.options.ecmaVersion >= 16)
+      { node.attributes = this.parseWithClause(); }
+    this.semicolon();
+    return this.finishNode(node, "ExportAllDeclaration")
+  };
+
+  pp$8.parseExport = function(node, exports) {
+    this.next();
+    // export * from '...'
+    if (this.eat(types$1.star)) {
+      return this.parseExportAllDeclaration(node, exports)
+    }
+    if (this.eat(types$1._default)) { // export default ...
+      this.checkExport(exports, "default", this.lastTokStart);
+      node.declaration = this.parseExportDefaultDeclaration();
+      return this.finishNode(node, "ExportDefaultDeclaration")
+    }
+    // export var|const|let|function|class ...
+    if (this.shouldParseExportStatement()) {
+      node.declaration = this.parseExportDeclaration(node);
+      if (node.declaration.type === "VariableDeclaration")
+        { this.checkVariableExport(exports, node.declaration.declarations); }
+      else
+        { this.checkExport(exports, node.declaration.id, node.declaration.id.start); }
+      node.specifiers = [];
+      node.source = null;
+      if (this.options.ecmaVersion >= 16)
+        { node.attributes = []; }
+    } else { // export { x, y as z } [from '...']
+      node.declaration = null;
+      node.specifiers = this.parseExportSpecifiers(exports);
+      if (this.eatContextual("from")) {
+        if (this.type !== types$1.string) { this.unexpected(); }
+        node.source = this.parseExprAtom();
+        if (this.options.ecmaVersion >= 16)
+          { node.attributes = this.parseWithClause(); }
+      } else {
+        for (var i = 0, list = node.specifiers; i < list.length; i += 1) {
+          // check for keywords used as local names
+          var spec = list[i];
+
+          this.checkUnreserved(spec.local);
+          // check if export is defined
+          this.checkLocalExport(spec.local);
+
+          if (spec.local.type === "Literal") {
+            this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
+          }
+        }
+
+        node.source = null;
+        if (this.options.ecmaVersion >= 16)
+          { node.attributes = []; }
+      }
+      this.semicolon();
+    }
+    return this.finishNode(node, "ExportNamedDeclaration")
+  };
+
+  pp$8.parseExportDeclaration = function(node) {
+    return this.parseStatement(null)
+  };
+
+  pp$8.parseExportDefaultDeclaration = function() {
+    var isAsync;
+    if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) {
+      var fNode = this.startNode();
+      this.next();
+      if (isAsync) { this.next(); }
+      return this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync)
+    } else if (this.type === types$1._class) {
+      var cNode = this.startNode();
+      return this.parseClass(cNode, "nullableID")
+    } else {
+      var declaration = this.parseMaybeAssign();
+      this.semicolon();
+      return declaration
+    }
+  };
+
+  pp$8.checkExport = function(exports, name, pos) {
+    if (!exports) { return }
+    if (typeof name !== "string")
+      { name = name.type === "Identifier" ? name.name : name.value; }
+    if (hasOwn(exports, name))
+      { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); }
+    exports[name] = true;
+  };
+
+  pp$8.checkPatternExport = function(exports, pat) {
+    var type = pat.type;
+    if (type === "Identifier")
+      { this.checkExport(exports, pat, pat.start); }
+    else if (type === "ObjectPattern")
+      { for (var i = 0, list = pat.properties; i < list.length; i += 1)
+        {
+          var prop = list[i];
+
+          this.checkPatternExport(exports, prop);
+        } }
+    else if (type === "ArrayPattern")
+      { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
+        var elt = list$1[i$1];
+
+          if (elt) { this.checkPatternExport(exports, elt); }
+      } }
+    else if (type === "Property")
+      { this.checkPatternExport(exports, pat.value); }
+    else if (type === "AssignmentPattern")
+      { this.checkPatternExport(exports, pat.left); }
+    else if (type === "RestElement")
+      { this.checkPatternExport(exports, pat.argument); }
+  };
+
+  pp$8.checkVariableExport = function(exports, decls) {
+    if (!exports) { return }
+    for (var i = 0, list = decls; i < list.length; i += 1)
+      {
+      var decl = list[i];
+
+      this.checkPatternExport(exports, decl.id);
+    }
+  };
+
+  pp$8.shouldParseExportStatement = function() {
+    return this.type.keyword === "var" ||
+      this.type.keyword === "const" ||
+      this.type.keyword === "class" ||
+      this.type.keyword === "function" ||
+      this.isLet() ||
+      this.isAsyncFunction()
+  };
+
+  // Parses a comma-separated list of module exports.
+
+  pp$8.parseExportSpecifier = function(exports) {
+    var node = this.startNode();
+    node.local = this.parseModuleExportName();
+
+    node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
+    this.checkExport(
+      exports,
+      node.exported,
+      node.exported.start
+    );
+
+    return this.finishNode(node, "ExportSpecifier")
+  };
+
+  pp$8.parseExportSpecifiers = function(exports) {
+    var nodes = [], first = true;
+    // export { x, y as z } [from '...']
+    this.expect(types$1.braceL);
+    while (!this.eat(types$1.braceR)) {
+      if (!first) {
+        this.expect(types$1.comma);
+        if (this.afterTrailingComma(types$1.braceR)) { break }
+      } else { first = false; }
+
+      nodes.push(this.parseExportSpecifier(exports));
+    }
+    return nodes
+  };
+
+  // Parses import declaration.
+
+  pp$8.parseImport = function(node) {
+    this.next();
+
+    // import '...'
+    if (this.type === types$1.string) {
+      node.specifiers = empty$1;
+      node.source = this.parseExprAtom();
+    } else {
+      node.specifiers = this.parseImportSpecifiers();
+      this.expectContextual("from");
+      node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected();
+    }
+    if (this.options.ecmaVersion >= 16)
+      { node.attributes = this.parseWithClause(); }
+    this.semicolon();
+    return this.finishNode(node, "ImportDeclaration")
+  };
+
+  // Parses a comma-separated list of module imports.
+
+  pp$8.parseImportSpecifier = function() {
+    var node = this.startNode();
+    node.imported = this.parseModuleExportName();
+
+    if (this.eatContextual("as")) {
+      node.local = this.parseIdent();
+    } else {
+      this.checkUnreserved(node.imported);
+      node.local = node.imported;
+    }
+    this.checkLValSimple(node.local, BIND_LEXICAL);
+
+    return this.finishNode(node, "ImportSpecifier")
+  };
+
+  pp$8.parseImportDefaultSpecifier = function() {
+    // import defaultObj, { x, y as z } from '...'
+    var node = this.startNode();
+    node.local = this.parseIdent();
+    this.checkLValSimple(node.local, BIND_LEXICAL);
+    return this.finishNode(node, "ImportDefaultSpecifier")
+  };
+
+  pp$8.parseImportNamespaceSpecifier = function() {
+    var node = this.startNode();
+    this.next();
+    this.expectContextual("as");
+    node.local = this.parseIdent();
+    this.checkLValSimple(node.local, BIND_LEXICAL);
+    return this.finishNode(node, "ImportNamespaceSpecifier")
+  };
+
+  pp$8.parseImportSpecifiers = function() {
+    var nodes = [], first = true;
+    if (this.type === types$1.name) {
+      nodes.push(this.parseImportDefaultSpecifier());
+      if (!this.eat(types$1.comma)) { return nodes }
+    }
+    if (this.type === types$1.star) {
+      nodes.push(this.parseImportNamespaceSpecifier());
+      return nodes
+    }
+    this.expect(types$1.braceL);
+    while (!this.eat(types$1.braceR)) {
+      if (!first) {
+        this.expect(types$1.comma);
+        if (this.afterTrailingComma(types$1.braceR)) { break }
+      } else { first = false; }
+
+      nodes.push(this.parseImportSpecifier());
+    }
+    return nodes
+  };
+
+  pp$8.parseWithClause = function() {
+    var nodes = [];
+    if (!this.eat(types$1._with)) {
+      return nodes
+    }
+    this.expect(types$1.braceL);
+    var attributeKeys = {};
+    var first = true;
+    while (!this.eat(types$1.braceR)) {
+      if (!first) {
+        this.expect(types$1.comma);
+        if (this.afterTrailingComma(types$1.braceR)) { break }
+      } else { first = false; }
+
+      var attr = this.parseImportAttribute();
+      var keyName = attr.key.type === "Identifier" ? attr.key.name : attr.key.value;
+      if (hasOwn(attributeKeys, keyName))
+        { this.raiseRecoverable(attr.key.start, "Duplicate attribute key '" + keyName + "'"); }
+      attributeKeys[keyName] = true;
+      nodes.push(attr);
+    }
+    return nodes
+  };
+
+  pp$8.parseImportAttribute = function() {
+    var node = this.startNode();
+    node.key = this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
+    this.expect(types$1.colon);
+    if (this.type !== types$1.string) {
+      this.unexpected();
+    }
+    node.value = this.parseExprAtom();
+    return this.finishNode(node, "ImportAttribute")
+  };
+
+  pp$8.parseModuleExportName = function() {
+    if (this.options.ecmaVersion >= 13 && this.type === types$1.string) {
+      var stringLiteral = this.parseLiteral(this.value);
+      if (loneSurrogate.test(stringLiteral.value)) {
+        this.raise(stringLiteral.start, "An export name cannot include a lone surrogate.");
+      }
+      return stringLiteral
+    }
+    return this.parseIdent(true)
+  };
+
+  // Set `ExpressionStatement#directive` property for directive prologues.
+  pp$8.adaptDirectivePrologue = function(statements) {
+    for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {
+      statements[i].directive = statements[i].expression.raw.slice(1, -1);
+    }
+  };
+  pp$8.isDirectiveCandidate = function(statement) {
+    return (
+      this.options.ecmaVersion >= 5 &&
+      statement.type === "ExpressionStatement" &&
+      statement.expression.type === "Literal" &&
+      typeof statement.expression.value === "string" &&
+      // Reject parenthesized strings.
+      (this.input[statement.start] === "\"" || this.input[statement.start] === "'")
+    )
+  };
+
+  var pp$7 = Parser.prototype;
+
+  // Convert existing expression atom to assignable pattern
+  // if possible.
+
+  pp$7.toAssignable = function(node, isBinding, refDestructuringErrors) {
+    if (this.options.ecmaVersion >= 6 && node) {
+      switch (node.type) {
+      case "Identifier":
+        if (this.inAsync && node.name === "await")
+          { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); }
+        break
+
+      case "ObjectPattern":
+      case "ArrayPattern":
+      case "AssignmentPattern":
+      case "RestElement":
+        break
+
+      case "ObjectExpression":
+        node.type = "ObjectPattern";
+        if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); }
+        for (var i = 0, list = node.properties; i < list.length; i += 1) {
+          var prop = list[i];
+
+        this.toAssignable(prop, isBinding);
+          // Early error:
+          //   AssignmentRestProperty[Yield, Await] :
+          //     `...` DestructuringAssignmentTarget[Yield, Await]
+          //
+          //   It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|.
+          if (
+            prop.type === "RestElement" &&
+            (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")
+          ) {
+            this.raise(prop.argument.start, "Unexpected token");
+          }
+        }
+        break
+
+      case "Property":
+        // AssignmentProperty has type === "Property"
+        if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); }
+        this.toAssignable(node.value, isBinding);
+        break
+
+      case "ArrayExpression":
+        node.type = "ArrayPattern";
+        if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); }
+        this.toAssignableList(node.elements, isBinding);
+        break
+
+      case "SpreadElement":
+        node.type = "RestElement";
+        this.toAssignable(node.argument, isBinding);
+        if (node.argument.type === "AssignmentPattern")
+          { this.raise(node.argument.start, "Rest elements cannot have a default value"); }
+        break
+
+      case "AssignmentExpression":
+        if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); }
+        node.type = "AssignmentPattern";
+        delete node.operator;
+        this.toAssignable(node.left, isBinding);
+        break
+
+      case "ParenthesizedExpression":
+        this.toAssignable(node.expression, isBinding, refDestructuringErrors);
+        break
+
+      case "ChainExpression":
+        this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side");
+        break
+
+      case "MemberExpression":
+        if (!isBinding) { break }
+
+      default:
+        this.raise(node.start, "Assigning to rvalue");
+      }
+    } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); }
+    return node
+  };
+
+  // Convert list of expression atoms to binding list.
+
+  pp$7.toAssignableList = function(exprList, isBinding) {
+    var end = exprList.length;
+    for (var i = 0; i < end; i++) {
+      var elt = exprList[i];
+      if (elt) { this.toAssignable(elt, isBinding); }
+    }
+    if (end) {
+      var last = exprList[end - 1];
+      if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier")
+        { this.unexpected(last.argument.start); }
+    }
+    return exprList
+  };
+
+  // Parses spread element.
+
+  pp$7.parseSpread = function(refDestructuringErrors) {
+    var node = this.startNode();
+    this.next();
+    node.argument = this.parseMaybeAssign(false, refDestructuringErrors);
+    return this.finishNode(node, "SpreadElement")
+  };
+
+  pp$7.parseRestBinding = function() {
+    var node = this.startNode();
+    this.next();
+
+    // RestElement inside of a function parameter must be an identifier
+    if (this.options.ecmaVersion === 6 && this.type !== types$1.name)
+      { this.unexpected(); }
+
+    node.argument = this.parseBindingAtom();
+
+    return this.finishNode(node, "RestElement")
+  };
+
+  // Parses lvalue (assignable) atom.
+
+  pp$7.parseBindingAtom = function() {
+    if (this.options.ecmaVersion >= 6) {
+      switch (this.type) {
+      case types$1.bracketL:
+        var node = this.startNode();
+        this.next();
+        node.elements = this.parseBindingList(types$1.bracketR, true, true);
+        return this.finishNode(node, "ArrayPattern")
+
+      case types$1.braceL:
+        return this.parseObj(true)
+      }
+    }
+    return this.parseIdent()
+  };
+
+  pp$7.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowModifiers) {
+    var elts = [], first = true;
+    while (!this.eat(close)) {
+      if (first) { first = false; }
+      else { this.expect(types$1.comma); }
+      if (allowEmpty && this.type === types$1.comma) {
+        elts.push(null);
+      } else if (allowTrailingComma && this.afterTrailingComma(close)) {
+        break
+      } else if (this.type === types$1.ellipsis) {
+        var rest = this.parseRestBinding();
+        this.parseBindingListItem(rest);
+        elts.push(rest);
+        if (this.type === types$1.comma) { this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); }
+        this.expect(close);
+        break
+      } else {
+        elts.push(this.parseAssignableListItem(allowModifiers));
+      }
+    }
+    return elts
+  };
+
+  pp$7.parseAssignableListItem = function(allowModifiers) {
+    var elem = this.parseMaybeDefault(this.start, this.startLoc);
+    this.parseBindingListItem(elem);
+    return elem
+  };
+
+  pp$7.parseBindingListItem = function(param) {
+    return param
+  };
+
+  // Parses assignment pattern around given atom if possible.
+
+  pp$7.parseMaybeDefault = function(startPos, startLoc, left) {
+    left = left || this.parseBindingAtom();
+    if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) { return left }
+    var node = this.startNodeAt(startPos, startLoc);
+    node.left = left;
+    node.right = this.parseMaybeAssign();
+    return this.finishNode(node, "AssignmentPattern")
+  };
+
+  // The following three functions all verify that a node is an lvalue —
+  // something that can be bound, or assigned to. In order to do so, they perform
+  // a variety of checks:
+  //
+  // - Check that none of the bound/assigned-to identifiers are reserved words.
+  // - Record name declarations for bindings in the appropriate scope.
+  // - Check duplicate argument names, if checkClashes is set.
+  //
+  // If a complex binding pattern is encountered (e.g., object and array
+  // destructuring), the entire pattern is recursively checked.
+  //
+  // There are three versions of checkLVal*() appropriate for different
+  // circumstances:
+  //
+  // - checkLValSimple() shall be used if the syntactic construct supports
+  //   nothing other than identifiers and member expressions. Parenthesized
+  //   expressions are also correctly handled. This is generally appropriate for
+  //   constructs for which the spec says
+  //
+  //   > It is a Syntax Error if AssignmentTargetType of [the production] is not
+  //   > simple.
+  //
+  //   It is also appropriate for checking if an identifier is valid and not
+  //   defined elsewhere, like import declarations or function/class identifiers.
+  //
+  //   Examples where this is used include:
+  //     a += …;
+  //     import a from '…';
+  //   where a is the node to be checked.
+  //
+  // - checkLValPattern() shall be used if the syntactic construct supports
+  //   anything checkLValSimple() supports, as well as object and array
+  //   destructuring patterns. This is generally appropriate for constructs for
+  //   which the spec says
+  //
+  //   > It is a Syntax Error if [the production] is neither an ObjectLiteral nor
+  //   > an ArrayLiteral and AssignmentTargetType of [the production] is not
+  //   > simple.
+  //
+  //   Examples where this is used include:
+  //     (a = …);
+  //     const a = …;
+  //     try { … } catch (a) { … }
+  //   where a is the node to be checked.
+  //
+  // - checkLValInnerPattern() shall be used if the syntactic construct supports
+  //   anything checkLValPattern() supports, as well as default assignment
+  //   patterns, rest elements, and other constructs that may appear within an
+  //   object or array destructuring pattern.
+  //
+  //   As a special case, function parameters also use checkLValInnerPattern(),
+  //   as they also support defaults and rest constructs.
+  //
+  // These functions deliberately support both assignment and binding constructs,
+  // as the logic for both is exceedingly similar. If the node is the target of
+  // an assignment, then bindingType should be set to BIND_NONE. Otherwise, it
+  // should be set to the appropriate BIND_* constant, like BIND_VAR or
+  // BIND_LEXICAL.
+  //
+  // If the function is called with a non-BIND_NONE bindingType, then
+  // additionally a checkClashes object may be specified to allow checking for
+  // duplicate argument names. checkClashes is ignored if the provided construct
+  // is an assignment (i.e., bindingType is BIND_NONE).
+
+  pp$7.checkLValSimple = function(expr, bindingType, checkClashes) {
+    if ( bindingType === void 0 ) bindingType = BIND_NONE;
+
+    var isBind = bindingType !== BIND_NONE;
+
+    switch (expr.type) {
+    case "Identifier":
+      if (this.strict && this.reservedWordsStrictBind.test(expr.name))
+        { this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); }
+      if (isBind) {
+        if (bindingType === BIND_LEXICAL && expr.name === "let")
+          { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); }
+        if (checkClashes) {
+          if (hasOwn(checkClashes, expr.name))
+            { this.raiseRecoverable(expr.start, "Argument name clash"); }
+          checkClashes[expr.name] = true;
+        }
+        if (bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); }
+      }
+      break
+
+    case "ChainExpression":
+      this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side");
+      break
+
+    case "MemberExpression":
+      if (isBind) { this.raiseRecoverable(expr.start, "Binding member expression"); }
+      break
+
+    case "ParenthesizedExpression":
+      if (isBind) { this.raiseRecoverable(expr.start, "Binding parenthesized expression"); }
+      return this.checkLValSimple(expr.expression, bindingType, checkClashes)
+
+    default:
+      this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue");
+    }
+  };
+
+  pp$7.checkLValPattern = function(expr, bindingType, checkClashes) {
+    if ( bindingType === void 0 ) bindingType = BIND_NONE;
+
+    switch (expr.type) {
+    case "ObjectPattern":
+      for (var i = 0, list = expr.properties; i < list.length; i += 1) {
+        var prop = list[i];
+
+      this.checkLValInnerPattern(prop, bindingType, checkClashes);
+      }
+      break
+
+    case "ArrayPattern":
+      for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
+        var elem = list$1[i$1];
+
+      if (elem) { this.checkLValInnerPattern(elem, bindingType, checkClashes); }
+      }
+      break
+
+    default:
+      this.checkLValSimple(expr, bindingType, checkClashes);
+    }
+  };
+
+  pp$7.checkLValInnerPattern = function(expr, bindingType, checkClashes) {
+    if ( bindingType === void 0 ) bindingType = BIND_NONE;
+
+    switch (expr.type) {
+    case "Property":
+      // AssignmentProperty has type === "Property"
+      this.checkLValInnerPattern(expr.value, bindingType, checkClashes);
+      break
+
+    case "AssignmentPattern":
+      this.checkLValPattern(expr.left, bindingType, checkClashes);
+      break
+
+    case "RestElement":
+      this.checkLValPattern(expr.argument, bindingType, checkClashes);
+      break
+
+    default:
+      this.checkLValPattern(expr, bindingType, checkClashes);
+    }
+  };
+
+  // The algorithm used to determine whether a regexp can appear at a
+  // given point in the program is loosely based on sweet.js' approach.
+  // See https://github.com/mozilla/sweet.js/wiki/design
+
+
+  var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) {
+    this.token = token;
+    this.isExpr = !!isExpr;
+    this.preserveSpace = !!preserveSpace;
+    this.override = override;
+    this.generator = !!generator;
+  };
+
+  var types = {
+    b_stat: new TokContext("{", false),
+    b_expr: new TokContext("{", true),
+    b_tmpl: new TokContext("${", false),
+    p_stat: new TokContext("(", false),
+    p_expr: new TokContext("(", true),
+    q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }),
+    f_stat: new TokContext("function", false),
+    f_expr: new TokContext("function", true),
+    f_expr_gen: new TokContext("function", true, false, null, true),
+    f_gen: new TokContext("function", false, false, null, true)
+  };
+
+  var pp$6 = Parser.prototype;
+
+  pp$6.initialContext = function() {
+    return [types.b_stat]
+  };
+
+  pp$6.curContext = function() {
+    return this.context[this.context.length - 1]
+  };
+
+  pp$6.braceIsBlock = function(prevType) {
+    var parent = this.curContext();
+    if (parent === types.f_expr || parent === types.f_stat)
+      { return true }
+    if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr))
+      { return !parent.isExpr }
+
+    // The check for `tt.name && exprAllowed` detects whether we are
+    // after a `yield` or `of` construct. See the `updateContext` for
+    // `tt.name`.
+    if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed)
+      { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) }
+    if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow)
+      { return true }
+    if (prevType === types$1.braceL)
+      { return parent === types.b_stat }
+    if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name)
+      { return false }
+    return !this.exprAllowed
+  };
+
+  pp$6.inGeneratorContext = function() {
+    for (var i = this.context.length - 1; i >= 1; i--) {
+      var context = this.context[i];
+      if (context.token === "function")
+        { return context.generator }
+    }
+    return false
+  };
+
+  pp$6.updateContext = function(prevType) {
+    var update, type = this.type;
+    if (type.keyword && prevType === types$1.dot)
+      { this.exprAllowed = false; }
+    else if (update = type.updateContext)
+      { update.call(this, prevType); }
+    else
+      { this.exprAllowed = type.beforeExpr; }
+  };
+
+  // Used to handle edge cases when token context could not be inferred correctly during tokenization phase
+
+  pp$6.overrideContext = function(tokenCtx) {
+    if (this.curContext() !== tokenCtx) {
+      this.context[this.context.length - 1] = tokenCtx;
+    }
+  };
+
+  // Token-specific context update code
+
+  types$1.parenR.updateContext = types$1.braceR.updateContext = function() {
+    if (this.context.length === 1) {
+      this.exprAllowed = true;
+      return
+    }
+    var out = this.context.pop();
+    if (out === types.b_stat && this.curContext().token === "function") {
+      out = this.context.pop();
+    }
+    this.exprAllowed = !out.isExpr;
+  };
+
+  types$1.braceL.updateContext = function(prevType) {
+    this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr);
+    this.exprAllowed = true;
+  };
+
+  types$1.dollarBraceL.updateContext = function() {
+    this.context.push(types.b_tmpl);
+    this.exprAllowed = true;
+  };
+
+  types$1.parenL.updateContext = function(prevType) {
+    var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while;
+    this.context.push(statementParens ? types.p_stat : types.p_expr);
+    this.exprAllowed = true;
+  };
+
+  types$1.incDec.updateContext = function() {
+    // tokExprAllowed stays unchanged
+  };
+
+  types$1._function.updateContext = types$1._class.updateContext = function(prevType) {
+    if (prevType.beforeExpr && prevType !== types$1._else &&
+        !(prevType === types$1.semi && this.curContext() !== types.p_stat) &&
+        !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) &&
+        !((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat))
+      { this.context.push(types.f_expr); }
+    else
+      { this.context.push(types.f_stat); }
+    this.exprAllowed = false;
+  };
+
+  types$1.colon.updateContext = function() {
+    if (this.curContext().token === "function") { this.context.pop(); }
+    this.exprAllowed = true;
+  };
+
+  types$1.backQuote.updateContext = function() {
+    if (this.curContext() === types.q_tmpl)
+      { this.context.pop(); }
+    else
+      { this.context.push(types.q_tmpl); }
+    this.exprAllowed = false;
+  };
+
+  types$1.star.updateContext = function(prevType) {
+    if (prevType === types$1._function) {
+      var index = this.context.length - 1;
+      if (this.context[index] === types.f_expr)
+        { this.context[index] = types.f_expr_gen; }
+      else
+        { this.context[index] = types.f_gen; }
+    }
+    this.exprAllowed = true;
+  };
+
+  types$1.name.updateContext = function(prevType) {
+    var allowed = false;
+    if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) {
+      if (this.value === "of" && !this.exprAllowed ||
+          this.value === "yield" && this.inGeneratorContext())
+        { allowed = true; }
+    }
+    this.exprAllowed = allowed;
+  };
+
+  // A recursive descent parser operates by defining functions for all
+  // syntactic elements, and recursively calling those, each function
+  // advancing the input stream and returning an AST node. Precedence
+  // of constructs (for example, the fact that `!x[1]` means `!(x[1])`
+  // instead of `(!x)[1]` is handled by the fact that the parser
+  // function that parses unary prefix operators is called first, and
+  // in turn calls the function that parses `[]` subscripts — that
+  // way, it'll receive the node for `x[1]` already parsed, and wraps
+  // *that* in the unary operator node.
+  //
+  // Acorn uses an [operator precedence parser][opp] to handle binary
+  // operator precedence, because it is much more compact than using
+  // the technique outlined above, which uses different, nesting
+  // functions to specify precedence, for all of the ten binary
+  // precedence levels that JavaScript defines.
+  //
+  // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
+
+
+  var pp$5 = Parser.prototype;
+
+  // Check if property name clashes with already added.
+  // Object/class getters and setters are not allowed to clash —
+  // either with each other or with an init property — and in
+  // strict mode, init properties are also not allowed to be repeated.
+
+  pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) {
+    if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement")
+      { return }
+    if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
+      { return }
+    var key = prop.key;
+    var name;
+    switch (key.type) {
+    case "Identifier": name = key.name; break
+    case "Literal": name = String(key.value); break
+    default: return
+    }
+    var kind = prop.kind;
+    if (this.options.ecmaVersion >= 6) {
+      if (name === "__proto__" && kind === "init") {
+        if (propHash.proto) {
+          if (refDestructuringErrors) {
+            if (refDestructuringErrors.doubleProto < 0) {
+              refDestructuringErrors.doubleProto = key.start;
+            }
+          } else {
+            this.raiseRecoverable(key.start, "Redefinition of __proto__ property");
+          }
+        }
+        propHash.proto = true;
+      }
+      return
+    }
+    name = "$" + name;
+    var other = propHash[name];
+    if (other) {
+      var redefinition;
+      if (kind === "init") {
+        redefinition = this.strict && other.init || other.get || other.set;
+      } else {
+        redefinition = other.init || other[kind];
+      }
+      if (redefinition)
+        { this.raiseRecoverable(key.start, "Redefinition of property"); }
+    } else {
+      other = propHash[name] = {
+        init: false,
+        get: false,
+        set: false
+      };
+    }
+    other[kind] = true;
+  };
+
+  // ### Expression parsing
+
+  // These nest, from the most general expression type at the top to
+  // 'atomic', nondivisible expression types at the bottom. Most of
+  // the functions will simply let the function(s) below them parse,
+  // and, *if* the syntactic construct they handle is present, wrap
+  // the AST node that the inner parser gave them in another node.
+
+  // Parse a full expression. The optional arguments are used to
+  // forbid the `in` operator (in for loops initalization expressions)
+  // and provide reference for storing '=' operator inside shorthand
+  // property assignment in contexts where both object expression
+  // and object pattern might appear (so it's possible to raise
+  // delayed syntax error at correct position).
+
+  pp$5.parseExpression = function(forInit, refDestructuringErrors) {
+    var startPos = this.start, startLoc = this.startLoc;
+    var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
+    if (this.type === types$1.comma) {
+      var node = this.startNodeAt(startPos, startLoc);
+      node.expressions = [expr];
+      while (this.eat(types$1.comma)) { node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors)); }
+      return this.finishNode(node, "SequenceExpression")
+    }
+    return expr
+  };
+
+  // Parse an assignment expression. This includes applications of
+  // operators like `+=`.
+
+  pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
+    if (this.isContextual("yield")) {
+      if (this.inGenerator) { return this.parseYield(forInit) }
+      // The tokenizer will assume an expression is allowed after
+      // `yield`, but this isn't that kind of yield
+      else { this.exprAllowed = false; }
+    }
+
+    var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1;
+    if (refDestructuringErrors) {
+      oldParenAssign = refDestructuringErrors.parenthesizedAssign;
+      oldTrailingComma = refDestructuringErrors.trailingComma;
+      oldDoubleProto = refDestructuringErrors.doubleProto;
+      refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
+    } else {
+      refDestructuringErrors = new DestructuringErrors;
+      ownDestructuringErrors = true;
+    }
+
+    var startPos = this.start, startLoc = this.startLoc;
+    if (this.type === types$1.parenL || this.type === types$1.name) {
+      this.potentialArrowAt = this.start;
+      this.potentialArrowInForAwait = forInit === "await";
+    }
+    var left = this.parseMaybeConditional(forInit, refDestructuringErrors);
+    if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); }
+    if (this.type.isAssign) {
+      var node = this.startNodeAt(startPos, startLoc);
+      node.operator = this.value;
+      if (this.type === types$1.eq)
+        { left = this.toAssignable(left, false, refDestructuringErrors); }
+      if (!ownDestructuringErrors) {
+        refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1;
+      }
+      if (refDestructuringErrors.shorthandAssign >= left.start)
+        { refDestructuringErrors.shorthandAssign = -1; } // reset because shorthand default was used correctly
+      if (this.type === types$1.eq)
+        { this.checkLValPattern(left); }
+      else
+        { this.checkLValSimple(left); }
+      node.left = left;
+      this.next();
+      node.right = this.parseMaybeAssign(forInit);
+      if (oldDoubleProto > -1) { refDestructuringErrors.doubleProto = oldDoubleProto; }
+      return this.finishNode(node, "AssignmentExpression")
+    } else {
+      if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); }
+    }
+    if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; }
+    if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; }
+    return left
+  };
+
+  // Parse a ternary conditional (`?:`) operator.
+
+  pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) {
+    var startPos = this.start, startLoc = this.startLoc;
+    var expr = this.parseExprOps(forInit, refDestructuringErrors);
+    if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }
+    if (this.eat(types$1.question)) {
+      var node = this.startNodeAt(startPos, startLoc);
+      node.test = expr;
+      node.consequent = this.parseMaybeAssign();
+      this.expect(types$1.colon);
+      node.alternate = this.parseMaybeAssign(forInit);
+      return this.finishNode(node, "ConditionalExpression")
+    }
+    return expr
+  };
+
+  // Start the precedence parser.
+
+  pp$5.parseExprOps = function(forInit, refDestructuringErrors) {
+    var startPos = this.start, startLoc = this.startLoc;
+    var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit);
+    if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }
+    return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit)
+  };
+
+  // Parse binary operators with the operator precedence parsing
+  // algorithm. `left` is the left-hand side of the operator.
+  // `minPrec` provides context that allows the function to stop and
+  // defer further parser to one of its callers when it encounters an
+  // operator that has a lower precedence than the set it is parsing.
+
+  pp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {
+    var prec = this.type.binop;
+    if (prec != null && (!forInit || this.type !== types$1._in)) {
+      if (prec > minPrec) {
+        var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND;
+        var coalesce = this.type === types$1.coalesce;
+        if (coalesce) {
+          // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions.
+          // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error.
+          prec = types$1.logicalAND.binop;
+        }
+        var op = this.value;
+        this.next();
+        var startPos = this.start, startLoc = this.startLoc;
+        var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit);
+        var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
+        if ((logical && this.type === types$1.coalesce) || (coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND))) {
+          this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");
+        }
+        return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit)
+      }
+    }
+    return left
+  };
+
+  pp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) {
+    if (right.type === "PrivateIdentifier") { this.raise(right.start, "Private identifier can only be left side of binary expression"); }
+    var node = this.startNodeAt(startPos, startLoc);
+    node.left = left;
+    node.operator = op;
+    node.right = right;
+    return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression")
+  };
+
+  // Parse unary operators, both prefix and postfix.
+
+  pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
+    var startPos = this.start, startLoc = this.startLoc, expr;
+    if (this.isContextual("await") && this.canAwait) {
+      expr = this.parseAwait(forInit);
+      sawUnary = true;
+    } else if (this.type.prefix) {
+      var node = this.startNode(), update = this.type === types$1.incDec;
+      node.operator = this.value;
+      node.prefix = true;
+      this.next();
+      node.argument = this.parseMaybeUnary(null, true, update, forInit);
+      this.checkExpressionErrors(refDestructuringErrors, true);
+      if (update) { this.checkLValSimple(node.argument); }
+      else if (this.strict && node.operator === "delete" && isLocalVariableAccess(node.argument))
+        { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); }
+      else if (node.operator === "delete" && isPrivateFieldAccess(node.argument))
+        { this.raiseRecoverable(node.start, "Private fields can not be deleted"); }
+      else { sawUnary = true; }
+      expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
+    } else if (!sawUnary && this.type === types$1.privateId) {
+      if ((forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields) { this.unexpected(); }
+      expr = this.parsePrivateIdent();
+      // only could be private fields in 'in', such as #x in obj
+      if (this.type !== types$1._in) { this.unexpected(); }
+    } else {
+      expr = this.parseExprSubscripts(refDestructuringErrors, forInit);
+      if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }
+      while (this.type.postfix && !this.canInsertSemicolon()) {
+        var node$1 = this.startNodeAt(startPos, startLoc);
+        node$1.operator = this.value;
+        node$1.prefix = false;
+        node$1.argument = expr;
+        this.checkLValSimple(expr);
+        this.next();
+        expr = this.finishNode(node$1, "UpdateExpression");
+      }
+    }
+
+    if (!incDec && this.eat(types$1.starstar)) {
+      if (sawUnary)
+        { this.unexpected(this.lastTokStart); }
+      else
+        { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false) }
+    } else {
+      return expr
+    }
+  };
+
+  function isLocalVariableAccess(node) {
+    return (
+      node.type === "Identifier" ||
+      node.type === "ParenthesizedExpression" && isLocalVariableAccess(node.expression)
+    )
+  }
+
+  function isPrivateFieldAccess(node) {
+    return (
+      node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" ||
+      node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) ||
+      node.type === "ParenthesizedExpression" && isPrivateFieldAccess(node.expression)
+    )
+  }
+
+  // Parse call, dot, and `[]`-subscript expressions.
+
+  pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) {
+    var startPos = this.start, startLoc = this.startLoc;
+    var expr = this.parseExprAtom(refDestructuringErrors, forInit);
+    if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")")
+      { return expr }
+    var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit);
+    if (refDestructuringErrors && result.type === "MemberExpression") {
+      if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; }
+      if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; }
+      if (refDestructuringErrors.trailingComma >= result.start) { refDestructuringErrors.trailingComma = -1; }
+    }
+    return result
+  };
+
+  pp$5.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) {
+    var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" &&
+        this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 &&
+        this.potentialArrowAt === base.start;
+    var optionalChained = false;
+
+    while (true) {
+      var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit);
+
+      if (element.optional) { optionalChained = true; }
+      if (element === base || element.type === "ArrowFunctionExpression") {
+        if (optionalChained) {
+          var chainNode = this.startNodeAt(startPos, startLoc);
+          chainNode.expression = element;
+          element = this.finishNode(chainNode, "ChainExpression");
+        }
+        return element
+      }
+
+      base = element;
+    }
+  };
+
+  pp$5.shouldParseAsyncArrow = function() {
+    return !this.canInsertSemicolon() && this.eat(types$1.arrow)
+  };
+
+  pp$5.parseSubscriptAsyncArrow = function(startPos, startLoc, exprList, forInit) {
+    return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit)
+  };
+
+  pp$5.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {
+    var optionalSupported = this.options.ecmaVersion >= 11;
+    var optional = optionalSupported && this.eat(types$1.questionDot);
+    if (noCalls && optional) { this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); }
+
+    var computed = this.eat(types$1.bracketL);
+    if (computed || (optional && this.type !== types$1.parenL && this.type !== types$1.backQuote) || this.eat(types$1.dot)) {
+      var node = this.startNodeAt(startPos, startLoc);
+      node.object = base;
+      if (computed) {
+        node.property = this.parseExpression();
+        this.expect(types$1.bracketR);
+      } else if (this.type === types$1.privateId && base.type !== "Super") {
+        node.property = this.parsePrivateIdent();
+      } else {
+        node.property = this.parseIdent(this.options.allowReserved !== "never");
+      }
+      node.computed = !!computed;
+      if (optionalSupported) {
+        node.optional = optional;
+      }
+      base = this.finishNode(node, "MemberExpression");
+    } else if (!noCalls && this.eat(types$1.parenL)) {
+      var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
+      this.yieldPos = 0;
+      this.awaitPos = 0;
+      this.awaitIdentPos = 0;
+      var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors);
+      if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) {
+        this.checkPatternErrors(refDestructuringErrors, false);
+        this.checkYieldAwaitInDefaultParams();
+        if (this.awaitIdentPos > 0)
+          { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); }
+        this.yieldPos = oldYieldPos;
+        this.awaitPos = oldAwaitPos;
+        this.awaitIdentPos = oldAwaitIdentPos;
+        return this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit)
+      }
+      this.checkExpressionErrors(refDestructuringErrors, true);
+      this.yieldPos = oldYieldPos || this.yieldPos;
+      this.awaitPos = oldAwaitPos || this.awaitPos;
+      this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;
+      var node$1 = this.startNodeAt(startPos, startLoc);
+      node$1.callee = base;
+      node$1.arguments = exprList;
+      if (optionalSupported) {
+        node$1.optional = optional;
+      }
+      base = this.finishNode(node$1, "CallExpression");
+    } else if (this.type === types$1.backQuote) {
+      if (optional || optionalChained) {
+        this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
+      }
+      var node$2 = this.startNodeAt(startPos, startLoc);
+      node$2.tag = base;
+      node$2.quasi = this.parseTemplate({isTagged: true});
+      base = this.finishNode(node$2, "TaggedTemplateExpression");
+    }
+    return base
+  };
+
+  // Parse an atomic expression — either a single token that is an
+  // expression, an expression started by a keyword like `function` or
+  // `new`, or an expression wrapped in punctuation like `()`, `[]`,
+  // or `{}`.
+
+  pp$5.parseExprAtom = function(refDestructuringErrors, forInit, forNew) {
+    // If a division operator appears in an expression position, the
+    // tokenizer got confused, and we force it to read a regexp instead.
+    if (this.type === types$1.slash) { this.readRegexp(); }
+
+    var node, canBeArrow = this.potentialArrowAt === this.start;
+    switch (this.type) {
+    case types$1._super:
+      if (!this.allowSuper)
+        { this.raise(this.start, "'super' keyword outside a method"); }
+      node = this.startNode();
+      this.next();
+      if (this.type === types$1.parenL && !this.allowDirectSuper)
+        { this.raise(node.start, "super() call outside constructor of a subclass"); }
+      // The `super` keyword can appear at below:
+      // SuperProperty:
+      //     super [ Expression ]
+      //     super . IdentifierName
+      // SuperCall:
+      //     super ( Arguments )
+      if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL)
+        { this.unexpected(); }
+      return this.finishNode(node, "Super")
+
+    case types$1._this:
+      node = this.startNode();
+      this.next();
+      return this.finishNode(node, "ThisExpression")
+
+    case types$1.name:
+      var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;
+      var id = this.parseIdent(false);
+      if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$1._function)) {
+        this.overrideContext(types.f_expr);
+        return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit)
+      }
+      if (canBeArrow && !this.canInsertSemicolon()) {
+        if (this.eat(types$1.arrow))
+          { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit) }
+        if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$1.name && !containsEsc &&
+            (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) {
+          id = this.parseIdent(false);
+          if (this.canInsertSemicolon() || !this.eat(types$1.arrow))
+            { this.unexpected(); }
+          return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit)
+        }
+      }
+      return id
+
+    case types$1.regexp:
+      var value = this.value;
+      node = this.parseLiteral(value.value);
+      node.regex = {pattern: value.pattern, flags: value.flags};
+      return node
+
+    case types$1.num: case types$1.string:
+      return this.parseLiteral(this.value)
+
+    case types$1._null: case types$1._true: case types$1._false:
+      node = this.startNode();
+      node.value = this.type === types$1._null ? null : this.type === types$1._true;
+      node.raw = this.type.keyword;
+      this.next();
+      return this.finishNode(node, "Literal")
+
+    case types$1.parenL:
+      var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit);
+      if (refDestructuringErrors) {
+        if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr))
+          { refDestructuringErrors.parenthesizedAssign = start; }
+        if (refDestructuringErrors.parenthesizedBind < 0)
+          { refDestructuringErrors.parenthesizedBind = start; }
+      }
+      return expr
+
+    case types$1.bracketL:
+      node = this.startNode();
+      this.next();
+      node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors);
+      return this.finishNode(node, "ArrayExpression")
+
+    case types$1.braceL:
+      this.overrideContext(types.b_expr);
+      return this.parseObj(false, refDestructuringErrors)
+
+    case types$1._function:
+      node = this.startNode();
+      this.next();
+      return this.parseFunction(node, 0)
+
+    case types$1._class:
+      return this.parseClass(this.startNode(), false)
+
+    case types$1._new:
+      return this.parseNew()
+
+    case types$1.backQuote:
+      return this.parseTemplate()
+
+    case types$1._import:
+      if (this.options.ecmaVersion >= 11) {
+        return this.parseExprImport(forNew)
+      } else {
+        return this.unexpected()
+      }
+
+    default:
+      return this.parseExprAtomDefault()
+    }
+  };
+
+  pp$5.parseExprAtomDefault = function() {
+    this.unexpected();
+  };
+
+  pp$5.parseExprImport = function(forNew) {
+    var node = this.startNode();
+
+    // Consume `import` as an identifier for `import.meta`.
+    // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`.
+    if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); }
+    this.next();
+
+    if (this.type === types$1.parenL && !forNew) {
+      return this.parseDynamicImport(node)
+    } else if (this.type === types$1.dot) {
+      var meta = this.startNodeAt(node.start, node.loc && node.loc.start);
+      meta.name = "import";
+      node.meta = this.finishNode(meta, "Identifier");
+      return this.parseImportMeta(node)
+    } else {
+      this.unexpected();
+    }
+  };
+
+  pp$5.parseDynamicImport = function(node) {
+    this.next(); // skip `(`
+
+    // Parse node.source.
+    node.source = this.parseMaybeAssign();
+
+    if (this.options.ecmaVersion >= 16) {
+      if (!this.eat(types$1.parenR)) {
+        this.expect(types$1.comma);
+        if (!this.afterTrailingComma(types$1.parenR)) {
+          node.options = this.parseMaybeAssign();
+          if (!this.eat(types$1.parenR)) {
+            this.expect(types$1.comma);
+            if (!this.afterTrailingComma(types$1.parenR)) {
+              this.unexpected();
+            }
+          }
+        } else {
+          node.options = null;
+        }
+      } else {
+        node.options = null;
+      }
+    } else {
+      // Verify ending.
+      if (!this.eat(types$1.parenR)) {
+        var errorPos = this.start;
+        if (this.eat(types$1.comma) && this.eat(types$1.parenR)) {
+          this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()");
+        } else {
+          this.unexpected(errorPos);
+        }
+      }
+    }
+
+    return this.finishNode(node, "ImportExpression")
+  };
+
+  pp$5.parseImportMeta = function(node) {
+    this.next(); // skip `.`
+
+    var containsEsc = this.containsEsc;
+    node.property = this.parseIdent(true);
+
+    if (node.property.name !== "meta")
+      { this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'"); }
+    if (containsEsc)
+      { this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters"); }
+    if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere)
+      { this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module"); }
+
+    return this.finishNode(node, "MetaProperty")
+  };
+
+  pp$5.parseLiteral = function(value) {
+    var node = this.startNode();
+    node.value = value;
+    node.raw = this.input.slice(this.start, this.end);
+    if (node.raw.charCodeAt(node.raw.length - 1) === 110)
+      { node.bigint = node.value != null ? node.value.toString() : node.raw.slice(0, -1).replace(/_/g, ""); }
+    this.next();
+    return this.finishNode(node, "Literal")
+  };
+
+  pp$5.parseParenExpression = function() {
+    this.expect(types$1.parenL);
+    var val = this.parseExpression();
+    this.expect(types$1.parenR);
+    return val
+  };
+
+  pp$5.shouldParseArrow = function(exprList) {
+    return !this.canInsertSemicolon()
+  };
+
+  pp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {
+    var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
+    if (this.options.ecmaVersion >= 6) {
+      this.next();
+
+      var innerStartPos = this.start, innerStartLoc = this.startLoc;
+      var exprList = [], first = true, lastIsComma = false;
+      var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;
+      this.yieldPos = 0;
+      this.awaitPos = 0;
+      // Do not save awaitIdentPos to allow checking awaits nested in parameters
+      while (this.type !== types$1.parenR) {
+        first ? first = false : this.expect(types$1.comma);
+        if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) {
+          lastIsComma = true;
+          break
+        } else if (this.type === types$1.ellipsis) {
+          spreadStart = this.start;
+          exprList.push(this.parseParenItem(this.parseRestBinding()));
+          if (this.type === types$1.comma) {
+            this.raiseRecoverable(
+              this.start,
+              "Comma is not permitted after the rest element"
+            );
+          }
+          break
+        } else {
+          exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem));
+        }
+      }
+      var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc;
+      this.expect(types$1.parenR);
+
+      if (canBeArrow && this.shouldParseArrow(exprList) && this.eat(types$1.arrow)) {
+        this.checkPatternErrors(refDestructuringErrors, false);
+        this.checkYieldAwaitInDefaultParams();
+        this.yieldPos = oldYieldPos;
+        this.awaitPos = oldAwaitPos;
+        return this.parseParenArrowList(startPos, startLoc, exprList, forInit)
+      }
+
+      if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); }
+      if (spreadStart) { this.unexpected(spreadStart); }
+      this.checkExpressionErrors(refDestructuringErrors, true);
+      this.yieldPos = oldYieldPos || this.yieldPos;
+      this.awaitPos = oldAwaitPos || this.awaitPos;
+
+      if (exprList.length > 1) {
+        val = this.startNodeAt(innerStartPos, innerStartLoc);
+        val.expressions = exprList;
+        this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
+      } else {
+        val = exprList[0];
+      }
+    } else {
+      val = this.parseParenExpression();
+    }
+
+    if (this.options.preserveParens) {
+      var par = this.startNodeAt(startPos, startLoc);
+      par.expression = val;
+      return this.finishNode(par, "ParenthesizedExpression")
+    } else {
+      return val
+    }
+  };
+
+  pp$5.parseParenItem = function(item) {
+    return item
+  };
+
+  pp$5.parseParenArrowList = function(startPos, startLoc, exprList, forInit) {
+    return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit)
+  };
+
+  // New's precedence is slightly tricky. It must allow its argument to
+  // be a `[]` or dot subscript expression, but not a call — at least,
+  // not without wrapping it in parentheses. Thus, it uses the noCalls
+  // argument to parseSubscripts to prevent it from consuming the
+  // argument list.
+
+  var empty = [];
+
+  pp$5.parseNew = function() {
+    if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword new"); }
+    var node = this.startNode();
+    this.next();
+    if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) {
+      var meta = this.startNodeAt(node.start, node.loc && node.loc.start);
+      meta.name = "new";
+      node.meta = this.finishNode(meta, "Identifier");
+      this.next();
+      var containsEsc = this.containsEsc;
+      node.property = this.parseIdent(true);
+      if (node.property.name !== "target")
+        { this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'"); }
+      if (containsEsc)
+        { this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"); }
+      if (!this.allowNewDotTarget)
+        { this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block"); }
+      return this.finishNode(node, "MetaProperty")
+    }
+    var startPos = this.start, startLoc = this.startLoc;
+    node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false);
+    if (this.eat(types$1.parenL)) { node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false); }
+    else { node.arguments = empty; }
+    return this.finishNode(node, "NewExpression")
+  };
+
+  // Parse template expression.
+
+  pp$5.parseTemplateElement = function(ref) {
+    var isTagged = ref.isTagged;
+
+    var elem = this.startNode();
+    if (this.type === types$1.invalidTemplate) {
+      if (!isTagged) {
+        this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
+      }
+      elem.value = {
+        raw: this.value.replace(/\r\n?/g, "\n"),
+        cooked: null
+      };
+    } else {
+      elem.value = {
+        raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
+        cooked: this.value
+      };
+    }
+    this.next();
+    elem.tail = this.type === types$1.backQuote;
+    return this.finishNode(elem, "TemplateElement")
+  };
+
+  pp$5.parseTemplate = function(ref) {
+    if ( ref === void 0 ) ref = {};
+    var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false;
+
+    var node = this.startNode();
+    this.next();
+    node.expressions = [];
+    var curElt = this.parseTemplateElement({isTagged: isTagged});
+    node.quasis = [curElt];
+    while (!curElt.tail) {
+      if (this.type === types$1.eof) { this.raise(this.pos, "Unterminated template literal"); }
+      this.expect(types$1.dollarBraceL);
+      node.expressions.push(this.parseExpression());
+      this.expect(types$1.braceR);
+      node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged}));
+    }
+    this.next();
+    return this.finishNode(node, "TemplateLiteral")
+  };
+
+  pp$5.isAsyncProp = function(prop) {
+    return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" &&
+      (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types$1.star)) &&
+      !lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
+  };
+
+  // Parse an object literal or binding pattern.
+
+  pp$5.parseObj = function(isPattern, refDestructuringErrors) {
+    var node = this.startNode(), first = true, propHash = {};
+    node.properties = [];
+    this.next();
+    while (!this.eat(types$1.braceR)) {
+      if (!first) {
+        this.expect(types$1.comma);
+        if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) { break }
+      } else { first = false; }
+
+      var prop = this.parseProperty(isPattern, refDestructuringErrors);
+      if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); }
+      node.properties.push(prop);
+    }
+    return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
+  };
+
+  pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
+    var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
+    if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) {
+      if (isPattern) {
+        prop.argument = this.parseIdent(false);
+        if (this.type === types$1.comma) {
+          this.raiseRecoverable(this.start, "Comma is not permitted after the rest element");
+        }
+        return this.finishNode(prop, "RestElement")
+      }
+      // Parse argument.
+      prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);
+      // To disallow trailing comma via `this.toAssignable()`.
+      if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {
+        refDestructuringErrors.trailingComma = this.start;
+      }
+      // Finish
+      return this.finishNode(prop, "SpreadElement")
+    }
+    if (this.options.ecmaVersion >= 6) {
+      prop.method = false;
+      prop.shorthand = false;
+      if (isPattern || refDestructuringErrors) {
+        startPos = this.start;
+        startLoc = this.startLoc;
+      }
+      if (!isPattern)
+        { isGenerator = this.eat(types$1.star); }
+    }
+    var containsEsc = this.containsEsc;
+    this.parsePropertyName(prop);
+    if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
+      isAsync = true;
+      isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star);
+      this.parsePropertyName(prop);
+    } else {
+      isAsync = false;
+    }
+    this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);
+    return this.finishNode(prop, "Property")
+  };
+
+  pp$5.parseGetterSetter = function(prop) {
+    var kind = prop.key.name;
+    this.parsePropertyName(prop);
+    prop.value = this.parseMethod(false);
+    prop.kind = kind;
+    var paramCount = prop.kind === "get" ? 0 : 1;
+    if (prop.value.params.length !== paramCount) {
+      var start = prop.value.start;
+      if (prop.kind === "get")
+        { this.raiseRecoverable(start, "getter should have no params"); }
+      else
+        { this.raiseRecoverable(start, "setter should have exactly one param"); }
+    } else {
+      if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
+        { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); }
+    }
+  };
+
+  pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
+    if ((isGenerator || isAsync) && this.type === types$1.colon)
+      { this.unexpected(); }
+
+    if (this.eat(types$1.colon)) {
+      prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);
+      prop.kind = "init";
+    } else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) {
+      if (isPattern) { this.unexpected(); }
+      prop.method = true;
+      prop.value = this.parseMethod(isGenerator, isAsync);
+      prop.kind = "init";
+    } else if (!isPattern && !containsEsc &&
+               this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
+               (prop.key.name === "get" || prop.key.name === "set") &&
+               (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) {
+      if (isGenerator || isAsync) { this.unexpected(); }
+      this.parseGetterSetter(prop);
+    } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
+      if (isGenerator || isAsync) { this.unexpected(); }
+      this.checkUnreserved(prop.key);
+      if (prop.key.name === "await" && !this.awaitIdentPos)
+        { this.awaitIdentPos = startPos; }
+      if (isPattern) {
+        prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
+      } else if (this.type === types$1.eq && refDestructuringErrors) {
+        if (refDestructuringErrors.shorthandAssign < 0)
+          { refDestructuringErrors.shorthandAssign = this.start; }
+        prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
+      } else {
+        prop.value = this.copyNode(prop.key);
+      }
+      prop.kind = "init";
+      prop.shorthand = true;
+    } else { this.unexpected(); }
+  };
+
+  pp$5.parsePropertyName = function(prop) {
+    if (this.options.ecmaVersion >= 6) {
+      if (this.eat(types$1.bracketL)) {
+        prop.computed = true;
+        prop.key = this.parseMaybeAssign();
+        this.expect(types$1.bracketR);
+        return prop.key
+      } else {
+        prop.computed = false;
+      }
+    }
+    return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never")
+  };
+
+  // Initialize empty function node.
+
+  pp$5.initFunction = function(node) {
+    node.id = null;
+    if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; }
+    if (this.options.ecmaVersion >= 8) { node.async = false; }
+  };
+
+  // Parse object or class method.
+
+  pp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
+    var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
+
+    this.initFunction(node);
+    if (this.options.ecmaVersion >= 6)
+      { node.generator = isGenerator; }
+    if (this.options.ecmaVersion >= 8)
+      { node.async = !!isAsync; }
+
+    this.yieldPos = 0;
+    this.awaitPos = 0;
+    this.awaitIdentPos = 0;
+    this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
+
+    this.expect(types$1.parenL);
+    node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
+    this.checkYieldAwaitInDefaultParams();
+    this.parseFunctionBody(node, false, true, false);
+
+    this.yieldPos = oldYieldPos;
+    this.awaitPos = oldAwaitPos;
+    this.awaitIdentPos = oldAwaitIdentPos;
+    return this.finishNode(node, "FunctionExpression")
+  };
+
+  // Parse arrow function expression with given parameters.
+
+  pp$5.parseArrowExpression = function(node, params, isAsync, forInit) {
+    var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
+
+    this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW);
+    this.initFunction(node);
+    if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; }
+
+    this.yieldPos = 0;
+    this.awaitPos = 0;
+    this.awaitIdentPos = 0;
+
+    node.params = this.toAssignableList(params, true);
+    this.parseFunctionBody(node, true, false, forInit);
+
+    this.yieldPos = oldYieldPos;
+    this.awaitPos = oldAwaitPos;
+    this.awaitIdentPos = oldAwaitIdentPos;
+    return this.finishNode(node, "ArrowFunctionExpression")
+  };
+
+  // Parse function body and check parameters.
+
+  pp$5.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) {
+    var isExpression = isArrowFunction && this.type !== types$1.braceL;
+    var oldStrict = this.strict, useStrict = false;
+
+    if (isExpression) {
+      node.body = this.parseMaybeAssign(forInit);
+      node.expression = true;
+      this.checkParams(node, false);
+    } else {
+      var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);
+      if (!oldStrict || nonSimple) {
+        useStrict = this.strictDirective(this.end);
+        // If this is a strict mode function, verify that argument names
+        // are not repeated, and it does not try to bind the words `eval`
+        // or `arguments`.
+        if (useStrict && nonSimple)
+          { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); }
+      }
+      // Start a new scope with regard to labels and the `inFunction`
+      // flag (restore them to their old value afterwards).
+      var oldLabels = this.labels;
+      this.labels = [];
+      if (useStrict) { this.strict = true; }
+
+      // Add the params to varDeclaredNames to ensure that an error is thrown
+      // if a let/const declaration in the function clashes with one of the params.
+      this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params));
+      // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'
+      if (this.strict && node.id) { this.checkLValSimple(node.id, BIND_OUTSIDE); }
+      node.body = this.parseBlock(false, undefined, useStrict && !oldStrict);
+      node.expression = false;
+      this.adaptDirectivePrologue(node.body.body);
+      this.labels = oldLabels;
+    }
+    this.exitScope();
+  };
+
+  pp$5.isSimpleParamList = function(params) {
+    for (var i = 0, list = params; i < list.length; i += 1)
+      {
+      var param = list[i];
+
+      if (param.type !== "Identifier") { return false
+    } }
+    return true
+  };
+
+  // Checks function params for various disallowed patterns such as using "eval"
+  // or "arguments" and duplicate parameters.
+
+  pp$5.checkParams = function(node, allowDuplicates) {
+    var nameHash = Object.create(null);
+    for (var i = 0, list = node.params; i < list.length; i += 1)
+      {
+      var param = list[i];
+
+      this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash);
+    }
+  };
+
+  // Parses a comma-separated list of expressions, and returns them as
+  // an array. `close` is the token type that ends the list, and
+  // `allowEmpty` can be turned on to allow subsequent commas with
+  // nothing in between them to be parsed as `null` (which is needed
+  // for array literals).
+
+  pp$5.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
+    var elts = [], first = true;
+    while (!this.eat(close)) {
+      if (!first) {
+        this.expect(types$1.comma);
+        if (allowTrailingComma && this.afterTrailingComma(close)) { break }
+      } else { first = false; }
+
+      var elt = (void 0);
+      if (allowEmpty && this.type === types$1.comma)
+        { elt = null; }
+      else if (this.type === types$1.ellipsis) {
+        elt = this.parseSpread(refDestructuringErrors);
+        if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0)
+          { refDestructuringErrors.trailingComma = this.start; }
+      } else {
+        elt = this.parseMaybeAssign(false, refDestructuringErrors);
+      }
+      elts.push(elt);
+    }
+    return elts
+  };
+
+  pp$5.checkUnreserved = function(ref) {
+    var start = ref.start;
+    var end = ref.end;
+    var name = ref.name;
+
+    if (this.inGenerator && name === "yield")
+      { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); }
+    if (this.inAsync && name === "await")
+      { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); }
+    if (!(this.currentThisScope().flags & SCOPE_VAR) && name === "arguments")
+      { this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"); }
+    if (this.inClassStaticBlock && (name === "arguments" || name === "await"))
+      { this.raise(start, ("Cannot use " + name + " in class static initialization block")); }
+    if (this.keywords.test(name))
+      { this.raise(start, ("Unexpected keyword '" + name + "'")); }
+    if (this.options.ecmaVersion < 6 &&
+      this.input.slice(start, end).indexOf("\\") !== -1) { return }
+    var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
+    if (re.test(name)) {
+      if (!this.inAsync && name === "await")
+        { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); }
+      this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved"));
+    }
+  };
+
+  // Parse the next token as an identifier. If `liberal` is true (used
+  // when parsing properties), it will also convert keywords into
+  // identifiers.
+
+  pp$5.parseIdent = function(liberal) {
+    var node = this.parseIdentNode();
+    this.next(!!liberal);
+    this.finishNode(node, "Identifier");
+    if (!liberal) {
+      this.checkUnreserved(node);
+      if (node.name === "await" && !this.awaitIdentPos)
+        { this.awaitIdentPos = node.start; }
+    }
+    return node
+  };
+
+  pp$5.parseIdentNode = function() {
+    var node = this.startNode();
+    if (this.type === types$1.name) {
+      node.name = this.value;
+    } else if (this.type.keyword) {
+      node.name = this.type.keyword;
+
+      // To fix https://github.com/acornjs/acorn/issues/575
+      // `class` and `function` keywords push new context into this.context.
+      // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name.
+      // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword
+      if ((node.name === "class" || node.name === "function") &&
+        (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
+        this.context.pop();
+      }
+      this.type = types$1.name;
+    } else {
+      this.unexpected();
+    }
+    return node
+  };
+
+  pp$5.parsePrivateIdent = function() {
+    var node = this.startNode();
+    if (this.type === types$1.privateId) {
+      node.name = this.value;
+    } else {
+      this.unexpected();
+    }
+    this.next();
+    this.finishNode(node, "PrivateIdentifier");
+
+    // For validating existence
+    if (this.options.checkPrivateFields) {
+      if (this.privateNameStack.length === 0) {
+        this.raise(node.start, ("Private field '#" + (node.name) + "' must be declared in an enclosing class"));
+      } else {
+        this.privateNameStack[this.privateNameStack.length - 1].used.push(node);
+      }
+    }
+
+    return node
+  };
+
+  // Parses yield expression inside generator.
+
+  pp$5.parseYield = function(forInit) {
+    if (!this.yieldPos) { this.yieldPos = this.start; }
+
+    var node = this.startNode();
+    this.next();
+    if (this.type === types$1.semi || this.canInsertSemicolon() || (this.type !== types$1.star && !this.type.startsExpr)) {
+      node.delegate = false;
+      node.argument = null;
+    } else {
+      node.delegate = this.eat(types$1.star);
+      node.argument = this.parseMaybeAssign(forInit);
+    }
+    return this.finishNode(node, "YieldExpression")
+  };
+
+  pp$5.parseAwait = function(forInit) {
+    if (!this.awaitPos) { this.awaitPos = this.start; }
+
+    var node = this.startNode();
+    this.next();
+    node.argument = this.parseMaybeUnary(null, true, false, forInit);
+    return this.finishNode(node, "AwaitExpression")
+  };
+
+  var pp$4 = Parser.prototype;
+
+  // This function is used to raise exceptions on parse errors. It
+  // takes an offset integer (into the current `input`) to indicate
+  // the location of the error, attaches the position to the end
+  // of the error message, and then raises a `SyntaxError` with that
+  // message.
+
+  pp$4.raise = function(pos, message) {
+    var loc = getLineInfo(this.input, pos);
+    message += " (" + loc.line + ":" + loc.column + ")";
+    if (this.sourceFile) {
+      message += " in " + this.sourceFile;
+    }
+    var err = new SyntaxError(message);
+    err.pos = pos; err.loc = loc; err.raisedAt = this.pos;
+    throw err
+  };
+
+  pp$4.raiseRecoverable = pp$4.raise;
+
+  pp$4.curPosition = function() {
+    if (this.options.locations) {
+      return new Position(this.curLine, this.pos - this.lineStart)
+    }
+  };
+
+  var pp$3 = Parser.prototype;
+
+  var Scope = function Scope(flags) {
+    this.flags = flags;
+    // A list of var-declared names in the current lexical scope
+    this.var = [];
+    // A list of lexically-declared names in the current lexical scope
+    this.lexical = [];
+    // A list of lexically-declared FunctionDeclaration names in the current lexical scope
+    this.functions = [];
+  };
+
+  // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.
+
+  pp$3.enterScope = function(flags) {
+    this.scopeStack.push(new Scope(flags));
+  };
+
+  pp$3.exitScope = function() {
+    this.scopeStack.pop();
+  };
+
+  // The spec says:
+  // > At the top level of a function, or script, function declarations are
+  // > treated like var declarations rather than like lexical declarations.
+  pp$3.treatFunctionsAsVarInScope = function(scope) {
+    return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP)
+  };
+
+  pp$3.declareName = function(name, bindingType, pos) {
+    var redeclared = false;
+    if (bindingType === BIND_LEXICAL) {
+      var scope = this.currentScope();
+      redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1;
+      scope.lexical.push(name);
+      if (this.inModule && (scope.flags & SCOPE_TOP))
+        { delete this.undefinedExports[name]; }
+    } else if (bindingType === BIND_SIMPLE_CATCH) {
+      var scope$1 = this.currentScope();
+      scope$1.lexical.push(name);
+    } else if (bindingType === BIND_FUNCTION) {
+      var scope$2 = this.currentScope();
+      if (this.treatFunctionsAsVar)
+        { redeclared = scope$2.lexical.indexOf(name) > -1; }
+      else
+        { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; }
+      scope$2.functions.push(name);
+    } else {
+      for (var i = this.scopeStack.length - 1; i >= 0; --i) {
+        var scope$3 = this.scopeStack[i];
+        if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) ||
+            !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) {
+          redeclared = true;
+          break
+        }
+        scope$3.var.push(name);
+        if (this.inModule && (scope$3.flags & SCOPE_TOP))
+          { delete this.undefinedExports[name]; }
+        if (scope$3.flags & SCOPE_VAR) { break }
+      }
+    }
+    if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); }
+  };
+
+  pp$3.checkLocalExport = function(id) {
+    // scope.functions must be empty as Module code is always strict.
+    if (this.scopeStack[0].lexical.indexOf(id.name) === -1 &&
+        this.scopeStack[0].var.indexOf(id.name) === -1) {
+      this.undefinedExports[id.name] = id;
+    }
+  };
+
+  pp$3.currentScope = function() {
+    return this.scopeStack[this.scopeStack.length - 1]
+  };
+
+  pp$3.currentVarScope = function() {
+    for (var i = this.scopeStack.length - 1;; i--) {
+      var scope = this.scopeStack[i];
+      if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK)) { return scope }
+    }
+  };
+
+  // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`.
+  pp$3.currentThisScope = function() {
+    for (var i = this.scopeStack.length - 1;; i--) {
+      var scope = this.scopeStack[i];
+      if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK) &&
+          !(scope.flags & SCOPE_ARROW)) { return scope }
+    }
+  };
+
+  var Node = function Node(parser, pos, loc) {
+    this.type = "";
+    this.start = pos;
+    this.end = 0;
+    if (parser.options.locations)
+      { this.loc = new SourceLocation(parser, loc); }
+    if (parser.options.directSourceFile)
+      { this.sourceFile = parser.options.directSourceFile; }
+    if (parser.options.ranges)
+      { this.range = [pos, 0]; }
+  };
+
+  // Start an AST node, attaching a start offset.
+
+  var pp$2 = Parser.prototype;
+
+  pp$2.startNode = function() {
+    return new Node(this, this.start, this.startLoc)
+  };
+
+  pp$2.startNodeAt = function(pos, loc) {
+    return new Node(this, pos, loc)
+  };
+
+  // Finish an AST node, adding `type` and `end` properties.
+
+  function finishNodeAt(node, type, pos, loc) {
+    node.type = type;
+    node.end = pos;
+    if (this.options.locations)
+      { node.loc.end = loc; }
+    if (this.options.ranges)
+      { node.range[1] = pos; }
+    return node
+  }
+
+  pp$2.finishNode = function(node, type) {
+    return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)
+  };
+
+  // Finish node at given position
+
+  pp$2.finishNodeAt = function(node, type, pos, loc) {
+    return finishNodeAt.call(this, node, type, pos, loc)
+  };
+
+  pp$2.copyNode = function(node) {
+    var newNode = new Node(this, node.start, this.startLoc);
+    for (var prop in node) { newNode[prop] = node[prop]; }
+    return newNode
+  };
+
+  // This file was generated by "bin/generate-unicode-script-values.js". Do not modify manually!
+  var scriptValuesAddedInUnicode = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz";
+
+  // This file contains Unicode properties extracted from the ECMAScript specification.
+  // The lists are extracted like so:
+  // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText)
+
+  // #table-binary-unicode-properties
+  var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
+  var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
+  var ecma11BinaryProperties = ecma10BinaryProperties;
+  var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict";
+  var ecma13BinaryProperties = ecma12BinaryProperties;
+  var ecma14BinaryProperties = ecma13BinaryProperties;
+
+  var unicodeBinaryProperties = {
+    9: ecma9BinaryProperties,
+    10: ecma10BinaryProperties,
+    11: ecma11BinaryProperties,
+    12: ecma12BinaryProperties,
+    13: ecma13BinaryProperties,
+    14: ecma14BinaryProperties
+  };
+
+  // #table-binary-unicode-properties-of-strings
+  var ecma14BinaryPropertiesOfStrings = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji";
+
+  var unicodeBinaryPropertiesOfStrings = {
+    9: "",
+    10: "",
+    11: "",
+    12: "",
+    13: "",
+    14: ecma14BinaryPropertiesOfStrings
+  };
+
+  // #table-unicode-general-category-values
+  var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
+
+  // #table-unicode-script-values
+  var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
+  var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
+  var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
+  var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
+  var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
+  var ecma14ScriptValues = ecma13ScriptValues + " " + scriptValuesAddedInUnicode;
+
+  var unicodeScriptValues = {
+    9: ecma9ScriptValues,
+    10: ecma10ScriptValues,
+    11: ecma11ScriptValues,
+    12: ecma12ScriptValues,
+    13: ecma13ScriptValues,
+    14: ecma14ScriptValues
+  };
+
+  var data = {};
+  function buildUnicodeData(ecmaVersion) {
+    var d = data[ecmaVersion] = {
+      binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues),
+      binaryOfStrings: wordsRegexp(unicodeBinaryPropertiesOfStrings[ecmaVersion]),
+      nonBinary: {
+        General_Category: wordsRegexp(unicodeGeneralCategoryValues),
+        Script: wordsRegexp(unicodeScriptValues[ecmaVersion])
+      }
+    };
+    d.nonBinary.Script_Extensions = d.nonBinary.Script;
+
+    d.nonBinary.gc = d.nonBinary.General_Category;
+    d.nonBinary.sc = d.nonBinary.Script;
+    d.nonBinary.scx = d.nonBinary.Script_Extensions;
+  }
+
+  for (var i = 0, list = [9, 10, 11, 12, 13, 14]; i < list.length; i += 1) {
+    var ecmaVersion = list[i];
+
+    buildUnicodeData(ecmaVersion);
+  }
+
+  var pp$1 = Parser.prototype;
+
+  // Track disjunction structure to determine whether a duplicate
+  // capture group name is allowed because it is in a separate branch.
+  var BranchID = function BranchID(parent, base) {
+    // Parent disjunction branch
+    this.parent = parent;
+    // Identifies this set of sibling branches
+    this.base = base || this;
+  };
+
+  BranchID.prototype.separatedFrom = function separatedFrom (alt) {
+    // A branch is separate from another branch if they or any of
+    // their parents are siblings in a given disjunction
+    for (var self = this; self; self = self.parent) {
+      for (var other = alt; other; other = other.parent) {
+        if (self.base === other.base && self !== other) { return true }
+      }
+    }
+    return false
+  };
+
+  BranchID.prototype.sibling = function sibling () {
+    return new BranchID(this.parent, this.base)
+  };
+
+  var RegExpValidationState = function RegExpValidationState(parser) {
+    this.parser = parser;
+    this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : "");
+    this.unicodeProperties = data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion];
+    this.source = "";
+    this.flags = "";
+    this.start = 0;
+    this.switchU = false;
+    this.switchV = false;
+    this.switchN = false;
+    this.pos = 0;
+    this.lastIntValue = 0;
+    this.lastStringValue = "";
+    this.lastAssertionIsQuantifiable = false;
+    this.numCapturingParens = 0;
+    this.maxBackReference = 0;
+    this.groupNames = Object.create(null);
+    this.backReferenceNames = [];
+    this.branchID = null;
+  };
+
+  RegExpValidationState.prototype.reset = function reset (start, pattern, flags) {
+    var unicodeSets = flags.indexOf("v") !== -1;
+    var unicode = flags.indexOf("u") !== -1;
+    this.start = start | 0;
+    this.source = pattern + "";
+    this.flags = flags;
+    if (unicodeSets && this.parser.options.ecmaVersion >= 15) {
+      this.switchU = true;
+      this.switchV = true;
+      this.switchN = true;
+    } else {
+      this.switchU = unicode && this.parser.options.ecmaVersion >= 6;
+      this.switchV = false;
+      this.switchN = unicode && this.parser.options.ecmaVersion >= 9;
+    }
+  };
+
+  RegExpValidationState.prototype.raise = function raise (message) {
+    this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message));
+  };
+
+  // If u flag is given, this returns the code point at the index (it combines a surrogate pair).
+  // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair).
+  RegExpValidationState.prototype.at = function at (i, forceU) {
+      if ( forceU === void 0 ) forceU = false;
+
+    var s = this.source;
+    var l = s.length;
+    if (i >= l) {
+      return -1
+    }
+    var c = s.charCodeAt(i);
+    if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) {
+      return c
+    }
+    var next = s.charCodeAt(i + 1);
+    return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c
+  };
+
+  RegExpValidationState.prototype.nextIndex = function nextIndex (i, forceU) {
+      if ( forceU === void 0 ) forceU = false;
+
+    var s = this.source;
+    var l = s.length;
+    if (i >= l) {
+      return l
+    }
+    var c = s.charCodeAt(i), next;
+    if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l ||
+        (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) {
+      return i + 1
+    }
+    return i + 2
+  };
+
+  RegExpValidationState.prototype.current = function current (forceU) {
+      if ( forceU === void 0 ) forceU = false;
+
+    return this.at(this.pos, forceU)
+  };
+
+  RegExpValidationState.prototype.lookahead = function lookahead (forceU) {
+      if ( forceU === void 0 ) forceU = false;
+
+    return this.at(this.nextIndex(this.pos, forceU), forceU)
+  };
+
+  RegExpValidationState.prototype.advance = function advance (forceU) {
+      if ( forceU === void 0 ) forceU = false;
+
+    this.pos = this.nextIndex(this.pos, forceU);
+  };
+
+  RegExpValidationState.prototype.eat = function eat (ch, forceU) {
+      if ( forceU === void 0 ) forceU = false;
+
+    if (this.current(forceU) === ch) {
+      this.advance(forceU);
+      return true
+    }
+    return false
+  };
+
+  RegExpValidationState.prototype.eatChars = function eatChars (chs, forceU) {
+      if ( forceU === void 0 ) forceU = false;
+
+    var pos = this.pos;
+    for (var i = 0, list = chs; i < list.length; i += 1) {
+      var ch = list[i];
+
+        var current = this.at(pos, forceU);
+      if (current === -1 || current !== ch) {
+        return false
+      }
+      pos = this.nextIndex(pos, forceU);
+    }
+    this.pos = pos;
+    return true
+  };
+
+  /**
+   * Validate the flags part of a given RegExpLiteral.
+   *
+   * @param {RegExpValidationState} state The state to validate RegExp.
+   * @returns {void}
+   */
+  pp$1.validateRegExpFlags = function(state) {
+    var validFlags = state.validFlags;
+    var flags = state.flags;
+
+    var u = false;
+    var v = false;
+
+    for (var i = 0; i < flags.length; i++) {
+      var flag = flags.charAt(i);
+      if (validFlags.indexOf(flag) === -1) {
+        this.raise(state.start, "Invalid regular expression flag");
+      }
+      if (flags.indexOf(flag, i + 1) > -1) {
+        this.raise(state.start, "Duplicate regular expression flag");
+      }
+      if (flag === "u") { u = true; }
+      if (flag === "v") { v = true; }
+    }
+    if (this.options.ecmaVersion >= 15 && u && v) {
+      this.raise(state.start, "Invalid regular expression flag");
+    }
+  };
+
+  function hasProp(obj) {
+    for (var _ in obj) { return true }
+    return false
+  }
+
+  /**
+   * Validate the pattern part of a given RegExpLiteral.
+   *
+   * @param {RegExpValidationState} state The state to validate RegExp.
+   * @returns {void}
+   */
+  pp$1.validateRegExpPattern = function(state) {
+    this.regexp_pattern(state);
+
+    // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of
+    // parsing contains a |GroupName|, reparse with the goal symbol
+    // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*
+    // exception if _P_ did not conform to the grammar, if any elements of _P_
+    // were not matched by the parse, or if any Early Error conditions exist.
+    if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) {
+      state.switchN = true;
+      this.regexp_pattern(state);
+    }
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern
+  pp$1.regexp_pattern = function(state) {
+    state.pos = 0;
+    state.lastIntValue = 0;
+    state.lastStringValue = "";
+    state.lastAssertionIsQuantifiable = false;
+    state.numCapturingParens = 0;
+    state.maxBackReference = 0;
+    state.groupNames = Object.create(null);
+    state.backReferenceNames.length = 0;
+    state.branchID = null;
+
+    this.regexp_disjunction(state);
+
+    if (state.pos !== state.source.length) {
+      // Make the same messages as V8.
+      if (state.eat(0x29 /* ) */)) {
+        state.raise("Unmatched ')'");
+      }
+      if (state.eat(0x5D /* ] */) || state.eat(0x7D /* } */)) {
+        state.raise("Lone quantifier brackets");
+      }
+    }
+    if (state.maxBackReference > state.numCapturingParens) {
+      state.raise("Invalid escape");
+    }
+    for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) {
+      var name = list[i];
+
+      if (!state.groupNames[name]) {
+        state.raise("Invalid named capture referenced");
+      }
+    }
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction
+  pp$1.regexp_disjunction = function(state) {
+    var trackDisjunction = this.options.ecmaVersion >= 16;
+    if (trackDisjunction) { state.branchID = new BranchID(state.branchID, null); }
+    this.regexp_alternative(state);
+    while (state.eat(0x7C /* | */)) {
+      if (trackDisjunction) { state.branchID = state.branchID.sibling(); }
+      this.regexp_alternative(state);
+    }
+    if (trackDisjunction) { state.branchID = state.branchID.parent; }
+
+    // Make the same message as V8.
+    if (this.regexp_eatQuantifier(state, true)) {
+      state.raise("Nothing to repeat");
+    }
+    if (state.eat(0x7B /* { */)) {
+      state.raise("Lone quantifier brackets");
+    }
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative
+  pp$1.regexp_alternative = function(state) {
+    while (state.pos < state.source.length && this.regexp_eatTerm(state)) {}
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term
+  pp$1.regexp_eatTerm = function(state) {
+    if (this.regexp_eatAssertion(state)) {
+      // Handle `QuantifiableAssertion Quantifier` alternative.
+      // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion
+      // is a QuantifiableAssertion.
+      if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {
+        // Make the same message as V8.
+        if (state.switchU) {
+          state.raise("Invalid quantifier");
+        }
+      }
+      return true
+    }
+
+    if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {
+      this.regexp_eatQuantifier(state);
+      return true
+    }
+
+    return false
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion
+  pp$1.regexp_eatAssertion = function(state) {
+    var start = state.pos;
+    state.lastAssertionIsQuantifiable = false;
+
+    // ^, $
+    if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) {
+      return true
+    }
+
+    // \b \B
+    if (state.eat(0x5C /* \ */)) {
+      if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) {
+        return true
+      }
+      state.pos = start;
+    }
+
+    // Lookahead / Lookbehind
+    if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) {
+      var lookbehind = false;
+      if (this.options.ecmaVersion >= 9) {
+        lookbehind = state.eat(0x3C /* < */);
+      }
+      if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) {
+        this.regexp_disjunction(state);
+        if (!state.eat(0x29 /* ) */)) {
+          state.raise("Unterminated group");
+        }
+        state.lastAssertionIsQuantifiable = !lookbehind;
+        return true
+      }
+    }
+
+    state.pos = start;
+    return false
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier
+  pp$1.regexp_eatQuantifier = function(state, noError) {
+    if ( noError === void 0 ) noError = false;
+
+    if (this.regexp_eatQuantifierPrefix(state, noError)) {
+      state.eat(0x3F /* ? */);
+      return true
+    }
+    return false
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix
+  pp$1.regexp_eatQuantifierPrefix = function(state, noError) {
+    return (
+      state.eat(0x2A /* * */) ||
+      state.eat(0x2B /* + */) ||
+      state.eat(0x3F /* ? */) ||
+      this.regexp_eatBracedQuantifier(state, noError)
+    )
+  };
+  pp$1.regexp_eatBracedQuantifier = function(state, noError) {
+    var start = state.pos;
+    if (state.eat(0x7B /* { */)) {
+      var min = 0, max = -1;
+      if (this.regexp_eatDecimalDigits(state)) {
+        min = state.lastIntValue;
+        if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) {
+          max = state.lastIntValue;
+        }
+        if (state.eat(0x7D /* } */)) {
+          // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term
+          if (max !== -1 && max < min && !noError) {
+            state.raise("numbers out of order in {} quantifier");
+          }
+          return true
+        }
+      }
+      if (state.switchU && !noError) {
+        state.raise("Incomplete quantifier");
+      }
+      state.pos = start;
+    }
+    return false
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom
+  pp$1.regexp_eatAtom = function(state) {
+    return (
+      this.regexp_eatPatternCharacters(state) ||
+      state.eat(0x2E /* . */) ||
+      this.regexp_eatReverseSolidusAtomEscape(state) ||
+      this.regexp_eatCharacterClass(state) ||
+      this.regexp_eatUncapturingGroup(state) ||
+      this.regexp_eatCapturingGroup(state)
+    )
+  };
+  pp$1.regexp_eatReverseSolidusAtomEscape = function(state) {
+    var start = state.pos;
+    if (state.eat(0x5C /* \ */)) {
+      if (this.regexp_eatAtomEscape(state)) {
+        return true
+      }
+      state.pos = start;
+    }
+    return false
+  };
+  pp$1.regexp_eatUncapturingGroup = function(state) {
+    var start = state.pos;
+    if (state.eat(0x28 /* ( */)) {
+      if (state.eat(0x3F /* ? */)) {
+        if (this.options.ecmaVersion >= 16) {
+          var addModifiers = this.regexp_eatModifiers(state);
+          var hasHyphen = state.eat(0x2D /* - */);
+          if (addModifiers || hasHyphen) {
+            for (var i = 0; i < addModifiers.length; i++) {
+              var modifier = addModifiers.charAt(i);
+              if (addModifiers.indexOf(modifier, i + 1) > -1) {
+                state.raise("Duplicate regular expression modifiers");
+              }
+            }
+            if (hasHyphen) {
+              var removeModifiers = this.regexp_eatModifiers(state);
+              if (!addModifiers && !removeModifiers && state.current() === 0x3A /* : */) {
+                state.raise("Invalid regular expression modifiers");
+              }
+              for (var i$1 = 0; i$1 < removeModifiers.length; i$1++) {
+                var modifier$1 = removeModifiers.charAt(i$1);
+                if (
+                  removeModifiers.indexOf(modifier$1, i$1 + 1) > -1 ||
+                  addModifiers.indexOf(modifier$1) > -1
+                ) {
+                  state.raise("Duplicate regular expression modifiers");
+                }
+              }
+            }
+          }
+        }
+        if (state.eat(0x3A /* : */)) {
+          this.regexp_disjunction(state);
+          if (state.eat(0x29 /* ) */)) {
+            return true
+          }
+          state.raise("Unterminated group");
+        }
+      }
+      state.pos = start;
+    }
+    return false
+  };
+  pp$1.regexp_eatCapturingGroup = function(state) {
+    if (state.eat(0x28 /* ( */)) {
+      if (this.options.ecmaVersion >= 9) {
+        this.regexp_groupSpecifier(state);
+      } else if (state.current() === 0x3F /* ? */) {
+        state.raise("Invalid group");
+      }
+      this.regexp_disjunction(state);
+      if (state.eat(0x29 /* ) */)) {
+        state.numCapturingParens += 1;
+        return true
+      }
+      state.raise("Unterminated group");
+    }
+    return false
+  };
+  // RegularExpressionModifiers ::
+  //   [empty]
+  //   RegularExpressionModifiers RegularExpressionModifier
+  pp$1.regexp_eatModifiers = function(state) {
+    var modifiers = "";
+    var ch = 0;
+    while ((ch = state.current()) !== -1 && isRegularExpressionModifier(ch)) {
+      modifiers += codePointToString(ch);
+      state.advance();
+    }
+    return modifiers
+  };
+  // RegularExpressionModifier :: one of
+  //   `i` `m` `s`
+  function isRegularExpressionModifier(ch) {
+    return ch === 0x69 /* i */ || ch === 0x6d /* m */ || ch === 0x73 /* s */
+  }
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom
+  pp$1.regexp_eatExtendedAtom = function(state) {
+    return (
+      state.eat(0x2E /* . */) ||
+      this.regexp_eatReverseSolidusAtomEscape(state) ||
+      this.regexp_eatCharacterClass(state) ||
+      this.regexp_eatUncapturingGroup(state) ||
+      this.regexp_eatCapturingGroup(state) ||
+      this.regexp_eatInvalidBracedQuantifier(state) ||
+      this.regexp_eatExtendedPatternCharacter(state)
+    )
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier
+  pp$1.regexp_eatInvalidBracedQuantifier = function(state) {
+    if (this.regexp_eatBracedQuantifier(state, true)) {
+      state.raise("Nothing to repeat");
+    }
+    return false
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter
+  pp$1.regexp_eatSyntaxCharacter = function(state) {
+    var ch = state.current();
+    if (isSyntaxCharacter(ch)) {
+      state.lastIntValue = ch;
+      state.advance();
+      return true
+    }
+    return false
+  };
+  function isSyntaxCharacter(ch) {
+    return (
+      ch === 0x24 /* $ */ ||
+      ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ ||
+      ch === 0x2E /* . */ ||
+      ch === 0x3F /* ? */ ||
+      ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ ||
+      ch >= 0x7B /* { */ && ch <= 0x7D /* } */
+    )
+  }
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter
+  // But eat eager.
+  pp$1.regexp_eatPatternCharacters = function(state) {
+    var start = state.pos;
+    var ch = 0;
+    while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) {
+      state.advance();
+    }
+    return state.pos !== start
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter
+  pp$1.regexp_eatExtendedPatternCharacter = function(state) {
+    var ch = state.current();
+    if (
+      ch !== -1 &&
+      ch !== 0x24 /* $ */ &&
+      !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) &&
+      ch !== 0x2E /* . */ &&
+      ch !== 0x3F /* ? */ &&
+      ch !== 0x5B /* [ */ &&
+      ch !== 0x5E /* ^ */ &&
+      ch !== 0x7C /* | */
+    ) {
+      state.advance();
+      return true
+    }
+    return false
+  };
+
+  // GroupSpecifier ::
+  //   [empty]
+  //   `?` GroupName
+  pp$1.regexp_groupSpecifier = function(state) {
+    if (state.eat(0x3F /* ? */)) {
+      if (!this.regexp_eatGroupName(state)) { state.raise("Invalid group"); }
+      var trackDisjunction = this.options.ecmaVersion >= 16;
+      var known = state.groupNames[state.lastStringValue];
+      if (known) {
+        if (trackDisjunction) {
+          for (var i = 0, list = known; i < list.length; i += 1) {
+            var altID = list[i];
+
+            if (!altID.separatedFrom(state.branchID))
+              { state.raise("Duplicate capture group name"); }
+          }
+        } else {
+          state.raise("Duplicate capture group name");
+        }
+      }
+      if (trackDisjunction) {
+        (known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID);
+      } else {
+        state.groupNames[state.lastStringValue] = true;
+      }
+    }
+  };
+
+  // GroupName ::
+  //   `<` RegExpIdentifierName `>`
+  // Note: this updates `state.lastStringValue` property with the eaten name.
+  pp$1.regexp_eatGroupName = function(state) {
+    state.lastStringValue = "";
+    if (state.eat(0x3C /* < */)) {
+      if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) {
+        return true
+      }
+      state.raise("Invalid capture group name");
+    }
+    return false
+  };
+
+  // RegExpIdentifierName ::
+  //   RegExpIdentifierStart
+  //   RegExpIdentifierName RegExpIdentifierPart
+  // Note: this updates `state.lastStringValue` property with the eaten name.
+  pp$1.regexp_eatRegExpIdentifierName = function(state) {
+    state.lastStringValue = "";
+    if (this.regexp_eatRegExpIdentifierStart(state)) {
+      state.lastStringValue += codePointToString(state.lastIntValue);
+      while (this.regexp_eatRegExpIdentifierPart(state)) {
+        state.lastStringValue += codePointToString(state.lastIntValue);
+      }
+      return true
+    }
+    return false
+  };
+
+  // RegExpIdentifierStart ::
+  //   UnicodeIDStart
+  //   `$`
+  //   `_`
+  //   `\` RegExpUnicodeEscapeSequence[+U]
+  pp$1.regexp_eatRegExpIdentifierStart = function(state) {
+    var start = state.pos;
+    var forceU = this.options.ecmaVersion >= 11;
+    var ch = state.current(forceU);
+    state.advance(forceU);
+
+    if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
+      ch = state.lastIntValue;
+    }
+    if (isRegExpIdentifierStart(ch)) {
+      state.lastIntValue = ch;
+      return true
+    }
+
+    state.pos = start;
+    return false
+  };
+  function isRegExpIdentifierStart(ch) {
+    return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */
+  }
+
+  // RegExpIdentifierPart ::
+  //   UnicodeIDContinue
+  //   `$`
+  //   `_`
+  //   `\` RegExpUnicodeEscapeSequence[+U]
+  //   
+  //   
+  pp$1.regexp_eatRegExpIdentifierPart = function(state) {
+    var start = state.pos;
+    var forceU = this.options.ecmaVersion >= 11;
+    var ch = state.current(forceU);
+    state.advance(forceU);
+
+    if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
+      ch = state.lastIntValue;
+    }
+    if (isRegExpIdentifierPart(ch)) {
+      state.lastIntValue = ch;
+      return true
+    }
+
+    state.pos = start;
+    return false
+  };
+  function isRegExpIdentifierPart(ch) {
+    return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /*  */ || ch === 0x200D /*  */
+  }
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape
+  pp$1.regexp_eatAtomEscape = function(state) {
+    if (
+      this.regexp_eatBackReference(state) ||
+      this.regexp_eatCharacterClassEscape(state) ||
+      this.regexp_eatCharacterEscape(state) ||
+      (state.switchN && this.regexp_eatKGroupName(state))
+    ) {
+      return true
+    }
+    if (state.switchU) {
+      // Make the same message as V8.
+      if (state.current() === 0x63 /* c */) {
+        state.raise("Invalid unicode escape");
+      }
+      state.raise("Invalid escape");
+    }
+    return false
+  };
+  pp$1.regexp_eatBackReference = function(state) {
+    var start = state.pos;
+    if (this.regexp_eatDecimalEscape(state)) {
+      var n = state.lastIntValue;
+      if (state.switchU) {
+        // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape
+        if (n > state.maxBackReference) {
+          state.maxBackReference = n;
+        }
+        return true
+      }
+      if (n <= state.numCapturingParens) {
+        return true
+      }
+      state.pos = start;
+    }
+    return false
+  };
+  pp$1.regexp_eatKGroupName = function(state) {
+    if (state.eat(0x6B /* k */)) {
+      if (this.regexp_eatGroupName(state)) {
+        state.backReferenceNames.push(state.lastStringValue);
+        return true
+      }
+      state.raise("Invalid named reference");
+    }
+    return false
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape
+  pp$1.regexp_eatCharacterEscape = function(state) {
+    return (
+      this.regexp_eatControlEscape(state) ||
+      this.regexp_eatCControlLetter(state) ||
+      this.regexp_eatZero(state) ||
+      this.regexp_eatHexEscapeSequence(state) ||
+      this.regexp_eatRegExpUnicodeEscapeSequence(state, false) ||
+      (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) ||
+      this.regexp_eatIdentityEscape(state)
+    )
+  };
+  pp$1.regexp_eatCControlLetter = function(state) {
+    var start = state.pos;
+    if (state.eat(0x63 /* c */)) {
+      if (this.regexp_eatControlLetter(state)) {
+        return true
+      }
+      state.pos = start;
+    }
+    return false
+  };
+  pp$1.regexp_eatZero = function(state) {
+    if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) {
+      state.lastIntValue = 0;
+      state.advance();
+      return true
+    }
+    return false
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape
+  pp$1.regexp_eatControlEscape = function(state) {
+    var ch = state.current();
+    if (ch === 0x74 /* t */) {
+      state.lastIntValue = 0x09; /* \t */
+      state.advance();
+      return true
+    }
+    if (ch === 0x6E /* n */) {
+      state.lastIntValue = 0x0A; /* \n */
+      state.advance();
+      return true
+    }
+    if (ch === 0x76 /* v */) {
+      state.lastIntValue = 0x0B; /* \v */
+      state.advance();
+      return true
+    }
+    if (ch === 0x66 /* f */) {
+      state.lastIntValue = 0x0C; /* \f */
+      state.advance();
+      return true
+    }
+    if (ch === 0x72 /* r */) {
+      state.lastIntValue = 0x0D; /* \r */
+      state.advance();
+      return true
+    }
+    return false
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter
+  pp$1.regexp_eatControlLetter = function(state) {
+    var ch = state.current();
+    if (isControlLetter(ch)) {
+      state.lastIntValue = ch % 0x20;
+      state.advance();
+      return true
+    }
+    return false
+  };
+  function isControlLetter(ch) {
+    return (
+      (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) ||
+      (ch >= 0x61 /* a */ && ch <= 0x7A /* z */)
+    )
+  }
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence
+  pp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
+    if ( forceU === void 0 ) forceU = false;
+
+    var start = state.pos;
+    var switchU = forceU || state.switchU;
+
+    if (state.eat(0x75 /* u */)) {
+      if (this.regexp_eatFixedHexDigits(state, 4)) {
+        var lead = state.lastIntValue;
+        if (switchU && lead >= 0xD800 && lead <= 0xDBFF) {
+          var leadSurrogateEnd = state.pos;
+          if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) {
+            var trail = state.lastIntValue;
+            if (trail >= 0xDC00 && trail <= 0xDFFF) {
+              state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
+              return true
+            }
+          }
+          state.pos = leadSurrogateEnd;
+          state.lastIntValue = lead;
+        }
+        return true
+      }
+      if (
+        switchU &&
+        state.eat(0x7B /* { */) &&
+        this.regexp_eatHexDigits(state) &&
+        state.eat(0x7D /* } */) &&
+        isValidUnicode(state.lastIntValue)
+      ) {
+        return true
+      }
+      if (switchU) {
+        state.raise("Invalid unicode escape");
+      }
+      state.pos = start;
+    }
+
+    return false
+  };
+  function isValidUnicode(ch) {
+    return ch >= 0 && ch <= 0x10FFFF
+  }
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape
+  pp$1.regexp_eatIdentityEscape = function(state) {
+    if (state.switchU) {
+      if (this.regexp_eatSyntaxCharacter(state)) {
+        return true
+      }
+      if (state.eat(0x2F /* / */)) {
+        state.lastIntValue = 0x2F; /* / */
+        return true
+      }
+      return false
+    }
+
+    var ch = state.current();
+    if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) {
+      state.lastIntValue = ch;
+      state.advance();
+      return true
+    }
+
+    return false
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape
+  pp$1.regexp_eatDecimalEscape = function(state) {
+    state.lastIntValue = 0;
+    var ch = state.current();
+    if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) {
+      do {
+        state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */);
+        state.advance();
+      } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */)
+      return true
+    }
+    return false
+  };
+
+  // Return values used by character set parsing methods, needed to
+  // forbid negation of sets that can match strings.
+  var CharSetNone = 0; // Nothing parsed
+  var CharSetOk = 1; // Construct parsed, cannot contain strings
+  var CharSetString = 2; // Construct parsed, can contain strings
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape
+  pp$1.regexp_eatCharacterClassEscape = function(state) {
+    var ch = state.current();
+
+    if (isCharacterClassEscape(ch)) {
+      state.lastIntValue = -1;
+      state.advance();
+      return CharSetOk
+    }
+
+    var negate = false;
+    if (
+      state.switchU &&
+      this.options.ecmaVersion >= 9 &&
+      ((negate = ch === 0x50 /* P */) || ch === 0x70 /* p */)
+    ) {
+      state.lastIntValue = -1;
+      state.advance();
+      var result;
+      if (
+        state.eat(0x7B /* { */) &&
+        (result = this.regexp_eatUnicodePropertyValueExpression(state)) &&
+        state.eat(0x7D /* } */)
+      ) {
+        if (negate && result === CharSetString) { state.raise("Invalid property name"); }
+        return result
+      }
+      state.raise("Invalid property name");
+    }
+
+    return CharSetNone
+  };
+
+  function isCharacterClassEscape(ch) {
+    return (
+      ch === 0x64 /* d */ ||
+      ch === 0x44 /* D */ ||
+      ch === 0x73 /* s */ ||
+      ch === 0x53 /* S */ ||
+      ch === 0x77 /* w */ ||
+      ch === 0x57 /* W */
+    )
+  }
+
+  // UnicodePropertyValueExpression ::
+  //   UnicodePropertyName `=` UnicodePropertyValue
+  //   LoneUnicodePropertyNameOrValue
+  pp$1.regexp_eatUnicodePropertyValueExpression = function(state) {
+    var start = state.pos;
+
+    // UnicodePropertyName `=` UnicodePropertyValue
+    if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) {
+      var name = state.lastStringValue;
+      if (this.regexp_eatUnicodePropertyValue(state)) {
+        var value = state.lastStringValue;
+        this.regexp_validateUnicodePropertyNameAndValue(state, name, value);
+        return CharSetOk
+      }
+    }
+    state.pos = start;
+
+    // LoneUnicodePropertyNameOrValue
+    if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
+      var nameOrValue = state.lastStringValue;
+      return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue)
+    }
+    return CharSetNone
+  };
+
+  pp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) {
+    if (!hasOwn(state.unicodeProperties.nonBinary, name))
+      { state.raise("Invalid property name"); }
+    if (!state.unicodeProperties.nonBinary[name].test(value))
+      { state.raise("Invalid property value"); }
+  };
+
+  pp$1.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
+    if (state.unicodeProperties.binary.test(nameOrValue)) { return CharSetOk }
+    if (state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue)) { return CharSetString }
+    state.raise("Invalid property name");
+  };
+
+  // UnicodePropertyName ::
+  //   UnicodePropertyNameCharacters
+  pp$1.regexp_eatUnicodePropertyName = function(state) {
+    var ch = 0;
+    state.lastStringValue = "";
+    while (isUnicodePropertyNameCharacter(ch = state.current())) {
+      state.lastStringValue += codePointToString(ch);
+      state.advance();
+    }
+    return state.lastStringValue !== ""
+  };
+
+  function isUnicodePropertyNameCharacter(ch) {
+    return isControlLetter(ch) || ch === 0x5F /* _ */
+  }
+
+  // UnicodePropertyValue ::
+  //   UnicodePropertyValueCharacters
+  pp$1.regexp_eatUnicodePropertyValue = function(state) {
+    var ch = 0;
+    state.lastStringValue = "";
+    while (isUnicodePropertyValueCharacter(ch = state.current())) {
+      state.lastStringValue += codePointToString(ch);
+      state.advance();
+    }
+    return state.lastStringValue !== ""
+  };
+  function isUnicodePropertyValueCharacter(ch) {
+    return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch)
+  }
+
+  // LoneUnicodePropertyNameOrValue ::
+  //   UnicodePropertyValueCharacters
+  pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
+    return this.regexp_eatUnicodePropertyValue(state)
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass
+  pp$1.regexp_eatCharacterClass = function(state) {
+    if (state.eat(0x5B /* [ */)) {
+      var negate = state.eat(0x5E /* ^ */);
+      var result = this.regexp_classContents(state);
+      if (!state.eat(0x5D /* ] */))
+        { state.raise("Unterminated character class"); }
+      if (negate && result === CharSetString)
+        { state.raise("Negated character class may contain strings"); }
+      return true
+    }
+    return false
+  };
+
+  // https://tc39.es/ecma262/#prod-ClassContents
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges
+  pp$1.regexp_classContents = function(state) {
+    if (state.current() === 0x5D /* ] */) { return CharSetOk }
+    if (state.switchV) { return this.regexp_classSetExpression(state) }
+    this.regexp_nonEmptyClassRanges(state);
+    return CharSetOk
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash
+  pp$1.regexp_nonEmptyClassRanges = function(state) {
+    while (this.regexp_eatClassAtom(state)) {
+      var left = state.lastIntValue;
+      if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) {
+        var right = state.lastIntValue;
+        if (state.switchU && (left === -1 || right === -1)) {
+          state.raise("Invalid character class");
+        }
+        if (left !== -1 && right !== -1 && left > right) {
+          state.raise("Range out of order in character class");
+        }
+      }
+    }
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash
+  pp$1.regexp_eatClassAtom = function(state) {
+    var start = state.pos;
+
+    if (state.eat(0x5C /* \ */)) {
+      if (this.regexp_eatClassEscape(state)) {
+        return true
+      }
+      if (state.switchU) {
+        // Make the same message as V8.
+        var ch$1 = state.current();
+        if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) {
+          state.raise("Invalid class escape");
+        }
+        state.raise("Invalid escape");
+      }
+      state.pos = start;
+    }
+
+    var ch = state.current();
+    if (ch !== 0x5D /* ] */) {
+      state.lastIntValue = ch;
+      state.advance();
+      return true
+    }
+
+    return false
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape
+  pp$1.regexp_eatClassEscape = function(state) {
+    var start = state.pos;
+
+    if (state.eat(0x62 /* b */)) {
+      state.lastIntValue = 0x08; /*  */
+      return true
+    }
+
+    if (state.switchU && state.eat(0x2D /* - */)) {
+      state.lastIntValue = 0x2D; /* - */
+      return true
+    }
+
+    if (!state.switchU && state.eat(0x63 /* c */)) {
+      if (this.regexp_eatClassControlLetter(state)) {
+        return true
+      }
+      state.pos = start;
+    }
+
+    return (
+      this.regexp_eatCharacterClassEscape(state) ||
+      this.regexp_eatCharacterEscape(state)
+    )
+  };
+
+  // https://tc39.es/ecma262/#prod-ClassSetExpression
+  // https://tc39.es/ecma262/#prod-ClassUnion
+  // https://tc39.es/ecma262/#prod-ClassIntersection
+  // https://tc39.es/ecma262/#prod-ClassSubtraction
+  pp$1.regexp_classSetExpression = function(state) {
+    var result = CharSetOk, subResult;
+    if (this.regexp_eatClassSetRange(state)) ; else if (subResult = this.regexp_eatClassSetOperand(state)) {
+      if (subResult === CharSetString) { result = CharSetString; }
+      // https://tc39.es/ecma262/#prod-ClassIntersection
+      var start = state.pos;
+      while (state.eatChars([0x26, 0x26] /* && */)) {
+        if (
+          state.current() !== 0x26 /* & */ &&
+          (subResult = this.regexp_eatClassSetOperand(state))
+        ) {
+          if (subResult !== CharSetString) { result = CharSetOk; }
+          continue
+        }
+        state.raise("Invalid character in character class");
+      }
+      if (start !== state.pos) { return result }
+      // https://tc39.es/ecma262/#prod-ClassSubtraction
+      while (state.eatChars([0x2D, 0x2D] /* -- */)) {
+        if (this.regexp_eatClassSetOperand(state)) { continue }
+        state.raise("Invalid character in character class");
+      }
+      if (start !== state.pos) { return result }
+    } else {
+      state.raise("Invalid character in character class");
+    }
+    // https://tc39.es/ecma262/#prod-ClassUnion
+    for (;;) {
+      if (this.regexp_eatClassSetRange(state)) { continue }
+      subResult = this.regexp_eatClassSetOperand(state);
+      if (!subResult) { return result }
+      if (subResult === CharSetString) { result = CharSetString; }
+    }
+  };
+
+  // https://tc39.es/ecma262/#prod-ClassSetRange
+  pp$1.regexp_eatClassSetRange = function(state) {
+    var start = state.pos;
+    if (this.regexp_eatClassSetCharacter(state)) {
+      var left = state.lastIntValue;
+      if (state.eat(0x2D /* - */) && this.regexp_eatClassSetCharacter(state)) {
+        var right = state.lastIntValue;
+        if (left !== -1 && right !== -1 && left > right) {
+          state.raise("Range out of order in character class");
+        }
+        return true
+      }
+      state.pos = start;
+    }
+    return false
+  };
+
+  // https://tc39.es/ecma262/#prod-ClassSetOperand
+  pp$1.regexp_eatClassSetOperand = function(state) {
+    if (this.regexp_eatClassSetCharacter(state)) { return CharSetOk }
+    return this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state)
+  };
+
+  // https://tc39.es/ecma262/#prod-NestedClass
+  pp$1.regexp_eatNestedClass = function(state) {
+    var start = state.pos;
+    if (state.eat(0x5B /* [ */)) {
+      var negate = state.eat(0x5E /* ^ */);
+      var result = this.regexp_classContents(state);
+      if (state.eat(0x5D /* ] */)) {
+        if (negate && result === CharSetString) {
+          state.raise("Negated character class may contain strings");
+        }
+        return result
+      }
+      state.pos = start;
+    }
+    if (state.eat(0x5C /* \ */)) {
+      var result$1 = this.regexp_eatCharacterClassEscape(state);
+      if (result$1) {
+        return result$1
+      }
+      state.pos = start;
+    }
+    return null
+  };
+
+  // https://tc39.es/ecma262/#prod-ClassStringDisjunction
+  pp$1.regexp_eatClassStringDisjunction = function(state) {
+    var start = state.pos;
+    if (state.eatChars([0x5C, 0x71] /* \q */)) {
+      if (state.eat(0x7B /* { */)) {
+        var result = this.regexp_classStringDisjunctionContents(state);
+        if (state.eat(0x7D /* } */)) {
+          return result
+        }
+      } else {
+        // Make the same message as V8.
+        state.raise("Invalid escape");
+      }
+      state.pos = start;
+    }
+    return null
+  };
+
+  // https://tc39.es/ecma262/#prod-ClassStringDisjunctionContents
+  pp$1.regexp_classStringDisjunctionContents = function(state) {
+    var result = this.regexp_classString(state);
+    while (state.eat(0x7C /* | */)) {
+      if (this.regexp_classString(state) === CharSetString) { result = CharSetString; }
+    }
+    return result
+  };
+
+  // https://tc39.es/ecma262/#prod-ClassString
+  // https://tc39.es/ecma262/#prod-NonEmptyClassString
+  pp$1.regexp_classString = function(state) {
+    var count = 0;
+    while (this.regexp_eatClassSetCharacter(state)) { count++; }
+    return count === 1 ? CharSetOk : CharSetString
+  };
+
+  // https://tc39.es/ecma262/#prod-ClassSetCharacter
+  pp$1.regexp_eatClassSetCharacter = function(state) {
+    var start = state.pos;
+    if (state.eat(0x5C /* \ */)) {
+      if (
+        this.regexp_eatCharacterEscape(state) ||
+        this.regexp_eatClassSetReservedPunctuator(state)
+      ) {
+        return true
+      }
+      if (state.eat(0x62 /* b */)) {
+        state.lastIntValue = 0x08; /*  */
+        return true
+      }
+      state.pos = start;
+      return false
+    }
+    var ch = state.current();
+    if (ch < 0 || ch === state.lookahead() && isClassSetReservedDoublePunctuatorCharacter(ch)) { return false }
+    if (isClassSetSyntaxCharacter(ch)) { return false }
+    state.advance();
+    state.lastIntValue = ch;
+    return true
+  };
+
+  // https://tc39.es/ecma262/#prod-ClassSetReservedDoublePunctuator
+  function isClassSetReservedDoublePunctuatorCharacter(ch) {
+    return (
+      ch === 0x21 /* ! */ ||
+      ch >= 0x23 /* # */ && ch <= 0x26 /* & */ ||
+      ch >= 0x2A /* * */ && ch <= 0x2C /* , */ ||
+      ch === 0x2E /* . */ ||
+      ch >= 0x3A /* : */ && ch <= 0x40 /* @ */ ||
+      ch === 0x5E /* ^ */ ||
+      ch === 0x60 /* ` */ ||
+      ch === 0x7E /* ~ */
+    )
+  }
+
+  // https://tc39.es/ecma262/#prod-ClassSetSyntaxCharacter
+  function isClassSetSyntaxCharacter(ch) {
+    return (
+      ch === 0x28 /* ( */ ||
+      ch === 0x29 /* ) */ ||
+      ch === 0x2D /* - */ ||
+      ch === 0x2F /* / */ ||
+      ch >= 0x5B /* [ */ && ch <= 0x5D /* ] */ ||
+      ch >= 0x7B /* { */ && ch <= 0x7D /* } */
+    )
+  }
+
+  // https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator
+  pp$1.regexp_eatClassSetReservedPunctuator = function(state) {
+    var ch = state.current();
+    if (isClassSetReservedPunctuator(ch)) {
+      state.lastIntValue = ch;
+      state.advance();
+      return true
+    }
+    return false
+  };
+
+  // https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator
+  function isClassSetReservedPunctuator(ch) {
+    return (
+      ch === 0x21 /* ! */ ||
+      ch === 0x23 /* # */ ||
+      ch === 0x25 /* % */ ||
+      ch === 0x26 /* & */ ||
+      ch === 0x2C /* , */ ||
+      ch === 0x2D /* - */ ||
+      ch >= 0x3A /* : */ && ch <= 0x3E /* > */ ||
+      ch === 0x40 /* @ */ ||
+      ch === 0x60 /* ` */ ||
+      ch === 0x7E /* ~ */
+    )
+  }
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter
+  pp$1.regexp_eatClassControlLetter = function(state) {
+    var ch = state.current();
+    if (isDecimalDigit(ch) || ch === 0x5F /* _ */) {
+      state.lastIntValue = ch % 0x20;
+      state.advance();
+      return true
+    }
+    return false
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence
+  pp$1.regexp_eatHexEscapeSequence = function(state) {
+    var start = state.pos;
+    if (state.eat(0x78 /* x */)) {
+      if (this.regexp_eatFixedHexDigits(state, 2)) {
+        return true
+      }
+      if (state.switchU) {
+        state.raise("Invalid escape");
+      }
+      state.pos = start;
+    }
+    return false
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits
+  pp$1.regexp_eatDecimalDigits = function(state) {
+    var start = state.pos;
+    var ch = 0;
+    state.lastIntValue = 0;
+    while (isDecimalDigit(ch = state.current())) {
+      state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */);
+      state.advance();
+    }
+    return state.pos !== start
+  };
+  function isDecimalDigit(ch) {
+    return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */
+  }
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits
+  pp$1.regexp_eatHexDigits = function(state) {
+    var start = state.pos;
+    var ch = 0;
+    state.lastIntValue = 0;
+    while (isHexDigit(ch = state.current())) {
+      state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
+      state.advance();
+    }
+    return state.pos !== start
+  };
+  function isHexDigit(ch) {
+    return (
+      (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) ||
+      (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) ||
+      (ch >= 0x61 /* a */ && ch <= 0x66 /* f */)
+    )
+  }
+  function hexToInt(ch) {
+    if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) {
+      return 10 + (ch - 0x41 /* A */)
+    }
+    if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) {
+      return 10 + (ch - 0x61 /* a */)
+    }
+    return ch - 0x30 /* 0 */
+  }
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence
+  // Allows only 0-377(octal) i.e. 0-255(decimal).
+  pp$1.regexp_eatLegacyOctalEscapeSequence = function(state) {
+    if (this.regexp_eatOctalDigit(state)) {
+      var n1 = state.lastIntValue;
+      if (this.regexp_eatOctalDigit(state)) {
+        var n2 = state.lastIntValue;
+        if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {
+          state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;
+        } else {
+          state.lastIntValue = n1 * 8 + n2;
+        }
+      } else {
+        state.lastIntValue = n1;
+      }
+      return true
+    }
+    return false
+  };
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit
+  pp$1.regexp_eatOctalDigit = function(state) {
+    var ch = state.current();
+    if (isOctalDigit(ch)) {
+      state.lastIntValue = ch - 0x30; /* 0 */
+      state.advance();
+      return true
+    }
+    state.lastIntValue = 0;
+    return false
+  };
+  function isOctalDigit(ch) {
+    return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */
+  }
+
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits
+  // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit
+  // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence
+  pp$1.regexp_eatFixedHexDigits = function(state, length) {
+    var start = state.pos;
+    state.lastIntValue = 0;
+    for (var i = 0; i < length; ++i) {
+      var ch = state.current();
+      if (!isHexDigit(ch)) {
+        state.pos = start;
+        return false
+      }
+      state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
+      state.advance();
+    }
+    return true
+  };
+
+  // Object type used to represent tokens. Note that normally, tokens
+  // simply exist as properties on the parser object. This is only
+  // used for the onToken callback and the external tokenizer.
+
+  var Token = function Token(p) {
+    this.type = p.type;
+    this.value = p.value;
+    this.start = p.start;
+    this.end = p.end;
+    if (p.options.locations)
+      { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); }
+    if (p.options.ranges)
+      { this.range = [p.start, p.end]; }
+  };
+
+  // ## Tokenizer
+
+  var pp = Parser.prototype;
+
+  // Move to the next token
+
+  pp.next = function(ignoreEscapeSequenceInKeyword) {
+    if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc)
+      { this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword); }
+    if (this.options.onToken)
+      { this.options.onToken(new Token(this)); }
+
+    this.lastTokEnd = this.end;
+    this.lastTokStart = this.start;
+    this.lastTokEndLoc = this.endLoc;
+    this.lastTokStartLoc = this.startLoc;
+    this.nextToken();
+  };
+
+  pp.getToken = function() {
+    this.next();
+    return new Token(this)
+  };
+
+  // If we're in an ES6 environment, make parsers iterable
+  if (typeof Symbol !== "undefined")
+    { pp[Symbol.iterator] = function() {
+      var this$1$1 = this;
+
+      return {
+        next: function () {
+          var token = this$1$1.getToken();
+          return {
+            done: token.type === types$1.eof,
+            value: token
+          }
+        }
+      }
+    }; }
+
+  // Toggle strict mode. Re-reads the next number or string to please
+  // pedantic tests (`"use strict"; 010;` should fail).
+
+  // Read a single token, updating the parser object's token-related
+  // properties.
+
+  pp.nextToken = function() {
+    var curContext = this.curContext();
+    if (!curContext || !curContext.preserveSpace) { this.skipSpace(); }
+
+    this.start = this.pos;
+    if (this.options.locations) { this.startLoc = this.curPosition(); }
+    if (this.pos >= this.input.length) { return this.finishToken(types$1.eof) }
+
+    if (curContext.override) { return curContext.override(this) }
+    else { this.readToken(this.fullCharCodeAtPos()); }
+  };
+
+  pp.readToken = function(code) {
+    // Identifier or keyword. '\uXXXX' sequences are allowed in
+    // identifiers, so '\' also dispatches to that.
+    if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */)
+      { return this.readWord() }
+
+    return this.getTokenFromCode(code)
+  };
+
+  pp.fullCharCodeAtPos = function() {
+    var code = this.input.charCodeAt(this.pos);
+    if (code <= 0xd7ff || code >= 0xdc00) { return code }
+    var next = this.input.charCodeAt(this.pos + 1);
+    return next <= 0xdbff || next >= 0xe000 ? code : (code << 10) + next - 0x35fdc00
+  };
+
+  pp.skipBlockComment = function() {
+    var startLoc = this.options.onComment && this.curPosition();
+    var start = this.pos, end = this.input.indexOf("*/", this.pos += 2);
+    if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); }
+    this.pos = end + 2;
+    if (this.options.locations) {
+      for (var nextBreak = (void 0), pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1;) {
+        ++this.curLine;
+        pos = this.lineStart = nextBreak;
+      }
+    }
+    if (this.options.onComment)
+      { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos,
+                             startLoc, this.curPosition()); }
+  };
+
+  pp.skipLineComment = function(startSkip) {
+    var start = this.pos;
+    var startLoc = this.options.onComment && this.curPosition();
+    var ch = this.input.charCodeAt(this.pos += startSkip);
+    while (this.pos < this.input.length && !isNewLine(ch)) {
+      ch = this.input.charCodeAt(++this.pos);
+    }
+    if (this.options.onComment)
+      { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,
+                             startLoc, this.curPosition()); }
+  };
+
+  // Called at the start of the parse and after every token. Skips
+  // whitespace and comments, and.
+
+  pp.skipSpace = function() {
+    loop: while (this.pos < this.input.length) {
+      var ch = this.input.charCodeAt(this.pos);
+      switch (ch) {
+      case 32: case 160: // ' '
+        ++this.pos;
+        break
+      case 13:
+        if (this.input.charCodeAt(this.pos + 1) === 10) {
+          ++this.pos;
+        }
+      case 10: case 8232: case 8233:
+        ++this.pos;
+        if (this.options.locations) {
+          ++this.curLine;
+          this.lineStart = this.pos;
+        }
+        break
+      case 47: // '/'
+        switch (this.input.charCodeAt(this.pos + 1)) {
+        case 42: // '*'
+          this.skipBlockComment();
+          break
+        case 47:
+          this.skipLineComment(2);
+          break
+        default:
+          break loop
+        }
+        break
+      default:
+        if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
+          ++this.pos;
+        } else {
+          break loop
+        }
+      }
+    }
+  };
+
+  // Called at the end of every token. Sets `end`, `val`, and
+  // maintains `context` and `exprAllowed`, and skips the space after
+  // the token, so that the next one's `start` will point at the
+  // right position.
+
+  pp.finishToken = function(type, val) {
+    this.end = this.pos;
+    if (this.options.locations) { this.endLoc = this.curPosition(); }
+    var prevType = this.type;
+    this.type = type;
+    this.value = val;
+
+    this.updateContext(prevType);
+  };
+
+  // ### Token reading
+
+  // This is the function that is called to fetch the next token. It
+  // is somewhat obscure, because it works in character codes rather
+  // than characters, and because operator parsing has been inlined
+  // into it.
+  //
+  // All in the name of speed.
+  //
+  pp.readToken_dot = function() {
+    var next = this.input.charCodeAt(this.pos + 1);
+    if (next >= 48 && next <= 57) { return this.readNumber(true) }
+    var next2 = this.input.charCodeAt(this.pos + 2);
+    if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.'
+      this.pos += 3;
+      return this.finishToken(types$1.ellipsis)
+    } else {
+      ++this.pos;
+      return this.finishToken(types$1.dot)
+    }
+  };
+
+  pp.readToken_slash = function() { // '/'
+    var next = this.input.charCodeAt(this.pos + 1);
+    if (this.exprAllowed) { ++this.pos; return this.readRegexp() }
+    if (next === 61) { return this.finishOp(types$1.assign, 2) }
+    return this.finishOp(types$1.slash, 1)
+  };
+
+  pp.readToken_mult_modulo_exp = function(code) { // '%*'
+    var next = this.input.charCodeAt(this.pos + 1);
+    var size = 1;
+    var tokentype = code === 42 ? types$1.star : types$1.modulo;
+
+    // exponentiation operator ** and **=
+    if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) {
+      ++size;
+      tokentype = types$1.starstar;
+      next = this.input.charCodeAt(this.pos + 2);
+    }
+
+    if (next === 61) { return this.finishOp(types$1.assign, size + 1) }
+    return this.finishOp(tokentype, size)
+  };
+
+  pp.readToken_pipe_amp = function(code) { // '|&'
+    var next = this.input.charCodeAt(this.pos + 1);
+    if (next === code) {
+      if (this.options.ecmaVersion >= 12) {
+        var next2 = this.input.charCodeAt(this.pos + 2);
+        if (next2 === 61) { return this.finishOp(types$1.assign, 3) }
+      }
+      return this.finishOp(code === 124 ? types$1.logicalOR : types$1.logicalAND, 2)
+    }
+    if (next === 61) { return this.finishOp(types$1.assign, 2) }
+    return this.finishOp(code === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1)
+  };
+
+  pp.readToken_caret = function() { // '^'
+    var next = this.input.charCodeAt(this.pos + 1);
+    if (next === 61) { return this.finishOp(types$1.assign, 2) }
+    return this.finishOp(types$1.bitwiseXOR, 1)
+  };
+
+  pp.readToken_plus_min = function(code) { // '+-'
+    var next = this.input.charCodeAt(this.pos + 1);
+    if (next === code) {
+      if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 &&
+          (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {
+        // A `-->` line comment
+        this.skipLineComment(3);
+        this.skipSpace();
+        return this.nextToken()
+      }
+      return this.finishOp(types$1.incDec, 2)
+    }
+    if (next === 61) { return this.finishOp(types$1.assign, 2) }
+    return this.finishOp(types$1.plusMin, 1)
+  };
+
+  pp.readToken_lt_gt = function(code) { // '<>'
+    var next = this.input.charCodeAt(this.pos + 1);
+    var size = 1;
+    if (next === code) {
+      size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
+      if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1) }
+      return this.finishOp(types$1.bitShift, size)
+    }
+    if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&
+        this.input.charCodeAt(this.pos + 3) === 45) {
+      // `` line comment
+      this.skipLineComment(3);
+      this.skipSpace();
+      return this.nextToken()
+    }
+    return this.finishOp(types$1.incDec, 2)
+  }
+  if (next === 61) { return this.finishOp(types$1.assign, 2) }
+  return this.finishOp(types$1.plusMin, 1)
+};
+
+pp.readToken_lt_gt = function(code) { // '<>'
+  var next = this.input.charCodeAt(this.pos + 1);
+  var size = 1;
+  if (next === code) {
+    size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
+    if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1) }
+    return this.finishOp(types$1.bitShift, size)
+  }
+  if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&
+      this.input.charCodeAt(this.pos + 3) === 45) {
+    // `'.",
+      expectedAfterExceptionBlock: 'Expected line break after exception block.',
+      expectedBeforeExceptionBlock:
+        'Expected line break before exception block.',
+      unexpectedAfterHTMLCommentOpen: "Unexpected line breaks after ''."
+    }
+  },
+  /** @param {RuleContext} context */
+  create(context) {
+    const option = parseOption(context.options[0])
+    return htmlComments.defineVisitor(
+      context,
+      context.options[1],
+      (comment) => {
+        const { value, openDecoration, closeDecoration } = comment
+        if (!value) {
+          return
+        }
+
+        const startLine = openDecoration
+          ? openDecoration.loc.end.line
+          : value.loc.start.line
+        const endLine = closeDecoration
+          ? closeDecoration.loc.start.line
+          : value.loc.end.line
+        const newlineType =
+          startLine === endLine ? option.singleline : option.multiline
+        if (newlineType === 'ignore') {
+          return
+        }
+        checkCommentOpen(comment, newlineType !== 'never')
+        checkCommentClose(comment, newlineType !== 'never')
+      }
+    )
+
+    /**
+     * Reports the newline before the contents of a given comment if it's invalid.
+     * @param {ParsedHTMLComment} comment - comment data.
+     * @param {boolean} requireNewline - `true` if line breaks are required.
+     * @returns {void}
+     */
+    function checkCommentOpen(comment, requireNewline) {
+      const { value, openDecoration, open } = comment
+      if (!value) {
+        return
+      }
+      const beforeToken = openDecoration || open
+
+      if (requireNewline) {
+        if (beforeToken.loc.end.line < value.loc.start.line) {
+          // Is valid
+          return
+        }
+        context.report({
+          loc: {
+            start: beforeToken.loc.end,
+            end: value.loc.start
+          },
+          messageId: openDecoration
+            ? 'expectedAfterExceptionBlock'
+            : 'expectedAfterHTMLCommentOpen',
+          fix: openDecoration
+            ? undefined
+            : (fixer) => fixer.insertTextAfter(beforeToken, '\n')
+        })
+      } else {
+        if (beforeToken.loc.end.line === value.loc.start.line) {
+          // Is valid
+          return
+        }
+        context.report({
+          loc: {
+            start: beforeToken.loc.end,
+            end: value.loc.start
+          },
+          messageId: 'unexpectedAfterHTMLCommentOpen',
+          fix: (fixer) =>
+            fixer.replaceTextRange([beforeToken.range[1], value.range[0]], ' ')
+        })
+      }
+    }
+
+    /**
+     * Reports the space after the contents of a given comment if it's invalid.
+     * @param {ParsedHTMLComment} comment - comment data.
+     * @param {boolean} requireNewline - `true` if line breaks are required.
+     * @returns {void}
+     */
+    function checkCommentClose(comment, requireNewline) {
+      const { value, closeDecoration, close } = comment
+      if (!value) {
+        return
+      }
+      const afterToken = closeDecoration || close
+
+      if (requireNewline) {
+        if (value.loc.end.line < afterToken.loc.start.line) {
+          // Is valid
+          return
+        }
+        context.report({
+          loc: {
+            start: value.loc.end,
+            end: afterToken.loc.start
+          },
+          messageId: closeDecoration
+            ? 'expectedBeforeExceptionBlock'
+            : 'expectedBeforeHTMLCommentOpen',
+          fix: closeDecoration
+            ? undefined
+            : (fixer) => fixer.insertTextBefore(afterToken, '\n')
+        })
+      } else {
+        if (value.loc.end.line === afterToken.loc.start.line) {
+          // Is valid
+          return
+        }
+        context.report({
+          loc: {
+            start: value.loc.end,
+            end: afterToken.loc.start
+          },
+          messageId: 'unexpectedBeforeHTMLCommentOpen',
+          fix: (fixer) =>
+            fixer.replaceTextRange([value.range[1], afterToken.range[0]], ' ')
+        })
+      }
+    }
+  }
+}
diff --git a/slider/node_modules/eslint-plugin-vue/lib/rules/html-comment-content-spacing.js b/slider/node_modules/eslint-plugin-vue/lib/rules/html-comment-content-spacing.js
new file mode 100644
index 0000000..365f885
--- /dev/null
+++ b/slider/node_modules/eslint-plugin-vue/lib/rules/html-comment-content-spacing.js
@@ -0,0 +1,171 @@
+/**
+ * @author Yosuke ota
+ * See LICENSE file in root directory for full license.
+ */
+'use strict'
+
+const htmlComments = require('../utils/html-comments')
+
+/**
+ * @typedef { import('../utils/html-comments').ParsedHTMLComment } ParsedHTMLComment
+ */
+
+module.exports = {
+  meta: {
+    type: 'layout',
+
+    docs: {
+      description: 'enforce unified spacing in HTML comments',
+      categories: undefined,
+      url: 'https://eslint.vuejs.org/rules/html-comment-content-spacing.html'
+    },
+    fixable: 'whitespace',
+    schema: [
+      {
+        enum: ['always', 'never']
+      },
+      {
+        type: 'object',
+        properties: {
+          exceptions: {
+            type: 'array',
+            items: {
+              type: 'string'
+            }
+          }
+        },
+        additionalProperties: false
+      }
+    ],
+    messages: {
+      expectedAfterHTMLCommentOpen: "Expected space after ''.",
+      expectedAfterExceptionBlock: 'Expected space after exception block.',
+      expectedBeforeExceptionBlock: 'Expected space before exception block.',
+      unexpectedAfterHTMLCommentOpen: "Unexpected space after ''."
+    }
+  },
+  /** @param {RuleContext} context */
+  create(context) {
+    // Unless the first option is never, require a space
+    const requireSpace = context.options[0] !== 'never'
+    return htmlComments.defineVisitor(
+      context,
+      context.options[1],
+      (comment) => {
+        checkCommentOpen(comment)
+        checkCommentClose(comment)
+      },
+      { includeDirectives: true }
+    )
+
+    /**
+     * Reports the space before the contents of a given comment if it's invalid.
+     * @param {ParsedHTMLComment} comment - comment data.
+     * @returns {void}
+     */
+    function checkCommentOpen(comment) {
+      const { value, openDecoration, open } = comment
+      if (!value) {
+        return
+      }
+      const beforeToken = openDecoration || open
+      if (beforeToken.loc.end.line !== value.loc.start.line) {
+        // Ignore newline
+        return
+      }
+
+      if (requireSpace) {
+        if (beforeToken.range[1] < value.range[0]) {
+          // Is valid
+          return
+        }
+        context.report({
+          loc: {
+            start: beforeToken.loc.end,
+            end: value.loc.start
+          },
+          messageId: openDecoration
+            ? 'expectedAfterExceptionBlock'
+            : 'expectedAfterHTMLCommentOpen',
+          fix: openDecoration
+            ? undefined
+            : (fixer) => fixer.insertTextAfter(beforeToken, ' ')
+        })
+      } else {
+        if (openDecoration) {
+          // Ignore expection block
+          return
+        }
+        if (beforeToken.range[1] === value.range[0]) {
+          // Is valid
+          return
+        }
+        context.report({
+          loc: {
+            start: beforeToken.loc.end,
+            end: value.loc.start
+          },
+          messageId: 'unexpectedAfterHTMLCommentOpen',
+          fix: (fixer) =>
+            fixer.removeRange([beforeToken.range[1], value.range[0]])
+        })
+      }
+    }
+
+    /**
+     * Reports the space after the contents of a given comment if it's invalid.
+     * @param {ParsedHTMLComment} comment - comment data.
+     * @returns {void}
+     */
+    function checkCommentClose(comment) {
+      const { value, closeDecoration, close } = comment
+      if (!value) {
+        return
+      }
+      const afterToken = closeDecoration || close
+      if (value.loc.end.line !== afterToken.loc.start.line) {
+        // Ignore newline
+        return
+      }
+
+      if (requireSpace) {
+        if (value.range[1] < afterToken.range[0]) {
+          // Is valid
+          return
+        }
+        context.report({
+          loc: {
+            start: value.loc.end,
+            end: afterToken.loc.start
+          },
+          messageId: closeDecoration
+            ? 'expectedBeforeExceptionBlock'
+            : 'expectedBeforeHTMLCommentOpen',
+          fix: closeDecoration
+            ? undefined
+            : (fixer) => fixer.insertTextBefore(afterToken, ' ')
+        })
+      } else {
+        if (closeDecoration) {
+          // Ignore expection block
+          return
+        }
+        if (value.range[1] === afterToken.range[0]) {
+          // Is valid
+          return
+        }
+        context.report({
+          loc: {
+            start: value.loc.end,
+            end: afterToken.loc.start
+          },
+          messageId: 'unexpectedBeforeHTMLCommentOpen',
+          fix: (fixer) =>
+            fixer.removeRange([value.range[1], afterToken.range[0]])
+        })
+      }
+    }
+  }
+}
diff --git a/slider/node_modules/eslint-plugin-vue/lib/rules/html-comment-indent.js b/slider/node_modules/eslint-plugin-vue/lib/rules/html-comment-indent.js
new file mode 100644
index 0000000..bce935a
--- /dev/null
+++ b/slider/node_modules/eslint-plugin-vue/lib/rules/html-comment-indent.js
@@ -0,0 +1,244 @@
+/**
+ * @author Yosuke ota
+ * See LICENSE file in root directory for full license.
+ */
+'use strict'
+
+const htmlComments = require('../utils/html-comments')
+
+/**
+ * Normalize options.
+ * @param {number|"tab"|undefined} type The type of indentation.
+ * @returns { { indentChar: string, indentSize: number, indentText: string } } Normalized options.
+ */
+function parseOptions(type) {
+  const ret = {
+    indentChar: ' ',
+    indentSize: 2,
+    indentText: ''
+  }
+
+  if (Number.isSafeInteger(type)) {
+    ret.indentSize = Number(type)
+  } else if (type === 'tab') {
+    ret.indentChar = '\t'
+    ret.indentSize = 1
+  }
+  ret.indentText = ret.indentChar.repeat(ret.indentSize)
+
+  return ret
+}
+
+/**
+ * @param {string} s
+ * @param {string} [unitChar]
+ */
+function toDisplay(s, unitChar) {
+  if (s.length === 0 && unitChar) {
+    return `0 ${toUnit(unitChar)}s`
+  }
+  const char = s[0]
+  if ((char === ' ' || char === '\t') && [...s].every((c) => c === char)) {
+    return `${s.length} ${toUnit(char)}${s.length === 1 ? '' : 's'}`
+  }
+
+  return JSON.stringify(s)
+}
+
+/** @param {string} char */
+function toUnit(char) {
+  if (char === '\t') {
+    return 'tab'
+  }
+  if (char === ' ') {
+    return 'space'
+  }
+  return JSON.stringify(char)
+}
+
+module.exports = {
+  meta: {
+    type: 'layout',
+
+    docs: {
+      description: 'enforce consistent indentation in HTML comments',
+      categories: undefined,
+      url: 'https://eslint.vuejs.org/rules/html-comment-indent.html'
+    },
+    fixable: 'whitespace',
+    schema: [
+      {
+        oneOf: [{ type: 'integer', minimum: 0 }, { enum: ['tab'] }]
+      }
+    ],
+    messages: {
+      unexpectedBaseIndentation:
+        'Expected base point indentation of {{expected}}, but found {{actual}}.',
+      missingBaseIndentation:
+        'Expected base point indentation of {{expected}}, but not found.',
+      unexpectedIndentationCharacter:
+        'Expected {{expected}} character, but found {{actual}} character.',
+      unexpectedIndentation:
+        'Expected indentation of {{expected}} but found {{actual}}.',
+      unexpectedRelativeIndentation:
+        'Expected relative indentation of {{expected}} but found {{actual}}.'
+    }
+  },
+  /** @param {RuleContext} context */
+  create(context) {
+    const options = parseOptions(context.options[0])
+    const sourceCode = context.getSourceCode()
+    return htmlComments.defineVisitor(
+      context,
+      null,
+      (comment) => {
+        const baseIndentText = getLineIndentText(comment.open.loc.start.line)
+        let endLine
+        if (comment.value) {
+          const startLine = comment.value.loc.start.line
+          endLine = comment.value.loc.end.line
+
+          const checkStartLine =
+            comment.open.loc.end.line === startLine ? startLine + 1 : startLine
+
+          for (let line = checkStartLine; line <= endLine; line++) {
+            validateIndentForLine(line, baseIndentText, 1)
+          }
+        } else {
+          endLine = comment.open.loc.end.line
+        }
+
+        if (endLine < comment.close.loc.start.line) {
+          // `-->`
+          validateIndentForLine(comment.close.loc.start.line, baseIndentText, 0)
+        }
+      },
+      { includeDirectives: true }
+    )
+
+    /**
+     * Checks whether the given line is a blank line.
+     * @param {number} line The number of line. Begins with 1.
+     * @returns {boolean} `true` if the given line is a blank line
+     */
+    function isEmptyLine(line) {
+      const lineText = sourceCode.getLines()[line - 1]
+      return !lineText.trim()
+    }
+
+    /**
+     * Get the actual indentation of the given line.
+     * @param {number} line The number of line. Begins with 1.
+     * @returns {string} The actual indentation text
+     */
+    function getLineIndentText(line) {
+      const lineText = sourceCode.getLines()[line - 1]
+      const charIndex = lineText.search(/\S/)
+      // already checked
+      // if (charIndex < 0) {
+      //   return lineText
+      // }
+      return lineText.slice(0, charIndex)
+    }
+
+    /**
+     * Define the function which fixes the problem.
+     * @param {number} line The number of line.
+     * @param {string} actualIndentText The actual indentation text.
+     * @param {string} expectedIndentText The expected indentation text.
+     * @returns { (fixer: RuleFixer) => Fix } The defined function.
+     */
+    function defineFix(line, actualIndentText, expectedIndentText) {
+      return (fixer) => {
+        const start = sourceCode.getIndexFromLoc({
+          line,
+          column: 0
+        })
+        return fixer.replaceTextRange(
+          [start, start + actualIndentText.length],
+          expectedIndentText
+        )
+      }
+    }
+
+    /**
+     * Validate the indentation of a line.
+     * @param {number} line The number of line. Begins with 1.
+     * @param {string} baseIndentText The expected base indentation text.
+     * @param {number} offset The number of the indentation offset.
+     */
+    function validateIndentForLine(line, baseIndentText, offset) {
+      if (isEmptyLine(line)) {
+        return
+      }
+      const actualIndentText = getLineIndentText(line)
+
+      const expectedOffsetIndentText = options.indentText.repeat(offset)
+      const expectedIndentText = baseIndentText + expectedOffsetIndentText
+
+      // validate base indent
+      if (
+        baseIndentText &&
+        (actualIndentText.length < baseIndentText.length ||
+          !actualIndentText.startsWith(baseIndentText))
+      ) {
+        context.report({
+          loc: {
+            start: { line, column: 0 },
+            end: { line, column: actualIndentText.length }
+          },
+          messageId: actualIndentText
+            ? 'unexpectedBaseIndentation'
+            : 'missingBaseIndentation',
+          data: {
+            expected: toDisplay(baseIndentText),
+            actual: toDisplay(actualIndentText.slice(0, baseIndentText.length))
+          },
+          fix: defineFix(line, actualIndentText, expectedIndentText)
+        })
+        return
+      }
+
+      const actualOffsetIndentText = actualIndentText.slice(
+        baseIndentText.length
+      )
+
+      // validate indent charctor
+      for (const [i, char] of [...actualOffsetIndentText].entries()) {
+        if (char !== options.indentChar) {
+          context.report({
+            loc: {
+              start: { line, column: baseIndentText.length + i },
+              end: { line, column: baseIndentText.length + i + 1 }
+            },
+            messageId: 'unexpectedIndentationCharacter',
+            data: {
+              expected: toUnit(options.indentChar),
+              actual: toUnit(char)
+            },
+            fix: defineFix(line, actualIndentText, expectedIndentText)
+          })
+          return
+        }
+      }
+
+      // validate indent length
+      if (actualOffsetIndentText.length !== expectedOffsetIndentText.length) {
+        context.report({
+          loc: {
+            start: { line, column: baseIndentText.length },
+            end: { line, column: actualIndentText.length }
+          },
+          messageId: baseIndentText
+            ? 'unexpectedRelativeIndentation'
+            : 'unexpectedIndentation',
+          data: {
+            expected: toDisplay(expectedOffsetIndentText, options.indentChar),
+            actual: toDisplay(actualOffsetIndentText, options.indentChar)
+          },
+          fix: defineFix(line, actualIndentText, expectedIndentText)
+        })
+      }
+    }
+  }
+}
diff --git a/slider/node_modules/eslint-plugin-vue/lib/rules/html-end-tags.js b/slider/node_modules/eslint-plugin-vue/lib/rules/html-end-tags.js
new file mode 100644
index 0000000..6856145
--- /dev/null
+++ b/slider/node_modules/eslint-plugin-vue/lib/rules/html-end-tags.js
@@ -0,0 +1,59 @@
+/**
+ * @author Toru Nagashima
+ * @copyright 2017 Toru Nagashima. All rights reserved.
+ * See LICENSE file in root directory for full license.
+ */
+'use strict'
+
+const utils = require('../utils')
+
+module.exports = {
+  meta: {
+    type: 'suggestion',
+    docs: {
+      description: 'enforce end tag style',
+      categories: ['vue3-strongly-recommended', 'vue2-strongly-recommended'],
+      url: 'https://eslint.vuejs.org/rules/html-end-tags.html'
+    },
+    fixable: 'code',
+    schema: [],
+    messages: {
+      missingEndTag: "'<{{name}}>' should have end tag."
+    }
+  },
+  /** @param {RuleContext} context */
+  create(context) {
+    let hasInvalidEOF = false
+
+    return utils.defineTemplateBodyVisitor(
+      context,
+      {
+        VElement(node) {
+          if (hasInvalidEOF) {
+            return
+          }
+
+          const name = node.name
+          const isVoid = utils.isHtmlVoidElementName(name)
+          const isSelfClosing = node.startTag.selfClosing
+          const hasEndTag = node.endTag != null
+
+          if (!isVoid && !hasEndTag && !isSelfClosing) {
+            context.report({
+              node: node.startTag,
+              loc: node.startTag.loc,
+              messageId: 'missingEndTag',
+              data: { name },
+              fix: (fixer) => fixer.insertTextAfter(node, ``)
+            })
+          }
+        }
+      },
+      {
+        Program(node) {
+          hasInvalidEOF = utils.hasInvalidEOF(node)
+        }
+      }
+    )
+  }
+}
diff --git a/slider/node_modules/eslint-plugin-vue/lib/rules/html-indent.js b/slider/node_modules/eslint-plugin-vue/lib/rules/html-indent.js
new file mode 100644
index 0000000..7639797
--- /dev/null
+++ b/slider/node_modules/eslint-plugin-vue/lib/rules/html-indent.js
@@ -0,0 +1,76 @@
+/**
+ * @author Toru Nagashima
+ * @copyright 2016 Toru Nagashima. All rights reserved.
+ * See LICENSE file in root directory for full license.
+ */
+'use strict'
+
+const indentCommon = require('../utils/indent-common')
+const utils = require('../utils')
+
+module.exports = {
+  /** @param {RuleContext} context */
+  create(context) {
+    const sourceCode = context.getSourceCode()
+    const tokenStore =
+      sourceCode.parserServices.getTemplateBodyTokenStore &&
+      sourceCode.parserServices.getTemplateBodyTokenStore()
+    const visitor = indentCommon.defineVisitor(context, tokenStore, {
+      baseIndent: 1
+    })
+
+    return utils.defineTemplateBodyVisitor(context, visitor)
+  },
+  // eslint-disable-next-line eslint-plugin/prefer-message-ids
+  meta: {
+    type: 'layout',
+    docs: {
+      description: 'enforce consistent indentation in `