Skip to content

Commit

Permalink
chore: merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
atheck committed Oct 31, 2024
1 parent e15c02a commit 5048f8d
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
push:
branches:
- main
- beta
- alpha

jobs:
release:
name: Release
Expand Down
36 changes: 33 additions & 3 deletions node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default [
},
},
rules: {
// Possible problems
"array-callback-return": [
"error",
{
Expand Down Expand Up @@ -126,6 +127,8 @@ export default [
"require-atomic-updates": "error",
"use-isnan": "error",
"valid-typeof": "error",

// Suggestions
"accessor-pairs": [
"error",
{
Expand Down Expand Up @@ -306,7 +309,6 @@ export default [
array: false,
object: true,
},

AssignmentExpression: {
array: false,
object: false,
Expand Down Expand Up @@ -347,20 +349,26 @@ export default [
onlyEquality: false,
},
],

// Layout & Formatting
"line-comment-position": "off",
"unicode-bom": "error",

// @stylistic
"@stylistic/jsx-pascal-case": "error",
"@stylistic/max-statements-per-line": "error",
"@stylistic/multiline-comment-style": ["error", "separate-lines"],
"@stylistic/no-floating-decimal": "error",
"@stylistic/no-mixed-operators": "error",
"@stylistic/padding-line-between-statements": [
"error",
// return
{
blankLine: "always",
prev: "*",
next: "return",
},
// const, let, var
{
blankLine: "always",
prev: ["const", "let", "var"],
Expand All @@ -376,6 +384,7 @@ export default [
prev: ["const", "let", "var"],
next: ["const", "let", "var"],
},
// import
{
blankLine: "always",
prev: ["import", "cjs-import"],
Expand All @@ -386,6 +395,7 @@ export default [
prev: ["import", "cjs-import"],
next: ["import", "cjs-import"],
},
// export
{
blankLine: "always",
prev: "*",
Expand All @@ -396,6 +406,7 @@ export default [
prev: ["export", "cjs-export"],
next: ["export", "cjs-export"],
},
// function
{
blankLine: "always",
prev: "*",
Expand All @@ -404,6 +415,8 @@ export default [
],
"@stylistic/quote-props": ["error", "as-needed"],
"@stylistic/spaced-comment": ["error", "always"],

// eslint-plugin-react
"react/boolean-prop-naming": "off",
"react/button-has-type": "error",
"react/checked-requires-onchange-or-readonly": "error",
Expand Down Expand Up @@ -585,8 +598,12 @@ export default [
"react/static-property-placement": "off",
"react/style-prop-object": "error",
"react/void-dom-elements-no-children": "error",

// eslint-plugin-react-hooks
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",

// eslint-plugin-unicorn
"unicorn/better-regex": "error",
"unicorn/catch-error-name": [
"error",
Expand Down Expand Up @@ -716,6 +733,8 @@ export default [
"unicorn/prefer-string-trim-start-end": "error",
"unicorn/prefer-structured-clone": "error",
"unicorn/prefer-switch": "error",

// TODO: off until there is a solution to this: https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1079
"unicorn/prefer-ternary": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/prefer-type-error": "error",
Expand All @@ -729,6 +748,8 @@ export default [
"unicorn/template-indent": "off",
"unicorn/text-encoding-identifier-case": "error",
"unicorn/throw-new-error": "error",

// eslint-plugin-import
"import/export": "off",
"import/no-deprecated": "off",
"import/no-empty-named-blocks": "error",
Expand Down Expand Up @@ -812,6 +833,7 @@ export default [
},
},
rules: {
// Typescript
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": [
"error",
Expand Down Expand Up @@ -873,7 +895,6 @@ export default [
{
selector: ["variableLike", "memberLike"],
format: ["strictCamelCase", "StrictPascalCase"],

filter: {
regex: "^__html$",
match: false,
Expand Down Expand Up @@ -1021,14 +1042,14 @@ export default [
array: false,
object: true,
},

AssignmentExpression: {
array: false,
object: false,
},
},
],
"@typescript-eslint/prefer-enum-initializers": "error",
// unicorns prefer-array-find is more powerful
"@typescript-eslint/prefer-find": "off",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "off",
Expand Down Expand Up @@ -1080,6 +1101,8 @@ export default [
],
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",

// Typescript handles itself
"consistent-return": "off",
"@typescript-eslint/consistent-return": "off",
"constructor-super": "off",
Expand All @@ -1103,6 +1126,9 @@ export default [
"no-unsafe-negation": "off",
"no-with": "off",
"valid-typeof": "off",

// React
// If you are working in a typed-codebase which encourages you to always use boolean conditions, this rule can be disabled.
"react/jsx-no-leaked-render": "off",
},
},
Expand All @@ -1122,6 +1148,7 @@ export default [
"testing-library": testingLibrary,
},
rules: {
// eslint-plugin-jest
"jest/consistent-test-it": "error",
"jest/expect-expect": [
"error",
Expand Down Expand Up @@ -1153,6 +1180,7 @@ export default [
"jest/no-standalone-expect": "error",
"jest/no-test-prefixes": "error",
"jest/no-test-return-statement": "error",
// This rule is only active if using typescript - see down below
"jest/no-untyped-mock-factory": "off",
"jest/padding-around-after-all-blocks": "off",
"jest/padding-around-after-each-blocks": "off",
Expand Down Expand Up @@ -1194,6 +1222,8 @@ export default [
"jest/valid-title": "error",
"@typescript-eslint/unbound-method": "off",
"jest/unbound-method": "error",

// plugin-testing-library
"testing-library/await-async-events": "error",
"testing-library/await-async-queries": "error",
"testing-library/await-async-utils": "error",
Expand Down
34 changes: 33 additions & 1 deletion nodeWithBiome.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default [
},
},
rules: {
// Possible problems
"array-callback-return": [
"error",
{
Expand Down Expand Up @@ -106,6 +107,8 @@ export default [
"require-atomic-updates": "error",
"use-isnan": "off",
"valid-typeof": "off",

// Suggestions
"accessor-pairs": [
"error",
{
Expand Down Expand Up @@ -297,18 +300,24 @@ export default [
"symbol-description": "error",
"vars-on-top": "error",
yoda: "off",

// Layout & Formatting
"line-comment-position": "off",
"unicode-bom": "error",

// @stylistic
"@stylistic/max-statements-per-line": "error",
"@stylistic/multiline-comment-style": ["error", "separate-lines"],
"@stylistic/no-floating-decimal": "error",
"@stylistic/padding-line-between-statements": [
"error",
// return
{
blankLine: "always",
prev: "*",
next: "return",
},
// const, let, var
{
blankLine: "always",
prev: ["const", "let", "var"],
Expand All @@ -324,6 +333,7 @@ export default [
prev: ["const", "let", "var"],
next: ["const", "let", "var"],
},
// import
{
blankLine: "always",
prev: ["import", "cjs-import"],
Expand All @@ -334,6 +344,7 @@ export default [
prev: ["import", "cjs-import"],
next: ["import", "cjs-import"],
},
// export
{
blankLine: "always",
prev: "*",
Expand All @@ -344,6 +355,7 @@ export default [
prev: ["export", "cjs-export"],
next: ["export", "cjs-export"],
},
// function
{
blankLine: "always",
prev: "*",
Expand All @@ -352,6 +364,8 @@ export default [
],
"@stylistic/quote-props": ["error", "as-needed"],
"@stylistic/spaced-comment": ["error", "always"],

// eslint-plugin-react
"react/boolean-prop-naming": "off",
"react/button-has-type": "off",
"react/checked-requires-onchange-or-readonly": "error",
Expand Down Expand Up @@ -508,8 +522,12 @@ export default [
"react/static-property-placement": "off",
"react/style-prop-object": "error",
"react/void-dom-elements-no-children": "off",

// eslint-plugin-react-hooks
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",

// eslint-plugin-unicorn
"unicorn/better-regex": "error",
"unicorn/catch-error-name": [
"error",
Expand Down Expand Up @@ -629,6 +647,8 @@ export default [
"unicorn/prefer-string-trim-start-end": "off",
"unicorn/prefer-structured-clone": "error",
"unicorn/prefer-switch": "error",

// TODO: off until there is a solution to this: https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1079
"unicorn/prefer-ternary": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/prefer-type-error": "error",
Expand All @@ -642,6 +662,8 @@ export default [
"unicorn/template-indent": "off",
"unicorn/text-encoding-identifier-case": "error",
"unicorn/throw-new-error": "off",

// eslint-plugin-import
"import/export": "off",
"import/no-deprecated": "off",
"import/no-empty-named-blocks": "error",
Expand Down Expand Up @@ -726,6 +748,7 @@ export default [
},
},
rules: {
// Typescript
"@typescript-eslint/adjacent-overload-signatures": "off",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/await-thenable": "error",
Expand Down Expand Up @@ -875,14 +898,14 @@ export default [
array: false,
object: true,
},

AssignmentExpression: {
array: false,
object: false,
},
},
],
"@typescript-eslint/prefer-enum-initializers": "off",
// unicorns prefer-array-find is more powerful
"@typescript-eslint/prefer-find": "off",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/prefer-function-type": "off",
Expand Down Expand Up @@ -934,6 +957,8 @@ export default [
],
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",

// Typescript handles itself
"consistent-return": "off",
"@typescript-eslint/consistent-return": "off",
"constructor-super": "off",
Expand All @@ -957,6 +982,9 @@ export default [
"no-unsafe-negation": "off",
"no-with": "off",
"valid-typeof": "off",

// React
// If you are working in a typed-codebase which encourages you to always use boolean conditions, this rule can be disabled.
"react/jsx-no-leaked-render": "off",
},
},
Expand All @@ -976,6 +1004,7 @@ export default [
"testing-library": testingLibrary,
},
rules: {
// eslint-plugin-jest
"jest/consistent-test-it": "error",
"jest/expect-expect": [
"error",
Expand Down Expand Up @@ -1007,6 +1036,7 @@ export default [
"jest/no-standalone-expect": "off",
"jest/no-test-prefixes": "error",
"jest/no-test-return-statement": "error",
// This rule is only active if using typescript - see down below
"jest/no-untyped-mock-factory": "off",
"jest/padding-around-after-all-blocks": "off",
"jest/padding-around-after-each-blocks": "off",
Expand Down Expand Up @@ -1048,6 +1078,8 @@ export default [
"jest/valid-title": "error",
"@typescript-eslint/unbound-method": "off",
"jest/unbound-method": "error",

// plugin-testing-library
"testing-library/await-async-events": "error",
"testing-library/await-async-queries": "error",
"testing-library/await-async-utils": "error",
Expand Down

0 comments on commit 5048f8d

Please sign in to comment.