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
5 changes: 5 additions & 0 deletions .changeset/healthy-tips-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/eslint-plugin": minor
---

Update plugin to eslint 9
64 changes: 0 additions & 64 deletions .eslintrc.cjs

This file was deleted.

21 changes: 21 additions & 0 deletions .github/actions/setup/action.yml
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
53 changes: 53 additions & 0 deletions .github/workflows/check.yml
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
56 changes: 0 additions & 56 deletions .github/workflows/main.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/pr.yml

This file was deleted.

114 changes: 114 additions & 0 deletions eslint.config.mjs
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",
},
},
)
Loading