From c18443e6ff84487204ee662314cb4e2f2d1be22b Mon Sep 17 00:00:00 2001 From: Philipp Kewisch Date: Wed, 10 Apr 2024 13:17:15 +0200 Subject: [PATCH] Remove deprecated and double eslint rules --- eslint.config.js | 214 ++++--------------- package-lock.json | 535 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 1 + rollup.config.js | 2 +- 4 files changed, 581 insertions(+), 171 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index ea4f30d5..2b9e762f 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,5 +1,6 @@ import js from "@eslint/js"; import globals from "globals"; +import stylistic from '@stylistic/eslint-plugin'; export default [ { @@ -15,6 +16,9 @@ export default [ }, js.configs.recommended, { + plugins: { + "@stylistic": stylistic + }, languageOptions: { globals: { ...globals.es2021 @@ -23,118 +27,63 @@ export default [ rules: { // Enforce one true brace style (opening brace on the same line) // Allow single line (for now) because of the vast number of changes needed - "brace-style": ["error", "1tbs", { allowSingleLine: true }], + "@stylistic/brace-style": ["error", "1tbs", { allowSingleLine: true }], // Enforce newline at the end of file, with no multiple empty lines. - "eol-last": "error", + "@stylistic/eol-last": "error", // Disallow using variables outside the blocks they are defined //"block-scoped-var": "error", // Allow trailing commas for easy list extension. Having them does not // impair readability, but also not required either. - "comma-dangle": 0, + "@stylistic/comma-dangle": 0, // Enforce spacing before and after comma - "comma-spacing": ["error", { before: false, after: true }], + "@stylistic/comma-spacing": ["error", { before: false, after: true }], // Enforce one true comma style. - "comma-style": ["error", "last"], + "@stylistic/comma-style": ["error", "last"], // Enforce curly brace conventions for all control statements. //"curly": "error", // Enforce the spacing around the * in generator functions. - "generator-star-spacing": ["error", "after"], + "@stylistic/generator-star-spacing": ["error", "after"], // Require space before/after arrow function's arrow - "arrow-spacing": ["error", { before: true, after: true }], + "@stylistic/arrow-spacing": ["error", { before: true, after: true }], // Enforces spacing between keys and values in object literal properties. - "key-spacing": ["error", { beforeColon: false, afterColon: true, mode: "minimum" }], + "@stylistic/key-spacing": ["error", { beforeColon: false, afterColon: true, mode: "minimum" }], // Disallow the omission of parentheses when invoking a constructor with no // arguments. - "new-parens": "error", + "@stylistic/new-parens": "error", // Disallow use of the Array constructor. "no-array-constructor": "error", // disallow use of the Object constructor - "no-new-object": "error", + "no-object-constructor": "error", // Disallow Primitive Wrapper Instances "no-new-wrappers": "error", - // Disallow the catch clause parameter name being the same as a variable in - // the outer scope, to avoid confusion. - "no-catch-shadow": "error", - - // Disallow assignment in conditional expressions. - "no-cond-assign": "error", - - // Disallow use of debugger. - "no-debugger": "error", - - // Disallow deletion of variables (deleting properties is fine). - "no-delete-var": "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 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 adding to native types "no-extend-native": "error", - // Disallow double-negation boolean casts in a boolean context. - "no-extra-boolean-cast": "error", - // Disallow unnecessary semicolons. - "no-extra-semi": "error", + "@stylistic/no-extra-semi": "error", // Disallow mixed spaces and tabs for indentation. - "no-mixed-spaces-and-tabs": "error", - - // Disallow reassignments of native objects. - "no-native-reassign": "error", - - // Disallow use of octal literals. - "no-octal": "error", + "@stylistic/no-mixed-spaces-and-tabs": "error", // Disallow comparisons where both sides are exactly the same. "no-self-compare": "error", - // Disallow sparse arrays, eg. let arr = [,,2]. - // Array destructuring is fine though: - // for (let [, breakpointPromise] of aPromises) - "no-sparse-arrays": "error", - // Disallow trailing whitespace at the end of lines. - "no-trailing-spaces": "error", - - // Disallow use of the with statement. - "no-with": "error", - - // Disallow comparisons with the value NaN. - "use-isnan": "error", - - // Ensure that the results of typeof are compared against a valid string. - "valid-typeof": "error", - - // disallow the use of object properties of the global object (Math and - // JSON) as functions - "no-obj-calls": "error", + "@stylistic/no-trailing-spaces": "error", // disallow use of octal escape sequences in string literals, such as // var foo = "Copyright \251"; @@ -157,7 +106,7 @@ export default [ //"space-unary-ops": ["error", { "words": true, "nonwords": false }], // Enforce spacing after semicolons. - "semi-spacing": ["error", { before: false, after: true }], + "@stylistic/semi-spacing": ["error", { before: false, after: true }], // Disallow the use of Boolean literals in conditional expressions. "no-unneeded-ternary": "error", @@ -165,20 +114,17 @@ export default [ // Disallow use of multiple spaces (sometimes used to align const values, // array or object items, etc.). It's hard to maintain and doesn't add that // much benefit. - "no-multi-spaces": "error", + "@stylistic/no-multi-spaces": "error", // Require spaces around operators, except for a|0. // Disabled for now given eslint doesn't support default args yet // "space-infix-ops": ["error", {"int32Hint": true}], // Require a space around all keywords. - "keyword-spacing": "error", + "@stylistic/keyword-spacing": "error", // Disallow space between function identifier and application. - "no-spaced-func": "error", - - // Disallow shadowing of names such as arguments. - "no-shadow-restricted-names": "error", + "@stylistic/func-call-spacing": "error", // Disallow use of comma operator. "no-sequences": "error", @@ -194,28 +140,14 @@ export default [ //"padded-blocks": ["error", "never"], // Disallow spaces inside parentheses. - "space-in-parens": ["error", "never"], + "@stylistic/space-in-parens": ["error", "never"], // Require space after keyword for anonymous functions, but disallow space // after name of named functions. - "space-before-function-paren": ["error", { anonymous: "never", named: "never" }], - - // Disallow unreachable statements after a return, throw, continue, or break - // statement. - "no-unreachable": "error", + "@stylistic/space-before-function-paren": ["error", { anonymous: "never", named: "never" }], // Always require use of semicolons wherever they are valid. - "semi": ["error", "always"], - - // Disallow empty statements. This will report an error for: - // try { something(); } catch (e) {} - // but will not report it for: - // try { something(); } catch (e) { /* Silencing the error because ...*/ } - // which is a valid use case. - "no-empty": "error", - - // Disallow declaring the same variable more than once (we use let anyway). - "no-redeclare": "error", + "@stylistic/semi": ["error", "always"], // Warn about declaration of variables already declared in the outer scope. "no-shadow": "error", @@ -224,25 +156,10 @@ export default [ "no-unused-vars": ["error", { vars: "all", args: "none" }], // Require padding inside curly braces - "object-curly-spacing": ["error", "always"], + "@stylistic/object-curly-spacing": ["error", "always"], // Disallow spaces inside of brackets - "array-bracket-spacing": ["error", "never"], - - // Disallow control characters in regular expressions - "no-control-regex": "error", - - // Disallow invalid regular expression strings in RegExp constructors - "no-invalid-regexp": "error", - - // Disallow multiple spaces in regular expression literals - "no-regex-spaces": "error", - - // Disallow irregular whitespace - "no-irregular-whitespace": "error", - - // Disallow negating the left operand in `in` expressions - "no-negated-in-lhs": "error", + "@stylistic/array-bracket-spacing": ["error", "never"], // Disallow constant expressions in conditions //"no-constant-condition": ["error", {"checkLoops": false }], @@ -254,50 +171,23 @@ export default [ "no-iterator": "error", // Enforce consistent linebreak style - "linebreak-style": ["error", "unix"], + "@stylistic/linebreak-style": ["error", "unix"], // Enforces return statements in callbacks of array's methods "array-callback-return": "error", - // Verify super() calls in constructors - "constructor-super": "error", - - // Disallow modifying variables of class declarations - "no-class-assign": "error", - - // Disallow modifying variables that are declared using const - "no-const-assign": "error", - - // Disallow duplicate name in class members - "no-dupe-class-members": "error", - - // Disallow use of this/super before calling super() in constructors - "no-this-before-super": "error", - // Disallow duplicate imports "no-duplicate-imports": "error", - // Disallow empty destructuring patterns - "no-empty-pattern": "error", - // Disallow Labeled Statements "no-labels": "error", // Disallow Multiline Strings "no-multi-str": "error", - // Disallow Symbol Constructor - "no-new-symbol": "error", - // Disallow Initializing to undefined "no-undef-init": "error", - // Disallow control flow statements in finally blocks - "no-unsafe-finally": "error", - - // Disallow Unused Labels - "no-unused-labels": "error", - // Disallow unnecessary computed property keys on objects "no-useless-computed-key": "error", @@ -309,16 +199,16 @@ export default [ "no-useless-rename": "error", // Enforce spacing between rest and spread operators and their expressions - "rest-spread-spacing": ["error", "never"], + "@stylistic/rest-spread-spacing": ["error", "never"], // Disallow usage of spacing in template string expressions - "template-curly-spacing": ["error", "never"], + "@stylistic/template-curly-spacing": ["error", "never"], // Disallow the Unicode Byte Order Mark "unicode-bom": ["error", "never"], // Enforce spacing around the * in yield* expressions - "yield-star-spacing": ["error", "after"], + "@stylistic/yield-star-spacing": ["error", "after"], // Disallow Implied eval "no-implied-eval": "error", @@ -329,12 +219,6 @@ export default [ // Disallow new For Side Effects "no-new": "error", - // Disallow Self Assignment - "no-self-assign": "error", - - // Disallow confusing multiline expressions - "no-unexpected-multiline": "error", - // Require IIFEs to be Wrapped //"wrap-iife": ["error", "inside"], @@ -345,22 +229,19 @@ export default [ "no-inner-declarations": "error", // Enforce newline before and after dot - "dot-location": ["error", "property"], + "@stylistic/dot-location": ["error", "property"], // Disallow Use of caller/callee "no-caller": "error", - // Disallow Case Statement Fallthrough - "no-fallthrough": "error", - // Disallow Floating Decimals - "no-floating-decimal": "error", + "@stylistic/no-floating-decimal": "error", // Require Space Before Blocks - "space-before-blocks": "error", + "@stylistic/space-before-blocks": "error", // Operators always before the line break - "operator-linebreak": ["error", "after", { overrides: { ":": "before", "?": "ignore" } }], + "@stylistic/operator-linebreak": ["error", "after", { overrides: { ":": "before", "?": "ignore" } }], // Restricts the use of parentheses to only where they are necessary //"no-extra-parens": ["error", "all", { "conditionalAssign": false, "returnAssign": false, "nestedBinaryExpressions": false }], @@ -370,7 +251,7 @@ export default [ // Not more than two empty lines with in the file, and no extra lines at // beginning or end of file. - "no-multiple-empty-lines": ["error", { max: 2, maxEOF: 0, maxBOF: 0 }], + "@stylistic/no-multiple-empty-lines": ["error", { max: 2, maxEOF: 0, maxBOF: 0 }], // Make sure all setters have a corresponding getter "accessor-pairs": "error", @@ -379,7 +260,7 @@ export default [ //"block-spacing": ["error", "always"], // Disallow spaces inside of computed properties - "computed-property-spacing": ["error", "never"], + "@stylistic/computed-property-spacing": ["error", "never"], // Require consistent this (using |self|) "consistent-this": ["error", "self"], @@ -394,16 +275,13 @@ export default [ //"func-names": ["error", "never"], // Enforce placing object properties on separate lines - "object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }], + "@stylistic/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }], // Enforce consistent line breaks inside braces //"object-curly-newline": ["error", { "multiline": true }], // Disallow whitespace before properties - "no-whitespace-before-property": "error", - - // Disallow unnecessary escape usage - "no-useless-escape": "error", + "@stylistic/no-whitespace-before-property": "error", // Disallow mixes of different operators, but allow simple math operations. //"no-mixed-operators": ["error", { @@ -429,28 +307,23 @@ export default [ "prefer-spread": "error", // Quoting style for property names - //"quote-props": ["error", "consistent-as-needed", { "keywords": true }], + //"@stylistic/quote-props": ["error", "consistent-as-needed", { "keywords": true }], // Disallow negated conditions //"no-negated-condition": "error", // Enforce a maximum number of statements allowed per line - "max-statements-per-line": ["error", { max: 2 }], + "@stylistic/max-statements-per-line": ["error", { max: 2 }], // Disallow arrow functions where they could be confused with comparisons - "no-confusing-arrow": "error", + "@stylistic/no-confusing-arrow": "error", // Disallow Unnecessary Nested Blocks "no-lone-blocks": "error", - // Disallow lexical declarations in case/default clauses - "no-case-declarations": "error", - // Enforce consistent indentation (2-space) //"indent": ["error", 2, { "SwitchCase": 1 }], - "no-prototype-builtins": "error", - // Disallow var, use let or const instead "no-var": "error" } @@ -494,8 +367,11 @@ export default [ }, { files: ["eslint.config.js"], + plugins: { + "@stylistic": stylistic + }, rules: { - "quote-props": ["error", "consistent-as-needed"] + "@stylistic/quote-props": ["error", "consistent-as-needed"] } } ]; diff --git a/package-lock.json b/package-lock.json index ceaf9ef3..62386110 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,13 +6,14 @@ "packages": { "": { "name": "ical.js", - "version": "2.0.1", + "version": "2.0.0", "license": "MPL-2.0", "devDependencies": { "@babel/preset-env": "^7.24.3", "@eslint/js": "^9.0.0", "@octokit/core": "^6.0.1", "@rollup/plugin-babel": "^6.0.4", + "@stylistic/eslint-plugin": "^1.7.0", "benchmark": "^2.1.4", "c8": "^9.1.0", "chai": "^5.1.0", @@ -2536,6 +2537,249 @@ "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", "dev": true }, + "node_modules/@stylistic/eslint-plugin": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-1.7.0.tgz", + "integrity": "sha512-ThMUjGIi/jeWYNvOdjZkoLw1EOVs0tEuKXDgWvTn8uWaEz55HuPlajKxjKLpv19C+qRDbKczJfzUODfCdME53A==", + "dev": true, + "dependencies": { + "@stylistic/eslint-plugin-js": "1.7.0", + "@stylistic/eslint-plugin-jsx": "1.7.0", + "@stylistic/eslint-plugin-plus": "1.7.0", + "@stylistic/eslint-plugin-ts": "1.7.0", + "@types/eslint": "^8.56.2" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-js": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-1.7.0.tgz", + "integrity": "sha512-PN6On/+or63FGnhhMKSQfYcWutRlzOiYlVdLM6yN7lquoBTqUJHYnl4TA4MHwiAt46X5gRxDr1+xPZ1lOLcL+Q==", + "dev": true, + "dependencies": { + "@types/eslint": "^8.56.2", + "acorn": "^8.11.3", + "escape-string-regexp": "^4.0.0", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-js/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@stylistic/eslint-plugin-js/node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@stylistic/eslint-plugin-jsx": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-1.7.0.tgz", + "integrity": "sha512-BACdBwXakQvjYIST5N2WWhRbvhRsIxa/F59BiZol+0IH4FSmDXhie7v/yaxDIIA9CbfElzOmIA5nWNYTVXcnwQ==", + "dev": true, + "dependencies": { + "@stylistic/eslint-plugin-js": "^1.7.0", + "@types/eslint": "^8.56.2", + "estraverse": "^5.3.0", + "picomatch": "^4.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-jsx/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@stylistic/eslint-plugin-plus": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-1.7.0.tgz", + "integrity": "sha512-AabDw8sXsc70Ydx3qnbeTlRHZnIwY6UKEenBPURPhY3bfYWX+/pDpZH40HkOu94v8D0DUrocPkeeEUxl4e0JDg==", + "dev": true, + "dependencies": { + "@types/eslint": "^8.56.2", + "@typescript-eslint/utils": "^6.21.0" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@stylistic/eslint-plugin-plus/node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@stylistic/eslint-plugin-plus/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@stylistic/eslint-plugin-plus/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@stylistic/eslint-plugin-plus/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@stylistic/eslint-plugin-ts": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-1.7.0.tgz", + "integrity": "sha512-QsHv98mmW1xaucVYQTyLDgEpybPJ/6jPPxVBrIchntWWwj74xCWKUiw79hu+TpYj/Pbhd9rkqJYLNq3pQGYuyA==", + "dev": true, + "dependencies": { + "@stylistic/eslint-plugin-js": "1.7.0", + "@types/eslint": "^8.56.2", + "@typescript-eslint/utils": "^6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-ts/node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@stylistic/eslint-plugin-ts/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@stylistic/eslint-plugin-ts/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@stylistic/eslint-plugin-ts/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", @@ -2591,6 +2835,16 @@ "@types/node": "*" } }, + "node_modules/@types/eslint": { + "version": "8.56.7", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.7.tgz", + "integrity": "sha512-SjDvI/x3zsZnOkYZ3lCt9lOZWZLB2jIlNKz+LBgCtDurK0JZcwucxYHn1w2BJkD34dgX9Tjnak0txtq4WTggEA==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -2609,6 +2863,12 @@ "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "node_modules/@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -2677,6 +2937,12 @@ "@types/node": "*" } }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, "node_modules/@types/which": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/which/-/which-1.3.2.tgz", @@ -2693,6 +2959,138 @@ "@types/node": "*" } }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@wdio/config": { "version": "6.12.1", "resolved": "https://registry.npmjs.org/@wdio/config/-/config-6.12.1.tgz", @@ -3057,6 +3455,15 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", @@ -4740,6 +5147,18 @@ "node": ">=0.3.1" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/dom-serialize": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", @@ -5598,6 +6017,34 @@ "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", "dev": true }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -6169,6 +6616,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -7576,6 +8043,28 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", @@ -8288,6 +8777,15 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/pathval": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", @@ -9418,6 +9916,15 @@ "node": ">=10" } }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -9905,6 +10412,18 @@ "node": ">=0.10.0" } }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", @@ -9969,6 +10488,20 @@ "node": ">= 0.6" } }, + "node_modules/typescript": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", + "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/ua-parser-js": { "version": "0.7.37", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.37.tgz", diff --git a/package.json b/package.json index b8abdd16..13738585 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@eslint/js": "^9.0.0", "@octokit/core": "^6.0.1", "@rollup/plugin-babel": "^6.0.4", + "@stylistic/eslint-plugin": "^1.7.0", "benchmark": "^2.1.4", "c8": "^9.1.0", "chai": "^5.1.0", diff --git a/rollup.config.js b/rollup.config.js index 9f089be2..ac2ea43b 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -4,7 +4,7 @@ import { terser } from 'rollup-plugin-terser'; export default { input: 'lib/ical/module.js', output: [ - { file: 'dist/ical.js', format: 'es', exports: "default" }, + { file: 'dist/ical.js', format: 'es', exports: "default" }, { file: 'dist/ical.min.js', format: 'es',