-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
800aaf1
commit 7ccdc01
Showing
25 changed files
with
3,999 additions
and
5,432 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,5 @@ | ||
--- | ||
"@effect/eslint-plugin": minor | ||
--- | ||
|
||
Update plugin to eslint 9 |
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,21 @@ | ||
name: Setup | ||
description: Perform standard setup and install dependencies using pnpm. | ||
inputs: | ||
node-version: | ||
description: The version of Node.js to install | ||
required: true | ||
default: 20.18.1 | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
- name: Install node | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: pnpm | ||
node-version: ${{ inputs.node-version }} | ||
- name: Install dependencies | ||
shell: bash | ||
run: pnpm install |
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,53 @@ | ||
name: Check | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main, next-minor, next-major] | ||
push: | ||
branches: [main, next-minor, next-major] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
|
||
types: | ||
name: Types | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- run: pnpm check | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- run: pnpm lint | ||
|
||
test: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- run: pnpm vitest |
This file was deleted.
Oops, something went wrong.
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,114 @@ | ||
import { FlatCompat } from "@eslint/eslintrc" | ||
import eslint from "@eslint/js" | ||
import * as tsResolver from "eslint-import-resolver-typescript" | ||
import importPlugin from "eslint-plugin-import-x" | ||
import simpleImportSort from "eslint-plugin-simple-import-sort" | ||
import sortDestructureKeys from "eslint-plugin-sort-destructure-keys" | ||
import * as Path from "node:path" | ||
import * as Url from "node:url" | ||
import tseslint from "typescript-eslint" | ||
|
||
const __filename = Url.fileURLToPath(import.meta.url) | ||
const __dirname = Path.dirname(__filename) | ||
|
||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
}) | ||
|
||
export default tseslint.config( | ||
{ | ||
ignores: ["**/dist", "**/build", "**/docs", "**/*.md"], | ||
}, | ||
eslint.configs.recommended, | ||
tseslint.configs.strict, | ||
importPlugin.flatConfigs.recommended, | ||
importPlugin.flatConfigs.typescript, | ||
{ | ||
plugins: { | ||
"simple-import-sort": simpleImportSort, | ||
"sort-destructure-keys": sortDestructureKeys, | ||
}, | ||
|
||
languageOptions: { | ||
parser: tseslint.parser, | ||
ecmaVersion: 2018, | ||
sourceType: "module", | ||
}, | ||
|
||
settings: { | ||
"import-x/resolver": { | ||
name: "tsResolver", | ||
resolver: tsResolver, | ||
options: { | ||
alwaysTryTypes: true, | ||
}, | ||
}, | ||
}, | ||
|
||
rules: { | ||
"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", | ||
"require-yield": "off", | ||
"prefer-rest-params": "off", | ||
"prefer-spread": "off", | ||
"import-x/export": "off", | ||
"import-x/first": "error", | ||
"import-x/newline-after-import": "error", | ||
"import-x/no-duplicates": "error", | ||
"import-x/no-named-as-default-member": "off", | ||
"import-x/no-unresolved": "off", | ||
"import-x/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/ban-ts-comment": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/camelcase": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/consistent-type-imports": "warn", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/interface-name-prefix": "off", | ||
"@typescript-eslint/member-delimiter-style": 0, | ||
"@typescript-eslint/no-array-constructor": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-empty-interface": "off", | ||
"@typescript-eslint/no-empty-object-type": "off", | ||
"@typescript-eslint/no-invalid-void-type": "off", | ||
"@typescript-eslint/no-namespace": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-unsafe-function-type": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
}, | ||
], | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"@typescript-eslint/prefer-for-of": "off", | ||
"@typescript-eslint/unified-signatures": "off", | ||
}, | ||
}, | ||
) |
Oops, something went wrong.