From 5f1d7fed2ae4ed55fc7b9f9a6f735839d424ef48 Mon Sep 17 00:00:00 2001 From: Jorge Ezequiel Fabbroni Assum Date: Fri, 20 Dec 2024 12:04:24 -0300 Subject: [PATCH] add vite to transpile to es,cjs --- configs/{es6 => }/base.js | 17 +- configs/{es6 => }/best-practices.js | 0 configs/commonjs/base.cjs | 65 ----- configs/commonjs/best-practices.cjs | 344 ---------------------- configs/commonjs/errors.cjs | 122 -------- configs/commonjs/es6.cjs | 180 ------------ configs/commonjs/formats.cjs | 6 - configs/commonjs/imports.cjs | 278 ------------------ configs/commonjs/jest.cjs | 9 - configs/commonjs/lodash.cjs | 9 - configs/commonjs/node.cjs | 40 --- configs/commonjs/postcss.cjs | 7 - configs/commonjs/promises.cjs | 18 -- configs/commonjs/react-a11y.cjs | 230 --------------- configs/commonjs/react.cjs | 432 ---------------------------- configs/commonjs/storybook.cjs | 7 - configs/commonjs/strict.cjs | 7 - configs/commonjs/style.cjs | 319 -------------------- configs/commonjs/ts.cjs | 162 ----------- configs/commonjs/utils.cjs | 11 - configs/commonjs/variables.cjs | 53 ---- configs/{es6 => }/errors.js | 0 configs/{es6 => }/es6.js | 0 configs/{es6 => }/formats.js | 0 configs/{es6 => }/imports.js | 0 configs/{es6 => }/jest.js | 0 configs/{es6 => }/lodash.js | 0 configs/{es6 => }/node.js | 0 configs/{es6 => }/postcss.js | 0 configs/{es6 => }/promises.js | 0 configs/{es6 => }/react-a11y.js | 0 configs/{es6 => }/react.js | 0 configs/{es6 => }/storybook.js | 0 configs/{es6 => }/strict.js | 0 configs/{es6 => }/style.js | 0 configs/{es6 => }/ts.js | 0 configs/{es6 => }/utils.js | 0 configs/{es6 => }/variables.js | 0 eslint.config.cjs | 3 - eslint.config.js | 6 +- package.json | 9 +- recommended.cjs | 5 - recommended.js | 2 +- vite.config.js | 33 +++ yarn.lock | 343 +++++++++++++++++++++- 45 files changed, 391 insertions(+), 2326 deletions(-) rename configs/{es6 => }/base.js (80%) rename configs/{es6 => }/best-practices.js (100%) delete mode 100644 configs/commonjs/base.cjs delete mode 100644 configs/commonjs/best-practices.cjs delete mode 100644 configs/commonjs/errors.cjs delete mode 100644 configs/commonjs/es6.cjs delete mode 100644 configs/commonjs/formats.cjs delete mode 100644 configs/commonjs/imports.cjs delete mode 100644 configs/commonjs/jest.cjs delete mode 100644 configs/commonjs/lodash.cjs delete mode 100644 configs/commonjs/node.cjs delete mode 100644 configs/commonjs/postcss.cjs delete mode 100644 configs/commonjs/promises.cjs delete mode 100644 configs/commonjs/react-a11y.cjs delete mode 100644 configs/commonjs/react.cjs delete mode 100644 configs/commonjs/storybook.cjs delete mode 100644 configs/commonjs/strict.cjs delete mode 100644 configs/commonjs/style.cjs delete mode 100644 configs/commonjs/ts.cjs delete mode 100644 configs/commonjs/utils.cjs delete mode 100644 configs/commonjs/variables.cjs rename configs/{es6 => }/errors.js (100%) rename configs/{es6 => }/es6.js (100%) rename configs/{es6 => }/formats.js (100%) rename configs/{es6 => }/imports.js (100%) rename configs/{es6 => }/jest.js (100%) rename configs/{es6 => }/lodash.js (100%) rename configs/{es6 => }/node.js (100%) rename configs/{es6 => }/postcss.js (100%) rename configs/{es6 => }/promises.js (100%) rename configs/{es6 => }/react-a11y.js (100%) rename configs/{es6 => }/react.js (100%) rename configs/{es6 => }/storybook.js (100%) rename configs/{es6 => }/strict.js (100%) rename configs/{es6 => }/style.js (100%) rename configs/{es6 => }/ts.js (100%) rename configs/{es6 => }/utils.js (100%) rename configs/{es6 => }/variables.js (100%) delete mode 100644 eslint.config.cjs delete mode 100644 recommended.cjs create mode 100644 vite.config.js diff --git a/configs/es6/base.js b/configs/base.js similarity index 80% rename from configs/es6/base.js rename to configs/base.js index add59a3..153c990 100644 --- a/configs/es6/base.js +++ b/configs/base.js @@ -19,13 +19,18 @@ import style from './style.js'; import { isPackageAvailable } from './utils.js'; import variables from './variables.js'; -const isTSAvailable = await isPackageAvailable('typescript'); +let isTSAvailable = false; +let isJestAvailable = false; let tsConfigs = []; -if (isTSAvailable) { - const { tsLintConfig } = await import('./ts.js'); - tsConfigs = tsLintConfig; -} -const isJestAvailable = await isPackageAvailable('jest'); + +(async () => { + isTSAvailable = await isPackageAvailable('typescript'); + isJestAvailable = await isPackageAvailable('jest'); + if (isTSAvailable) { + const { tsLintConfig } = await import('./ts.js'); + tsConfigs = tsLintConfig; + } +})(); const configs = [ bestPractices, diff --git a/configs/es6/best-practices.js b/configs/best-practices.js similarity index 100% rename from configs/es6/best-practices.js rename to configs/best-practices.js diff --git a/configs/commonjs/base.cjs b/configs/commonjs/base.cjs deleted file mode 100644 index b3eda77..0000000 --- a/configs/commonjs/base.cjs +++ /dev/null @@ -1,65 +0,0 @@ -const globals = require('globals'); -const { isPackageAvailable } = require('./utils.cjs'); -const bestPractices = require('./best-practices.cjs'); -const errors = require('./errors.cjs'); -const es6 = require('./es6.cjs'); -const formats = require('./formats.cjs'); -const imports = require('./imports.cjs'); -const jest = require('./jest.cjs'); -const lodash = require('./lodash.cjs'); -const node = require('./node.cjs'); -const postcss = require('./postcss.cjs'); -const promises = require('./promises.cjs'); -const react = require('./react.cjs'); -const reactA11y = require('./react-a11y.cjs'); -const storybook = require('./storybook.cjs'); -const strict = require('./strict.cjs'); -const style = require('./style.cjs'); -const variables = require('./variables.cjs'); - -const isTSAvailable = isPackageAvailable('typescript'); -let tsConfigs = []; -if (isTSAvailable) { - // eslint-disable-next-line global-require - const { tsLintConfig } = require('./ts.cjs'); - tsConfigs = tsLintConfig; -} -const isJestAvailable = isPackageAvailable('jest'); - -const configs = [ - bestPractices, - errors, - es6, - ...imports, - node, - promises, - strict, - style, - variables, - react, - lodash, - reactA11y, - formats, - storybook, - postcss, - isJestAvailable && jest, -].filter(Boolean); - -module.exports = [ - ...configs, - { - name: 'base-cabify-eslint-config', - languageOptions: { - ecmaVersion: 2022, - sourceType: 'module', - globals: { - ...globals.browser, - ...globals.node, - }, - }, - rules: { - strict: 'error', - }, - }, - ...tsConfigs, -]; diff --git a/configs/commonjs/best-practices.cjs b/configs/commonjs/best-practices.cjs deleted file mode 100644 index e5e43b2..0000000 --- a/configs/commonjs/best-practices.cjs +++ /dev/null @@ -1,344 +0,0 @@ -module.exports = { - name: 'best-practices-cabify-eslint-config', - rules: { - // enforces getter/setter pairs in objects - 'accessor-pairs': 'off', - - // enforces return statements in callbacks of array's methods - // https://eslint.org/docs/rules/array-callback-return - 'array-callback-return': ['error', { allowImplicit: true }], - - // treat var statements as if they were block scoped - 'block-scoped-var': 'error', - - // specify the maximum cyclomatic complexity allowed in a program - complexity: ['off', 11], - - // enforce that class methods use "this" - // https://eslint.org/docs/rules/class-methods-use-this - 'class-methods-use-this': 'off', - - // require return statements to either always or never specify values - 'consistent-return': 'error', - - // require default case in switch statements - 'default-case': ['error', { commentPattern: '^no default$' }], - - // encourages use of dot notation whenever possible - 'dot-notation': ['error', { allowKeywords: true }], - - // require the use of === and !== - // https://eslint.org/docs/rules/eqeqeq - eqeqeq: ['error', 'always', { null: 'ignore' }], - - // make sure for-in loops have an if statement - 'guard-for-in': 'error', - - // enforce a maximum number of classes per file - // https://eslint.org/docs/rules/max-classes-per-file - // TODO: semver-major (eslint 5): enable - 'max-classes-per-file': ['off', 1], - - // disallow the use of alert, confirm, and prompt - 'no-alert': 'warn', - - // disallow use of arguments.caller or arguments.callee - 'no-caller': 'error', - - // disallow lexical declarations in case/default clauses - // https://eslint.org/docs/rules/no-case-declarations.html - 'no-case-declarations': 'error', - - // disallow division operators explicitly at beginning of regular expression - // https://eslint.org/docs/rules/no-div-regex - 'no-div-regex': 'off', - - // disallow else after a return in an if - // https://eslint.org/docs/rules/no-else-return - 'no-else-return': ['error', { allowElseIf: false }], - - // disallow empty functions, except for standalone funcs/arrows - // https://eslint.org/docs/rules/no-empty-function - 'no-empty-function': [ - 'error', - { - allow: ['arrowFunctions', 'functions', 'methods'], - }, - ], - - // disallow empty destructuring patterns - // https://eslint.org/docs/rules/no-empty-pattern - 'no-empty-pattern': 'error', - - // disallow comparisons to null without a type-checking operator - 'no-eq-null': 'off', - - // disallow use of eval() - 'no-eval': 'error', - - // disallow adding to native types - 'no-extend-native': 'error', - - // disallow unnecessary function binding - 'no-extra-bind': 'error', - - // disallow Unnecessary Labels - // https://eslint.org/docs/rules/no-extra-label - 'no-extra-label': 'error', - - // disallow fallthrough of case statements - 'no-fallthrough': 'error', - - // disallow the use of leading or trailing decimal points in numeric literals - 'no-floating-decimal': 'error', - - // disallow reassignments of native objects or read-only globals - // https://eslint.org/docs/rules/no-global-assign - 'no-global-assign': ['error', { exceptions: [] }], - // deprecated in favor of no-global-assign - 'no-native-reassign': 'off', - - // disallow implicit type conversions - // https://eslint.org/docs/rules/no-implicit-coercion - 'no-implicit-coercion': [ - 'off', - { - boolean: false, - number: true, - string: true, - allow: [], - }, - ], - - // disallow var and named functions in global scope - // https://eslint.org/docs/rules/no-implicit-globals - 'no-implicit-globals': 'off', - - // disallow use of eval()-like methods - 'no-implied-eval': 'error', - - // disallow this keywords outside of classes or class-like objects - 'no-invalid-this': 'off', - - // disallow usage of __iterator__ property - 'no-iterator': 'error', - - // disallow use of labels for anything other then loops and switches - 'no-labels': ['error', { allowLoop: false, allowSwitch: false }], - - // disallow unnecessary nested blocks - 'no-lone-blocks': 'error', - - // disallow creation of functions within loops - 'no-loop-func': 'error', - - // disallow magic numbers - // https://eslint.org/docs/rules/no-magic-numbers - 'no-magic-numbers': [ - 'off', - { - ignore: [], - ignoreArrayIndexes: true, - enforceConst: true, - detectObjects: false, - }, - ], - - // disallow use of multiline strings - 'no-multi-str': 'error', - - // disallow use of new operator when not part of the assignment or comparison - 'no-new': 'error', - - // disallow use of new operator for Function object - 'no-new-func': 'error', - - // disallows creating new instances of String, Number, and Boolean - 'no-new-wrappers': 'error', - - // disallow use of (old style) octal literals - 'no-octal': 'error', - - // disallow use of octal escape sequences in string literals, such as - // var foo = 'Copyright \251'; - 'no-octal-escape': 'error', - - // disallow reassignment of function parameters - // disallow parameter object manipulation except for specific exclusions - // rule: https://eslint.org/docs/rules/no-param-reassign.html - 'no-param-reassign': [ - 'error', - { - props: true, - ignorePropertyModificationsFor: [ - 'acc', // for reduce accumulators - 'accumulator', // for reduce accumulators - 'e', // for e.returnvalue - 'ctx', // for Koa routing - 'req', // for Express requests - 'request', // for Express requests - 'res', // for Express responses - 'response', // for Express responses - '$scope', // for Angular 1 scopes - ], - }, - ], - - // disallow usage of __proto__ property - 'no-proto': 'error', - - // disallow declaring the same variable more then once - 'no-redeclare': 'error', - - // disallow certain object properties - // https://eslint.org/docs/rules/no-restricted-properties - 'no-restricted-properties': [ - 'error', - { - object: 'arguments', - property: 'callee', - message: 'arguments.callee is deprecated', - }, - { - object: 'global', - property: 'isFinite', - message: 'Please use Number.isFinite instead', - }, - { - object: 'self', - property: 'isFinite', - message: 'Please use Number.isFinite instead', - }, - { - object: 'window', - property: 'isFinite', - message: 'Please use Number.isFinite instead', - }, - { - object: 'global', - property: 'isNaN', - message: 'Please use Number.isNaN instead', - }, - { - object: 'self', - property: 'isNaN', - message: 'Please use Number.isNaN instead', - }, - { - object: 'window', - property: 'isNaN', - message: 'Please use Number.isNaN instead', - }, - { - property: '__defineGetter__', - message: 'Please use Object.defineProperty instead.', - }, - { - property: '__defineSetter__', - message: 'Please use Object.defineProperty instead.', - }, - { - object: 'Math', - property: 'pow', - message: 'Use the exponentiation operator (**) instead.', - }, - ], - - // disallow use of assignment in return statement - 'no-return-assign': ['error', 'always'], - - // disallow use of `javascript:` urls. - 'no-script-url': 'error', - - // disallow self assignment - // https://eslint.org/docs/rules/no-self-assign - // TODO: semver-major: props -> true - 'no-self-assign': [ - 'error', - { - props: false, - }, - ], - - // disallow comparisons where both sides are exactly the same - 'no-self-compare': 'error', - - // disallow use of comma operator - 'no-sequences': 'error', - - // restrict what can be thrown as an exception - 'no-throw-literal': 'error', - - // disallow unmodified conditions of loops - // https://eslint.org/docs/rules/no-unmodified-loop-condition - 'no-unmodified-loop-condition': 'off', - - // disallow usage of expressions in statement position - 'no-unused-expressions': [ - 'error', - { - allowShortCircuit: false, - allowTernary: false, - allowTaggedTemplates: false, - }, - ], - - // disallow unused labels - // https://eslint.org/docs/rules/no-unused-labels - 'no-unused-labels': 'error', - - // disallow unnecessary .call() and .apply() - 'no-useless-call': 'off', - - // Disallow unnecessary catch clauses - // https://eslint.org/docs/rules/no-useless-catch - // TODO: enable, semver-major - 'no-useless-catch': 'off', - - // disallow useless string concatenation - // https://eslint.org/docs/rules/no-useless-concat - 'no-useless-concat': 'error', - - // disallow unnecessary string escaping - // https://eslint.org/docs/rules/no-useless-escape - 'no-useless-escape': 'error', - - // disallow redundant return; keywords - // https://eslint.org/docs/rules/no-useless-return - 'no-useless-return': 'error', - - // disallow use of void operator - // https://eslint.org/docs/rules/no-void - 'no-void': 'error', - - // disallow usage of configurable warning terms in comments: e.g. todo - 'no-warning-comments': [ - 'off', - { terms: ['todo', 'fixme', 'xxx'], location: 'start' }, - ], - - // disallow use of the with statement - 'no-with': 'error', - - // require using Error objects as Promise rejection reasons - // https://eslint.org/docs/rules/prefer-promise-reject-errors - 'prefer-promise-reject-errors': ['error', { allowEmptyReject: true }], - - // require use of the second argument for parseInt() - radix: 'error', - - // Enforce the use of u flag on RegExp - // https://eslint.org/docs/rules/require-unicode-regexp - 'require-unicode-regexp': 'off', - - // requires to declare all vars on top of their containing scope - 'vars-on-top': 'error', - - // require immediate function invocation to be wrapped in parentheses - // https://eslint.org/docs/rules/wrap-iife.html - 'wrap-iife': ['error', 'outside', { functionPrototypeMethods: false }], - - // require or disallow Yoda conditions - yoda: 'error', - }, -}; diff --git a/configs/commonjs/errors.cjs b/configs/commonjs/errors.cjs deleted file mode 100644 index ec59c68..0000000 --- a/configs/commonjs/errors.cjs +++ /dev/null @@ -1,122 +0,0 @@ -module.exports = { - name: 'errors-cabify-eslint-config', - rules: { - // Enforce “for” loop update clause moving the counter in the right direction - // https://eslint.org/docs/rules/for-direction - 'for-direction': 'error', - - // Enforces that a return statement is present in property getters - // https://eslint.org/docs/rules/getter-return - 'getter-return': ['error', { allowImplicit: true }], - - // Disallow await inside of loops - // https://eslint.org/docs/rules/no-await-in-loop - 'no-await-in-loop': 'error', - - // Disallow comparisons to negative zero - // https://eslint.org/docs/rules/no-compare-neg-zero - 'no-compare-neg-zero': 'error', - - // disallow assignment in conditional expressions - 'no-cond-assign': ['error', 'always'], - - // disallow use of console - 'no-console': 'warn', - - // disallow use of constant expressions in conditions - 'no-constant-condition': 'warn', - - // disallow control characters in regular expressions - 'no-control-regex': 'error', - - // disallow use of debugger - 'no-debugger': 'error', - - // disallow duplicate arguments in functions - 'no-dupe-args': 'error', - - // disallow duplicate keys when creating object literals - 'no-dupe-keys': 'error', - - // disallow a duplicate case label. - 'no-duplicate-case': 'error', - - // disallow empty statements - 'no-empty': 'error', - - // disallow the use of empty character classes in regular expressions - 'no-empty-character-class': 'error', - - // disallow assigning to the exception in a catch block - 'no-ex-assign': 'error', - - // disallow double-negation boolean casts in a boolean context - // https://eslint.org/docs/rules/no-extra-boolean-cast - 'no-extra-boolean-cast': 'off', - - // disallow overwriting functions written as function declarations - 'no-func-assign': 'error', - - // disallow function or variable declarations in nested blocks - 'no-inner-declarations': 'error', - - // disallow invalid regular expression strings in the RegExp constructor - 'no-invalid-regexp': 'error', - - // Disallow characters which are made with multiple code points in character class syntax - // https://eslint.org/docs/rules/no-misleading-character-class - // TODO: enable, semver-major - 'no-misleading-character-class': 'off', - - // disallow the use of object properties of the global object (Math and JSON) as functions - 'no-obj-calls': 'error', - - // disallow use of Object.prototypes builtins directly - // https://eslint.org/docs/rules/no-prototype-builtins - 'no-prototype-builtins': 'error', - - // disallow multiple spaces in a regular expression literal - 'no-regex-spaces': 'error', - - // disallow sparse arrays - 'no-sparse-arrays': 'error', - - // Disallow template literal placeholder syntax in regular strings - // https://eslint.org/docs/rules/no-template-curly-in-string - 'no-template-curly-in-string': 'error', - - // Avoid code that looks like two expressions but is actually one - // https://eslint.org/docs/rules/no-unexpected-multiline - 'no-unexpected-multiline': 'error', - - // disallow unreachable statements after a return, throw, continue, or break statement - 'no-unreachable': 'error', - - // disallow return/throw/break/continue inside finally blocks - // https://eslint.org/docs/rules/no-unsafe-finally - 'no-unsafe-finally': 'error', - - // disallow negating the left operand of relational operators - // https://eslint.org/docs/rules/no-unsafe-negation - 'no-unsafe-negation': 'error', - // disallow negation of the left operand of an in expression - // deprecated in favor of no-unsafe-negation - 'no-negated-in-lhs': 'off', - - // Disallow assignments that can lead to race conditions due to usage of await or yield - // https://eslint.org/docs/rules/require-atomic-updates - // TODO: enable, semver-major - 'require-atomic-updates': 'off', - - // disallow comparisons with the value NaN - 'use-isnan': 'error', - - // ensure JSDoc comments are valid - // https://eslint.org/docs/rules/valid-jsdoc - 'valid-jsdoc': 'off', - - // ensure that the results of typeof are compared against a valid string - // https://eslint.org/docs/rules/valid-typeof - 'valid-typeof': ['error', { requireStringLiterals: true }], - }, -}; diff --git a/configs/commonjs/es6.cjs b/configs/commonjs/es6.cjs deleted file mode 100644 index 0a259b9..0000000 --- a/configs/commonjs/es6.cjs +++ /dev/null @@ -1,180 +0,0 @@ -const globals = require('globals'); - -module.exports = { - name: 'ES6-cabify-eslint-config', - languageOptions: { - ecmaVersion: 6, - sourceType: 'module', - globals: { - ...globals.es2015, - }, - parserOptions: { - ecmaFeatures: { - generators: false, - objectLiteralDuplicateProperties: false, - }, - }, - }, - - rules: { - // verify super() callings in constructors - 'constructor-super': 'error', - - // enforce the spacing around the * in generator functions - // https://eslint.org/docs/rules/generator-star-spacing - 'generator-star-spacing': ['error', { before: false, after: true }], - - // disallow modifying variables of class declarations - // https://eslint.org/docs/rules/no-class-assign - 'no-class-assign': 'error', - - // disallow arrow functions where they could be confused with comparisons - // https://eslint.org/docs/rules/no-confusing-arrow - 'no-confusing-arrow': [ - 'error', - { - allowParens: true, - }, - ], - - // disallow modifying variables that are declared using const - 'no-const-assign': 'error', - - // disallow duplicate class members - // https://eslint.org/docs/rules/no-dupe-class-members - 'no-dupe-class-members': 'error', - - // disallow importing from the same path more than once - // https://eslint.org/docs/rules/no-duplicate-imports - // replaced by https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md - 'no-duplicate-imports': 'off', - - // disallow symbol constructor - // https://eslint.org/docs/rules/no-new-symbol - 'no-new-symbol': 'error', - - // disallow specific imports - // https://eslint.org/docs/rules/no-restricted-imports - 'no-restricted-imports': [ - 'off', - { - paths: [], - patterns: [], - }, - ], - - // disallow to use this/super before super() calling in constructors. - // https://eslint.org/docs/rules/no-this-before-super - 'no-this-before-super': 'error', - - // disallow useless computed property keys - // https://eslint.org/docs/rules/no-useless-computed-key - 'no-useless-computed-key': 'error', - - // disallow unnecessary constructor - // https://eslint.org/docs/rules/no-useless-constructor - 'no-useless-constructor': 'error', - - // disallow renaming import, export, and destructured assignments to the same name - // https://eslint.org/docs/rules/no-useless-rename - 'no-useless-rename': [ - 'error', - { - ignoreDestructuring: false, - ignoreImport: false, - ignoreExport: false, - }, - ], - - // require let or const instead of var - 'no-var': 'error', - - // require method and property shorthand syntax for object literals - // https://eslint.org/docs/rules/object-shorthand - 'object-shorthand': [ - 'error', - 'always', - { - ignoreConstructors: false, - avoidQuotes: true, - }, - ], - - // suggest using arrow functions as callbacks - 'prefer-arrow-callback': [ - 'error', - { - allowNamedFunctions: false, - allowUnboundThis: true, - }, - ], - - // suggest using of const declaration for variables that are never modified after declared - 'prefer-const': [ - 'error', - { - destructuring: 'any', - ignoreReadBeforeAssign: true, - }, - ], - - // Prefer destructuring from arrays and objects - // https://eslint.org/docs/rules/prefer-destructuring - 'prefer-destructuring': [ - 'error', - { - VariableDeclarator: { - array: false, - object: true, - }, - AssignmentExpression: { - array: true, - object: true, - }, - }, - { - enforceForRenamedProperties: false, - }, - ], - - // disallow parseInt() in favor of binary, octal, and hexadecimal literals - // https://eslint.org/docs/rules/prefer-numeric-literals - 'prefer-numeric-literals': 'error', - - // suggest using Reflect methods where applicable - // https://eslint.org/docs/rules/prefer-reflect - 'prefer-reflect': 'off', - - // use rest parameters instead of arguments - // https://eslint.org/docs/rules/prefer-rest-params - 'prefer-rest-params': 'error', - - // suggest using the spread operator instead of .apply() - // https://eslint.org/docs/rules/prefer-spread - 'prefer-spread': 'error', - - // suggest using template literals instead of string concatenation - // https://eslint.org/docs/rules/prefer-template - 'prefer-template': 'error', - - // disallow generator functions that do not have yield - // https://eslint.org/docs/rules/require-yield - 'require-yield': 'error', - - // import sorting - // https://eslint.org/docs/rules/sort-imports - // replaced by 'imports' rules - 'sort-imports': [ - 'off', - { - ignoreCase: false, - ignoreMemberSort: false, - memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], - }, - ], - - // require a Symbol description - // https://eslint.org/docs/rules/symbol-description - 'symbol-description': 'error', - }, -}; diff --git a/configs/commonjs/formats.cjs b/configs/commonjs/formats.cjs deleted file mode 100644 index d6b100c..0000000 --- a/configs/commonjs/formats.cjs +++ /dev/null @@ -1,6 +0,0 @@ -const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended'); - -module.exports = { - name: 'formats-cabify-eslint-config', - ...eslintPluginPrettierRecommended, -}; diff --git a/configs/commonjs/imports.cjs b/configs/commonjs/imports.cjs deleted file mode 100644 index 21ea197..0000000 --- a/configs/commonjs/imports.cjs +++ /dev/null @@ -1,278 +0,0 @@ -const importPlugin = require('eslint-plugin-import'); -const simpleImportSort = require('eslint-plugin-simple-import-sort'); -const globals = require('globals'); - -const configs = { - name: 'imports-cabify-eslint-config', - languageOptions: { - globals: { - ...globals.es2015, - }, - }, - plugins: { - 'simple-import-sort': simpleImportSort, - }, - settings: { - 'import/resolver': { - node: { - extensions: ['.mjs', '.js', '.json'], - }, - }, - 'import/extensions': ['.js', '.mjs', '.jsx', '.ts', '.tsx'], - 'import/core-modules': [], - 'import/ignore': [ - 'node_modules', - '\\.(coffee|scss|css|less|hbs|svg|json)$', - ], - }, - - rules: { - 'simple-import-sort/imports': 'error', - 'simple-import-sort/exports': 'error', - - // Static analysis: - - // ensure imports point to files/modules that can be resolved - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md - 'import/no-unresolved': ['error', { commonjs: true, caseSensitive: true }], - - // ensure named imports coupled with named exports - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it - 'import/named': 'error', - - // ensure default import coupled with default export - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it - 'import/default': 'off', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md - 'import/namespace': 'off', - - // Helpful warnings: - - // disallow invalid exports, e.g. multiple defaults - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md - 'import/export': 'error', - - // do not allow a default import name to match a named export - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md - 'import/no-named-as-default': 'error', - - // warn on accessing default export property names that are also named exports - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md - 'import/no-named-as-default-member': 'error', - - // disallow use of jsdoc-marked-deprecated imports - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md - 'import/no-deprecated': 'off', - - // Forbid the use of extraneous packages - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md - // paths are treated both as absolute paths, and relative to process.cwd() - 'import/no-extraneous-dependencies': [ - 'error', - { - devDependencies: [ - '.storybook/**', // react storybooks - 'storybook/**', // react storybooks - '**/*.scenario.*', // storybooks scenarios - '**/*.story.*', // storybooks stories - '**/*.stories.*', // storybooks stories - 'conf/**', // our custom conf - 'test/**', // tape, common npm pattern - 'tests/**', // also common npm pattern - 'spec/**', // mocha, rspec-like pattern - '**/__tests__/**', // jest pattern - '**/__mocks__/**', // jest pattern - 'test.{js,jsx}', // repos with a single test file - 'test-*.{js,jsx}', // repos with multiple top-level test files - '**/*{.,_}{test,spec}.{js,jsx,ts,tsx}', // tests where the extension or filename suffix denotes that it is a test - '**/jest.config.js', // jest config - '**/vue.config.js', // vue-cli config - '**/webpack.config.js', // webpack config - '**/webpack.config.*.js', // webpack config - '**/rollup.config.js', // rollup config - '**/rollup.config.*.js', // rollup config - '**/gulpfile.js', // gulp config - '**/gulpfile.*.js', // gulp config - '**/Gruntfile{,.js}', // grunt config - '**/protractor.conf.js', // protractor config - '**/protractor.conf.*.js', // protractor config - '**/postcss.config.js', // postcss config - ], - optionalDependencies: false, - }, - ], - - // Forbid mutable exports - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md - 'import/no-mutable-exports': 'error', - - // Module systems: - - // disallow require() - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md - 'import/no-commonjs': 'off', - - // disallow AMD require/define - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md - // 'import/no-amd': 'error', - - // No Node.js builtin modules - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md - // TODO: enable? - 'import/no-nodejs-modules': 'off', - - // Style guide: - - // disallow non-import statements appearing before import statements - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md - 'import/first': 'error', - - // disallow non-import statements appearing before import statements - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/imports-first.md - // deprecated: use `import/first` - 'import/imports-first': 'off', - - // disallow duplicate imports - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md - 'import/no-duplicates': 'error', - - // disallow namespace imports - // TODO: enable? - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md - 'import/no-namespace': 'off', - - // Ensure consistent use of file extension within the import path - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md - 'import/extensions': [ - 'error', - 'ignorePackages', - { - js: 'never', - mjs: 'never', - jsx: 'never', - ts: 'never', - tsx: 'never', - }, - ], - - // ensure absolute imports are above relative imports and that unassigned imports are ignored - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md - // superseeded by import-order-alphabetical - 'import/order': 'off', - - // Require a newline after the last import/require in a group - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md - // 'import/newline-after-import': 'error', - - // Require modules with a single export to use a default export - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md - 'import/prefer-default-export': 'error', - - // Restrict which files can be imported in a given folder - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md - 'import/no-restricted-paths': 'off', - - // Forbid modules to have too many dependencies - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md - 'import/max-dependencies': ['off', { max: 10 }], - - // Forbid import of modules using absolute paths - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md - 'import/no-absolute-path': 'error', - - // Forbid require() calls with expressions - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md - 'import/no-dynamic-require': 'error', - - // prevent importing the submodules of other modules - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md - 'import/no-internal-modules': [ - 'off', - { - allow: [], - }, - ], - - // Warn if a module could be mistakenly parsed as a script by a consumer - // leveraging Unambiguous JavaScript Grammar - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/unambiguous.md - // this should not be enabled until this proposal has at least been *presented* to TC39. - // At the moment, it's not a thing. - 'import/unambiguous': 'off', - - // Forbid Webpack loader syntax in imports - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md - 'import/no-webpack-loader-syntax': 'error', - - // Prevent unassigned imports - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md - // importing for side effects is perfectly acceptable, if you need side effects. - 'import/no-unassigned-import': 'off', - - // Prevent importing the default as if it were named - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md - 'import/no-named-default': 'error', - - // Reports if a module's default export is unnamed - // https://github.com/benmosher/eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md - 'import/no-anonymous-default-export': [ - 'off', - { - allowArray: false, - allowArrowFunction: false, - allowAnonymousClass: false, - allowAnonymousFunction: false, - allowLiteral: false, - allowObject: false, - }, - ], - - // This rule enforces that all exports are declared at the bottom of the file. - // https://github.com/benmosher/eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md - // TODO: enable? - 'import/exports-last': 'off', - - // Reports when named exports are not grouped together in a single export declaration - // or when multiple assignments to CommonJS module.exports or exports object are present - // in a single file. - // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md - 'import/group-exports': 'off', - - // forbid default exports. this is a terrible rule, do not use it. - // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md - 'import/no-default-export': 'off', - - // Prohibit named exports. this is a terrible rule, do not use it. - // https://github.com/benmosher/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md - 'import/no-named-export': 'off', - - // Forbid a module from importing itself - // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-self-import.md - 'import/no-self-import': 'error', - - // Forbid cyclical dependencies between modules - // https://github.com/benmosher/eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md - 'import/no-cycle': ['error', { maxDepth: Number.MAX_SAFE_INTEGER }], - - // Ensures that there are no useless path segments - // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/no-useless-path-segments.md - 'import/no-useless-path-segments': 'error', - - // dynamic imports require a leading comment with a webpackChunkName - // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/dynamic-import-chunkname.md - 'import/dynamic-import-chunkname': [ - 'off', - { - importFunctions: [], - webpackChunknameFormat: '[0-9a-zA-Z-_/.]+', - }, - ], - - // Use this rule to prevent imports to folders in relative parent paths. - // https://github.com/benmosher/eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md - 'import/no-relative-parent-imports': 'off', - }, -}; - -module.exports = [importPlugin.flatConfigs.recommended, configs]; diff --git a/configs/commonjs/jest.cjs b/configs/commonjs/jest.cjs deleted file mode 100644 index 10cddac..0000000 --- a/configs/commonjs/jest.cjs +++ /dev/null @@ -1,9 +0,0 @@ -const jest = require('eslint-plugin-jest'); - -module.exports = { - name: 'jest-cabify-eslint-config', - ...jest.configs['flat/recommended'], - rules: { - ...jest.configs['flat/recommended'].rules, - }, -}; diff --git a/configs/commonjs/lodash.cjs b/configs/commonjs/lodash.cjs deleted file mode 100644 index 7478409..0000000 --- a/configs/commonjs/lodash.cjs +++ /dev/null @@ -1,9 +0,0 @@ -const lodashPlugin = require('eslint-plugin-lodash'); - -module.exports = { - name: 'lodash-cabify-eslint-config', - plugins: { lodash: lodashPlugin }, - rules: { - 'lodash/import-scope': ['error', 'method'], - }, -}; diff --git a/configs/commonjs/node.cjs b/configs/commonjs/node.cjs deleted file mode 100644 index a0787a3..0000000 --- a/configs/commonjs/node.cjs +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = { - name: 'node-cabify-eslint-config', - rules: { - // enforce return after a callback - 'callback-return': 'off', - - // require all requires be top-level - // https://eslint.org/docs/rules/global-require - 'global-require': 'error', - - // enforces error handling in callbacks (node environment) - 'handle-callback-err': 'off', - - // disallow use of the Buffer() constructor - // https://eslint.org/docs/rules/no-buffer-constructor - 'no-buffer-constructor': 'error', - - // disallow mixing regular variable and require declarations - 'no-mixed-requires': ['off', false], - - // disallow use of new operator with the require function - 'no-new-require': 'error', - - // disallow string concatenation with __dirname and __filename - // https://eslint.org/docs/rules/no-path-concat - 'no-path-concat': 'error', - - // disallow use of process.env - 'no-process-env': 'off', - - // disallow process.exit() - 'no-process-exit': 'off', - - // restrict usage of specified node modules - 'no-restricted-modules': 'off', - - // disallow use of synchronous methods (off by default) - 'no-sync': 'off', - }, -}; diff --git a/configs/commonjs/postcss.cjs b/configs/commonjs/postcss.cjs deleted file mode 100644 index d6202ad..0000000 --- a/configs/commonjs/postcss.cjs +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - name: 'post-css-cabify-eslint-config', - files: ['postcss.config.js'], - rules: { - 'global-require': 'off', - }, -}; diff --git a/configs/commonjs/promises.cjs b/configs/commonjs/promises.cjs deleted file mode 100644 index 4fead7b..0000000 --- a/configs/commonjs/promises.cjs +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - name: 'promises-cabify-eslint-config', - rules: { - 'no-floating-promises': 'off', - - // disallow using an async function as a Promise executor - // https://eslint.org/docs/rules/no-async-promise-executor - // TODO: enable, semver-major - 'no-async-promise-executor': 'off', - - // disallow redundant `return await` - 'no-return-await': 'error', - - // require `await` in `async function` (note: this is a horrible rule that should never be used) - // https://eslint.org/docs/rules/require-await - 'require-await': 'off', - }, -}; diff --git a/configs/commonjs/react-a11y.cjs b/configs/commonjs/react-a11y.cjs deleted file mode 100644 index 039313b..0000000 --- a/configs/commonjs/react-a11y.cjs +++ /dev/null @@ -1,230 +0,0 @@ -const jsxAllyPlugin = require('eslint-plugin-jsx-a11y'); - -module.exports = { - name: 'react-a11y-cabify-eslint-config', - plugins: { 'jsx-a11y': jsxAllyPlugin }, - languageOptions: { - parserOptions: { - ecmaFeatures: { - jsx: true, - }, - }, - }, - rules: { - // Enforce that anchors have content - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md - 'jsx-a11y/anchor-has-content': ['error', { components: [] }], - - // Require ARIA roles to be valid and non-abstract - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md - 'jsx-a11y/aria-role': ['error', { ignoreNonDom: false }], - - // Enforce all aria-* props are valid. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md - 'jsx-a11y/aria-props': 'error', - - // Enforce ARIA state and property values are valid. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md - 'jsx-a11y/aria-proptypes': 'error', - - // Enforce that elements that do not support ARIA roles, states, and - // properties do not have those attributes. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md - 'jsx-a11y/aria-unsupported-elements': 'error', - - // Enforce that all elements that require alternative text have meaningful information - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md - 'jsx-a11y/alt-text': [ - 'error', - { - elements: ['img', 'object', 'area', 'input[type="image"]'], - img: [], - object: [], - area: [], - 'input[type="image"]': [], - }, - ], - - // Prevent img alt text from containing redundant words like "image", "picture", or "photo" - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-redundant-alt.md - 'jsx-a11y/img-redundant-alt': 'error', - - // require that JSX labels use "htmlFor" - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md - // deprecated - 'jsx-a11y/label-has-for': [ - 'off', - { - components: [], - required: { - every: ['nesting', 'id'], - }, - allowChildren: false, - }, - ], - - // Enforce that a label tag has a text label and an associated control. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/b800f40a2a69ad48015ae9226fbe879f946757ed/docs/rules/label-has-associated-control.md - 'jsx-a11y/label-has-associated-control': [ - 'error', - { - labelComponents: [], - labelAttributes: [], - controlComponents: [], - assert: 'both', - depth: 25, - }, - ], - - // require that mouseover/out come with focus/blur, for keyboard-only users - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-have-key-events.md - 'jsx-a11y/mouse-events-have-key-events': 'error', - - // Prevent use of `accessKey` - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md - 'jsx-a11y/no-access-key': 'error', - - // require onBlur instead of onChange - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md - 'jsx-a11y/no-onchange': 'off', - - // Elements with an interactive role and interaction handlers must be focusable - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/interactive-supports-focus.md - 'jsx-a11y/interactive-supports-focus': 'error', - - // Enforce that elements with ARIA roles must have all required attributes - // for that role. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md - 'jsx-a11y/role-has-required-aria-props': 'error', - - // Enforce that elements with explicit or implicit roles defined contain - // only aria-* properties supported by that role. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md - 'jsx-a11y/role-supports-aria-props': 'error', - - // Enforce tabIndex value is not greater than zero. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md - 'jsx-a11y/tabindex-no-positive': 'error', - - // ensure tags have content and are not aria-hidden - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md - 'jsx-a11y/heading-has-content': ['error', { components: [''] }], - - // require HTML elements to have a "lang" prop - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/html-has-lang.md - 'jsx-a11y/html-has-lang': 'error', - - // require HTML element's lang prop to be valid - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md - 'jsx-a11y/lang': 'error', - - // prevent distracting elements, like and - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md - 'jsx-a11y/no-distracting-elements': [ - 'error', - { - elements: ['marquee', 'blink'], - }, - ], - - // only allow to have the "scope" attr - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md - 'jsx-a11y/scope': 'error', - - // require onClick be accompanied by onKeyUp/onKeyDown/onKeyPress - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md - 'jsx-a11y/click-events-have-key-events': 'off', - - // Enforce that DOM elements without semantic behavior not have interaction handlers - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md - 'jsx-a11y/no-static-element-interactions': 'off', - - // A non-interactive element does not support event handlers (mouse and key handlers) - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-interactions.md - 'jsx-a11y/no-noninteractive-element-interactions': 'off', - - // ensure emoji are accessible - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md - 'jsx-a11y/accessible-emoji': 'error', - - // elements with aria-activedescendant must be tabbable - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-activedescendant-has-tabindex.md - 'jsx-a11y/aria-activedescendant-has-tabindex': 'error', - - // ensure iframe elements have a unique title - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/iframe-has-title.md - 'jsx-a11y/iframe-has-title': 'error', - - // prohibit autoFocus prop - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-autofocus.md - 'jsx-a11y/no-autofocus': ['error', { ignoreNonDOM: true }], - - // ensure HTML elements do not specify redundant ARIA roles - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md - 'jsx-a11y/no-redundant-roles': 'error', - - // media elements must have captions - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/media-has-caption.md - 'jsx-a11y/media-has-caption': [ - 'error', - { - audio: [], - video: [], - track: [], - }, - ], - - // WAI-ARIA roles should not be used to convert an interactive element to non-interactive - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-interactive-element-to-noninteractive-role.md - 'jsx-a11y/no-interactive-element-to-noninteractive-role': [ - 'error', - { - tr: ['none', 'presentation'], - }, - ], - - // WAI-ARIA roles should not be used to convert a non-interactive element to interactive - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-to-interactive-role.md - 'jsx-a11y/no-noninteractive-element-to-interactive-role': [ - 'error', - { - ul: [ - 'listbox', - 'menu', - 'menubar', - 'radiogroup', - 'tablist', - 'tree', - 'treegrid', - ], - ol: [ - 'listbox', - 'menu', - 'menubar', - 'radiogroup', - 'tablist', - 'tree', - 'treegrid', - ], - li: ['menuitem', 'option', 'row', 'tab', 'treeitem'], - table: ['grid'], - td: ['gridcell'], - }, - ], - - // Tab key navigation should be limited to elements on the page that can be interacted with. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-tabindex.md - 'jsx-a11y/no-noninteractive-tabindex': 'off', - - // ensure tags are valid - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/0745af376cdc8686d85a361ce36952b1fb1ccf6e/docs/rules/anchor-is-valid.md - 'jsx-a11y/anchor-is-valid': [ - 'off', - { - components: ['Link'], - specialLink: ['to'], - aspects: ['noHref', 'invalidHref', 'preferButton'], - }, - ], - }, -}; diff --git a/configs/commonjs/react.cjs b/configs/commonjs/react.cjs deleted file mode 100644 index 8000581..0000000 --- a/configs/commonjs/react.cjs +++ /dev/null @@ -1,432 +0,0 @@ -const react = require('eslint-plugin-react'); -const reactHooks = require('eslint-plugin-react-hooks'); - -module.exports = { - name: 'react-cabify-eslint-config', - plugins: { - react, - 'react-hooks': reactHooks, - }, - languageOptions: { - parserOptions: { - ecmaFeatures: { - jsx: true, - }, - }, - }, - - // View link below for react rules documentation - // https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules - rules: { - 'class-methods-use-this': 'off', - - // Prevent missing displayName in a React component definition - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md - 'react/display-name': ['off', { ignoreTranspilerName: false }], - - // Forbid certain propTypes (any, array, object) - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-prop-types.md - 'react/forbid-prop-types': [ - 'error', - { - forbid: ['any', 'array', 'object'], - checkContextTypes: true, - checkChildContextTypes: true, - }, - ], - - // Forbid certain props on DOM Nodes - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-dom-props.md - 'react/forbid-dom-props': ['off', { forbid: [] }], - - // Enforce boolean attributes notation in JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md - 'react/jsx-boolean-value': ['error', 'never', { always: [] }], - - // Enforce event handler naming conventions in JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md - 'react/jsx-handler-names': [ - 'off', - { - eventHandlerPrefix: 'handle', - eventHandlerPropPrefix: 'on', - }, - ], - - // Validate JSX has key prop when in array or iterator - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md - 'react/jsx-key': 'error', - - // Prevent usage of .bind() in JSX props - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md - 'react/jsx-no-bind': [ - 'error', - { - ignoreRefs: true, - allowArrowFunctions: true, - allowFunctions: false, - allowBind: false, - ignoreDOMComponents: true, - }, - ], - - // Prevent duplicate props in JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md - 'react/jsx-no-duplicate-props': ['error', { ignoreCase: true }], - - // Prevent usage of unwrapped JSX strings - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md - 'react/jsx-no-literals': ['off', { noStrings: true }], - - // Disallow undeclared variables in JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md - 'react/jsx-no-undef': 'error', - - // Enforce PascalCase for user-defined JSX components - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md - 'react/jsx-pascal-case': [ - 'error', - { - allowAllCaps: true, - ignore: [], - }, - ], - - // Enforce propTypes declarations alphabetical sorting - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md - 'react/sort-prop-types': [ - 'error', - { - ignoreCase: true, - callbacksLast: false, - requiredFirst: false, - sortShapeProp: true, - }, - ], - - // Deprecated in favor of react/jsx-sort-props - 'react/jsx-sort-prop-types': 'off', - - // Enforce props alphabetical sorting - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md - 'react/jsx-sort-props': [ - 'error', - { - ignoreCase: true, - callbacksLast: false, - shorthandFirst: false, - shorthandLast: false, - noSortAlphabetically: false, - reservedFirst: false, - }, - ], - - // Enforce defaultProps declarations alphabetical sorting - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-sort-default-props.md - 'react/jsx-sort-default-props': [ - 'off', - { - ignoreCase: true, - }, - ], - - // Prevent variables used in JSX to be incorrectly marked as unused - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md - 'react/jsx-uses-vars': 'error', - - // Prevent usage of dangerous JSX properties - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md - 'react/no-danger': 'off', - - // Prevent usage of deprecated methods - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md - 'react/no-deprecated': ['error'], - - // Prevent usage of setState in componentDidMount - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md - // this is necessary for server-rendering - 'react/no-did-mount-set-state': 'off', - - // Prevent usage of setState in componentDidUpdate - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md - 'react/no-did-update-set-state': 'error', - - // Prevent usage of setState in componentWillUpdate - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md - 'react/no-will-update-set-state': 'error', - - // Prevent direct mutation of this.state - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md - 'react/no-direct-mutation-state': 'off', - - // Prevent usage of isMounted - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md - 'react/no-is-mounted': 'error', - - // Prevent multiple component definition per file - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md - 'react/no-multi-comp': ['error', { ignoreStateless: true }], - - // Prevent usage of setState - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md - 'react/no-set-state': 'off', - - // Prevent using string references - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md - 'react/no-string-refs': 'error', - - // Prevent usage of unknown DOM property - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md - 'react/no-unknown-property': 'error', - - // Require ES6 class declarations over React.createClass - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md - 'react/prefer-es6-class': ['error', 'always'], - - // Require stateless functions when not using lifecycle methods, setState or ref - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md - 'react/prefer-stateless-function': [ - 'error', - { ignorePureComponents: true }, - ], - - // Prevent missing props validation in a React component definition - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md - 'react/prop-types': [ - 'error', - { - ignore: [], - customValidators: [], - skipUndeclared: false, - }, - ], - - // Require render() methods to return something - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md - 'react/require-render-return': 'error', - - // Prevent extra closing tags for components without children - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md - 'react/self-closing-comp': 'error', - - // Enforce component methods order - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-comp.md - 'react/sort-comp': [ - 'error', - { - order: [ - 'static-methods', - 'instance-variables', - 'lifecycle', - '/^on.+$/', - 'getters', - 'setters', - '/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/', - 'instance-methods', - 'everything-else', - 'rendering', - ], - groups: { - lifecycle: [ - 'displayName', - 'propTypes', - 'contextTypes', - 'childContextTypes', - 'mixins', - 'statics', - 'defaultProps', - 'constructor', - 'getDefaultProps', - 'getInitialState', - 'state', - 'getChildContext', - 'componentWillMount', - 'UNSAFE_componentWillMount', - 'componentDidMount', - 'UNSAFE_componentDidMount', - 'componentWillReceiveProps', - 'UNSAFE_componentWillReceiveProps', - 'shouldComponentUpdate', - 'componentWillUpdate', - 'UNSAFE_componentWillUpdate', - 'componentDidUpdate', - 'componentWillUnmount', - ], - rendering: ['/^render.+$/', 'render'], - }, - }, - ], - - // Disallow target="_blank" on links - // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-no-target-blank.md - 'react/jsx-no-target-blank': ['error', { enforceDynamicLinks: 'always' }], - - // only .jsx files may have JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md - 'react/jsx-filename-extension': 'off', - - // prevent accidental JS comments from being injected into JSX as text - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md - 'react/jsx-no-comment-textnodes': 'error', - - // disallow using React.render/ReactDOM.render's return value - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md - 'react/no-render-return-value': 'error', - - // require a shouldComponentUpdate method, or PureRenderMixin - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-optimization.md - 'react/require-optimization': ['off', { allowDecorators: [] }], - - // warn against using findDOMNode() - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md - 'react/no-find-dom-node': 'error', - - // Forbid certain props on Components - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md - 'react/forbid-component-props': ['off', { forbid: [] }], - - // Forbid certain elements - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md - 'react/forbid-elements': ['off', { forbid: [] }], - - // Prevent problem with children and props.dangerouslySetInnerHTML - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md - 'react/no-danger-with-children': 'error', - - // Prevent unused propType definitions - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md - 'react/no-unused-prop-types': [ - 'error', - { - customValidators: [], - skipShapeProps: true, - }, - ], - - // Require style prop value be an object or var - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md - 'react/style-prop-object': 'error', - - // Prevent invalid characters from appearing in markup - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md - 'react/no-unescaped-entities': 'error', - - // Prevent passing of children as props - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md - 'react/no-children-prop': 'error', - - // Prevent usage of Array index in keys - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md - 'react/no-array-index-key': 'error', - - // Enforce a defaultProps definition for every prop that is not a required prop - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/require-default-props.md - 'react/require-default-props': [ - 'error', - { - forbidDefaultForRequired: true, - }, - ], - - // Forbids using non-exported propTypes - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md - // this is intentionally set to "warn". it would be "error", - // but it's only critical if you're stripping propTypes in production. - 'react/forbid-foreign-prop-types': ['warn', { allowInPropTypes: true }], - - // Prevent void DOM elements from receiving children - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md - 'react/void-dom-elements-no-children': 'error', - - // Enforce all defaultProps have a corresponding non-required PropType - // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/default-props-match-prop-types.md - 'react/default-props-match-prop-types': [ - 'error', - { allowRequiredDefaults: false }, - ], - - // Prevent usage of shouldComponentUpdate when extending React.PureComponent - // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/no-redundant-should-component-update.md - 'react/no-redundant-should-component-update': 'error', - - // Prevent unused state values - // https://github.com/yannickcr/eslint-plugin-react/pull/1103/ - 'react/no-unused-state': 'error', - - // Enforces consistent naming for boolean props - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/boolean-prop-naming.md - 'react/boolean-prop-naming': [ - 'off', - { - propTypeNames: ['bool', 'mutuallyExclusiveTrueProps'], - rule: '^(is|has)[A-Z]([A-Za-z0-9]?)+', - message: '', - }, - ], - - // Prevents common casing typos - // https://github.com/yannickcr/eslint-plugin-react/blob/73abadb697034b5ccb514d79fb4689836fe61f91/docs/rules/no-typos.md - 'react/no-typos': 'error', - - // Enforce curly braces or disallow unnecessary curly braces in JSX props and/or children - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md - 'react/jsx-curly-brace-presence': [ - 'error', - { props: 'never', children: 'never' }, - ], - - // Enforce consistent usage of destructuring assignment of props, state, and context - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/destructuring-assignment.md - 'react/destructuring-assignment': 'off', - - // Prevent using this.state within a this.setState - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-access-state-in-setstate.md - 'react/no-access-state-in-setstate': 'error', - - // Prevent usage of button elements without an explicit type attribute - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/button-has-type.md - 'react/button-has-type': 'off', - - // Prevent this from being used in stateless functional components - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-this-in-sfc.md - 'react/no-this-in-sfc': 'error', - - // Validate JSX maximum depth - // https://github.com/yannickcr/eslint-plugin-react/blob/abe8381c0d6748047224c430ce47f02e40160ed0/docs/rules/jsx-max-depth.md - 'react/jsx-max-depth': 'off', - - // Prevent usage of UNSAFE_ methods - // https://github.com/yannickcr/eslint-plugin-react/blob/157cc932be2cfaa56b3f5b45df6f6d4322a2f660/docs/rules/no-unsafe.md - 'react/no-unsafe': 'error', - - // Hooks Rules - // https://github.com/facebook/react/tree/master/packages/eslint-plugin-react-hooks - - // General rules of hooks - // https://github.com/facebook/react/blob/master/packages/eslint-plugin-react-hooks/src/RulesOfHooks.js - 'react-hooks/rules-of-hooks': 'error', - - // Putting exhaustive dependencies on hooks. - // https://github.com/facebook/react/blob/master/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js - // Your code may be correct even with this warn, check this in this case: - // https://github.com/facebook/react/issues/14920 - 'react-hooks/exhaustive-deps': 'warn', - }, - - settings: { - 'import/resolver': { - node: { - extensions: ['.js', '.jsx', '.json'], - }, - }, - react: { - pragma: 'React', - version: '16.0', - }, - propWrapperFunctions: [ - 'forbidExtraProps', // https://www.npmjs.com/package/airbnb-prop-types - 'exact', // https://www.npmjs.com/package/prop-types-exact - 'Object.freeze', // https://tc39.github.io/ecma262/#sec-object.freeze - ], - }, -}; diff --git a/configs/commonjs/storybook.cjs b/configs/commonjs/storybook.cjs deleted file mode 100644 index ff425f8..0000000 --- a/configs/commonjs/storybook.cjs +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - files: ['*.story.tsx', '*.stories.tsx'], - name: 'storybook-cabify-eslint-config', - rules: { - 'import/no-default-export': 'off', - }, -}; diff --git a/configs/commonjs/strict.cjs b/configs/commonjs/strict.cjs deleted file mode 100644 index a2b4605..0000000 --- a/configs/commonjs/strict.cjs +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - name: 'strict-cabify-eslint-config', - rules: { - // babel inserts `'use strict';` for us - strict: ['error', 'never'], - }, -}; diff --git a/configs/commonjs/style.cjs b/configs/commonjs/style.cjs deleted file mode 100644 index 11b5ce4..0000000 --- a/configs/commonjs/style.cjs +++ /dev/null @@ -1,319 +0,0 @@ -module.exports = { - name: 'style-cabify-eslint-config', - rules: { - // require camel case names - // TODO: semver-major (eslint 5): add ignoreDestructuring: false option - camelcase: [ - 'error', - { - properties: 'never', - allow: [ - 'UNSAFE_componentDidMount', - 'UNSAFE_componentWillReceiveProps', - 'UNSAFE_componentWillUpdate', - 'UNSAFE_componentWillMount', - ], - }, - ], - // enforce or disallow capitalization of the first letter of a comment - // https://eslint.org/docs/rules/capitalized-comments - 'capitalized-comments': [ - 'off', - 'never', - { - line: { - ignorePattern: '.*', - ignoreInlineComments: true, - ignoreConsecutiveComments: true, - }, - block: { - ignorePattern: '.*', - ignoreInlineComments: true, - ignoreConsecutiveComments: true, - }, - }, - ], - - // enforces consistent naming when capturing the current execution context - 'consistent-this': 'off', - - // requires function names to match the name of the variable or property to which they are - // assigned - // https://eslint.org/docs/rules/func-name-matching - // TODO: semver-major (eslint 5): add considerPropertyDescriptor: true - 'func-name-matching': [ - 'off', - 'always', - { - includeCommonJSModuleExports: false, - }, - ], - - // require function expressions to have a name - // https://eslint.org/docs/rules/func-names - 'func-names': 'warn', - - // enforces use of function declarations or expressions - // https://eslint.org/docs/rules/func-style - // TODO: enable - 'func-style': ['off', 'expression'], - - // Blacklist certain identifiers to prevent them being used - // https://eslint.org/docs/rules/id-blacklist - 'id-blacklist': 'off', - - // this option enforces minimum and maximum identifier lengths - // (variable names, property names etc.) - 'id-length': 'off', - - // require identifiers to match the provided regular expression - 'id-match': 'off', - - // enforce position of line comments - // https://eslint.org/docs/rules/line-comment-position - // TODO: enable? - 'line-comment-position': [ - 'off', - { - position: 'above', - ignorePattern: '', - applyDefaultPatterns: true, - }, - ], - - // require or disallow an empty line between class members - // https://eslint.org/docs/rules/lines-between-class-members - 'lines-between-class-members': [ - 'error', - 'always', - { exceptAfterSingleLine: false }, - ], - - // enforces empty lines around comments - 'lines-around-comment': 'off', - - // require or disallow newlines around directives - // https://eslint.org/docs/rules/lines-around-directive - 'lines-around-directive': [ - 'error', - { - before: 'always', - after: 'always', - }, - ], - - // specify the maximum depth that blocks can be nested - 'max-depth': ['off', 4], - - // specify the max number of lines in a file - // https://eslint.org/docs/rules/max-lines - 'max-lines': [ - 'off', - { - max: 300, - skipBlankLines: true, - skipComments: true, - }, - ], - - // enforce a maximum function length - // https://eslint.org/docs/rules/max-lines-per-function - 'max-lines-per-function': [ - 'off', - { - max: 50, - skipBlankLines: true, - skipComments: true, - IIFEs: true, - }, - ], - - // specify the maximum depth callbacks can be nested - 'max-nested-callbacks': 'off', - - // limits the number of parameters that can be used in the function declaration. - 'max-params': ['off', 3], - - // specify the maximum number of statement allowed in a function - 'max-statements': ['off', 10], - - // restrict the number of statements per line - // https://eslint.org/docs/rules/max-statements-per-line - 'max-statements-per-line': ['off', { max: 1 }], - - // enforce a particular style for multiline comments - // https://eslint.org/docs/rules/multiline-comment-style - 'multiline-comment-style': ['off', 'starred-block'], - - // require a capital letter for constructors - 'new-cap': [ - 'error', - { - newIsCap: true, - newIsCapExceptions: [], - capIsNew: false, - capIsNewExceptions: [ - 'Immutable.Map', - 'Immutable.Set', - 'Immutable.List', - ], - }, - ], - - // disallow use of the Array constructor - 'no-array-constructor': 'error', - - // disallow use of bitwise operators - // https://eslint.org/docs/rules/no-bitwise - 'no-bitwise': 'error', - - // disallow use of the continue statement - // https://eslint.org/docs/rules/no-continue - 'no-continue': 'error', - - // disallow comments inline after code - 'no-inline-comments': 'off', - - // disallow if as the only statement in an else block - // https://eslint.org/docs/rules/no-lonely-if - 'no-lonely-if': 'error', - - // disallow un-paren'd mixes of different operators - // https://eslint.org/docs/rules/no-mixed-operators - 'no-mixed-operators': [ - 'error', - { - // the list of arthmetic groups disallows mixing `%` and `**` - // with other arithmetic operators. - groups: [ - ['%', '**'], - ['%', '+'], - ['%', '-'], - ['%', '*'], - ['%', '/'], - ['**', '+'], - ['**', '-'], - ['**', '*'], - ['**', '/'], - ['&', '|', '^', '~', '<<', '>>', '>>>'], - ['==', '!=', '===', '!==', '>', '>=', '<', '<='], - ['&&', '||'], - ['in', 'instanceof'], - ], - allowSamePrecedence: true, - }, - ], - - // disallow use of chained assignment expressions - // https://eslint.org/docs/rules/no-multi-assign - 'no-multi-assign': ['error'], - - // disallow negated conditions - // https://eslint.org/docs/rules/no-negated-condition - 'no-negated-condition': 'off', - - // disallow nested ternary expressions - 'no-nested-ternary': 'error', - - // disallow use of the Object constructor - 'no-new-object': 'error', - - // disallow use of unary operators, ++ and -- - // https://eslint.org/docs/rules/no-plusplus - 'no-plusplus': 'off', - - // disallow certain syntax forms - // https://eslint.org/docs/rules/no-restricted-syntax - 'no-restricted-syntax': [ - 'error', - { - selector: 'ForInStatement', - message: - 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.', - }, - { - selector: 'ForOfStatement', - message: - 'iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.', - }, - { - selector: 'LabeledStatement', - message: - 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.', - }, - { - selector: 'WithStatement', - message: - '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.', - }, - ], - - // disallow the use of ternary operators - 'no-ternary': 'off', - - // disallow dangling underscores in identifiers - // https://eslint.org/docs/rules/no-underscore-dangle - 'no-underscore-dangle': [ - 'error', - { - allow: ['__REDUX_DEVTOOLS_EXTENSION_COMPOSE__', '__html'], - allowAfterThis: false, - allowAfterSuper: false, - enforceInMethodNames: true, - }, - ], - - // disallow the use of Boolean literals in conditional expressions - // also, prefer `a || b` over `a ? a : b` - // https://eslint.org/docs/rules/no-unneeded-ternary - 'no-unneeded-ternary': ['error', { defaultAssignment: false }], - - // enforce the location of single-line statements - // https://eslint.org/docs/rules/nonblock-statement-body-position - 'nonblock-statement-body-position': ['error', 'beside', { overrides: {} }], - - // allow just one var statement per function - 'one-var': ['error', 'never'], - - // require assignment operator shorthand where possible or prohibit it entirely - // https://eslint.org/docs/rules/operator-assignment - 'operator-assignment': ['error', 'always'], - - // Requires operator at the beginning of the line in multiline statements - // https://eslint.org/docs/rules/operator-linebreak - 'operator-linebreak': ['error', 'before', { overrides: { '=': 'none' } }], - - // Prefer use of an object spread over Object.assign - // https://eslint.org/docs/rules/prefer-object-spread - // TODO: semver-major (eslint 5): enable - 'prefer-object-spread': 'error', - - // do not require jsdoc - // https://eslint.org/docs/rules/require-jsdoc - 'require-jsdoc': 'off', - - // requires object keys to be sorted - 'sort-keys': ['off', 'asc', { caseSensitive: false, natural: true }], - - // sort variables within the same declaration block - 'sort-vars': 'off', - - // require or disallow a space immediately following the // or /* in a comment - // https://eslint.org/docs/rules/spaced-comment - 'spaced-comment': [ - 'error', - 'always', - { - line: { - exceptions: ['-', '+'], - markers: ['=', '!'], // space here to support sprockets directives - }, - block: { - exceptions: ['-', '+'], - markers: ['=', '!'], // space here to support sprockets directives - balanced: true, - }, - }, - ], - }, -}; diff --git a/configs/commonjs/ts.cjs b/configs/commonjs/ts.cjs deleted file mode 100644 index ce0c11f..0000000 --- a/configs/commonjs/ts.cjs +++ /dev/null @@ -1,162 +0,0 @@ -/* eslint-disable no-param-reassign */ -const path = require('path'); -// eslint-disable-next-line import/no-unresolved -const tseslint = require('typescript-eslint'); - -const tsCustomConfig = { - name: 'ts-cabify-eslint-config', - files: ['**/*.ts', '**/*.tsx'], - rules: { - '@typescript-eslint/restrict-template-expressions': [ - 'error', - { allowAny: true }, - ], - '@typescript-eslint/array-type': ['error', { default: 'array' }], - '@typescript-eslint/consistent-type-definitions': ['error', 'interface'], - '@typescript-eslint/member-ordering': 'error', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/naming-convention': [ - 'error', - { - selector: 'default', - format: ['camelCase'], - }, - { - selector: 'import', - format: ['camelCase', 'PascalCase', 'UPPER_CASE'], - }, - { - // This is the 'property' group values. For some reason `property` selector is not recogniced. - selector: ['classProperty', 'objectLiteralProperty', 'typeProperty'], - format: null, - }, - { - selector: 'variableLike', - format: ['camelCase', 'PascalCase'], - }, - { - selector: 'variable', - format: ['camelCase', 'PascalCase', 'UPPER_CASE'], - }, - { - // 'memberLike' group selector values without 'property' and 'enumMember'. - // Don't know why 'memberLike' selector it's not being overriden by 'property' and 'enumMember' - selector: ['parameterProperty', 'method', 'accessor'], - format: ['camelCase', 'PascalCase'], - leadingUnderscore: 'allow', - }, - { - selector: 'memberLike', - modifiers: ['private'], - format: ['camelCase'], - leadingUnderscore: 'forbid', - }, - { - selector: 'typeLike', - format: ['PascalCase'], - }, - // Allow leading underscore for untyped parameters on Ts - // Also allow paramters to be PascalCase to receive React.Components as props. - { - selector: 'parameter', - format: ['camelCase', 'PascalCase'], - leadingUnderscore: 'allow', - }, - // Enforce the names of generic types are at least 2 characters long - { - selector: 'typeParameter', - format: ['PascalCase'], - custom: { - regex: '^[A-Z][a-zA-Z]+$', - match: true, - }, - }, - // Enforce that interface names do not begin with an I - { - selector: 'interface', - format: ['PascalCase'], - custom: { - regex: '^I[A-Z]', - match: false, - }, - }, - // Emulate the old @typescript-eslint/class-name-casing - { - selector: 'class', - format: ['PascalCase'], - leadingUnderscore: 'forbid', - }, - { - selector: 'enumMember', - format: ['UPPER_CASE', 'PascalCase'], - }, - ], - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-explicit-any': 'error', - '@typescript-eslint/no-unused-expressions': [ - 'error', - { - allowShortCircuit: true, - allowTernary: true, - allowTaggedTemplates: false, - }, - ], - '@typescript-eslint/no-unused-vars': [ - 'error', - { ignoreRestSiblings: true, argsIgnorePattern: '^_' }, - ], - '@typescript-eslint/no-use-before-define': [ - 'error', - { functions: true, classes: true, variables: true }, - ], - '@typescript-eslint/no-redeclare': ['error'], - '@typescript-eslint/no-shadow': ['error'], - '@typescript-eslint/explicit-module-boundary-types': 'off', // Disabled after upgraded parser - '@typescript-eslint/no-unsafe-member-access': 'off', // Disabled after upgraded parser - '@typescript-eslint/no-unsafe-assignment': 'off', // Disabled after upgraded parser - '@typescript-eslint/no-unsafe-call': 'off', // Disabled after upgraded parser - '@typescript-eslint/no-unsafe-return': 'off', // Disabled after upgraded parser - camelcase: 'off', // superseeded by @typescript-eslint/naming-conventions - 'import/no-cycle': 'off', - 'import/no-default-export': 'error', - // https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#eslint-plugin-import - 'import/named': 'off', - 'import/namespace': 'off', - 'import/default': 'off', - 'import/no-named-as-default-member': 'off', - 'react/sort-comp': 'off', - 'react/prop-types': 'off', // guaranteed by TS prop interfaces - 'react/require-default-props': 'off', - 'react/default-props-match-prop-types': 'off', - 'no-unused-expressions': 'off', // superseeded by @typescript-eslint/no-unused-expressions - 'no-unused-vars': 'off', // superseeded by @typescript-eslint/no-unused-vars - 'import/prefer-default-export': 'off', - 'no-useless-constructor': 'off', - '@typescript-eslint/no-useless-constructor': 'error', - 'no-use-before-define': 'off', // superseeded by @typescript-eslint/no-use-before-define - 'no-redeclare': 'off', // superseeded by @typescript-eslint/no-redeclare - 'no-shadow': 'off', // superseeded by @typescript-eslint/no-shadow - }, - languageOptions: { - parserOptions: { - projectService: true, - tsconfigRootDir: path.resolve(process.cwd()), - }, - }, - ignores: ['*.d.ts'], -}; - -const tsLintConfig = tseslint.config( - tseslint.configs.recommended, - tseslint.configs.recommendedTypeChecked, - tsCustomConfig, -); - -if (tsLintConfig.length) { - tsLintConfig.forEach((tsconfig) => { - tsconfig.files = ['**/*.ts', '**/*.tsx']; - tsconfig.ignores = ['**/*.d.ts']; - }); -} - -module.exports = { tsLintConfig }; diff --git a/configs/commonjs/utils.cjs b/configs/commonjs/utils.cjs deleted file mode 100644 index e52cacc..0000000 --- a/configs/commonjs/utils.cjs +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - isPackageAvailable(packageName) { - try { - // eslint-disable-next-line global-require, import/no-dynamic-require - return !!require(packageName); - // eslint-disable-next-line no-unused-vars - } catch (e) { - return false; - } - }, -}; diff --git a/configs/commonjs/variables.cjs b/configs/commonjs/variables.cjs deleted file mode 100644 index 7d9d733..0000000 --- a/configs/commonjs/variables.cjs +++ /dev/null @@ -1,53 +0,0 @@ -const confusingBrowserGlobals = require('confusing-browser-globals'); - -module.exports = { - name: 'variables-cabify-eslint-config', - rules: { - // enforce or disallow variable initializations at definition - 'init-declarations': 'off', - - // disallow the catch clause parameter name being the same as a variable in the outer scope - 'no-catch-shadow': 'off', - - // disallow deletion of variables - 'no-delete-var': 'error', - - // disallow labels that share a name with a variable - // https://eslint.org/docs/rules/no-label-var - 'no-label-var': 'error', - - // disallow specific globals - 'no-restricted-globals': ['error', 'isFinite', 'isNaN'].concat( - confusingBrowserGlobals, - ), - - // disallow declaration of variables already declared in the outer scope - 'no-shadow': 'error', - - // disallow shadowing of names such as arguments - 'no-shadow-restricted-names': 'error', - - // disallow use of undeclared variables unless mentioned in a /*global */ block - 'no-undef': 'error', - - // disallow use of undefined when initializing variables - 'no-undef-init': 'error', - - // disallow use of undefined variable - // https://eslint.org/docs/rules/no-undefined - // TODO: enable? - 'no-undefined': 'off', - - // disallow declaration of variables that are not used in the code - 'no-unused-vars': [ - 'error', - { vars: 'all', args: 'after-used', ignoreRestSiblings: true }, - ], - - // disallow use of variables before they are defined - 'no-use-before-define': [ - 'error', - { functions: true, classes: true, variables: true }, - ], - }, -}; diff --git a/configs/es6/errors.js b/configs/errors.js similarity index 100% rename from configs/es6/errors.js rename to configs/errors.js diff --git a/configs/es6/es6.js b/configs/es6.js similarity index 100% rename from configs/es6/es6.js rename to configs/es6.js diff --git a/configs/es6/formats.js b/configs/formats.js similarity index 100% rename from configs/es6/formats.js rename to configs/formats.js diff --git a/configs/es6/imports.js b/configs/imports.js similarity index 100% rename from configs/es6/imports.js rename to configs/imports.js diff --git a/configs/es6/jest.js b/configs/jest.js similarity index 100% rename from configs/es6/jest.js rename to configs/jest.js diff --git a/configs/es6/lodash.js b/configs/lodash.js similarity index 100% rename from configs/es6/lodash.js rename to configs/lodash.js diff --git a/configs/es6/node.js b/configs/node.js similarity index 100% rename from configs/es6/node.js rename to configs/node.js diff --git a/configs/es6/postcss.js b/configs/postcss.js similarity index 100% rename from configs/es6/postcss.js rename to configs/postcss.js diff --git a/configs/es6/promises.js b/configs/promises.js similarity index 100% rename from configs/es6/promises.js rename to configs/promises.js diff --git a/configs/es6/react-a11y.js b/configs/react-a11y.js similarity index 100% rename from configs/es6/react-a11y.js rename to configs/react-a11y.js diff --git a/configs/es6/react.js b/configs/react.js similarity index 100% rename from configs/es6/react.js rename to configs/react.js diff --git a/configs/es6/storybook.js b/configs/storybook.js similarity index 100% rename from configs/es6/storybook.js rename to configs/storybook.js diff --git a/configs/es6/strict.js b/configs/strict.js similarity index 100% rename from configs/es6/strict.js rename to configs/strict.js diff --git a/configs/es6/style.js b/configs/style.js similarity index 100% rename from configs/es6/style.js rename to configs/style.js diff --git a/configs/es6/ts.js b/configs/ts.js similarity index 100% rename from configs/es6/ts.js rename to configs/ts.js diff --git a/configs/es6/utils.js b/configs/utils.js similarity index 100% rename from configs/es6/utils.js rename to configs/utils.js diff --git a/configs/es6/variables.js b/configs/variables.js similarity index 100% rename from configs/es6/variables.js rename to configs/variables.js diff --git a/eslint.config.cjs b/eslint.config.cjs deleted file mode 100644 index 3e99a31..0000000 --- a/eslint.config.cjs +++ /dev/null @@ -1,3 +0,0 @@ -const recommended = require('./recommended.cjs'); - -module.exports = [...recommended]; diff --git a/eslint.config.js b/eslint.config.js index c43daf6..70f30a9 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,4 +1,8 @@ // eslint-disable-next-line import/extensions import recommended from './recommended.js'; -export default [...recommended]; +const globalIgnores = { + ignores: ['dist', 'node_modules/*', 'build', 'scripts'], +}; + +export default [...recommended, globalIgnores]; diff --git a/package.json b/package.json index 9dc4d34..c8ae868 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "ESLint config for Cabify Javascript projects", "type": "module", "scripts": { - "build": "echo 'No build to perform'", + "build": "vite build", "test": "npm run lint:check && npm run format:check", "lint": "eslint . --fix", "lint:check": "eslint .", @@ -36,8 +36,8 @@ ], "main": "../recommended.js", "exports": { - "require": "./eslint.config.cjs", - "import": "./eslint.config.js" + "require": "./dist/eslint.config.cjs", + "import": "./.dist/eslint.config.js" }, "dependencies": { "@typescript-eslint/eslint-plugin": "^8.15.0", @@ -60,7 +60,8 @@ }, "devDependencies": { "eslint": "^9.11.1", - "prettier": "3.3.3" + "prettier": "3.3.3", + "vite": "^6.0.5" }, "publishConfig": { "access": "public" diff --git a/recommended.cjs b/recommended.cjs deleted file mode 100644 index 2097c09..0000000 --- a/recommended.cjs +++ /dev/null @@ -1,5 +0,0 @@ -const eslintConfigPrettier = require('eslint-config-prettier'); - -const base = require('./configs/commonjs/base.cjs'); - -module.exports = [...base, eslintConfigPrettier]; diff --git a/recommended.js b/recommended.js index 443eea7..1a04ceb 100644 --- a/recommended.js +++ b/recommended.js @@ -1,6 +1,6 @@ import eslintConfigPrettier from 'eslint-config-prettier'; // eslint-disable-next-line import/extensions -import base from './configs/es6/base.js'; +import base from './configs/base.js'; export default [...base, eslintConfigPrettier]; diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..23d7693 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,33 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import { defineConfig } from 'vite'; + +export default defineConfig({ + build: { + lib: { + entry: './eslint.config.js', // Your entry file + name: '@cabify/eslint-config', // Global variable name (for UMD/IIFE) + formats: ['es', 'cjs'], // Output both ESM and CommonJS + }, + optimizeDeps: { + esbuildOptions: { + target: 'esnext', + define: { + global: 'globalThis', + }, + }, + }, + rollupOptions: { + external: [ + 'eslint', + 'eslint-plugin-import', + 'eslint-plugin', + 'typescript-eslint', + ], // Treat ESLint as an external package + output: { + // Customize output if needed + exports: 'named', // Ensures named exports in CommonJS + }, + }, + target: 'esnext', // browsers can handle the latest ES features + }, +}); diff --git a/yarn.lock b/yarn.lock index dff2ed5..bd2065b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,126 @@ # yarn lockfile v1 +"@esbuild/aix-ppc64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz#b57697945b50e99007b4c2521507dc613d4a648c" + integrity sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw== + +"@esbuild/android-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz#1add7e0af67acefd556e407f8497e81fddad79c0" + integrity sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w== + +"@esbuild/android-arm@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.24.0.tgz#ab7263045fa8e090833a8e3c393b60d59a789810" + integrity sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew== + +"@esbuild/android-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.24.0.tgz#e8f8b196cfdfdd5aeaebbdb0110983460440e705" + integrity sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ== + +"@esbuild/darwin-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz#2d0d9414f2acbffd2d86e98253914fca603a53dd" + integrity sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw== + +"@esbuild/darwin-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz#33087aab31a1eb64c89daf3d2cf8ce1775656107" + integrity sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA== + +"@esbuild/freebsd-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz#bb76e5ea9e97fa3c753472f19421075d3a33e8a7" + integrity sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA== + +"@esbuild/freebsd-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz#e0e2ce9249fdf6ee29e5dc3d420c7007fa579b93" + integrity sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ== + +"@esbuild/linux-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz#d1b2aa58085f73ecf45533c07c82d81235388e75" + integrity sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g== + +"@esbuild/linux-arm@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz#8e4915df8ea3e12b690a057e77a47b1d5935ef6d" + integrity sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw== + +"@esbuild/linux-ia32@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz#8200b1110666c39ab316572324b7af63d82013fb" + integrity sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA== + +"@esbuild/linux-loong64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz#6ff0c99cf647504df321d0640f0d32e557da745c" + integrity sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g== + +"@esbuild/linux-mips64el@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz#3f720ccd4d59bfeb4c2ce276a46b77ad380fa1f3" + integrity sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA== + +"@esbuild/linux-ppc64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz#9d6b188b15c25afd2e213474bf5f31e42e3aa09e" + integrity sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ== + +"@esbuild/linux-riscv64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz#f989fdc9752dfda286c9cd87c46248e4dfecbc25" + integrity sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw== + +"@esbuild/linux-s390x@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz#29ebf87e4132ea659c1489fce63cd8509d1c7319" + integrity sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g== + +"@esbuild/linux-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz#4af48c5c0479569b1f359ffbce22d15f261c0cef" + integrity sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA== + +"@esbuild/netbsd-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz#1ae73d23cc044a0ebd4f198334416fb26c31366c" + integrity sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg== + +"@esbuild/openbsd-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz#5d904a4f5158c89859fd902c427f96d6a9e632e2" + integrity sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg== + +"@esbuild/openbsd-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz#4c8aa88c49187c601bae2971e71c6dc5e0ad1cdf" + integrity sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q== + +"@esbuild/sunos-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz#8ddc35a0ea38575fa44eda30a5ee01ae2fa54dd4" + integrity sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA== + +"@esbuild/win32-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz#6e79c8543f282c4539db684a207ae0e174a9007b" + integrity sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA== + +"@esbuild/win32-ia32@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz#057af345da256b7192d18b676a02e95d0fa39103" + integrity sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw== + +"@esbuild/win32-x64@0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz#168ab1c7e1c318b922637fad8f339d48b01e1244" + integrity sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA== + "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.1" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56" @@ -114,12 +234,107 @@ resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== +"@rollup/rollup-android-arm-eabi@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.1.tgz#7f4c4d8cd5ccab6e95d6750dbe00321c1f30791e" + integrity sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ== + +"@rollup/rollup-android-arm64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.1.tgz#17ea71695fb1518c2c324badbe431a0bd1879f2d" + integrity sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA== + +"@rollup/rollup-darwin-arm64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.1.tgz#dac0f0d0cfa73e7d5225ae6d303c13c8979e7999" + integrity sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ== + +"@rollup/rollup-darwin-x64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.1.tgz#8f63baa1d31784904a380d2e293fa1ddf53dd4a2" + integrity sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ== + +"@rollup/rollup-freebsd-arm64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.1.tgz#30ed247e0df6e8858cdc6ae4090e12dbeb8ce946" + integrity sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA== + +"@rollup/rollup-freebsd-x64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.1.tgz#57846f382fddbb508412ae07855b8a04c8f56282" + integrity sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ== + +"@rollup/rollup-linux-arm-gnueabihf@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.1.tgz#378ca666c9dae5e6f94d1d351e7497c176e9b6df" + integrity sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA== + +"@rollup/rollup-linux-arm-musleabihf@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.1.tgz#a692eff3bab330d5c33a5d5813a090c15374cddb" + integrity sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg== + +"@rollup/rollup-linux-arm64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.1.tgz#6b1719b76088da5ac1ae1feccf48c5926b9e3db9" + integrity sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA== + +"@rollup/rollup-linux-arm64-musl@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.1.tgz#865baf5b6f5ff67acb32e5a359508828e8dc5788" + integrity sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A== + +"@rollup/rollup-linux-loongarch64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.28.1.tgz#23c6609ba0f7fa7a7f2038b6b6a08555a5055a87" + integrity sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.1.tgz#652ef0d9334a9f25b9daf85731242801cb0fc41c" + integrity sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A== + +"@rollup/rollup-linux-riscv64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.1.tgz#1eb6651839ee6ebca64d6cc64febbd299e95e6bd" + integrity sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA== + +"@rollup/rollup-linux-s390x-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.1.tgz#015c52293afb3ff2a293cf0936b1d43975c1e9cd" + integrity sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg== + +"@rollup/rollup-linux-x64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.1.tgz#b83001b5abed2bcb5e2dbeec6a7e69b194235c1e" + integrity sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw== + +"@rollup/rollup-linux-x64-musl@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.1.tgz#6cc7c84cd4563737f8593e66f33b57d8e228805b" + integrity sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g== + +"@rollup/rollup-win32-arm64-msvc@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.1.tgz#631ffeee094d71279fcd1fe8072bdcf25311bc11" + integrity sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A== + +"@rollup/rollup-win32-ia32-msvc@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.1.tgz#06d1d60d5b9f718e8a6c4a43f82e3f9e3254587f" + integrity sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA== + +"@rollup/rollup-win32-x64-msvc@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.1.tgz#4dff5c4259ebe6c5b4a8f2c5bc3829b7a8447ff0" + integrity sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA== + "@rtsao/scc@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g== -"@types/estree@^1.0.6": +"@types/estree@1.0.6", "@types/estree@^1.0.6": version "1.0.6" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== @@ -660,6 +875,27 @@ es-errors@^1.2.1, es-errors@^1.3.0: resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== +es-iterator-helpers@^1.0.19: + version "1.2.0" + resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.2.0.tgz#2f1a3ab998b30cb2d10b195b587c6d9ebdebf152" + integrity sha512-tpxqxncxnpw3c93u8n3VOzACmRFoVmWJqbWXvX/JfKbkhBw1oslgPrUfeSt2psuqyEJFD6N/9lg5i7bsKpoq+Q== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.3" + es-errors "^1.3.0" + es-set-tostringtag "^2.0.3" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + globalthis "^1.0.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + internal-slot "^1.0.7" + iterator.prototype "^1.1.3" + safe-array-concat "^1.1.2" + es-iterator-helpers@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.1.0.tgz#f6d745d342aea214fe09497e7152170dc333a7a6" @@ -712,6 +948,36 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +esbuild@0.24.0: + version "0.24.0" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.24.0.tgz#f2d470596885fcb2e91c21eb3da3b3c89c0b55e7" + integrity sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ== + optionalDependencies: + "@esbuild/aix-ppc64" "0.24.0" + "@esbuild/android-arm" "0.24.0" + "@esbuild/android-arm64" "0.24.0" + "@esbuild/android-x64" "0.24.0" + "@esbuild/darwin-arm64" "0.24.0" + "@esbuild/darwin-x64" "0.24.0" + "@esbuild/freebsd-arm64" "0.24.0" + "@esbuild/freebsd-x64" "0.24.0" + "@esbuild/linux-arm" "0.24.0" + "@esbuild/linux-arm64" "0.24.0" + "@esbuild/linux-ia32" "0.24.0" + "@esbuild/linux-loong64" "0.24.0" + "@esbuild/linux-mips64el" "0.24.0" + "@esbuild/linux-ppc64" "0.24.0" + "@esbuild/linux-riscv64" "0.24.0" + "@esbuild/linux-s390x" "0.24.0" + "@esbuild/linux-x64" "0.24.0" + "@esbuild/netbsd-x64" "0.24.0" + "@esbuild/openbsd-arm64" "0.24.0" + "@esbuild/openbsd-x64" "0.24.0" + "@esbuild/sunos-x64" "0.24.0" + "@esbuild/win32-arm64" "0.24.0" + "@esbuild/win32-ia32" "0.24.0" + "@esbuild/win32-x64" "0.24.0" + escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" @@ -1018,6 +1284,11 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" +fsevents@~2.3.2, fsevents@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + function-bind@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" @@ -1490,16 +1761,16 @@ minimist@^1.2.0, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@^2.1.1: +ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +nanoid@^3.3.7: + version "3.3.8" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" + integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -1615,6 +1886,11 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -1625,6 +1901,15 @@ possible-typed-array-names@^1.0.0: resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== +postcss@^8.4.49: + version "8.4.49" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.49.tgz#4ea479048ab059ab3ae61d082190fabfd994fe19" + integrity sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA== + dependencies: + nanoid "^3.3.7" + picocolors "^1.1.1" + source-map-js "^1.2.1" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -1717,6 +2002,34 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rollup@^4.23.0: + version "4.28.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.28.1.tgz#7718ba34d62b449dfc49adbfd2f312b4fe0df4de" + integrity sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg== + dependencies: + "@types/estree" "1.0.6" + optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.28.1" + "@rollup/rollup-android-arm64" "4.28.1" + "@rollup/rollup-darwin-arm64" "4.28.1" + "@rollup/rollup-darwin-x64" "4.28.1" + "@rollup/rollup-freebsd-arm64" "4.28.1" + "@rollup/rollup-freebsd-x64" "4.28.1" + "@rollup/rollup-linux-arm-gnueabihf" "4.28.1" + "@rollup/rollup-linux-arm-musleabihf" "4.28.1" + "@rollup/rollup-linux-arm64-gnu" "4.28.1" + "@rollup/rollup-linux-arm64-musl" "4.28.1" + "@rollup/rollup-linux-loongarch64-gnu" "4.28.1" + "@rollup/rollup-linux-powerpc64le-gnu" "4.28.1" + "@rollup/rollup-linux-riscv64-gnu" "4.28.1" + "@rollup/rollup-linux-s390x-gnu" "4.28.1" + "@rollup/rollup-linux-x64-gnu" "4.28.1" + "@rollup/rollup-linux-x64-musl" "4.28.1" + "@rollup/rollup-win32-arm64-msvc" "4.28.1" + "@rollup/rollup-win32-ia32-msvc" "4.28.1" + "@rollup/rollup-win32-x64-msvc" "4.28.1" + fsevents "~2.3.2" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -1797,6 +2110,11 @@ side-channel@^1.0.4, side-channel@^1.0.6: get-intrinsic "^1.2.4" object-inspect "^1.13.1" +source-map-js@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" + integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== + string.prototype.includes@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz#eceef21283640761a81dbe16d6c7171a4edf7d92" @@ -1999,6 +2317,17 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +vite@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/vite/-/vite-6.0.5.tgz#1d0fbdb3ffe61e944089abeddb7d2c509420acfd" + integrity sha512-akD5IAH/ID5imgue2DYhzsEwCi0/4VKY31uhMLEYJwPP4TiUp8pL5PIK+Wo7H8qT8JY9i+pVfPydcFPYD1EL7g== + dependencies: + esbuild "0.24.0" + postcss "^8.4.49" + rollup "^4.23.0" + optionalDependencies: + fsevents "~2.3.3" + which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6"