-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
335 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Nightly Checks | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
schedule: | ||
# Run checks night at midnight | ||
- cron: '0 0 * * *' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
prepare: | ||
name: Prepare Targets | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
outputs: | ||
examples: ${{ steps.targets.outputs.examples }} | ||
templates: ${{ steps.targets.outputs.templates }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Find all build targets | ||
id: targets | ||
run: | | ||
examples=$( | ||
find templates -mindepth 1 -maxdepth 1 -type d | | ||
jq -cnR '[inputs | select(length > 0)]' | ||
) | ||
templates=$( | ||
find templates -mindepth 1 -maxdepth 1 -type d | | ||
jq -cnR '[inputs | select(length > 0)]' | ||
) | ||
echo "examples=${examples}" >> $GITHUB_OUTPUT | ||
echo "templates=${templates}" >> $GITHUB_OUTPUT | ||
examples: | ||
name: Check Examples | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
needs: [prepare] | ||
strategy: | ||
matrix: | ||
example: ${{ fromJSON(needs.prepare.outputs.examples) }} | ||
fail-fast: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: ${{ matrix.example }} | ||
sparse-checkout-cone-mode: false | ||
- name: Move files to root | ||
run: | ||
ls -lah | ||
shopt -s dotglob | ||
mv ${{ matrix.example }}/* . | ||
rm -rf examples | ||
ls -lah | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- run: pnpm lint | ||
- run: pnpm check | ||
- run: pnpm test | ||
|
||
templates: | ||
name: Check Templates | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
needs: [prepare] | ||
strategy: | ||
matrix: | ||
template: ${{ fromJSON(needs.prepare.outputs.templates) }} | ||
fail-fast: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: ${{ matrix.template }} | ||
sparse-checkout-cone-mode: false | ||
- name: Move files to root | ||
run: | ||
ls -lah | ||
shopt -s dotglob | ||
mv ${{ matrix.template }}/* . | ||
rm -rf templates | ||
ls -lah | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- run: pnpm lint | ||
- run: pnpm check | ||
- run: pnpm build | ||
- run: pnpm test |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
import { fixupPluginRules } from "@eslint/compat" | ||
import { FlatCompat } from "@eslint/eslintrc" | ||
import js from "@eslint/js" | ||
import tsParser from "@typescript-eslint/parser" | ||
import codegen from "eslint-plugin-codegen" | ||
import deprecation from "eslint-plugin-deprecation" | ||
import _import from "eslint-plugin-import" | ||
import simpleImportSort from "eslint-plugin-simple-import-sort" | ||
import sortDestructureKeys from "eslint-plugin-sort-destructure-keys" | ||
import path from "node:path" | ||
import { fileURLToPath } from "node:url" | ||
|
||
const __filename = fileURLToPath(import.meta.url) | ||
const __dirname = path.dirname(__filename) | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all | ||
}) | ||
|
||
export default [ | ||
{ | ||
ignores: ["**/dist", "**/build", "**/docs", "**/*.md"] | ||
}, | ||
...compat.extends( | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@effect/recommended" | ||
), | ||
{ | ||
plugins: { | ||
deprecation, | ||
import: fixupPluginRules(_import), | ||
"sort-destructure-keys": sortDestructureKeys, | ||
"simple-import-sort": simpleImportSort, | ||
codegen | ||
}, | ||
|
||
languageOptions: { | ||
parser: tsParser, | ||
ecmaVersion: 2018, | ||
sourceType: "module" | ||
}, | ||
|
||
settings: { | ||
"import/parsers": { | ||
"@typescript-eslint/parser": [".ts", ".tsx"] | ||
}, | ||
|
||
"import/resolver": { | ||
typescript: { | ||
alwaysTryTypes: true | ||
} | ||
} | ||
}, | ||
|
||
rules: { | ||
"codegen/codegen": "error", | ||
"no-fallthrough": "off", | ||
"no-irregular-whitespace": "off", | ||
"object-shorthand": "error", | ||
"prefer-destructuring": "off", | ||
"sort-imports": "off", | ||
|
||
"no-restricted-syntax": ["error", { | ||
selector: "CallExpression[callee.property.name='push'] > SpreadElement.arguments", | ||
message: "Do not use spread arguments in Array.push" | ||
}], | ||
|
||
"no-unused-vars": "off", | ||
"prefer-rest-params": "off", | ||
"prefer-spread": "off", | ||
"import/first": "error", | ||
"import/newline-after-import": "error", | ||
"import/no-duplicates": "error", | ||
"import/no-unresolved": "off", | ||
"import/order": "off", | ||
"simple-import-sort/imports": "off", | ||
"sort-destructure-keys/sort-destructure-keys": "error", | ||
"deprecation/deprecation": "off", | ||
|
||
"@typescript-eslint/array-type": ["warn", { | ||
default: "generic", | ||
readonly: "generic" | ||
}], | ||
|
||
"@typescript-eslint/member-delimiter-style": 0, | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-empty-interface": "off", | ||
"@typescript-eslint/consistent-type-imports": "warn", | ||
|
||
"@typescript-eslint/no-unused-vars": ["error", { | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_" | ||
}], | ||
|
||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/camelcase": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/interface-name-prefix": "off", | ||
"@typescript-eslint/no-array-constructor": "off", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"@typescript-eslint/no-namespace": "off", | ||
|
||
"@effect/dprint": ["error", { | ||
config: { | ||
indentWidth: 2, | ||
lineWidth: 120, | ||
semiColons: "asi", | ||
quoteStyle: "alwaysDouble", | ||
trailingCommas: "never", | ||
operatorPosition: "maintain", | ||
"arrowFunction.useParentheses": "force" | ||
} | ||
}] | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,53 @@ | ||
{ | ||
"compilerOptions": { | ||
"strict": true, | ||
"exactOptionalPropertyTypes": true, | ||
"moduleDetection": "force", | ||
"composite": true, | ||
"incremental": true, | ||
"outDir": "dist", | ||
"downlevelIteration": true, | ||
"resolveJsonModule": true, | ||
"esModuleInterop": false, | ||
"declaration": true, | ||
"skipLibCheck": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"moduleResolution": "NodeNext", | ||
"module": "NodeNext", | ||
"allowSyntheticDefaultImports": true, | ||
"exactOptionalPropertyTypes": true, | ||
"noErrorTruncation": true, | ||
"lib": ["ESNext", "DOM"], | ||
"lib": [ | ||
"ES2022", | ||
"DOM", | ||
"DOM.Iterable" | ||
], | ||
"types": [], | ||
"isolatedModules": true, | ||
"sourceMap": true, | ||
"strict": true, | ||
"declarationMap": true, | ||
"noImplicitReturns": false, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": false, | ||
"noFallthroughCasesInSwitch": true, | ||
"noEmitOnError": false, | ||
"noErrorTruncation": false, | ||
"allowJs": false, | ||
"checkJs": false, | ||
"forceConsistentCasingInFileNames": true, | ||
"noImplicitAny": true, | ||
"noImplicitThis": true, | ||
"noUncheckedIndexedAccess": false, | ||
"strictNullChecks": true, | ||
"target": "ESNext", | ||
"plugins": [{ "name": "@effect/language-service" }] | ||
"baseUrl": ".", | ||
"target": "ES2022", | ||
"module": "NodeNext", | ||
"incremental": true, | ||
"removeComments": false, | ||
"plugins": [ | ||
{ | ||
"name": "@effect/language-service" | ||
} | ||
], | ||
"paths": { | ||
"app/*": [ | ||
"src/*.js" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"composite": true, | ||
"incremental": true | ||
}, | ||
"files": [], | ||
"extends": "./tsconfig.base.json", | ||
"include": [], | ||
"references": [ | ||
{ "path": "./tsconfig.src.json" }, | ||
{ "path": "./tsconfig.test.json" } | ||
{ | ||
"path": "tsconfig.src.json" | ||
}, | ||
{ | ||
"path": "tsconfig.test.json" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
{ | ||
"extends": "./tsconfig.base.json", | ||
"include": [ | ||
"src" | ||
], | ||
"compilerOptions": { | ||
"types": [ | ||
"node" | ||
], | ||
"outDir": "dist", | ||
"rootDir": "src", | ||
"tsBuildInfoFile": "./tsconfig.src.tsbuildinfo" | ||
}, | ||
"include": ["src/**/*"] | ||
"tsBuildInfoFile": ".tsbuildinfo/src.tsbuildinfo", | ||
"rootDir": "src" | ||
} | ||
} |
Oops, something went wrong.