Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: update dependencies and add new rules #15

Merged
merged 1 commit into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
673 changes: 337 additions & 336 deletions .yarn/releases/yarn-4.5.1.cjs → .yarn/releases/yarn-4.7.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ logFilters:

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.1.cjs
yarnPath: .yarn/releases/yarn-4.7.0.cjs
69 changes: 34 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -270,57 +270,56 @@
"author": "iCrawl <[email protected]>",
"license": "Apache-2.0",
"dependencies": {
"@angular-eslint/eslint-plugin": "^19.0.2",
"@angular-eslint/eslint-plugin-template": "^19.0.2",
"@angular-eslint/template-parser": "^19.0.2",
"@eslint/compat": "^1.2.4",
"@next/eslint-plugin-next": "^15.1.0",
"@stylistic/eslint-plugin": "^2.12.1",
"@stylistic/eslint-plugin-jsx": "^2.12.1",
"@stylistic/eslint-plugin-ts": "^2.12.1",
"@angular-eslint/eslint-plugin": "^19.2.1",
"@angular-eslint/eslint-plugin-template": "^19.2.1",
"@angular-eslint/template-parser": "^19.2.1",
"@eslint/compat": "^1.2.7",
"@next/eslint-plugin-next": "^15.2.2",
"@stylistic/eslint-plugin": "^4.2.0",
"@stylistic/eslint-plugin-jsx": "^4.2.0",
"@stylistic/eslint-plugin-ts": "^4.2.0",
"@types/lodash.merge": "^4.6.9",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"astro-eslint-parser": "^1.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-mdx": "^3.1.5",
"@typescript-eslint/eslint-plugin": "^8.26.1",
"@typescript-eslint/parser": "^8.26.1",
"astro-eslint-parser": "^1.2.1",
"eslint-config-prettier": "^10.1.1",
"eslint-import-resolver-typescript": "^3.9.1",
"eslint-mdx": "^3.2.0",
"eslint-plugin-astro": "^1.3.1",
"eslint-plugin-cypress": "^4.1.0",
"eslint-plugin-import-x": "^4.5.0",
"eslint-plugin-jsdoc": "^50.6.1",
"eslint-plugin-cypress": "^4.2.0",
"eslint-plugin-import-x": "^4.8.0",
"eslint-plugin-jsdoc": "^50.6.7",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-mdx": "^3.1.5",
"eslint-plugin-n": "^17.15.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-mdx": "^3.2.0",
"eslint-plugin-n": "^17.16.2",
"eslint-plugin-promise": "^7.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.16",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.19",
"eslint-plugin-rxjs": "^5.0.3",
"eslint-plugin-rxjs-angular": "^2.0.1",
"eslint-plugin-sonarjs": "^2.0.4",
"eslint-plugin-sonarjs": "^3.0.2",
"eslint-plugin-svelte3": "^4.0.0",
"eslint-plugin-tsdoc": "^0.4.0",
"eslint-plugin-typescript-sort-keys": "^3.3.0",
"eslint-plugin-unicorn": "^56.0.1",
"eslint-plugin-vue": "^9.32.0",
"globals": "^15.13.0",
"eslint-plugin-unicorn": "^57.0.0",
"eslint-plugin-vue": "^10.0.0",
"globals": "^16.0.0",
"lodash.merge": "^4.6.2",
"typescript-eslint": "^8.18.0",
"vue-eslint-parser": "^9.4.3"
"typescript-eslint": "^8.26.1",
"vue-eslint-parser": "^10.1.1"
},
"devDependencies": {
"@sapphire/node-utilities": "^1.0.2",
"esbuild-plugin-file-path-extensions": "^2.1.4",
"eslint": "^9.16.0",
"prettier": "^3.4.2",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
"eslint": "^9.22.0",
"prettier": "^3.5.3",
"tsup": "^8.4.0",
"tsx": "^4.19.3",
"typescript": "^5.8.2"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"packageManager": "yarn@4.5.1"
"packageManager": "yarn@4.7.0"
}
4 changes: 3 additions & 1 deletion src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ const rules: TSESLint.FlatConfig.Rules = {
name: "error",
},
],
"unicorn/consistent-assert": 2,
"unicorn/consistent-destructuring": 0,
"unicorn/consistent-function-scoping": 2,
"unicorn/custom-error-definition": 0,
Expand Down Expand Up @@ -414,9 +415,11 @@ const rules: TSESLint.FlatConfig.Rules = {
"unicorn/no-for-loop": 2,
"unicorn/no-hex-escape": 2,
"unicorn/no-instanceof-array": 2,
"unicorn/no-instanceof-builtins": [2, { strategy: "loose" }],
"unicorn/no-invalid-remove-event-listener": 2,
"unicorn/no-keyword-prefix": 0,
"unicorn/no-lonely-if": 2,
"unicorn/no-named-default": 2,
"unicorn/no-nested-ternary": 0,
"unicorn/no-new-array": 2,
"unicorn/no-new-buffer": 2,
Expand All @@ -429,7 +432,6 @@ const rules: TSESLint.FlatConfig.Rules = {
"unicorn/no-unnecessary-await": 2,
"unicorn/no-unreadable-array-destructuring": 0,
"unicorn/no-unreadable-iife": 2,
"unicorn/no-unsafe-regex": 2,
"unicorn/no-unused-properties": 2,
"unicorn/no-useless-fallback-in-spread": 2,
"unicorn/no-useless-length-check": 2,
Expand Down
4 changes: 2 additions & 2 deletions src/jsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ const rules: TSESLint.FlatConfig.Rules = {
"react-refresh/only-export-components": 1,

// Unicorn
"unicorn/consistent-function-scoping": 0, // We disable this because in React it's a common thing to have functions in functions
// We disable this because in React it's a common thing to have functions in functions
"unicorn/consistent-function-scoping": 0,

// Stylistic
"@stylistic/jsx/jsx-child-element-spacing": 0,
Expand Down Expand Up @@ -131,7 +132,6 @@ const config: TSESLint.FlatConfig.ConfigArray = [
},
plugins: {
"react-refresh": eslintPluginReactRefresh,
// @ts-expect-error eslint-plugin-react is poorly typed
react: eslintPluginReact,
},
rules,
Expand Down
186 changes: 1 addition & 185 deletions src/prettier.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { TSESLint } from "@typescript-eslint/utils";
// @ts-expect-error eslint-config-prettier is not typed
import eslintConfigPrettier from "eslint-config-prettier";

const rules: TSESLint.FlatConfig.Rules = {
Expand All @@ -8,195 +7,12 @@ const rules: TSESLint.FlatConfig.Rules = {
"line-comment-position": 0,
"no-inline-comments": 0,

// Stylistic rules enabled by either /react that should be disabled when using Prettier
// Stylistic rules enabled by /jsx or /react that should be disabled when using Prettier
"@stylistic/jsx/jsx-one-expression-per-line": 0,
"@stylistic/jsx/jsx-newline": 0,
"@stylistic/jsx/jsx-props-no-multi-spaces": 0,
"@stylistic/jsx/jsx-tag-spacing": 0,
"@stylistic/jsx/jsx-wrap-multilines": 0,

// TODO: This should be removed when https://github.com/prettier/eslint-config-prettier/pull/272 is merged and released to eslint-config-prettier
"@stylistic/array-bracket-newline": 0,
"@stylistic/array-bracket-spacing": 0,
"@stylistic/array-element-newline": 0,
"@stylistic/arrow-parens": 0,
"@stylistic/arrow-spacing": 0,
"@stylistic/block-spacing": 0,
"@stylistic/brace-style": 0,
"@stylistic/comma-dangle": 0,
"@stylistic/comma-spacing": 0,
"@stylistic/comma-style": 0,
"@stylistic/computed-property-spacing": 0,
"@stylistic/dot-location": 0,
"@stylistic/eol-last": 0,
"@stylistic/func-call-spacing": 0,
"@stylistic/function-call-argument-newline": 0,
"@stylistic/function-call-spacing": 0,
"@stylistic/function-paren-newline": 0,
"@stylistic/generator-star-spacing": 0,
"@stylistic/implicit-arrow-linebreak": 0,
"@stylistic/indent-binary-ops": 0,
"@stylistic/indent": 0,
"@stylistic/js/array-bracket-newline": 0,
"@stylistic/js/array-bracket-spacing": 0,
"@stylistic/js/array-element-newline": 0,
"@stylistic/js/arrow-parens": 0,
"@stylistic/js/arrow-spacing": 0,
"@stylistic/js/block-spacing": 0,
"@stylistic/js/brace-style": 0,
"@stylistic/js/comma-dangle": 0,
"@stylistic/js/comma-spacing": 0,
"@stylistic/js/comma-style": 0,
"@stylistic/js/computed-property-spacing": 0,
"@stylistic/js/dot-location": 0,
"@stylistic/js/eol-last": 0,
"@stylistic/js/func-call-spacing": 0,
"@stylistic/js/function-call-argument-newline": 0,
"@stylistic/js/function-call-spacing": 0,
"@stylistic/js/function-paren-newline": 0,
"@stylistic/js/generator-star-spacing": 0,
"@stylistic/js/implicit-arrow-linebreak": 0,
"@stylistic/js/indent": 0,
"@stylistic/js/jsx-quotes": 0,
"@stylistic/js/key-spacing": 0,
"@stylistic/js/keyword-spacing": 0,
"@stylistic/js/line-comment-position": 0,
"@stylistic/js/linebreak-style": 0,
"@stylistic/js/lines-around-comment": 0,
"@stylistic/js/max-len": 0,
"@stylistic/js/max-statements-per-line": 0,
"@stylistic/js/multiline-ternary": 0,
"@stylistic/js/new-parens": 0,
"@stylistic/js/newline-per-chained-call": 0,
"@stylistic/js/no-confusing-arrow": 0,
"@stylistic/js/no-extra-parens": 0,
"@stylistic/js/no-extra-semi": 0,
"@stylistic/js/no-floating-decimal": 0,
"@stylistic/js/no-mixed-operators": 0,
"@stylistic/js/no-mixed-spaces-and-tabs": 0,
"@stylistic/js/no-multi-spaces": 0,
"@stylistic/js/no-multiple-empty-lines": 0,
"@stylistic/js/no-tabs": 0,
"@stylistic/js/no-trailing-spaces": 0,
"@stylistic/js/no-whitespace-before-property": 0,
"@stylistic/js/nonblock-statement-body-position": 0,
"@stylistic/js/object-curly-newline": 0,
"@stylistic/js/object-curly-spacing": 0,
"@stylistic/js/object-property-newline": 0,
"@stylistic/js/one-var-declaration-per-line": 0,
"@stylistic/js/operator-linebreak": 0,
"@stylistic/js/padded-blocks": 0,
"@stylistic/js/quote-props": 0,
"@stylistic/js/quotes": 0,
"@stylistic/js/rest-spread-spacing": 0,
"@stylistic/js/semi-spacing": 0,
"@stylistic/js/semi-style": 0,
"@stylistic/js/semi": 0,
"@stylistic/js/space-before-blocks": 0,
"@stylistic/js/space-before-function-paren": 0,
"@stylistic/js/space-in-parens": 0,
"@stylistic/js/space-infix-ops": 0,
"@stylistic/js/space-unary-ops": 0,
"@stylistic/js/switch-colon-spacing": 0,
"@stylistic/js/template-curly-spacing": 0,
"@stylistic/js/template-tag-spacing": 0,
"@stylistic/js/wrap-iife": 0,
"@stylistic/js/wrap-regex": 0,
"@stylistic/js/yield-star-spacing": 0,
"@stylistic/jsx-child-element-spacing": 0,
"@stylistic/jsx-closing-bracket-location": 0,
"@stylistic/jsx-closing-tag-location": 0,
"@stylistic/jsx-curly-newline": 0,
"@stylistic/jsx-curly-spacing": 0,
"@stylistic/jsx-equals-spacing": 0,
"@stylistic/jsx-first-prop-new-line": 0,
"@stylistic/jsx-indent-props": 0,
"@stylistic/jsx-indent": 0,
"@stylistic/jsx-max-props-per-line": 0,
"@stylistic/jsx-newline": 0,
"@stylistic/jsx-one-expression-per-line": 0,
"@stylistic/jsx-props-no-multi-spaces": 0,
"@stylistic/jsx-quotes": 0,
"@stylistic/jsx-tag-spacing": 0,
"@stylistic/jsx-wrap-multilines": 0,
"@stylistic/jsx/jsx-child-element-spacing": 0,
"@stylistic/jsx/jsx-closing-bracket-location": 0,
"@stylistic/jsx/jsx-closing-tag-location": 0,
"@stylistic/jsx/jsx-curly-newline": 0,
"@stylistic/jsx/jsx-curly-spacing": 0,
"@stylistic/jsx/jsx-equals-spacing": 0,
"@stylistic/jsx/jsx-first-prop-new-line": 0,
"@stylistic/jsx/jsx-indent-props": 0,
"@stylistic/jsx/jsx-indent": 0,
"@stylistic/jsx/jsx-max-props-per-line": 0,
"@stylistic/key-spacing": 0,
"@stylistic/keyword-spacing": 0,
"@stylistic/linebreak-style": 0,
"@stylistic/lines-around-comment": 0,
"@stylistic/max-len": 0,
"@stylistic/max-statements-per-line": 0,
"@stylistic/member-delimiter-style": 0,
"@stylistic/multiline-ternary": 0,
"@stylistic/new-parens": 0,
"@stylistic/newline-per-chained-call": 0,
"@stylistic/no-confusing-arrow": 0,
"@stylistic/no-extra-parens": 0,
"@stylistic/no-extra-semi": 0,
"@stylistic/no-floating-decimal": 0,
"@stylistic/no-mixed-operators": 0,
"@stylistic/no-mixed-spaces-and-tabs": 0,
"@stylistic/no-multi-spaces": 0,
"@stylistic/no-multiple-empty-lines": 0,
"@stylistic/no-tabs": 0,
"@stylistic/no-trailing-spaces": 0,
"@stylistic/no-whitespace-before-property": 0,
"@stylistic/nonblock-statement-body-position": 0,
"@stylistic/object-curly-newline": 0,
"@stylistic/object-curly-spacing": 0,
"@stylistic/object-property-newline": 0,
"@stylistic/one-var-declaration-per-line": 0,
"@stylistic/operator-linebreak": 0,
"@stylistic/padded-blocks": 0,
"@stylistic/quote-props": 0,
"@stylistic/quotes": 0,
"@stylistic/rest-spread-spacing": 0,
"@stylistic/semi-spacing": 0,
"@stylistic/semi-style": 0,
"@stylistic/semi": 0,
"@stylistic/space-before-blocks": 0,
"@stylistic/space-before-function-paren": 0,
"@stylistic/space-in-parens": 0,
"@stylistic/space-infix-ops": 0,
"@stylistic/space-unary-ops": 0,
"@stylistic/switch-colon-spacing": 0,
"@stylistic/template-curly-spacing": 0,
"@stylistic/template-tag-spacing": 0,
"@stylistic/ts/block-spacing": 0,
"@stylistic/ts/brace-style": 0,
"@stylistic/ts/comma-dangle": 0,
"@stylistic/ts/comma-spacing": 0,
"@stylistic/ts/func-call-spacing": 0,
"@stylistic/ts/function-call-spacing": 0,
"@stylistic/ts/indent": 0,
"@stylistic/ts/key-spacing": 0,
"@stylistic/ts/keyword-spacing": 0,
"@stylistic/ts/lines-around-comment": 0,
"@stylistic/ts/member-delimiter-style": 0,
"@stylistic/ts/no-extra-parens": 0,
"@stylistic/ts/no-extra-semi": 0,
"@stylistic/ts/object-curly-spacing": 0,
"@stylistic/ts/quotes": 0,
"@stylistic/ts/semi": 0,
"@stylistic/ts/space-before-blocks": 0,
"@stylistic/ts/space-before-function-paren": 0,
"@stylistic/ts/space-infix-ops": 0,
"@stylistic/ts/type-annotation-spacing": 0,
"@stylistic/type-annotation-spacing": 0,
"@stylistic/type-generic-spacing": 0,
"@stylistic/type-named-tuple-spacing": 0,
"@stylistic/wrap-iife": 0,
"@stylistic/wrap-regex": 0,
"@stylistic/yield-star-spacing": 0,
};

const config: TSESLint.FlatConfig.ConfigArray = [
Expand Down
9 changes: 3 additions & 6 deletions src/react.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { fixupPluginRules } from "@eslint/compat";
import type { TSESLint } from "@typescript-eslint/utils";
import eslintPluginReact from "eslint-plugin-react";
// @ts-expect-error eslint-plugin-react-hooks is not typed
import eslintPluginReactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import jsx from "./jsx";
Expand Down Expand Up @@ -83,7 +81,8 @@ const rules: TSESLint.FlatConfig.Rules = {
"react-refresh/only-export-components": 1,

// Unicorn
"unicorn/consistent-function-scoping": 0, // We disable this because in React it's a common thing to have functions in functions
// We disable this because in React it's a common thing to have functions in functions
"unicorn/consistent-function-scoping": 0,
};

const settings: TSESLint.FlatConfig.Settings = {
Expand All @@ -93,14 +92,12 @@ const settings: TSESLint.FlatConfig.Settings = {
};

const config: TSESLint.FlatConfig.ConfigArray = [
// @ts-expect-error eslint-plugin-react is poorly typed
...jsx,
{
// @ts-expect-error eslint-plugin-react is poorly typed
plugins: {
react: eslintPluginReact,
"react-refresh": reactRefresh,
"react-hooks": fixupPluginRules(eslintPluginReactHooks),
"react-hooks": eslintPluginReactHooks,
},
rules,
settings,
Expand Down
Loading