Skip to content
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
2 changes: 1 addition & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"node": "16",
"node": "20",
"buildCommand": "build",
"packages": [
"packages/babel-preset",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- uses: umidbekk/actions/prepare-node-repo@v2
with:
cache-key: npm-v2-
node-version: 20

- run: yarn tsc
- run: yarn lint
Expand All @@ -24,4 +25,3 @@ jobs:
command: yarn test
update-command: yarn test -u
- uses: codecov/codecov-action@v2
- run: yarn build
9 changes: 2 additions & 7 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
"version": "0.12.0",
"npmClient": "yarn",
"useWorkspaces": true,
"packages": [
"packages/*"
],
"packages": ["packages/*"],
"command": {
"publish": {
"message": "%s",
"ignoreChanges": [
"**/__tests__/*.*",
"**/__testutils__/*.*"
]
"ignoreChanges": ["**/__tests__/*.*", "**/__testutils__/*.*"]
}
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"prerelease": "yarn --force && yarn tsc && yarn lint && yarn test",
"release": "lerna publish",
"tdd": "jest --watch",
"test": "jest --coverage"
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --coverage"
},
"lint-staged": {
"*": "js-tools lint --fix"
Expand Down Expand Up @@ -54,7 +54,7 @@
"@types/jest": "27.5.2",
"@types/listr": "0.14.4",
"@types/lodash": "4.14.186",
"@types/node": "16.18.0",
"@types/node": "24.0.10",
"@types/prettier": "2.7.1",
"enhanced-resolve": "5.10.0",
"eslint": "8.23.0",
Expand All @@ -70,6 +70,6 @@
"typescript": "4.8.4"
},
"engines": {
"node": ">=16"
"node": "20"
}
}
5 changes: 3 additions & 2 deletions packages/babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@
"@babel/preset-typescript": "^7.26.0",
"babel-plugin-annotate-pure-calls": "^0.4.0",
"babel-plugin-dev-expression": "^0.2.2",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24"
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"snapshot-diff": "^0.10.0"
},
"peerDependencies": {
"@babel/runtime": "^7.0.0"
},
"engines": {
"node": ">=12"
"node": "20"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function preset(
);
}

if (typeof transpileJSX != 'boolean' && transpileJSX !== 'runtime') {
if (typeof transpileJSX !== 'boolean' && transpileJSX !== 'runtime') {
throw new Error(
format(
'Invalid "jsx" option, expected "boolean" or "runtime", but got: %j',
Expand Down
9 changes: 9 additions & 0 deletions packages/biome-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### `@superdispatch/biome-config`

[![npm](https://img.shields.io/npm/v/@superdispatch/biome-config)](https://www.npmjs.com/package/@superdispatch/biome-config)

#### Installation

```bash
yarn add @superdispatch/biome-config -D
```
98 changes: 98 additions & 0 deletions packages/biome-config/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto",
"bracketSameLine": false,
"expand": "auto"
},
"files": {
"ignoreUnknown": true,
"includes": ["**/*", "!**/dist/**"]
},
"linter": {
"enabled": true,
"rules": { "recommended": false }
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "all",
"semicolons": "always",
"arrowParentheses": "always",
"bracketSameLine": false,
"quoteStyle": "single"
}
},
"overrides": [
{
"includes": ["*.js", "!public/**/*.js", "!src/**/*.js"],
"linter": {
"rules": { "correctness": { "noUndeclaredDependencies": "error" } }
}
},
{
"includes": ["scripts/**/*.ts"],
"linter": {
"rules": { "correctness": { "noUndeclaredDependencies": "error" } }
}
},
{
"includes": ["**/*.{ts,tsx}"],
"linter": {
"rules": {
"complexity": { "noBannedTypes": "warn", "useOptionalChain": "warn" },
"correctness": { "useExhaustiveDependencies": "warn" },
"style": { "noRestrictedImports": "warn" },
"suspicious": { "noAlert": "warn", "noEmptyBlockStatements": "warn" }
}
}
},
{ "includes": ["src/**/*.{js,jsx}"], "linter": { "rules": {} } },
{
"includes": ["src/service-worker.ts"],
"linter": {
"rules": {
"style": { "noRestrictedGlobals": { "level": "off", "options": {} } }
}
}
},
{
"includes": [
"setup-vitest.ts",
"**/*.{test,spec}.{ts,tsx,js,jsx}",
"**/{__tests__,__testutils__}/**/*.{ts,tsx,js,jsx}"
],
"linter": {
"rules": {
"correctness": { "noUndeclaredDependencies": "error" },
"style": {
"noNonNullAssertion": "off",
"noRestrictedImports": "off"
},
"suspicious": {
"noEmptyBlockStatements": "warn",
"noExplicitAny": "off"
}
}
}
},
{
"includes": ["e2e/**/*.{ts,tsx}"],
"linter": {
"rules": {
"complexity": { "noBannedTypes": "warn" },
"correctness": { "noUndeclaredDependencies": "error" }
}
}
},
{ "includes": ["types"] }
],
"html": { "formatter": { "selfCloseVoidElements": "always" } }
}
23 changes: 23 additions & 0 deletions packages/biome-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "@superdispatch/biome-config",
"version": "0.12.0",
"description": "Shared config for Biomejs.",
"keywords": [
"biome"
],
"repository": "https://github.com/superdispatch/js-tools.git",
"license": "MIT",
"main": "biome.json",
"files": [
"biome.json"
],
"engines": {
"node": "20"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@biomejs/biome": "2.0.6"
}
}
6 changes: 4 additions & 2 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"dependencies": {
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"@typescript-eslint/types": "^8.35.1",
"@typescript-eslint/typescript-estree": "5.8.0",
"confusing-browser-globals": "^1.0.10",
"eslint-config-prettier": "^8.3.0",
Expand All @@ -30,15 +31,16 @@
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-testing-library": "^5.0.1",
"lodash": "^4.17.19"
"lodash": "^4.17.19",
"snapshot-diff": "0.10.0"
},
"peerDependencies": {
"eslint": "^7.0.0 || ^8.0.0",
"prettier": "^2.0.0",
"typescript": "^4"
},
"engines": {
"node": ">=12"
"node": "20"
},
"publishConfig": {
"access": "public"
Expand Down
26 changes: 24 additions & 2 deletions packages/eslint-plugin/src/configs/base.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { getConfigData } from './__testutils__/test-eslint-config';

it('extends dependencies', async () => {
Expand Down Expand Up @@ -29,6 +27,9 @@ it('extends dependencies', async () => {
"@babel/semi": [
"off",
],
"@typescript-eslint/block-spacing": [
"off",
],
"@typescript-eslint/brace-style": [
"off",
],
Expand All @@ -44,9 +45,15 @@ it('extends dependencies', async () => {
"@typescript-eslint/indent": [
"off",
],
"@typescript-eslint/key-spacing": [
"off",
],
"@typescript-eslint/keyword-spacing": [
"off",
],
"@typescript-eslint/lines-around-comment": [
0,
],
"@typescript-eslint/member-delimiter-style": [
"off",
],
Expand All @@ -65,6 +72,9 @@ it('extends dependencies', async () => {
"@typescript-eslint/semi": [
"off",
],
"@typescript-eslint/space-before-blocks": [
"off",
],
"@typescript-eslint/space-before-function-paren": [
"off",
],
Expand Down Expand Up @@ -303,6 +313,9 @@ it('extends dependencies', async () => {
"max-len": [
0,
],
"max-statements-per-line": [
"off",
],
"multiline-ternary": [
"off",
],
Expand Down Expand Up @@ -1053,6 +1066,9 @@ it('extends dependencies', async () => {
"vue/array-bracket-spacing": [
"off",
],
"vue/array-element-newline": [
"off",
],
"vue/arrow-spacing": [
"off",
],
Expand Down Expand Up @@ -1113,6 +1129,9 @@ it('extends dependencies', async () => {
"vue/multiline-html-element-content-newline": [
"off",
],
"vue/multiline-ternary": [
"off",
],
"vue/mustache-interpolation-spacing": [
"off",
],
Expand All @@ -1137,6 +1156,9 @@ it('extends dependencies', async () => {
"vue/operator-linebreak": [
"off",
],
"vue/quote-props": [
"off",
],
"vue/script-indent": [
"off",
],
Expand Down
2 changes: 0 additions & 2 deletions packages/eslint-plugin/src/configs/jest.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import {
getConfigData,
getConfigDataDiff,
Expand Down
2 changes: 0 additions & 2 deletions packages/eslint-plugin/src/configs/node-pkg.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import {
getConfigData,
getConfigDataDiff,
Expand Down
2 changes: 0 additions & 2 deletions packages/eslint-plugin/src/configs/node.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import {
getConfigData,
getConfigDataDiff,
Expand Down
Loading